UNPKG

527 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory(require("react"), require("react-dom"));
4 else if(typeof define === 'function' && define.amd)
5 define(["react", "react-dom"], factory);
6 else if(typeof exports === 'object')
7 exports["ReactBootstrap"] = factory(require("react"), require("react-dom"));
8 else
9 root["ReactBootstrap"] = factory(root["React"], root["ReactDOM"]);
10})(self, function(__WEBPACK_EXTERNAL_MODULE__698__, __WEBPACK_EXTERNAL_MODULE__207__) {
11return /******/ (() => { // webpackBootstrap
12/******/ var __webpack_modules__ = ({
13
14/***/ 814:
15/***/ ((module, exports) => {
16
17var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
18 Copyright (c) 2018 Jed Watson.
19 Licensed under the MIT License (MIT), see
20 http://jedwatson.github.io/classnames
21*/
22
23/* global define */
24(function () {
25 'use strict';
26
27 var hasOwn = {}.hasOwnProperty;
28
29 function classNames() {
30 var classes = [];
31
32 for (var i = 0; i < arguments.length; i++) {
33 var arg = arguments[i];
34 if (!arg) continue;
35 var argType = typeof arg;
36
37 if (argType === 'string' || argType === 'number') {
38 classes.push(arg);
39 } else if (Array.isArray(arg)) {
40 if (arg.length) {
41 var inner = classNames.apply(null, arg);
42
43 if (inner) {
44 classes.push(inner);
45 }
46 }
47 } else if (argType === 'object') {
48 if (arg.toString === Object.prototype.toString) {
49 for (var key in arg) {
50 if (hasOwn.call(arg, key) && arg[key]) {
51 classes.push(key);
52 }
53 }
54 } else {
55 classes.push(arg.toString());
56 }
57 }
58 }
59
60 return classes.join(' ');
61 }
62
63 if ( true && module.exports) {
64 classNames.default = classNames;
65 module.exports = classNames;
66 } else if (true) {
67 // register as 'classnames', consistent with npm package name
68 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
69 return classNames;
70 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
71 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
72 } else {}
73})();
74
75/***/ }),
76
77/***/ 286:
78/***/ ((module) => {
79
80"use strict";
81/**
82 * Copyright (c) 2013-present, Facebook, Inc.
83 *
84 * This source code is licensed under the MIT license found in the
85 * LICENSE file in the root directory of this source tree.
86 */
87
88/**
89 * Use invariant() to assert state which your program assumes to be true.
90 *
91 * Provide sprintf-style format (only %s is supported) and arguments
92 * to provide information about what broke and what you were
93 * expecting.
94 *
95 * The invariant message will be stripped in production, but the invariant
96 * will remain to ensure logic does not differ in production.
97 */
98
99var invariant = function (condition, format, a, b, c, d, e, f) {
100 if (false) {}
101
102 if (!condition) {
103 var error;
104
105 if (format === undefined) {
106 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
107 } else {
108 var args = [a, b, c, d, e, f];
109 var argIndex = 0;
110 error = new Error(format.replace(/%s/g, function () {
111 return args[argIndex++];
112 }));
113 error.name = 'Invariant Violation';
114 }
115
116 error.framesToPop = 1; // we don't care about invariant's own frame
117
118 throw error;
119 }
120};
121
122module.exports = invariant;
123
124/***/ }),
125
126/***/ 946:
127/***/ ((module, exports, __webpack_require__) => {
128
129"use strict";
130
131
132Object.defineProperty(exports, "__esModule", ({
133 value: true
134}));
135exports.default = all;
136
137var _createChainableTypeChecker = __webpack_require__(844);
138
139var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
140
141function _interopRequireDefault(obj) {
142 return obj && obj.__esModule ? obj : {
143 default: obj
144 };
145}
146
147function all() {
148 for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {
149 validators[_key] = arguments[_key];
150 }
151
152 function allPropTypes() {
153 for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
154 args[_key2] = arguments[_key2];
155 }
156
157 var error = null;
158 validators.forEach(function (validator) {
159 if (error != null) {
160 return;
161 }
162
163 var result = validator.apply(undefined, args);
164
165 if (result != null) {
166 error = result;
167 }
168 });
169 return error;
170 }
171
172 return (0, _createChainableTypeChecker2.default)(allPropTypes);
173}
174
175module.exports = exports['default'];
176
177/***/ }),
178
179/***/ 964:
180/***/ ((module, exports, __webpack_require__) => {
181
182"use strict";
183
184
185Object.defineProperty(exports, "__esModule", ({
186 value: true
187}));
188
189var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
190 return typeof obj;
191} : function (obj) {
192 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
193};
194
195var _react = __webpack_require__(698);
196
197var _react2 = _interopRequireDefault(_react);
198
199var _createChainableTypeChecker = __webpack_require__(844);
200
201var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
202
203function _interopRequireDefault(obj) {
204 return obj && obj.__esModule ? obj : {
205 default: obj
206 };
207}
208
209function validate(props, propName, componentName, location, propFullName) {
210 var propValue = props[propName];
211 var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
212
213 if (_react2.default.isValidElement(propValue)) {
214 return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');
215 }
216
217 if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {
218 return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');
219 }
220
221 return null;
222}
223
224exports.default = (0, _createChainableTypeChecker2.default)(validate);
225module.exports = exports['default'];
226
227/***/ }),
228
229/***/ 647:
230/***/ ((module, exports, __webpack_require__) => {
231
232"use strict";
233
234
235Object.defineProperty(exports, "__esModule", ({
236 value: true
237}));
238exports.default = deprecated;
239
240var _warning = __webpack_require__(459);
241
242var _warning2 = _interopRequireDefault(_warning);
243
244function _interopRequireDefault(obj) {
245 return obj && obj.__esModule ? obj : {
246 default: obj
247 };
248}
249
250var warned = {};
251
252function deprecated(validator, reason) {
253 return function validate(props, propName, componentName, location, propFullName) {
254 var componentNameSafe = componentName || '<<anonymous>>';
255 var propFullNameSafe = propFullName || propName;
256
257 if (props[propName] != null) {
258 var messageKey = componentName + '.' + propName;
259 (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.'));
260 warned[messageKey] = true;
261 }
262
263 for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
264 args[_key - 5] = arguments[_key];
265 }
266
267 return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
268 };
269}
270/* eslint-disable no-underscore-dangle */
271
272
273function _resetWarned() {
274 warned = {};
275}
276
277deprecated._resetWarned = _resetWarned;
278/* eslint-enable no-underscore-dangle */
279
280module.exports = exports['default'];
281
282/***/ }),
283
284/***/ 835:
285/***/ ((module, exports, __webpack_require__) => {
286
287"use strict";
288
289
290Object.defineProperty(exports, "__esModule", ({
291 value: true
292}));
293
294var _react = __webpack_require__(698);
295
296var _react2 = _interopRequireDefault(_react);
297
298var _reactIs = __webpack_require__(532);
299
300var _createChainableTypeChecker = __webpack_require__(844);
301
302var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
303
304function _interopRequireDefault(obj) {
305 return obj && obj.__esModule ? obj : {
306 default: obj
307 };
308}
309
310function elementType(props, propName, componentName, location, propFullName) {
311 var propValue = props[propName];
312
313 if (_react2.default.isValidElement(propValue)) {
314 return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`,expected an element type (a string ') + ', component class, or function component).');
315 }
316
317 if (!(0, _reactIs.isValidElementType)(propValue)) {
318 return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + ', component class, or function component).');
319 }
320
321 return null;
322}
323
324exports.default = (0, _createChainableTypeChecker2.default)(elementType);
325module.exports = exports['default'];
326
327/***/ }),
328
329/***/ 517:
330/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
331
332"use strict";
333var __webpack_unused_export__;
334
335
336__webpack_unused_export__ = ({
337 value: true
338});
339__webpack_unused_export__ = exports.nm = __webpack_unused_export__ = exports.ax = __webpack_unused_export__ = undefined;
340
341var _all = __webpack_require__(946);
342
343var _all2 = _interopRequireDefault(_all);
344
345var _componentOrElement = __webpack_require__(964);
346
347var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
348
349var _deprecated = __webpack_require__(647);
350
351var _deprecated2 = _interopRequireDefault(_deprecated);
352
353var _elementType = __webpack_require__(835);
354
355var _elementType2 = _interopRequireDefault(_elementType);
356
357var _isRequiredForA11y = __webpack_require__(422);
358
359var _isRequiredForA11y2 = _interopRequireDefault(_isRequiredForA11y);
360
361function _interopRequireDefault(obj) {
362 return obj && obj.__esModule ? obj : {
363 default: obj
364 };
365}
366
367__webpack_unused_export__ = _all2.default;
368exports.ax = _componentOrElement2.default;
369__webpack_unused_export__ = _deprecated2.default;
370exports.nm = _elementType2.default;
371__webpack_unused_export__ = _isRequiredForA11y2.default;
372
373/***/ }),
374
375/***/ 422:
376/***/ ((module, exports) => {
377
378"use strict";
379
380
381Object.defineProperty(exports, "__esModule", ({
382 value: true
383}));
384exports.default = isRequiredForA11y;
385
386function isRequiredForA11y(validator) {
387 return function validate(props, propName, componentName, location, propFullName) {
388 var componentNameSafe = componentName || '<<anonymous>>';
389 var propFullNameSafe = propFullName || propName;
390
391 if (props[propName] == null) {
392 return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.');
393 }
394
395 for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
396 args[_key - 5] = arguments[_key];
397 }
398
399 return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
400 };
401}
402
403module.exports = exports['default'];
404
405/***/ }),
406
407/***/ 844:
408/***/ ((module, exports) => {
409
410"use strict";
411
412
413Object.defineProperty(exports, "__esModule", ({
414 value: true
415}));
416exports.default = createChainableTypeChecker;
417/**
418 * Copyright 2013-present, Facebook, Inc.
419 * All rights reserved.
420 *
421 * This source code is licensed under the BSD-style license found in the
422 * LICENSE file in the root directory of this source tree. An additional grant
423 * of patent rights can be found in the PATENTS file in the same directory.
424 */
425// Mostly taken from ReactPropTypes.
426
427function createChainableTypeChecker(validate) {
428 function checkType(isRequired, props, propName, componentName, location, propFullName) {
429 var componentNameSafe = componentName || '<<anonymous>>';
430 var propFullNameSafe = propFullName || propName;
431
432 if (props[propName] == null) {
433 if (isRequired) {
434 return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
435 }
436
437 return null;
438 }
439
440 for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
441 args[_key - 6] = arguments[_key];
442 }
443
444 return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
445 }
446
447 var chainedCheckType = checkType.bind(null, false);
448 chainedCheckType.isRequired = checkType.bind(null, true);
449 return chainedCheckType;
450}
451
452module.exports = exports['default'];
453
454/***/ }),
455
456/***/ 428:
457/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
458
459"use strict";
460/**
461 * Copyright (c) 2013-present, Facebook, Inc.
462 *
463 * This source code is licensed under the MIT license found in the
464 * LICENSE file in the root directory of this source tree.
465 */
466
467
468var ReactPropTypesSecret = __webpack_require__(134);
469
470function emptyFunction() {}
471
472function emptyFunctionWithReset() {}
473
474emptyFunctionWithReset.resetWarningCache = emptyFunction;
475
476module.exports = function () {
477 function shim(props, propName, componentName, location, propFullName, secret) {
478 if (secret === ReactPropTypesSecret) {
479 // It is still safe when called from React.
480 return;
481 }
482
483 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');
484 err.name = 'Invariant Violation';
485 throw err;
486 }
487
488 ;
489 shim.isRequired = shim;
490
491 function getShim() {
492 return shim;
493 }
494
495 ; // Important!
496 // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
497
498 var ReactPropTypes = {
499 array: shim,
500 bool: shim,
501 func: shim,
502 number: shim,
503 object: shim,
504 string: shim,
505 symbol: shim,
506 any: shim,
507 arrayOf: getShim,
508 element: shim,
509 elementType: shim,
510 instanceOf: getShim,
511 node: shim,
512 objectOf: getShim,
513 oneOf: getShim,
514 oneOfType: getShim,
515 shape: getShim,
516 exact: getShim,
517 checkPropTypes: emptyFunctionWithReset,
518 resetWarningCache: emptyFunction
519 };
520 ReactPropTypes.PropTypes = ReactPropTypes;
521 return ReactPropTypes;
522};
523
524/***/ }),
525
526/***/ 526:
527/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
528
529/**
530 * Copyright (c) 2013-present, Facebook, Inc.
531 *
532 * This source code is licensed under the MIT license found in the
533 * LICENSE file in the root directory of this source tree.
534 */
535if (false) { var throwOnDirectAccess, ReactIs; } else {
536 // By explicitly using `prop-types` you are opting into new production behavior.
537 // http://fb.me/prop-types-in-prod
538 module.exports = __webpack_require__(428)();
539}
540
541/***/ }),
542
543/***/ 134:
544/***/ ((module) => {
545
546"use strict";
547/**
548 * Copyright (c) 2013-present, Facebook, Inc.
549 *
550 * This source code is licensed under the MIT license found in the
551 * LICENSE file in the root directory of this source tree.
552 */
553
554
555var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
556module.exports = ReactPropTypesSecret;
557
558/***/ }),
559
560/***/ 15:
561/***/ ((__unused_webpack_module, exports) => {
562
563"use strict";
564/** @license React v16.13.1
565 * react-is.production.min.js
566 *
567 * Copyright (c) Facebook, Inc. and its affiliates.
568 *
569 * This source code is licensed under the MIT license found in the
570 * LICENSE file in the root directory of this source tree.
571 */
572
573
574var b = "function" === typeof Symbol && Symbol.for,
575 c = b ? Symbol.for("react.element") : 60103,
576 d = b ? Symbol.for("react.portal") : 60106,
577 e = b ? Symbol.for("react.fragment") : 60107,
578 f = b ? Symbol.for("react.strict_mode") : 60108,
579 g = b ? Symbol.for("react.profiler") : 60114,
580 h = b ? Symbol.for("react.provider") : 60109,
581 k = b ? Symbol.for("react.context") : 60110,
582 l = b ? Symbol.for("react.async_mode") : 60111,
583 m = b ? Symbol.for("react.concurrent_mode") : 60111,
584 n = b ? Symbol.for("react.forward_ref") : 60112,
585 p = b ? Symbol.for("react.suspense") : 60113,
586 q = b ? Symbol.for("react.suspense_list") : 60120,
587 r = b ? Symbol.for("react.memo") : 60115,
588 t = b ? Symbol.for("react.lazy") : 60116,
589 v = b ? Symbol.for("react.block") : 60121,
590 w = b ? Symbol.for("react.fundamental") : 60117,
591 x = b ? Symbol.for("react.responder") : 60118,
592 y = b ? Symbol.for("react.scope") : 60119;
593
594function z(a) {
595 if ("object" === typeof a && null !== a) {
596 var u = a.$$typeof;
597
598 switch (u) {
599 case c:
600 switch (a = a.type, a) {
601 case l:
602 case m:
603 case e:
604 case g:
605 case f:
606 case p:
607 return a;
608
609 default:
610 switch (a = a && a.$$typeof, a) {
611 case k:
612 case n:
613 case t:
614 case r:
615 case h:
616 return a;
617
618 default:
619 return u;
620 }
621
622 }
623
624 case d:
625 return u;
626 }
627 }
628}
629
630function A(a) {
631 return z(a) === m;
632}
633
634exports.AsyncMode = l;
635exports.ConcurrentMode = m;
636exports.ContextConsumer = k;
637exports.ContextProvider = h;
638exports.Element = c;
639exports.ForwardRef = n;
640exports.Fragment = e;
641exports.Lazy = t;
642exports.Memo = r;
643exports.Portal = d;
644exports.Profiler = g;
645exports.StrictMode = f;
646exports.Suspense = p;
647
648exports.isAsyncMode = function (a) {
649 return A(a) || z(a) === l;
650};
651
652exports.isConcurrentMode = A;
653
654exports.isContextConsumer = function (a) {
655 return z(a) === k;
656};
657
658exports.isContextProvider = function (a) {
659 return z(a) === h;
660};
661
662exports.isElement = function (a) {
663 return "object" === typeof a && null !== a && a.$$typeof === c;
664};
665
666exports.isForwardRef = function (a) {
667 return z(a) === n;
668};
669
670exports.isFragment = function (a) {
671 return z(a) === e;
672};
673
674exports.isLazy = function (a) {
675 return z(a) === t;
676};
677
678exports.isMemo = function (a) {
679 return z(a) === r;
680};
681
682exports.isPortal = function (a) {
683 return z(a) === d;
684};
685
686exports.isProfiler = function (a) {
687 return z(a) === g;
688};
689
690exports.isStrictMode = function (a) {
691 return z(a) === f;
692};
693
694exports.isSuspense = function (a) {
695 return z(a) === p;
696};
697
698exports.isValidElementType = function (a) {
699 return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
700};
701
702exports.typeOf = z;
703
704/***/ }),
705
706/***/ 532:
707/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
708
709"use strict";
710
711
712if (true) {
713 module.exports = __webpack_require__(15);
714} else {}
715
716/***/ }),
717
718/***/ 459:
719/***/ ((module) => {
720
721"use strict";
722/**
723 * Copyright (c) 2014-present, Facebook, Inc.
724 *
725 * This source code is licensed under the MIT license found in the
726 * LICENSE file in the root directory of this source tree.
727 */
728
729/**
730 * Similar to invariant but only logs a warning if the condition is not met.
731 * This can be used to log issues in development environments in critical
732 * paths. Removing the logging code for production environments will keep the
733 * same logic and follow the same code paths.
734 */
735
736var __DEV__ = "production" !== 'production';
737
738var warning = function () {};
739
740if (__DEV__) {
741 var printWarning = function printWarning(format, args) {
742 var len = arguments.length;
743 args = new Array(len > 1 ? len - 1 : 0);
744
745 for (var key = 1; key < len; key++) {
746 args[key - 1] = arguments[key];
747 }
748
749 var argIndex = 0;
750 var message = 'Warning: ' + format.replace(/%s/g, function () {
751 return args[argIndex++];
752 });
753
754 if (typeof console !== 'undefined') {
755 console.error(message);
756 }
757
758 try {
759 // --- Welcome to debugging React ---
760 // This error was thrown as a convenience so that you can use this stack
761 // to find the callsite that caused this warning to fire.
762 throw new Error(message);
763 } catch (x) {}
764 };
765
766 warning = function (condition, format, args) {
767 var len = arguments.length;
768 args = new Array(len > 2 ? len - 2 : 0);
769
770 for (var key = 2; key < len; key++) {
771 args[key - 2] = arguments[key];
772 }
773
774 if (format === undefined) {
775 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
776 }
777
778 if (!condition) {
779 printWarning.apply(null, [format].concat(args));
780 }
781 };
782}
783
784module.exports = warning;
785
786/***/ }),
787
788/***/ 698:
789/***/ ((module) => {
790
791"use strict";
792module.exports = __WEBPACK_EXTERNAL_MODULE__698__;
793
794/***/ }),
795
796/***/ 207:
797/***/ ((module) => {
798
799"use strict";
800module.exports = __WEBPACK_EXTERNAL_MODULE__207__;
801
802/***/ })
803
804/******/ });
805/************************************************************************/
806/******/ // The module cache
807/******/ var __webpack_module_cache__ = {};
808/******/
809/******/ // The require function
810/******/ function __webpack_require__(moduleId) {
811/******/ // Check if module is in cache
812/******/ var cachedModule = __webpack_module_cache__[moduleId];
813/******/ if (cachedModule !== undefined) {
814/******/ return cachedModule.exports;
815/******/ }
816/******/ // Create a new module (and put it into the cache)
817/******/ var module = __webpack_module_cache__[moduleId] = {
818/******/ // no module.id needed
819/******/ // no module.loaded needed
820/******/ exports: {}
821/******/ };
822/******/
823/******/ // Execute the module function
824/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
825/******/
826/******/ // Return the exports of the module
827/******/ return module.exports;
828/******/ }
829/******/
830/************************************************************************/
831/******/ /* webpack/runtime/compat get default export */
832/******/ (() => {
833/******/ // getDefaultExport function for compatibility with non-harmony modules
834/******/ __webpack_require__.n = (module) => {
835/******/ var getter = module && module.__esModule ?
836/******/ () => (module['default']) :
837/******/ () => (module);
838/******/ __webpack_require__.d(getter, { a: getter });
839/******/ return getter;
840/******/ };
841/******/ })();
842/******/
843/******/ /* webpack/runtime/define property getters */
844/******/ (() => {
845/******/ // define getter functions for harmony exports
846/******/ __webpack_require__.d = (exports, definition) => {
847/******/ for(var key in definition) {
848/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
849/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
850/******/ }
851/******/ }
852/******/ };
853/******/ })();
854/******/
855/******/ /* webpack/runtime/hasOwnProperty shorthand */
856/******/ (() => {
857/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
858/******/ })();
859/******/
860/******/ /* webpack/runtime/make namespace object */
861/******/ (() => {
862/******/ // define __esModule on exports
863/******/ __webpack_require__.r = (exports) => {
864/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
865/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
866/******/ }
867/******/ Object.defineProperty(exports, '__esModule', { value: true });
868/******/ };
869/******/ })();
870/******/
871/************************************************************************/
872var __webpack_exports__ = {};
873// This entry need to be wrapped in an IIFE because it need to be in strict mode.
874(() => {
875"use strict";
876// ESM COMPAT FLAG
877__webpack_require__.r(__webpack_exports__);
878
879// EXPORTS
880__webpack_require__.d(__webpack_exports__, {
881 "Accordion": () => (/* reexport */ src_Accordion),
882 "AccordionCollapse": () => (/* reexport */ src_AccordionCollapse),
883 "AccordionContext": () => (/* reexport */ AccordionContext),
884 "AccordionToggle": () => (/* reexport */ src_AccordionToggle),
885 "Alert": () => (/* reexport */ src_Alert),
886 "Badge": () => (/* reexport */ src_Badge),
887 "Breadcrumb": () => (/* reexport */ src_Breadcrumb),
888 "BreadcrumbItem": () => (/* reexport */ src_BreadcrumbItem),
889 "Button": () => (/* reexport */ src_Button),
890 "ButtonGroup": () => (/* reexport */ src_ButtonGroup),
891 "ButtonToolbar": () => (/* reexport */ src_ButtonToolbar),
892 "Card": () => (/* reexport */ src_Card),
893 "CardColumns": () => (/* reexport */ CardColumns),
894 "CardDeck": () => (/* reexport */ CardDeck),
895 "CardGroup": () => (/* reexport */ CardGroup),
896 "CardImg": () => (/* reexport */ src_CardImg),
897 "Carousel": () => (/* reexport */ src_Carousel),
898 "CarouselItem": () => (/* reexport */ src_CarouselItem),
899 "CloseButton": () => (/* reexport */ src_CloseButton),
900 "Col": () => (/* reexport */ src_Col),
901 "Collapse": () => (/* reexport */ src_Collapse),
902 "Container": () => (/* reexport */ src_Container),
903 "Dropdown": () => (/* reexport */ src_Dropdown),
904 "DropdownButton": () => (/* reexport */ src_DropdownButton),
905 "Fade": () => (/* reexport */ src_Fade),
906 "Figure": () => (/* reexport */ src_Figure),
907 "Form": () => (/* reexport */ Form),
908 "FormCheck": () => (/* reexport */ src_FormCheck),
909 "FormControl": () => (/* reexport */ src_FormControl),
910 "FormFile": () => (/* reexport */ src_FormFile),
911 "FormGroup": () => (/* reexport */ src_FormGroup),
912 "FormLabel": () => (/* reexport */ src_FormLabel),
913 "FormText": () => (/* reexport */ src_FormText),
914 "Image": () => (/* reexport */ src_Image),
915 "InputGroup": () => (/* reexport */ src_InputGroup),
916 "Jumbotron": () => (/* reexport */ src_Jumbotron),
917 "ListGroup": () => (/* reexport */ src_ListGroup),
918 "ListGroupItem": () => (/* reexport */ src_ListGroupItem),
919 "Media": () => (/* reexport */ src_Media),
920 "Modal": () => (/* reexport */ src_Modal),
921 "ModalBody": () => (/* reexport */ ModalBody),
922 "ModalDialog": () => (/* reexport */ src_ModalDialog),
923 "ModalFooter": () => (/* reexport */ ModalFooter),
924 "ModalTitle": () => (/* reexport */ ModalTitle),
925 "Nav": () => (/* reexport */ src_Nav),
926 "NavDropdown": () => (/* reexport */ src_NavDropdown),
927 "NavItem": () => (/* reexport */ src_NavItem),
928 "NavLink": () => (/* reexport */ src_NavLink),
929 "Navbar": () => (/* reexport */ src_Navbar),
930 "NavbarBrand": () => (/* reexport */ src_NavbarBrand),
931 "Overlay": () => (/* reexport */ src_Overlay),
932 "OverlayTrigger": () => (/* reexport */ src_OverlayTrigger),
933 "PageItem": () => (/* reexport */ src_PageItem),
934 "Pagination": () => (/* reexport */ src_Pagination),
935 "Popover": () => (/* reexport */ src_Popover),
936 "PopoverContent": () => (/* reexport */ src_PopoverContent),
937 "PopoverTitle": () => (/* reexport */ src_PopoverTitle),
938 "ProgressBar": () => (/* reexport */ src_ProgressBar),
939 "ResponsiveEmbed": () => (/* reexport */ src_ResponsiveEmbed),
940 "Row": () => (/* reexport */ src_Row),
941 "SafeAnchor": () => (/* reexport */ src_SafeAnchor),
942 "Spinner": () => (/* reexport */ src_Spinner),
943 "SplitButton": () => (/* reexport */ src_SplitButton),
944 "Tab": () => (/* reexport */ src_Tab),
945 "TabContainer": () => (/* reexport */ src_TabContainer),
946 "TabContent": () => (/* reexport */ src_TabContent),
947 "TabPane": () => (/* reexport */ src_TabPane),
948 "Table": () => (/* reexport */ src_Table),
949 "Tabs": () => (/* reexport */ src_Tabs),
950 "ThemeProvider": () => (/* reexport */ src_ThemeProvider),
951 "Toast": () => (/* reexport */ src_Toast),
952 "ToastBody": () => (/* reexport */ ToastBody),
953 "ToastHeader": () => (/* reexport */ src_ToastHeader),
954 "ToggleButton": () => (/* reexport */ src_ToggleButton),
955 "ToggleButtonGroup": () => (/* reexport */ src_ToggleButtonGroup),
956 "Tooltip": () => (/* reexport */ src_Tooltip),
957 "useAccordionToggle": () => (/* reexport */ useAccordionToggle)
958});
959
960;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
961function extends_extends() {
962 extends_extends = Object.assign || function (target) {
963 for (var i = 1; i < arguments.length; i++) {
964 var source = arguments[i];
965
966 for (var key in source) {
967 if (Object.prototype.hasOwnProperty.call(source, key)) {
968 target[key] = source[key];
969 }
970 }
971 }
972
973 return target;
974 };
975
976 return extends_extends.apply(this, arguments);
977}
978;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
979function objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(source, excluded) {
980 if (source == null) return {};
981 var target = {};
982 var sourceKeys = Object.keys(source);
983 var key, i;
984
985 for (i = 0; i < sourceKeys.length; i++) {
986 key = sourceKeys[i];
987 if (excluded.indexOf(key) >= 0) continue;
988 target[key] = source[key];
989 }
990
991 return target;
992}
993// EXTERNAL MODULE: ./node_modules/classnames/index.js
994var classnames = __webpack_require__(814);
995var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
996// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
997var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(698);
998var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
999// EXTERNAL MODULE: ./node_modules/prop-types/index.js
1000var prop_types = __webpack_require__(526);
1001var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
1002// EXTERNAL MODULE: ./node_modules/invariant/browser.js
1003var browser = __webpack_require__(286);
1004var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
1005;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/utils.js
1006
1007
1008var noop = function noop() {};
1009
1010function readOnlyPropType(handler, name) {
1011 return function (props, propName) {
1012 if (props[propName] !== undefined) {
1013 if (!props[handler]) {
1014 return new Error("You have provided a `" + propName + "` prop to `" + name + "` " + ("without an `" + handler + "` handler prop. This will render a read-only field. ") + ("If the field should be mutable use `" + defaultKey(propName) + "`. ") + ("Otherwise, set `" + handler + "`."));
1015 }
1016 }
1017 };
1018}
1019
1020function uncontrolledPropTypes(controlledValues, displayName) {
1021 var propTypes = {};
1022 Object.keys(controlledValues).forEach(function (prop) {
1023 // add default propTypes for folks that use runtime checks
1024 propTypes[defaultKey(prop)] = noop;
1025
1026 if (false) { var handler; }
1027 });
1028 return propTypes;
1029}
1030function isProp(props, prop) {
1031 return props[prop] !== undefined;
1032}
1033function defaultKey(key) {
1034 return 'default' + key.charAt(0).toUpperCase() + key.substr(1);
1035}
1036/**
1037 * Copyright (c) 2013-present, Facebook, Inc.
1038 * All rights reserved.
1039 *
1040 * This source code is licensed under the BSD-style license found in the
1041 * LICENSE file in the root directory of this source tree. An additional grant
1042 * of patent rights can be found in the PATENTS file in the same directory.
1043 */
1044
1045function canAcceptRef(component) {
1046 return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent);
1047}
1048;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/hook.js
1049
1050
1051
1052function _toPropertyKey(arg) {
1053 var key = _toPrimitive(arg, "string");
1054
1055 return typeof key === "symbol" ? key : String(key);
1056}
1057
1058function _toPrimitive(input, hint) {
1059 if (typeof input !== "object" || input === null) return input;
1060 var prim = input[Symbol.toPrimitive];
1061
1062 if (prim !== undefined) {
1063 var res = prim.call(input, hint || "default");
1064 if (typeof res !== "object") return res;
1065 throw new TypeError("@@toPrimitive must return a primitive value.");
1066 }
1067
1068 return (hint === "string" ? String : Number)(input);
1069}
1070
1071
1072
1073
1074function useUncontrolledProp(propValue, defaultValue, handler) {
1075 var wasPropRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(propValue !== undefined);
1076
1077 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(defaultValue),
1078 stateValue = _useState[0],
1079 setState = _useState[1];
1080
1081 var isProp = propValue !== undefined;
1082 var wasProp = wasPropRef.current;
1083 wasPropRef.current = isProp;
1084 /**
1085 * If a prop switches from controlled to Uncontrolled
1086 * reset its value to the defaultValue
1087 */
1088
1089 if (!isProp && wasProp && stateValue !== defaultValue) {
1090 setState(defaultValue);
1091 }
1092
1093 return [isProp ? propValue : stateValue, (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (value) {
1094 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1095 args[_key - 1] = arguments[_key];
1096 }
1097
1098 if (handler) handler.apply(void 0, [value].concat(args));
1099 setState(value);
1100 }, [handler])];
1101}
1102
1103
1104function useUncontrolled(props, config) {
1105 return Object.keys(config).reduce(function (result, fieldName) {
1106 var _extends2;
1107
1108 var _ref = result,
1109 defaultValue = _ref[defaultKey(fieldName)],
1110 propsValue = _ref[fieldName],
1111 rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, [defaultKey(fieldName), fieldName].map(_toPropertyKey));
1112
1113 var handlerName = config[fieldName];
1114
1115 var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),
1116 value = _useUncontrolledProp[0],
1117 handler = _useUncontrolledProp[1];
1118
1119 return extends_extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));
1120 }, props);
1121}
1122;// CONCATENATED MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js
1123/**
1124 * Copyright (c) 2013-present, Facebook, Inc.
1125 *
1126 * This source code is licensed under the MIT license found in the
1127 * LICENSE file in the root directory of this source tree.
1128 */
1129function componentWillMount() {
1130 // Call this.constructor.gDSFP to support sub-classes.
1131 var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
1132
1133 if (state !== null && state !== undefined) {
1134 this.setState(state);
1135 }
1136}
1137
1138function componentWillReceiveProps(nextProps) {
1139 // Call this.constructor.gDSFP to support sub-classes.
1140 // Use the setState() updater to ensure state isn't stale in certain edge cases.
1141 function updater(prevState) {
1142 var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
1143 return state !== null && state !== undefined ? state : null;
1144 } // Binding "this" is important for shallow renderer support.
1145
1146
1147 this.setState(updater.bind(this));
1148}
1149
1150function componentWillUpdate(nextProps, nextState) {
1151 try {
1152 var prevProps = this.props;
1153 var prevState = this.state;
1154 this.props = nextProps;
1155 this.state = nextState;
1156 this.__reactInternalSnapshotFlag = true;
1157 this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);
1158 } finally {
1159 this.props = prevProps;
1160 this.state = prevState;
1161 }
1162} // React may warn about cWM/cWRP/cWU methods being deprecated.
1163// Add a flag to suppress these warnings for this special case.
1164
1165
1166componentWillMount.__suppressDeprecationWarning = true;
1167componentWillReceiveProps.__suppressDeprecationWarning = true;
1168componentWillUpdate.__suppressDeprecationWarning = true;
1169
1170function react_lifecycles_compat_es_polyfill(Component) {
1171 var prototype = Component.prototype;
1172
1173 if (!prototype || !prototype.isReactComponent) {
1174 throw new Error('Can only polyfill class components');
1175 }
1176
1177 if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {
1178 return Component;
1179 } // If new component APIs are defined, "unsafe" lifecycles won't be called.
1180 // Error if any of these lifecycles are present,
1181 // Because they would work differently between older and newer (16.3+) versions of React.
1182
1183
1184 var foundWillMountName = null;
1185 var foundWillReceivePropsName = null;
1186 var foundWillUpdateName = null;
1187
1188 if (typeof prototype.componentWillMount === 'function') {
1189 foundWillMountName = 'componentWillMount';
1190 } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
1191 foundWillMountName = 'UNSAFE_componentWillMount';
1192 }
1193
1194 if (typeof prototype.componentWillReceiveProps === 'function') {
1195 foundWillReceivePropsName = 'componentWillReceiveProps';
1196 } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
1197 foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
1198 }
1199
1200 if (typeof prototype.componentWillUpdate === 'function') {
1201 foundWillUpdateName = 'componentWillUpdate';
1202 } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
1203 foundWillUpdateName = 'UNSAFE_componentWillUpdate';
1204 }
1205
1206 if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
1207 var componentName = Component.displayName || Component.name;
1208 var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
1209 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');
1210 } // React <= 16.2 does not support static getDerivedStateFromProps.
1211 // As a workaround, use cWM and cWRP to invoke the new static lifecycle.
1212 // Newer versions of React will ignore these lifecycles if gDSFP exists.
1213
1214
1215 if (typeof Component.getDerivedStateFromProps === 'function') {
1216 prototype.componentWillMount = componentWillMount;
1217 prototype.componentWillReceiveProps = componentWillReceiveProps;
1218 } // React <= 16.2 does not support getSnapshotBeforeUpdate.
1219 // As a workaround, use cWU to invoke the new lifecycle.
1220 // Newer versions of React will ignore that lifecycle if gSBU exists.
1221
1222
1223 if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
1224 if (typeof prototype.componentDidUpdate !== 'function') {
1225 throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');
1226 }
1227
1228 prototype.componentWillUpdate = componentWillUpdate;
1229 var componentDidUpdate = prototype.componentDidUpdate;
1230
1231 prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {
1232 // 16.3+ will not execute our will-update method;
1233 // It will pass a snapshot value to did-update though.
1234 // Older versions will require our polyfilled will-update value.
1235 // We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
1236 // Because for <= 15.x versions this might be a "prevContext" object.
1237 // We also can't just check "__reactInternalSnapshot",
1238 // Because get-snapshot might return a falsy value.
1239 // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
1240 var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;
1241 componentDidUpdate.call(this, prevProps, prevState, snapshot);
1242 };
1243 }
1244
1245 return Component;
1246}
1247
1248
1249;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/uncontrollable.js
1250
1251
1252
1253var _jsxFileName = "/Users/jquense/src/uncontrollable/src/uncontrollable.js";
1254
1255
1256
1257
1258function uncontrollable(Component, controlledValues, methods) {
1259 if (methods === void 0) {
1260 methods = [];
1261 }
1262
1263 var displayName = Component.displayName || Component.name || 'Component';
1264 var canAcceptRef = Utils.canAcceptRef(Component);
1265 var controlledProps = Object.keys(controlledValues);
1266 var PROPS_TO_OMIT = controlledProps.map(Utils.defaultKey);
1267 !(canAcceptRef || !methods.length) ? false ? 0 : invariant(false) : void 0;
1268
1269 var UncontrolledComponent = /*#__PURE__*/function (_React$Component) {
1270 _inheritsLoose(UncontrolledComponent, _React$Component);
1271
1272 function UncontrolledComponent() {
1273 var _this;
1274
1275 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1276 args[_key] = arguments[_key];
1277 }
1278
1279 _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1280 _this.handlers = Object.create(null);
1281 controlledProps.forEach(function (propName) {
1282 var handlerName = controlledValues[propName];
1283
1284 var handleChange = function handleChange(value) {
1285 if (_this.props[handlerName]) {
1286 var _this$props;
1287
1288 _this._notifying = true;
1289
1290 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1291 args[_key2 - 1] = arguments[_key2];
1292 }
1293
1294 (_this$props = _this.props)[handlerName].apply(_this$props, [value].concat(args));
1295
1296 _this._notifying = false;
1297 }
1298
1299 if (!_this.unmounted) _this.setState(function (_ref) {
1300 var _extends2;
1301
1302 var values = _ref.values;
1303 return {
1304 values: _extends(Object.create(null), values, (_extends2 = {}, _extends2[propName] = value, _extends2))
1305 };
1306 });
1307 };
1308
1309 _this.handlers[handlerName] = handleChange;
1310 });
1311 if (methods.length) _this.attachRef = function (ref) {
1312 _this.inner = ref;
1313 };
1314 var values = Object.create(null);
1315 controlledProps.forEach(function (key) {
1316 values[key] = _this.props[Utils.defaultKey(key)];
1317 });
1318 _this.state = {
1319 values: values,
1320 prevProps: {}
1321 };
1322 return _this;
1323 }
1324
1325 var _proto = UncontrolledComponent.prototype;
1326
1327 _proto.shouldComponentUpdate = function shouldComponentUpdate() {
1328 //let setState trigger the update
1329 return !this._notifying;
1330 };
1331
1332 UncontrolledComponent.getDerivedStateFromProps = function getDerivedStateFromProps(props, _ref2) {
1333 var values = _ref2.values,
1334 prevProps = _ref2.prevProps;
1335 var nextState = {
1336 values: _extends(Object.create(null), values),
1337 prevProps: {}
1338 };
1339 controlledProps.forEach(function (key) {
1340 /**
1341 * If a prop switches from controlled to Uncontrolled
1342 * reset its value to the defaultValue
1343 */
1344 nextState.prevProps[key] = props[key];
1345
1346 if (!Utils.isProp(props, key) && Utils.isProp(prevProps, key)) {
1347 nextState.values[key] = props[Utils.defaultKey(key)];
1348 }
1349 });
1350 return nextState;
1351 };
1352
1353 _proto.componentWillUnmount = function componentWillUnmount() {
1354 this.unmounted = true;
1355 };
1356
1357 _proto.render = function render() {
1358 var _this2 = this;
1359
1360 var _this$props2 = this.props,
1361 innerRef = _this$props2.innerRef,
1362 props = _objectWithoutPropertiesLoose(_this$props2, ["innerRef"]);
1363
1364 PROPS_TO_OMIT.forEach(function (prop) {
1365 delete props[prop];
1366 });
1367 var newProps = {};
1368 controlledProps.forEach(function (propName) {
1369 var propValue = _this2.props[propName];
1370 newProps[propName] = propValue !== undefined ? propValue : _this2.state.values[propName];
1371 });
1372 return React.createElement(Component, _extends({}, props, newProps, this.handlers, {
1373 ref: innerRef || this.attachRef
1374 }));
1375 };
1376
1377 return UncontrolledComponent;
1378 }(React.Component);
1379
1380 polyfill(UncontrolledComponent);
1381 UncontrolledComponent.displayName = "Uncontrolled(" + displayName + ")";
1382 UncontrolledComponent.propTypes = _extends({
1383 innerRef: function innerRef() {}
1384 }, Utils.uncontrolledPropTypes(controlledValues, displayName));
1385 methods.forEach(function (method) {
1386 UncontrolledComponent.prototype[method] = function $proxiedMethod() {
1387 var _this$inner;
1388
1389 return (_this$inner = this.inner)[method].apply(_this$inner, arguments);
1390 };
1391 });
1392 var WrappedComponent = UncontrolledComponent;
1393
1394 if (React.forwardRef) {
1395 WrappedComponent = React.forwardRef(function (props, ref) {
1396 return React.createElement(UncontrolledComponent, _extends({}, props, {
1397 innerRef: ref,
1398 __source: {
1399 fileName: _jsxFileName,
1400 lineNumber: 128
1401 },
1402 __self: this
1403 }));
1404 });
1405 WrappedComponent.propTypes = UncontrolledComponent.propTypes;
1406 }
1407
1408 WrappedComponent.ControlledComponent = Component;
1409 /**
1410 * useful when wrapping a Component and you want to control
1411 * everything
1412 */
1413
1414 WrappedComponent.deferControlTo = function (newComponent, additions, nextMethods) {
1415 if (additions === void 0) {
1416 additions = {};
1417 }
1418
1419 return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods);
1420 };
1421
1422 return WrappedComponent;
1423}
1424;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/index.js
1425
1426
1427;// CONCATENATED MODULE: ./src/ThemeProvider.tsx
1428
1429var ThemeProvider_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ThemeProvider.tsx";
1430
1431
1432var ThemeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
1433var Consumer = ThemeContext.Consumer,
1434 Provider = ThemeContext.Provider;
1435
1436function ThemeProvider(_ref) {
1437 var prefixes = _ref.prefixes,
1438 children = _ref.children;
1439 var copiedPrefixes = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
1440 return extends_extends({}, prefixes);
1441 }, [prefixes]);
1442 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Provider, {
1443 value: copiedPrefixes,
1444 __self: this,
1445 __source: {
1446 fileName: ThemeProvider_jsxFileName,
1447 lineNumber: 14,
1448 columnNumber: 10
1449 }
1450 }, children);
1451}
1452
1453ThemeProvider.propTypes = {
1454 prefixes: (prop_types_default()).object.isRequired
1455};
1456function useBootstrapPrefix(prefix, defaultPrefix) {
1457 var prefixes = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1458 return prefix || prefixes[defaultPrefix] || defaultPrefix;
1459}
1460
1461function createBootstrapComponent(Component, opts) {
1462 var _this = this;
1463
1464 if (typeof opts === 'string') opts = {
1465 prefix: opts
1466 };
1467 var isClassy = Component.prototype && Component.prototype.isReactComponent; // If it's a functional component make sure we don't break it with a ref
1468
1469 var _opts = opts,
1470 prefix = _opts.prefix,
1471 _opts$forwardRefAs = _opts.forwardRefAs,
1472 forwardRefAs = _opts$forwardRefAs === void 0 ? isClassy ? 'ref' : 'innerRef' : _opts$forwardRefAs;
1473 var Wrapped = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
1474 var props = _extends({}, _ref2);
1475
1476 props[forwardRefAs] = ref;
1477 var bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);
1478 return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
1479 bsPrefix: bsPrefix,
1480 __self: _this,
1481 __source: {
1482 fileName: ThemeProvider_jsxFileName,
1483 lineNumber: 38,
1484 columnNumber: 12
1485 }
1486 }));
1487 });
1488 Wrapped.displayName = "Bootstrap(" + (Component.displayName || Component.name) + ")";
1489 return Wrapped;
1490}
1491
1492
1493/* harmony default export */ const src_ThemeProvider = (ThemeProvider);
1494;// CONCATENATED MODULE: ./src/SelectableContext.tsx
1495 // TODO (apparently this is a bare "onSelect"?)
1496
1497var SelectableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
1498var makeEventKey = function makeEventKey(eventKey, href) {
1499 if (href === void 0) {
1500 href = null;
1501 }
1502
1503 if (eventKey != null) return String(eventKey);
1504 return href || null;
1505};
1506/* harmony default export */ const src_SelectableContext = (SelectableContext);
1507;// CONCATENATED MODULE: ./src/AccordionContext.ts
1508
1509var context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
1510context.displayName = 'AccordionContext';
1511/* harmony default export */ const AccordionContext = (context);
1512;// CONCATENATED MODULE: ./src/AccordionToggle.tsx
1513
1514
1515var _excluded = ["as", "children", "eventKey", "onClick"];
1516
1517var AccordionToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionToggle.tsx",
1518 _this = undefined;
1519
1520
1521
1522
1523
1524var propTypes = {
1525 /** Set a custom element for this component */
1526 as: (prop_types_default()).elementType,
1527
1528 /**
1529 * A key that corresponds to the collapse component that gets triggered
1530 * when this has been clicked.
1531 */
1532 eventKey: (prop_types_default()).string.isRequired,
1533
1534 /** A callback function for when this component is clicked */
1535 onClick: (prop_types_default()).func
1536};
1537function useAccordionToggle(eventKey, onClick) {
1538 var contextEventKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext);
1539 var onSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
1540 return function (e) {
1541 /*
1542 Compare the event key in context with the given event key.
1543 If they are the same, then collapse the component.
1544 */
1545 var eventKeyPassed = eventKey === contextEventKey ? null : eventKey;
1546 if (onSelect) onSelect(eventKeyPassed, e);
1547 if (onClick) onClick(e);
1548 };
1549}
1550var AccordionToggle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
1551 var _ref$as = _ref.as,
1552 Component = _ref$as === void 0 ? 'button' : _ref$as,
1553 children = _ref.children,
1554 eventKey = _ref.eventKey,
1555 onClick = _ref.onClick,
1556 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, _excluded);
1557
1558 var accordionOnClick = useAccordionToggle(eventKey, onClick);
1559
1560 if (Component === 'button') {
1561 props.type = 'button';
1562 }
1563
1564 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
1565 ref: ref,
1566 onClick: accordionOnClick
1567 }, props, {
1568 __self: _this,
1569 __source: {
1570 fileName: AccordionToggle_jsxFileName,
1571 lineNumber: 74,
1572 columnNumber: 7
1573 }
1574 }), children);
1575});
1576AccordionToggle.propTypes = propTypes;
1577/* harmony default export */ const src_AccordionToggle = (AccordionToggle);
1578;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/ownerDocument.js
1579/**
1580 * Returns the owner document of a given element.
1581 *
1582 * @param node the element
1583 */
1584function ownerDocument(node) {
1585 return node && node.ownerDocument || document;
1586}
1587;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/ownerWindow.js
1588
1589/**
1590 * Returns the owner window of a given element.
1591 *
1592 * @param node the element
1593 */
1594
1595function ownerWindow(node) {
1596 var doc = ownerDocument(node);
1597 return doc && doc.defaultView || window;
1598}
1599;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/getComputedStyle.js
1600
1601/**
1602 * Returns one or all computed style properties of an element.
1603 *
1604 * @param node the element
1605 * @param psuedoElement the style property
1606 */
1607
1608function getComputedStyle_getComputedStyle(node, psuedoElement) {
1609 return ownerWindow(node).getComputedStyle(node, psuedoElement);
1610}
1611;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/hyphenate.js
1612var rUpper = /([A-Z])/g;
1613function hyphenate(string) {
1614 return string.replace(rUpper, '-$1').toLowerCase();
1615}
1616;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/hyphenateStyle.js
1617/**
1618 * Copyright 2013-2014, Facebook, Inc.
1619 * All rights reserved.
1620 * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
1621 */
1622
1623var msPattern = /^ms-/;
1624function hyphenateStyleName(string) {
1625 return hyphenate(string).replace(msPattern, '-ms-');
1626}
1627;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/isTransform.js
1628var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
1629function isTransform(value) {
1630 return !!(value && supportedTransforms.test(value));
1631}
1632;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/css.js
1633
1634
1635
1636
1637function style(node, property) {
1638 var css = '';
1639 var transforms = '';
1640
1641 if (typeof property === 'string') {
1642 return node.style.getPropertyValue(hyphenateStyleName(property)) || getComputedStyle_getComputedStyle(node).getPropertyValue(hyphenateStyleName(property));
1643 }
1644
1645 Object.keys(property).forEach(function (key) {
1646 var value = property[key];
1647
1648 if (!value && value !== 0) {
1649 node.style.removeProperty(hyphenateStyleName(key));
1650 } else if (isTransform(key)) {
1651 transforms += key + "(" + value + ") ";
1652 } else {
1653 css += hyphenateStyleName(key) + ": " + value + ";";
1654 }
1655 });
1656
1657 if (transforms) {
1658 css += "transform: " + transforms + ";";
1659 }
1660
1661 node.style.cssText += ";" + css;
1662}
1663
1664/* harmony default export */ const css = (style);
1665;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
1666function _setPrototypeOf(o, p) {
1667 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1668 o.__proto__ = p;
1669 return o;
1670 };
1671
1672 return _setPrototypeOf(o, p);
1673}
1674;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
1675
1676function inheritsLoose_inheritsLoose(subClass, superClass) {
1677 subClass.prototype = Object.create(superClass.prototype);
1678 subClass.prototype.constructor = subClass;
1679 _setPrototypeOf(subClass, superClass);
1680}
1681// EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
1682var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__(207);
1683var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
1684;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
1685/* harmony default export */ const config = ({
1686 disabled: false
1687});
1688;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
1689
1690/* harmony default export */ const TransitionGroupContext = (external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null));
1691;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
1692
1693
1694
1695
1696
1697
1698
1699
1700var UNMOUNTED = 'unmounted';
1701var EXITED = 'exited';
1702var ENTERING = 'entering';
1703var ENTERED = 'entered';
1704var EXITING = 'exiting';
1705/**
1706 * The Transition component lets you describe a transition from one component
1707 * state to another _over time_ with a simple declarative API. Most commonly
1708 * it's used to animate the mounting and unmounting of a component, but can also
1709 * be used to describe in-place transition states as well.
1710 *
1711 * ---
1712 *
1713 * **Note**: `Transition` is a platform-agnostic base component. If you're using
1714 * transitions in CSS, you'll probably want to use
1715 * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
1716 * instead. It inherits all the features of `Transition`, but contains
1717 * additional features necessary to play nice with CSS transitions (hence the
1718 * name of the component).
1719 *
1720 * ---
1721 *
1722 * By default the `Transition` component does not alter the behavior of the
1723 * component it renders, it only tracks "enter" and "exit" states for the
1724 * components. It's up to you to give meaning and effect to those states. For
1725 * example we can add styles to a component when it enters or exits:
1726 *
1727 * ```jsx
1728 * import { Transition } from 'react-transition-group';
1729 *
1730 * const duration = 300;
1731 *
1732 * const defaultStyle = {
1733 * transition: `opacity ${duration}ms ease-in-out`,
1734 * opacity: 0,
1735 * }
1736 *
1737 * const transitionStyles = {
1738 * entering: { opacity: 1 },
1739 * entered: { opacity: 1 },
1740 * exiting: { opacity: 0 },
1741 * exited: { opacity: 0 },
1742 * };
1743 *
1744 * const Fade = ({ in: inProp }) => (
1745 * <Transition in={inProp} timeout={duration}>
1746 * {state => (
1747 * <div style={{
1748 * ...defaultStyle,
1749 * ...transitionStyles[state]
1750 * }}>
1751 * I'm a fade Transition!
1752 * </div>
1753 * )}
1754 * </Transition>
1755 * );
1756 * ```
1757 *
1758 * There are 4 main states a Transition can be in:
1759 * - `'entering'`
1760 * - `'entered'`
1761 * - `'exiting'`
1762 * - `'exited'`
1763 *
1764 * Transition state is toggled via the `in` prop. When `true` the component
1765 * begins the "Enter" stage. During this stage, the component will shift from
1766 * its current transition state, to `'entering'` for the duration of the
1767 * transition and then to the `'entered'` stage once it's complete. Let's take
1768 * the following example (we'll use the
1769 * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
1770 *
1771 * ```jsx
1772 * function App() {
1773 * const [inProp, setInProp] = useState(false);
1774 * return (
1775 * <div>
1776 * <Transition in={inProp} timeout={500}>
1777 * {state => (
1778 * // ...
1779 * )}
1780 * </Transition>
1781 * <button onClick={() => setInProp(true)}>
1782 * Click to Enter
1783 * </button>
1784 * </div>
1785 * );
1786 * }
1787 * ```
1788 *
1789 * When the button is clicked the component will shift to the `'entering'` state
1790 * and stay there for 500ms (the value of `timeout`) before it finally switches
1791 * to `'entered'`.
1792 *
1793 * When `in` is `false` the same thing happens except the state moves from
1794 * `'exiting'` to `'exited'`.
1795 */
1796
1797var Transition = /*#__PURE__*/function (_React$Component) {
1798 inheritsLoose_inheritsLoose(Transition, _React$Component);
1799
1800 function Transition(props, context) {
1801 var _this;
1802
1803 _this = _React$Component.call(this, props, context) || this;
1804 var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
1805
1806 var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
1807 var initialStatus;
1808 _this.appearStatus = null;
1809
1810 if (props.in) {
1811 if (appear) {
1812 initialStatus = EXITED;
1813 _this.appearStatus = ENTERING;
1814 } else {
1815 initialStatus = ENTERED;
1816 }
1817 } else {
1818 if (props.unmountOnExit || props.mountOnEnter) {
1819 initialStatus = UNMOUNTED;
1820 } else {
1821 initialStatus = EXITED;
1822 }
1823 }
1824
1825 _this.state = {
1826 status: initialStatus
1827 };
1828 _this.nextCallback = null;
1829 return _this;
1830 }
1831
1832 Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
1833 var nextIn = _ref.in;
1834
1835 if (nextIn && prevState.status === UNMOUNTED) {
1836 return {
1837 status: EXITED
1838 };
1839 }
1840
1841 return null;
1842 } // getSnapshotBeforeUpdate(prevProps) {
1843 // let nextStatus = null
1844 // if (prevProps !== this.props) {
1845 // const { status } = this.state
1846 // if (this.props.in) {
1847 // if (status !== ENTERING && status !== ENTERED) {
1848 // nextStatus = ENTERING
1849 // }
1850 // } else {
1851 // if (status === ENTERING || status === ENTERED) {
1852 // nextStatus = EXITING
1853 // }
1854 // }
1855 // }
1856 // return { nextStatus }
1857 // }
1858 ;
1859
1860 var _proto = Transition.prototype;
1861
1862 _proto.componentDidMount = function componentDidMount() {
1863 this.updateStatus(true, this.appearStatus);
1864 };
1865
1866 _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
1867 var nextStatus = null;
1868
1869 if (prevProps !== this.props) {
1870 var status = this.state.status;
1871
1872 if (this.props.in) {
1873 if (status !== ENTERING && status !== ENTERED) {
1874 nextStatus = ENTERING;
1875 }
1876 } else {
1877 if (status === ENTERING || status === ENTERED) {
1878 nextStatus = EXITING;
1879 }
1880 }
1881 }
1882
1883 this.updateStatus(false, nextStatus);
1884 };
1885
1886 _proto.componentWillUnmount = function componentWillUnmount() {
1887 this.cancelNextCallback();
1888 };
1889
1890 _proto.getTimeouts = function getTimeouts() {
1891 var timeout = this.props.timeout;
1892 var exit, enter, appear;
1893 exit = enter = appear = timeout;
1894
1895 if (timeout != null && typeof timeout !== 'number') {
1896 exit = timeout.exit;
1897 enter = timeout.enter; // TODO: remove fallback for next major
1898
1899 appear = timeout.appear !== undefined ? timeout.appear : enter;
1900 }
1901
1902 return {
1903 exit: exit,
1904 enter: enter,
1905 appear: appear
1906 };
1907 };
1908
1909 _proto.updateStatus = function updateStatus(mounting, nextStatus) {
1910 if (mounting === void 0) {
1911 mounting = false;
1912 }
1913
1914 if (nextStatus !== null) {
1915 // nextStatus will always be ENTERING or EXITING.
1916 this.cancelNextCallback();
1917
1918 if (nextStatus === ENTERING) {
1919 this.performEnter(mounting);
1920 } else {
1921 this.performExit();
1922 }
1923 } else if (this.props.unmountOnExit && this.state.status === EXITED) {
1924 this.setState({
1925 status: UNMOUNTED
1926 });
1927 }
1928 };
1929
1930 _proto.performEnter = function performEnter(mounting) {
1931 var _this2 = this;
1932
1933 var enter = this.props.enter;
1934 var appearing = this.context ? this.context.isMounting : mounting;
1935
1936 var _ref2 = this.props.nodeRef ? [appearing] : [external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this), appearing],
1937 maybeNode = _ref2[0],
1938 maybeAppearing = _ref2[1];
1939
1940 var timeouts = this.getTimeouts();
1941 var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
1942 // if we are mounting and running this it means appear _must_ be set
1943
1944 if (!mounting && !enter || config.disabled) {
1945 this.safeSetState({
1946 status: ENTERED
1947 }, function () {
1948 _this2.props.onEntered(maybeNode);
1949 });
1950 return;
1951 }
1952
1953 this.props.onEnter(maybeNode, maybeAppearing);
1954 this.safeSetState({
1955 status: ENTERING
1956 }, function () {
1957 _this2.props.onEntering(maybeNode, maybeAppearing);
1958
1959 _this2.onTransitionEnd(enterTimeout, function () {
1960 _this2.safeSetState({
1961 status: ENTERED
1962 }, function () {
1963 _this2.props.onEntered(maybeNode, maybeAppearing);
1964 });
1965 });
1966 });
1967 };
1968
1969 _proto.performExit = function performExit() {
1970 var _this3 = this;
1971
1972 var exit = this.props.exit;
1973 var timeouts = this.getTimeouts();
1974 var maybeNode = this.props.nodeRef ? undefined : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED
1975
1976 if (!exit || config.disabled) {
1977 this.safeSetState({
1978 status: EXITED
1979 }, function () {
1980 _this3.props.onExited(maybeNode);
1981 });
1982 return;
1983 }
1984
1985 this.props.onExit(maybeNode);
1986 this.safeSetState({
1987 status: EXITING
1988 }, function () {
1989 _this3.props.onExiting(maybeNode);
1990
1991 _this3.onTransitionEnd(timeouts.exit, function () {
1992 _this3.safeSetState({
1993 status: EXITED
1994 }, function () {
1995 _this3.props.onExited(maybeNode);
1996 });
1997 });
1998 });
1999 };
2000
2001 _proto.cancelNextCallback = function cancelNextCallback() {
2002 if (this.nextCallback !== null) {
2003 this.nextCallback.cancel();
2004 this.nextCallback = null;
2005 }
2006 };
2007
2008 _proto.safeSetState = function safeSetState(nextState, callback) {
2009 // This shouldn't be necessary, but there are weird race conditions with
2010 // setState callbacks and unmounting in testing, so always make sure that
2011 // we can cancel any pending setState callbacks after we unmount.
2012 callback = this.setNextCallback(callback);
2013 this.setState(nextState, callback);
2014 };
2015
2016 _proto.setNextCallback = function setNextCallback(callback) {
2017 var _this4 = this;
2018
2019 var active = true;
2020
2021 this.nextCallback = function (event) {
2022 if (active) {
2023 active = false;
2024 _this4.nextCallback = null;
2025 callback(event);
2026 }
2027 };
2028
2029 this.nextCallback.cancel = function () {
2030 active = false;
2031 };
2032
2033 return this.nextCallback;
2034 };
2035
2036 _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
2037 this.setNextCallback(handler);
2038 var node = this.props.nodeRef ? this.props.nodeRef.current : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this);
2039 var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
2040
2041 if (!node || doesNotHaveTimeoutOrListener) {
2042 setTimeout(this.nextCallback, 0);
2043 return;
2044 }
2045
2046 if (this.props.addEndListener) {
2047 var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
2048 maybeNode = _ref3[0],
2049 maybeNextCallback = _ref3[1];
2050
2051 this.props.addEndListener(maybeNode, maybeNextCallback);
2052 }
2053
2054 if (timeout != null) {
2055 setTimeout(this.nextCallback, timeout);
2056 }
2057 };
2058
2059 _proto.render = function render() {
2060 var status = this.state.status;
2061
2062 if (status === UNMOUNTED) {
2063 return null;
2064 }
2065
2066 var _this$props = this.props,
2067 children = _this$props.children,
2068 _in = _this$props.in,
2069 _mountOnEnter = _this$props.mountOnEnter,
2070 _unmountOnExit = _this$props.unmountOnExit,
2071 _appear = _this$props.appear,
2072 _enter = _this$props.enter,
2073 _exit = _this$props.exit,
2074 _timeout = _this$props.timeout,
2075 _addEndListener = _this$props.addEndListener,
2076 _onEnter = _this$props.onEnter,
2077 _onEntering = _this$props.onEntering,
2078 _onEntered = _this$props.onEntered,
2079 _onExit = _this$props.onExit,
2080 _onExiting = _this$props.onExiting,
2081 _onExited = _this$props.onExited,
2082 _nodeRef = _this$props.nodeRef,
2083 childProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
2084
2085 return (
2086 /*#__PURE__*/
2087 // allows for nested Transitions
2088 external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TransitionGroupContext.Provider, {
2089 value: null
2090 }, typeof children === 'function' ? children(status, childProps) : external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children), childProps))
2091 );
2092 };
2093
2094 return Transition;
2095}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
2096
2097Transition.contextType = TransitionGroupContext;
2098Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation
2099
2100function Transition_noop() {}
2101
2102Transition.defaultProps = {
2103 in: false,
2104 mountOnEnter: false,
2105 unmountOnExit: false,
2106 appear: false,
2107 enter: true,
2108 exit: true,
2109 onEnter: Transition_noop,
2110 onEntering: Transition_noop,
2111 onEntered: Transition_noop,
2112 onExit: Transition_noop,
2113 onExiting: Transition_noop,
2114 onExited: Transition_noop
2115};
2116Transition.UNMOUNTED = UNMOUNTED;
2117Transition.EXITED = EXITED;
2118Transition.ENTERING = ENTERING;
2119Transition.ENTERED = ENTERED;
2120Transition.EXITING = EXITING;
2121/* harmony default export */ const esm_Transition = (Transition);
2122;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/canUseDOM.js
2123/* harmony default export */ const canUseDOM = (!!(typeof window !== 'undefined' && window.document && window.document.createElement));
2124;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/addEventListener.js
2125/* eslint-disable no-return-assign */
2126
2127var optionsSupported = false;
2128var onceSupported = false;
2129
2130try {
2131 var options = {
2132 get passive() {
2133 return optionsSupported = true;
2134 },
2135
2136 get once() {
2137 // eslint-disable-next-line no-multi-assign
2138 return onceSupported = optionsSupported = true;
2139 }
2140
2141 };
2142
2143 if (canUseDOM) {
2144 window.addEventListener('test', options, options);
2145 window.removeEventListener('test', options, true);
2146 }
2147} catch (e) {
2148 /* */
2149}
2150/**
2151 * An `addEventListener` ponyfill, supports the `once` option
2152 *
2153 * @param node the element
2154 * @param eventName the event name
2155 * @param handle the handler
2156 * @param options event options
2157 */
2158
2159
2160function addEventListener(node, eventName, handler, options) {
2161 if (options && typeof options !== 'boolean' && !onceSupported) {
2162 var once = options.once,
2163 capture = options.capture;
2164 var wrappedHandler = handler;
2165
2166 if (!onceSupported && once) {
2167 wrappedHandler = handler.__once || function onceHandler(event) {
2168 this.removeEventListener(eventName, onceHandler, capture);
2169 handler.call(this, event);
2170 };
2171
2172 handler.__once = wrappedHandler;
2173 }
2174
2175 node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);
2176 }
2177
2178 node.addEventListener(eventName, handler, options);
2179}
2180
2181/* harmony default export */ const esm_addEventListener = (addEventListener);
2182;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/removeEventListener.js
2183/**
2184 * A `removeEventListener` ponyfill
2185 *
2186 * @param node the element
2187 * @param eventName the event name
2188 * @param handle the handler
2189 * @param options event options
2190 */
2191function removeEventListener(node, eventName, handler, options) {
2192 var capture = options && typeof options !== 'boolean' ? options.capture : options;
2193 node.removeEventListener(eventName, handler, capture);
2194
2195 if (handler.__once) {
2196 node.removeEventListener(eventName, handler.__once, capture);
2197 }
2198}
2199
2200/* harmony default export */ const esm_removeEventListener = (removeEventListener);
2201;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/listen.js
2202
2203
2204
2205function listen(node, eventName, handler, options) {
2206 esm_addEventListener(node, eventName, handler, options);
2207 return function () {
2208 esm_removeEventListener(node, eventName, handler, options);
2209 };
2210}
2211
2212/* harmony default export */ const esm_listen = (listen);
2213;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/triggerEvent.js
2214/**
2215 * Triggers an event on a given element.
2216 *
2217 * @param node the element
2218 * @param eventName the event name to trigger
2219 * @param bubbles whether the event should bubble up
2220 * @param cancelable whether the event should be cancelable
2221 */
2222function triggerEvent(node, eventName, bubbles, cancelable) {
2223 if (bubbles === void 0) {
2224 bubbles = false;
2225 }
2226
2227 if (cancelable === void 0) {
2228 cancelable = true;
2229 }
2230
2231 if (node) {
2232 var event = document.createEvent('HTMLEvents');
2233 event.initEvent(eventName, bubbles, cancelable);
2234 node.dispatchEvent(event);
2235 }
2236}
2237;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/transitionEnd.js
2238
2239
2240
2241
2242function parseDuration(node) {
2243 var str = css(node, 'transitionDuration') || '';
2244 var mult = str.indexOf('ms') === -1 ? 1000 : 1;
2245 return parseFloat(str) * mult;
2246}
2247
2248function emulateTransitionEnd(element, duration, padding) {
2249 if (padding === void 0) {
2250 padding = 5;
2251 }
2252
2253 var called = false;
2254 var handle = setTimeout(function () {
2255 if (!called) triggerEvent(element, 'transitionend', true);
2256 }, duration + padding);
2257 var remove = esm_listen(element, 'transitionend', function () {
2258 called = true;
2259 }, {
2260 once: true
2261 });
2262 return function () {
2263 clearTimeout(handle);
2264 remove();
2265 };
2266}
2267
2268function transitionEnd(element, handler, duration, padding) {
2269 if (duration == null) duration = parseDuration(element) || 0;
2270 var removeEmulate = emulateTransitionEnd(element, duration, padding);
2271 var remove = esm_listen(element, 'transitionend', handler);
2272 return function () {
2273 removeEmulate();
2274 remove();
2275 };
2276}
2277;// CONCATENATED MODULE: ./src/transitionEndListener.ts
2278
2279
2280
2281function transitionEndListener_parseDuration(node, property) {
2282 var str = css(node, property) || '';
2283 var mult = str.indexOf('ms') === -1 ? 1000 : 1;
2284 return parseFloat(str) * mult;
2285}
2286
2287function transitionEndListener(element, handler) {
2288 var duration = transitionEndListener_parseDuration(element, 'transitionDuration');
2289 var delay = transitionEndListener_parseDuration(element, 'transitionDelay');
2290 var remove = transitionEnd(element, function (e) {
2291 if (e.target === element) {
2292 remove();
2293 handler(e);
2294 }
2295 }, duration + delay);
2296}
2297;// CONCATENATED MODULE: ./src/createChainedFunction.tsx
2298/**
2299 * Safe chained function
2300 *
2301 * Will only create a new function if needed,
2302 * otherwise will pass back existing functions or null.
2303 *
2304 * @param {function} functions to chain
2305 * @returns {function|null}
2306 */
2307function createChainedFunction() {
2308 for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
2309 funcs[_key] = arguments[_key];
2310 }
2311
2312 return funcs.filter(function (f) {
2313 return f != null;
2314 }).reduce(function (acc, f) {
2315 if (typeof f !== 'function') {
2316 throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
2317 }
2318
2319 if (acc === null) return f;
2320 return function chainedFunction() {
2321 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2322 args[_key2] = arguments[_key2];
2323 }
2324
2325 // @ts-ignore
2326 acc.apply(this, args); // @ts-ignore
2327
2328 f.apply(this, args);
2329 };
2330 }, null);
2331}
2332
2333/* harmony default export */ const src_createChainedFunction = (createChainedFunction);
2334;// CONCATENATED MODULE: ./src/triggerBrowserReflow.tsx
2335// reading a dimension prop will cause the browser to recalculate,
2336// which will let our animations work
2337function triggerBrowserReflow(node) {
2338 // eslint-disable-next-line @typescript-eslint/no-unused-expressions
2339 node.offsetHeight;
2340}
2341;// CONCATENATED MODULE: ./src/Collapse.tsx
2342
2343
2344var Collapse_excluded = ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "className", "children", "dimension", "getDimensionValue"];
2345
2346var Collapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Collapse.tsx",
2347 _collapseStyles,
2348 Collapse_this = undefined;
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358var MARGINS = {
2359 height: ['marginTop', 'marginBottom'],
2360 width: ['marginLeft', 'marginRight']
2361};
2362
2363function getDefaultDimensionValue(dimension, elem) {
2364 var offset = "offset" + dimension[0].toUpperCase() + dimension.slice(1);
2365 var value = elem[offset];
2366 var margins = MARGINS[dimension];
2367 return value + // @ts-ignore
2368 parseInt(css(elem, margins[0]), 10) + // @ts-ignore
2369 parseInt(css(elem, margins[1]), 10);
2370}
2371
2372var collapseStyles = (_collapseStyles = {}, _collapseStyles[EXITED] = 'collapse', _collapseStyles[EXITING] = 'collapsing', _collapseStyles[ENTERING] = 'collapsing', _collapseStyles[ENTERED] = 'collapse show', _collapseStyles);
2373var Collapse_propTypes = {
2374 /**
2375 * Show the component; triggers the expand or collapse animation
2376 */
2377 in: (prop_types_default()).bool,
2378
2379 /**
2380 * Wait until the first "enter" transition to mount the component (add it to the DOM)
2381 */
2382 mountOnEnter: (prop_types_default()).bool,
2383
2384 /**
2385 * Unmount the component (remove it from the DOM) when it is collapsed
2386 */
2387 unmountOnExit: (prop_types_default()).bool,
2388
2389 /**
2390 * Run the expand animation when the component mounts, if it is initially
2391 * shown
2392 */
2393 appear: (prop_types_default()).bool,
2394
2395 /**
2396 * Duration of the collapse animation in milliseconds, to ensure that
2397 * finishing callbacks are fired even if the original browser transition end
2398 * events are canceled
2399 */
2400 timeout: (prop_types_default()).number,
2401
2402 /**
2403 * Callback fired before the component expands
2404 */
2405 onEnter: (prop_types_default()).func,
2406
2407 /**
2408 * Callback fired after the component starts to expand
2409 */
2410 onEntering: (prop_types_default()).func,
2411
2412 /**
2413 * Callback fired after the component has expanded
2414 */
2415 onEntered: (prop_types_default()).func,
2416
2417 /**
2418 * Callback fired before the component collapses
2419 */
2420 onExit: (prop_types_default()).func,
2421
2422 /**
2423 * Callback fired after the component starts to collapse
2424 */
2425 onExiting: (prop_types_default()).func,
2426
2427 /**
2428 * Callback fired after the component has collapsed
2429 */
2430 onExited: (prop_types_default()).func,
2431
2432 /**
2433 * The dimension used when collapsing, or a function that returns the
2434 * dimension
2435 *
2436 * _Note: Bootstrap only partially supports 'width'!
2437 * You will need to supply your own CSS animation for the `.width` CSS class._
2438 */
2439 dimension: prop_types_default().oneOfType([prop_types_default().oneOf(['height', 'width']), (prop_types_default()).func]),
2440
2441 /**
2442 * Function that returns the height or width of the animating DOM node
2443 *
2444 * Allows for providing some custom logic for how much the Collapse component
2445 * should animate in its specified dimension. Called with the current
2446 * dimension prop value and the DOM node.
2447 *
2448 * @default element.offsetWidth | element.offsetHeight
2449 */
2450 getDimensionValue: (prop_types_default()).func,
2451
2452 /**
2453 * ARIA role of collapsible element
2454 */
2455 role: (prop_types_default()).string
2456};
2457var defaultProps = {
2458 in: false,
2459 timeout: 300,
2460 mountOnEnter: false,
2461 unmountOnExit: false,
2462 appear: false,
2463 getDimensionValue: getDefaultDimensionValue
2464};
2465var Collapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
2466 var onEnter = _ref.onEnter,
2467 onEntering = _ref.onEntering,
2468 onEntered = _ref.onEntered,
2469 onExit = _ref.onExit,
2470 onExiting = _ref.onExiting,
2471 className = _ref.className,
2472 children = _ref.children,
2473 _ref$dimension = _ref.dimension,
2474 dimension = _ref$dimension === void 0 ? 'height' : _ref$dimension,
2475 _ref$getDimensionValu = _ref.getDimensionValue,
2476 getDimensionValue = _ref$getDimensionValu === void 0 ? getDefaultDimensionValue : _ref$getDimensionValu,
2477 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Collapse_excluded);
2478
2479 /* Compute dimension */
2480 var computedDimension = typeof dimension === 'function' ? dimension() : dimension;
2481 /* -- Expanding -- */
2482
2483 var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
2484 return src_createChainedFunction(function (elem) {
2485 elem.style[computedDimension] = '0';
2486 }, onEnter);
2487 }, [computedDimension, onEnter]);
2488 var handleEntering = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
2489 return src_createChainedFunction(function (elem) {
2490 var scroll = "scroll" + computedDimension[0].toUpperCase() + computedDimension.slice(1);
2491 elem.style[computedDimension] = elem[scroll] + "px";
2492 }, onEntering);
2493 }, [computedDimension, onEntering]);
2494 var handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
2495 return src_createChainedFunction(function (elem) {
2496 elem.style[computedDimension] = null;
2497 }, onEntered);
2498 }, [computedDimension, onEntered]);
2499 /* -- Collapsing -- */
2500
2501 var handleExit = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
2502 return src_createChainedFunction(function (elem) {
2503 elem.style[computedDimension] = getDimensionValue(computedDimension, elem) + "px";
2504 triggerBrowserReflow(elem);
2505 }, onExit);
2506 }, [onExit, getDimensionValue, computedDimension]);
2507 var handleExiting = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
2508 return src_createChainedFunction(function (elem) {
2509 elem.style[computedDimension] = null;
2510 }, onExiting);
2511 }, [computedDimension, onExiting]);
2512 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition // @ts-ignore
2513 , extends_extends({
2514 ref: ref,
2515 addEndListener: transitionEndListener
2516 }, props, {
2517 "aria-expanded": props.role ? props.in : null,
2518 onEnter: handleEnter,
2519 onEntering: handleEntering,
2520 onEntered: handleEntered,
2521 onExit: handleExit,
2522 onExiting: handleExiting,
2523 __self: Collapse_this,
2524 __source: {
2525 fileName: Collapse_jsxFileName,
2526 lineNumber: 222,
2527 columnNumber: 7
2528 }
2529 }), function (state, innerProps) {
2530 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, extends_extends({}, innerProps, {
2531 className: classnames_default()(className, children.props.className, collapseStyles[state], computedDimension === 'width' && 'width')
2532 }));
2533 });
2534}); // @ts-ignore
2535
2536Collapse.propTypes = Collapse_propTypes; // @ts-ignore
2537
2538Collapse.defaultProps = defaultProps;
2539/* harmony default export */ const src_Collapse = (Collapse);
2540;// CONCATENATED MODULE: ./src/AccordionCollapse.tsx
2541
2542
2543var AccordionCollapse_excluded = ["children", "eventKey"];
2544
2545var AccordionCollapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionCollapse.tsx",
2546 AccordionCollapse_this = undefined;
2547
2548
2549
2550
2551
2552
2553var AccordionCollapse_propTypes = {
2554 /**
2555 * A key that corresponds to the toggler that triggers this collapse's expand or collapse.
2556 */
2557 eventKey: (prop_types_default()).string.isRequired,
2558
2559 /** Children prop should only contain a single child, and is enforced as such */
2560 children: (prop_types_default()).element.isRequired
2561};
2562var AccordionCollapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
2563 var children = _ref.children,
2564 eventKey = _ref.eventKey,
2565 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, AccordionCollapse_excluded);
2566
2567 var contextEventKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext); // Empty SelectableContext is to prevent elements in the collapse
2568 // from collapsing the accordion when clicked.
2569
2570 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
2571 value: null,
2572 __self: AccordionCollapse_this,
2573 __source: {
2574 fileName: AccordionCollapse_jsxFileName,
2575 lineNumber: 36,
2576 columnNumber: 7
2577 }
2578 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Collapse, extends_extends({
2579 ref: ref,
2580 in: contextEventKey === eventKey
2581 }, props, {
2582 __self: AccordionCollapse_this,
2583 __source: {
2584 fileName: AccordionCollapse_jsxFileName,
2585 lineNumber: 37,
2586 columnNumber: 9
2587 }
2588 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2589 __self: AccordionCollapse_this,
2590 __source: {
2591 fileName: AccordionCollapse_jsxFileName,
2592 lineNumber: 38,
2593 columnNumber: 11
2594 }
2595 }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children))));
2596});
2597AccordionCollapse.propTypes = AccordionCollapse_propTypes;
2598AccordionCollapse.displayName = 'AccordionCollapse';
2599/* harmony default export */ const src_AccordionCollapse = (AccordionCollapse);
2600;// CONCATENATED MODULE: ./src/Accordion.tsx
2601
2602
2603var Accordion_excluded = ["as", "activeKey", "bsPrefix", "children", "className", "onSelect"];
2604
2605var Accordion_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Accordion.tsx",
2606 Accordion_this = undefined;
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617var Accordion_propTypes = {
2618 /** Set a custom element for this component */
2619 as: (prop_types_default()).elementType,
2620
2621 /** @default 'accordion' */
2622 bsPrefix: (prop_types_default()).string,
2623
2624 /** The current active key that corresponds to the currently expanded card */
2625 activeKey: (prop_types_default()).string,
2626
2627 /** The default active key that is expanded on start */
2628 defaultActiveKey: (prop_types_default()).string
2629};
2630var Accordion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
2631 var _useUncontrolled = useUncontrolled(props, {
2632 activeKey: 'onSelect'
2633 }),
2634 _useUncontrolled$as = _useUncontrolled.as,
2635 Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
2636 activeKey = _useUncontrolled.activeKey,
2637 bsPrefix = _useUncontrolled.bsPrefix,
2638 children = _useUncontrolled.children,
2639 className = _useUncontrolled.className,
2640 onSelect = _useUncontrolled.onSelect,
2641 controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Accordion_excluded);
2642
2643 var finalClassName = classnames_default()(className, useBootstrapPrefix(bsPrefix, 'accordion'));
2644 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(AccordionContext.Provider, {
2645 value: activeKey || null,
2646 __self: Accordion_this,
2647 __source: {
2648 fileName: Accordion_jsxFileName,
2649 lineNumber: 62,
2650 columnNumber: 5
2651 }
2652 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
2653 value: onSelect || null,
2654 __self: Accordion_this,
2655 __source: {
2656 fileName: Accordion_jsxFileName,
2657 lineNumber: 63,
2658 columnNumber: 7
2659 }
2660 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
2661 ref: ref
2662 }, controlledProps, {
2663 className: finalClassName,
2664 __self: Accordion_this,
2665 __source: {
2666 fileName: Accordion_jsxFileName,
2667 lineNumber: 64,
2668 columnNumber: 9
2669 }
2670 }), children)));
2671});
2672Accordion.displayName = 'Accordion';
2673Accordion.propTypes = Accordion_propTypes;
2674Accordion.Toggle = src_AccordionToggle;
2675Accordion.Collapse = src_AccordionCollapse;
2676/* harmony default export */ const src_Accordion = (Accordion);
2677// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/index.js
2678var lib = __webpack_require__(517);
2679;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCommittedRef.js
2680
2681/**
2682 * Creates a `Ref` whose value is updated in an effect, ensuring the most recent
2683 * value is the one rendered with. Generally only required for Concurrent mode usage
2684 * where previous work in `render()` may be discarded befor being used.
2685 *
2686 * This is safe to access in an event handler.
2687 *
2688 * @param value The `Ref` value
2689 */
2690
2691function useCommittedRef(value) {
2692 var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
2693 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
2694 ref.current = value;
2695 }, [value]);
2696 return ref;
2697}
2698
2699/* harmony default export */ const esm_useCommittedRef = (useCommittedRef);
2700;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useEventCallback.js
2701
2702
2703function useEventCallback(fn) {
2704 var ref = esm_useCommittedRef(fn);
2705 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
2706 return ref.current && ref.current.apply(ref, arguments);
2707 }, [ref]);
2708}
2709;// CONCATENATED MODULE: ./src/Fade.tsx
2710
2711
2712var Fade_excluded = ["className", "children"];
2713
2714var Fade_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Fade.tsx",
2715 _fadeStyles,
2716 Fade_this = undefined;
2717
2718
2719
2720
2721
2722
2723
2724var Fade_propTypes = {
2725 /**
2726 * Show the component; triggers the fade in or fade out animation
2727 */
2728 in: (prop_types_default()).bool,
2729
2730 /**
2731 * Wait until the first "enter" transition to mount the component (add it to the DOM)
2732 */
2733 mountOnEnter: (prop_types_default()).bool,
2734
2735 /**
2736 * Unmount the component (remove it from the DOM) when it is faded out
2737 */
2738 unmountOnExit: (prop_types_default()).bool,
2739
2740 /**
2741 * Run the fade in animation when the component mounts, if it is initially
2742 * shown
2743 */
2744 appear: (prop_types_default()).bool,
2745
2746 /**
2747 * Duration of the fade animation in milliseconds, to ensure that finishing
2748 * callbacks are fired even if the original browser transition end events are
2749 * canceled
2750 */
2751 timeout: (prop_types_default()).number,
2752
2753 /**
2754 * Callback fired before the component fades in
2755 */
2756 onEnter: (prop_types_default()).func,
2757
2758 /**
2759 * Callback fired after the component starts to fade in
2760 */
2761 onEntering: (prop_types_default()).func,
2762
2763 /**
2764 * Callback fired after the has component faded in
2765 */
2766 onEntered: (prop_types_default()).func,
2767
2768 /**
2769 * Callback fired before the component fades out
2770 */
2771 onExit: (prop_types_default()).func,
2772
2773 /**
2774 * Callback fired after the component starts to fade out
2775 */
2776 onExiting: (prop_types_default()).func,
2777
2778 /**
2779 * Callback fired after the component has faded out
2780 */
2781 onExited: (prop_types_default()).func
2782};
2783var Fade_defaultProps = {
2784 in: false,
2785 timeout: 300,
2786 mountOnEnter: false,
2787 unmountOnExit: false,
2788 appear: false
2789};
2790var fadeStyles = (_fadeStyles = {}, _fadeStyles[ENTERING] = 'show', _fadeStyles[ENTERED] = 'show', _fadeStyles);
2791var Fade = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
2792 var className = _ref.className,
2793 children = _ref.children,
2794 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Fade_excluded);
2795
2796 var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (node) {
2797 triggerBrowserReflow(node);
2798 if (props.onEnter) props.onEnter(node);
2799 }, [props]);
2800 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition, extends_extends({
2801 ref: ref,
2802 addEndListener: transitionEndListener
2803 }, props, {
2804 onEnter: handleEnter,
2805 __self: Fade_this,
2806 __source: {
2807 fileName: Fade_jsxFileName,
2808 lineNumber: 101,
2809 columnNumber: 7
2810 }
2811 }), function (status, innerProps) {
2812 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, extends_extends({}, innerProps, {
2813 className: classnames_default()('fade', className, children.props.className, fadeStyles[status])
2814 }));
2815 });
2816});
2817Fade.propTypes = Fade_propTypes;
2818Fade.defaultProps = Fade_defaultProps;
2819Fade.displayName = 'Fade';
2820/* harmony default export */ const src_Fade = (Fade);
2821;// CONCATENATED MODULE: ./src/CloseButton.tsx
2822
2823
2824var CloseButton_excluded = ["label", "onClick", "className"];
2825
2826var CloseButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CloseButton.tsx",
2827 CloseButton_this = undefined;
2828
2829
2830
2831
2832var CloseButton_propTypes = {
2833 label: (prop_types_default()).string.isRequired,
2834 onClick: (prop_types_default()).func
2835};
2836var CloseButton_defaultProps = {
2837 label: 'Close'
2838};
2839var CloseButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
2840 var label = _ref.label,
2841 onClick = _ref.onClick,
2842 className = _ref.className,
2843 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CloseButton_excluded);
2844
2845 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", extends_extends({
2846 ref: ref,
2847 type: "button",
2848 className: classnames_default()('close', className),
2849 onClick: onClick
2850 }, props, {
2851 __self: CloseButton_this,
2852 __source: {
2853 fileName: CloseButton_jsxFileName,
2854 lineNumber: 21,
2855 columnNumber: 5
2856 }
2857 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
2858 "aria-hidden": "true",
2859 __self: CloseButton_this,
2860 __source: {
2861 fileName: CloseButton_jsxFileName,
2862 lineNumber: 28,
2863 columnNumber: 7
2864 }
2865 }, "\xD7"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
2866 className: "sr-only",
2867 __self: CloseButton_this,
2868 __source: {
2869 fileName: CloseButton_jsxFileName,
2870 lineNumber: 29,
2871 columnNumber: 7
2872 }
2873 }, label));
2874});
2875CloseButton.displayName = 'CloseButton';
2876CloseButton.propTypes = CloseButton_propTypes;
2877CloseButton.defaultProps = CloseButton_defaultProps;
2878/* harmony default export */ const src_CloseButton = (CloseButton);
2879;// CONCATENATED MODULE: ./src/divWithClassName.tsx
2880
2881
2882var divWithClassName_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/divWithClassName.tsx",
2883 divWithClassName_this = undefined;
2884
2885
2886
2887/* harmony default export */ const divWithClassName = (function (className) {
2888 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (p, ref) {
2889 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, p, {
2890 ref: ref,
2891 className: classnames_default()(p.className, className),
2892 __self: divWithClassName_this,
2893 __source: {
2894 fileName: divWithClassName_jsxFileName,
2895 lineNumber: 6,
2896 columnNumber: 5
2897 }
2898 }));
2899 });
2900});
2901;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/camelize.js
2902var rHyphen = /-(.)/g;
2903function camelize(string) {
2904 return string.replace(rHyphen, function (_, chr) {
2905 return chr.toUpperCase();
2906 });
2907}
2908;// CONCATENATED MODULE: ./src/createWithBsPrefix.tsx
2909
2910
2911var createWithBsPrefix_excluded = ["className", "bsPrefix", "as"];
2912var createWithBsPrefix_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/createWithBsPrefix.tsx";
2913
2914
2915
2916
2917
2918var pascalCase = function pascalCase(str) {
2919 return str[0].toUpperCase() + camelize(str).slice(1);
2920};
2921
2922// TODO: emstricten & fix the typing here! `createWithBsPrefix<TElementType>...`
2923function createWithBsPrefix(prefix, _temp) {
2924 var _this = this;
2925
2926 var _ref = _temp === void 0 ? {} : _temp,
2927 _ref$displayName = _ref.displayName,
2928 displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,
2929 Component = _ref.Component,
2930 defaultProps = _ref.defaultProps;
2931
2932 var BsComponent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref2, ref) {
2933 var className = _ref2.className,
2934 bsPrefix = _ref2.bsPrefix,
2935 _ref2$as = _ref2.as,
2936 Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,
2937 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, createWithBsPrefix_excluded);
2938
2939 var resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix);
2940 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tag, extends_extends({
2941 ref: ref,
2942 className: classnames_default()(className, resolvedPrefix)
2943 }, props, {
2944 __self: _this,
2945 __source: {
2946 fileName: createWithBsPrefix_jsxFileName,
2947 lineNumber: 33,
2948 columnNumber: 9
2949 }
2950 }));
2951 });
2952 BsComponent.defaultProps = defaultProps;
2953 BsComponent.displayName = displayName;
2954 return BsComponent;
2955}
2956;// CONCATENATED MODULE: ./src/SafeAnchor.tsx
2957
2958
2959var SafeAnchor_excluded = ["as", "disabled", "onKeyDown"];
2960
2961var SafeAnchor_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/SafeAnchor.tsx",
2962 SafeAnchor_this = undefined;
2963
2964
2965
2966
2967var SafeAnchor_propTypes = {
2968 href: (prop_types_default()).string,
2969 onClick: (prop_types_default()).func,
2970 onKeyDown: (prop_types_default()).func,
2971 disabled: (prop_types_default()).bool,
2972 role: (prop_types_default()).string,
2973 tabIndex: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]),
2974
2975 /**
2976 * this is sort of silly but needed for Button
2977 */
2978 as: (prop_types_default()).elementType
2979};
2980
2981function isTrivialHref(href) {
2982 return !href || href.trim() === '#';
2983}
2984/**
2985 * There are situations due to browser quirks or Bootstrap CSS where
2986 * an anchor tag is needed, when semantically a button tag is the
2987 * better choice. SafeAnchor ensures that when an anchor is used like a
2988 * button its accessible. It also emulates input `disabled` behavior for
2989 * links, which is usually desirable for Buttons, NavItems, DropdownItems, etc.
2990 */
2991
2992
2993var SafeAnchor = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
2994 var _ref$as = _ref.as,
2995 Component = _ref$as === void 0 ? 'a' : _ref$as,
2996 disabled = _ref.disabled,
2997 onKeyDown = _ref.onKeyDown,
2998 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, SafeAnchor_excluded);
2999
3000 var handleClick = function handleClick(event) {
3001 var href = props.href,
3002 onClick = props.onClick;
3003
3004 if (disabled || isTrivialHref(href)) {
3005 event.preventDefault();
3006 }
3007
3008 if (disabled) {
3009 event.stopPropagation();
3010 return;
3011 }
3012
3013 if (onClick) {
3014 onClick(event);
3015 }
3016 };
3017
3018 var handleKeyDown = function handleKeyDown(event) {
3019 if (event.key === ' ') {
3020 event.preventDefault();
3021 handleClick(event);
3022 }
3023 };
3024
3025 if (isTrivialHref(props.href)) {
3026 props.role = props.role || 'button'; // we want to make sure there is a href attribute on the node
3027 // otherwise, the cursor incorrectly styled (except with role='button')
3028
3029 props.href = props.href || '#';
3030 }
3031
3032 if (disabled) {
3033 props.tabIndex = -1;
3034 props['aria-disabled'] = true;
3035 }
3036
3037 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
3038 ref: ref
3039 }, props, {
3040 onClick: handleClick,
3041 onKeyDown: src_createChainedFunction(handleKeyDown, onKeyDown),
3042 __self: SafeAnchor_this,
3043 __source: {
3044 fileName: SafeAnchor_jsxFileName,
3045 lineNumber: 90,
3046 columnNumber: 7
3047 }
3048 }));
3049});
3050SafeAnchor.propTypes = SafeAnchor_propTypes;
3051SafeAnchor.displayName = 'SafeAnchor';
3052/* harmony default export */ const src_SafeAnchor = (SafeAnchor);
3053;// CONCATENATED MODULE: ./src/Alert.tsx
3054
3055
3056var Alert_excluded = ["bsPrefix", "show", "closeLabel", "className", "children", "variant", "onClose", "dismissible", "transition"];
3057
3058var Alert_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Alert.tsx",
3059 Alert_this = undefined;
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073var DivStyledAsH4 = divWithClassName('h4');
3074DivStyledAsH4.displayName = 'DivStyledAsH4';
3075var AlertHeading = createWithBsPrefix('alert-heading', {
3076 Component: DivStyledAsH4
3077});
3078var AlertLink = createWithBsPrefix('alert-link', {
3079 Component: src_SafeAnchor
3080});
3081var Alert_propTypes = {
3082 /**
3083 * @default 'alert'
3084 */
3085 bsPrefix: (prop_types_default()).string,
3086
3087 /**
3088 * The Alert visual variant
3089 *
3090 * @type {'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light'}
3091 */
3092 variant: (prop_types_default()).string,
3093
3094 /**
3095 * Renders a properly aligned dismiss button, as well as
3096 * adding extra horizontal padding to the Alert.
3097 */
3098 dismissible: (prop_types_default()).bool,
3099
3100 /**
3101 * Controls the visual state of the Alert.
3102 *
3103 * @controllable onClose
3104 */
3105 show: (prop_types_default()).bool,
3106
3107 /**
3108 * Callback fired when alert is closed.
3109 *
3110 * @controllable show
3111 */
3112 onClose: (prop_types_default()).func,
3113
3114 /**
3115 * Sets the text for alert close button.
3116 */
3117 closeLabel: (prop_types_default()).string,
3118
3119 /**
3120 * Animate the alert dismissal. Defaults to using `<Fade>` animation or use
3121 * `false` to disable. A custom `react-transition-group` Transition can also
3122 * be provided.
3123 */
3124 transition: prop_types_default().oneOfType([(prop_types_default()).bool, lib/* elementType */.nm])
3125};
3126var Alert_defaultProps = {
3127 show: true,
3128 transition: src_Fade,
3129 closeLabel: 'Close alert'
3130};
3131var Alert = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (uncontrolledProps, ref) {
3132 var _useUncontrolled = useUncontrolled(uncontrolledProps, {
3133 show: 'onClose'
3134 }),
3135 bsPrefix = _useUncontrolled.bsPrefix,
3136 show = _useUncontrolled.show,
3137 closeLabel = _useUncontrolled.closeLabel,
3138 className = _useUncontrolled.className,
3139 children = _useUncontrolled.children,
3140 variant = _useUncontrolled.variant,
3141 onClose = _useUncontrolled.onClose,
3142 dismissible = _useUncontrolled.dismissible,
3143 transition = _useUncontrolled.transition,
3144 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Alert_excluded);
3145
3146 var prefix = useBootstrapPrefix(bsPrefix, 'alert');
3147 var handleClose = useEventCallback(function (e) {
3148 if (onClose) {
3149 onClose(false, e);
3150 }
3151 });
3152 var Transition = transition === true ? src_Fade : transition;
3153 var alert = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
3154 role: "alert"
3155 }, !Transition ? props : undefined, {
3156 ref: ref,
3157 className: classnames_default()(className, prefix, variant && prefix + "-" + variant, dismissible && prefix + "-dismissible"),
3158 __self: Alert_this,
3159 __source: {
3160 fileName: Alert_jsxFileName,
3161 lineNumber: 119,
3162 columnNumber: 7
3163 }
3164 }), dismissible && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_CloseButton, {
3165 onClick: handleClose,
3166 label: closeLabel,
3167 __self: Alert_this,
3168 __source: {
3169 fileName: Alert_jsxFileName,
3170 lineNumber: 131,
3171 columnNumber: 11
3172 }
3173 }), children);
3174 if (!Transition) return show ? alert : null;
3175 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, extends_extends({
3176 unmountOnExit: true
3177 }, props, {
3178 ref: undefined,
3179 in: show,
3180 __self: Alert_this,
3181 __source: {
3182 fileName: Alert_jsxFileName,
3183 lineNumber: 140,
3184 columnNumber: 7
3185 }
3186 }), alert);
3187});
3188Alert.displayName = 'Alert';
3189Alert.defaultProps = Alert_defaultProps;
3190Alert.propTypes = Alert_propTypes;
3191Alert.Link = AlertLink;
3192Alert.Heading = AlertHeading;
3193/* harmony default export */ const src_Alert = (Alert);
3194;// CONCATENATED MODULE: ./src/Badge.tsx
3195
3196
3197var Badge_excluded = ["bsPrefix", "variant", "pill", "className", "as"];
3198
3199var Badge_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Badge.tsx",
3200 Badge_this = undefined;
3201
3202
3203
3204
3205
3206var Badge_propTypes = {
3207 /** @default 'badge' */
3208 bsPrefix: (prop_types_default()).string,
3209
3210 /**
3211 * The visual style of the badge
3212 *
3213 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'light'|'dark')}
3214 */
3215 variant: (prop_types_default()).string,
3216
3217 /**
3218 * Add the `pill` modifier to make badges more rounded with
3219 * some additional horizontal padding
3220 */
3221 pill: (prop_types_default()).bool.isRequired,
3222
3223 /** @default span */
3224 as: (prop_types_default()).elementType
3225};
3226var Badge_defaultProps = {
3227 pill: false
3228};
3229var Badge = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
3230 var bsPrefix = _ref.bsPrefix,
3231 variant = _ref.variant,
3232 pill = _ref.pill,
3233 className = _ref.className,
3234 _ref$as = _ref.as,
3235 Component = _ref$as === void 0 ? 'span' : _ref$as,
3236 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Badge_excluded);
3237
3238 var prefix = useBootstrapPrefix(bsPrefix, 'badge');
3239 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
3240 ref: ref
3241 }, props, {
3242 className: classnames_default()(className, prefix, pill && prefix + "-pill", variant && prefix + "-" + variant),
3243 __self: Badge_this,
3244 __source: {
3245 fileName: Badge_jsxFileName,
3246 lineNumber: 55,
3247 columnNumber: 7
3248 }
3249 }));
3250});
3251Badge.displayName = 'Badge';
3252Badge.propTypes = Badge_propTypes;
3253Badge.defaultProps = Badge_defaultProps;
3254/* harmony default export */ const src_Badge = (Badge);
3255;// CONCATENATED MODULE: ./src/BreadcrumbItem.tsx
3256
3257
3258var BreadcrumbItem_excluded = ["bsPrefix", "active", "children", "className", "as", "linkAs", "linkProps", "href", "title", "target"];
3259
3260var BreadcrumbItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/BreadcrumbItem.tsx",
3261 BreadcrumbItem_this = undefined;
3262
3263
3264
3265
3266
3267
3268var BreadcrumbItem_propTypes = {
3269 /**
3270 * @default 'breadcrumb-item'
3271 */
3272 bsPrefix: (prop_types_default()).string,
3273
3274 /**
3275 * Adds a visual "active" state to a Breadcrumb
3276 * Item and disables the link.
3277 */
3278 active: (prop_types_default()).bool,
3279
3280 /**
3281 * `href` attribute for the inner `a` element
3282 */
3283 href: (prop_types_default()).string,
3284
3285 /**
3286 * You can use a custom element type for this component's inner link.
3287 */
3288 linkAs: (prop_types_default()).elementType,
3289
3290 /**
3291 * `title` attribute for the inner `a` element
3292 */
3293 title: (prop_types_default()).node,
3294
3295 /**
3296 * `target` attribute for the inner `a` element
3297 */
3298 target: (prop_types_default()).string,
3299
3300 /**
3301 * Additional props passed as-is to the underlying link for non-active items.
3302 */
3303 linkProps: (prop_types_default()).object,
3304 as: (prop_types_default()).elementType
3305};
3306var BreadcrumbItem_defaultProps = {
3307 active: false,
3308 linkProps: {}
3309};
3310var BreadcrumbItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
3311 var bsPrefix = _ref.bsPrefix,
3312 active = _ref.active,
3313 children = _ref.children,
3314 className = _ref.className,
3315 _ref$as = _ref.as,
3316 Component = _ref$as === void 0 ? 'li' : _ref$as,
3317 _ref$linkAs = _ref.linkAs,
3318 LinkComponent = _ref$linkAs === void 0 ? src_SafeAnchor : _ref$linkAs,
3319 linkProps = _ref.linkProps,
3320 href = _ref.href,
3321 title = _ref.title,
3322 target = _ref.target,
3323 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, BreadcrumbItem_excluded);
3324
3325 var prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb-item');
3326 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
3327 ref: ref
3328 }, props, {
3329 className: classnames_default()(prefix, className, {
3330 active: active
3331 }),
3332 "aria-current": active ? 'page' : undefined,
3333 __self: BreadcrumbItem_this,
3334 __source: {
3335 fileName: BreadcrumbItem_jsxFileName,
3336 lineNumber: 83,
3337 columnNumber: 7
3338 }
3339 }), active ? children : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(LinkComponent, extends_extends({}, linkProps, {
3340 href: href,
3341 title: title,
3342 target: target,
3343 __self: BreadcrumbItem_this,
3344 __source: {
3345 fileName: BreadcrumbItem_jsxFileName,
3346 lineNumber: 92,
3347 columnNumber: 11
3348 }
3349 }), children));
3350});
3351BreadcrumbItem.displayName = 'BreadcrumbItem';
3352BreadcrumbItem.propTypes = BreadcrumbItem_propTypes;
3353BreadcrumbItem.defaultProps = BreadcrumbItem_defaultProps;
3354/* harmony default export */ const src_BreadcrumbItem = (BreadcrumbItem);
3355;// CONCATENATED MODULE: ./src/Breadcrumb.tsx
3356
3357
3358var Breadcrumb_excluded = ["bsPrefix", "className", "listProps", "children", "label", "as"];
3359
3360var Breadcrumb_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Breadcrumb.tsx",
3361 Breadcrumb_this = undefined;
3362
3363
3364
3365
3366
3367
3368var Breadcrumb_propTypes = {
3369 /**
3370 * @default 'breadcrumb'
3371 */
3372 bsPrefix: (prop_types_default()).string,
3373
3374 /**
3375 * ARIA label for the nav element
3376 * https://www.w3.org/TR/wai-aria-practices/#breadcrumb
3377 */
3378 label: (prop_types_default()).string,
3379
3380 /**
3381 * Additional props passed as-is to the underlying `<ol>` element
3382 */
3383 listProps: (prop_types_default()).object,
3384 as: (prop_types_default()).elementType
3385};
3386var Breadcrumb_defaultProps = {
3387 label: 'breadcrumb',
3388 listProps: {}
3389};
3390var Breadcrumb = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
3391 var bsPrefix = _ref.bsPrefix,
3392 className = _ref.className,
3393 listProps = _ref.listProps,
3394 children = _ref.children,
3395 label = _ref.label,
3396 _ref$as = _ref.as,
3397 Component = _ref$as === void 0 ? 'nav' : _ref$as,
3398 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Breadcrumb_excluded);
3399
3400 var prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb');
3401 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
3402 "aria-label": label,
3403 className: className,
3404 ref: ref
3405 }, props, {
3406 __self: Breadcrumb_this,
3407 __source: {
3408 fileName: Breadcrumb_jsxFileName,
3409 lineNumber: 62,
3410 columnNumber: 7
3411 }
3412 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ol", extends_extends({}, listProps, {
3413 className: classnames_default()(prefix, listProps == null ? void 0 : listProps.className),
3414 __self: Breadcrumb_this,
3415 __source: {
3416 fileName: Breadcrumb_jsxFileName,
3417 lineNumber: 63,
3418 columnNumber: 9
3419 }
3420 }), children));
3421});
3422Breadcrumb.displayName = 'Breadcrumb';
3423Breadcrumb.propTypes = Breadcrumb_propTypes;
3424Breadcrumb.defaultProps = Breadcrumb_defaultProps;
3425Breadcrumb.Item = src_BreadcrumbItem;
3426/* harmony default export */ const src_Breadcrumb = (Breadcrumb);
3427;// CONCATENATED MODULE: ./src/Button.tsx
3428
3429
3430var Button_excluded = ["bsPrefix", "variant", "size", "active", "className", "block", "type", "as"];
3431
3432var Button_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Button.tsx",
3433 Button_this = undefined;
3434
3435
3436
3437
3438
3439
3440var Button_propTypes = {
3441 /**
3442 * @default 'btn'
3443 */
3444 bsPrefix: (prop_types_default()).string,
3445
3446 /**
3447 * One or more button variant combinations
3448 *
3449 * buttons may be one of a variety of visual variants such as:
3450 *
3451 * `'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'link'`
3452 *
3453 * as well as "outline" versions (prefixed by 'outline-*')
3454 *
3455 * `'outline-primary', 'outline-secondary', 'outline-success', 'outline-danger', 'outline-warning', 'outline-info', 'outline-dark', 'outline-light'`
3456 */
3457 variant: (prop_types_default()).string,
3458
3459 /**
3460 * Specifies a large or small button.
3461 *
3462 * @type ('sm'|'lg')
3463 */
3464 size: (prop_types_default()).string,
3465
3466 /** Spans the full width of the Button parent */
3467 block: (prop_types_default()).bool,
3468
3469 /** Manually set the visual state of the button to `:active` */
3470 active: (prop_types_default()).bool,
3471
3472 /**
3473 * Disables the Button, preventing mouse events,
3474 * even if the underlying component is an `<a>` element
3475 */
3476 disabled: (prop_types_default()).bool,
3477
3478 /** Providing a `href` will render an `<a>` element, _styled_ as a button. */
3479 href: (prop_types_default()).string,
3480
3481 /**
3482 * Defines HTML button type attribute.
3483 *
3484 * @default 'button'
3485 */
3486 type: prop_types_default().oneOf(['button', 'reset', 'submit', null]),
3487 as: (prop_types_default()).elementType
3488};
3489var Button_defaultProps = {
3490 variant: 'primary',
3491 active: false,
3492 disabled: false
3493};
3494var Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
3495 var bsPrefix = _ref.bsPrefix,
3496 variant = _ref.variant,
3497 size = _ref.size,
3498 active = _ref.active,
3499 className = _ref.className,
3500 block = _ref.block,
3501 type = _ref.type,
3502 as = _ref.as,
3503 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Button_excluded);
3504
3505 var prefix = useBootstrapPrefix(bsPrefix, 'btn');
3506 var classes = classnames_default()(className, prefix, active && 'active', variant && prefix + "-" + variant, block && prefix + "-block", size && prefix + "-" + size);
3507
3508 if (props.href) {
3509 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, extends_extends({}, props, {
3510 as: as,
3511 ref: ref,
3512 className: classnames_default()(classes, props.disabled && 'disabled'),
3513 __self: Button_this,
3514 __source: {
3515 fileName: Button_jsxFileName,
3516 lineNumber: 116,
3517 columnNumber: 9
3518 }
3519 }));
3520 }
3521
3522 if (ref) {
3523 props.ref = ref;
3524 }
3525
3526 if (type) {
3527 props.type = type;
3528 } else if (!as) {
3529 props.type = 'button';
3530 }
3531
3532 var Component = as || 'button';
3533 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
3534 className: classes,
3535 __self: Button_this,
3536 __source: {
3537 fileName: Button_jsxFileName,
3538 lineNumber: 136,
3539 columnNumber: 12
3540 }
3541 }));
3542});
3543Button.displayName = 'Button';
3544Button.propTypes = Button_propTypes;
3545Button.defaultProps = Button_defaultProps;
3546/* harmony default export */ const src_Button = (Button);
3547;// CONCATENATED MODULE: ./src/ButtonGroup.tsx
3548
3549
3550var ButtonGroup_excluded = ["bsPrefix", "size", "toggle", "vertical", "className", "as"];
3551
3552var ButtonGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ButtonGroup.tsx",
3553 ButtonGroup_this = undefined;
3554
3555
3556
3557
3558
3559var ButtonGroup_propTypes = {
3560 /**
3561 * @default 'btn-group'
3562 */
3563 bsPrefix: (prop_types_default()).string,
3564
3565 /**
3566 * Sets the size for all Buttons in the group.
3567 *
3568 * @type ('sm'|'lg')
3569 */
3570 size: (prop_types_default()).string,
3571
3572 /** Make the set of Buttons appear vertically stacked. */
3573 vertical: (prop_types_default()).bool,
3574
3575 /**
3576 * Display as a button toggle group.
3577 *
3578 * (Generally it's better to use `ToggleButtonGroup` directly)
3579 */
3580 toggle: (prop_types_default()).bool,
3581
3582 /**
3583 * An ARIA role describing the button group. Usually the default
3584 * "group" role is fine. An `aria-label` or `aria-labelledby`
3585 * prop is also recommended.
3586 */
3587 role: (prop_types_default()).string,
3588 as: (prop_types_default()).elementType
3589};
3590var ButtonGroup_defaultProps = {
3591 vertical: false,
3592 toggle: false,
3593 role: 'group'
3594};
3595var ButtonGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
3596 var bsPrefix = _ref.bsPrefix,
3597 size = _ref.size,
3598 toggle = _ref.toggle,
3599 vertical = _ref.vertical,
3600 className = _ref.className,
3601 _ref$as = _ref.as,
3602 Component = _ref$as === void 0 ? 'div' : _ref$as,
3603 rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ButtonGroup_excluded);
3604
3605 var prefix = useBootstrapPrefix(bsPrefix, 'btn-group');
3606 var baseClass = prefix;
3607 if (vertical) baseClass = prefix + "-vertical";
3608 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, rest, {
3609 ref: ref,
3610 className: classnames_default()(className, baseClass, size && prefix + "-" + size, toggle && prefix + "-toggle"),
3611 __self: ButtonGroup_this,
3612 __source: {
3613 fileName: ButtonGroup_jsxFileName,
3614 lineNumber: 79,
3615 columnNumber: 7
3616 }
3617 }));
3618});
3619ButtonGroup.displayName = 'ButtonGroup';
3620ButtonGroup.propTypes = ButtonGroup_propTypes;
3621ButtonGroup.defaultProps = ButtonGroup_defaultProps;
3622/* harmony default export */ const src_ButtonGroup = (ButtonGroup);
3623;// CONCATENATED MODULE: ./src/ButtonToolbar.tsx
3624
3625
3626var ButtonToolbar_excluded = ["bsPrefix", "className"];
3627
3628var ButtonToolbar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ButtonToolbar.tsx",
3629 ButtonToolbar_this = undefined;
3630
3631
3632
3633
3634
3635var ButtonToolbar_propTypes = {
3636 /**
3637 * @default 'btn-toolbar'
3638 */
3639 bsPrefix: (prop_types_default()).string,
3640
3641 /**
3642 * The ARIA role describing the button toolbar. Generally the default
3643 * "toolbar" role is correct. An `aria-label` or `aria-labelledby`
3644 * prop is also recommended.
3645 */
3646 role: (prop_types_default()).string
3647};
3648var ButtonToolbar_defaultProps = {
3649 role: 'toolbar'
3650};
3651var ButtonToolbar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
3652 var bsPrefix = _ref.bsPrefix,
3653 className = _ref.className,
3654 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ButtonToolbar_excluded);
3655
3656 var prefix = useBootstrapPrefix(bsPrefix, 'btn-toolbar');
3657 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, props, {
3658 ref: ref,
3659 className: classnames_default()(className, prefix),
3660 __self: ButtonToolbar_this,
3661 __source: {
3662 fileName: ButtonToolbar_jsxFileName,
3663 lineNumber: 42,
3664 columnNumber: 10
3665 }
3666 }));
3667});
3668ButtonToolbar.displayName = 'ButtonToolbar';
3669ButtonToolbar.propTypes = ButtonToolbar_propTypes;
3670ButtonToolbar.defaultProps = ButtonToolbar_defaultProps;
3671/* harmony default export */ const src_ButtonToolbar = (ButtonToolbar);
3672;// CONCATENATED MODULE: ./src/CardContext.tsx
3673
3674var CardContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
3675CardContext_context.displayName = 'CardContext';
3676/* harmony default export */ const CardContext = (CardContext_context);
3677;// CONCATENATED MODULE: ./src/CardImg.tsx
3678
3679
3680var CardImg_excluded = ["bsPrefix", "className", "variant", "as"];
3681
3682var CardImg_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardImg.tsx",
3683 CardImg_this = undefined;
3684
3685
3686
3687
3688
3689var CardImg_propTypes = {
3690 /**
3691 * @default 'card-img'
3692 */
3693 bsPrefix: (prop_types_default()).string,
3694
3695 /**
3696 * Defines image position inside
3697 * the card.
3698 *
3699 * @type {('top'|'bottom')}
3700 */
3701 variant: prop_types_default().oneOf(['top', 'bottom', null]),
3702 as: (prop_types_default()).elementType
3703};
3704var CardImg_defaultProps = {
3705 variant: null
3706};
3707var CardImg = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
3708function (_ref, ref) {
3709 var bsPrefix = _ref.bsPrefix,
3710 className = _ref.className,
3711 variant = _ref.variant,
3712 _ref$as = _ref.as,
3713 Component = _ref$as === void 0 ? 'img' : _ref$as,
3714 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CardImg_excluded);
3715
3716 var prefix = useBootstrapPrefix(bsPrefix, 'card-img');
3717 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
3718 ref: ref,
3719 className: classnames_default()(variant ? prefix + "-" + variant : prefix, className)
3720 }, props, {
3721 __self: CardImg_this,
3722 __source: {
3723 fileName: CardImg_jsxFileName,
3724 lineNumber: 50,
3725 columnNumber: 7
3726 }
3727 }));
3728});
3729CardImg.displayName = 'CardImg';
3730CardImg.propTypes = CardImg_propTypes;
3731CardImg.defaultProps = CardImg_defaultProps;
3732/* harmony default export */ const src_CardImg = (CardImg);
3733;// CONCATENATED MODULE: ./src/Card.tsx
3734
3735
3736var Card_excluded = ["bsPrefix", "className", "bg", "text", "border", "body", "children", "as"];
3737
3738var Card_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Card.tsx",
3739 Card_this = undefined;
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749var DivStyledAsH5 = divWithClassName('h5');
3750var DivStyledAsH6 = divWithClassName('h6');
3751var CardBody = createWithBsPrefix('card-body');
3752var CardTitle = createWithBsPrefix('card-title', {
3753 Component: DivStyledAsH5
3754});
3755var CardSubtitle = createWithBsPrefix('card-subtitle', {
3756 Component: DivStyledAsH6
3757});
3758var CardLink = createWithBsPrefix('card-link', {
3759 Component: 'a'
3760});
3761var CardText = createWithBsPrefix('card-text', {
3762 Component: 'p'
3763});
3764var CardHeader = createWithBsPrefix('card-header');
3765var CardFooter = createWithBsPrefix('card-footer');
3766var CardImgOverlay = createWithBsPrefix('card-img-overlay');
3767var Card_propTypes = {
3768 /**
3769 * @default 'card'
3770 */
3771 bsPrefix: (prop_types_default()).string,
3772
3773 /**
3774 * Sets card background
3775 *
3776 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')}
3777 */
3778 bg: (prop_types_default()).string,
3779
3780 /**
3781 * Sets card text color
3782 *
3783 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light'|'white'|'muted')}
3784 */
3785 text: (prop_types_default()).string,
3786
3787 /**
3788 * Sets card border color
3789 *
3790 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')}
3791 */
3792 border: (prop_types_default()).string,
3793
3794 /**
3795 * When this prop is set, it creates a Card with a Card.Body inside
3796 * passing the children directly to it
3797 */
3798 body: (prop_types_default()).bool,
3799 as: (prop_types_default()).elementType
3800};
3801var Card_defaultProps = {
3802 body: false
3803};
3804var Card = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
3805 var bsPrefix = _ref.bsPrefix,
3806 className = _ref.className,
3807 bg = _ref.bg,
3808 text = _ref.text,
3809 border = _ref.border,
3810 body = _ref.body,
3811 children = _ref.children,
3812 _ref$as = _ref.as,
3813 Component = _ref$as === void 0 ? 'div' : _ref$as,
3814 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Card_excluded);
3815
3816 var prefix = useBootstrapPrefix(bsPrefix, 'card');
3817 var cardContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
3818 return {
3819 cardHeaderBsPrefix: prefix + "-header"
3820 };
3821 }, [prefix]);
3822 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CardContext.Provider, {
3823 value: cardContext,
3824 __self: Card_this,
3825 __source: {
3826 fileName: Card_jsxFileName,
3827 lineNumber: 115,
3828 columnNumber: 7
3829 }
3830 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
3831 ref: ref
3832 }, props, {
3833 className: classnames_default()(className, prefix, bg && "bg-" + bg, text && "text-" + text, border && "border-" + border),
3834 __self: Card_this,
3835 __source: {
3836 fileName: Card_jsxFileName,
3837 lineNumber: 116,
3838 columnNumber: 9
3839 }
3840 }), body ?
3841 /*#__PURE__*/
3842 // @ts-ignore
3843 external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CardBody, {
3844 __self: Card_this,
3845 __source: {
3846 fileName: Card_jsxFileName,
3847 lineNumber: 129,
3848 columnNumber: 13
3849 }
3850 }, children) : children));
3851});
3852Card.displayName = 'Card';
3853Card.propTypes = Card_propTypes;
3854Card.defaultProps = Card_defaultProps;
3855Card.Img = src_CardImg;
3856Card.Title = CardTitle;
3857Card.Subtitle = CardSubtitle;
3858Card.Body = CardBody;
3859Card.Link = CardLink;
3860Card.Text = CardText;
3861Card.Header = CardHeader;
3862Card.Footer = CardFooter;
3863Card.ImgOverlay = CardImgOverlay;
3864/* harmony default export */ const src_Card = (Card);
3865;// CONCATENATED MODULE: ./src/CardColumns.tsx
3866
3867/* harmony default export */ const CardColumns = (createWithBsPrefix('card-columns'));
3868;// CONCATENATED MODULE: ./src/CardDeck.tsx
3869
3870/* harmony default export */ const CardDeck = (createWithBsPrefix('card-deck'));
3871;// CONCATENATED MODULE: ./src/CardGroup.tsx
3872
3873/* harmony default export */ const CardGroup = (createWithBsPrefix('card-group'));
3874;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdateEffect.js
3875
3876/**
3877 * Runs an effect only when the dependencies have changed, skipping the
3878 * initial "on mount" run. Caution, if the dependency list never changes,
3879 * the effect is **never run**
3880 *
3881 * ```ts
3882 * const ref = useRef<HTMLInput>(null);
3883 *
3884 * // focuses an element only if the focus changes, and not on mount
3885 * useUpdateEffect(() => {
3886 * const element = ref.current?.children[focusedIdx] as HTMLElement
3887 *
3888 * element?.focus()
3889 *
3890 * }, [focusedIndex])
3891 * ```
3892 * @param effect An effect to run on mount
3893 *
3894 * @category effects
3895 */
3896
3897function useUpdateEffect(fn, deps) {
3898 var isFirst = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
3899 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3900 if (isFirst.current) {
3901 isFirst.current = false;
3902 return;
3903 }
3904
3905 return fn();
3906 }, deps);
3907}
3908
3909/* harmony default export */ const esm_useUpdateEffect = (useUpdateEffect);
3910;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
3911
3912/**
3913 * Track whether a component is current mounted. Generally less preferable than
3914 * properlly canceling effects so they don't run after a component is unmounted,
3915 * but helpful in cases where that isn't feasible, such as a `Promise` resolution.
3916 *
3917 * @returns a function that returns the current isMounted state of the component
3918 *
3919 * ```ts
3920 * const [data, setData] = useState(null)
3921 * const isMounted = useMounted()
3922 *
3923 * useEffect(() => {
3924 * fetchdata().then((newData) => {
3925 * if (isMounted()) {
3926 * setData(newData);
3927 * }
3928 * })
3929 * })
3930 * ```
3931 */
3932
3933function useMounted() {
3934 var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
3935 var isMounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(function () {
3936 return mounted.current;
3937 });
3938 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3939 return function () {
3940 mounted.current = false;
3941 };
3942 }, []);
3943 return isMounted.current;
3944}
3945;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdatedRef.js
3946
3947/**
3948 * Returns a ref that is immediately updated with the new value
3949 *
3950 * @param value The Ref value
3951 * @category refs
3952 */
3953
3954function useUpdatedRef(value) {
3955 var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
3956 valueRef.current = value;
3957 return valueRef;
3958}
3959;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useWillUnmount.js
3960
3961
3962/**
3963 * Attach a callback that fires when a component unmounts
3964 *
3965 * @param fn Handler to run when the component unmounts
3966 * @category effects
3967 */
3968
3969function useWillUnmount(fn) {
3970 var onUnmount = useUpdatedRef(fn);
3971 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3972 return function () {
3973 return onUnmount.current();
3974 };
3975 }, []);
3976}
3977;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useTimeout.js
3978
3979
3980
3981/*
3982 * Browsers including Internet Explorer, Chrome, Safari, and Firefox store the
3983 * delay as a 32-bit signed integer internally. This causes an integer overflow
3984 * when using delays larger than 2,147,483,647 ms (about 24.8 days),
3985 * resulting in the timeout being executed immediately.
3986 *
3987 * via: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
3988 */
3989
3990var MAX_DELAY_MS = Math.pow(2, 31) - 1;
3991
3992function setChainedTimeout(handleRef, fn, timeoutAtMs) {
3993 var delayMs = timeoutAtMs - Date.now();
3994 handleRef.current = delayMs <= MAX_DELAY_MS ? setTimeout(fn, delayMs) : setTimeout(function () {
3995 return setChainedTimeout(handleRef, fn, timeoutAtMs);
3996 }, MAX_DELAY_MS);
3997}
3998/**
3999 * Returns a controller object for setting a timeout that is properly cleaned up
4000 * once the component unmounts. New timeouts cancel and replace existing ones.
4001 *
4002 *
4003 *
4004 * ```tsx
4005 * const { set, clear } = useTimeout();
4006 * const [hello, showHello] = useState(false);
4007 * //Display hello after 5 seconds
4008 * set(() => showHello(true), 5000);
4009 * return (
4010 * <div className="App">
4011 * {hello ? <h3>Hello</h3> : null}
4012 * </div>
4013 * );
4014 * ```
4015 */
4016
4017
4018function useTimeout() {
4019 var isMounted = useMounted(); // types are confused between node and web here IDK
4020
4021 var handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
4022 useWillUnmount(function () {
4023 return clearTimeout(handleRef.current);
4024 });
4025 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
4026 var clear = function clear() {
4027 return clearTimeout(handleRef.current);
4028 };
4029
4030 function set(fn, delayMs) {
4031 if (delayMs === void 0) {
4032 delayMs = 0;
4033 }
4034
4035 if (!isMounted()) return;
4036 clear();
4037
4038 if (delayMs <= MAX_DELAY_MS) {
4039 // For simplicity, if the timeout is short, just set a normal timeout.
4040 handleRef.current = setTimeout(fn, delayMs);
4041 } else {
4042 setChainedTimeout(handleRef, fn, Date.now() + delayMs);
4043 }
4044 }
4045
4046 return {
4047 set: set,
4048 clear: clear
4049 };
4050 }, []);
4051}
4052;// CONCATENATED MODULE: ./src/CarouselCaption.tsx
4053
4054/* harmony default export */ const CarouselCaption = (createWithBsPrefix('carousel-caption'));
4055;// CONCATENATED MODULE: ./src/CarouselItem.tsx
4056
4057
4058var CarouselItem_excluded = ["as", "bsPrefix", "children", "className"];
4059
4060var CarouselItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CarouselItem.tsx",
4061 CarouselItem_this = undefined;
4062
4063
4064
4065
4066
4067var CarouselItem_propTypes = {
4068 /** Set a custom element for this component */
4069 as: (prop_types_default()).elementType,
4070
4071 /** @default 'carousel-item' */
4072 bsPrefix: (prop_types_default()).string,
4073
4074 /** The amount of time to delay between automatically cycling this specific item. Will default to the Carousel's `interval` prop value if none is specified. */
4075 interval: (prop_types_default()).number
4076};
4077var CarouselItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
4078 var _ref$as = _ref.as,
4079 Component = _ref$as === void 0 ? 'div' : _ref$as,
4080 bsPrefix = _ref.bsPrefix,
4081 children = _ref.children,
4082 className = _ref.className,
4083 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CarouselItem_excluded);
4084
4085 var finalClassName = classnames_default()(className, useBootstrapPrefix(bsPrefix, 'carousel-item'));
4086 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
4087 ref: ref
4088 }, props, {
4089 className: finalClassName,
4090 __self: CarouselItem_this,
4091 __source: {
4092 fileName: CarouselItem_jsxFileName,
4093 lineNumber: 44,
4094 columnNumber: 7
4095 }
4096 }), children);
4097});
4098CarouselItem.displayName = 'CarouselItem';
4099CarouselItem.propTypes = CarouselItem_propTypes;
4100/* harmony default export */ const src_CarouselItem = (CarouselItem);
4101;// CONCATENATED MODULE: ./src/ElementChildren.tsx
4102
4103/**
4104 * Iterates through children that are typically specified as `props.children`,
4105 * but only maps over children that are "valid elements".
4106 *
4107 * The mapFunction provided index will be normalised to the components mapped,
4108 * so an invalid component would not increase the index.
4109 *
4110 */
4111
4112function map(children, func) {
4113 var index = 0;
4114 return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, function (child) {
4115 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child) ? func(child, index++) : child;
4116 });
4117}
4118/**
4119 * Iterates through children that are "valid elements".
4120 *
4121 * The provided forEachFunc(child, index) will be called for each
4122 * leaf child with the index reflecting the position relative to "valid components".
4123 */
4124
4125
4126function forEach(children, func) {
4127 var index = 0;
4128 external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(children, function (child) {
4129 if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) func(child, index++);
4130 });
4131}
4132
4133
4134;// CONCATENATED MODULE: ./src/Carousel.tsx
4135
4136
4137var Carousel_excluded = ["as", "bsPrefix", "slide", "fade", "controls", "indicators", "activeIndex", "onSelect", "onSlide", "onSlid", "interval", "keyboard", "onKeyDown", "pause", "onMouseOver", "onMouseOut", "wrap", "touch", "onTouchStart", "onTouchMove", "onTouchEnd", "prevIcon", "prevLabel", "nextIcon", "nextLabel", "className", "children"];
4138var Carousel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Carousel.tsx";
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155var SWIPE_THRESHOLD = 40;
4156var Carousel_propTypes = {
4157 /**
4158 * @default 'carousel'
4159 */
4160 bsPrefix: (prop_types_default()).string,
4161 as: (prop_types_default()).elementType,
4162
4163 /**
4164 * Enables animation on the Carousel as it transitions between slides.
4165 */
4166 slide: (prop_types_default()).bool,
4167
4168 /** Animates slides with a crossfade animation instead of the default slide animation */
4169 fade: (prop_types_default()).bool,
4170
4171 /**
4172 * Show the Carousel previous and next arrows for changing the current slide
4173 */
4174 controls: (prop_types_default()).bool,
4175
4176 /**
4177 * Show a set of slide position indicators
4178 */
4179 indicators: (prop_types_default()).bool,
4180
4181 /**
4182 * Controls the current visible slide
4183 *
4184 * @controllable onSelect
4185 */
4186 activeIndex: (prop_types_default()).number,
4187
4188 /**
4189 * Callback fired when the active item changes.
4190 *
4191 * ```js
4192 * (eventKey: number, event: Object | null) => void
4193 * ```
4194 *
4195 * @controllable activeIndex
4196 */
4197 onSelect: (prop_types_default()).func,
4198
4199 /**
4200 * Callback fired when a slide transition starts.
4201 *
4202 * ```js
4203 * (eventKey: number, direction: 'left' | 'right') => void
4204 */
4205 onSlide: (prop_types_default()).func,
4206
4207 /**
4208 * Callback fired when a slide transition ends.
4209 *
4210 * ```js
4211 * (eventKey: number, direction: 'left' | 'right') => void
4212 */
4213 onSlid: (prop_types_default()).func,
4214
4215 /**
4216 * The amount of time to delay between automatically cycling an item. If `null`, carousel will not automatically cycle.
4217 */
4218 interval: (prop_types_default()).number,
4219
4220 /** Whether the carousel should react to keyboard events. */
4221 keyboard: (prop_types_default()).bool,
4222
4223 /**
4224 * If set to `"hover"`, pauses the cycling of the carousel on `mouseenter` and resumes the cycling of the carousel on `mouseleave`. If set to `false`, hovering over the carousel won't pause it.
4225 *
4226 * On touch-enabled devices, when set to `"hover"`, cycling will pause on `touchend` (once the user finished interacting with the carousel) for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior.
4227 */
4228 pause: prop_types_default().oneOf(['hover', false]),
4229
4230 /** Whether the carousel should cycle continuously or have hard stops. */
4231 wrap: (prop_types_default()).bool,
4232
4233 /**
4234 * Whether the carousel should support left/right swipe interactions on touchscreen devices.
4235 */
4236 touch: (prop_types_default()).bool,
4237
4238 /** Override the default button icon for the "previous" control */
4239 prevIcon: (prop_types_default()).node,
4240
4241 /**
4242 * Label shown to screen readers only, can be used to show the previous element
4243 * in the carousel.
4244 * Set to null to deactivate.
4245 */
4246 prevLabel: (prop_types_default()).string,
4247
4248 /** Override the default button icon for the "next" control */
4249 nextIcon: (prop_types_default()).node,
4250
4251 /**
4252 * Label shown to screen readers only, can be used to show the next element
4253 * in the carousel.
4254 * Set to null to deactivate.
4255 */
4256 nextLabel: (prop_types_default()).string
4257};
4258var Carousel_defaultProps = {
4259 slide: true,
4260 fade: false,
4261 controls: true,
4262 indicators: true,
4263 defaultActiveIndex: 0,
4264 interval: 5000,
4265 keyboard: true,
4266 pause: 'hover',
4267 wrap: true,
4268 touch: true,
4269 prevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4270 "aria-hidden": "true",
4271 className: "carousel-control-prev-icon",
4272 __self: undefined,
4273 __source: {
4274 fileName: Carousel_jsxFileName,
4275 lineNumber: 190,
4276 columnNumber: 13
4277 }
4278 }),
4279 prevLabel: 'Previous',
4280 nextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4281 "aria-hidden": "true",
4282 className: "carousel-control-next-icon",
4283 __self: undefined,
4284 __source: {
4285 fileName: Carousel_jsxFileName,
4286 lineNumber: 193,
4287 columnNumber: 13
4288 }
4289 }),
4290 nextLabel: 'Next'
4291};
4292
4293function isVisible(element) {
4294 if (!element || !element.style || !element.parentNode || !element.parentNode.style) {
4295 return false;
4296 }
4297
4298 var elementStyle = getComputedStyle(element);
4299 return elementStyle.display !== 'none' && elementStyle.visibility !== 'hidden' && getComputedStyle(element.parentNode).display !== 'none';
4300}
4301
4302function CarouselFunc(uncontrolledProps, ref) {
4303 var _this = this;
4304
4305 var _useUncontrolled = useUncontrolled(uncontrolledProps, {
4306 activeIndex: 'onSelect'
4307 }),
4308 _useUncontrolled$as = _useUncontrolled.as,
4309 Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
4310 bsPrefix = _useUncontrolled.bsPrefix,
4311 slide = _useUncontrolled.slide,
4312 fade = _useUncontrolled.fade,
4313 controls = _useUncontrolled.controls,
4314 indicators = _useUncontrolled.indicators,
4315 activeIndex = _useUncontrolled.activeIndex,
4316 onSelect = _useUncontrolled.onSelect,
4317 onSlide = _useUncontrolled.onSlide,
4318 onSlid = _useUncontrolled.onSlid,
4319 interval = _useUncontrolled.interval,
4320 keyboard = _useUncontrolled.keyboard,
4321 onKeyDown = _useUncontrolled.onKeyDown,
4322 pause = _useUncontrolled.pause,
4323 onMouseOver = _useUncontrolled.onMouseOver,
4324 onMouseOut = _useUncontrolled.onMouseOut,
4325 wrap = _useUncontrolled.wrap,
4326 touch = _useUncontrolled.touch,
4327 onTouchStart = _useUncontrolled.onTouchStart,
4328 onTouchMove = _useUncontrolled.onTouchMove,
4329 onTouchEnd = _useUncontrolled.onTouchEnd,
4330 prevIcon = _useUncontrolled.prevIcon,
4331 prevLabel = _useUncontrolled.prevLabel,
4332 nextIcon = _useUncontrolled.nextIcon,
4333 nextLabel = _useUncontrolled.nextLabel,
4334 className = _useUncontrolled.className,
4335 children = _useUncontrolled.children,
4336 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Carousel_excluded);
4337
4338 var prefix = useBootstrapPrefix(bsPrefix, 'carousel');
4339 var nextDirectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
4340
4341 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('next'),
4342 direction = _useState[0],
4343 setDirection = _useState[1];
4344
4345 var _useState2 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
4346 paused = _useState2[0],
4347 setPaused = _useState2[1];
4348
4349 var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
4350 isSliding = _useState3[0],
4351 setIsSliding = _useState3[1];
4352
4353 var _useState4 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(activeIndex || 0),
4354 renderedActiveIndex = _useState4[0],
4355 setRenderedActiveIndex = _useState4[1];
4356
4357 if (!isSliding && activeIndex !== renderedActiveIndex) {
4358 if (nextDirectionRef.current) {
4359 setDirection(nextDirectionRef.current);
4360 } else {
4361 setDirection((activeIndex || 0) > renderedActiveIndex ? 'next' : 'prev');
4362 }
4363
4364 if (slide) {
4365 setIsSliding(true);
4366 }
4367
4368 setRenderedActiveIndex(activeIndex || 0);
4369 }
4370
4371 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4372 if (nextDirectionRef.current) {
4373 nextDirectionRef.current = null;
4374 }
4375 });
4376 var numChildren = 0;
4377 var activeChildInterval; // Iterate to grab all of the children's interval values
4378 // (and count them, too)
4379
4380 forEach(children, function (child, index) {
4381 ++numChildren;
4382
4383 if (index === activeIndex) {
4384 activeChildInterval = child.props.interval;
4385 }
4386 });
4387 var activeChildIntervalRef = esm_useCommittedRef(activeChildInterval);
4388 var prev = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
4389 if (isSliding) {
4390 return;
4391 }
4392
4393 var nextActiveIndex = renderedActiveIndex - 1;
4394
4395 if (nextActiveIndex < 0) {
4396 if (!wrap) {
4397 return;
4398 }
4399
4400 nextActiveIndex = numChildren - 1;
4401 }
4402
4403 nextDirectionRef.current = 'prev';
4404
4405 if (onSelect) {
4406 onSelect(nextActiveIndex, event);
4407 }
4408 }, [isSliding, renderedActiveIndex, onSelect, wrap, numChildren]); // This is used in the setInterval, so it should not invalidate.
4409
4410 var next = useEventCallback(function (event) {
4411 if (isSliding) {
4412 return;
4413 }
4414
4415 var nextActiveIndex = renderedActiveIndex + 1;
4416
4417 if (nextActiveIndex >= numChildren) {
4418 if (!wrap) {
4419 return;
4420 }
4421
4422 nextActiveIndex = 0;
4423 }
4424
4425 nextDirectionRef.current = 'next';
4426
4427 if (onSelect) {
4428 onSelect(nextActiveIndex, event);
4429 }
4430 });
4431 var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
4432 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
4433 return {
4434 element: elementRef.current,
4435 prev: prev,
4436 next: next
4437 };
4438 }); // This is used in the setInterval, so it should not invalidate.
4439
4440 var nextWhenVisible = useEventCallback(function () {
4441 if (!document.hidden && isVisible(elementRef.current)) {
4442 next();
4443 }
4444 });
4445 var slideDirection = direction === 'next' ? 'left' : 'right';
4446 esm_useUpdateEffect(function () {
4447 if (slide) {
4448 // These callbacks will be handled by the <Transition> callbacks.
4449 return;
4450 }
4451
4452 if (onSlide) {
4453 onSlide(renderedActiveIndex, slideDirection);
4454 }
4455
4456 if (onSlid) {
4457 onSlid(renderedActiveIndex, slideDirection);
4458 }
4459 }, [renderedActiveIndex]);
4460 var orderClassName = prefix + "-item-" + direction;
4461 var directionalClassName = prefix + "-item-" + slideDirection;
4462 var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (node) {
4463 triggerBrowserReflow(node);
4464
4465 if (onSlide) {
4466 onSlide(renderedActiveIndex, slideDirection);
4467 }
4468 }, [onSlide, renderedActiveIndex, slideDirection]);
4469 var handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
4470 setIsSliding(false);
4471
4472 if (onSlid) {
4473 onSlid(renderedActiveIndex, slideDirection);
4474 }
4475 }, [onSlid, renderedActiveIndex, slideDirection]);
4476 var handleKeyDown = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
4477 if (keyboard && !/input|textarea/i.test(event.target.tagName)) {
4478 switch (event.key) {
4479 case 'ArrowLeft':
4480 event.preventDefault();
4481 prev(event);
4482 return;
4483
4484 case 'ArrowRight':
4485 event.preventDefault();
4486 next(event);
4487 return;
4488
4489 default:
4490 }
4491 }
4492
4493 if (onKeyDown) {
4494 onKeyDown(event);
4495 }
4496 }, [keyboard, onKeyDown, prev, next]);
4497 var handleMouseOver = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
4498 if (pause === 'hover') {
4499 setPaused(true);
4500 }
4501
4502 if (onMouseOver) {
4503 onMouseOver(event);
4504 }
4505 }, [pause, onMouseOver]);
4506 var handleMouseOut = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
4507 setPaused(false);
4508
4509 if (onMouseOut) {
4510 onMouseOut(event);
4511 }
4512 }, [onMouseOut]);
4513 var touchStartXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
4514 var touchDeltaXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
4515 var touchUnpauseTimeout = useTimeout();
4516 var handleTouchStart = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
4517 touchStartXRef.current = event.touches[0].clientX;
4518 touchDeltaXRef.current = 0;
4519
4520 if (pause === 'hover') {
4521 setPaused(true);
4522 }
4523
4524 if (onTouchStart) {
4525 onTouchStart(event);
4526 }
4527 }, [pause, onTouchStart]);
4528 var handleTouchMove = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
4529 if (event.touches && event.touches.length > 1) {
4530 touchDeltaXRef.current = 0;
4531 } else {
4532 touchDeltaXRef.current = event.touches[0].clientX - touchStartXRef.current;
4533 }
4534
4535 if (onTouchMove) {
4536 onTouchMove(event);
4537 }
4538 }, [onTouchMove]);
4539 var handleTouchEnd = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
4540 if (touch) {
4541 var touchDeltaX = touchDeltaXRef.current;
4542
4543 if (Math.abs(touchDeltaX) > SWIPE_THRESHOLD) {
4544 if (touchDeltaX > 0) {
4545 prev(event);
4546 } else {
4547 next(event);
4548 }
4549 }
4550 }
4551
4552 if (pause === 'hover') {
4553 touchUnpauseTimeout.set(function () {
4554 setPaused(false);
4555 }, interval || undefined);
4556 }
4557
4558 if (onTouchEnd) {
4559 onTouchEnd(event);
4560 }
4561 }, [touch, pause, prev, next, touchUnpauseTimeout, interval, onTouchEnd]);
4562 var shouldPlay = interval != null && !paused && !isSliding;
4563 var intervalHandleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
4564 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4565 var _ref, _activeChildIntervalR;
4566
4567 if (!shouldPlay) {
4568 return undefined;
4569 }
4570
4571 intervalHandleRef.current = window.setInterval(document.visibilityState ? nextWhenVisible : next, (_ref = (_activeChildIntervalR = activeChildIntervalRef.current) != null ? _activeChildIntervalR : interval) != null ? _ref : undefined);
4572 return function () {
4573 if (intervalHandleRef.current !== null) {
4574 clearInterval(intervalHandleRef.current);
4575 }
4576 };
4577 }, [shouldPlay, next, activeChildIntervalRef, interval, nextWhenVisible]);
4578 var indicatorOnClicks = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
4579 return indicators && Array.from({
4580 length: numChildren
4581 }, function (_, index) {
4582 return function (event) {
4583 if (onSelect) {
4584 onSelect(index, event);
4585 }
4586 };
4587 });
4588 }, [indicators, numChildren, onSelect]);
4589 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
4590 ref: elementRef
4591 }, props, {
4592 onKeyDown: handleKeyDown,
4593 onMouseOver: handleMouseOver,
4594 onMouseOut: handleMouseOut,
4595 onTouchStart: handleTouchStart,
4596 onTouchMove: handleTouchMove,
4597 onTouchEnd: handleTouchEnd,
4598 className: classnames_default()(className, prefix, slide && 'slide', fade && prefix + "-fade"),
4599 __self: this,
4600 __source: {
4601 fileName: Carousel_jsxFileName,
4602 lineNumber: 533,
4603 columnNumber: 5
4604 }
4605 }), indicators && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ol", {
4606 className: prefix + "-indicators",
4607 __self: this,
4608 __source: {
4609 fileName: Carousel_jsxFileName,
4610 lineNumber: 550,
4611 columnNumber: 9
4612 }
4613 }, map(children, function (_child, index) {
4614 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
4615 key: index,
4616 className: index === renderedActiveIndex ? 'active' : undefined,
4617 onClick: indicatorOnClicks ? indicatorOnClicks[index] : undefined,
4618 __self: _this,
4619 __source: {
4620 fileName: Carousel_jsxFileName,
4621 lineNumber: 552,
4622 columnNumber: 13
4623 }
4624 });
4625 })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4626 className: prefix + "-inner",
4627 __self: this,
4628 __source: {
4629 fileName: Carousel_jsxFileName,
4630 lineNumber: 561,
4631 columnNumber: 7
4632 }
4633 }, map(children, function (child, index) {
4634 var isActive = index === renderedActiveIndex;
4635 return slide ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition, {
4636 in: isActive,
4637 onEnter: isActive ? handleEnter : undefined,
4638 onEntered: isActive ? handleEntered : undefined,
4639 addEndListener: transitionEndListener,
4640 __self: _this,
4641 __source: {
4642 fileName: Carousel_jsxFileName,
4643 lineNumber: 566,
4644 columnNumber: 13
4645 }
4646 }, function (status) {
4647 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
4648 className: classnames_default()(child.props.className, isActive && status !== 'entered' && orderClassName, (status === 'entered' || status === 'exiting') && 'active', (status === 'entering' || status === 'exiting') && directionalClassName)
4649 });
4650 }) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
4651 className: classnames_default()(child.props.className, isActive && 'active')
4652 });
4653 })), controls && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, (wrap || activeIndex !== 0) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, {
4654 className: prefix + "-control-prev",
4655 onClick: prev,
4656 __self: this,
4657 __source: {
4658 fileName: Carousel_jsxFileName,
4659 lineNumber: 598,
4660 columnNumber: 13
4661 }
4662 }, prevIcon, prevLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4663 className: "sr-only",
4664 __self: this,
4665 __source: {
4666 fileName: Carousel_jsxFileName,
4667 lineNumber: 600,
4668 columnNumber: 29
4669 }
4670 }, prevLabel)), (wrap || activeIndex !== numChildren - 1) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, {
4671 className: prefix + "-control-next",
4672 onClick: next,
4673 __self: this,
4674 __source: {
4675 fileName: Carousel_jsxFileName,
4676 lineNumber: 604,
4677 columnNumber: 13
4678 }
4679 }, nextIcon, nextLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4680 className: "sr-only",
4681 __self: this,
4682 __source: {
4683 fileName: Carousel_jsxFileName,
4684 lineNumber: 606,
4685 columnNumber: 29
4686 }
4687 }, nextLabel))));
4688}
4689
4690var Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(CarouselFunc);
4691Carousel.displayName = 'Carousel';
4692Carousel.propTypes = Carousel_propTypes;
4693Carousel.defaultProps = Carousel_defaultProps;
4694Carousel.Caption = CarouselCaption;
4695Carousel.Item = src_CarouselItem;
4696/* harmony default export */ const src_Carousel = (Carousel);
4697;// CONCATENATED MODULE: ./src/Col.tsx
4698
4699
4700var Col_excluded = ["bsPrefix", "className", "as"];
4701
4702var Col_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Col.tsx",
4703 Col_this = undefined;
4704
4705
4706
4707
4708
4709var DEVICE_SIZES = ['xl', 'lg', 'md', 'sm', 'xs'];
4710var colSize = prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).number, (prop_types_default()).string, prop_types_default().oneOf(['auto'])]);
4711var stringOrNumber = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]);
4712var column = prop_types_default().oneOfType([colSize, prop_types_default().shape({
4713 size: colSize,
4714 order: stringOrNumber,
4715 offset: stringOrNumber
4716})]);
4717var Col_propTypes = {
4718 /**
4719 * @default 'col'
4720 */
4721 bsPrefix: (prop_types_default()).string,
4722 as: (prop_types_default()).elementType,
4723
4724 /**
4725 * The number of columns to span on extra small devices (<576px)
4726 *
4727 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
4728 */
4729 xs: column,
4730
4731 /**
4732 * The number of columns to span on small devices (≥576px)
4733 *
4734 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
4735 */
4736 sm: column,
4737
4738 /**
4739 * The number of columns to span on medium devices (≥768px)
4740 *
4741 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
4742 */
4743 md: column,
4744
4745 /**
4746 * The number of columns to span on large devices (≥992px)
4747 *
4748 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
4749 */
4750 lg: column,
4751
4752 /**
4753 * The number of columns to span on extra large devices (≥1200px)
4754 *
4755 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
4756 */
4757 xl: column
4758};
4759var Col = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
4760function (_ref, ref) {
4761 var bsPrefix = _ref.bsPrefix,
4762 className = _ref.className,
4763 _ref$as = _ref.as,
4764 Component = _ref$as === void 0 ? 'div' : _ref$as,
4765 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Col_excluded);
4766
4767 var prefix = useBootstrapPrefix(bsPrefix, 'col');
4768 var spans = [];
4769 var classes = [];
4770 DEVICE_SIZES.forEach(function (brkPoint) {
4771 var propValue = props[brkPoint];
4772 delete props[brkPoint];
4773 var span;
4774 var offset;
4775 var order;
4776
4777 if (typeof propValue === 'object' && propValue != null) {
4778 var _propValue$span = propValue.span;
4779 span = _propValue$span === void 0 ? true : _propValue$span;
4780 offset = propValue.offset;
4781 order = propValue.order;
4782 } else {
4783 span = propValue;
4784 }
4785
4786 var infix = brkPoint !== 'xs' ? "-" + brkPoint : '';
4787 if (span) spans.push(span === true ? "" + prefix + infix : "" + prefix + infix + "-" + span);
4788 if (order != null) classes.push("order" + infix + "-" + order);
4789 if (offset != null) classes.push("offset" + infix + "-" + offset);
4790 });
4791
4792 if (!spans.length) {
4793 spans.push(prefix); // plain 'col'
4794 }
4795
4796 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
4797 ref: ref,
4798 className: classnames_default().apply(void 0, [className].concat(spans, classes)),
4799 __self: Col_this,
4800 __source: {
4801 fileName: Col_jsxFileName,
4802 lineNumber: 149,
4803 columnNumber: 7
4804 }
4805 }));
4806});
4807Col.displayName = 'Col';
4808Col.propTypes = Col_propTypes;
4809/* harmony default export */ const src_Col = (Col);
4810;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/matches.js
4811var matchesImpl;
4812/**
4813 * Checks if a given element matches a selector.
4814 *
4815 * @param node the element
4816 * @param selector the selector
4817 */
4818
4819function matches(node, selector) {
4820 if (!matchesImpl) {
4821 var body = document.body;
4822 var nativeMatch = body.matches || body.matchesSelector || body.webkitMatchesSelector || body.mozMatchesSelector || body.msMatchesSelector;
4823
4824 matchesImpl = function matchesImpl(n, s) {
4825 return nativeMatch.call(n, s);
4826 };
4827 }
4828
4829 return matchesImpl(node, selector);
4830}
4831;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/querySelectorAll.js
4832var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
4833/**
4834 * Runs `querySelectorAll` on a given element.
4835 *
4836 * @param element the element
4837 * @param selector the selector
4838 */
4839
4840function qsa(element, selector) {
4841 return toArray(element.querySelectorAll(selector));
4842}
4843;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/usePrevious.js
4844
4845/**
4846 * Store the last of some value. Tracked via a `Ref` only updating it
4847 * after the component renders.
4848 *
4849 * Helpful if you need to compare a prop value to it's previous value during render.
4850 *
4851 * ```ts
4852 * function Component(props) {
4853 * const lastProps = usePrevious(props)
4854 *
4855 * if (lastProps.foo !== props.foo)
4856 * resetValueFromProps(props.foo)
4857 * }
4858 * ```
4859 *
4860 * @param value the value to track
4861 */
4862
4863function usePrevious(value) {
4864 var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
4865 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4866 ref.current = value;
4867 });
4868 return ref.current;
4869}
4870;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useForceUpdate.js
4871
4872/**
4873 * Returns a function that triggers a component update. the hook equivalent to
4874 * `this.forceUpdate()` in a class component. In most cases using a state value directly
4875 * is preferable but may be required in some advanced usages of refs for interop or
4876 * when direct DOM manipulation is required.
4877 *
4878 * ```ts
4879 * const forceUpdate = useForceUpdate();
4880 *
4881 * const updateOnClick = useCallback(() => {
4882 * forceUpdate()
4883 * }, [forceUpdate])
4884 *
4885 * return <button type="button" onClick={updateOnClick}>Hi there</button>
4886 * ```
4887 */
4888
4889function useForceUpdate() {
4890 // The toggling state value is designed to defeat React optimizations for skipping
4891 // updates when they are stricting equal to the last state value
4892 var _useReducer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(function (state) {
4893 return !state;
4894 }, false),
4895 dispatch = _useReducer[1];
4896
4897 return dispatch;
4898}
4899;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useEventListener.js
4900
4901
4902/**
4903 * Attaches an event handler outside directly to specified DOM element
4904 * bypassing the react synthetic event system.
4905 *
4906 * @param element The target to listen for events on
4907 * @param event The DOM event name
4908 * @param handler An event handler
4909 * @param capture Whether or not to listen during the capture event phase
4910 */
4911
4912function useEventListener(eventTarget, event, listener, capture) {
4913 if (capture === void 0) {
4914 capture = false;
4915 }
4916
4917 var handler = useEventCallback(listener);
4918 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4919 var target = typeof eventTarget === 'function' ? eventTarget() : eventTarget;
4920 target.addEventListener(event, handler, capture);
4921 return function () {
4922 return target.removeEventListener(event, handler, capture);
4923 };
4924 }, [eventTarget]);
4925}
4926;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useGlobalListener.js
4927
4928
4929/**
4930 * Attaches an event handler outside directly to the `document`,
4931 * bypassing the react synthetic event system.
4932 *
4933 * ```ts
4934 * useGlobalListener('keydown', (event) => {
4935 * console.log(event.key)
4936 * })
4937 * ```
4938 *
4939 * @param event The DOM event name
4940 * @param handler An event handler
4941 * @param capture Whether or not to listen during the capture event phase
4942 */
4943
4944function useGlobalListener(event, handler, capture) {
4945 if (capture === void 0) {
4946 capture = false;
4947 }
4948
4949 var documentTarget = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
4950 return document;
4951 }, []);
4952 return useEventListener(documentTarget, event, handler, capture);
4953}
4954;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/DropdownContext.js
4955
4956var DropdownContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
4957/* harmony default export */ const esm_DropdownContext = (DropdownContext);
4958;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
4959
4960/**
4961 * A convenience hook around `useState` designed to be paired with
4962 * the component [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) api.
4963 * Callback refs are useful over `useRef()` when you need to respond to the ref being set
4964 * instead of lazily accessing it in an effect.
4965 *
4966 * ```ts
4967 * const [element, attachRef] = useCallbackRef<HTMLDivElement>()
4968 *
4969 * useEffect(() => {
4970 * if (!element) return
4971 *
4972 * const calendar = new FullCalendar.Calendar(element)
4973 *
4974 * return () => {
4975 * calendar.destroy()
4976 * }
4977 * }, [element])
4978 *
4979 * return <div ref={attachRef} />
4980 * ```
4981 *
4982 * @category refs
4983 */
4984
4985function useCallbackRef() {
4986 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
4987}
4988;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useSafeState.js
4989
4990
4991
4992function useSafeState(state) {
4993 var isMounted = useMounted();
4994 return [state[0], (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (nextState) {
4995 if (!isMounted()) return;
4996 return state[1](nextState);
4997 }, [isMounted, state[1]])];
4998}
4999
5000/* harmony default export */ const esm_useSafeState = (useSafeState);
5001;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js
5002
5003function getBasePlacement(placement) {
5004 return placement.split('-')[0];
5005}
5006;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
5007function getBoundingClientRect(element) {
5008 var rect = element.getBoundingClientRect();
5009 return {
5010 width: rect.width,
5011 height: rect.height,
5012 top: rect.top,
5013 right: rect.right,
5014 bottom: rect.bottom,
5015 left: rect.left,
5016 x: rect.left,
5017 y: rect.top
5018 };
5019}
5020;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js
5021 // Returns the layout rect of an element relative to its offsetParent. Layout
5022// means it doesn't take into account transforms.
5023
5024function getLayoutRect(element) {
5025 var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
5026 // Fixes https://github.com/popperjs/popper-core/issues/1223
5027
5028 var width = element.offsetWidth;
5029 var height = element.offsetHeight;
5030
5031 if (Math.abs(clientRect.width - width) <= 1) {
5032 width = clientRect.width;
5033 }
5034
5035 if (Math.abs(clientRect.height - height) <= 1) {
5036 height = clientRect.height;
5037 }
5038
5039 return {
5040 x: element.offsetLeft,
5041 y: element.offsetTop,
5042 width: width,
5043 height: height
5044 };
5045}
5046;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js
5047function getWindow(node) {
5048 if (node == null) {
5049 return window;
5050 }
5051
5052 if (node.toString() !== '[object Window]') {
5053 var ownerDocument = node.ownerDocument;
5054 return ownerDocument ? ownerDocument.defaultView || window : window;
5055 }
5056
5057 return node;
5058}
5059;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js
5060
5061
5062function isElement(node) {
5063 var OwnElement = getWindow(node).Element;
5064 return node instanceof OwnElement || node instanceof Element;
5065}
5066
5067function isHTMLElement(node) {
5068 var OwnElement = getWindow(node).HTMLElement;
5069 return node instanceof OwnElement || node instanceof HTMLElement;
5070}
5071
5072function isShadowRoot(node) {
5073 // IE 11 has no ShadowRoot
5074 if (typeof ShadowRoot === 'undefined') {
5075 return false;
5076 }
5077
5078 var OwnElement = getWindow(node).ShadowRoot;
5079 return node instanceof OwnElement || node instanceof ShadowRoot;
5080}
5081
5082
5083;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js
5084
5085function contains(parent, child) {
5086 var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
5087
5088 if (parent.contains(child)) {
5089 return true;
5090 } // then fallback to custom implementation with Shadow DOM support
5091 else if (rootNode && isShadowRoot(rootNode)) {
5092 var next = child;
5093
5094 do {
5095 if (next && parent.isSameNode(next)) {
5096 return true;
5097 } // $FlowFixMe[prop-missing]: need a better way to handle this...
5098
5099
5100 next = next.parentNode || next.host;
5101 } while (next);
5102 } // Give up, the result is false
5103
5104
5105 return false;
5106}
5107;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js
5108function getNodeName(element) {
5109 return element ? (element.nodeName || '').toLowerCase() : null;
5110}
5111;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js
5112
5113function dom_utils_getComputedStyle_getComputedStyle(element) {
5114 return getWindow(element).getComputedStyle(element);
5115}
5116;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js
5117
5118function isTableElement(element) {
5119 return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
5120}
5121;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js
5122
5123function getDocumentElement(element) {
5124 // $FlowFixMe[incompatible-return]: assume body is always available
5125 return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
5126 element.document) || window.document).documentElement;
5127}
5128;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js
5129
5130
5131
5132function getParentNode(element) {
5133 if (getNodeName(element) === 'html') {
5134 return element;
5135 }
5136
5137 return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
5138 // $FlowFixMe[incompatible-return]
5139 // $FlowFixMe[prop-missing]
5140 element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
5141 element.parentNode || ( // DOM Element detected
5142 isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
5143 // $FlowFixMe[incompatible-call]: HTMLElement is a Node
5144 getDocumentElement(element) // fallback
5145
5146 );
5147}
5148;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js
5149
5150
5151
5152
5153
5154
5155
5156function getTrueOffsetParent(element) {
5157 if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
5158 dom_utils_getComputedStyle_getComputedStyle(element).position === 'fixed') {
5159 return null;
5160 }
5161
5162 return element.offsetParent;
5163} // `.offsetParent` reports `null` for fixed elements, while absolute elements
5164// return the containing block
5165
5166
5167function getContainingBlock(element) {
5168 var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
5169 var isIE = navigator.userAgent.indexOf('Trident') !== -1;
5170
5171 if (isIE && isHTMLElement(element)) {
5172 // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
5173 var elementCss = dom_utils_getComputedStyle_getComputedStyle(element);
5174
5175 if (elementCss.position === 'fixed') {
5176 return null;
5177 }
5178 }
5179
5180 var currentNode = getParentNode(element);
5181
5182 while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
5183 var css = dom_utils_getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
5184 // create a containing block.
5185 // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
5186
5187 if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
5188 return currentNode;
5189 } else {
5190 currentNode = currentNode.parentNode;
5191 }
5192 }
5193
5194 return null;
5195} // Gets the closest ancestor positioned element. Handles some edge cases,
5196// such as table ancestors and cross browser bugs.
5197
5198
5199function getOffsetParent(element) {
5200 var window = getWindow(element);
5201 var offsetParent = getTrueOffsetParent(element);
5202
5203 while (offsetParent && isTableElement(offsetParent) && dom_utils_getComputedStyle_getComputedStyle(offsetParent).position === 'static') {
5204 offsetParent = getTrueOffsetParent(offsetParent);
5205 }
5206
5207 if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && dom_utils_getComputedStyle_getComputedStyle(offsetParent).position === 'static')) {
5208 return window;
5209 }
5210
5211 return offsetParent || getContainingBlock(element) || window;
5212}
5213;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js
5214function getMainAxisFromPlacement(placement) {
5215 return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
5216}
5217;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js
5218var math_max = Math.max;
5219var math_min = Math.min;
5220var round = Math.round;
5221;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js
5222
5223function within(min, value, max) {
5224 return math_max(min, math_min(value, max));
5225}
5226;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js
5227function getFreshSideObject() {
5228 return {
5229 top: 0,
5230 right: 0,
5231 bottom: 0,
5232 left: 0
5233 };
5234}
5235;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js
5236
5237function mergePaddingObject(paddingObject) {
5238 return Object.assign({}, getFreshSideObject(), paddingObject);
5239}
5240;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js
5241function expandToHashMap(value, keys) {
5242 return keys.reduce(function (hashMap, key) {
5243 hashMap[key] = value;
5244 return hashMap;
5245 }, {});
5246}
5247;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js
5248var enums_top = 'top';
5249var bottom = 'bottom';
5250var right = 'right';
5251var left = 'left';
5252var auto = 'auto';
5253var basePlacements = [enums_top, bottom, right, left];
5254var start = 'start';
5255var end = 'end';
5256var clippingParents = 'clippingParents';
5257var viewport = 'viewport';
5258var popper = 'popper';
5259var reference = 'reference';
5260var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
5261 return acc.concat([placement + "-" + start, placement + "-" + end]);
5262}, []);
5263var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
5264 return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
5265}, []); // modifiers that need to read the DOM
5266
5267var beforeRead = 'beforeRead';
5268var read = 'read';
5269var afterRead = 'afterRead'; // pure-logic modifiers
5270
5271var beforeMain = 'beforeMain';
5272var main = 'main';
5273var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
5274
5275var beforeWrite = 'beforeWrite';
5276var write = 'write';
5277var afterWrite = 'afterWrite';
5278var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
5279;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289 // eslint-disable-next-line import/no-unused-modules
5290
5291var toPaddingObject = function toPaddingObject(padding, state) {
5292 padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
5293 placement: state.placement
5294 })) : padding;
5295 return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
5296};
5297
5298function arrow(_ref) {
5299 var _state$modifiersData$;
5300
5301 var state = _ref.state,
5302 name = _ref.name,
5303 options = _ref.options;
5304 var arrowElement = state.elements.arrow;
5305 var popperOffsets = state.modifiersData.popperOffsets;
5306 var basePlacement = getBasePlacement(state.placement);
5307 var axis = getMainAxisFromPlacement(basePlacement);
5308 var isVertical = [left, right].indexOf(basePlacement) >= 0;
5309 var len = isVertical ? 'height' : 'width';
5310
5311 if (!arrowElement || !popperOffsets) {
5312 return;
5313 }
5314
5315 var paddingObject = toPaddingObject(options.padding, state);
5316 var arrowRect = getLayoutRect(arrowElement);
5317 var minProp = axis === 'y' ? enums_top : left;
5318 var maxProp = axis === 'y' ? bottom : right;
5319 var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
5320 var startDiff = popperOffsets[axis] - state.rects.reference[axis];
5321 var arrowOffsetParent = getOffsetParent(arrowElement);
5322 var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
5323 var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
5324 // outside of the popper bounds
5325
5326 var min = paddingObject[minProp];
5327 var max = clientSize - arrowRect[len] - paddingObject[maxProp];
5328 var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
5329 var offset = within(min, center, max); // Prevents breaking syntax highlighting...
5330
5331 var axisProp = axis;
5332 state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
5333}
5334
5335function effect(_ref2) {
5336 var state = _ref2.state,
5337 options = _ref2.options;
5338 var _options$element = options.element,
5339 arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
5340
5341 if (arrowElement == null) {
5342 return;
5343 } // CSS selector
5344
5345
5346 if (typeof arrowElement === 'string') {
5347 arrowElement = state.elements.popper.querySelector(arrowElement);
5348
5349 if (!arrowElement) {
5350 return;
5351 }
5352 }
5353
5354 if (false) {}
5355
5356 if (!contains(state.elements.popper, arrowElement)) {
5357 if (false) {}
5358
5359 return;
5360 }
5361
5362 state.elements.arrow = arrowElement;
5363} // eslint-disable-next-line import/no-unused-modules
5364
5365
5366/* harmony default export */ const modifiers_arrow = ({
5367 name: 'arrow',
5368 enabled: true,
5369 phase: 'main',
5370 fn: arrow,
5371 effect: effect,
5372 requires: ['popperOffsets'],
5373 requiresIfExists: ['preventOverflow']
5374});
5375;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js
5376
5377
5378
5379
5380
5381
5382 // eslint-disable-next-line import/no-unused-modules
5383
5384var unsetSides = {
5385 top: 'auto',
5386 right: 'auto',
5387 bottom: 'auto',
5388 left: 'auto'
5389}; // Round the offsets to the nearest suitable subpixel based on the DPR.
5390// Zooming can change the DPR, but it seems to report a value that will
5391// cleanly divide the values into the appropriate subpixels.
5392
5393function roundOffsetsByDPR(_ref) {
5394 var x = _ref.x,
5395 y = _ref.y;
5396 var win = window;
5397 var dpr = win.devicePixelRatio || 1;
5398 return {
5399 x: round(round(x * dpr) / dpr) || 0,
5400 y: round(round(y * dpr) / dpr) || 0
5401 };
5402}
5403
5404function mapToStyles(_ref2) {
5405 var _Object$assign2;
5406
5407 var popper = _ref2.popper,
5408 popperRect = _ref2.popperRect,
5409 placement = _ref2.placement,
5410 offsets = _ref2.offsets,
5411 position = _ref2.position,
5412 gpuAcceleration = _ref2.gpuAcceleration,
5413 adaptive = _ref2.adaptive,
5414 roundOffsets = _ref2.roundOffsets;
5415
5416 var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
5417 _ref3$x = _ref3.x,
5418 x = _ref3$x === void 0 ? 0 : _ref3$x,
5419 _ref3$y = _ref3.y,
5420 y = _ref3$y === void 0 ? 0 : _ref3$y;
5421
5422 var hasX = offsets.hasOwnProperty('x');
5423 var hasY = offsets.hasOwnProperty('y');
5424 var sideX = left;
5425 var sideY = enums_top;
5426 var win = window;
5427
5428 if (adaptive) {
5429 var offsetParent = getOffsetParent(popper);
5430 var heightProp = 'clientHeight';
5431 var widthProp = 'clientWidth';
5432
5433 if (offsetParent === getWindow(popper)) {
5434 offsetParent = getDocumentElement(popper);
5435
5436 if (dom_utils_getComputedStyle_getComputedStyle(offsetParent).position !== 'static') {
5437 heightProp = 'scrollHeight';
5438 widthProp = 'scrollWidth';
5439 }
5440 } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
5441
5442
5443 offsetParent = offsetParent;
5444
5445 if (placement === enums_top) {
5446 sideY = bottom; // $FlowFixMe[prop-missing]
5447
5448 y -= offsetParent[heightProp] - popperRect.height;
5449 y *= gpuAcceleration ? 1 : -1;
5450 }
5451
5452 if (placement === left) {
5453 sideX = right; // $FlowFixMe[prop-missing]
5454
5455 x -= offsetParent[widthProp] - popperRect.width;
5456 x *= gpuAcceleration ? 1 : -1;
5457 }
5458 }
5459
5460 var commonStyles = Object.assign({
5461 position: position
5462 }, adaptive && unsetSides);
5463
5464 if (gpuAcceleration) {
5465 var _Object$assign;
5466
5467 return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
5468 }
5469
5470 return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
5471}
5472
5473function computeStyles(_ref4) {
5474 var state = _ref4.state,
5475 options = _ref4.options;
5476 var _options$gpuAccelerat = options.gpuAcceleration,
5477 gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
5478 _options$adaptive = options.adaptive,
5479 adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
5480 _options$roundOffsets = options.roundOffsets,
5481 roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
5482
5483 if (false) { var transitionProperty; }
5484
5485 var commonStyles = {
5486 placement: getBasePlacement(state.placement),
5487 popper: state.elements.popper,
5488 popperRect: state.rects.popper,
5489 gpuAcceleration: gpuAcceleration
5490 };
5491
5492 if (state.modifiersData.popperOffsets != null) {
5493 state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
5494 offsets: state.modifiersData.popperOffsets,
5495 position: state.options.strategy,
5496 adaptive: adaptive,
5497 roundOffsets: roundOffsets
5498 })));
5499 }
5500
5501 if (state.modifiersData.arrow != null) {
5502 state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
5503 offsets: state.modifiersData.arrow,
5504 position: 'absolute',
5505 adaptive: false,
5506 roundOffsets: roundOffsets
5507 })));
5508 }
5509
5510 state.attributes.popper = Object.assign({}, state.attributes.popper, {
5511 'data-popper-placement': state.placement
5512 });
5513} // eslint-disable-next-line import/no-unused-modules
5514
5515
5516/* harmony default export */ const modifiers_computeStyles = ({
5517 name: 'computeStyles',
5518 enabled: true,
5519 phase: 'beforeWrite',
5520 fn: computeStyles,
5521 data: {}
5522});
5523;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js
5524 // eslint-disable-next-line import/no-unused-modules
5525
5526var passive = {
5527 passive: true
5528};
5529
5530function eventListeners_effect(_ref) {
5531 var state = _ref.state,
5532 instance = _ref.instance,
5533 options = _ref.options;
5534 var _options$scroll = options.scroll,
5535 scroll = _options$scroll === void 0 ? true : _options$scroll,
5536 _options$resize = options.resize,
5537 resize = _options$resize === void 0 ? true : _options$resize;
5538 var window = getWindow(state.elements.popper);
5539 var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
5540
5541 if (scroll) {
5542 scrollParents.forEach(function (scrollParent) {
5543 scrollParent.addEventListener('scroll', instance.update, passive);
5544 });
5545 }
5546
5547 if (resize) {
5548 window.addEventListener('resize', instance.update, passive);
5549 }
5550
5551 return function () {
5552 if (scroll) {
5553 scrollParents.forEach(function (scrollParent) {
5554 scrollParent.removeEventListener('scroll', instance.update, passive);
5555 });
5556 }
5557
5558 if (resize) {
5559 window.removeEventListener('resize', instance.update, passive);
5560 }
5561 };
5562} // eslint-disable-next-line import/no-unused-modules
5563
5564
5565/* harmony default export */ const eventListeners = ({
5566 name: 'eventListeners',
5567 enabled: true,
5568 phase: 'write',
5569 fn: function fn() {},
5570 effect: eventListeners_effect,
5571 data: {}
5572});
5573;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js
5574var hash = {
5575 left: 'right',
5576 right: 'left',
5577 bottom: 'top',
5578 top: 'bottom'
5579};
5580function getOppositePlacement(placement) {
5581 return placement.replace(/left|right|bottom|top/g, function (matched) {
5582 return hash[matched];
5583 });
5584}
5585;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js
5586var getOppositeVariationPlacement_hash = {
5587 start: 'end',
5588 end: 'start'
5589};
5590function getOppositeVariationPlacement(placement) {
5591 return placement.replace(/start|end/g, function (matched) {
5592 return getOppositeVariationPlacement_hash[matched];
5593 });
5594}
5595;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js
5596
5597function getWindowScroll(node) {
5598 var win = getWindow(node);
5599 var scrollLeft = win.pageXOffset;
5600 var scrollTop = win.pageYOffset;
5601 return {
5602 scrollLeft: scrollLeft,
5603 scrollTop: scrollTop
5604 };
5605}
5606;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js
5607
5608
5609
5610function getWindowScrollBarX(element) {
5611 // If <html> has a CSS width greater than the viewport, then this will be
5612 // incorrect for RTL.
5613 // Popper 1 is broken in this case and never had a bug report so let's assume
5614 // it's not an issue. I don't think anyone ever specifies width on <html>
5615 // anyway.
5616 // Browsers where the left scrollbar doesn't cause an issue report `0` for
5617 // this (e.g. Edge 2019, IE11, Safari)
5618 return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
5619}
5620;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js
5621
5622
5623
5624function getViewportRect(element) {
5625 var win = getWindow(element);
5626 var html = getDocumentElement(element);
5627 var visualViewport = win.visualViewport;
5628 var width = html.clientWidth;
5629 var height = html.clientHeight;
5630 var x = 0;
5631 var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
5632 // can be obscured underneath it.
5633 // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
5634 // if it isn't open, so if this isn't available, the popper will be detected
5635 // to overflow the bottom of the screen too early.
5636
5637 if (visualViewport) {
5638 width = visualViewport.width;
5639 height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
5640 // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
5641 // errors due to floating point numbers, so we need to check precision.
5642 // Safari returns a number <= 0, usually < -1 when pinch-zoomed
5643 // Feature detection fails in mobile emulation mode in Chrome.
5644 // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
5645 // 0.001
5646 // Fallback here: "Not Safari" userAgent
5647
5648 if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
5649 x = visualViewport.offsetLeft;
5650 y = visualViewport.offsetTop;
5651 }
5652 }
5653
5654 return {
5655 width: width,
5656 height: height,
5657 x: x + getWindowScrollBarX(element),
5658 y: y
5659 };
5660}
5661;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js
5662
5663
5664
5665
5666 // Gets the entire size of the scrollable document area, even extending outside
5667// of the `<html>` and `<body>` rect bounds if horizontally scrollable
5668
5669function getDocumentRect(element) {
5670 var _element$ownerDocumen;
5671
5672 var html = getDocumentElement(element);
5673 var winScroll = getWindowScroll(element);
5674 var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
5675 var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
5676 var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
5677 var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
5678 var y = -winScroll.scrollTop;
5679
5680 if (dom_utils_getComputedStyle_getComputedStyle(body || html).direction === 'rtl') {
5681 x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width;
5682 }
5683
5684 return {
5685 width: width,
5686 height: height,
5687 x: x,
5688 y: y
5689 };
5690}
5691;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js
5692
5693function isScrollParent(element) {
5694 // Firefox wants us to check `-x` and `-y` variations as well
5695 var _getComputedStyle = dom_utils_getComputedStyle_getComputedStyle(element),
5696 overflow = _getComputedStyle.overflow,
5697 overflowX = _getComputedStyle.overflowX,
5698 overflowY = _getComputedStyle.overflowY;
5699
5700 return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
5701}
5702;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js
5703
5704
5705
5706
5707function getScrollParent(node) {
5708 if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
5709 // $FlowFixMe[incompatible-return]: assume body is always available
5710 return node.ownerDocument.body;
5711 }
5712
5713 if (isHTMLElement(node) && isScrollParent(node)) {
5714 return node;
5715 }
5716
5717 return getScrollParent(getParentNode(node));
5718}
5719;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js
5720
5721
5722
5723
5724/*
5725given a DOM element, return the list of all scroll parents, up the list of ancesors
5726until we get to the top window object. This list is what we attach scroll listeners
5727to, because if any of these parent elements scroll, we'll need to re-calculate the
5728reference element's position.
5729*/
5730
5731function listScrollParents(element, list) {
5732 var _element$ownerDocumen;
5733
5734 if (list === void 0) {
5735 list = [];
5736 }
5737
5738 var scrollParent = getScrollParent(element);
5739 var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
5740 var win = getWindow(scrollParent);
5741 var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
5742 var updatedList = list.concat(target);
5743 return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
5744 updatedList.concat(listScrollParents(getParentNode(target)));
5745}
5746;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js
5747function rectToClientRect(rect) {
5748 return Object.assign({}, rect, {
5749 left: rect.x,
5750 top: rect.y,
5751 right: rect.x + rect.width,
5752 bottom: rect.y + rect.height
5753 });
5754}
5755;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771function getInnerBoundingClientRect(element) {
5772 var rect = getBoundingClientRect(element);
5773 rect.top = rect.top + element.clientTop;
5774 rect.left = rect.left + element.clientLeft;
5775 rect.bottom = rect.top + element.clientHeight;
5776 rect.right = rect.left + element.clientWidth;
5777 rect.width = element.clientWidth;
5778 rect.height = element.clientHeight;
5779 rect.x = rect.left;
5780 rect.y = rect.top;
5781 return rect;
5782}
5783
5784function getClientRectFromMixedType(element, clippingParent) {
5785 return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
5786} // A "clipping parent" is an overflowable container with the characteristic of
5787// clipping (or hiding) overflowing elements with a position different from
5788// `initial`
5789
5790
5791function getClippingParents(element) {
5792 var clippingParents = listScrollParents(getParentNode(element));
5793 var canEscapeClipping = ['absolute', 'fixed'].indexOf(dom_utils_getComputedStyle_getComputedStyle(element).position) >= 0;
5794 var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
5795
5796 if (!isElement(clipperElement)) {
5797 return [];
5798 } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
5799
5800
5801 return clippingParents.filter(function (clippingParent) {
5802 return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
5803 });
5804} // Gets the maximum area that the element is visible in due to any number of
5805// clipping parents
5806
5807
5808function getClippingRect(element, boundary, rootBoundary) {
5809 var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
5810 var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
5811 var firstClippingParent = clippingParents[0];
5812 var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
5813 var rect = getClientRectFromMixedType(element, clippingParent);
5814 accRect.top = math_max(rect.top, accRect.top);
5815 accRect.right = math_min(rect.right, accRect.right);
5816 accRect.bottom = math_min(rect.bottom, accRect.bottom);
5817 accRect.left = math_max(rect.left, accRect.left);
5818 return accRect;
5819 }, getClientRectFromMixedType(element, firstClippingParent));
5820 clippingRect.width = clippingRect.right - clippingRect.left;
5821 clippingRect.height = clippingRect.bottom - clippingRect.top;
5822 clippingRect.x = clippingRect.left;
5823 clippingRect.y = clippingRect.top;
5824 return clippingRect;
5825}
5826;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js
5827function getVariation(placement) {
5828 return placement.split('-')[1];
5829}
5830;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js
5831
5832
5833
5834
5835function computeOffsets(_ref) {
5836 var reference = _ref.reference,
5837 element = _ref.element,
5838 placement = _ref.placement;
5839 var basePlacement = placement ? getBasePlacement(placement) : null;
5840 var variation = placement ? getVariation(placement) : null;
5841 var commonX = reference.x + reference.width / 2 - element.width / 2;
5842 var commonY = reference.y + reference.height / 2 - element.height / 2;
5843 var offsets;
5844
5845 switch (basePlacement) {
5846 case enums_top:
5847 offsets = {
5848 x: commonX,
5849 y: reference.y - element.height
5850 };
5851 break;
5852
5853 case bottom:
5854 offsets = {
5855 x: commonX,
5856 y: reference.y + reference.height
5857 };
5858 break;
5859
5860 case right:
5861 offsets = {
5862 x: reference.x + reference.width,
5863 y: commonY
5864 };
5865 break;
5866
5867 case left:
5868 offsets = {
5869 x: reference.x - element.width,
5870 y: commonY
5871 };
5872 break;
5873
5874 default:
5875 offsets = {
5876 x: reference.x,
5877 y: reference.y
5878 };
5879 }
5880
5881 var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
5882
5883 if (mainAxis != null) {
5884 var len = mainAxis === 'y' ? 'height' : 'width';
5885
5886 switch (variation) {
5887 case start:
5888 offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
5889 break;
5890
5891 case end:
5892 offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
5893 break;
5894
5895 default:
5896 }
5897 }
5898
5899 return offsets;
5900}
5901;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js
5902
5903
5904
5905
5906
5907
5908
5909
5910 // eslint-disable-next-line import/no-unused-modules
5911
5912function detectOverflow(state, options) {
5913 if (options === void 0) {
5914 options = {};
5915 }
5916
5917 var _options = options,
5918 _options$placement = _options.placement,
5919 placement = _options$placement === void 0 ? state.placement : _options$placement,
5920 _options$boundary = _options.boundary,
5921 boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
5922 _options$rootBoundary = _options.rootBoundary,
5923 rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
5924 _options$elementConte = _options.elementContext,
5925 elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
5926 _options$altBoundary = _options.altBoundary,
5927 altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
5928 _options$padding = _options.padding,
5929 padding = _options$padding === void 0 ? 0 : _options$padding;
5930 var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
5931 var altContext = elementContext === popper ? reference : popper;
5932 var referenceElement = state.elements.reference;
5933 var popperRect = state.rects.popper;
5934 var element = state.elements[altBoundary ? altContext : elementContext];
5935 var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
5936 var referenceClientRect = getBoundingClientRect(referenceElement);
5937 var popperOffsets = computeOffsets({
5938 reference: referenceClientRect,
5939 element: popperRect,
5940 strategy: 'absolute',
5941 placement: placement
5942 });
5943 var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
5944 var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
5945 // 0 or negative = within the clipping rect
5946
5947 var overflowOffsets = {
5948 top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
5949 bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
5950 left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
5951 right: elementClientRect.right - clippingClientRect.right + paddingObject.right
5952 };
5953 var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
5954
5955 if (elementContext === popper && offsetData) {
5956 var offset = offsetData[placement];
5957 Object.keys(overflowOffsets).forEach(function (key) {
5958 var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
5959 var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
5960 overflowOffsets[key] += offset[axis] * multiply;
5961 });
5962 }
5963
5964 return overflowOffsets;
5965}
5966;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js
5967
5968
5969
5970
5971function computeAutoPlacement(state, options) {
5972 if (options === void 0) {
5973 options = {};
5974 }
5975
5976 var _options = options,
5977 placement = _options.placement,
5978 boundary = _options.boundary,
5979 rootBoundary = _options.rootBoundary,
5980 padding = _options.padding,
5981 flipVariations = _options.flipVariations,
5982 _options$allowedAutoP = _options.allowedAutoPlacements,
5983 allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP;
5984 var variation = getVariation(placement);
5985 var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
5986 return getVariation(placement) === variation;
5987 }) : basePlacements;
5988 var allowedPlacements = placements.filter(function (placement) {
5989 return allowedAutoPlacements.indexOf(placement) >= 0;
5990 });
5991
5992 if (allowedPlacements.length === 0) {
5993 allowedPlacements = placements;
5994
5995 if (false) {}
5996 } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
5997
5998
5999 var overflows = allowedPlacements.reduce(function (acc, placement) {
6000 acc[placement] = detectOverflow(state, {
6001 placement: placement,
6002 boundary: boundary,
6003 rootBoundary: rootBoundary,
6004 padding: padding
6005 })[getBasePlacement(placement)];
6006 return acc;
6007 }, {});
6008 return Object.keys(overflows).sort(function (a, b) {
6009 return overflows[a] - overflows[b];
6010 });
6011}
6012;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js
6013
6014
6015
6016
6017
6018
6019 // eslint-disable-next-line import/no-unused-modules
6020
6021function getExpandedFallbackPlacements(placement) {
6022 if (getBasePlacement(placement) === auto) {
6023 return [];
6024 }
6025
6026 var oppositePlacement = getOppositePlacement(placement);
6027 return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
6028}
6029
6030function flip(_ref) {
6031 var state = _ref.state,
6032 options = _ref.options,
6033 name = _ref.name;
6034
6035 if (state.modifiersData[name]._skip) {
6036 return;
6037 }
6038
6039 var _options$mainAxis = options.mainAxis,
6040 checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
6041 _options$altAxis = options.altAxis,
6042 checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
6043 specifiedFallbackPlacements = options.fallbackPlacements,
6044 padding = options.padding,
6045 boundary = options.boundary,
6046 rootBoundary = options.rootBoundary,
6047 altBoundary = options.altBoundary,
6048 _options$flipVariatio = options.flipVariations,
6049 flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
6050 allowedAutoPlacements = options.allowedAutoPlacements;
6051 var preferredPlacement = state.options.placement;
6052 var basePlacement = getBasePlacement(preferredPlacement);
6053 var isBasePlacement = basePlacement === preferredPlacement;
6054 var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
6055 var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
6056 return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
6057 placement: placement,
6058 boundary: boundary,
6059 rootBoundary: rootBoundary,
6060 padding: padding,
6061 flipVariations: flipVariations,
6062 allowedAutoPlacements: allowedAutoPlacements
6063 }) : placement);
6064 }, []);
6065 var referenceRect = state.rects.reference;
6066 var popperRect = state.rects.popper;
6067 var checksMap = new Map();
6068 var makeFallbackChecks = true;
6069 var firstFittingPlacement = placements[0];
6070
6071 for (var i = 0; i < placements.length; i++) {
6072 var placement = placements[i];
6073
6074 var _basePlacement = getBasePlacement(placement);
6075
6076 var isStartVariation = getVariation(placement) === start;
6077 var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0;
6078 var len = isVertical ? 'width' : 'height';
6079 var overflow = detectOverflow(state, {
6080 placement: placement,
6081 boundary: boundary,
6082 rootBoundary: rootBoundary,
6083 altBoundary: altBoundary,
6084 padding: padding
6085 });
6086 var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top;
6087
6088 if (referenceRect[len] > popperRect[len]) {
6089 mainVariationSide = getOppositePlacement(mainVariationSide);
6090 }
6091
6092 var altVariationSide = getOppositePlacement(mainVariationSide);
6093 var checks = [];
6094
6095 if (checkMainAxis) {
6096 checks.push(overflow[_basePlacement] <= 0);
6097 }
6098
6099 if (checkAltAxis) {
6100 checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
6101 }
6102
6103 if (checks.every(function (check) {
6104 return check;
6105 })) {
6106 firstFittingPlacement = placement;
6107 makeFallbackChecks = false;
6108 break;
6109 }
6110
6111 checksMap.set(placement, checks);
6112 }
6113
6114 if (makeFallbackChecks) {
6115 // `2` may be desired in some cases – research later
6116 var numberOfChecks = flipVariations ? 3 : 1;
6117
6118 var _loop = function _loop(_i) {
6119 var fittingPlacement = placements.find(function (placement) {
6120 var checks = checksMap.get(placement);
6121
6122 if (checks) {
6123 return checks.slice(0, _i).every(function (check) {
6124 return check;
6125 });
6126 }
6127 });
6128
6129 if (fittingPlacement) {
6130 firstFittingPlacement = fittingPlacement;
6131 return "break";
6132 }
6133 };
6134
6135 for (var _i = numberOfChecks; _i > 0; _i--) {
6136 var _ret = _loop(_i);
6137
6138 if (_ret === "break") break;
6139 }
6140 }
6141
6142 if (state.placement !== firstFittingPlacement) {
6143 state.modifiersData[name]._skip = true;
6144 state.placement = firstFittingPlacement;
6145 state.reset = true;
6146 }
6147} // eslint-disable-next-line import/no-unused-modules
6148
6149
6150/* harmony default export */ const modifiers_flip = ({
6151 name: 'flip',
6152 enabled: true,
6153 phase: 'main',
6154 fn: flip,
6155 requiresIfExists: ['offset'],
6156 data: {
6157 _skip: false
6158 }
6159});
6160;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js
6161
6162
6163
6164function getSideOffsets(overflow, rect, preventedOffsets) {
6165 if (preventedOffsets === void 0) {
6166 preventedOffsets = {
6167 x: 0,
6168 y: 0
6169 };
6170 }
6171
6172 return {
6173 top: overflow.top - rect.height - preventedOffsets.y,
6174 right: overflow.right - rect.width + preventedOffsets.x,
6175 bottom: overflow.bottom - rect.height + preventedOffsets.y,
6176 left: overflow.left - rect.width - preventedOffsets.x
6177 };
6178}
6179
6180function isAnySideFullyClipped(overflow) {
6181 return [enums_top, right, bottom, left].some(function (side) {
6182 return overflow[side] >= 0;
6183 });
6184}
6185
6186function hide(_ref) {
6187 var state = _ref.state,
6188 name = _ref.name;
6189 var referenceRect = state.rects.reference;
6190 var popperRect = state.rects.popper;
6191 var preventedOffsets = state.modifiersData.preventOverflow;
6192 var referenceOverflow = detectOverflow(state, {
6193 elementContext: 'reference'
6194 });
6195 var popperAltOverflow = detectOverflow(state, {
6196 altBoundary: true
6197 });
6198 var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
6199 var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
6200 var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
6201 var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
6202 state.modifiersData[name] = {
6203 referenceClippingOffsets: referenceClippingOffsets,
6204 popperEscapeOffsets: popperEscapeOffsets,
6205 isReferenceHidden: isReferenceHidden,
6206 hasPopperEscaped: hasPopperEscaped
6207 };
6208 state.attributes.popper = Object.assign({}, state.attributes.popper, {
6209 'data-popper-reference-hidden': isReferenceHidden,
6210 'data-popper-escaped': hasPopperEscaped
6211 });
6212} // eslint-disable-next-line import/no-unused-modules
6213
6214
6215/* harmony default export */ const modifiers_hide = ({
6216 name: 'hide',
6217 enabled: true,
6218 phase: 'main',
6219 requiresIfExists: ['preventOverflow'],
6220 fn: hide
6221});
6222;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js
6223
6224
6225function distanceAndSkiddingToXY(placement, rects, offset) {
6226 var basePlacement = getBasePlacement(placement);
6227 var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1;
6228
6229 var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
6230 placement: placement
6231 })) : offset,
6232 skidding = _ref[0],
6233 distance = _ref[1];
6234
6235 skidding = skidding || 0;
6236 distance = (distance || 0) * invertDistance;
6237 return [left, right].indexOf(basePlacement) >= 0 ? {
6238 x: distance,
6239 y: skidding
6240 } : {
6241 x: skidding,
6242 y: distance
6243 };
6244}
6245
6246function offset(_ref2) {
6247 var state = _ref2.state,
6248 options = _ref2.options,
6249 name = _ref2.name;
6250 var _options$offset = options.offset,
6251 offset = _options$offset === void 0 ? [0, 0] : _options$offset;
6252 var data = enums_placements.reduce(function (acc, placement) {
6253 acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
6254 return acc;
6255 }, {});
6256 var _data$state$placement = data[state.placement],
6257 x = _data$state$placement.x,
6258 y = _data$state$placement.y;
6259
6260 if (state.modifiersData.popperOffsets != null) {
6261 state.modifiersData.popperOffsets.x += x;
6262 state.modifiersData.popperOffsets.y += y;
6263 }
6264
6265 state.modifiersData[name] = data;
6266} // eslint-disable-next-line import/no-unused-modules
6267
6268
6269/* harmony default export */ const modifiers_offset = ({
6270 name: 'offset',
6271 enabled: true,
6272 phase: 'main',
6273 requires: ['popperOffsets'],
6274 fn: offset
6275});
6276;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js
6277
6278
6279function popperOffsets(_ref) {
6280 var state = _ref.state,
6281 name = _ref.name; // Offsets are the actual position the popper needs to have to be
6282 // properly positioned near its reference element
6283 // This is the most basic placement, and will be adjusted by
6284 // the modifiers in the next step
6285
6286 state.modifiersData[name] = computeOffsets({
6287 reference: state.rects.reference,
6288 element: state.rects.popper,
6289 strategy: 'absolute',
6290 placement: state.placement
6291 });
6292} // eslint-disable-next-line import/no-unused-modules
6293
6294
6295/* harmony default export */ const modifiers_popperOffsets = ({
6296 name: 'popperOffsets',
6297 enabled: true,
6298 phase: 'read',
6299 fn: popperOffsets,
6300 data: {}
6301});
6302;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js
6303function getAltAxis(axis) {
6304 return axis === 'x' ? 'y' : 'x';
6305}
6306;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319function preventOverflow(_ref) {
6320 var state = _ref.state,
6321 options = _ref.options,
6322 name = _ref.name;
6323 var _options$mainAxis = options.mainAxis,
6324 checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
6325 _options$altAxis = options.altAxis,
6326 checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
6327 boundary = options.boundary,
6328 rootBoundary = options.rootBoundary,
6329 altBoundary = options.altBoundary,
6330 padding = options.padding,
6331 _options$tether = options.tether,
6332 tether = _options$tether === void 0 ? true : _options$tether,
6333 _options$tetherOffset = options.tetherOffset,
6334 tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
6335 var overflow = detectOverflow(state, {
6336 boundary: boundary,
6337 rootBoundary: rootBoundary,
6338 padding: padding,
6339 altBoundary: altBoundary
6340 });
6341 var basePlacement = getBasePlacement(state.placement);
6342 var variation = getVariation(state.placement);
6343 var isBasePlacement = !variation;
6344 var mainAxis = getMainAxisFromPlacement(basePlacement);
6345 var altAxis = getAltAxis(mainAxis);
6346 var popperOffsets = state.modifiersData.popperOffsets;
6347 var referenceRect = state.rects.reference;
6348 var popperRect = state.rects.popper;
6349 var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
6350 placement: state.placement
6351 })) : tetherOffset;
6352 var data = {
6353 x: 0,
6354 y: 0
6355 };
6356
6357 if (!popperOffsets) {
6358 return;
6359 }
6360
6361 if (checkMainAxis || checkAltAxis) {
6362 var mainSide = mainAxis === 'y' ? enums_top : left;
6363 var altSide = mainAxis === 'y' ? bottom : right;
6364 var len = mainAxis === 'y' ? 'height' : 'width';
6365 var offset = popperOffsets[mainAxis];
6366 var min = popperOffsets[mainAxis] + overflow[mainSide];
6367 var max = popperOffsets[mainAxis] - overflow[altSide];
6368 var additive = tether ? -popperRect[len] / 2 : 0;
6369 var minLen = variation === start ? referenceRect[len] : popperRect[len];
6370 var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
6371 // outside the reference bounds
6372
6373 var arrowElement = state.elements.arrow;
6374 var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
6375 width: 0,
6376 height: 0
6377 };
6378 var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
6379 var arrowPaddingMin = arrowPaddingObject[mainSide];
6380 var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
6381 // to include its full size in the calculation. If the reference is small
6382 // and near the edge of a boundary, the popper can overflow even if the
6383 // reference is not overflowing as well (e.g. virtual elements with no
6384 // width or height)
6385
6386 var arrowLen = within(0, referenceRect[len], arrowRect[len]);
6387 var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
6388 var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
6389 var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
6390 var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
6391 var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
6392 var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
6393 var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
6394
6395 if (checkMainAxis) {
6396 var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max);
6397 popperOffsets[mainAxis] = preventedOffset;
6398 data[mainAxis] = preventedOffset - offset;
6399 }
6400
6401 if (checkAltAxis) {
6402 var _mainSide = mainAxis === 'x' ? enums_top : left;
6403
6404 var _altSide = mainAxis === 'x' ? bottom : right;
6405
6406 var _offset = popperOffsets[altAxis];
6407
6408 var _min = _offset + overflow[_mainSide];
6409
6410 var _max = _offset - overflow[_altSide];
6411
6412 var _preventedOffset = within(tether ? math_min(_min, tetherMin) : _min, _offset, tether ? math_max(_max, tetherMax) : _max);
6413
6414 popperOffsets[altAxis] = _preventedOffset;
6415 data[altAxis] = _preventedOffset - _offset;
6416 }
6417 }
6418
6419 state.modifiersData[name] = data;
6420} // eslint-disable-next-line import/no-unused-modules
6421
6422
6423/* harmony default export */ const modifiers_preventOverflow = ({
6424 name: 'preventOverflow',
6425 enabled: true,
6426 phase: 'main',
6427 fn: preventOverflow,
6428 requiresIfExists: ['offset']
6429});
6430;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js
6431function getHTMLElementScroll(element) {
6432 return {
6433 scrollLeft: element.scrollLeft,
6434 scrollTop: element.scrollTop
6435 };
6436}
6437;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js
6438
6439
6440
6441
6442function getNodeScroll(node) {
6443 if (node === getWindow(node) || !isHTMLElement(node)) {
6444 return getWindowScroll(node);
6445 } else {
6446 return getHTMLElementScroll(node);
6447 }
6448}
6449;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js
6450
6451
6452
6453
6454
6455
6456 // Returns the composite rect of an element relative to its offsetParent.
6457// Composite means it takes into account transforms as well as layout.
6458
6459function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
6460 if (isFixed === void 0) {
6461 isFixed = false;
6462 }
6463
6464 var documentElement = getDocumentElement(offsetParent);
6465 var rect = getBoundingClientRect(elementOrVirtualElement);
6466 var isOffsetParentAnElement = isHTMLElement(offsetParent);
6467 var scroll = {
6468 scrollLeft: 0,
6469 scrollTop: 0
6470 };
6471 var offsets = {
6472 x: 0,
6473 y: 0
6474 };
6475
6476 if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
6477 if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
6478 isScrollParent(documentElement)) {
6479 scroll = getNodeScroll(offsetParent);
6480 }
6481
6482 if (isHTMLElement(offsetParent)) {
6483 offsets = getBoundingClientRect(offsetParent);
6484 offsets.x += offsetParent.clientLeft;
6485 offsets.y += offsetParent.clientTop;
6486 } else if (documentElement) {
6487 offsets.x = getWindowScrollBarX(documentElement);
6488 }
6489 }
6490
6491 return {
6492 x: rect.left + scroll.scrollLeft - offsets.x,
6493 y: rect.top + scroll.scrollTop - offsets.y,
6494 width: rect.width,
6495 height: rect.height
6496 };
6497}
6498;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js
6499 // source: https://stackoverflow.com/questions/49875255
6500
6501function order(modifiers) {
6502 var map = new Map();
6503 var visited = new Set();
6504 var result = [];
6505 modifiers.forEach(function (modifier) {
6506 map.set(modifier.name, modifier);
6507 }); // On visiting object, check for its dependencies and visit them recursively
6508
6509 function sort(modifier) {
6510 visited.add(modifier.name);
6511 var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
6512 requires.forEach(function (dep) {
6513 if (!visited.has(dep)) {
6514 var depModifier = map.get(dep);
6515
6516 if (depModifier) {
6517 sort(depModifier);
6518 }
6519 }
6520 });
6521 result.push(modifier);
6522 }
6523
6524 modifiers.forEach(function (modifier) {
6525 if (!visited.has(modifier.name)) {
6526 // check for visited object
6527 sort(modifier);
6528 }
6529 });
6530 return result;
6531}
6532
6533function orderModifiers(modifiers) {
6534 // order based on dependencies
6535 var orderedModifiers = order(modifiers); // order based on phase
6536
6537 return modifierPhases.reduce(function (acc, phase) {
6538 return acc.concat(orderedModifiers.filter(function (modifier) {
6539 return modifier.phase === phase;
6540 }));
6541 }, []);
6542}
6543;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js
6544function debounce(fn) {
6545 var pending;
6546 return function () {
6547 if (!pending) {
6548 pending = new Promise(function (resolve) {
6549 Promise.resolve().then(function () {
6550 pending = undefined;
6551 resolve(fn());
6552 });
6553 });
6554 }
6555
6556 return pending;
6557 };
6558}
6559;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js
6560function mergeByName(modifiers) {
6561 var merged = modifiers.reduce(function (merged, current) {
6562 var existing = merged[current.name];
6563 merged[current.name] = existing ? Object.assign({}, existing, current, {
6564 options: Object.assign({}, existing.options, current.options),
6565 data: Object.assign({}, existing.data, current.data)
6566 }) : current;
6567 return merged;
6568 }, {}); // IE11 does not support Object.values
6569
6570 return Object.keys(merged).map(function (key) {
6571 return merged[key];
6572 });
6573}
6574;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
6590var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
6591var DEFAULT_OPTIONS = {
6592 placement: 'bottom',
6593 modifiers: [],
6594 strategy: 'absolute'
6595};
6596
6597function areValidElements() {
6598 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6599 args[_key] = arguments[_key];
6600 }
6601
6602 return !args.some(function (element) {
6603 return !(element && typeof element.getBoundingClientRect === 'function');
6604 });
6605}
6606
6607function popperGenerator(generatorOptions) {
6608 if (generatorOptions === void 0) {
6609 generatorOptions = {};
6610 }
6611
6612 var _generatorOptions = generatorOptions,
6613 _generatorOptions$def = _generatorOptions.defaultModifiers,
6614 defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
6615 _generatorOptions$def2 = _generatorOptions.defaultOptions,
6616 defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
6617 return function createPopper(reference, popper, options) {
6618 if (options === void 0) {
6619 options = defaultOptions;
6620 }
6621
6622 var state = {
6623 placement: 'bottom',
6624 orderedModifiers: [],
6625 options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
6626 modifiersData: {},
6627 elements: {
6628 reference: reference,
6629 popper: popper
6630 },
6631 attributes: {},
6632 styles: {}
6633 };
6634 var effectCleanupFns = [];
6635 var isDestroyed = false;
6636 var instance = {
6637 state: state,
6638 setOptions: function setOptions(options) {
6639 cleanupModifierEffects();
6640 state.options = Object.assign({}, defaultOptions, state.options, options);
6641 state.scrollParents = {
6642 reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
6643 popper: listScrollParents(popper)
6644 }; // Orders the modifiers based on their dependencies and `phase`
6645 // properties
6646
6647 var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
6648
6649 state.orderedModifiers = orderedModifiers.filter(function (m) {
6650 return m.enabled;
6651 }); // Validate the provided modifiers so that the consumer will get warned
6652 // if one of the modifiers is invalid for any reason
6653
6654 if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; }
6655
6656 runModifierEffects();
6657 return instance.update();
6658 },
6659 // Sync update – it will always be executed, even if not necessary. This
6660 // is useful for low frequency updates where sync behavior simplifies the
6661 // logic.
6662 // For high frequency updates (e.g. `resize` and `scroll` events), always
6663 // prefer the async Popper#update method
6664 forceUpdate: function forceUpdate() {
6665 if (isDestroyed) {
6666 return;
6667 }
6668
6669 var _state$elements = state.elements,
6670 reference = _state$elements.reference,
6671 popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
6672 // anymore
6673
6674 if (!areValidElements(reference, popper)) {
6675 if (false) {}
6676
6677 return;
6678 } // Store the reference and popper rects to be read by modifiers
6679
6680
6681 state.rects = {
6682 reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
6683 popper: getLayoutRect(popper)
6684 }; // Modifiers have the ability to reset the current update cycle. The
6685 // most common use case for this is the `flip` modifier changing the
6686 // placement, which then needs to re-run all the modifiers, because the
6687 // logic was previously ran for the previous placement and is therefore
6688 // stale/incorrect
6689
6690 state.reset = false;
6691 state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
6692 // is filled with the initial data specified by the modifier. This means
6693 // it doesn't persist and is fresh on each update.
6694 // To ensure persistent data, use `${name}#persistent`
6695
6696 state.orderedModifiers.forEach(function (modifier) {
6697 return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
6698 });
6699 var __debug_loops__ = 0;
6700
6701 for (var index = 0; index < state.orderedModifiers.length; index++) {
6702 if (false) {}
6703
6704 if (state.reset === true) {
6705 state.reset = false;
6706 index = -1;
6707 continue;
6708 }
6709
6710 var _state$orderedModifie = state.orderedModifiers[index],
6711 fn = _state$orderedModifie.fn,
6712 _state$orderedModifie2 = _state$orderedModifie.options,
6713 _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
6714 name = _state$orderedModifie.name;
6715
6716 if (typeof fn === 'function') {
6717 state = fn({
6718 state: state,
6719 options: _options,
6720 name: name,
6721 instance: instance
6722 }) || state;
6723 }
6724 }
6725 },
6726 // Async and optimistically optimized update – it will not be executed if
6727 // not necessary (debounced to run at most once-per-tick)
6728 update: debounce(function () {
6729 return new Promise(function (resolve) {
6730 instance.forceUpdate();
6731 resolve(state);
6732 });
6733 }),
6734 destroy: function destroy() {
6735 cleanupModifierEffects();
6736 isDestroyed = true;
6737 }
6738 };
6739
6740 if (!areValidElements(reference, popper)) {
6741 if (false) {}
6742
6743 return instance;
6744 }
6745
6746 instance.setOptions(options).then(function (state) {
6747 if (!isDestroyed && options.onFirstUpdate) {
6748 options.onFirstUpdate(state);
6749 }
6750 }); // Modifiers have the ability to execute arbitrary code before the first
6751 // update cycle runs. They will be executed in the same order as the update
6752 // cycle. This is useful when a modifier adds some persistent data that
6753 // other modifiers need to use, but the modifier is run after the dependent
6754 // one.
6755
6756 function runModifierEffects() {
6757 state.orderedModifiers.forEach(function (_ref3) {
6758 var name = _ref3.name,
6759 _ref3$options = _ref3.options,
6760 options = _ref3$options === void 0 ? {} : _ref3$options,
6761 effect = _ref3.effect;
6762
6763 if (typeof effect === 'function') {
6764 var cleanupFn = effect({
6765 state: state,
6766 name: name,
6767 instance: instance,
6768 options: options
6769 });
6770
6771 var noopFn = function noopFn() {};
6772
6773 effectCleanupFns.push(cleanupFn || noopFn);
6774 }
6775 });
6776 }
6777
6778 function cleanupModifierEffects() {
6779 effectCleanupFns.forEach(function (fn) {
6780 return fn();
6781 });
6782 effectCleanupFns = [];
6783 }
6784
6785 return instance;
6786 };
6787}
6788var createPopper = /*#__PURE__*/(/* unused pure expression or super */ null && (popperGenerator())); // eslint-disable-next-line import/no-unused-modules
6789
6790
6791;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/popper.js
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801 // For the common JS build we will turn this file into a bundle with no imports.
6802// This is b/c the Popper lib is all esm files, and would break in a common js only environment
6803
6804var popper_createPopper = popperGenerator({
6805 defaultModifiers: [modifiers_hide, modifiers_popperOffsets, modifiers_computeStyles, eventListeners, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow]
6806});
6807
6808;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/usePopper.js
6809
6810
6811
6812
6813
6814
6815var initialPopperStyles = function initialPopperStyles(position) {
6816 return {
6817 position: position,
6818 top: '0',
6819 left: '0',
6820 opacity: '0',
6821 pointerEvents: 'none'
6822 };
6823};
6824
6825var disabledApplyStylesModifier = {
6826 name: 'applyStyles',
6827 enabled: false
6828}; // until docjs supports type exports...
6829
6830var ariaDescribedByModifier = {
6831 name: 'ariaDescribedBy',
6832 enabled: true,
6833 phase: 'afterWrite',
6834 effect: function effect(_ref) {
6835 var state = _ref.state;
6836 return function () {
6837 var _state$elements = state.elements,
6838 reference = _state$elements.reference,
6839 popper = _state$elements.popper;
6840
6841 if ('removeAttribute' in reference) {
6842 var ids = (reference.getAttribute('aria-describedby') || '').split(',').filter(function (id) {
6843 return id.trim() !== popper.id;
6844 });
6845 if (!ids.length) reference.removeAttribute('aria-describedby');else reference.setAttribute('aria-describedby', ids.join(','));
6846 }
6847 };
6848 },
6849 fn: function fn(_ref2) {
6850 var _popper$getAttribute;
6851
6852 var state = _ref2.state;
6853 var _state$elements2 = state.elements,
6854 popper = _state$elements2.popper,
6855 reference = _state$elements2.reference;
6856 var role = (_popper$getAttribute = popper.getAttribute('role')) == null ? void 0 : _popper$getAttribute.toLowerCase();
6857
6858 if (popper.id && role === 'tooltip' && 'setAttribute' in reference) {
6859 var ids = reference.getAttribute('aria-describedby');
6860
6861 if (ids && ids.split(',').indexOf(popper.id) !== -1) {
6862 return;
6863 }
6864
6865 reference.setAttribute('aria-describedby', ids ? ids + "," + popper.id : popper.id);
6866 }
6867 }
6868};
6869var EMPTY_MODIFIERS = [];
6870/**
6871 * Position an element relative some reference element using Popper.js
6872 *
6873 * @param referenceElement
6874 * @param popperElement
6875 * @param {object} options
6876 * @param {object=} options.modifiers Popper.js modifiers
6877 * @param {boolean=} options.enabled toggle the popper functionality on/off
6878 * @param {string=} options.placement The popper element placement relative to the reference element
6879 * @param {string=} options.strategy the positioning strategy
6880 * @param {boolean=} options.eventsEnabled have Popper listen on window resize events to reposition the element
6881 * @param {function=} options.onCreate called when the popper is created
6882 * @param {function=} options.onUpdate called when the popper is updated
6883 *
6884 * @returns {UsePopperState} The popper state
6885 */
6886
6887function usePopper(referenceElement, popperElement, _temp) {
6888 var _ref3 = _temp === void 0 ? {} : _temp,
6889 _ref3$enabled = _ref3.enabled,
6890 enabled = _ref3$enabled === void 0 ? true : _ref3$enabled,
6891 _ref3$placement = _ref3.placement,
6892 placement = _ref3$placement === void 0 ? 'bottom' : _ref3$placement,
6893 _ref3$strategy = _ref3.strategy,
6894 strategy = _ref3$strategy === void 0 ? 'absolute' : _ref3$strategy,
6895 _ref3$modifiers = _ref3.modifiers,
6896 modifiers = _ref3$modifiers === void 0 ? EMPTY_MODIFIERS : _ref3$modifiers,
6897 config = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref3, ["enabled", "placement", "strategy", "modifiers"]);
6898
6899 var popperInstanceRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
6900 var update = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
6901 var _popperInstanceRef$cu;
6902
6903 (_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update();
6904 }, []);
6905 var forceUpdate = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
6906 var _popperInstanceRef$cu2;
6907
6908 (_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate();
6909 }, []);
6910
6911 var _useSafeState = esm_useSafeState((0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
6912 placement: placement,
6913 update: update,
6914 forceUpdate: forceUpdate,
6915 attributes: {},
6916 styles: {
6917 popper: initialPopperStyles(strategy),
6918 arrow: {}
6919 }
6920 })),
6921 popperState = _useSafeState[0],
6922 setState = _useSafeState[1];
6923
6924 var updateModifier = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
6925 return {
6926 name: 'updateStateModifier',
6927 enabled: true,
6928 phase: 'write',
6929 requires: ['computeStyles'],
6930 fn: function fn(_ref4) {
6931 var state = _ref4.state;
6932 var styles = {};
6933 var attributes = {};
6934 Object.keys(state.elements).forEach(function (element) {
6935 styles[element] = state.styles[element];
6936 attributes[element] = state.attributes[element];
6937 });
6938 setState({
6939 state: state,
6940 styles: styles,
6941 attributes: attributes,
6942 update: update,
6943 forceUpdate: forceUpdate,
6944 placement: state.placement
6945 });
6946 }
6947 };
6948 }, [update, forceUpdate, setState]);
6949 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
6950 if (!popperInstanceRef.current || !enabled) return;
6951 popperInstanceRef.current.setOptions({
6952 placement: placement,
6953 strategy: strategy,
6954 modifiers: [].concat(modifiers, [updateModifier, disabledApplyStylesModifier])
6955 }); // intentionally NOT re-running on new modifiers
6956 // eslint-disable-next-line react-hooks/exhaustive-deps
6957 }, [strategy, placement, updateModifier, enabled]);
6958 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
6959 if (!enabled || referenceElement == null || popperElement == null) {
6960 return undefined;
6961 }
6962
6963 popperInstanceRef.current = popper_createPopper(referenceElement, popperElement, extends_extends({}, config, {
6964 placement: placement,
6965 strategy: strategy,
6966 modifiers: [].concat(modifiers, [ariaDescribedByModifier, updateModifier])
6967 }));
6968 return function () {
6969 if (popperInstanceRef.current != null) {
6970 popperInstanceRef.current.destroy();
6971 popperInstanceRef.current = undefined;
6972 setState(function (s) {
6973 return extends_extends({}, s, {
6974 attributes: {},
6975 styles: {
6976 popper: initialPopperStyles(strategy)
6977 }
6978 });
6979 });
6980 }
6981 }; // This is only run once to _create_ the popper
6982 // eslint-disable-next-line react-hooks/exhaustive-deps
6983 }, [enabled, referenceElement, popperElement]);
6984 return popperState;
6985}
6986
6987/* harmony default export */ const esm_usePopper = (usePopper);
6988;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/contains.js
6989/* eslint-disable no-bitwise, no-cond-assign */
6990
6991/**
6992 * Checks if an element contains another given element.
6993 *
6994 * @param context the context element
6995 * @param node the element to check
6996 */
6997function contains_contains(context, node) {
6998 // HTML DOM and SVG DOM may have different support levels,
6999 // so we need to check on context instead of a document root element.
7000 if (context.contains) return context.contains(node);
7001 if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);
7002}
7003// EXTERNAL MODULE: ./node_modules/warning/warning.js
7004var warning = __webpack_require__(459);
7005var warning_default = /*#__PURE__*/__webpack_require__.n(warning);
7006;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/safeFindDOMNode.js
7007
7008function safeFindDOMNode(componentOrElement) {
7009 if (componentOrElement && 'setState' in componentOrElement) {
7010 return external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(componentOrElement);
7011 }
7012
7013 return componentOrElement != null ? componentOrElement : null;
7014}
7015;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/ownerDocument.js
7016
7017
7018/* harmony default export */ const esm_ownerDocument = (function (componentOrElement) {
7019 return ownerDocument(safeFindDOMNode(componentOrElement));
7020});
7021;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/useRootClose.js
7022
7023
7024
7025
7026
7027
7028var escapeKeyCode = 27;
7029
7030var useRootClose_noop = function noop() {};
7031
7032function isLeftClickEvent(event) {
7033 return event.button === 0;
7034}
7035
7036function isModifiedEvent(event) {
7037 return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
7038}
7039
7040var getRefTarget = function getRefTarget(ref) {
7041 return ref && ('current' in ref ? ref.current : ref);
7042};
7043/**
7044 * The `useRootClose` hook registers your callback on the document
7045 * when rendered. Powers the `<Overlay/>` component. This is used achieve modal
7046 * style behavior where your callback is triggered when the user tries to
7047 * interact with the rest of the document or hits the `esc` key.
7048 *
7049 * @param {Ref<HTMLElement>| HTMLElement} ref The element boundary
7050 * @param {function} onRootClose
7051 * @param {object=} options
7052 * @param {boolean=} options.disabled
7053 * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on
7054 */
7055
7056
7057function useRootClose(ref, onRootClose, _temp) {
7058 var _ref = _temp === void 0 ? {} : _temp,
7059 disabled = _ref.disabled,
7060 _ref$clickTrigger = _ref.clickTrigger,
7061 clickTrigger = _ref$clickTrigger === void 0 ? 'click' : _ref$clickTrigger;
7062
7063 var preventMouseRootCloseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7064 var onClose = onRootClose || useRootClose_noop;
7065 var handleMouseCapture = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
7066 var currentTarget = getRefTarget(ref);
7067 warning_default()(!!currentTarget, 'RootClose captured a close event but does not have a ref to compare it to. ' + 'useRootClose(), should be passed a ref that resolves to a DOM node');
7068 preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target);
7069 }, [ref]);
7070 var handleMouse = useEventCallback(function (e) {
7071 if (!preventMouseRootCloseRef.current) {
7072 onClose(e);
7073 }
7074 });
7075 var handleKeyUp = useEventCallback(function (e) {
7076 if (e.keyCode === escapeKeyCode) {
7077 onClose(e);
7078 }
7079 });
7080 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
7081 if (disabled || ref == null) return undefined; // Store the current event to avoid triggering handlers immediately
7082 // https://github.com/facebook/react/issues/20074
7083
7084 var currentEvent = window.event;
7085 var doc = esm_ownerDocument(getRefTarget(ref)); // Use capture for this listener so it fires before React's listener, to
7086 // avoid false positives in the contains() check below if the target DOM
7087 // element is removed in the React mouse callback.
7088
7089 var removeMouseCaptureListener = esm_listen(doc, clickTrigger, handleMouseCapture, true);
7090 var removeMouseListener = esm_listen(doc, clickTrigger, function (e) {
7091 // skip if this event is the same as the one running when we added the handlers
7092 if (e === currentEvent) {
7093 currentEvent = undefined;
7094 return;
7095 }
7096
7097 handleMouse(e);
7098 });
7099 var removeKeyupListener = esm_listen(doc, 'keyup', function (e) {
7100 // skip if this event is the same as the one running when we added the handlers
7101 if (e === currentEvent) {
7102 currentEvent = undefined;
7103 return;
7104 }
7105
7106 handleKeyUp(e);
7107 });
7108 var mobileSafariHackListeners = [];
7109
7110 if ('ontouchstart' in doc.documentElement) {
7111 mobileSafariHackListeners = [].slice.call(doc.body.children).map(function (el) {
7112 return esm_listen(el, 'mousemove', useRootClose_noop);
7113 });
7114 }
7115
7116 return function () {
7117 removeMouseCaptureListener();
7118 removeMouseListener();
7119 removeKeyupListener();
7120 mobileSafariHackListeners.forEach(function (remove) {
7121 return remove();
7122 });
7123 };
7124 }, [ref, disabled, clickTrigger, handleMouseCapture, handleMouse, handleKeyUp]);
7125}
7126
7127/* harmony default export */ const esm_useRootClose = (useRootClose);
7128;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/mergeOptionsWithPopperConfig.js
7129
7130function toModifierMap(modifiers) {
7131 var result = {};
7132
7133 if (!Array.isArray(modifiers)) {
7134 return modifiers || result;
7135 } // eslint-disable-next-line no-unused-expressions
7136
7137
7138 modifiers == null ? void 0 : modifiers.forEach(function (m) {
7139 result[m.name] = m;
7140 });
7141 return result;
7142}
7143function toModifierArray(map) {
7144 if (map === void 0) {
7145 map = {};
7146 }
7147
7148 if (Array.isArray(map)) return map;
7149 return Object.keys(map).map(function (k) {
7150 map[k].name = k;
7151 return map[k];
7152 });
7153}
7154function mergeOptionsWithPopperConfig(_ref) {
7155 var _modifiers$preventOve, _modifiers$preventOve2, _modifiers$offset, _modifiers$arrow;
7156
7157 var enabled = _ref.enabled,
7158 enableEvents = _ref.enableEvents,
7159 placement = _ref.placement,
7160 flip = _ref.flip,
7161 offset = _ref.offset,
7162 fixed = _ref.fixed,
7163 containerPadding = _ref.containerPadding,
7164 arrowElement = _ref.arrowElement,
7165 _ref$popperConfig = _ref.popperConfig,
7166 popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig;
7167 var modifiers = toModifierMap(popperConfig.modifiers);
7168 return extends_extends({}, popperConfig, {
7169 placement: placement,
7170 enabled: enabled,
7171 strategy: fixed ? 'fixed' : popperConfig.strategy,
7172 modifiers: toModifierArray(extends_extends({}, modifiers, {
7173 eventListeners: {
7174 enabled: enableEvents
7175 },
7176 preventOverflow: extends_extends({}, modifiers.preventOverflow, {
7177 options: containerPadding ? extends_extends({
7178 padding: containerPadding
7179 }, (_modifiers$preventOve = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve.options) : (_modifiers$preventOve2 = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve2.options
7180 }),
7181 offset: {
7182 options: extends_extends({
7183 offset: offset
7184 }, (_modifiers$offset = modifiers.offset) == null ? void 0 : _modifiers$offset.options)
7185 },
7186 arrow: extends_extends({}, modifiers.arrow, {
7187 enabled: !!arrowElement,
7188 options: extends_extends({}, (_modifiers$arrow = modifiers.arrow) == null ? void 0 : _modifiers$arrow.options, {
7189 element: arrowElement
7190 })
7191 }),
7192 flip: extends_extends({
7193 enabled: !!flip
7194 }, modifiers.flip)
7195 }))
7196 });
7197}
7198;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/DropdownMenu.js
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209var DropdownMenu_noop = function noop() {};
7210/**
7211 * @memberOf Dropdown
7212 * @param {object} options
7213 * @param {boolean} options.flip Automatically adjust the menu `drop` position based on viewport edge detection
7214 * @param {[number, number]} options.offset Define an offset distance between the Menu and the Toggle
7215 * @param {boolean} options.show Display the menu manually, ignored in the context of a `Dropdown`
7216 * @param {boolean} options.usePopper opt in/out of using PopperJS to position menus. When disabled you must position it yourself.
7217 * @param {string} options.rootCloseEvent The pointer event to listen for when determining "clicks outside" the menu for triggering a close.
7218 * @param {object} options.popperConfig Options passed to the [`usePopper`](/api/usePopper) hook.
7219 */
7220
7221
7222function useDropdownMenu(options) {
7223 if (options === void 0) {
7224 options = {};
7225 }
7226
7227 var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext);
7228
7229 var _useCallbackRef = useCallbackRef(),
7230 arrowElement = _useCallbackRef[0],
7231 attachArrowRef = _useCallbackRef[1];
7232
7233 var hasShownRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7234 var _options = options,
7235 flip = _options.flip,
7236 offset = _options.offset,
7237 rootCloseEvent = _options.rootCloseEvent,
7238 _options$fixed = _options.fixed,
7239 fixed = _options$fixed === void 0 ? false : _options$fixed,
7240 _options$popperConfig = _options.popperConfig,
7241 popperConfig = _options$popperConfig === void 0 ? {} : _options$popperConfig,
7242 _options$usePopper = _options.usePopper,
7243 shouldUsePopper = _options$usePopper === void 0 ? !!context : _options$usePopper;
7244 var show = (context == null ? void 0 : context.show) == null ? !!options.show : context.show;
7245 var alignEnd = (context == null ? void 0 : context.alignEnd) == null ? options.alignEnd : context.alignEnd;
7246
7247 if (show && !hasShownRef.current) {
7248 hasShownRef.current = true;
7249 }
7250
7251 var handleClose = function handleClose(e) {
7252 context == null ? void 0 : context.toggle(false, e);
7253 };
7254
7255 var _ref = context || {},
7256 drop = _ref.drop,
7257 setMenu = _ref.setMenu,
7258 menuElement = _ref.menuElement,
7259 toggleElement = _ref.toggleElement;
7260
7261 var placement = alignEnd ? 'bottom-end' : 'bottom-start';
7262 if (drop === 'up') placement = alignEnd ? 'top-end' : 'top-start';else if (drop === 'right') placement = alignEnd ? 'right-end' : 'right-start';else if (drop === 'left') placement = alignEnd ? 'left-end' : 'left-start';
7263 var popper = esm_usePopper(toggleElement, menuElement, mergeOptionsWithPopperConfig({
7264 placement: placement,
7265 enabled: !!(shouldUsePopper && show),
7266 enableEvents: show,
7267 offset: offset,
7268 flip: flip,
7269 fixed: fixed,
7270 arrowElement: arrowElement,
7271 popperConfig: popperConfig
7272 }));
7273
7274 var menuProps = extends_extends({
7275 ref: setMenu || DropdownMenu_noop,
7276 'aria-labelledby': toggleElement == null ? void 0 : toggleElement.id
7277 }, popper.attributes.popper, {
7278 style: popper.styles.popper
7279 });
7280
7281 var metadata = {
7282 show: show,
7283 alignEnd: alignEnd,
7284 hasShown: hasShownRef.current,
7285 toggle: context == null ? void 0 : context.toggle,
7286 popper: shouldUsePopper ? popper : null,
7287 arrowProps: shouldUsePopper ? extends_extends({
7288 ref: attachArrowRef
7289 }, popper.attributes.arrow, {
7290 style: popper.styles.arrow
7291 }) : {}
7292 };
7293 esm_useRootClose(menuElement, handleClose, {
7294 clickTrigger: rootCloseEvent,
7295 disabled: !show
7296 });
7297 return [menuProps, metadata];
7298}
7299var DropdownMenu_propTypes = {
7300 /**
7301 * A render prop that returns a Menu element. The `props`
7302 * argument should spread through to **a component that can accept a ref**.
7303 *
7304 * @type {Function ({
7305 * show: boolean,
7306 * alignEnd: boolean,
7307 * close: (?SyntheticEvent) => void,
7308 * placement: Placement,
7309 * update: () => void,
7310 * forceUpdate: () => void,
7311 * props: {
7312 * ref: (?HTMLElement) => void,
7313 * style: { [string]: string | number },
7314 * aria-labelledby: ?string
7315 * },
7316 * arrowProps: {
7317 * ref: (?HTMLElement) => void,
7318 * style: { [string]: string | number },
7319 * },
7320 * }) => React.Element}
7321 */
7322 children: (prop_types_default()).func.isRequired,
7323
7324 /**
7325 * Controls the visible state of the menu, generally this is
7326 * provided by the parent `Dropdown` component,
7327 * but may also be specified as a prop directly.
7328 */
7329 show: (prop_types_default()).bool,
7330
7331 /**
7332 * Aligns the dropdown menu to the 'end' of it's placement position.
7333 * Generally this is provided by the parent `Dropdown` component,
7334 * but may also be specified as a prop directly.
7335 */
7336 alignEnd: (prop_types_default()).bool,
7337
7338 /**
7339 * Enables the Popper.js `flip` modifier, allowing the Dropdown to
7340 * automatically adjust it's placement in case of overlap with the viewport or toggle.
7341 * Refer to the [flip docs](https://popper.js.org/popper-documentation.html#modifiers..flip.enabled) for more info
7342 */
7343 flip: (prop_types_default()).bool,
7344 usePopper: prop_types_default().oneOf([true, false]),
7345
7346 /**
7347 * A set of popper options and props passed directly to react-popper's Popper component.
7348 */
7349 popperConfig: (prop_types_default()).object,
7350
7351 /**
7352 * Override the default event used by RootCloseWrapper.
7353 */
7354 rootCloseEvent: (prop_types_default()).string
7355};
7356var DropdownMenu_defaultProps = {
7357 usePopper: true
7358};
7359/**
7360 * Also exported as `<Dropdown.Menu>` from `Dropdown`.
7361 *
7362 * @displayName DropdownMenu
7363 * @memberOf Dropdown
7364 */
7365
7366function DropdownMenu(_ref2) {
7367 var children = _ref2.children,
7368 options = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, ["children"]);
7369
7370 var _useDropdownMenu = useDropdownMenu(options),
7371 props = _useDropdownMenu[0],
7372 meta = _useDropdownMenu[1];
7373
7374 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, meta.hasShown ? children(props, meta) : null);
7375}
7376
7377DropdownMenu.displayName = 'ReactOverlaysDropdownMenu';
7378DropdownMenu.propTypes = DropdownMenu_propTypes;
7379DropdownMenu.defaultProps = DropdownMenu_defaultProps;
7380/** @component */
7381
7382/* harmony default export */ const esm_DropdownMenu = (DropdownMenu);
7383;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/DropdownToggle.js
7384
7385
7386
7387
7388var DropdownToggle_noop = function noop() {};
7389/**
7390 * Wires up Dropdown toggle functionality, returning a set a props to attach
7391 * to the element that functions as the dropdown toggle (generally a button).
7392 *
7393 * @memberOf Dropdown
7394 */
7395
7396
7397function useDropdownToggle() {
7398 var _ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext) || {},
7399 _ref$show = _ref.show,
7400 show = _ref$show === void 0 ? false : _ref$show,
7401 _ref$toggle = _ref.toggle,
7402 toggle = _ref$toggle === void 0 ? DropdownToggle_noop : _ref$toggle,
7403 setToggle = _ref.setToggle;
7404
7405 var handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
7406 toggle(!show, e);
7407 }, [show, toggle]);
7408 return [{
7409 ref: setToggle || DropdownToggle_noop,
7410 onClick: handleClick,
7411 'aria-haspopup': true,
7412 'aria-expanded': !!show
7413 }, {
7414 show: show,
7415 toggle: toggle
7416 }];
7417}
7418var DropdownToggle_propTypes = {
7419 /**
7420 * A render prop that returns a Toggle element. The `props`
7421 * argument should spread through to **a component that can accept a ref**. Use
7422 * the `onToggle` argument to toggle the menu open or closed
7423 *
7424 * @type {Function ({
7425 * show: boolean,
7426 * toggle: (show: boolean) => void,
7427 * props: {
7428 * ref: (?HTMLElement) => void,
7429 * aria-haspopup: true
7430 * aria-expanded: boolean
7431 * },
7432 * }) => React.Element}
7433 */
7434 children: (prop_types_default()).func.isRequired
7435};
7436/**
7437 * Also exported as `<Dropdown.Toggle>` from `Dropdown`.
7438 *
7439 * @displayName DropdownToggle
7440 * @memberOf Dropdown
7441 */
7442
7443function DropdownToggle(_ref2) {
7444 var children = _ref2.children;
7445
7446 var _useDropdownToggle = useDropdownToggle(),
7447 props = _useDropdownToggle[0],
7448 meta = _useDropdownToggle[1];
7449
7450 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, children(props, meta));
7451}
7452
7453DropdownToggle.displayName = 'ReactOverlaysDropdownToggle';
7454DropdownToggle.propTypes = DropdownToggle_propTypes;
7455/** @component */
7456
7457/* harmony default export */ const esm_DropdownToggle = (DropdownToggle);
7458;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/Dropdown.js
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472var Dropdown_propTypes = {
7473 /**
7474 * A render prop that returns the root dropdown element. The `props`
7475 * argument should spread through to an element containing _both_ the
7476 * menu and toggle in order to handle keyboard events for focus management.
7477 *
7478 * @type {Function ({
7479 * props: {
7480 * onKeyDown: (SyntheticEvent) => void,
7481 * },
7482 * }) => React.Element}
7483 */
7484 children: (prop_types_default()).node,
7485
7486 /**
7487 * Determines the direction and location of the Menu in relation to it's Toggle.
7488 */
7489 drop: prop_types_default().oneOf(['up', 'left', 'right', 'down']),
7490
7491 /**
7492 * Controls the focus behavior for when the Dropdown is opened. Set to
7493 * `true` to always focus the first menu item, `keyboard` to focus only when
7494 * navigating via the keyboard, or `false` to disable completely
7495 *
7496 * The Default behavior is `false` **unless** the Menu has a `role="menu"`
7497 * where it will default to `keyboard` to match the recommended [ARIA Authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton).
7498 */
7499 focusFirstItemOnShow: prop_types_default().oneOf([false, true, 'keyboard']),
7500
7501 /**
7502 * A css slector string that will return __focusable__ menu items.
7503 * Selectors should be relative to the menu component:
7504 * e.g. ` > li:not('.disabled')`
7505 */
7506 itemSelector: (prop_types_default()).string,
7507
7508 /**
7509 * Align the menu to the 'end' side of the placement side of the Dropdown toggle. The default placement is `top-start` or `bottom-start`.
7510 */
7511 alignEnd: (prop_types_default()).bool,
7512
7513 /**
7514 * Whether or not the Dropdown is visible.
7515 *
7516 * @controllable onToggle
7517 */
7518 show: (prop_types_default()).bool,
7519
7520 /**
7521 * Sets the initial show position of the Dropdown.
7522 */
7523 defaultShow: (prop_types_default()).bool,
7524
7525 /**
7526 * A callback fired when the Dropdown wishes to change visibility. Called with the requested
7527 * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.
7528 *
7529 * ```ts static
7530 * function(
7531 * isOpen: boolean,
7532 * event: SyntheticEvent,
7533 * ): void
7534 * ```
7535 *
7536 * @controllable show
7537 */
7538 onToggle: (prop_types_default()).func
7539};
7540
7541function useRefWithUpdate() {
7542 var forceUpdate = useForceUpdate();
7543 var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
7544 var attachRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (element) {
7545 ref.current = element; // ensure that a menu set triggers an update for consumers
7546
7547 forceUpdate();
7548 }, [forceUpdate]);
7549 return [ref, attachRef];
7550}
7551/**
7552 * @displayName Dropdown
7553 * @public
7554 */
7555
7556
7557function Dropdown(_ref) {
7558 var drop = _ref.drop,
7559 alignEnd = _ref.alignEnd,
7560 defaultShow = _ref.defaultShow,
7561 rawShow = _ref.show,
7562 rawOnToggle = _ref.onToggle,
7563 _ref$itemSelector = _ref.itemSelector,
7564 itemSelector = _ref$itemSelector === void 0 ? '* > *' : _ref$itemSelector,
7565 focusFirstItemOnShow = _ref.focusFirstItemOnShow,
7566 children = _ref.children;
7567
7568 var _useUncontrolledProp = useUncontrolledProp(rawShow, defaultShow, rawOnToggle),
7569 show = _useUncontrolledProp[0],
7570 onToggle = _useUncontrolledProp[1]; // We use normal refs instead of useCallbackRef in order to populate the
7571 // the value as quickly as possible, otherwise the effect to focus the element
7572 // may run before the state value is set
7573
7574
7575 var _useRefWithUpdate = useRefWithUpdate(),
7576 menuRef = _useRefWithUpdate[0],
7577 setMenu = _useRefWithUpdate[1];
7578
7579 var menuElement = menuRef.current;
7580
7581 var _useRefWithUpdate2 = useRefWithUpdate(),
7582 toggleRef = _useRefWithUpdate2[0],
7583 setToggle = _useRefWithUpdate2[1];
7584
7585 var toggleElement = toggleRef.current;
7586 var lastShow = usePrevious(show);
7587 var lastSourceEvent = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
7588 var focusInDropdown = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7589 var toggle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (nextShow, event) {
7590 onToggle(nextShow, event);
7591 }, [onToggle]);
7592 var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
7593 return {
7594 toggle: toggle,
7595 drop: drop,
7596 show: show,
7597 alignEnd: alignEnd,
7598 menuElement: menuElement,
7599 toggleElement: toggleElement,
7600 setMenu: setMenu,
7601 setToggle: setToggle
7602 };
7603 }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);
7604
7605 if (menuElement && lastShow && !show) {
7606 focusInDropdown.current = menuElement.contains(document.activeElement);
7607 }
7608
7609 var focusToggle = useEventCallback(function () {
7610 if (toggleElement && toggleElement.focus) {
7611 toggleElement.focus();
7612 }
7613 });
7614 var maybeFocusFirst = useEventCallback(function () {
7615 var type = lastSourceEvent.current;
7616 var focusType = focusFirstItemOnShow;
7617
7618 if (focusType == null) {
7619 focusType = menuRef.current && matches(menuRef.current, '[role=menu]') ? 'keyboard' : false;
7620 }
7621
7622 if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {
7623 return;
7624 }
7625
7626 var first = qsa(menuRef.current, itemSelector)[0];
7627 if (first && first.focus) first.focus();
7628 });
7629 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
7630 if (show) maybeFocusFirst();else if (focusInDropdown.current) {
7631 focusInDropdown.current = false;
7632 focusToggle();
7633 } // only `show` should be changing
7634 }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);
7635 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
7636 lastSourceEvent.current = null;
7637 });
7638
7639 var getNextFocusedChild = function getNextFocusedChild(current, offset) {
7640 if (!menuRef.current) return null;
7641 var items = qsa(menuRef.current, itemSelector);
7642 var index = items.indexOf(current) + offset;
7643 index = Math.max(0, Math.min(index, items.length));
7644 return items[index];
7645 };
7646
7647 useGlobalListener('keydown', function (event) {
7648 var _menuRef$current, _toggleRef$current;
7649
7650 var key = event.key;
7651 var target = event.target;
7652 var fromMenu = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(target);
7653 var fromToggle = (_toggleRef$current = toggleRef.current) == null ? void 0 : _toggleRef$current.contains(target); // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400
7654 // in inscrutability
7655
7656 var isInput = /input|textarea/i.test(target.tagName);
7657
7658 if (isInput && (key === ' ' || key !== 'Escape' && fromMenu)) {
7659 return;
7660 }
7661
7662 if (!fromMenu && !fromToggle) {
7663 return;
7664 }
7665
7666 if (!menuRef.current && key === 'Tab') {
7667 return;
7668 }
7669
7670 lastSourceEvent.current = event.type;
7671
7672 switch (key) {
7673 case 'ArrowUp':
7674 {
7675 var next = getNextFocusedChild(target, -1);
7676 if (next && next.focus) next.focus();
7677 event.preventDefault();
7678 return;
7679 }
7680
7681 case 'ArrowDown':
7682 event.preventDefault();
7683
7684 if (!show) {
7685 onToggle(true, event);
7686 } else {
7687 var _next = getNextFocusedChild(target, 1);
7688
7689 if (_next && _next.focus) _next.focus();
7690 }
7691
7692 return;
7693
7694 case 'Tab':
7695 // on keydown the target is the element being tabbed FROM, we need that
7696 // to know if this event is relevant to this dropdown (e.g. in this menu).
7697 // On `keyup` the target is the element being tagged TO which we use to check
7698 // if focus has left the menu
7699 esm_addEventListener(document, 'keyup', function (e) {
7700 var _menuRef$current2;
7701
7702 if (e.key === 'Tab' && !e.target || !((_menuRef$current2 = menuRef.current) != null && _menuRef$current2.contains(e.target))) {
7703 onToggle(false, event);
7704 }
7705 }, {
7706 once: true
7707 });
7708 break;
7709
7710 case 'Escape':
7711 event.preventDefault();
7712 event.stopPropagation();
7713 onToggle(false, event);
7714 break;
7715
7716 default:
7717 }
7718 });
7719 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_DropdownContext.Provider, {
7720 value: context
7721 }, children);
7722}
7723
7724Dropdown.displayName = 'ReactOverlaysDropdown';
7725Dropdown.propTypes = Dropdown_propTypes;
7726Dropdown.Menu = esm_DropdownMenu;
7727Dropdown.Toggle = esm_DropdownToggle;
7728/* harmony default export */ const esm_Dropdown = (Dropdown);
7729;// CONCATENATED MODULE: ./src/NavContext.tsx
7730 // TODO: check this
7731
7732var NavContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
7733NavContext.displayName = 'NavContext';
7734/* harmony default export */ const src_NavContext = (NavContext);
7735;// CONCATENATED MODULE: ./src/DropdownItem.tsx
7736
7737
7738var DropdownItem_excluded = ["bsPrefix", "className", "children", "eventKey", "disabled", "href", "onClick", "onSelect", "active", "as"];
7739
7740var DropdownItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownItem.tsx",
7741 DropdownItem_this = undefined;
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751var DropdownItem_propTypes = {
7752 /** @default 'dropdown-item' */
7753 bsPrefix: (prop_types_default()).string,
7754
7755 /**
7756 * Highlight the menu item as active.
7757 */
7758 active: (prop_types_default()).bool,
7759
7760 /**
7761 * Disable the menu item, making it unselectable.
7762 */
7763 disabled: (prop_types_default()).bool,
7764
7765 /**
7766 * Value passed to the `onSelect` handler, useful for identifying the selected menu item.
7767 */
7768 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
7769
7770 /**
7771 * HTML `href` attribute corresponding to `a.href`.
7772 */
7773 href: (prop_types_default()).string,
7774
7775 /**
7776 * Callback fired when the menu item is clicked.
7777 */
7778 onClick: (prop_types_default()).func,
7779
7780 /**
7781 * Callback fired when the menu item is selected.
7782 *
7783 * ```js
7784 * (eventKey: any, event: Object) => any
7785 * ```
7786 */
7787 onSelect: (prop_types_default()).func,
7788 as: (prop_types_default()).elementType
7789};
7790var DropdownItem_defaultProps = {
7791 as: src_SafeAnchor,
7792 disabled: false
7793};
7794var DropdownItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
7795 var bsPrefix = _ref.bsPrefix,
7796 className = _ref.className,
7797 children = _ref.children,
7798 eventKey = _ref.eventKey,
7799 disabled = _ref.disabled,
7800 href = _ref.href,
7801 onClick = _ref.onClick,
7802 onSelect = _ref.onSelect,
7803 propActive = _ref.active,
7804 Component = _ref.as,
7805 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownItem_excluded);
7806
7807 var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-item');
7808 var onSelectCtx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
7809 var navContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_NavContext);
7810
7811 var _ref2 = navContext || {},
7812 activeKey = _ref2.activeKey;
7813
7814 var key = makeEventKey(eventKey, href);
7815 var active = propActive == null && key != null ? makeEventKey(activeKey) === key : propActive;
7816 var handleClick = useEventCallback(function (event) {
7817 // SafeAnchor handles the disabled case, but we handle it here
7818 // for other components
7819 if (disabled) return;
7820 if (onClick) onClick(event);
7821 if (onSelectCtx) onSelectCtx(key, event);
7822 if (onSelect) onSelect(key, event);
7823 });
7824 return (
7825 /*#__PURE__*/
7826 // "TS2604: JSX element type 'Component' does not have any construct or call signatures."
7827 // @ts-ignore
7828 external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
7829 ref: ref,
7830 href: href,
7831 disabled: disabled,
7832 className: classnames_default()(className, prefix, active && 'active', disabled && 'disabled'),
7833 onClick: handleClick,
7834 __self: DropdownItem_this,
7835 __source: {
7836 fileName: DropdownItem_jsxFileName,
7837 lineNumber: 119,
7838 columnNumber: 7
7839 }
7840 }), children)
7841 );
7842});
7843DropdownItem.displayName = 'DropdownItem';
7844DropdownItem.propTypes = DropdownItem_propTypes;
7845DropdownItem.defaultProps = DropdownItem_defaultProps;
7846/* harmony default export */ const src_DropdownItem = (DropdownItem);
7847;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergedRefs.js
7848
7849
7850var toFnRef = function toFnRef(ref) {
7851 return !ref || typeof ref === 'function' ? ref : function (value) {
7852 ref.current = value;
7853 };
7854};
7855
7856function mergeRefs(refA, refB) {
7857 var a = toFnRef(refA);
7858 var b = toFnRef(refB);
7859 return function (value) {
7860 if (a) a(value);
7861 if (b) b(value);
7862 };
7863}
7864/**
7865 * Create and returns a single callback ref composed from two other Refs.
7866 *
7867 * ```tsx
7868 * const Button = React.forwardRef((props, ref) => {
7869 * const [element, attachRef] = useCallbackRef<HTMLButtonElement>();
7870 * const mergedRef = useMergedRefs(ref, attachRef);
7871 *
7872 * return <button ref={mergedRef} {...props}/>
7873 * })
7874 * ```
7875 *
7876 * @param refA A Callback or mutable Ref
7877 * @param refB A Callback or mutable Ref
7878 * @category refs
7879 */
7880
7881function useMergedRefs(refA, refB) {
7882 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
7883 return mergeRefs(refA, refB);
7884 }, [refA, refB]);
7885}
7886
7887/* harmony default export */ const esm_useMergedRefs = (useMergedRefs);
7888;// CONCATENATED MODULE: ./src/NavbarContext.tsx
7889 // TODO: check
7890
7891var NavbarContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
7892NavbarContext_context.displayName = 'NavbarContext';
7893/* harmony default export */ const NavbarContext = (NavbarContext_context);
7894;// CONCATENATED MODULE: ./src/useWrappedRefWithWarning.tsx
7895
7896
7897
7898function useWrappedRefWithWarning(ref, componentName) {
7899 // @ts-ignore
7900 if (true) return ref; // eslint-disable-next-line react-hooks/rules-of-hooks
7901
7902 var warningRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (refValue) {
7903 !(refValue == null || !refValue.isReactComponent) ? false ? 0 : browser_default()(false) : void 0;
7904 }, [componentName]); // eslint-disable-next-line react-hooks/rules-of-hooks
7905
7906 return esm_useMergedRefs(warningRef, ref);
7907}
7908;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/hasClass.js
7909/**
7910 * Checks if a given element has a CSS class.
7911 *
7912 * @param element the element
7913 * @param className the CSS class name
7914 */
7915function hasClass(element, className) {
7916 if (element.classList) return !!className && element.classList.contains(className);
7917 return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
7918}
7919;// CONCATENATED MODULE: ./src/usePopperMarginModifiers.tsx
7920
7921
7922
7923
7924function getMargins(element) {
7925 var styles = window.getComputedStyle(element);
7926 var top = parseFloat(styles.marginTop) || 0;
7927 var right = parseFloat(styles.marginRight) || 0;
7928 var bottom = parseFloat(styles.marginBottom) || 0;
7929 var left = parseFloat(styles.marginLeft) || 0;
7930 return {
7931 top: top,
7932 right: right,
7933 bottom: bottom,
7934 left: left
7935 };
7936}
7937
7938function usePopperMarginModifiers() {
7939 var overlayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
7940 var margins = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
7941 var arrowMargins = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
7942 var popoverClass = useBootstrapPrefix(undefined, 'popover');
7943 var dropdownMenuClass = useBootstrapPrefix(undefined, 'dropdown-menu');
7944 var callback = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (overlay) {
7945 if (!overlay || !(hasClass(overlay, popoverClass) || hasClass(overlay, dropdownMenuClass))) return;
7946 margins.current = getMargins(overlay);
7947 overlay.style.margin = '0';
7948 overlayRef.current = overlay;
7949 }, [popoverClass, dropdownMenuClass]);
7950 var offset = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
7951 return {
7952 name: 'offset',
7953 options: {
7954 offset: function offset(_ref) {
7955 var placement = _ref.placement;
7956 if (!margins.current) return [0, 0];
7957 var _margins$current = margins.current,
7958 top = _margins$current.top,
7959 left = _margins$current.left,
7960 bottom = _margins$current.bottom,
7961 right = _margins$current.right;
7962
7963 switch (placement.split('-')[0]) {
7964 case 'top':
7965 return [0, bottom];
7966
7967 case 'left':
7968 return [0, right];
7969
7970 case 'bottom':
7971 return [0, top];
7972
7973 case 'right':
7974 return [0, left];
7975
7976 default:
7977 return [0, 0];
7978 }
7979 }
7980 }
7981 };
7982 }, [margins]);
7983 var arrow = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
7984 return {
7985 name: 'arrow',
7986 options: {
7987 padding: function padding() {
7988 // The options here are used for Popper 2.8.4 and up.
7989 // For earlier version, padding is handled in popoverArrowMargins below.
7990 if (!arrowMargins.current) {
7991 return 0;
7992 }
7993
7994 var _arrowMargins$current = arrowMargins.current,
7995 top = _arrowMargins$current.top,
7996 right = _arrowMargins$current.right;
7997 var padding = top || right;
7998 return {
7999 top: padding,
8000 left: padding,
8001 right: padding,
8002 bottom: padding
8003 };
8004 }
8005 }
8006 };
8007 }, [arrowMargins]); // Converts popover arrow margin to arrow modifier padding
8008
8009 var popoverArrowMargins = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
8010 return {
8011 name: 'popoverArrowMargins',
8012 enabled: true,
8013 phase: 'main',
8014 fn: function fn() {
8015 return undefined;
8016 },
8017 requiresIfExists: ['arrow'],
8018 effect: function effect(_ref2) {
8019 var state = _ref2.state;
8020
8021 if (!overlayRef.current || !state.elements.arrow || !hasClass(overlayRef.current, popoverClass)) {
8022 return undefined;
8023 }
8024
8025 if (state.modifiersData['arrow#persistent']) {
8026 // @popperjs/core <= 2.8.3 uses arrow#persistent to pass padding to arrow modifier.
8027 var _getMargins = getMargins(state.elements.arrow),
8028 top = _getMargins.top,
8029 right = _getMargins.right;
8030
8031 var padding = top || right;
8032 state.modifiersData['arrow#persistent'].padding = {
8033 top: padding,
8034 left: padding,
8035 right: padding,
8036 bottom: padding
8037 };
8038 } else {
8039 // @popperjs/core >= 2.8.4 gets the padding from the arrow modifier options,
8040 // so we'll get the margins here, and let the arrow modifier above pass
8041 // it to popper.
8042 arrowMargins.current = getMargins(state.elements.arrow);
8043 }
8044
8045 state.elements.arrow.style.margin = '0';
8046 return function () {
8047 if (state.elements.arrow) state.elements.arrow.style.margin = '';
8048 };
8049 }
8050 };
8051 }, [popoverClass]);
8052 return [callback, [offset, arrow, popoverArrowMargins]];
8053}
8054;// CONCATENATED MODULE: ./src/DropdownMenu.tsx
8055
8056
8057var DropdownMenu_excluded = ["bsPrefix", "className", "align", "alignRight", "rootCloseEvent", "flip", "show", "renderOnMount", "as", "popperConfig"];
8058
8059var DropdownMenu_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownMenu.tsx",
8060 DropdownMenu_this = undefined;
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072var alignDirection = prop_types_default().oneOf(['left', 'right']);
8073var alignPropType = prop_types_default().oneOfType([alignDirection, prop_types_default().shape({
8074 sm: alignDirection
8075}), prop_types_default().shape({
8076 md: alignDirection
8077}), prop_types_default().shape({
8078 lg: alignDirection
8079}), prop_types_default().shape({
8080 xl: alignDirection
8081})]);
8082var src_DropdownMenu_propTypes = {
8083 /**
8084 * @default 'dropdown-menu'
8085 */
8086 bsPrefix: (prop_types_default()).string,
8087
8088 /** Controls the visibility of the Dropdown menu */
8089 show: (prop_types_default()).bool,
8090
8091 /** Whether to render the dropdown menu in the DOM before the first time it is shown */
8092 renderOnMount: (prop_types_default()).bool,
8093
8094 /** Have the dropdown switch to it's opposite placement when necessary to stay on screen. */
8095 flip: (prop_types_default()).bool,
8096
8097 /**
8098 * Aligns the dropdown menu to the specified side of the container. You can also align
8099 * the menu responsively for breakpoints starting at `sm` and up. The alignment
8100 * direction will affect the specified breakpoint or larger.
8101 *
8102 * *Note: Using responsive alignment will disable Popper usage for positioning.*
8103 *
8104 * @type {"left"|"right"|{ sm: "left"|"right" }|{ md: "left"|"right" }|{ lg: "left"|"right" }|{ xl: "left"|"right"} }
8105 */
8106 align: alignPropType,
8107
8108 /**
8109 * Aligns the Dropdown menu to the right of it's container.
8110 *
8111 * @deprecated Use align="right"
8112 */
8113 alignRight: (prop_types_default()).bool,
8114 onSelect: (prop_types_default()).func,
8115
8116 /**
8117 * Which event when fired outside the component will cause it to be closed
8118 *
8119 * *Note: For custom dropdown components, you will have to pass the
8120 * `rootCloseEvent` to `<RootCloseWrapper>` in your custom dropdown menu
8121 * component ([similarly to how it is implemented in `<Dropdown.Menu>`](https://github.com/react-bootstrap/react-bootstrap/blob/v0.31.5/src/DropdownMenu.js#L115-L119)).*
8122 */
8123 rootCloseEvent: prop_types_default().oneOf(['click', 'mousedown']),
8124
8125 /**
8126 * Control the rendering of the DropdownMenu. All non-menu props
8127 * (listed here) are passed through to the `as` Component.
8128 *
8129 * If providing a custom, non DOM, component. the `show`, `close` and `alignRight` props
8130 * are also injected and should be handled appropriately.
8131 */
8132 as: (prop_types_default()).elementType,
8133
8134 /**
8135 * A set of popper options and props passed directly to Popper.
8136 */
8137 popperConfig: (prop_types_default()).object
8138};
8139var src_DropdownMenu_defaultProps = {
8140 align: 'left',
8141 alignRight: false,
8142 flip: true
8143};
8144var DropdownMenu_DropdownMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
8145 var bsPrefix = _ref.bsPrefix,
8146 className = _ref.className,
8147 align = _ref.align,
8148 alignRight = _ref.alignRight,
8149 rootCloseEvent = _ref.rootCloseEvent,
8150 flip = _ref.flip,
8151 showProps = _ref.show,
8152 renderOnMount = _ref.renderOnMount,
8153 _ref$as = _ref.as,
8154 Component = _ref$as === void 0 ? 'div' : _ref$as,
8155 popperConfig = _ref.popperConfig,
8156 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownMenu_excluded);
8157
8158 var isNavbar = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
8159 var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-menu');
8160
8161 var _usePopperMarginModif = usePopperMarginModifiers(),
8162 popperRef = _usePopperMarginModif[0],
8163 marginModifiers = _usePopperMarginModif[1];
8164
8165 var alignClasses = [];
8166
8167 if (align) {
8168 if (typeof align === 'object') {
8169 var keys = Object.keys(align);
8170 false ? 0 : void 0;
8171
8172 if (keys.length) {
8173 var brkPoint = keys[0];
8174 var direction = align[brkPoint]; // .dropdown-menu-right is required for responsively aligning
8175 // left in addition to align left classes.
8176 // Reuse alignRight to toggle the class below.
8177
8178 alignRight = direction === 'left';
8179 alignClasses.push(prefix + "-" + brkPoint + "-" + direction);
8180 }
8181 } else if (align === 'right') {
8182 alignRight = true;
8183 }
8184 }
8185
8186 var _useDropdownMenu = useDropdownMenu({
8187 flip: flip,
8188 rootCloseEvent: rootCloseEvent,
8189 show: showProps,
8190 alignEnd: alignRight,
8191 usePopper: !isNavbar && alignClasses.length === 0,
8192 popperConfig: extends_extends({}, popperConfig, {
8193 modifiers: marginModifiers.concat((popperConfig == null ? void 0 : popperConfig.modifiers) || [])
8194 })
8195 }),
8196 menuProps = _useDropdownMenu[0],
8197 _useDropdownMenu$ = _useDropdownMenu[1],
8198 hasShown = _useDropdownMenu$.hasShown,
8199 popper = _useDropdownMenu$.popper,
8200 show = _useDropdownMenu$.show,
8201 alignEnd = _useDropdownMenu$.alignEnd,
8202 toggle = _useDropdownMenu$.toggle;
8203
8204 menuProps.ref = esm_useMergedRefs(popperRef, esm_useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref));
8205 if (!hasShown && !renderOnMount) return null; // For custom components provide additional, non-DOM, props;
8206
8207 if (typeof Component !== 'string') {
8208 menuProps.show = show;
8209
8210 menuProps.close = function () {
8211 return toggle == null ? void 0 : toggle(false);
8212 };
8213
8214 menuProps.alignRight = alignEnd;
8215 }
8216
8217 var style = props.style;
8218
8219 if (popper != null && popper.placement) {
8220 // we don't need the default popper style,
8221 // menus are display: none when not shown.
8222 style = extends_extends({}, props.style, menuProps.style);
8223 props['x-placement'] = popper.placement;
8224 }
8225
8226 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, menuProps, {
8227 style: style,
8228 className: classnames_default().apply(void 0, [className, prefix, show && 'show', alignEnd && prefix + "-right"].concat(alignClasses)),
8229 __self: DropdownMenu_this,
8230 __source: {
8231 fileName: DropdownMenu_jsxFileName,
8232 lineNumber: 208,
8233 columnNumber: 7
8234 }
8235 }));
8236});
8237DropdownMenu_DropdownMenu.displayName = 'DropdownMenu';
8238DropdownMenu_DropdownMenu.propTypes = src_DropdownMenu_propTypes;
8239DropdownMenu_DropdownMenu.defaultProps = src_DropdownMenu_defaultProps;
8240/* harmony default export */ const src_DropdownMenu = (DropdownMenu_DropdownMenu);
8241// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/isRequiredForA11y.js
8242var isRequiredForA11y = __webpack_require__(422);
8243var isRequiredForA11y_default = /*#__PURE__*/__webpack_require__.n(isRequiredForA11y);
8244;// CONCATENATED MODULE: ./src/DropdownToggle.tsx
8245
8246
8247var DropdownToggle_excluded = ["bsPrefix", "split", "className", "childBsPrefix", "as"];
8248
8249var DropdownToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownToggle.tsx",
8250 DropdownToggle_this = undefined;
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261var src_DropdownToggle_propTypes = {
8262 /**
8263 * @default 'dropdown-toggle'
8264 */
8265 bsPrefix: (prop_types_default()).string,
8266
8267 /**
8268 * An html id attribute, necessary for assistive technologies, such as screen readers.
8269 * @type {string|number}
8270 * @required
8271 */
8272 id: isRequiredForA11y_default()((prop_types_default()).any),
8273 split: (prop_types_default()).bool,
8274 as: (prop_types_default()).elementType,
8275
8276 /**
8277 * to passthrough to the underlying button or whatever from DropdownButton
8278 * @private
8279 */
8280 childBsPrefix: (prop_types_default()).string
8281};
8282var DropdownToggle_DropdownToggle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
8283 var bsPrefix = _ref.bsPrefix,
8284 split = _ref.split,
8285 className = _ref.className,
8286 childBsPrefix = _ref.childBsPrefix,
8287 _ref$as = _ref.as,
8288 Component = _ref$as === void 0 ? src_Button : _ref$as,
8289 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownToggle_excluded);
8290
8291 var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');
8292
8293 if (childBsPrefix !== undefined) {
8294 props.bsPrefix = childBsPrefix;
8295 }
8296
8297 var _useDropdownToggle = useDropdownToggle(),
8298 toggleProps = _useDropdownToggle[0];
8299
8300 toggleProps.ref = esm_useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle')); // This intentionally forwards size and variant (if set) to the
8301 // underlying component, to allow it to render size and style variants.
8302
8303 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
8304 className: classnames_default()(className, prefix, split && prefix + "-split")
8305 }, toggleProps, props, {
8306 __self: DropdownToggle_this,
8307 __source: {
8308 fileName: DropdownToggle_jsxFileName,
8309 lineNumber: 84,
8310 columnNumber: 7
8311 }
8312 }));
8313});
8314DropdownToggle_DropdownToggle.displayName = 'DropdownToggle';
8315DropdownToggle_DropdownToggle.propTypes = src_DropdownToggle_propTypes;
8316/* harmony default export */ const src_DropdownToggle = (DropdownToggle_DropdownToggle);
8317;// CONCATENATED MODULE: ./src/Dropdown.tsx
8318
8319
8320var Dropdown_excluded = ["bsPrefix", "drop", "show", "className", "alignRight", "onSelect", "onToggle", "focusFirstItemOnShow", "as", "navbar"];
8321
8322var Dropdown_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Dropdown.tsx",
8323 Dropdown_this = undefined;
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337var DropdownHeader = createWithBsPrefix('dropdown-header', {
8338 defaultProps: {
8339 role: 'heading'
8340 }
8341});
8342var DropdownDivider = createWithBsPrefix('dropdown-divider', {
8343 defaultProps: {
8344 role: 'separator'
8345 }
8346});
8347var DropdownItemText = createWithBsPrefix('dropdown-item-text', {
8348 Component: 'span'
8349});
8350var src_Dropdown_propTypes = {
8351 /** @default 'dropdown' */
8352 bsPrefix: (prop_types_default()).string,
8353
8354 /**
8355 * Determines the direction and location of the Menu in relation to it's Toggle.
8356 */
8357 drop: prop_types_default().oneOf(['up', 'left', 'right', 'down']),
8358 as: (prop_types_default()).elementType,
8359
8360 /**
8361 * Align the menu to the right side of the Dropdown toggle
8362 */
8363 alignRight: (prop_types_default()).bool,
8364
8365 /**
8366 * Whether or not the Dropdown is visible.
8367 *
8368 * @controllable onToggle
8369 */
8370 show: (prop_types_default()).bool,
8371
8372 /**
8373 * Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to
8374 * Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).
8375 *
8376 */
8377 flip: (prop_types_default()).bool,
8378
8379 /**
8380 * A callback fired when the Dropdown wishes to change visibility. Called with the requested
8381 * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.
8382 *
8383 * ```js
8384 * function(
8385 * isOpen: boolean,
8386 * event: SyntheticEvent,
8387 * metadata: {
8388 * source: 'select' | 'click' | 'rootClose' | 'keydown'
8389 * }
8390 * ): void
8391 * ```
8392 *
8393 * @controllable show
8394 */
8395 onToggle: (prop_types_default()).func,
8396
8397 /**
8398 * A callback fired when a menu item is selected.
8399 *
8400 * ```js
8401 * (eventKey: any, event: Object) => any
8402 * ```
8403 */
8404 onSelect: (prop_types_default()).func,
8405
8406 /**
8407 * Controls the focus behavior for when the Dropdown is opened. Set to
8408 * `true` to always focus the first menu item, `keyboard` to focus only when
8409 * navigating via the keyboard, or `false` to disable completely
8410 *
8411 * The Default behavior is `false` **unless** the Menu has a `role="menu"`
8412 * where it will default to `keyboard` to match the recommended [ARIA Authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton).
8413 */
8414 focusFirstItemOnShow: prop_types_default().oneOf([false, true, 'keyboard']),
8415
8416 /** @private */
8417 navbar: (prop_types_default()).bool
8418};
8419var Dropdown_defaultProps = {
8420 navbar: false
8421};
8422var Dropdown_Dropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (pProps, ref) {
8423 var _useUncontrolled = useUncontrolled(pProps, {
8424 show: 'onToggle'
8425 }),
8426 bsPrefix = _useUncontrolled.bsPrefix,
8427 drop = _useUncontrolled.drop,
8428 show = _useUncontrolled.show,
8429 className = _useUncontrolled.className,
8430 alignRight = _useUncontrolled.alignRight,
8431 onSelect = _useUncontrolled.onSelect,
8432 onToggle = _useUncontrolled.onToggle,
8433 focusFirstItemOnShow = _useUncontrolled.focusFirstItemOnShow,
8434 _useUncontrolled$as = _useUncontrolled.as,
8435 Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
8436 _4 = _useUncontrolled.navbar,
8437 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Dropdown_excluded);
8438
8439 var onSelectCtx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
8440 var prefix = useBootstrapPrefix(bsPrefix, 'dropdown');
8441 var handleToggle = useEventCallback(function (nextShow, event, source) {
8442 if (source === void 0) {
8443 source = event.type;
8444 }
8445
8446 if (event.currentTarget === document && (source !== 'keydown' || event.key === 'Escape')) source = 'rootClose';
8447
8448 if (onToggle) {
8449 onToggle(nextShow, event, {
8450 source: source
8451 });
8452 }
8453 });
8454 var handleSelect = useEventCallback(function (key, event) {
8455 if (onSelectCtx) onSelectCtx(key, event);
8456 if (onSelect) onSelect(key, event);
8457 handleToggle(false, event, 'select');
8458 });
8459 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
8460 value: handleSelect,
8461 __self: Dropdown_this,
8462 __source: {
8463 fileName: Dropdown_jsxFileName,
8464 lineNumber: 166,
8465 columnNumber: 5
8466 }
8467 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Dropdown, {
8468 drop: drop,
8469 show: show,
8470 alignEnd: alignRight,
8471 onToggle: handleToggle,
8472 focusFirstItemOnShow: focusFirstItemOnShow,
8473 itemSelector: "." + prefix + "-item:not(.disabled):not(:disabled)",
8474 __self: Dropdown_this,
8475 __source: {
8476 fileName: Dropdown_jsxFileName,
8477 lineNumber: 167,
8478 columnNumber: 7
8479 }
8480 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
8481 ref: ref,
8482 className: classnames_default()(className, show && 'show', (!drop || drop === 'down') && prefix, drop === 'up' && 'dropup', drop === 'right' && 'dropright', drop === 'left' && 'dropleft'),
8483 __self: Dropdown_this,
8484 __source: {
8485 fileName: Dropdown_jsxFileName,
8486 lineNumber: 175,
8487 columnNumber: 9
8488 }
8489 }))));
8490});
8491Dropdown_Dropdown.displayName = 'Dropdown';
8492Dropdown_Dropdown.propTypes = src_Dropdown_propTypes;
8493Dropdown_Dropdown.defaultProps = Dropdown_defaultProps;
8494Dropdown_Dropdown.Divider = DropdownDivider;
8495Dropdown_Dropdown.Header = DropdownHeader;
8496Dropdown_Dropdown.Item = src_DropdownItem;
8497Dropdown_Dropdown.ItemText = DropdownItemText;
8498Dropdown_Dropdown.Menu = src_DropdownMenu;
8499Dropdown_Dropdown.Toggle = src_DropdownToggle;
8500/* harmony default export */ const src_Dropdown = (Dropdown_Dropdown);
8501;// CONCATENATED MODULE: ./src/DropdownButton.tsx
8502
8503
8504var DropdownButton_excluded = ["title", "children", "bsPrefix", "rootCloseEvent", "variant", "size", "menuAlign", "menuRole", "renderMenuOnMount", "disabled", "href", "id"];
8505
8506var DropdownButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownButton.tsx",
8507 DropdownButton_this = undefined;
8508
8509
8510
8511
8512
8513
8514var DropdownButton_propTypes = {
8515 /**
8516 * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
8517 * @type {string|number}
8518 * @required
8519 */
8520 id: (prop_types_default()).any,
8521
8522 /** An `href` passed to the Toggle component */
8523 href: (prop_types_default()).string,
8524
8525 /** An `onClick` handler passed to the Toggle component */
8526 onClick: (prop_types_default()).func,
8527
8528 /** The content of the non-toggle Button. */
8529 title: (prop_types_default()).node.isRequired,
8530
8531 /** Disables both Buttons */
8532 disabled: (prop_types_default()).bool,
8533
8534 /**
8535 * Aligns the dropdown menu responsively.
8536 *
8537 * _see [DropdownMenu](#dropdown-menu-props) for more details_
8538 *
8539 * @type {"left"|"right"|{ sm: "left"|"right" }|{ md: "left"|"right" }|{ lg: "left"|"right" }|{ xl: "left"|"right"} }
8540 */
8541 menuAlign: alignPropType,
8542
8543 /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
8544 menuRole: (prop_types_default()).string,
8545
8546 /** Whether to render the dropdown menu in the DOM before the first time it is shown */
8547 renderMenuOnMount: (prop_types_default()).bool,
8548
8549 /**
8550 * Which event when fired outside the component will cause it to be closed.
8551 *
8552 * _see [DropdownMenu](#dropdown-menu-props) for more details_
8553 */
8554 rootCloseEvent: (prop_types_default()).string,
8555
8556 /** @ignore */
8557 bsPrefix: (prop_types_default()).string,
8558
8559 /** @ignore */
8560 variant: (prop_types_default()).string,
8561
8562 /** @ignore */
8563 size: (prop_types_default()).string
8564};
8565/**
8566 * A convenience component for simple or general use dropdowns. Renders a `Button` toggle and all `children`
8567 * are passed directly to the default `Dropdown.Menu`. This component accepts all of
8568 * [`Dropdown`'s props](#dropdown-props).
8569 *
8570 * _All unknown props are passed through to the `Dropdown` component._ Only
8571 * the Button `variant`, `size` and `bsPrefix` props are passed to the toggle,
8572 * along with menu-related props are passed to the `Dropdown.Menu`
8573 */
8574
8575var DropdownButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
8576 var title = _ref.title,
8577 children = _ref.children,
8578 bsPrefix = _ref.bsPrefix,
8579 rootCloseEvent = _ref.rootCloseEvent,
8580 variant = _ref.variant,
8581 size = _ref.size,
8582 menuAlign = _ref.menuAlign,
8583 menuRole = _ref.menuRole,
8584 renderMenuOnMount = _ref.renderMenuOnMount,
8585 disabled = _ref.disabled,
8586 href = _ref.href,
8587 id = _ref.id,
8588 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownButton_excluded);
8589
8590 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown, extends_extends({
8591 ref: ref
8592 }, props, {
8593 __self: DropdownButton_this,
8594 __source: {
8595 fileName: DropdownButton_jsxFileName,
8596 lineNumber: 110,
8597 columnNumber: 5
8598 }
8599 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_DropdownToggle, {
8600 id: id,
8601 href: href,
8602 size: size,
8603 variant: variant,
8604 disabled: disabled,
8605 childBsPrefix: bsPrefix,
8606 __self: DropdownButton_this,
8607 __source: {
8608 fileName: DropdownButton_jsxFileName,
8609 lineNumber: 111,
8610 columnNumber: 7
8611 }
8612 }, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_DropdownMenu, {
8613 align: menuAlign,
8614 role: menuRole,
8615 renderOnMount: renderMenuOnMount,
8616 rootCloseEvent: rootCloseEvent,
8617 __self: DropdownButton_this,
8618 __source: {
8619 fileName: DropdownButton_jsxFileName,
8620 lineNumber: 121,
8621 columnNumber: 7
8622 }
8623 }, children));
8624});
8625DropdownButton.displayName = 'DropdownButton';
8626DropdownButton.propTypes = DropdownButton_propTypes;
8627/* harmony default export */ const src_DropdownButton = (DropdownButton);
8628// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/all.js
8629var lib_all = __webpack_require__(946);
8630var all_default = /*#__PURE__*/__webpack_require__.n(lib_all);
8631;// CONCATENATED MODULE: ./src/Feedback.tsx
8632
8633
8634var Feedback_excluded = ["as", "className", "type", "tooltip"];
8635
8636var Feedback_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Feedback.tsx",
8637 Feedback_this = undefined;
8638
8639
8640
8641
8642var Feedback_propTypes = {
8643 /**
8644 * Specify whether the feedback is for valid or invalid fields
8645 *
8646 * @type {('valid'|'invalid')}
8647 */
8648 type: (prop_types_default()).string,
8649
8650 /** Display feedback as a tooltip. */
8651 tooltip: (prop_types_default()).bool,
8652 as: (prop_types_default()).elementType
8653};
8654var Feedback = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
8655function (_ref, ref) {
8656 var _ref$as = _ref.as,
8657 Component = _ref$as === void 0 ? 'div' : _ref$as,
8658 className = _ref.className,
8659 _ref$type = _ref.type,
8660 type = _ref$type === void 0 ? 'valid' : _ref$type,
8661 _ref$tooltip = _ref.tooltip,
8662 tooltip = _ref$tooltip === void 0 ? false : _ref$tooltip,
8663 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Feedback_excluded);
8664
8665 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
8666 ref: ref,
8667 className: classnames_default()(className, type + "-" + (tooltip ? 'tooltip' : 'feedback')),
8668 __self: Feedback_this,
8669 __source: {
8670 fileName: Feedback_jsxFileName,
8671 lineNumber: 41,
8672 columnNumber: 5
8673 }
8674 }));
8675});
8676Feedback.displayName = 'Feedback';
8677Feedback.propTypes = Feedback_propTypes;
8678/* harmony default export */ const src_Feedback = (Feedback);
8679;// CONCATENATED MODULE: ./src/FormContext.tsx
8680 // TODO
8681
8682var FormContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
8683 controlId: undefined
8684});
8685/* harmony default export */ const src_FormContext = (FormContext);
8686;// CONCATENATED MODULE: ./src/FormCheckInput.tsx
8687
8688
8689var FormCheckInput_excluded = ["id", "bsPrefix", "bsCustomPrefix", "className", "type", "isValid", "isInvalid", "isStatic", "as"];
8690
8691var FormCheckInput_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheckInput.tsx",
8692 FormCheckInput_this = undefined;
8693
8694
8695
8696
8697
8698
8699var FormCheckInput_propTypes = {
8700 /**
8701 * @default 'form-check-input'
8702 */
8703 bsPrefix: (prop_types_default()).string,
8704
8705 /**
8706 * A seperate bsPrefix used for custom controls
8707 *
8708 * @default 'custom-control'
8709 */
8710 bsCustomPrefix: (prop_types_default()).string,
8711
8712 /**
8713 * The underlying HTML element to use when rendering the FormCheckInput.
8714 *
8715 * @type {('input'|elementType)}
8716 */
8717 as: (prop_types_default()).elementType,
8718
8719 /** A HTML id attribute, necessary for proper form accessibility. */
8720 id: (prop_types_default()).string,
8721
8722 /** The type of checkable. */
8723 type: prop_types_default().oneOf(['radio', 'checkbox']).isRequired,
8724
8725 /**
8726 * A convenience prop shortcut for adding `position-static` to the input, for
8727 * correct styling when used without an FormCheckLabel
8728 */
8729 isStatic: (prop_types_default()).bool,
8730
8731 /** Manually style the input as valid */
8732 isValid: (prop_types_default()).bool,
8733
8734 /** Manually style the input as invalid */
8735 isInvalid: (prop_types_default()).bool
8736};
8737var FormCheckInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
8738 var id = _ref.id,
8739 bsPrefix = _ref.bsPrefix,
8740 bsCustomPrefix = _ref.bsCustomPrefix,
8741 className = _ref.className,
8742 _ref$type = _ref.type,
8743 type = _ref$type === void 0 ? 'checkbox' : _ref$type,
8744 _ref$isValid = _ref.isValid,
8745 isValid = _ref$isValid === void 0 ? false : _ref$isValid,
8746 _ref$isInvalid = _ref.isInvalid,
8747 isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
8748 isStatic = _ref.isStatic,
8749 _ref$as = _ref.as,
8750 Component = _ref$as === void 0 ? 'input' : _ref$as,
8751 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormCheckInput_excluded);
8752
8753 var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
8754 controlId = _useContext.controlId,
8755 custom = _useContext.custom;
8756
8757 var _ref2 = custom ? [bsCustomPrefix, 'custom-control-input'] : [bsPrefix, 'form-check-input'],
8758 prefix = _ref2[0],
8759 defaultPrefix = _ref2[1];
8760
8761 bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
8762 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
8763 ref: ref,
8764 type: type,
8765 id: id || controlId,
8766 className: classnames_default()(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid', isStatic && 'position-static'),
8767 __self: FormCheckInput_this,
8768 __source: {
8769 fileName: FormCheckInput_jsxFileName,
8770 lineNumber: 88,
8771 columnNumber: 7
8772 }
8773 }));
8774});
8775FormCheckInput.displayName = 'FormCheckInput';
8776FormCheckInput.propTypes = FormCheckInput_propTypes;
8777/* harmony default export */ const src_FormCheckInput = (FormCheckInput);
8778;// CONCATENATED MODULE: ./src/FormCheckLabel.tsx
8779
8780
8781var FormCheckLabel_excluded = ["bsPrefix", "bsCustomPrefix", "className", "htmlFor"];
8782
8783var FormCheckLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheckLabel.tsx",
8784 FormCheckLabel_this = undefined;
8785
8786
8787
8788
8789
8790
8791var FormCheckLabel_propTypes = {
8792 /**
8793 * @default 'form-check-input'
8794 */
8795 bsPrefix: (prop_types_default()).string,
8796
8797 /**
8798 * A seperate bsPrefix used for custom controls
8799 *
8800 * @default 'custom-control'
8801 */
8802 bsCustomPrefix: (prop_types_default()).string,
8803
8804 /** The HTML for attribute for associating the label with an input */
8805 htmlFor: (prop_types_default()).string
8806};
8807var FormCheckLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
8808 var bsPrefix = _ref.bsPrefix,
8809 bsCustomPrefix = _ref.bsCustomPrefix,
8810 className = _ref.className,
8811 htmlFor = _ref.htmlFor,
8812 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormCheckLabel_excluded);
8813
8814 var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
8815 controlId = _useContext.controlId,
8816 custom = _useContext.custom;
8817
8818 var _ref2 = custom ? [bsCustomPrefix, 'custom-control-label'] : [bsPrefix, 'form-check-label'],
8819 prefix = _ref2[0],
8820 defaultPrefix = _ref2[1];
8821
8822 bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
8823 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", extends_extends({}, props, {
8824 ref: ref,
8825 htmlFor: htmlFor || controlId,
8826 className: classnames_default()(className, bsPrefix),
8827 __self: FormCheckLabel_this,
8828 __source: {
8829 fileName: FormCheckLabel_jsxFileName,
8830 lineNumber: 42,
8831 columnNumber: 7
8832 }
8833 }));
8834});
8835FormCheckLabel.displayName = 'FormCheckLabel';
8836FormCheckLabel.propTypes = FormCheckLabel_propTypes;
8837/* harmony default export */ const src_FormCheckLabel = (FormCheckLabel);
8838;// CONCATENATED MODULE: ./src/FormCheck.tsx
8839
8840
8841var FormCheck_excluded = ["id", "bsPrefix", "bsCustomPrefix", "inline", "disabled", "isValid", "isInvalid", "feedbackTooltip", "feedback", "className", "style", "title", "type", "label", "children", "custom", "as"];
8842
8843var FormCheck_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheck.tsx",
8844 FormCheck_this = undefined;
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855var FormCheck_propTypes = {
8856 /**
8857 * @default 'form-check'
8858 */
8859 bsPrefix: (prop_types_default()).string,
8860
8861 /**
8862 * A seperate bsPrefix used for custom controls
8863 *
8864 * @default 'custom-control'
8865 */
8866 bsCustomPrefix: (prop_types_default()).string,
8867
8868 /**
8869 * The FormCheck `ref` will be forwarded to the underlying input element,
8870 * which means it will be a DOM node, when resolved.
8871 *
8872 * @type {ReactRef}
8873 * @alias ref
8874 */
8875 _ref: (prop_types_default()).any,
8876
8877 /**
8878 * The underlying HTML element to use when rendering the FormCheck.
8879 *
8880 * @type {('input'|elementType)}
8881 */
8882 as: (prop_types_default()).elementType,
8883
8884 /**
8885 * A HTML id attribute, necessary for proper form accessibility.
8886 * An id is recommended for allowing label clicks to toggle the check control.
8887 *
8888 * This is **required** for custom check controls or when `type="switch"` due to
8889 * how they are rendered.
8890 */
8891 id: (prop_types_default()).string,
8892
8893 /**
8894 * Provide a function child to manually handle the layout of the FormCheck's inner components.
8895 *
8896 * ```jsx
8897 * <FormCheck>
8898 * <FormCheck.Input isInvalid type={radio} />
8899 * <FormCheck.Label>Allow us to contact you?</FormCheck.Label>
8900 * <Feedback type="invalid">Yo this is required</Feedback>
8901 * </FormCheck>
8902 * ```
8903 */
8904 children: (prop_types_default()).node,
8905
8906 /**
8907 * Groups controls horizontally with other `FormCheck`s.
8908 */
8909 inline: (prop_types_default()).bool,
8910
8911 /**
8912 * Disables the control.
8913 */
8914 disabled: (prop_types_default()).bool,
8915
8916 /**
8917 * `title` attribute for the underlying `FormCheckLabel`.
8918 */
8919 title: (prop_types_default()).string,
8920
8921 /**
8922 * Label for the control.
8923 */
8924 label: (prop_types_default()).node,
8925
8926 /** Use Bootstrap's custom form elements to replace the browser defaults */
8927 custom: all_default()((prop_types_default()).bool, function (_ref) {
8928 var custom = _ref.custom,
8929 id = _ref.id;
8930 return custom && !id ? Error('Custom check controls require an id to work') : null;
8931 }),
8932
8933 /**
8934 * The type of checkable.
8935 * @type {('radio' | 'checkbox' | 'switch')}
8936 */
8937 type: all_default()(prop_types_default().oneOf(['radio', 'checkbox', 'switch']).isRequired, function (_ref2) {
8938 var type = _ref2.type,
8939 custom = _ref2.custom;
8940 return type === 'switch' && custom === false ? Error('`custom` cannot be set to `false` when the type is `switch`') : null;
8941 }, function (_ref3) {
8942 var type = _ref3.type,
8943 id = _ref3.id;
8944 return type === 'switch' && !id ? Error('`id` must be defined when the type is `switch`') : null;
8945 }),
8946
8947 /** Manually style the input as valid */
8948 isValid: (prop_types_default()).bool,
8949
8950 /** Manually style the input as invalid */
8951 isInvalid: (prop_types_default()).bool,
8952
8953 /** Display feedback as a tooltip. */
8954 feedbackTooltip: (prop_types_default()).bool,
8955
8956 /** A message to display when the input is in a validation state */
8957 feedback: (prop_types_default()).node
8958};
8959var FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref4, ref) {
8960 var id = _ref4.id,
8961 bsPrefix = _ref4.bsPrefix,
8962 bsCustomPrefix = _ref4.bsCustomPrefix,
8963 _ref4$inline = _ref4.inline,
8964 inline = _ref4$inline === void 0 ? false : _ref4$inline,
8965 _ref4$disabled = _ref4.disabled,
8966 disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
8967 _ref4$isValid = _ref4.isValid,
8968 isValid = _ref4$isValid === void 0 ? false : _ref4$isValid,
8969 _ref4$isInvalid = _ref4.isInvalid,
8970 isInvalid = _ref4$isInvalid === void 0 ? false : _ref4$isInvalid,
8971 _ref4$feedbackTooltip = _ref4.feedbackTooltip,
8972 feedbackTooltip = _ref4$feedbackTooltip === void 0 ? false : _ref4$feedbackTooltip,
8973 feedback = _ref4.feedback,
8974 className = _ref4.className,
8975 style = _ref4.style,
8976 _ref4$title = _ref4.title,
8977 title = _ref4$title === void 0 ? '' : _ref4$title,
8978 _ref4$type = _ref4.type,
8979 type = _ref4$type === void 0 ? 'checkbox' : _ref4$type,
8980 label = _ref4.label,
8981 children = _ref4.children,
8982 propCustom = _ref4.custom,
8983 _ref4$as = _ref4.as,
8984 as = _ref4$as === void 0 ? 'input' : _ref4$as,
8985 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref4, FormCheck_excluded);
8986
8987 var custom = type === 'switch' ? true : propCustom;
8988
8989 var _ref5 = custom ? [bsCustomPrefix, 'custom-control'] : [bsPrefix, 'form-check'],
8990 prefix = _ref5[0],
8991 defaultPrefix = _ref5[1];
8992
8993 bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
8994
8995 var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
8996 controlId = _useContext.controlId;
8997
8998 var innerFormContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
8999 return {
9000 controlId: id || controlId,
9001 custom: custom
9002 };
9003 }, [controlId, custom, id]);
9004 var hasLabel = custom || label != null && label !== false && !children;
9005 var input = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormCheckInput, extends_extends({}, props, {
9006 type: type === 'switch' ? 'checkbox' : type,
9007 ref: ref,
9008 isValid: isValid,
9009 isInvalid: isInvalid,
9010 isStatic: !hasLabel,
9011 disabled: disabled,
9012 as: as,
9013 __self: FormCheck_this,
9014 __source: {
9015 fileName: FormCheck_jsxFileName,
9016 lineNumber: 186,
9017 columnNumber: 7
9018 }
9019 }));
9020 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormContext.Provider, {
9021 value: innerFormContext,
9022 __self: FormCheck_this,
9023 __source: {
9024 fileName: FormCheck_jsxFileName,
9025 lineNumber: 199,
9026 columnNumber: 7
9027 }
9028 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
9029 style: style,
9030 className: classnames_default()(className, bsPrefix, custom && "custom-" + type, inline && bsPrefix + "-inline"),
9031 __self: FormCheck_this,
9032 __source: {
9033 fileName: FormCheck_jsxFileName,
9034 lineNumber: 200,
9035 columnNumber: 9
9036 }
9037 }, children || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, input, hasLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormCheckLabel, {
9038 title: title,
9039 __self: FormCheck_this,
9040 __source: {
9041 fileName: FormCheck_jsxFileName,
9042 lineNumber: 213,
9043 columnNumber: 17
9044 }
9045 }, label), (isValid || isInvalid) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Feedback, {
9046 type: isValid ? 'valid' : 'invalid',
9047 tooltip: feedbackTooltip,
9048 __self: FormCheck_this,
9049 __source: {
9050 fileName: FormCheck_jsxFileName,
9051 lineNumber: 216,
9052 columnNumber: 17
9053 }
9054 }, feedback))));
9055});
9056FormCheck.displayName = 'FormCheck';
9057FormCheck.propTypes = FormCheck_propTypes;
9058FormCheck.Input = src_FormCheckInput;
9059FormCheck.Label = src_FormCheckLabel;
9060/* harmony default export */ const src_FormCheck = (FormCheck);
9061;// CONCATENATED MODULE: ./src/FormFileInput.tsx
9062
9063
9064var FormFileInput_excluded = ["id", "bsPrefix", "bsCustomPrefix", "className", "isValid", "isInvalid", "lang", "as"];
9065
9066var FormFileInput_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormFileInput.tsx",
9067 FormFileInput_this = undefined;
9068
9069
9070
9071
9072
9073
9074var FormFileInput_propTypes = {
9075 /**
9076 * @default 'form-file-input'
9077 */
9078 bsPrefix: (prop_types_default()).string,
9079
9080 /**
9081 * A seperate bsPrefix used for custom controls
9082 *
9083 * @default 'custom-file-input'
9084 */
9085 bsCustomPrefix: (prop_types_default()).string,
9086
9087 /**
9088 * The underlying HTML element to use when rendering the FormFileInput.
9089 *
9090 * @type {('input'|elementType)}
9091 */
9092 as: (prop_types_default()).elementType,
9093
9094 /** A HTML id attribute, necessary for proper form accessibility. */
9095 id: (prop_types_default()).string,
9096
9097 /** Manually style the input as valid */
9098 isValid: (prop_types_default()).bool,
9099
9100 /** Manually style the input as invalid */
9101 isInvalid: (prop_types_default()).bool,
9102
9103 /** The language for the button when using custom file input and SCSS based strings */
9104 lang: (prop_types_default()).string
9105};
9106var FormFileInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
9107 var id = _ref.id,
9108 bsPrefix = _ref.bsPrefix,
9109 bsCustomPrefix = _ref.bsCustomPrefix,
9110 className = _ref.className,
9111 isValid = _ref.isValid,
9112 isInvalid = _ref.isInvalid,
9113 lang = _ref.lang,
9114 _ref$as = _ref.as,
9115 Component = _ref$as === void 0 ? 'input' : _ref$as,
9116 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormFileInput_excluded);
9117
9118 var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
9119 controlId = _useContext.controlId,
9120 custom = _useContext.custom;
9121
9122 var type = 'file';
9123
9124 var _ref2 = custom ? [bsCustomPrefix, 'custom-file-input'] : [bsPrefix, 'form-control-file'],
9125 prefix = _ref2[0],
9126 defaultPrefix = _ref2[1];
9127
9128 bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
9129 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
9130 ref: ref,
9131 id: id || controlId,
9132 type: type,
9133 lang: lang,
9134 className: classnames_default()(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid'),
9135 __self: FormFileInput_this,
9136 __source: {
9137 fileName: FormFileInput_jsxFileName,
9138 lineNumber: 83,
9139 columnNumber: 7
9140 }
9141 }));
9142});
9143FormFileInput.displayName = 'FormFileInput';
9144FormFileInput.propTypes = FormFileInput_propTypes;
9145/* harmony default export */ const src_FormFileInput = (FormFileInput);
9146;// CONCATENATED MODULE: ./src/FormFileLabel.tsx
9147
9148
9149var FormFileLabel_excluded = ["bsPrefix", "bsCustomPrefix", "className", "htmlFor"];
9150
9151var FormFileLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormFileLabel.tsx",
9152 FormFileLabel_this = undefined;
9153
9154
9155
9156
9157
9158
9159var FormFileLabel_propTypes = {
9160 /**
9161 * @default 'form-file-input'
9162 */
9163 bsPrefix: (prop_types_default()).string,
9164
9165 /**
9166 * A seperate bsPrefix used for custom controls
9167 *
9168 * @default 'custom-file-label'
9169 */
9170 bsCustomPrefix: (prop_types_default()).string,
9171
9172 /** The HTML for attribute for associating the label with an input */
9173 htmlFor: (prop_types_default()).string,
9174
9175 /** The string for the "Browse" text label when using custom file input */
9176 'data-browse': (prop_types_default()).string
9177};
9178var FormFileLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
9179 var bsPrefix = _ref.bsPrefix,
9180 bsCustomPrefix = _ref.bsCustomPrefix,
9181 className = _ref.className,
9182 htmlFor = _ref.htmlFor,
9183 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormFileLabel_excluded);
9184
9185 var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
9186 controlId = _useContext.controlId,
9187 custom = _useContext.custom;
9188
9189 var _ref2 = custom ? [bsCustomPrefix, 'custom-file-label'] : [bsPrefix, 'form-file-label'],
9190 prefix = _ref2[0],
9191 defaultPrefix = _ref2[1];
9192
9193 bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
9194 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", extends_extends({}, props, {
9195 ref: ref,
9196 htmlFor: htmlFor || controlId,
9197 className: classnames_default()(className, bsPrefix),
9198 "data-browse": props['data-browse'],
9199 __self: FormFileLabel_this,
9200 __source: {
9201 fileName: FormFileLabel_jsxFileName,
9202 lineNumber: 53,
9203 columnNumber: 5
9204 }
9205 }));
9206});
9207FormFileLabel.displayName = 'FormFileLabel';
9208FormFileLabel.propTypes = FormFileLabel_propTypes;
9209/* harmony default export */ const src_FormFileLabel = (FormFileLabel);
9210;// CONCATENATED MODULE: ./src/FormFile.tsx
9211
9212
9213var FormFile_excluded = ["id", "bsPrefix", "bsCustomPrefix", "disabled", "isValid", "isInvalid", "feedbackTooltip", "feedback", "className", "style", "label", "children", "custom", "lang", "data-browse", "as", "inputAs"];
9214
9215var FormFile_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormFile.tsx",
9216 FormFile_this = undefined;
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227var FormFile_propTypes = {
9228 /**
9229 * @default 'form-file'
9230 */
9231 bsPrefix: (prop_types_default()).string,
9232
9233 /**
9234 * A seperate bsPrefix used for custom controls
9235 *
9236 * @default 'custom-file'
9237 */
9238 bsCustomPrefix: (prop_types_default()).string,
9239
9240 /**
9241 * The wrapping HTML element to use when rendering the FormFile.
9242 *
9243 * @type {('div'|elementType)}
9244 */
9245 as: (prop_types_default()).elementType,
9246
9247 /**
9248 * The underlying HTML element to use when rendering the FormFile.
9249 *
9250 * @type {('input'|elementType)}
9251 */
9252 inputAs: (prop_types_default()).elementType,
9253
9254 /** A HTML id attribute, necessary for proper form accessibility. */
9255 id: (prop_types_default()).string,
9256
9257 /**
9258 * Provide a function child to manually handle the layout of the FormFile's inner components.
9259 *
9260 * If not using the custom prop <code>FormFile.Label></code> should be before <code><FormFile.Input isInvalid /></code>
9261 * ```jsx
9262 * <FormFile>
9263 * <FormFile.Label>Allow us to contact you?</FormFile.Label>
9264 * <FormFile.Input isInvalid />
9265 * <Feedback type="invalid">Yo this is required</Feedback>
9266 * </FormFile>
9267 * ```
9268 *
9269 * If using the custom prop <code><FormFile.Input isInvalid /></code> should be before <code>FormFile.Label></code>
9270 * ```jsx
9271 * <FormFile custom>
9272 * <FormFile.Input isInvalid />
9273 * <FormFile.Label>Allow us to contact you?</FormFile.Label>
9274 * <Feedback type="invalid">Yo this is required</Feedback>
9275 * </FormFile>
9276 * ```
9277 */
9278 children: (prop_types_default()).node,
9279 disabled: (prop_types_default()).bool,
9280 label: (prop_types_default()).node,
9281
9282 /** Use Bootstrap's custom form elements to replace the browser defaults */
9283 custom: (prop_types_default()).bool,
9284
9285 /** Manually style the input as valid */
9286 isValid: (prop_types_default()).bool,
9287
9288 /** Manually style the input as invalid */
9289 isInvalid: (prop_types_default()).bool,
9290
9291 /** Display feedback as a tooltip. */
9292 feedbackTooltip: (prop_types_default()).bool,
9293
9294 /** A message to display when the input is in a validation state */
9295 feedback: (prop_types_default()).node,
9296
9297 /**
9298 * The string for the "Browse" text label when using custom file input
9299 *
9300 * @type string
9301 */
9302 'data-browse': all_default()((prop_types_default()).string, function (_ref) {
9303 var custom = _ref.custom,
9304 dataBrowse = _ref['data-browse'];
9305 return dataBrowse && !custom ? Error('`data-browse` attribute value will only be used when custom is `true`') : null;
9306 }),
9307
9308 /** The language for the button when using custom file input and SCSS based strings */
9309 lang: all_default()((prop_types_default()).string, function (_ref2) {
9310 var custom = _ref2.custom,
9311 lang = _ref2.lang;
9312 return lang && !custom ? Error('`lang` can only be set when custom is `true`') : null;
9313 })
9314};
9315var FormFile = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref3, ref) {
9316 var id = _ref3.id,
9317 bsPrefix = _ref3.bsPrefix,
9318 bsCustomPrefix = _ref3.bsCustomPrefix,
9319 _ref3$disabled = _ref3.disabled,
9320 disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
9321 _ref3$isValid = _ref3.isValid,
9322 isValid = _ref3$isValid === void 0 ? false : _ref3$isValid,
9323 _ref3$isInvalid = _ref3.isInvalid,
9324 isInvalid = _ref3$isInvalid === void 0 ? false : _ref3$isInvalid,
9325 _ref3$feedbackTooltip = _ref3.feedbackTooltip,
9326 feedbackTooltip = _ref3$feedbackTooltip === void 0 ? false : _ref3$feedbackTooltip,
9327 feedback = _ref3.feedback,
9328 className = _ref3.className,
9329 style = _ref3.style,
9330 label = _ref3.label,
9331 children = _ref3.children,
9332 custom = _ref3.custom,
9333 lang = _ref3.lang,
9334 dataBrowse = _ref3['data-browse'],
9335 _ref3$as = _ref3.as,
9336 Component = _ref3$as === void 0 ? 'div' : _ref3$as,
9337 _ref3$inputAs = _ref3.inputAs,
9338 inputAs = _ref3$inputAs === void 0 ? 'input' : _ref3$inputAs,
9339 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref3, FormFile_excluded);
9340
9341 var _ref4 = custom ? [bsCustomPrefix, 'custom'] : [bsPrefix, 'form-file'],
9342 prefix = _ref4[0],
9343 defaultPrefix = _ref4[1];
9344
9345 bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
9346 var type = 'file';
9347
9348 var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
9349 controlId = _useContext.controlId;
9350
9351 var innerFormContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
9352 return {
9353 controlId: id || controlId,
9354 custom: custom
9355 };
9356 }, [controlId, custom, id]);
9357 var hasLabel = label != null && label !== false && !children;
9358 var input = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormFileInput, extends_extends({}, props, {
9359 ref: ref,
9360 isValid: isValid,
9361 isInvalid: isInvalid,
9362 disabled: disabled,
9363 as: inputAs,
9364 lang: lang,
9365 __self: FormFile_this,
9366 __source: {
9367 fileName: FormFile_jsxFileName,
9368 lineNumber: 176,
9369 columnNumber: 7
9370 }
9371 }));
9372 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormContext.Provider, {
9373 value: innerFormContext,
9374 __self: FormFile_this,
9375 __source: {
9376 fileName: FormFile_jsxFileName,
9377 lineNumber: 188,
9378 columnNumber: 7
9379 }
9380 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, {
9381 style: style,
9382 className: classnames_default()(className, bsPrefix, custom && "custom-" + type),
9383 __self: FormFile_this,
9384 __source: {
9385 fileName: FormFile_jsxFileName,
9386 lineNumber: 189,
9387 columnNumber: 9
9388 }
9389 }, children || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, custom ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, input, hasLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormFileLabel, {
9390 "data-browse": dataBrowse,
9391 __self: FormFile_this,
9392 __source: {
9393 fileName: FormFile_jsxFileName,
9394 lineNumber: 203,
9395 columnNumber: 21
9396 }
9397 }, label)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, hasLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormFileLabel, {
9398 __self: FormFile_this,
9399 __source: {
9400 fileName: FormFile_jsxFileName,
9401 lineNumber: 210,
9402 columnNumber: 32
9403 }
9404 }, label), input), (isValid || isInvalid) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Feedback, {
9405 type: isValid ? 'valid' : 'invalid',
9406 tooltip: feedbackTooltip,
9407 __self: FormFile_this,
9408 __source: {
9409 fileName: FormFile_jsxFileName,
9410 lineNumber: 215,
9411 columnNumber: 17
9412 }
9413 }, feedback))));
9414});
9415FormFile.displayName = 'FormFile';
9416FormFile.propTypes = FormFile_propTypes;
9417FormFile.Input = src_FormFileInput;
9418FormFile.Label = src_FormFileLabel;
9419/* harmony default export */ const src_FormFile = (FormFile);
9420;// CONCATENATED MODULE: ./src/FormControl.tsx
9421
9422
9423var FormControl_excluded = ["bsPrefix", "bsCustomPrefix", "type", "size", "htmlSize", "id", "className", "isValid", "isInvalid", "plaintext", "readOnly", "custom", "as"];
9424
9425var FormControl_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormControl.tsx",
9426 FormControl_this = undefined;
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436var FormControl_propTypes = {
9437 /**
9438 * @default {'form-control'}
9439 */
9440 bsPrefix: (prop_types_default()).string,
9441
9442 /**
9443 * A seperate bsPrefix used for custom controls
9444 *
9445 * @default 'custom'
9446 */
9447 bsCustomPrefix: (prop_types_default()).string,
9448
9449 /**
9450 * The FormControl `ref` will be forwarded to the underlying input element,
9451 * which means unless `as` is a composite component,
9452 * it will be a DOM node, when resolved.
9453 *
9454 * @type {ReactRef}
9455 * @alias ref
9456 */
9457 _ref: (prop_types_default()).any,
9458
9459 /**
9460 * Input size variants
9461 *
9462 * @type {('sm'|'lg')}
9463 */
9464 size: (prop_types_default()).string,
9465
9466 /**
9467 * The size attribute of the underlying HTML element.
9468 * Specifies the visible width in characters if `as` is `'input'`.
9469 * Specifies the number of visible options if `as` is `'select'`.
9470 */
9471 htmlSize: (prop_types_default()).number,
9472
9473 /**
9474 * The underlying HTML element to use when rendering the FormControl.
9475 *
9476 * @type {('input'|'textarea'|'select'|elementType)}
9477 */
9478 as: (prop_types_default()).elementType,
9479
9480 /**
9481 * Render the input as plain text. Generally used along side `readOnly`.
9482 */
9483 plaintext: (prop_types_default()).bool,
9484
9485 /** Make the control readonly */
9486 readOnly: (prop_types_default()).bool,
9487
9488 /** Make the control disabled */
9489 disabled: (prop_types_default()).bool,
9490
9491 /**
9492 * The `value` attribute of underlying input
9493 *
9494 * @controllable onChange
9495 * */
9496 value: prop_types_default().oneOfType([(prop_types_default()).string, prop_types_default().arrayOf((prop_types_default()).string), (prop_types_default()).number]),
9497
9498 /** A callback fired when the `value` prop changes */
9499 onChange: (prop_types_default()).func,
9500
9501 /**
9502 * Use Bootstrap's custom form elements to replace the browser defaults
9503 * @type boolean
9504 */
9505 custom: all_default()((prop_types_default()).bool, function (_ref) {
9506 var as = _ref.as,
9507 type = _ref.type,
9508 custom = _ref.custom;
9509 return custom === true && type !== 'range' && as !== 'select' ? Error('`custom` can only be set to `true` when the input type is `range`, or `select`') : null;
9510 }),
9511
9512 /**
9513 * The HTML input `type`, which is only relevant if `as` is `'input'` (the default).
9514 */
9515 type: (prop_types_default()).string,
9516
9517 /**
9518 * Uses `controlId` from `<FormGroup>` if not explicitly specified.
9519 */
9520 id: (prop_types_default()).string,
9521
9522 /** Add "valid" validation styles to the control */
9523 isValid: (prop_types_default()).bool,
9524
9525 /** Add "invalid" validation styles to the control and accompanying label */
9526 isInvalid: (prop_types_default()).bool
9527};
9528var FormControl = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref2, ref) {
9529 var bsPrefix = _ref2.bsPrefix,
9530 bsCustomPrefix = _ref2.bsCustomPrefix,
9531 type = _ref2.type,
9532 size = _ref2.size,
9533 htmlSize = _ref2.htmlSize,
9534 id = _ref2.id,
9535 className = _ref2.className,
9536 _ref2$isValid = _ref2.isValid,
9537 isValid = _ref2$isValid === void 0 ? false : _ref2$isValid,
9538 _ref2$isInvalid = _ref2.isInvalid,
9539 isInvalid = _ref2$isInvalid === void 0 ? false : _ref2$isInvalid,
9540 plaintext = _ref2.plaintext,
9541 readOnly = _ref2.readOnly,
9542 custom = _ref2.custom,
9543 _ref2$as = _ref2.as,
9544 Component = _ref2$as === void 0 ? 'input' : _ref2$as,
9545 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, FormControl_excluded);
9546
9547 var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
9548 controlId = _useContext.controlId;
9549
9550 var _ref3 = custom ? [bsCustomPrefix, 'custom'] : [bsPrefix, 'form-control'],
9551 prefix = _ref3[0],
9552 defaultPrefix = _ref3[1];
9553
9554 bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
9555 var classes;
9556
9557 if (plaintext) {
9558 var _classes;
9559
9560 classes = (_classes = {}, _classes[bsPrefix + "-plaintext"] = true, _classes);
9561 } else if (type === 'file') {
9562 var _classes2;
9563
9564 classes = (_classes2 = {}, _classes2[bsPrefix + "-file"] = true, _classes2);
9565 } else if (type === 'range') {
9566 var _classes3;
9567
9568 classes = (_classes3 = {}, _classes3[bsPrefix + "-range"] = true, _classes3);
9569 } else if (Component === 'select' && custom) {
9570 var _classes4;
9571
9572 classes = (_classes4 = {}, _classes4[bsPrefix + "-select"] = true, _classes4[bsPrefix + "-select-" + size] = size, _classes4);
9573 } else {
9574 var _classes5;
9575
9576 classes = (_classes5 = {}, _classes5[bsPrefix] = true, _classes5[bsPrefix + "-" + size] = size, _classes5);
9577 }
9578
9579 false ? 0 : void 0;
9580 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
9581 type: type,
9582 size: htmlSize,
9583 ref: ref,
9584 readOnly: readOnly,
9585 id: id || controlId,
9586 className: classnames_default()(className, classes, isValid && "is-valid", isInvalid && "is-invalid"),
9587 __self: FormControl_this,
9588 __source: {
9589 fileName: FormControl_jsxFileName,
9590 lineNumber: 185,
9591 columnNumber: 7
9592 }
9593 }));
9594});
9595FormControl.displayName = 'FormControl';
9596FormControl.propTypes = FormControl_propTypes;
9597/* harmony default export */ const src_FormControl = (Object.assign(FormControl, {
9598 Feedback: src_Feedback
9599}));
9600;// CONCATENATED MODULE: ./src/FormGroup.tsx
9601
9602
9603var FormGroup_excluded = ["bsPrefix", "className", "children", "controlId", "as"];
9604
9605var FormGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormGroup.tsx",
9606 FormGroup_this = undefined;
9607
9608
9609
9610
9611
9612
9613var FormGroup_propTypes = {
9614 /**
9615 * @default 'form-group'
9616 */
9617 bsPrefix: (prop_types_default()).string,
9618 as: (prop_types_default()).elementType,
9619
9620 /**
9621 * Sets `id` on `<FormControl>` and `htmlFor` on `<FormGroup.Label>`.
9622 */
9623 controlId: (prop_types_default()).string,
9624
9625 /**
9626 * The FormGroup `ref` will be forwarded to the underlying element.
9627 * Unless the FormGroup is rendered `as` a composite component,
9628 * it will be a DOM node, when resolved.
9629 *
9630 * @type {ReactRef}
9631 * @alias ref
9632 */
9633 _ref: (prop_types_default()).any
9634};
9635var FormGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
9636 var bsPrefix = _ref.bsPrefix,
9637 className = _ref.className,
9638 children = _ref.children,
9639 controlId = _ref.controlId,
9640 _ref$as = _ref.as,
9641 Component = _ref$as === void 0 ? 'div' : _ref$as,
9642 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormGroup_excluded);
9643
9644 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-group');
9645 var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
9646 return {
9647 controlId: controlId
9648 };
9649 }, [controlId]);
9650 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormContext.Provider, {
9651 value: context,
9652 __self: FormGroup_this,
9653 __source: {
9654 fileName: FormGroup_jsxFileName,
9655 lineNumber: 59,
9656 columnNumber: 7
9657 }
9658 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
9659 ref: ref,
9660 className: classnames_default()(className, bsPrefix),
9661 __self: FormGroup_this,
9662 __source: {
9663 fileName: FormGroup_jsxFileName,
9664 lineNumber: 60,
9665 columnNumber: 9
9666 }
9667 }), children));
9668});
9669FormGroup.displayName = 'FormGroup';
9670FormGroup.propTypes = FormGroup_propTypes;
9671/* harmony default export */ const src_FormGroup = (FormGroup);
9672;// CONCATENATED MODULE: ./src/FormLabel.tsx
9673
9674
9675var FormLabel_excluded = ["as", "bsPrefix", "column", "srOnly", "className", "htmlFor"];
9676
9677var FormLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormLabel.tsx",
9678 FormLabel_this = undefined;
9679
9680
9681
9682
9683
9684
9685
9686
9687var FormLabel_propTypes = {
9688 /**
9689 * @default 'form-label'
9690 */
9691 bsPrefix: (prop_types_default()).string,
9692
9693 /**
9694 * Uses `controlId` from `<FormGroup>` if not explicitly specified.
9695 */
9696 htmlFor: (prop_types_default()).string,
9697
9698 /**
9699 * Renders the FormLabel as a `<Col>` component (accepting all the same props),
9700 * as well as adding additional styling for horizontal forms.
9701 */
9702 column: prop_types_default().oneOfType([(prop_types_default()).bool, prop_types_default().oneOf(['sm', 'lg'])]),
9703
9704 /**
9705 * The FormLabel `ref` will be forwarded to the underlying element.
9706 * Unless the FormLabel is rendered `as` a composite component,
9707 * it will be a DOM node, when resolved.
9708 *
9709 * @type {ReactRef}
9710 * @alias ref
9711 */
9712 _ref: (prop_types_default()).any,
9713
9714 /**
9715 * Hides the label visually while still allowing it to be
9716 * read by assistive technologies.
9717 */
9718 srOnly: (prop_types_default()).bool,
9719
9720 /** Set a custom element for this component */
9721 as: (prop_types_default()).elementType
9722};
9723var FormLabel_defaultProps = {
9724 column: false,
9725 srOnly: false
9726};
9727var FormLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
9728 var _ref$as = _ref.as,
9729 Component = _ref$as === void 0 ? 'label' : _ref$as,
9730 bsPrefix = _ref.bsPrefix,
9731 column = _ref.column,
9732 srOnly = _ref.srOnly,
9733 className = _ref.className,
9734 htmlFor = _ref.htmlFor,
9735 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormLabel_excluded);
9736
9737 var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
9738 controlId = _useContext.controlId;
9739
9740 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');
9741 var columnClass = 'col-form-label';
9742 if (typeof column === 'string') columnClass = columnClass + " " + columnClass + "-" + column;
9743 var classes = classnames_default()(className, bsPrefix, srOnly && 'sr-only', column && columnClass);
9744 false ? 0 : void 0;
9745 htmlFor = htmlFor || controlId;
9746 if (column) return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Col, extends_extends({
9747 ref: ref,
9748 as: "label",
9749 className: classes,
9750 htmlFor: htmlFor
9751 }, props, {
9752 __self: FormLabel_this,
9753 __source: {
9754 fileName: FormLabel_jsxFileName,
9755 lineNumber: 110,
9756 columnNumber: 9
9757 }
9758 }));
9759 return (
9760 /*#__PURE__*/
9761 // eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control
9762 external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
9763 ref: ref,
9764 className: classes,
9765 htmlFor: htmlFor
9766 }, props, {
9767 __self: FormLabel_this,
9768 __source: {
9769 fileName: FormLabel_jsxFileName,
9770 lineNumber: 121,
9771 columnNumber: 7
9772 }
9773 }))
9774 );
9775});
9776FormLabel.displayName = 'FormLabel';
9777FormLabel.propTypes = FormLabel_propTypes;
9778FormLabel.defaultProps = FormLabel_defaultProps;
9779/* harmony default export */ const src_FormLabel = (FormLabel);
9780;// CONCATENATED MODULE: ./src/FormText.tsx
9781
9782
9783var FormText_excluded = ["bsPrefix", "className", "as", "muted"];
9784
9785var FormText_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormText.tsx",
9786 FormText_this = undefined;
9787
9788
9789
9790
9791
9792var FormText_propTypes = {
9793 /** @default 'form-text' */
9794 bsPrefix: (prop_types_default()).string,
9795
9796 /**
9797 * The FormText `ref` will be forwarded to the underlying element.
9798 * Unless the FormText is rendered `as` a composite component,
9799 * it will be a DOM node, when resolved.
9800 *
9801 * @type {ReactRef}
9802 * @alias ref
9803 */
9804 _ref: (prop_types_default()).any,
9805
9806 /**
9807 * A convenience prop for add the `text-muted` class,
9808 * since it's so commonly used here.
9809 */
9810 muted: (prop_types_default()).bool,
9811 as: (prop_types_default()).elementType
9812};
9813var FormText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
9814function (_ref, ref) {
9815 var bsPrefix = _ref.bsPrefix,
9816 className = _ref.className,
9817 _ref$as = _ref.as,
9818 Component = _ref$as === void 0 ? 'small' : _ref$as,
9819 muted = _ref.muted,
9820 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormText_excluded);
9821
9822 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');
9823 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
9824 ref: ref,
9825 className: classnames_default()(className, bsPrefix, muted && 'text-muted'),
9826 __self: FormText_this,
9827 __source: {
9828 fileName: FormText_jsxFileName,
9829 lineNumber: 44,
9830 columnNumber: 7
9831 }
9832 }));
9833});
9834FormText.displayName = 'FormText';
9835FormText.propTypes = FormText_propTypes;
9836/* harmony default export */ const src_FormText = (FormText);
9837;// CONCATENATED MODULE: ./src/Switch.tsx
9838
9839
9840var Switch_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Switch.tsx",
9841 Switch_this = undefined;
9842
9843
9844
9845var Switch = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
9846 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormCheck, extends_extends({}, props, {
9847 ref: ref,
9848 type: "switch",
9849 __self: Switch_this,
9850 __source: {
9851 fileName: Switch_jsxFileName,
9852 lineNumber: 13,
9853 columnNumber: 19
9854 }
9855 }));
9856});
9857Switch.displayName = 'Switch';
9858Switch.Input = src_FormCheck.Input;
9859Switch.Label = src_FormCheck.Label;
9860/* harmony default export */ const src_Switch = (Switch);
9861;// CONCATENATED MODULE: ./src/Form.tsx
9862
9863
9864var Form_excluded = ["bsPrefix", "inline", "className", "validated", "as"];
9865
9866var Form_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Form.tsx",
9867 Form_this = undefined;
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881var FormRow = createWithBsPrefix('form-row');
9882var Form_propTypes = {
9883 /**
9884 * @default {'form'}
9885 */
9886 bsPrefix: (prop_types_default()).string,
9887
9888 /**
9889 * The Form `ref` will be forwarded to the underlying element,
9890 * which means, unless it's rendered `as` a composite component,
9891 * it will be a DOM node, when resolved.
9892 *
9893 * @type {ReactRef}
9894 * @alias ref
9895 */
9896 _ref: (prop_types_default()).any,
9897
9898 /**
9899 * Display the series of labels, form controls,
9900 * and buttons on a single horizontal row
9901 */
9902 inline: (prop_types_default()).bool,
9903
9904 /**
9905 * Mark a form as having been validated. Setting it to `true` will
9906 * toggle any validation styles on the forms elements.
9907 */
9908 validated: (prop_types_default()).bool,
9909 as: (prop_types_default()).elementType
9910};
9911var Form_defaultProps = {
9912 inline: false
9913};
9914var FormImpl = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
9915 var bsPrefix = _ref.bsPrefix,
9916 inline = _ref.inline,
9917 className = _ref.className,
9918 validated = _ref.validated,
9919 _ref$as = _ref.as,
9920 Component = _ref$as === void 0 ? 'form' : _ref$as,
9921 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Form_excluded);
9922
9923 bsPrefix = useBootstrapPrefix(bsPrefix, 'form');
9924 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
9925 ref: ref,
9926 className: classnames_default()(className, validated && 'was-validated', inline && bsPrefix + "-inline"),
9927 __self: Form_this,
9928 __source: {
9929 fileName: Form_jsxFileName,
9930 lineNumber: 84,
9931 columnNumber: 7
9932 }
9933 }));
9934});
9935FormImpl.displayName = 'Form';
9936FormImpl.propTypes = Form_propTypes;
9937FormImpl.defaultProps = Form_defaultProps;
9938FormImpl.Row = FormRow;
9939FormImpl.Group = src_FormGroup;
9940FormImpl.Control = src_FormControl;
9941FormImpl.Check = src_FormCheck;
9942FormImpl.File = src_FormFile;
9943FormImpl.Switch = src_Switch;
9944FormImpl.Label = src_FormLabel;
9945FormImpl.Text = src_FormText;
9946/* harmony default export */ const Form = (FormImpl);
9947;// CONCATENATED MODULE: ./src/Container.tsx
9948
9949
9950var Container_excluded = ["bsPrefix", "fluid", "as", "className"];
9951
9952var Container_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Container.tsx",
9953 Container_this = undefined;
9954
9955
9956
9957
9958
9959var containerSizes = prop_types_default().oneOfType([(prop_types_default()).bool, prop_types_default().oneOf(['sm', 'md', 'lg', 'xl'])]);
9960var Container_propTypes = {
9961 /**
9962 * @default 'container'
9963 */
9964 bsPrefix: (prop_types_default()).string,
9965
9966 /**
9967 * Allow the Container to fill all of its available horizontal space.
9968 * @type {(true|"sm"|"md"|"lg"|"xl")}
9969 */
9970 fluid: containerSizes,
9971
9972 /**
9973 * You can use a custom element for this component
9974 */
9975 as: (prop_types_default()).elementType
9976};
9977var Container_defaultProps = {
9978 fluid: false
9979};
9980var Container = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
9981 var bsPrefix = _ref.bsPrefix,
9982 fluid = _ref.fluid,
9983 _ref$as = _ref.as,
9984 Component = _ref$as === void 0 ? 'div' : _ref$as,
9985 className = _ref.className,
9986 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Container_excluded);
9987
9988 var prefix = useBootstrapPrefix(bsPrefix, 'container');
9989 var suffix = typeof fluid === 'string' ? "-" + fluid : '-fluid';
9990 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
9991 ref: ref
9992 }, props, {
9993 className: classnames_default()(className, fluid ? "" + prefix + suffix : prefix),
9994 __self: Container_this,
9995 __source: {
9996 fileName: Container_jsxFileName,
9997 lineNumber: 58,
9998 columnNumber: 7
9999 }
10000 }));
10001});
10002Container.displayName = 'Container';
10003Container.propTypes = Container_propTypes;
10004Container.defaultProps = Container_defaultProps;
10005/* harmony default export */ const src_Container = (Container);
10006;// CONCATENATED MODULE: ./src/Image.tsx
10007
10008
10009var Image_excluded = ["bsPrefix", "className", "fluid", "rounded", "roundedCircle", "thumbnail"];
10010
10011var Image_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Image.tsx",
10012 Image_this = undefined;
10013
10014
10015
10016
10017
10018var Image_propTypes = {
10019 /**
10020 * @default 'img'
10021 */
10022 bsPrefix: (prop_types_default()).string,
10023
10024 /**
10025 * Sets image as fluid image.
10026 */
10027 fluid: (prop_types_default()).bool,
10028
10029 /**
10030 * Sets image shape as rounded.
10031 */
10032 rounded: (prop_types_default()).bool,
10033
10034 /**
10035 * Sets image shape as circle.
10036 */
10037 roundedCircle: (prop_types_default()).bool,
10038
10039 /**
10040 * Sets image shape as thumbnail.
10041 */
10042 thumbnail: (prop_types_default()).bool
10043};
10044var Image_defaultProps = {
10045 fluid: false,
10046 rounded: false,
10047 roundedCircle: false,
10048 thumbnail: false
10049};
10050var Image = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
10051 var bsPrefix = _ref.bsPrefix,
10052 className = _ref.className,
10053 fluid = _ref.fluid,
10054 rounded = _ref.rounded,
10055 roundedCircle = _ref.roundedCircle,
10056 thumbnail = _ref.thumbnail,
10057 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Image_excluded);
10058
10059 bsPrefix = useBootstrapPrefix(bsPrefix, 'img');
10060 var classes = classnames_default()(fluid && bsPrefix + "-fluid", rounded && "rounded", roundedCircle && "rounded-circle", thumbnail && bsPrefix + "-thumbnail");
10061 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("img", extends_extends({
10062 // eslint-disable-line jsx-a11y/alt-text
10063 ref: ref
10064 }, props, {
10065 className: classnames_default()(className, classes),
10066 __self: Image_this,
10067 __source: {
10068 fileName: Image_jsxFileName,
10069 lineNumber: 66,
10070 columnNumber: 7
10071 }
10072 }));
10073});
10074Image.displayName = 'Image';
10075Image.propTypes = Image_propTypes;
10076Image.defaultProps = Image_defaultProps;
10077/* harmony default export */ const src_Image = (Image);
10078;// CONCATENATED MODULE: ./src/FigureImage.tsx
10079
10080
10081var FigureImage_excluded = ["className"];
10082
10083var FigureImage_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FigureImage.tsx",
10084 FigureImage_this = undefined;
10085
10086
10087
10088
10089var FigureImage_defaultProps = {
10090 fluid: true
10091};
10092var FigureImage = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
10093 var className = _ref.className,
10094 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FigureImage_excluded);
10095
10096 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Image, extends_extends({
10097 ref: ref
10098 }, props, {
10099 className: classnames_default()(className, 'figure-img'),
10100 __self: FigureImage_this,
10101 __source: {
10102 fileName: FigureImage_jsxFileName,
10103 lineNumber: 10,
10104 columnNumber: 5
10105 }
10106 }));
10107});
10108FigureImage.displayName = 'FigureImage';
10109FigureImage.propTypes = Image_propTypes;
10110FigureImage.defaultProps = FigureImage_defaultProps;
10111/* harmony default export */ const src_FigureImage = (FigureImage);
10112;// CONCATENATED MODULE: ./src/FigureCaption.tsx
10113
10114var FigureCaption = createWithBsPrefix('figure-caption', {
10115 Component: 'figcaption'
10116});
10117/* harmony default export */ const src_FigureCaption = (FigureCaption);
10118;// CONCATENATED MODULE: ./src/Figure.tsx
10119
10120
10121
10122var Figure = createWithBsPrefix('figure', {
10123 Component: 'figure'
10124});
10125Figure.Image = src_FigureImage;
10126Figure.Caption = src_FigureCaption;
10127/* harmony default export */ const src_Figure = (Figure);
10128;// CONCATENATED MODULE: ./src/InputGroup.tsx
10129
10130
10131var InputGroup_excluded = ["bsPrefix", "size", "hasValidation", "className", "as"];
10132
10133var InputGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/InputGroup.tsx",
10134 InputGroup_this = undefined;
10135
10136
10137
10138
10139
10140
10141var InputGroupAppend = createWithBsPrefix('input-group-append');
10142var InputGroupPrepend = createWithBsPrefix('input-group-prepend');
10143var InputGroupText = createWithBsPrefix('input-group-text', {
10144 Component: 'span'
10145});
10146
10147var InputGroupCheckbox = function InputGroupCheckbox(props) {
10148 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InputGroupText, {
10149 __self: InputGroup_this,
10150 __source: {
10151 fileName: InputGroup_jsxFileName,
10152 lineNumber: 19,
10153 columnNumber: 3
10154 }
10155 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", extends_extends({
10156 type: "checkbox"
10157 }, props, {
10158 __self: InputGroup_this,
10159 __source: {
10160 fileName: InputGroup_jsxFileName,
10161 lineNumber: 20,
10162 columnNumber: 5
10163 }
10164 })));
10165};
10166
10167var InputGroupRadio = function InputGroupRadio(props) {
10168 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InputGroupText, {
10169 __self: InputGroup_this,
10170 __source: {
10171 fileName: InputGroup_jsxFileName,
10172 lineNumber: 25,
10173 columnNumber: 3
10174 }
10175 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", extends_extends({
10176 type: "radio"
10177 }, props, {
10178 __self: InputGroup_this,
10179 __source: {
10180 fileName: InputGroup_jsxFileName,
10181 lineNumber: 26,
10182 columnNumber: 5
10183 }
10184 })));
10185};
10186
10187var InputGroup_propTypes = {
10188 /** @default 'input-group' */
10189 bsPrefix: (prop_types_default()).string,
10190
10191 /**
10192 * Control the size of buttons and form elements from the top-level.
10193 *
10194 * @type {('sm'|'lg')}
10195 */
10196 size: (prop_types_default()).string,
10197
10198 /**
10199 * Handles the input's rounded corners when using form validation.
10200 *
10201 * Use this when your input group contains both an input and feedback element.
10202 */
10203 hasValidation: (prop_types_default()).bool,
10204 as: (prop_types_default()).elementType
10205};
10206/**
10207 *
10208 * @property {InputGroupAppend} Append
10209 * @property {InputGroupPrepend} Prepend
10210 * @property {InputGroupText} Text
10211 * @property {InputGroupRadio} Radio
10212 * @property {InputGroupCheckbox} Checkbox
10213 */
10214
10215var InputGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
10216 var bsPrefix = _ref.bsPrefix,
10217 size = _ref.size,
10218 hasValidation = _ref.hasValidation,
10219 className = _ref.className,
10220 _ref$as = _ref.as,
10221 Component = _ref$as === void 0 ? 'div' : _ref$as,
10222 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, InputGroup_excluded);
10223
10224 bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group');
10225 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
10226 ref: ref
10227 }, props, {
10228 className: classnames_default()(className, bsPrefix, size && bsPrefix + "-" + size, hasValidation && 'has-validation'),
10229 __self: InputGroup_this,
10230 __source: {
10231 fileName: InputGroup_jsxFileName,
10232 lineNumber: 90,
10233 columnNumber: 7
10234 }
10235 }));
10236});
10237InputGroup.propTypes = InputGroup_propTypes;
10238InputGroup.displayName = 'InputGroup';
10239InputGroup.Text = InputGroupText;
10240InputGroup.Radio = InputGroupRadio;
10241InputGroup.Checkbox = InputGroupCheckbox;
10242InputGroup.Append = InputGroupAppend;
10243InputGroup.Prepend = InputGroupPrepend;
10244/* harmony default export */ const src_InputGroup = (InputGroup);
10245;// CONCATENATED MODULE: ./src/Jumbotron.tsx
10246
10247
10248var Jumbotron_excluded = ["as", "className", "fluid", "bsPrefix"];
10249
10250var Jumbotron_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Jumbotron.tsx",
10251 Jumbotron_this = undefined;
10252
10253
10254
10255
10256
10257var Jumbotron_propTypes = {
10258 as: (prop_types_default()).elementType,
10259
10260 /** Make the jumbotron full width, and without rounded corners */
10261 fluid: (prop_types_default()).bool,
10262
10263 /** @default 'jumbotron' */
10264 bsPrefix: (prop_types_default()).string
10265};
10266var Jumbotron_defaultProps = {
10267 fluid: false
10268};
10269var Jumbotron = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
10270 var _classes;
10271
10272 var _ref$as = _ref.as,
10273 Component = _ref$as === void 0 ? 'div' : _ref$as,
10274 className = _ref.className,
10275 fluid = _ref.fluid,
10276 bsPrefix = _ref.bsPrefix,
10277 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Jumbotron_excluded);
10278
10279 bsPrefix = useBootstrapPrefix(bsPrefix, 'jumbotron');
10280 var classes = (_classes = {}, _classes[bsPrefix] = true, _classes[bsPrefix + "-fluid"] = fluid, _classes);
10281 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
10282 ref: ref
10283 }, props, {
10284 className: classnames_default()(className, classes),
10285 __self: Jumbotron_this,
10286 __source: {
10287 fileName: Jumbotron_jsxFileName,
10288 lineNumber: 44,
10289 columnNumber: 7
10290 }
10291 }));
10292});
10293Jumbotron.propTypes = Jumbotron_propTypes;
10294Jumbotron.defaultProps = Jumbotron_defaultProps;
10295Jumbotron.displayName = 'Jumbotron';
10296/* harmony default export */ const src_Jumbotron = (Jumbotron);
10297;// CONCATENATED MODULE: ./src/TabContext.tsx
10298
10299var TabContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
10300/* harmony default export */ const src_TabContext = (TabContext);
10301;// CONCATENATED MODULE: ./src/AbstractNav.tsx
10302
10303
10304var AbstractNav_excluded = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
10305
10306var AbstractNav_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AbstractNav.tsx",
10307 AbstractNav_this = undefined;
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318// eslint-disable-next-line @typescript-eslint/no-empty-function
10319var AbstractNav_noop = function noop() {};
10320
10321var AbstractNav_propTypes = {
10322 onSelect: (prop_types_default()).func.isRequired,
10323 as: (prop_types_default()).elementType,
10324 role: (prop_types_default()).string,
10325
10326 /** @private */
10327 onKeyDown: (prop_types_default()).func,
10328
10329 /** @private */
10330 parentOnSelect: (prop_types_default()).func,
10331
10332 /** @private */
10333 getControlledId: (prop_types_default()).func,
10334
10335 /** @private */
10336 getControllerId: (prop_types_default()).func,
10337
10338 /** @private */
10339 activeKey: (prop_types_default()).any
10340}; // TODO: is this correct?
10341
10342var AbstractNav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
10343 var _ref$as = _ref.as,
10344 Component = _ref$as === void 0 ? 'ul' : _ref$as,
10345 onSelect = _ref.onSelect,
10346 activeKey = _ref.activeKey,
10347 role = _ref.role,
10348 onKeyDown = _ref.onKeyDown,
10349 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, AbstractNav_excluded);
10350
10351 // A ref and forceUpdate for refocus, b/c we only want to trigger when needed
10352 // and don't want to reset the set in the effect
10353 var forceUpdate = useForceUpdate();
10354 var needsRefocusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
10355 var parentOnSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
10356 var tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_TabContext);
10357 var getControlledId, getControllerId;
10358
10359 if (tabContext) {
10360 role = role || 'tablist';
10361 activeKey = tabContext.activeKey;
10362 getControlledId = tabContext.getControlledId;
10363 getControllerId = tabContext.getControllerId;
10364 }
10365
10366 var listNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
10367
10368 var getNextActiveChild = function getNextActiveChild(offset) {
10369 var currentListNode = listNode.current;
10370 if (!currentListNode) return null;
10371 var items = qsa(currentListNode, '[data-rb-event-key]:not(.disabled)');
10372 var activeChild = currentListNode.querySelector('.active');
10373 if (!activeChild) return null;
10374 var index = items.indexOf(activeChild);
10375 if (index === -1) return null;
10376 var nextIndex = index + offset;
10377 if (nextIndex >= items.length) nextIndex = 0;
10378 if (nextIndex < 0) nextIndex = items.length - 1;
10379 return items[nextIndex];
10380 };
10381
10382 var handleSelect = function handleSelect(key, event) {
10383 if (key == null) return;
10384 if (onSelect) onSelect(key, event);
10385 if (parentOnSelect) parentOnSelect(key, event);
10386 };
10387
10388 var handleKeyDown = function handleKeyDown(event) {
10389 if (onKeyDown) onKeyDown(event);
10390 var nextActiveChild;
10391
10392 switch (event.key) {
10393 case 'ArrowLeft':
10394 case 'ArrowUp':
10395 nextActiveChild = getNextActiveChild(-1);
10396 break;
10397
10398 case 'ArrowRight':
10399 case 'ArrowDown':
10400 nextActiveChild = getNextActiveChild(1);
10401 break;
10402
10403 default:
10404 return;
10405 }
10406
10407 if (!nextActiveChild) return;
10408 event.preventDefault();
10409 handleSelect(nextActiveChild.dataset.rbEventKey, event);
10410 needsRefocusRef.current = true;
10411 forceUpdate();
10412 };
10413
10414 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
10415 if (listNode.current && needsRefocusRef.current) {
10416 var activeChild = listNode.current.querySelector('[data-rb-event-key].active');
10417 if (activeChild) activeChild.focus();
10418 }
10419
10420 needsRefocusRef.current = false;
10421 });
10422 var mergedRef = esm_useMergedRefs(ref, listNode);
10423 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
10424 value: handleSelect,
10425 __self: AbstractNav_this,
10426 __source: {
10427 fileName: AbstractNav_jsxFileName,
10428 lineNumber: 141,
10429 columnNumber: 7
10430 }
10431 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_NavContext.Provider, {
10432 value: {
10433 role: role,
10434 // used by NavLink to determine it's role
10435 activeKey: makeEventKey(activeKey),
10436 getControlledId: getControlledId || AbstractNav_noop,
10437 getControllerId: getControllerId || AbstractNav_noop
10438 },
10439 __self: AbstractNav_this,
10440 __source: {
10441 fileName: AbstractNav_jsxFileName,
10442 lineNumber: 142,
10443 columnNumber: 9
10444 }
10445 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
10446 onKeyDown: handleKeyDown,
10447 ref: mergedRef,
10448 role: role,
10449 __self: AbstractNav_this,
10450 __source: {
10451 fileName: AbstractNav_jsxFileName,
10452 lineNumber: 150,
10453 columnNumber: 11
10454 }
10455 }))));
10456});
10457AbstractNav.propTypes = AbstractNav_propTypes;
10458/* harmony default export */ const src_AbstractNav = (AbstractNav);
10459;// CONCATENATED MODULE: ./src/AbstractNavItem.tsx
10460
10461
10462var AbstractNavItem_excluded = ["active", "className", "eventKey", "onSelect", "onClick", "as"];
10463
10464var AbstractNavItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AbstractNavItem.tsx",
10465 AbstractNavItem_this = undefined;
10466
10467
10468
10469
10470
10471
10472
10473
10474var AbstractNavItem_propTypes = {
10475 id: (prop_types_default()).string,
10476 active: (prop_types_default()).bool,
10477 role: (prop_types_default()).string,
10478 href: (prop_types_default()).string,
10479 tabIndex: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]),
10480 eventKey: (prop_types_default()).any,
10481 onclick: (prop_types_default()).func,
10482 as: (prop_types_default()).any,
10483 onClick: (prop_types_default()).func,
10484 onSelect: (prop_types_default()).func,
10485 'aria-controls': (prop_types_default()).string
10486};
10487var AbstractNavItem_defaultProps = {
10488 disabled: false
10489};
10490var AbstractNavItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
10491 var active = _ref.active,
10492 className = _ref.className,
10493 eventKey = _ref.eventKey,
10494 onSelect = _ref.onSelect,
10495 onClick = _ref.onClick,
10496 Component = _ref.as,
10497 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, AbstractNavItem_excluded);
10498
10499 var navKey = makeEventKey(eventKey, props.href);
10500 var parentOnSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
10501 var navContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_NavContext);
10502 var isActive = active;
10503
10504 if (navContext) {
10505 if (!props.role && navContext.role === 'tablist') props.role = 'tab';
10506 var contextControllerId = navContext.getControllerId(navKey);
10507 var contextControlledId = navContext.getControlledId(navKey);
10508 false ? 0 : void 0;
10509 false ? 0 : void 0;
10510 props['data-rb-event-key'] = navKey;
10511 props.id = contextControllerId || props.id;
10512 props['aria-controls'] = contextControlledId || props['aria-controls'];
10513 isActive = active == null && navKey != null ? navContext.activeKey === navKey : active;
10514 }
10515
10516 if (props.role === 'tab') {
10517 if (props.disabled) {
10518 props.tabIndex = -1;
10519 props['aria-disabled'] = true;
10520 }
10521
10522 props['aria-selected'] = isActive;
10523 }
10524
10525 var handleOnclick = useEventCallback(function (e) {
10526 if (onClick) onClick(e);
10527 if (navKey == null) return;
10528 if (onSelect) onSelect(navKey, e);
10529 if (parentOnSelect) parentOnSelect(navKey, e);
10530 });
10531 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
10532 ref: ref,
10533 onClick: handleOnclick,
10534 className: classnames_default()(className, isActive && 'active'),
10535 __self: AbstractNavItem_this,
10536 __source: {
10537 fileName: AbstractNavItem_jsxFileName,
10538 lineNumber: 112,
10539 columnNumber: 7
10540 }
10541 }));
10542});
10543AbstractNavItem.propTypes = AbstractNavItem_propTypes;
10544AbstractNavItem.defaultProps = AbstractNavItem_defaultProps;
10545/* harmony default export */ const src_AbstractNavItem = (AbstractNavItem);
10546;// CONCATENATED MODULE: ./src/ListGroupItem.tsx
10547
10548
10549var ListGroupItem_excluded = ["bsPrefix", "active", "disabled", "className", "variant", "action", "as", "onClick"];
10550
10551var ListGroupItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ListGroupItem.tsx",
10552 ListGroupItem_this = undefined;
10553
10554
10555
10556
10557
10558
10559var ListGroupItem_propTypes = {
10560 /**
10561 * @default 'list-group-item'
10562 */
10563 bsPrefix: (prop_types_default()).string,
10564
10565 /**
10566 * Sets contextual classes for list item
10567 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')}
10568 */
10569 variant: (prop_types_default()).string,
10570
10571 /**
10572 * Marks a ListGroupItem as actionable, applying additional hover, active and disabled styles
10573 * for links and buttons.
10574 */
10575 action: (prop_types_default()).bool,
10576
10577 /**
10578 * Sets list item as active
10579 */
10580 active: (prop_types_default()).bool,
10581
10582 /**
10583 * Sets list item state as disabled
10584 */
10585 disabled: (prop_types_default()).bool,
10586 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
10587 onClick: (prop_types_default()).func,
10588 href: (prop_types_default()).string,
10589
10590 /**
10591 * You can use a custom element type for this component. For none `action` items, items render as `li`.
10592 * For actions the default is an achor or button element depending on whether a `href` is provided.
10593 *
10594 * @default {'div' | 'a' | 'button'}
10595 */
10596 as: (prop_types_default()).elementType
10597};
10598var ListGroupItem_defaultProps = {
10599 variant: undefined,
10600 active: false,
10601 disabled: false
10602};
10603var ListGroupItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
10604 var bsPrefix = _ref.bsPrefix,
10605 active = _ref.active,
10606 disabled = _ref.disabled,
10607 className = _ref.className,
10608 variant = _ref.variant,
10609 action = _ref.action,
10610 as = _ref.as,
10611 onClick = _ref.onClick,
10612 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ListGroupItem_excluded);
10613
10614 bsPrefix = useBootstrapPrefix(bsPrefix, 'list-group-item');
10615 var handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
10616 if (disabled) {
10617 event.preventDefault();
10618 event.stopPropagation();
10619 return;
10620 }
10621
10622 if (onClick) onClick(event);
10623 }, [disabled, onClick]);
10624
10625 if (disabled && props.tabIndex === undefined) {
10626 props.tabIndex = -1;
10627 props['aria-disabled'] = true;
10628 }
10629
10630 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AbstractNavItem, extends_extends({
10631 ref: ref
10632 }, props, {
10633 // eslint-disable-next-line no-nested-ternary
10634 as: as || (action ? props.href ? 'a' : 'button' : 'div'),
10635 onClick: handleClick,
10636 className: classnames_default()(className, bsPrefix, active && 'active', disabled && 'disabled', variant && bsPrefix + "-" + variant, action && bsPrefix + "-action"),
10637 __self: ListGroupItem_this,
10638 __source: {
10639 fileName: ListGroupItem_jsxFileName,
10640 lineNumber: 107,
10641 columnNumber: 7
10642 }
10643 }));
10644});
10645ListGroupItem.propTypes = ListGroupItem_propTypes;
10646ListGroupItem.defaultProps = ListGroupItem_defaultProps;
10647ListGroupItem.displayName = 'ListGroupItem';
10648/* harmony default export */ const src_ListGroupItem = (ListGroupItem);
10649;// CONCATENATED MODULE: ./src/ListGroup.tsx
10650
10651
10652var ListGroup_excluded = ["className", "bsPrefix", "variant", "horizontal", "as"];
10653
10654var ListGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ListGroup.tsx",
10655 ListGroup_this = undefined;
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665var ListGroup_propTypes = {
10666 /**
10667 * @default 'list-group'
10668 */
10669 bsPrefix: (prop_types_default()).string,
10670
10671 /**
10672 * Adds a variant to the list-group
10673 *
10674 * @type {('flush')}
10675 */
10676 variant: prop_types_default().oneOf(['flush', undefined]),
10677
10678 /**
10679 * Changes the flow of the list group items from vertical to horizontal.
10680 * A value of `null` (the default) sets it to vertical for all breakpoints;
10681 * Just including the prop sets it for all breakpoints, while `{sm|md|lg|xl}`
10682 * makes the list group horizontal starting at that breakpoint’s `min-width`.
10683 * @type {(true|'sm'|'md'|'lg'|'xl')}
10684 */
10685 horizontal: prop_types_default().oneOf([true, 'sm', 'md', 'lg', 'xl', undefined]),
10686
10687 /**
10688 * You can use a custom element type for this component.
10689 */
10690 as: (prop_types_default()).elementType
10691};
10692var ListGroup_defaultProps = {
10693 variant: undefined,
10694 horizontal: undefined
10695};
10696var ListGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
10697 var _useUncontrolled = useUncontrolled(props, {
10698 activeKey: 'onSelect'
10699 }),
10700 className = _useUncontrolled.className,
10701 initialBsPrefix = _useUncontrolled.bsPrefix,
10702 variant = _useUncontrolled.variant,
10703 horizontal = _useUncontrolled.horizontal,
10704 _useUncontrolled$as = _useUncontrolled.as,
10705 as = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
10706 controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, ListGroup_excluded);
10707
10708 var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'list-group');
10709 var horizontalVariant;
10710
10711 if (horizontal) {
10712 horizontalVariant = horizontal === true ? 'horizontal' : "horizontal-" + horizontal;
10713 } else {
10714 horizontalVariant = null;
10715 }
10716
10717 false ? 0 : void 0;
10718 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AbstractNav, extends_extends({
10719 ref: ref
10720 }, controlledProps, {
10721 as: as,
10722 className: classnames_default()(className, bsPrefix, variant && bsPrefix + "-" + variant, horizontalVariant && bsPrefix + "-" + horizontalVariant),
10723 __self: ListGroup_this,
10724 __source: {
10725 fileName: ListGroup_jsxFileName,
10726 lineNumber: 92,
10727 columnNumber: 5
10728 }
10729 }));
10730});
10731ListGroup.propTypes = ListGroup_propTypes;
10732ListGroup.defaultProps = ListGroup_defaultProps;
10733ListGroup.displayName = 'ListGroup';
10734ListGroup.Item = src_ListGroupItem;
10735/* harmony default export */ const src_ListGroup = (ListGroup);
10736;// CONCATENATED MODULE: ./src/Media.tsx
10737
10738
10739var Media_excluded = ["bsPrefix", "className", "as"];
10740
10741var Media_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Media.tsx",
10742 Media_this = undefined;
10743
10744
10745
10746
10747
10748
10749var MediaBody = createWithBsPrefix('media-body');
10750var Media_propTypes = {
10751 /**
10752 * @default 'media'
10753 */
10754 bsPrefix: (prop_types_default()).string,
10755 as: (prop_types_default()).elementType
10756};
10757var Media = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
10758function (_ref, ref) {
10759 var bsPrefix = _ref.bsPrefix,
10760 className = _ref.className,
10761 _ref$as = _ref.as,
10762 Component = _ref$as === void 0 ? 'div' : _ref$as,
10763 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Media_excluded);
10764
10765 var prefix = useBootstrapPrefix(bsPrefix, 'media');
10766 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
10767 ref: ref,
10768 className: classnames_default()(className, prefix),
10769 __self: Media_this,
10770 __source: {
10771 fileName: Media_jsxFileName,
10772 lineNumber: 33,
10773 columnNumber: 7
10774 }
10775 }));
10776});
10777Media.displayName = 'Media';
10778Media.propTypes = Media_propTypes;
10779Media.Body = MediaBody;
10780/* harmony default export */ const src_Media = (Media);
10781;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/scrollbarSize.js
10782
10783var size;
10784function scrollbarSize(recalc) {
10785 if (!size && size !== 0 || recalc) {
10786 if (canUseDOM) {
10787 var scrollDiv = document.createElement('div');
10788 scrollDiv.style.position = 'absolute';
10789 scrollDiv.style.top = '-9999px';
10790 scrollDiv.style.width = '50px';
10791 scrollDiv.style.height = '50px';
10792 scrollDiv.style.overflow = 'scroll';
10793 document.body.appendChild(scrollDiv);
10794 size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
10795 document.body.removeChild(scrollDiv);
10796 }
10797 }
10798
10799 return size;
10800}
10801;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/activeElement.js
10802
10803/**
10804 * Returns the actively focused element safely.
10805 *
10806 * @param doc the document to check
10807 */
10808
10809function activeElement(doc) {
10810 if (doc === void 0) {
10811 doc = ownerDocument();
10812 } // Support: IE 9 only
10813 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
10814
10815
10816 try {
10817 var active = doc.activeElement; // IE11 returns a seemingly empty object in some cases when accessing
10818 // document.activeElement from an <iframe>
10819
10820 if (!active || !active.nodeName) return null;
10821 return active;
10822 } catch (e) {
10823 /* ie throws if no active element */
10824 return doc.body;
10825 }
10826}
10827;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/addClass.js
10828
10829/**
10830 * Adds a CSS class to a given element.
10831 *
10832 * @param element the element
10833 * @param className the CSS class name
10834 */
10835
10836function addClass(element, className) {
10837 if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + " " + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + " " + className);
10838}
10839;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/removeClass.js
10840function replaceClassName(origClass, classToRemove) {
10841 return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
10842}
10843/**
10844 * Removes a CSS class from a given element.
10845 *
10846 * @param element the element
10847 * @param className the CSS class name
10848 */
10849
10850
10851function removeClass(element, className) {
10852 if (element.classList) {
10853 element.classList.remove(className);
10854 } else if (typeof element.className === 'string') {
10855 element.className = replaceClassName(element.className, className);
10856 } else {
10857 element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
10858 }
10859}
10860;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/isDocument.js
10861function isDocument(element) {
10862 return 'nodeType' in element && element.nodeType === document.DOCUMENT_NODE;
10863}
10864;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/isWindow.js
10865
10866function isWindow(node) {
10867 if ('window' in node && node.window === node) return node;
10868 if (isDocument(node)) return node.defaultView || false;
10869 return false;
10870}
10871;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/isOverflowing.js
10872
10873
10874
10875function isBody(node) {
10876 return node && node.tagName.toLowerCase() === 'body';
10877}
10878
10879function bodyIsOverflowing(node) {
10880 var doc = isWindow(node) ? ownerDocument() : ownerDocument(node);
10881 var win = isWindow(node) || doc.defaultView;
10882 return doc.body.clientWidth < win.innerWidth;
10883}
10884
10885function isOverflowing(container) {
10886 var win = isWindow(container);
10887 return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;
10888}
10889;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/manageAriaHidden.js
10890var BLACKLIST = ['template', 'script', 'style'];
10891
10892var isHidable = function isHidable(_ref) {
10893 var nodeType = _ref.nodeType,
10894 tagName = _ref.tagName;
10895 return nodeType === 1 && BLACKLIST.indexOf(tagName.toLowerCase()) === -1;
10896};
10897
10898var siblings = function siblings(container, exclude, cb) {
10899 [].forEach.call(container.children, function (node) {
10900 if (exclude.indexOf(node) === -1 && isHidable(node)) {
10901 cb(node);
10902 }
10903 });
10904};
10905
10906function ariaHidden(hide, node) {
10907 if (!node) return;
10908
10909 if (hide) {
10910 node.setAttribute('aria-hidden', 'true');
10911 } else {
10912 node.removeAttribute('aria-hidden');
10913 }
10914}
10915function hideSiblings(container, _ref2) {
10916 var dialog = _ref2.dialog,
10917 backdrop = _ref2.backdrop;
10918 siblings(container, [dialog, backdrop], function (node) {
10919 return ariaHidden(true, node);
10920 });
10921}
10922function showSiblings(container, _ref3) {
10923 var dialog = _ref3.dialog,
10924 backdrop = _ref3.backdrop;
10925 siblings(container, [dialog, backdrop], function (node) {
10926 return ariaHidden(false, node);
10927 });
10928}
10929;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/ModalManager.js
10930
10931
10932
10933
10934
10935
10936
10937function findIndexOf(arr, cb) {
10938 var idx = -1;
10939 arr.some(function (d, i) {
10940 if (cb(d, i)) {
10941 idx = i;
10942 return true;
10943 }
10944
10945 return false;
10946 });
10947 return idx;
10948}
10949/**
10950 * Proper state management for containers and the modals in those containers.
10951 *
10952 * @internal Used by the Modal to ensure proper styling of containers.
10953 */
10954
10955
10956var ModalManager = /*#__PURE__*/function () {
10957 function ModalManager(_temp) {
10958 var _ref = _temp === void 0 ? {} : _temp,
10959 _ref$hideSiblingNodes = _ref.hideSiblingNodes,
10960 hideSiblingNodes = _ref$hideSiblingNodes === void 0 ? true : _ref$hideSiblingNodes,
10961 _ref$handleContainerO = _ref.handleContainerOverflow,
10962 handleContainerOverflow = _ref$handleContainerO === void 0 ? true : _ref$handleContainerO;
10963
10964 this.hideSiblingNodes = void 0;
10965 this.handleContainerOverflow = void 0;
10966 this.modals = void 0;
10967 this.containers = void 0;
10968 this.data = void 0;
10969 this.scrollbarSize = void 0;
10970 this.hideSiblingNodes = hideSiblingNodes;
10971 this.handleContainerOverflow = handleContainerOverflow;
10972 this.modals = [];
10973 this.containers = [];
10974 this.data = [];
10975 this.scrollbarSize = scrollbarSize();
10976 }
10977
10978 var _proto = ModalManager.prototype;
10979
10980 _proto.isContainerOverflowing = function isContainerOverflowing(modal) {
10981 var data = this.data[this.containerIndexFromModal(modal)];
10982 return data && data.overflowing;
10983 };
10984
10985 _proto.containerIndexFromModal = function containerIndexFromModal(modal) {
10986 return findIndexOf(this.data, function (d) {
10987 return d.modals.indexOf(modal) !== -1;
10988 });
10989 };
10990
10991 _proto.setContainerStyle = function setContainerStyle(containerState, container) {
10992 var style = {
10993 overflow: 'hidden'
10994 }; // we are only interested in the actual `style` here
10995 // because we will override it
10996
10997 containerState.style = {
10998 overflow: container.style.overflow,
10999 paddingRight: container.style.paddingRight
11000 };
11001
11002 if (containerState.overflowing) {
11003 // use computed style, here to get the real padding
11004 // to add our scrollbar width
11005 style.paddingRight = parseInt(css(container, 'paddingRight') || '0', 10) + this.scrollbarSize + "px";
11006 }
11007
11008 css(container, style);
11009 };
11010
11011 _proto.removeContainerStyle = function removeContainerStyle(containerState, container) {
11012 Object.assign(container.style, containerState.style);
11013 };
11014
11015 _proto.add = function add(modal, container, className) {
11016 var modalIdx = this.modals.indexOf(modal);
11017 var containerIdx = this.containers.indexOf(container);
11018
11019 if (modalIdx !== -1) {
11020 return modalIdx;
11021 }
11022
11023 modalIdx = this.modals.length;
11024 this.modals.push(modal);
11025
11026 if (this.hideSiblingNodes) {
11027 hideSiblings(container, modal);
11028 }
11029
11030 if (containerIdx !== -1) {
11031 this.data[containerIdx].modals.push(modal);
11032 return modalIdx;
11033 }
11034
11035 var data = {
11036 modals: [modal],
11037 // right now only the first modal of a container will have its classes applied
11038 classes: className ? className.split(/\s+/) : [],
11039 overflowing: isOverflowing(container)
11040 };
11041
11042 if (this.handleContainerOverflow) {
11043 this.setContainerStyle(data, container);
11044 }
11045
11046 data.classes.forEach(addClass.bind(null, container));
11047 this.containers.push(container);
11048 this.data.push(data);
11049 return modalIdx;
11050 };
11051
11052 _proto.remove = function remove(modal) {
11053 var modalIdx = this.modals.indexOf(modal);
11054
11055 if (modalIdx === -1) {
11056 return;
11057 }
11058
11059 var containerIdx = this.containerIndexFromModal(modal);
11060 var data = this.data[containerIdx];
11061 var container = this.containers[containerIdx];
11062 data.modals.splice(data.modals.indexOf(modal), 1);
11063 this.modals.splice(modalIdx, 1); // if that was the last modal in a container,
11064 // clean up the container
11065
11066 if (data.modals.length === 0) {
11067 data.classes.forEach(removeClass.bind(null, container));
11068
11069 if (this.handleContainerOverflow) {
11070 this.removeContainerStyle(data, container);
11071 }
11072
11073 if (this.hideSiblingNodes) {
11074 showSiblings(container, modal);
11075 }
11076
11077 this.containers.splice(containerIdx, 1);
11078 this.data.splice(containerIdx, 1);
11079 } else if (this.hideSiblingNodes) {
11080 // otherwise make sure the next top modal is visible to a SR
11081 var _data$modals = data.modals[data.modals.length - 1],
11082 backdrop = _data$modals.backdrop,
11083 dialog = _data$modals.dialog;
11084 ariaHidden(false, dialog);
11085 ariaHidden(false, backdrop);
11086 }
11087 };
11088
11089 _proto.isTopModal = function isTopModal(modal) {
11090 return !!this.modals.length && this.modals[this.modals.length - 1] === modal;
11091 };
11092
11093 return ModalManager;
11094}();
11095
11096/* harmony default export */ const esm_ModalManager = (ModalManager);
11097;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/useWaitForDOMRef.js
11098
11099
11100var resolveContainerRef = function resolveContainerRef(ref) {
11101 var _ref;
11102
11103 if (typeof document === 'undefined') return null;
11104 if (ref == null) return ownerDocument().body;
11105 if (typeof ref === 'function') ref = ref();
11106 if (ref && 'current' in ref) ref = ref.current;
11107 if ((_ref = ref) != null && _ref.nodeType) return ref || null;
11108 return null;
11109};
11110function useWaitForDOMRef(ref, onResolved) {
11111 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(function () {
11112 return resolveContainerRef(ref);
11113 }),
11114 resolvedRef = _useState[0],
11115 setRef = _useState[1];
11116
11117 if (!resolvedRef) {
11118 var earlyRef = resolveContainerRef(ref);
11119 if (earlyRef) setRef(earlyRef);
11120 }
11121
11122 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
11123 if (onResolved && resolvedRef) {
11124 onResolved(resolvedRef);
11125 }
11126 }, [onResolved, resolvedRef]);
11127 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
11128 var nextRef = resolveContainerRef(ref);
11129
11130 if (nextRef !== resolvedRef) {
11131 setRef(nextRef);
11132 }
11133 }, [ref, resolvedRef]);
11134 return resolvedRef;
11135}
11136;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/Modal.js
11137
11138
11139/* eslint-disable @typescript-eslint/no-use-before-define, react/prop-types */
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154var manager;
11155
11156function getManager() {
11157 if (!manager) manager = new esm_ModalManager();
11158 return manager;
11159}
11160
11161function useModalManager(provided) {
11162 var modalManager = provided || getManager();
11163 var modal = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
11164 dialog: null,
11165 backdrop: null
11166 });
11167 return Object.assign(modal.current, {
11168 add: function add(container, className) {
11169 return modalManager.add(modal.current, container, className);
11170 },
11171 remove: function remove() {
11172 return modalManager.remove(modal.current);
11173 },
11174 isTopModal: function isTopModal() {
11175 return modalManager.isTopModal(modal.current);
11176 },
11177 setDialogRef: (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (ref) {
11178 modal.current.dialog = ref;
11179 }, []),
11180 setBackdropRef: (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (ref) {
11181 modal.current.backdrop = ref;
11182 }, [])
11183 });
11184}
11185
11186var Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (_ref, ref) {
11187 var _ref$show = _ref.show,
11188 show = _ref$show === void 0 ? false : _ref$show,
11189 _ref$role = _ref.role,
11190 role = _ref$role === void 0 ? 'dialog' : _ref$role,
11191 className = _ref.className,
11192 style = _ref.style,
11193 children = _ref.children,
11194 _ref$backdrop = _ref.backdrop,
11195 backdrop = _ref$backdrop === void 0 ? true : _ref$backdrop,
11196 _ref$keyboard = _ref.keyboard,
11197 keyboard = _ref$keyboard === void 0 ? true : _ref$keyboard,
11198 onBackdropClick = _ref.onBackdropClick,
11199 onEscapeKeyDown = _ref.onEscapeKeyDown,
11200 transition = _ref.transition,
11201 backdropTransition = _ref.backdropTransition,
11202 _ref$autoFocus = _ref.autoFocus,
11203 autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
11204 _ref$enforceFocus = _ref.enforceFocus,
11205 enforceFocus = _ref$enforceFocus === void 0 ? true : _ref$enforceFocus,
11206 _ref$restoreFocus = _ref.restoreFocus,
11207 restoreFocus = _ref$restoreFocus === void 0 ? true : _ref$restoreFocus,
11208 restoreFocusOptions = _ref.restoreFocusOptions,
11209 renderDialog = _ref.renderDialog,
11210 _ref$renderBackdrop = _ref.renderBackdrop,
11211 renderBackdrop = _ref$renderBackdrop === void 0 ? function (props) {
11212 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", props);
11213 } : _ref$renderBackdrop,
11214 providedManager = _ref.manager,
11215 containerRef = _ref.container,
11216 containerClassName = _ref.containerClassName,
11217 onShow = _ref.onShow,
11218 _ref$onHide = _ref.onHide,
11219 onHide = _ref$onHide === void 0 ? function () {} : _ref$onHide,
11220 onExit = _ref.onExit,
11221 onExited = _ref.onExited,
11222 onExiting = _ref.onExiting,
11223 onEnter = _ref.onEnter,
11224 onEntering = _ref.onEntering,
11225 onEntered = _ref.onEntered,
11226 rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ["show", "role", "className", "style", "children", "backdrop", "keyboard", "onBackdropClick", "onEscapeKeyDown", "transition", "backdropTransition", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "renderDialog", "renderBackdrop", "manager", "container", "containerClassName", "onShow", "onHide", "onExit", "onExited", "onExiting", "onEnter", "onEntering", "onEntered"]);
11227
11228 var container = useWaitForDOMRef(containerRef);
11229 var modal = useModalManager(providedManager);
11230 var isMounted = useMounted();
11231 var prevShow = usePrevious(show);
11232
11233 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!show),
11234 exited = _useState[0],
11235 setExited = _useState[1];
11236
11237 var lastFocusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
11238 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
11239 return modal;
11240 }, [modal]);
11241
11242 if (canUseDOM && !prevShow && show) {
11243 lastFocusRef.current = activeElement();
11244 }
11245
11246 if (!transition && !show && !exited) {
11247 setExited(true);
11248 } else if (show && exited) {
11249 setExited(false);
11250 }
11251
11252 var handleShow = useEventCallback(function () {
11253 modal.add(container, containerClassName);
11254 removeKeydownListenerRef.current = esm_listen(document, 'keydown', handleDocumentKeyDown);
11255 removeFocusListenerRef.current = esm_listen(document, 'focus', // the timeout is necessary b/c this will run before the new modal is mounted
11256 // and so steals focus from it
11257 function () {
11258 return setTimeout(handleEnforceFocus);
11259 }, true);
11260
11261 if (onShow) {
11262 onShow();
11263 } // autofocus after onShow to not trigger a focus event for previous
11264 // modals before this one is shown.
11265
11266
11267 if (autoFocus) {
11268 var currentActiveElement = activeElement(document);
11269
11270 if (modal.dialog && currentActiveElement && !contains_contains(modal.dialog, currentActiveElement)) {
11271 lastFocusRef.current = currentActiveElement;
11272 modal.dialog.focus();
11273 }
11274 }
11275 });
11276 var handleHide = useEventCallback(function () {
11277 modal.remove();
11278 removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();
11279 removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
11280
11281 if (restoreFocus) {
11282 var _lastFocusRef$current; // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)
11283
11284
11285 (_lastFocusRef$current = lastFocusRef.current) == null ? void 0 : _lastFocusRef$current.focus == null ? void 0 : _lastFocusRef$current.focus(restoreFocusOptions);
11286 lastFocusRef.current = null;
11287 }
11288 }); // TODO: try and combine these effects: https://github.com/react-bootstrap/react-overlays/pull/794#discussion_r409954120
11289 // Show logic when:
11290 // - show is `true` _and_ `container` has resolved
11291
11292 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
11293 if (!show || !container) return;
11294 handleShow();
11295 }, [show, container,
11296 /* should never change: */
11297 handleShow]); // Hide cleanup logic when:
11298 // - `exited` switches to true
11299 // - component unmounts;
11300
11301 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
11302 if (!exited) return;
11303 handleHide();
11304 }, [exited, handleHide]);
11305 useWillUnmount(function () {
11306 handleHide();
11307 }); // --------------------------------
11308
11309 var handleEnforceFocus = useEventCallback(function () {
11310 if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
11311 return;
11312 }
11313
11314 var currentActiveElement = activeElement();
11315
11316 if (modal.dialog && currentActiveElement && !contains_contains(modal.dialog, currentActiveElement)) {
11317 modal.dialog.focus();
11318 }
11319 });
11320 var handleBackdropClick = useEventCallback(function (e) {
11321 if (e.target !== e.currentTarget) {
11322 return;
11323 }
11324
11325 onBackdropClick == null ? void 0 : onBackdropClick(e);
11326
11327 if (backdrop === true) {
11328 onHide();
11329 }
11330 });
11331 var handleDocumentKeyDown = useEventCallback(function (e) {
11332 if (keyboard && e.keyCode === 27 && modal.isTopModal()) {
11333 onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
11334
11335 if (!e.defaultPrevented) {
11336 onHide();
11337 }
11338 }
11339 });
11340 var removeFocusListenerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
11341 var removeKeydownListenerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
11342
11343 var handleHidden = function handleHidden() {
11344 setExited(true);
11345
11346 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11347 args[_key] = arguments[_key];
11348 }
11349
11350 onExited == null ? void 0 : onExited.apply(void 0, args);
11351 };
11352
11353 var Transition = transition;
11354
11355 if (!container || !(show || Transition && !exited)) {
11356 return null;
11357 }
11358
11359 var dialogProps = extends_extends({
11360 role: role,
11361 ref: modal.setDialogRef,
11362 // apparently only works on the dialog role element
11363 'aria-modal': role === 'dialog' ? true : undefined
11364 }, rest, {
11365 style: style,
11366 className: className,
11367 tabIndex: -1
11368 });
11369
11370 var dialog = renderDialog ? renderDialog(dialogProps) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", dialogProps, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
11371 role: 'document'
11372 }));
11373
11374 if (Transition) {
11375 dialog = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, {
11376 appear: true,
11377 unmountOnExit: true,
11378 "in": !!show,
11379 onExit: onExit,
11380 onExiting: onExiting,
11381 onExited: handleHidden,
11382 onEnter: onEnter,
11383 onEntering: onEntering,
11384 onEntered: onEntered
11385 }, dialog);
11386 }
11387
11388 var backdropElement = null;
11389
11390 if (backdrop) {
11391 var BackdropTransition = backdropTransition;
11392 backdropElement = renderBackdrop({
11393 ref: modal.setBackdropRef,
11394 onClick: handleBackdropClick
11395 });
11396
11397 if (BackdropTransition) {
11398 backdropElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(BackdropTransition, {
11399 appear: true,
11400 "in": !!show
11401 }, backdropElement);
11402 }
11403 }
11404
11405 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().createPortal( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, backdropElement, dialog), container));
11406});
11407var Modal_propTypes = {
11408 /**
11409 * Set the visibility of the Modal
11410 */
11411 show: (prop_types_default()).bool,
11412
11413 /**
11414 * A DOM element, a `ref` to an element, or function that returns either. The Modal is appended to it's `container` element.
11415 *
11416 * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the
11417 * page content can be placed behind a virtual backdrop as well as a visual one.
11418 */
11419 container: (prop_types_default()).any,
11420
11421 /**
11422 * A callback fired when the Modal is opening.
11423 */
11424 onShow: (prop_types_default()).func,
11425
11426 /**
11427 * A callback fired when either the backdrop is clicked, or the escape key is pressed.
11428 *
11429 * The `onHide` callback only signals intent from the Modal,
11430 * you must actually set the `show` prop to `false` for the Modal to close.
11431 */
11432 onHide: (prop_types_default()).func,
11433
11434 /**
11435 * Include a backdrop component.
11436 */
11437 backdrop: prop_types_default().oneOfType([(prop_types_default()).bool, prop_types_default().oneOf(['static'])]),
11438
11439 /**
11440 * A function that returns the dialog component. Useful for custom
11441 * rendering. **Note:** the component should make sure to apply the provided ref.
11442 *
11443 * ```js static
11444 * renderDialog={props => <MyDialog {...props} />}
11445 * ```
11446 */
11447 renderDialog: (prop_types_default()).func,
11448
11449 /**
11450 * A function that returns a backdrop component. Useful for custom
11451 * backdrop rendering.
11452 *
11453 * ```js
11454 * renderBackdrop={props => <MyBackdrop {...props} />}
11455 * ```
11456 */
11457 renderBackdrop: (prop_types_default()).func,
11458
11459 /**
11460 * A callback fired when the escape key, if specified in `keyboard`, is pressed.
11461 *
11462 * If preventDefault() is called on the keyboard event, closing the modal will be cancelled.
11463 */
11464 onEscapeKeyDown: (prop_types_default()).func,
11465
11466 /**
11467 * A callback fired when the backdrop, if specified, is clicked.
11468 */
11469 onBackdropClick: (prop_types_default()).func,
11470
11471 /**
11472 * A css class or set of classes applied to the modal container when the modal is open,
11473 * and removed when it is closed.
11474 */
11475 containerClassName: (prop_types_default()).string,
11476
11477 /**
11478 * Close the modal when escape key is pressed
11479 */
11480 keyboard: (prop_types_default()).bool,
11481
11482 /**
11483 * A `react-transition-group@2.0.0` `<Transition/>` component used
11484 * to control animations for the dialog component.
11485 */
11486 transition: (prop_types_default()).elementType,
11487
11488 /**
11489 * A `react-transition-group@2.0.0` `<Transition/>` component used
11490 * to control animations for the backdrop components.
11491 */
11492 backdropTransition: (prop_types_default()).elementType,
11493
11494 /**
11495 * When `true` The modal will automatically shift focus to itself when it opens, and
11496 * replace it to the last focused element when it closes. This also
11497 * works correctly with any Modal children that have the `autoFocus` prop.
11498 *
11499 * Generally this should never be set to `false` as it makes the Modal less
11500 * accessible to assistive technologies, like screen readers.
11501 */
11502 autoFocus: (prop_types_default()).bool,
11503
11504 /**
11505 * When `true` The modal will prevent focus from leaving the Modal while open.
11506 *
11507 * Generally this should never be set to `false` as it makes the Modal less
11508 * accessible to assistive technologies, like screen readers.
11509 */
11510 enforceFocus: (prop_types_default()).bool,
11511
11512 /**
11513 * When `true` The modal will restore focus to previously focused element once
11514 * modal is hidden
11515 */
11516 restoreFocus: (prop_types_default()).bool,
11517
11518 /**
11519 * Options passed to focus function when `restoreFocus` is set to `true`
11520 *
11521 * @link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#Parameters
11522 */
11523 restoreFocusOptions: prop_types_default().shape({
11524 preventScroll: (prop_types_default()).bool
11525 }),
11526
11527 /**
11528 * Callback fired before the Modal transitions in
11529 */
11530 onEnter: (prop_types_default()).func,
11531
11532 /**
11533 * Callback fired as the Modal begins to transition in
11534 */
11535 onEntering: (prop_types_default()).func,
11536
11537 /**
11538 * Callback fired after the Modal finishes transitioning in
11539 */
11540 onEntered: (prop_types_default()).func,
11541
11542 /**
11543 * Callback fired right before the Modal transitions out
11544 */
11545 onExit: (prop_types_default()).func,
11546
11547 /**
11548 * Callback fired as the Modal begins to transition out
11549 */
11550 onExiting: (prop_types_default()).func,
11551
11552 /**
11553 * Callback fired after the Modal finishes transitioning out
11554 */
11555 onExited: (prop_types_default()).func,
11556
11557 /**
11558 * A ModalManager instance used to track and manage the state of open
11559 * Modals. Useful when customizing how modals interact within a container
11560 */
11561 manager: prop_types_default().instanceOf(esm_ModalManager)
11562};
11563Modal.displayName = 'Modal';
11564Modal.propTypes = Modal_propTypes;
11565/* harmony default export */ const esm_Modal = (Object.assign(Modal, {
11566 Manager: esm_ModalManager
11567}));
11568;// CONCATENATED MODULE: ./src/BootstrapModalManager.tsx
11569
11570
11571
11572
11573
11574var Selector = {
11575 FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
11576 STICKY_CONTENT: '.sticky-top',
11577 NAVBAR_TOGGLER: '.navbar-toggler'
11578};
11579
11580var BootstrapModalManager = /*#__PURE__*/function (_ModalManager) {
11581 inheritsLoose_inheritsLoose(BootstrapModalManager, _ModalManager);
11582
11583 function BootstrapModalManager() {
11584 return _ModalManager.apply(this, arguments) || this;
11585 }
11586
11587 var _proto = BootstrapModalManager.prototype;
11588
11589 _proto.adjustAndStore = function adjustAndStore(prop, element, adjust) {
11590 var _css;
11591
11592 var actual = element.style[prop]; // TODO: DOMStringMap and CSSStyleDeclaration aren't strictly compatible
11593 // @ts-ignore
11594
11595 element.dataset[prop] = actual;
11596 css(element, (_css = {}, _css[prop] = parseFloat(css(element, prop)) + adjust + "px", _css));
11597 };
11598
11599 _proto.restore = function restore(prop, element) {
11600 var value = element.dataset[prop];
11601
11602 if (value !== undefined) {
11603 var _css2;
11604
11605 delete element.dataset[prop];
11606 css(element, (_css2 = {}, _css2[prop] = value, _css2));
11607 }
11608 };
11609
11610 _proto.setContainerStyle = function setContainerStyle(containerState, container) {
11611 var _this = this;
11612
11613 _ModalManager.prototype.setContainerStyle.call(this, containerState, container);
11614
11615 if (!containerState.overflowing) return;
11616 var size = scrollbarSize();
11617 qsa(container, Selector.FIXED_CONTENT).forEach(function (el) {
11618 return _this.adjustAndStore('paddingRight', el, size);
11619 });
11620 qsa(container, Selector.STICKY_CONTENT).forEach(function (el) {
11621 return _this.adjustAndStore('marginRight', el, -size);
11622 });
11623 qsa(container, Selector.NAVBAR_TOGGLER).forEach(function (el) {
11624 return _this.adjustAndStore('marginRight', el, size);
11625 });
11626 };
11627
11628 _proto.removeContainerStyle = function removeContainerStyle(containerState, container) {
11629 var _this2 = this;
11630
11631 _ModalManager.prototype.removeContainerStyle.call(this, containerState, container);
11632
11633 qsa(container, Selector.FIXED_CONTENT).forEach(function (el) {
11634 return _this2.restore('paddingRight', el);
11635 });
11636 qsa(container, Selector.STICKY_CONTENT).forEach(function (el) {
11637 return _this2.restore('marginRight', el);
11638 });
11639 qsa(container, Selector.NAVBAR_TOGGLER).forEach(function (el) {
11640 return _this2.restore('marginRight', el);
11641 });
11642 };
11643
11644 return BootstrapModalManager;
11645}(esm_ModalManager);
11646
11647
11648;// CONCATENATED MODULE: ./src/ModalBody.tsx
11649
11650/* harmony default export */ const ModalBody = (createWithBsPrefix('modal-body'));
11651;// CONCATENATED MODULE: ./src/ModalContext.tsx
11652
11653var ModalContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
11654 // eslint-disable-next-line @typescript-eslint/no-empty-function
11655 onHide: function onHide() {}
11656});
11657/* harmony default export */ const src_ModalContext = (ModalContext);
11658;// CONCATENATED MODULE: ./src/ModalDialog.tsx
11659
11660
11661var ModalDialog_excluded = ["bsPrefix", "className", "contentClassName", "centered", "size", "children", "scrollable"];
11662
11663var ModalDialog_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalDialog.tsx",
11664 ModalDialog_this = undefined;
11665
11666
11667
11668
11669
11670var ModalDialog_propTypes = {
11671 /** @default 'modal' */
11672 bsPrefix: (prop_types_default()).string,
11673 contentClassName: (prop_types_default()).string,
11674
11675 /**
11676 * Render a large, extra large or small modal.
11677 *
11678 * @type ('sm'|'lg','xl')
11679 */
11680 size: (prop_types_default()).string,
11681
11682 /**
11683 * Specify whether the Component should be vertically centered
11684 */
11685 centered: (prop_types_default()).bool,
11686
11687 /**
11688 * Allows scrolling the `<Modal.Body>` instead of the entire Modal when overflowing.
11689 */
11690 scrollable: (prop_types_default()).bool
11691};
11692var ModalDialog = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
11693 var bsPrefix = _ref.bsPrefix,
11694 className = _ref.className,
11695 contentClassName = _ref.contentClassName,
11696 centered = _ref.centered,
11697 size = _ref.size,
11698 children = _ref.children,
11699 scrollable = _ref.scrollable,
11700 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ModalDialog_excluded);
11701
11702 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
11703 var dialogClass = bsPrefix + "-dialog";
11704 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, props, {
11705 ref: ref,
11706 className: classnames_default()(dialogClass, className, size && bsPrefix + "-" + size, centered && dialogClass + "-centered", scrollable && dialogClass + "-scrollable"),
11707 __self: ModalDialog_this,
11708 __source: {
11709 fileName: ModalDialog_jsxFileName,
11710 lineNumber: 59,
11711 columnNumber: 7
11712 }
11713 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
11714 className: classnames_default()(bsPrefix + "-content", contentClassName),
11715 __self: ModalDialog_this,
11716 __source: {
11717 fileName: ModalDialog_jsxFileName,
11718 lineNumber: 70,
11719 columnNumber: 9
11720 }
11721 }, children));
11722});
11723ModalDialog.displayName = 'ModalDialog';
11724ModalDialog.propTypes = ModalDialog_propTypes;
11725/* harmony default export */ const src_ModalDialog = (ModalDialog);
11726;// CONCATENATED MODULE: ./src/ModalFooter.tsx
11727
11728/* harmony default export */ const ModalFooter = (createWithBsPrefix('modal-footer'));
11729;// CONCATENATED MODULE: ./src/ModalHeader.tsx
11730
11731
11732var ModalHeader_excluded = ["bsPrefix", "closeLabel", "closeButton", "onHide", "className", "children"];
11733
11734var ModalHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalHeader.tsx",
11735 ModalHeader_this = undefined;
11736
11737
11738
11739
11740
11741
11742
11743
11744var ModalHeader_propTypes = {
11745 bsPrefix: (prop_types_default()).string,
11746
11747 /**
11748 * Provides an accessible label for the close
11749 * button. It is used for Assistive Technology when the label text is not
11750 * readable.
11751 */
11752 closeLabel: (prop_types_default()).string,
11753
11754 /**
11755 * Specify whether the Component should contain a close button
11756 */
11757 closeButton: (prop_types_default()).bool,
11758
11759 /**
11760 * A Callback fired when the close button is clicked. If used directly inside
11761 * a Modal component, the onHide will automatically be propagated up to the
11762 * parent Modal `onHide`.
11763 */
11764 onHide: (prop_types_default()).func
11765};
11766var ModalHeader_defaultProps = {
11767 closeLabel: 'Close',
11768 closeButton: false
11769};
11770var ModalHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
11771 var bsPrefix = _ref.bsPrefix,
11772 closeLabel = _ref.closeLabel,
11773 closeButton = _ref.closeButton,
11774 onHide = _ref.onHide,
11775 className = _ref.className,
11776 children = _ref.children,
11777 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ModalHeader_excluded);
11778
11779 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-header');
11780 var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_ModalContext);
11781 var handleClick = useEventCallback(function () {
11782 if (context) context.onHide();
11783 if (onHide) onHide();
11784 });
11785 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
11786 ref: ref
11787 }, props, {
11788 className: classnames_default()(className, bsPrefix),
11789 __self: ModalHeader_this,
11790 __source: {
11791 fileName: ModalHeader_jsxFileName,
11792 lineNumber: 70,
11793 columnNumber: 7
11794 }
11795 }), children, closeButton && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_CloseButton, {
11796 label: closeLabel,
11797 onClick: handleClick,
11798 __self: ModalHeader_this,
11799 __source: {
11800 fileName: ModalHeader_jsxFileName,
11801 lineNumber: 74,
11802 columnNumber: 11
11803 }
11804 }));
11805});
11806ModalHeader.displayName = 'ModalHeader';
11807ModalHeader.propTypes = ModalHeader_propTypes;
11808ModalHeader.defaultProps = ModalHeader_defaultProps;
11809/* harmony default export */ const src_ModalHeader = (ModalHeader);
11810;// CONCATENATED MODULE: ./src/ModalTitle.tsx
11811
11812
11813var ModalTitle_DivStyledAsH4 = divWithClassName('h4');
11814/* harmony default export */ const ModalTitle = (createWithBsPrefix('modal-title', {
11815 Component: ModalTitle_DivStyledAsH4
11816}));
11817;// CONCATENATED MODULE: ./src/Modal.tsx
11818
11819
11820var Modal_excluded = ["bsPrefix", "className", "style", "dialogClassName", "contentClassName", "children", "dialogAs", "aria-labelledby", "show", "animation", "backdrop", "keyboard", "onEscapeKeyDown", "onShow", "onHide", "container", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "onEntered", "onExit", "onExiting", "onEnter", "onEntering", "onExited", "backdropClassName", "manager"];
11821
11822var Modal_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Modal.tsx",
11823 Modal_this = undefined;
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848var Modal_manager;
11849var src_Modal_propTypes = {
11850 /**
11851 * @default 'modal'
11852 */
11853 bsPrefix: (prop_types_default()).string,
11854
11855 /**
11856 * Render a large, extra large or small modal.
11857 * When not provided, the modal is rendered with medium (default) size.
11858 * @type ('sm'|'lg','xl')
11859 */
11860 size: (prop_types_default()).string,
11861
11862 /**
11863 * vertically center the Dialog in the window
11864 */
11865 centered: (prop_types_default()).bool,
11866
11867 /**
11868 * Include a backdrop component. Specify 'static' for a backdrop that doesn't
11869 * trigger an "onHide" when clicked.
11870 */
11871 backdrop: prop_types_default().oneOf(['static', true, false]),
11872
11873 /**
11874 * Add an optional extra class name to .modal-backdrop
11875 * It could end up looking like class="modal-backdrop foo-modal-backdrop in".
11876 */
11877 backdropClassName: (prop_types_default()).string,
11878
11879 /**
11880 * Close the modal when escape key is pressed
11881 */
11882 keyboard: (prop_types_default()).bool,
11883
11884 /**
11885 * Allows scrolling the `<Modal.Body>` instead of the entire Modal when overflowing.
11886 */
11887 scrollable: (prop_types_default()).bool,
11888
11889 /**
11890 * Open and close the Modal with a slide and fade animation.
11891 */
11892 animation: (prop_types_default()).bool,
11893
11894 /**
11895 * A css class to apply to the Modal dialog DOM node.
11896 */
11897 dialogClassName: (prop_types_default()).string,
11898
11899 /**
11900 * Add an optional extra class name to .modal-content
11901 */
11902 contentClassName: (prop_types_default()).string,
11903
11904 /**
11905 * A Component type that provides the modal content Markup. This is a useful
11906 * prop when you want to use your own styles and markup to create a custom
11907 * modal component.
11908 */
11909 dialogAs: (prop_types_default()).elementType,
11910
11911 /**
11912 * When `true` The modal will automatically shift focus to itself when it
11913 * opens, and replace it to the last focused element when it closes.
11914 * Generally this should never be set to false as it makes the Modal less
11915 * accessible to assistive technologies, like screen-readers.
11916 */
11917 autoFocus: (prop_types_default()).bool,
11918
11919 /**
11920 * When `true` The modal will prevent focus from leaving the Modal while
11921 * open. Consider leaving the default value here, as it is necessary to make
11922 * the Modal work well with assistive technologies, such as screen readers.
11923 */
11924 enforceFocus: (prop_types_default()).bool,
11925
11926 /**
11927 * When `true` The modal will restore focus to previously focused element once
11928 * modal is hidden
11929 */
11930 restoreFocus: (prop_types_default()).bool,
11931
11932 /**
11933 * Options passed to focus function when `restoreFocus` is set to `true`
11934 *
11935 * @link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#Parameters
11936 */
11937 restoreFocusOptions: prop_types_default().shape({
11938 preventScroll: (prop_types_default()).bool
11939 }),
11940
11941 /**
11942 * When `true` The modal will show itself.
11943 */
11944 show: (prop_types_default()).bool,
11945
11946 /**
11947 * A callback fired when the Modal is opening.
11948 */
11949 onShow: (prop_types_default()).func,
11950
11951 /**
11952 * A callback fired when the header closeButton or non-static backdrop is
11953 * clicked. Required if either are specified.
11954 */
11955 onHide: (prop_types_default()).func,
11956
11957 /**
11958 * A callback fired when the escape key, if specified in `keyboard`, is pressed.
11959 */
11960 onEscapeKeyDown: (prop_types_default()).func,
11961
11962 /**
11963 * Callback fired before the Modal transitions in
11964 */
11965 onEnter: (prop_types_default()).func,
11966
11967 /**
11968 * Callback fired as the Modal begins to transition in
11969 */
11970 onEntering: (prop_types_default()).func,
11971
11972 /**
11973 * Callback fired after the Modal finishes transitioning in
11974 */
11975 onEntered: (prop_types_default()).func,
11976
11977 /**
11978 * Callback fired right before the Modal transitions out
11979 */
11980 onExit: (prop_types_default()).func,
11981
11982 /**
11983 * Callback fired as the Modal begins to transition out
11984 */
11985 onExiting: (prop_types_default()).func,
11986
11987 /**
11988 * Callback fired after the Modal finishes transitioning out
11989 */
11990 onExited: (prop_types_default()).func,
11991
11992 /**
11993 * A ModalManager instance used to track and manage the state of open
11994 * Modals. Useful when customizing how modals interact within a container
11995 */
11996 manager: (prop_types_default()).object,
11997
11998 /**
11999 * @private
12000 */
12001 container: (prop_types_default()).any,
12002 'aria-labelledby': (prop_types_default()).any
12003};
12004var Modal_defaultProps = {
12005 show: false,
12006 backdrop: true,
12007 keyboard: true,
12008 autoFocus: true,
12009 enforceFocus: true,
12010 restoreFocus: true,
12011 animation: true,
12012 dialogAs: src_ModalDialog
12013};
12014/* eslint-disable no-use-before-define, react/no-multi-comp */
12015
12016function DialogTransition(props) {
12017 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Fade, extends_extends({}, props, {
12018 timeout: null,
12019 __self: this,
12020 __source: {
12021 fileName: Modal_jsxFileName,
12022 lineNumber: 236,
12023 columnNumber: 10
12024 }
12025 }));
12026}
12027
12028function BackdropTransition(props) {
12029 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Fade, extends_extends({}, props, {
12030 timeout: null,
12031 __self: this,
12032 __source: {
12033 fileName: Modal_jsxFileName,
12034 lineNumber: 240,
12035 columnNumber: 10
12036 }
12037 }));
12038}
12039/* eslint-enable no-use-before-define */
12040
12041
12042var Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
12043 var bsPrefix = _ref.bsPrefix,
12044 className = _ref.className,
12045 style = _ref.style,
12046 dialogClassName = _ref.dialogClassName,
12047 contentClassName = _ref.contentClassName,
12048 children = _ref.children,
12049 Dialog = _ref.dialogAs,
12050 ariaLabelledby = _ref['aria-labelledby'],
12051 show = _ref.show,
12052 animation = _ref.animation,
12053 backdrop = _ref.backdrop,
12054 keyboard = _ref.keyboard,
12055 onEscapeKeyDown = _ref.onEscapeKeyDown,
12056 onShow = _ref.onShow,
12057 onHide = _ref.onHide,
12058 container = _ref.container,
12059 autoFocus = _ref.autoFocus,
12060 enforceFocus = _ref.enforceFocus,
12061 restoreFocus = _ref.restoreFocus,
12062 restoreFocusOptions = _ref.restoreFocusOptions,
12063 onEntered = _ref.onEntered,
12064 onExit = _ref.onExit,
12065 onExiting = _ref.onExiting,
12066 onEnter = _ref.onEnter,
12067 onEntering = _ref.onEntering,
12068 onExited = _ref.onExited,
12069 backdropClassName = _ref.backdropClassName,
12070 propsManager = _ref.manager,
12071 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Modal_excluded);
12072
12073 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
12074 modalStyle = _useState[0],
12075 setStyle = _useState[1];
12076
12077 var _useState2 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
12078 animateStaticModal = _useState2[0],
12079 setAnimateStaticModal = _useState2[1];
12080
12081 var waitingForMouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
12082 var ignoreBackdropClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
12083 var removeStaticModalAnimationRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null); // TODO: what's this type
12084
12085 var _useCallbackRef = useCallbackRef(),
12086 modal = _useCallbackRef[0],
12087 setModalRef = _useCallbackRef[1];
12088
12089 var handleHide = useEventCallback(onHide);
12090 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
12091 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
12092 return {
12093 get _modal() {
12094 false ? 0 : void 0;
12095 return modal;
12096 }
12097
12098 };
12099 }, [modal]);
12100 var modalContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
12101 return {
12102 onHide: handleHide
12103 };
12104 }, [handleHide]);
12105
12106 function getModalManager() {
12107 if (propsManager) return propsManager;
12108 if (!Modal_manager) Modal_manager = new BootstrapModalManager();
12109 return Modal_manager;
12110 }
12111
12112 function updateDialogStyle(node) {
12113 if (!canUseDOM) return;
12114 var containerIsOverflowing = getModalManager().isContainerOverflowing(modal);
12115 var modalIsOverflowing = node.scrollHeight > ownerDocument(node).documentElement.clientHeight;
12116 setStyle({
12117 paddingRight: containerIsOverflowing && !modalIsOverflowing ? scrollbarSize() : undefined,
12118 paddingLeft: !containerIsOverflowing && modalIsOverflowing ? scrollbarSize() : undefined
12119 });
12120 }
12121
12122 var handleWindowResize = useEventCallback(function () {
12123 if (modal) {
12124 updateDialogStyle(modal.dialog);
12125 }
12126 });
12127 useWillUnmount(function () {
12128 esm_removeEventListener(window, 'resize', handleWindowResize);
12129
12130 if (removeStaticModalAnimationRef.current) {
12131 removeStaticModalAnimationRef.current();
12132 }
12133 }); // We prevent the modal from closing during a drag by detecting where the
12134 // the click originates from. If it starts in the modal and then ends outside
12135 // don't close.
12136
12137 var handleDialogMouseDown = function handleDialogMouseDown() {
12138 waitingForMouseUpRef.current = true;
12139 };
12140
12141 var handleMouseUp = function handleMouseUp(e) {
12142 if (waitingForMouseUpRef.current && modal && e.target === modal.dialog) {
12143 ignoreBackdropClickRef.current = true;
12144 }
12145
12146 waitingForMouseUpRef.current = false;
12147 };
12148
12149 var handleStaticModalAnimation = function handleStaticModalAnimation() {
12150 setAnimateStaticModal(true);
12151 removeStaticModalAnimationRef.current = transitionEnd(modal.dialog, function () {
12152 setAnimateStaticModal(false);
12153 });
12154 };
12155
12156 var handleStaticBackdropClick = function handleStaticBackdropClick(e) {
12157 if (e.target !== e.currentTarget) {
12158 return;
12159 }
12160
12161 handleStaticModalAnimation();
12162 };
12163
12164 var handleClick = function handleClick(e) {
12165 if (backdrop === 'static') {
12166 handleStaticBackdropClick(e);
12167 return;
12168 }
12169
12170 if (ignoreBackdropClickRef.current || e.target !== e.currentTarget) {
12171 ignoreBackdropClickRef.current = false;
12172 return;
12173 }
12174
12175 onHide == null ? void 0 : onHide();
12176 };
12177
12178 var handleEscapeKeyDown = function handleEscapeKeyDown(e) {
12179 if (!keyboard && backdrop === 'static') {
12180 // Call preventDefault to stop modal from closing in react-overlays,
12181 // then play our animation.
12182 e.preventDefault();
12183 handleStaticModalAnimation();
12184 } else if (keyboard && onEscapeKeyDown) {
12185 onEscapeKeyDown(e);
12186 }
12187 };
12188
12189 var handleEnter = function handleEnter(node, isAppearing) {
12190 if (node) {
12191 node.style.display = 'block';
12192 updateDialogStyle(node);
12193 }
12194
12195 onEnter == null ? void 0 : onEnter(node, isAppearing);
12196 };
12197
12198 var handleExit = function handleExit(node) {
12199 removeStaticModalAnimationRef.current == null ? void 0 : removeStaticModalAnimationRef.current();
12200 onExit == null ? void 0 : onExit(node);
12201 };
12202
12203 var handleEntering = function handleEntering(node, isAppearing) {
12204 onEntering == null ? void 0 : onEntering(node, isAppearing); // FIXME: This should work even when animation is disabled.
12205
12206 esm_addEventListener(window, 'resize', handleWindowResize);
12207 };
12208
12209 var handleExited = function handleExited(node) {
12210 if (node) node.style.display = ''; // RHL removes it sometimes
12211
12212 onExited == null ? void 0 : onExited(node); // FIXME: This should work even when animation is disabled.
12213
12214 esm_removeEventListener(window, 'resize', handleWindowResize);
12215 };
12216
12217 var renderBackdrop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (backdropProps) {
12218 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, backdropProps, {
12219 className: classnames_default()(bsPrefix + "-backdrop", backdropClassName, !animation && 'show'),
12220 __self: Modal_this,
12221 __source: {
12222 fileName: Modal_jsxFileName,
12223 lineNumber: 445,
12224 columnNumber: 9
12225 }
12226 }));
12227 }, [animation, backdropClassName, bsPrefix]);
12228
12229 var baseModalStyle = extends_extends({}, style, modalStyle); // Sets `display` always block when `animation` is false
12230
12231
12232 if (!animation) {
12233 baseModalStyle.display = 'block';
12234 }
12235
12236 var renderDialog = function renderDialog(dialogProps) {
12237 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
12238 role: "dialog"
12239 }, dialogProps, {
12240 style: baseModalStyle,
12241 className: classnames_default()(className, bsPrefix, animateStaticModal && bsPrefix + "-static"),
12242 onClick: backdrop ? handleClick : undefined,
12243 onMouseUp: handleMouseUp,
12244 "aria-labelledby": ariaLabelledby,
12245 __self: Modal_this,
12246 __source: {
12247 fileName: Modal_jsxFileName,
12248 lineNumber: 465,
12249 columnNumber: 7
12250 }
12251 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Dialog, extends_extends({}, props, {
12252 onMouseDown: handleDialogMouseDown,
12253 className: dialogClassName,
12254 contentClassName: contentClassName,
12255 __self: Modal_this,
12256 __source: {
12257 fileName: Modal_jsxFileName,
12258 lineNumber: 480,
12259 columnNumber: 9
12260 }
12261 }), children));
12262 };
12263
12264 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_ModalContext.Provider, {
12265 value: modalContext,
12266 __self: Modal_this,
12267 __source: {
12268 fileName: Modal_jsxFileName,
12269 lineNumber: 492,
12270 columnNumber: 7
12271 }
12272 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Modal, {
12273 show: show,
12274 ref: setModalRef,
12275 backdrop: backdrop,
12276 container: container,
12277 keyboard: true // Always set true - see handleEscapeKeyDown
12278 ,
12279 autoFocus: autoFocus,
12280 enforceFocus: enforceFocus,
12281 restoreFocus: restoreFocus,
12282 restoreFocusOptions: restoreFocusOptions,
12283 onEscapeKeyDown: handleEscapeKeyDown,
12284 onShow: onShow,
12285 onHide: onHide,
12286 onEnter: handleEnter,
12287 onEntering: handleEntering,
12288 onEntered: onEntered,
12289 onExit: handleExit,
12290 onExiting: onExiting,
12291 onExited: handleExited,
12292 manager: getModalManager(),
12293 containerClassName: bsPrefix + "-open",
12294 transition: animation ? DialogTransition : undefined,
12295 backdropTransition: animation ? BackdropTransition : undefined,
12296 renderBackdrop: renderBackdrop,
12297 renderDialog: renderDialog,
12298 __self: Modal_this,
12299 __source: {
12300 fileName: Modal_jsxFileName,
12301 lineNumber: 493,
12302 columnNumber: 9
12303 }
12304 }));
12305});
12306Modal_Modal.displayName = 'Modal';
12307Modal_Modal.propTypes = src_Modal_propTypes;
12308Modal_Modal.defaultProps = Modal_defaultProps;
12309Modal_Modal.Body = ModalBody;
12310Modal_Modal.Header = src_ModalHeader;
12311Modal_Modal.Title = ModalTitle;
12312Modal_Modal.Footer = ModalFooter;
12313Modal_Modal.Dialog = src_ModalDialog;
12314Modal_Modal.TRANSITION_DURATION = 300;
12315Modal_Modal.BACKDROP_TRANSITION_DURATION = 150;
12316/* harmony default export */ const src_Modal = (Modal_Modal);
12317;// CONCATENATED MODULE: ./src/NavItem.tsx
12318
12319
12320var NavItem_excluded = ["bsPrefix", "className", "children", "as"];
12321
12322var NavItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavItem.tsx",
12323 NavItem_this = undefined;
12324
12325
12326
12327
12328
12329var NavItem_propTypes = {
12330 /**
12331 * @default 'nav-item'
12332 */
12333 bsPrefix: (prop_types_default()).string,
12334
12335 /** The ARIA role of the component */
12336 role: (prop_types_default()).string,
12337 as: (prop_types_default()).elementType
12338};
12339var NavItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
12340function (_ref, ref) {
12341 var bsPrefix = _ref.bsPrefix,
12342 className = _ref.className,
12343 children = _ref.children,
12344 _ref$as = _ref.as,
12345 Component = _ref$as === void 0 ? 'div' : _ref$as,
12346 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavItem_excluded);
12347
12348 bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');
12349 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
12350 ref: ref,
12351 className: classnames_default()(className, bsPrefix),
12352 __self: NavItem_this,
12353 __source: {
12354 fileName: NavItem_jsxFileName,
12355 lineNumber: 44,
12356 columnNumber: 7
12357 }
12358 }), children);
12359});
12360NavItem.displayName = 'NavItem';
12361NavItem.propTypes = NavItem_propTypes;
12362/* harmony default export */ const src_NavItem = (NavItem);
12363;// CONCATENATED MODULE: ./src/NavLink.tsx
12364
12365
12366var NavLink_excluded = ["bsPrefix", "disabled", "className", "href", "eventKey", "onSelect", "as"];
12367
12368var NavLink_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavLink.tsx",
12369 NavLink_this = undefined;
12370
12371
12372
12373
12374
12375
12376
12377var NavLink_propTypes = {
12378 /**
12379 * @default 'nav-link'
12380 */
12381 bsPrefix: (prop_types_default()).string,
12382
12383 /**
12384 * The active state of the NavItem item.
12385 */
12386 active: (prop_types_default()).bool,
12387
12388 /**
12389 * The disabled state of the NavItem item.
12390 */
12391 disabled: (prop_types_default()).bool,
12392
12393 /**
12394 * The ARIA role for the `NavLink`, In the context of a 'tablist' parent Nav,
12395 * the role defaults to 'tab'
12396 * */
12397 role: (prop_types_default()).string,
12398
12399 /** The HTML href attribute for the `NavLink` */
12400 href: (prop_types_default()).string,
12401
12402 /** A callback fired when the `NavLink` is selected.
12403 *
12404 * ```js
12405 * function (eventKey: any, event: SyntheticEvent) {}
12406 * ```
12407 */
12408 onSelect: (prop_types_default()).func,
12409
12410 /**
12411 * Uniquely idenifies the `NavItem` amongst its siblings,
12412 * used to determine and control the active state of the parent `Nav`
12413 */
12414 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
12415
12416 /** @default 'a' */
12417 as: (prop_types_default()).elementType
12418};
12419var NavLink_defaultProps = {
12420 disabled: false,
12421 as: src_SafeAnchor
12422};
12423var NavLink = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
12424 var bsPrefix = _ref.bsPrefix,
12425 disabled = _ref.disabled,
12426 className = _ref.className,
12427 href = _ref.href,
12428 eventKey = _ref.eventKey,
12429 onSelect = _ref.onSelect,
12430 as = _ref.as,
12431 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavLink_excluded);
12432
12433 bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-link');
12434 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AbstractNavItem, extends_extends({}, props, {
12435 href: href,
12436 ref: ref,
12437 eventKey: eventKey,
12438 as: as,
12439 disabled: disabled,
12440 onSelect: onSelect,
12441 className: classnames_default()(className, bsPrefix, disabled && 'disabled'),
12442 __self: NavLink_this,
12443 __source: {
12444 fileName: NavLink_jsxFileName,
12445 lineNumber: 91,
12446 columnNumber: 7
12447 }
12448 }));
12449});
12450NavLink.displayName = 'NavLink';
12451NavLink.propTypes = NavLink_propTypes;
12452NavLink.defaultProps = NavLink_defaultProps;
12453/* harmony default export */ const src_NavLink = (NavLink);
12454;// CONCATENATED MODULE: ./src/Nav.tsx
12455
12456
12457var Nav_excluded = ["as", "bsPrefix", "variant", "fill", "justify", "navbar", "navbarScroll", "className", "children", "activeKey"];
12458
12459var Nav_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Nav.tsx",
12460 Nav_this = undefined;
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473var Nav_propTypes = {
12474 /**
12475 * @default 'nav'
12476 */
12477 bsPrefix: (prop_types_default()).string,
12478
12479 /** @private */
12480 navbarBsPrefix: (prop_types_default()).string,
12481
12482 /** @private */
12483 cardHeaderBsPrefix: (prop_types_default()).string,
12484
12485 /**
12486 * The visual variant of the nav items.
12487 *
12488 * @type {('tabs'|'pills')}
12489 */
12490 variant: (prop_types_default()).string,
12491
12492 /**
12493 * Marks the NavItem with a matching `eventKey` (or `href` if present) as active.
12494 *
12495 * @type {string}
12496 */
12497 activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
12498
12499 /**
12500 * Have all `NavItem`s proportionately fill all available width.
12501 */
12502 fill: (prop_types_default()).bool,
12503
12504 /**
12505 * Have all `NavItem`s evenly fill all available width.
12506 *
12507 * @type {boolean}
12508 */
12509 justify: all_default()((prop_types_default()).bool, function (_ref) {
12510 var justify = _ref.justify,
12511 navbar = _ref.navbar;
12512 return justify && navbar ? Error('justify navbar `Nav`s are not supported') : null;
12513 }),
12514
12515 /**
12516 * A callback fired when a NavItem is selected.
12517 *
12518 * ```js
12519 * function (
12520 * Any eventKey,
12521 * SyntheticEvent event?
12522 * )
12523 * ```
12524 */
12525 onSelect: (prop_types_default()).func,
12526
12527 /**
12528 * ARIA role for the Nav, in the context of a TabContainer, the default will
12529 * be set to "tablist", but can be overridden by the Nav when set explicitly.
12530 *
12531 * When the role is "tablist", NavLink focus is managed according to
12532 * the ARIA authoring practices for tabs:
12533 * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel
12534 */
12535 role: (prop_types_default()).string,
12536
12537 /**
12538 * Apply styling an alignment for use in a Navbar. This prop will be set
12539 * automatically when the Nav is used inside a Navbar.
12540 */
12541 navbar: (prop_types_default()).bool,
12542
12543 /**
12544 * Enable vertical scrolling within the toggleable contents of a collapsed Navbar.
12545 */
12546 navbarScroll: (prop_types_default()).bool,
12547 as: (prop_types_default()).elementType,
12548
12549 /** @private */
12550 onKeyDown: (prop_types_default()).func
12551};
12552var Nav_defaultProps = {
12553 justify: false,
12554 fill: false
12555};
12556var Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (uncontrolledProps, ref) {
12557 var _classNames;
12558
12559 var _useUncontrolled = useUncontrolled(uncontrolledProps, {
12560 activeKey: 'onSelect'
12561 }),
12562 _useUncontrolled$as = _useUncontrolled.as,
12563 as = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
12564 initialBsPrefix = _useUncontrolled.bsPrefix,
12565 variant = _useUncontrolled.variant,
12566 fill = _useUncontrolled.fill,
12567 justify = _useUncontrolled.justify,
12568 navbar = _useUncontrolled.navbar,
12569 navbarScroll = _useUncontrolled.navbarScroll,
12570 className = _useUncontrolled.className,
12571 children = _useUncontrolled.children,
12572 activeKey = _useUncontrolled.activeKey,
12573 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Nav_excluded);
12574
12575 var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'nav');
12576 var navbarBsPrefix;
12577 var cardHeaderBsPrefix;
12578 var isNavbar = false;
12579 var navbarContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
12580 var cardContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(CardContext);
12581
12582 if (navbarContext) {
12583 navbarBsPrefix = navbarContext.bsPrefix;
12584 isNavbar = navbar == null ? true : navbar;
12585 } else if (cardContext) {
12586 cardHeaderBsPrefix = cardContext.cardHeaderBsPrefix;
12587 }
12588
12589 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AbstractNav, extends_extends({
12590 as: as,
12591 ref: ref,
12592 activeKey: activeKey,
12593 className: classnames_default()(className, (_classNames = {}, _classNames[bsPrefix] = !isNavbar, _classNames[navbarBsPrefix + "-nav"] = isNavbar, _classNames[navbarBsPrefix + "-nav-scroll"] = isNavbar && navbarScroll, _classNames[cardHeaderBsPrefix + "-" + variant] = !!cardHeaderBsPrefix, _classNames[bsPrefix + "-" + variant] = !!variant, _classNames[bsPrefix + "-fill"] = fill, _classNames[bsPrefix + "-justified"] = justify, _classNames))
12594 }, props, {
12595 __self: Nav_this,
12596 __source: {
12597 fileName: Nav_jsxFileName,
12598 lineNumber: 156,
12599 columnNumber: 5
12600 }
12601 }), children);
12602});
12603Nav.displayName = 'Nav';
12604Nav.propTypes = Nav_propTypes;
12605Nav.defaultProps = Nav_defaultProps;
12606Nav.Item = src_NavItem;
12607Nav.Link = src_NavLink;
12608/* harmony default export */ const src_Nav = (Nav);
12609;// CONCATENATED MODULE: ./src/NavbarBrand.tsx
12610
12611
12612var NavbarBrand_excluded = ["bsPrefix", "className", "as"];
12613
12614var NavbarBrand_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarBrand.tsx",
12615 NavbarBrand_this = undefined;
12616
12617
12618
12619
12620
12621var NavbarBrand_propTypes = {
12622 /** @default 'navbar' */
12623 bsPrefix: (prop_types_default()).string,
12624
12625 /**
12626 * An href, when provided the Brand will render as an `<a>` element (unless `as` is provided).
12627 */
12628 href: (prop_types_default()).string,
12629
12630 /**
12631 * Set a custom element for this component.
12632 */
12633 as: (prop_types_default()).elementType
12634};
12635var NavbarBrand = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
12636 var bsPrefix = _ref.bsPrefix,
12637 className = _ref.className,
12638 as = _ref.as,
12639 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavbarBrand_excluded);
12640
12641 bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-brand');
12642 var Component = as || (props.href ? 'a' : 'span');
12643 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
12644 ref: ref,
12645 className: classnames_default()(className, bsPrefix),
12646 __self: NavbarBrand_this,
12647 __source: {
12648 fileName: NavbarBrand_jsxFileName,
12649 lineNumber: 36,
12650 columnNumber: 7
12651 }
12652 }));
12653});
12654NavbarBrand.displayName = 'NavbarBrand';
12655NavbarBrand.propTypes = NavbarBrand_propTypes;
12656/* harmony default export */ const src_NavbarBrand = (NavbarBrand);
12657;// CONCATENATED MODULE: ./src/NavbarCollapse.tsx
12658
12659
12660var NavbarCollapse_excluded = ["children", "bsPrefix"];
12661
12662var NavbarCollapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarCollapse.tsx",
12663 NavbarCollapse_this = undefined;
12664
12665
12666
12667
12668
12669
12670var NavbarCollapse_propTypes = {
12671 /** @default 'navbar-collapse' */
12672 bsPrefix: (prop_types_default()).string
12673};
12674var NavbarCollapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
12675 var children = _ref.children,
12676 bsPrefix = _ref.bsPrefix,
12677 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavbarCollapse_excluded);
12678
12679 bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-collapse');
12680 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NavbarContext.Consumer, {
12681 __self: NavbarCollapse_this,
12682 __source: {
12683 fileName: NavbarCollapse_jsxFileName,
12684 lineNumber: 23,
12685 columnNumber: 7
12686 }
12687 }, function (context) {
12688 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Collapse, extends_extends({
12689 in: !!(context && context.expanded)
12690 }, props, {
12691 __self: NavbarCollapse_this,
12692 __source: {
12693 fileName: NavbarCollapse_jsxFileName,
12694 lineNumber: 25,
12695 columnNumber: 11
12696 }
12697 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
12698 ref: ref,
12699 className: bsPrefix,
12700 __self: NavbarCollapse_this,
12701 __source: {
12702 fileName: NavbarCollapse_jsxFileName,
12703 lineNumber: 26,
12704 columnNumber: 13
12705 }
12706 }, children));
12707 });
12708});
12709NavbarCollapse.displayName = 'NavbarCollapse';
12710NavbarCollapse.propTypes = NavbarCollapse_propTypes;
12711/* harmony default export */ const src_NavbarCollapse = (NavbarCollapse);
12712;// CONCATENATED MODULE: ./src/NavbarToggle.tsx
12713
12714
12715var NavbarToggle_excluded = ["bsPrefix", "className", "children", "label", "as", "onClick"];
12716
12717var NavbarToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarToggle.tsx",
12718 NavbarToggle_this = undefined;
12719
12720
12721
12722
12723
12724
12725
12726var NavbarToggle_propTypes = {
12727 /** @default 'navbar-toggler' */
12728 bsPrefix: (prop_types_default()).string,
12729
12730 /** An accessible ARIA label for the toggler button. */
12731 label: (prop_types_default()).string,
12732
12733 /** @private */
12734 onClick: (prop_types_default()).func,
12735
12736 /**
12737 * The toggle content. When empty, the default toggle will be rendered.
12738 */
12739 children: (prop_types_default()).node,
12740 as: (prop_types_default()).elementType
12741};
12742var NavbarToggle_defaultProps = {
12743 label: 'Toggle navigation'
12744};
12745var NavbarToggle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
12746 var bsPrefix = _ref.bsPrefix,
12747 className = _ref.className,
12748 children = _ref.children,
12749 label = _ref.label,
12750 _ref$as = _ref.as,
12751 Component = _ref$as === void 0 ? 'button' : _ref$as,
12752 onClick = _ref.onClick,
12753 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavbarToggle_excluded);
12754
12755 bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-toggler');
12756
12757 var _ref2 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext) || {},
12758 onToggle = _ref2.onToggle,
12759 expanded = _ref2.expanded;
12760
12761 var handleClick = useEventCallback(function (e) {
12762 if (onClick) onClick(e);
12763 if (onToggle) onToggle();
12764 });
12765
12766 if (Component === 'button') {
12767 props.type = 'button';
12768 }
12769
12770 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
12771 ref: ref,
12772 onClick: handleClick,
12773 "aria-label": label,
12774 className: classnames_default()(className, bsPrefix, !expanded && 'collapsed'),
12775 __self: NavbarToggle_this,
12776 __source: {
12777 fileName: NavbarToggle_jsxFileName,
12778 lineNumber: 70,
12779 columnNumber: 7
12780 }
12781 }), children || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
12782 className: bsPrefix + "-icon",
12783 __self: NavbarToggle_this,
12784 __source: {
12785 fileName: NavbarToggle_jsxFileName,
12786 lineNumber: 77,
12787 columnNumber: 22
12788 }
12789 }));
12790});
12791NavbarToggle.displayName = 'NavbarToggle';
12792NavbarToggle.propTypes = NavbarToggle_propTypes;
12793NavbarToggle.defaultProps = NavbarToggle_defaultProps;
12794/* harmony default export */ const src_NavbarToggle = (NavbarToggle);
12795;// CONCATENATED MODULE: ./src/Navbar.tsx
12796
12797
12798var Navbar_excluded = ["bsPrefix", "expand", "variant", "bg", "fixed", "sticky", "className", "children", "as", "expanded", "onToggle", "onSelect", "collapseOnSelect"];
12799
12800var Navbar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Navbar.tsx",
12801 Navbar_this = undefined;
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814var NavbarText = createWithBsPrefix('navbar-text', {
12815 Component: 'span'
12816});
12817var Navbar_propTypes = {
12818 /** @default 'navbar' */
12819 bsPrefix: (prop_types_default()).string,
12820
12821 /**
12822 * The general visual variant a the Navbar.
12823 * Use in combination with the `bg` prop, `background-color` utilities,
12824 * or your own background styles.
12825 *
12826 * @type {('light'|'dark')}
12827 */
12828 variant: (prop_types_default()).string,
12829
12830 /**
12831 * The breakpoint, below which, the Navbar will collapse.
12832 * When `true` the Navbar will always be expanded regardless of screen size.
12833 */
12834 expand: prop_types_default().oneOf([true, 'sm', 'md', 'lg', 'xl']).isRequired,
12835
12836 /**
12837 * A convenience prop for adding `bg-*` utility classes since they are so commonly used here.
12838 * `light` and `dark` are common choices but any `bg-*` class is supported, including any custom ones you might define.
12839 *
12840 * Pairs nicely with the `variant` prop.
12841 */
12842 bg: (prop_types_default()).string,
12843
12844 /**
12845 * Create a fixed navbar along the top or bottom of the screen, that scrolls with the
12846 * page. A convenience prop for the `fixed-*` positioning classes.
12847 */
12848 fixed: prop_types_default().oneOf(['top', 'bottom']),
12849
12850 /**
12851 * Position the navbar at the top of the viewport, but only after scrolling past it.
12852 * A convenience prop for the `sticky-top` positioning class.
12853 *
12854 * __Not supported in <= IE11 and other older browsers without a polyfill__
12855 */
12856 sticky: prop_types_default().oneOf(['top']),
12857
12858 /**
12859 * Set a custom element for this component.
12860 */
12861 as: (prop_types_default()).elementType,
12862
12863 /**
12864 * A callback fired when the `<Navbar>` body collapses or expands. Fired when
12865 * a `<Navbar.Toggle>` is clicked and called with the new `expanded`
12866 * boolean value.
12867 *
12868 * @controllable expanded
12869 */
12870 onToggle: (prop_types_default()).func,
12871
12872 /**
12873 * A callback fired when a descendant of a child `<Nav>` is selected. Should
12874 * be used to execute complex closing or other miscellaneous actions desired
12875 * after selecting a descendant of `<Nav>`. Does nothing if no `<Nav>` or `<Nav>`
12876 * descendants exist. The callback is called with an eventKey, which is a
12877 * prop from the selected `<Nav>` descendant, and an event.
12878 *
12879 * ```js
12880 * function (
12881 * eventKey: mixed,
12882 * event?: SyntheticEvent
12883 * )
12884 * ```
12885 *
12886 * For basic closing behavior after all `<Nav>` descendant onSelect events in
12887 * mobile viewports, try using collapseOnSelect.
12888 *
12889 * Note: If you are manually closing the navbar using this `OnSelect` prop,
12890 * ensure that you are setting `expanded` to false and not *toggling* between
12891 * true and false.
12892 */
12893 onSelect: (prop_types_default()).func,
12894
12895 /**
12896 * Toggles `expanded` to `false` after the onSelect event of a descendant of a
12897 * child `<Nav>` fires. Does nothing if no `<Nav>` or `<Nav>` descendants exist.
12898 *
12899 * Manually controlling `expanded` via the onSelect callback is recommended instead,
12900 * for more complex operations that need to be executed after
12901 * the `select` event of `<Nav>` descendants.
12902 */
12903 collapseOnSelect: (prop_types_default()).bool,
12904
12905 /**
12906 * Controls the visiblity of the navbar body
12907 *
12908 * @controllable onToggle
12909 */
12910 expanded: (prop_types_default()).bool,
12911
12912 /**
12913 * The ARIA role for the navbar, will default to 'navigation' for
12914 * Navbars whose `as` is something other than `<nav>`.
12915 *
12916 * @default 'navigation'
12917 */
12918 role: (prop_types_default()).string
12919};
12920var Navbar_defaultProps = {
12921 expand: true,
12922 variant: 'light',
12923 collapseOnSelect: false
12924};
12925var Navbar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
12926 var _useUncontrolled = useUncontrolled(props, {
12927 expanded: 'onToggle'
12928 }),
12929 initialBsPrefix = _useUncontrolled.bsPrefix,
12930 expand = _useUncontrolled.expand,
12931 variant = _useUncontrolled.variant,
12932 bg = _useUncontrolled.bg,
12933 fixed = _useUncontrolled.fixed,
12934 sticky = _useUncontrolled.sticky,
12935 className = _useUncontrolled.className,
12936 children = _useUncontrolled.children,
12937 _useUncontrolled$as = _useUncontrolled.as,
12938 Component = _useUncontrolled$as === void 0 ? 'nav' : _useUncontrolled$as,
12939 expanded = _useUncontrolled.expanded,
12940 _onToggle = _useUncontrolled.onToggle,
12941 onSelect = _useUncontrolled.onSelect,
12942 collapseOnSelect = _useUncontrolled.collapseOnSelect,
12943 controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Navbar_excluded);
12944
12945 var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'navbar');
12946 var handleCollapse = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
12947 if (onSelect) onSelect.apply(void 0, arguments);
12948
12949 if (collapseOnSelect && expanded) {
12950 if (_onToggle) {
12951 _onToggle(false);
12952 }
12953 }
12954 }, [onSelect, collapseOnSelect, expanded, _onToggle]); // will result in some false positives but that seems better
12955 // than false negatives. strict `undefined` check allows explicit
12956 // "nulling" of the role if the user really doesn't want one
12957
12958 if (controlledProps.role === undefined && Component !== 'nav') {
12959 controlledProps.role = 'navigation';
12960 }
12961
12962 var expandClass = bsPrefix + "-expand";
12963 if (typeof expand === 'string') expandClass = expandClass + "-" + expand;
12964 var navbarContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
12965 return {
12966 onToggle: function onToggle() {
12967 return _onToggle && _onToggle(!expanded);
12968 },
12969 bsPrefix: bsPrefix,
12970 expanded: !!expanded
12971 };
12972 }, [bsPrefix, expanded, _onToggle]);
12973 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NavbarContext.Provider, {
12974 value: navbarContext,
12975 __self: Navbar_this,
12976 __source: {
12977 fileName: Navbar_jsxFileName,
12978 lineNumber: 208,
12979 columnNumber: 5
12980 }
12981 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
12982 value: handleCollapse,
12983 __self: Navbar_this,
12984 __source: {
12985 fileName: Navbar_jsxFileName,
12986 lineNumber: 209,
12987 columnNumber: 7
12988 }
12989 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
12990 ref: ref
12991 }, controlledProps, {
12992 className: classnames_default()(className, bsPrefix, expand && expandClass, variant && bsPrefix + "-" + variant, bg && "bg-" + bg, sticky && "sticky-" + sticky, fixed && "fixed-" + fixed),
12993 __self: Navbar_this,
12994 __source: {
12995 fileName: Navbar_jsxFileName,
12996 lineNumber: 210,
12997 columnNumber: 9
12998 }
12999 }), children)));
13000});
13001Navbar.propTypes = Navbar_propTypes;
13002Navbar.defaultProps = Navbar_defaultProps;
13003Navbar.displayName = 'Navbar';
13004Navbar.Brand = src_NavbarBrand;
13005Navbar.Toggle = src_NavbarToggle;
13006Navbar.Collapse = src_NavbarCollapse;
13007Navbar.Text = NavbarText;
13008/* harmony default export */ const src_Navbar = (Navbar);
13009;// CONCATENATED MODULE: ./src/NavDropdown.tsx
13010
13011
13012var NavDropdown_excluded = ["id", "title", "children", "bsPrefix", "className", "rootCloseEvent", "menuRole", "disabled", "active", "renderMenuOnMount"];
13013
13014var NavDropdown_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavDropdown.tsx",
13015 NavDropdown_this = undefined;
13016
13017
13018
13019
13020
13021
13022
13023var NavDropdown_propTypes = {
13024 /**
13025 * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
13026 * @type {string|number}
13027 * @required
13028 */
13029 id: (prop_types_default()).any,
13030
13031 /** An `onClick` handler passed to the Toggle component */
13032 onClick: (prop_types_default()).func,
13033
13034 /** The content of the non-toggle Button. */
13035 title: (prop_types_default()).node.isRequired,
13036
13037 /** Disables the toggle NavLink */
13038 disabled: (prop_types_default()).bool,
13039
13040 /** Style the toggle NavLink as active */
13041 active: (prop_types_default()).bool,
13042
13043 /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
13044 menuRole: (prop_types_default()).string,
13045
13046 /** Whether to render the dropdown menu in the DOM before the first time it is shown */
13047 renderMenuOnMount: (prop_types_default()).bool,
13048
13049 /**
13050 * Which event when fired outside the component will cause it to be closed.
13051 *
13052 * _see [DropdownMenu](#menu-props) for more details_
13053 */
13054 rootCloseEvent: (prop_types_default()).string,
13055
13056 /** @ignore */
13057 bsPrefix: (prop_types_default()).string
13058};
13059var NavDropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
13060 var id = _ref.id,
13061 title = _ref.title,
13062 children = _ref.children,
13063 bsPrefix = _ref.bsPrefix,
13064 className = _ref.className,
13065 rootCloseEvent = _ref.rootCloseEvent,
13066 menuRole = _ref.menuRole,
13067 disabled = _ref.disabled,
13068 active = _ref.active,
13069 renderMenuOnMount = _ref.renderMenuOnMount,
13070 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavDropdown_excluded);
13071
13072 /* NavItem has no additional logic, it's purely presentational. Can set nav item class here to support "as" */
13073 var navItemPrefix = useBootstrapPrefix(undefined, 'nav-item');
13074 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown, extends_extends({
13075 ref: ref
13076 }, props, {
13077 className: classnames_default()(className, navItemPrefix),
13078 __self: NavDropdown_this,
13079 __source: {
13080 fileName: NavDropdown_jsxFileName,
13081 lineNumber: 87,
13082 columnNumber: 7
13083 }
13084 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown.Toggle, {
13085 id: id,
13086 eventKey: null,
13087 active: active,
13088 disabled: disabled,
13089 childBsPrefix: bsPrefix,
13090 as: src_NavLink,
13091 __self: NavDropdown_this,
13092 __source: {
13093 fileName: NavDropdown_jsxFileName,
13094 lineNumber: 92,
13095 columnNumber: 9
13096 }
13097 }, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown.Menu, {
13098 role: menuRole,
13099 renderOnMount: renderMenuOnMount,
13100 rootCloseEvent: rootCloseEvent,
13101 __self: NavDropdown_this,
13102 __source: {
13103 fileName: NavDropdown_jsxFileName,
13104 lineNumber: 103,
13105 columnNumber: 9
13106 }
13107 }, children));
13108});
13109NavDropdown.displayName = 'NavDropdown';
13110NavDropdown.propTypes = NavDropdown_propTypes;
13111NavDropdown.Item = src_Dropdown.Item;
13112NavDropdown.ItemText = src_Dropdown.ItemText;
13113NavDropdown.Divider = src_Dropdown.Divider;
13114NavDropdown.Header = src_Dropdown.Header;
13115/* harmony default export */ const src_NavDropdown = (NavDropdown);
13116;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/Overlay.js
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129/**
13130 * Built on top of `Popper.js`, the overlay component is
13131 * great for custom tooltip overlays.
13132 */
13133
13134var Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, outerRef) {
13135 var flip = props.flip,
13136 offset = props.offset,
13137 placement = props.placement,
13138 _props$containerPaddi = props.containerPadding,
13139 containerPadding = _props$containerPaddi === void 0 ? 5 : _props$containerPaddi,
13140 _props$popperConfig = props.popperConfig,
13141 popperConfig = _props$popperConfig === void 0 ? {} : _props$popperConfig,
13142 Transition = props.transition;
13143
13144 var _useCallbackRef = useCallbackRef(),
13145 rootElement = _useCallbackRef[0],
13146 attachRef = _useCallbackRef[1];
13147
13148 var _useCallbackRef2 = useCallbackRef(),
13149 arrowElement = _useCallbackRef2[0],
13150 attachArrowRef = _useCallbackRef2[1];
13151
13152 var mergedRef = esm_useMergedRefs(attachRef, outerRef);
13153 var container = useWaitForDOMRef(props.container);
13154 var target = useWaitForDOMRef(props.target);
13155
13156 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!props.show),
13157 exited = _useState[0],
13158 setExited = _useState[1];
13159
13160 var _usePopper = esm_usePopper(target, rootElement, mergeOptionsWithPopperConfig({
13161 placement: placement,
13162 enableEvents: !!props.show,
13163 containerPadding: containerPadding || 5,
13164 flip: flip,
13165 offset: offset,
13166 arrowElement: arrowElement,
13167 popperConfig: popperConfig
13168 })),
13169 styles = _usePopper.styles,
13170 attributes = _usePopper.attributes,
13171 popper = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_usePopper, ["styles", "attributes"]);
13172
13173 if (props.show) {
13174 if (exited) setExited(false);
13175 } else if (!props.transition && !exited) {
13176 setExited(true);
13177 }
13178
13179 var handleHidden = function handleHidden() {
13180 setExited(true);
13181
13182 if (props.onExited) {
13183 props.onExited.apply(props, arguments);
13184 }
13185 }; // Don't un-render the overlay while it's transitioning out.
13186
13187
13188 var mountOverlay = props.show || Transition && !exited;
13189 esm_useRootClose(rootElement, props.onHide, {
13190 disabled: !props.rootClose || props.rootCloseDisabled,
13191 clickTrigger: props.rootCloseEvent
13192 });
13193
13194 if (!mountOverlay) {
13195 // Don't bother showing anything if we don't have to.
13196 return null;
13197 }
13198
13199 var child = props.children(extends_extends({}, popper, {
13200 show: !!props.show,
13201 props: extends_extends({}, attributes.popper, {
13202 style: styles.popper,
13203 ref: mergedRef
13204 }),
13205 arrowProps: extends_extends({}, attributes.arrow, {
13206 style: styles.arrow,
13207 ref: attachArrowRef
13208 })
13209 }));
13210
13211 if (Transition) {
13212 var onExit = props.onExit,
13213 onExiting = props.onExiting,
13214 onEnter = props.onEnter,
13215 onEntering = props.onEntering,
13216 onEntered = props.onEntered;
13217 child = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, {
13218 "in": props.show,
13219 appear: true,
13220 onExit: onExit,
13221 onExiting: onExiting,
13222 onExited: handleHidden,
13223 onEnter: onEnter,
13224 onEntering: onEntering,
13225 onEntered: onEntered
13226 }, child);
13227 }
13228
13229 return container ? /*#__PURE__*/external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().createPortal(child, container) : null;
13230});
13231Overlay.displayName = 'Overlay';
13232Overlay.propTypes = {
13233 /**
13234 * Set the visibility of the Overlay
13235 */
13236 show: (prop_types_default()).bool,
13237
13238 /** Specify where the overlay element is positioned in relation to the target element */
13239 placement: prop_types_default().oneOf(enums_placements),
13240
13241 /**
13242 * A DOM Element, Ref to an element, or function that returns either. The `target` element is where
13243 * the overlay is positioned relative to.
13244 */
13245 target: (prop_types_default()).any,
13246
13247 /**
13248 * A DOM Element, Ref to an element, or function that returns either. The `container` will have the Portal children
13249 * appended to it.
13250 */
13251 container: (prop_types_default()).any,
13252
13253 /**
13254 * Enables the Popper.js `flip` modifier, allowing the Overlay to
13255 * automatically adjust it's placement in case of overlap with the viewport or toggle.
13256 * Refer to the [flip docs](https://popper.js.org/popper-documentation.html#modifiers..flip.enabled) for more info
13257 */
13258 flip: (prop_types_default()).bool,
13259
13260 /**
13261 * A render prop that returns an element to overlay and position. See
13262 * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info.
13263 *
13264 * @type {Function ({
13265 * show: boolean,
13266 * placement: Placement,
13267 * update: () => void,
13268 * forceUpdate: () => void,
13269 * props: {
13270 * ref: (?HTMLElement) => void,
13271 * style: { [string]: string | number },
13272 * aria-labelledby: ?string
13273 * [string]: string | number,
13274 * },
13275 * arrowProps: {
13276 * ref: (?HTMLElement) => void,
13277 * style: { [string]: string | number },
13278 * [string]: string | number,
13279 * },
13280 * }) => React.Element}
13281 */
13282 children: (prop_types_default()).func.isRequired,
13283
13284 /**
13285 * Control how much space there is between the edge of the boundary element and overlay.
13286 * A convenience shortcut to setting `popperConfig.modfiers.preventOverflow.padding`
13287 */
13288 containerPadding: (prop_types_default()).number,
13289
13290 /**
13291 * A set of popper options and props passed directly to react-popper's Popper component.
13292 */
13293 popperConfig: (prop_types_default()).object,
13294
13295 /**
13296 * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay
13297 */
13298 rootClose: (prop_types_default()).bool,
13299
13300 /**
13301 * Specify event for toggling overlay
13302 */
13303 rootCloseEvent: prop_types_default().oneOf(['click', 'mousedown']),
13304
13305 /**
13306 * Specify disabled for disable RootCloseWrapper
13307 */
13308 rootCloseDisabled: (prop_types_default()).bool,
13309
13310 /**
13311 * A Callback fired by the Overlay when it wishes to be hidden.
13312 *
13313 * __required__ when `rootClose` is `true`.
13314 *
13315 * @type func
13316 */
13317 onHide: function onHide(props) {
13318 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
13319 args[_key - 1] = arguments[_key];
13320 }
13321
13322 if (props.rootClose) {
13323 var _PropTypes$func;
13324
13325 return (_PropTypes$func = (prop_types_default()).func).isRequired.apply(_PropTypes$func, [props].concat(args));
13326 }
13327
13328 return prop_types_default().func.apply((prop_types_default()), [props].concat(args));
13329 },
13330
13331 /**
13332 * A `react-transition-group@2.0.0` `<Transition/>` component
13333 * used to animate the overlay as it changes visibility.
13334 */
13335 // @ts-ignore
13336 transition: (prop_types_default()).elementType,
13337
13338 /**
13339 * Callback fired before the Overlay transitions in
13340 */
13341 onEnter: (prop_types_default()).func,
13342
13343 /**
13344 * Callback fired as the Overlay begins to transition in
13345 */
13346 onEntering: (prop_types_default()).func,
13347
13348 /**
13349 * Callback fired after the Overlay finishes transitioning in
13350 */
13351 onEntered: (prop_types_default()).func,
13352
13353 /**
13354 * Callback fired right before the Overlay transitions out
13355 */
13356 onExit: (prop_types_default()).func,
13357
13358 /**
13359 * Callback fired as the Overlay begins to transition out
13360 */
13361 onExiting: (prop_types_default()).func,
13362
13363 /**
13364 * Callback fired after the Overlay finishes transitioning out
13365 */
13366 onExited: (prop_types_default()).func
13367};
13368/* harmony default export */ const esm_Overlay = (Overlay);
13369;// CONCATENATED MODULE: ./src/Overlay.tsx
13370
13371
13372var Overlay_excluded = ["children", "transition", "popperConfig"],
13373 _excluded2 = ["props", "arrowProps", "show", "update", "forceUpdate", "placement", "state"];
13374var Overlay_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Overlay.tsx";
13375
13376
13377
13378
13379
13380
13381
13382
13383var Overlay_propTypes = {
13384 /**
13385 * A component instance, DOM node, or function that returns either.
13386 * The `container` element will have the Overlay appended to it via a React portal.
13387 */
13388 container: prop_types_default().oneOfType([lib/* componentOrElement */.ax, (prop_types_default()).func]),
13389
13390 /**
13391 * A component instance, DOM node, or function that returns either.
13392 * The overlay will be positioned in relation to the `target`
13393 */
13394 target: prop_types_default().oneOfType([lib/* componentOrElement */.ax, (prop_types_default()).func]),
13395
13396 /**
13397 * Set the visibility of the Overlay
13398 */
13399 show: (prop_types_default()).bool,
13400
13401 /**
13402 * A set of popper options and props passed directly to Popper.
13403 */
13404 popperConfig: (prop_types_default()).object,
13405
13406 /**
13407 * Specify whether the overlay should trigger onHide when the user clicks outside the overlay
13408 */
13409 rootClose: (prop_types_default()).bool,
13410
13411 /**
13412 * Specify event for triggering a "root close" toggle.
13413 */
13414 rootCloseEvent: prop_types_default().oneOf(['click', 'mousedown']),
13415
13416 /**
13417 * A callback invoked by the overlay when it wishes to be hidden. Required if
13418 * `rootClose` is specified.
13419 */
13420 onHide: (prop_types_default()).func,
13421
13422 /**
13423 * Animate the entering and exiting of the Overlay. `true` will use the `<Fade>` transition,
13424 * or a custom react-transition-group `<Transition>` component can be provided.
13425 */
13426 transition: prop_types_default().oneOfType([(prop_types_default()).bool, lib/* elementType */.nm]),
13427
13428 /**
13429 * Callback fired before the Overlay transitions in
13430 */
13431 onEnter: (prop_types_default()).func,
13432
13433 /**
13434 * Callback fired as the Overlay begins to transition in
13435 */
13436 onEntering: (prop_types_default()).func,
13437
13438 /**
13439 * Callback fired after the Overlay finishes transitioning in
13440 */
13441 onEntered: (prop_types_default()).func,
13442
13443 /**
13444 * Callback fired right before the Overlay transitions out
13445 */
13446 onExit: (prop_types_default()).func,
13447
13448 /**
13449 * Callback fired as the Overlay begins to transition out
13450 */
13451 onExiting: (prop_types_default()).func,
13452
13453 /**
13454 * Callback fired after the Overlay finishes transitioning out
13455 */
13456 onExited: (prop_types_default()).func,
13457
13458 /**
13459 * The placement of the Overlay in relation to it's `target`.
13460 */
13461 placement: prop_types_default().oneOf(['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'])
13462};
13463var Overlay_defaultProps = {
13464 transition: src_Fade,
13465 rootClose: false,
13466 show: false,
13467 placement: 'top'
13468};
13469
13470function wrapRefs(props, arrowProps) {
13471 var ref = props.ref;
13472 var aRef = arrowProps.ref;
13473
13474 props.ref = ref.__wrapped || (ref.__wrapped = function (r) {
13475 return ref(safeFindDOMNode(r));
13476 });
13477
13478 arrowProps.ref = aRef.__wrapped || (aRef.__wrapped = function (r) {
13479 return aRef(safeFindDOMNode(r));
13480 });
13481}
13482
13483function Overlay_Overlay(_ref) {
13484 var overlay = _ref.children,
13485 transition = _ref.transition,
13486 _ref$popperConfig = _ref.popperConfig,
13487 popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig,
13488 outerProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Overlay_excluded);
13489
13490 var popperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
13491
13492 var _usePopperMarginModif = usePopperMarginModifiers(),
13493 ref = _usePopperMarginModif[0],
13494 marginModifiers = _usePopperMarginModif[1];
13495
13496 var actualTransition = transition === true ? src_Fade : transition || null;
13497 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Overlay, extends_extends({}, outerProps, {
13498 ref: ref,
13499 popperConfig: extends_extends({}, popperConfig, {
13500 modifiers: marginModifiers.concat(popperConfig.modifiers || [])
13501 }),
13502 transition: actualTransition,
13503 __self: this,
13504 __source: {
13505 fileName: Overlay_jsxFileName,
13506 lineNumber: 174,
13507 columnNumber: 5
13508 }
13509 }), function (_ref2) {
13510 var _state$modifiersData$;
13511
13512 var overlayProps = _ref2.props,
13513 arrowProps = _ref2.arrowProps,
13514 show = _ref2.show,
13515 update = _ref2.update,
13516 _ = _ref2.forceUpdate,
13517 placement = _ref2.placement,
13518 state = _ref2.state,
13519 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, _excluded2);
13520
13521 wrapRefs(overlayProps, arrowProps);
13522 var popper = Object.assign(popperRef.current, {
13523 state: state,
13524 scheduleUpdate: update,
13525 placement: placement,
13526 outOfBoundaries: (state == null ? void 0 : (_state$modifiersData$ = state.modifiersData.hide) == null ? void 0 : _state$modifiersData$.isReferenceHidden) || false
13527 });
13528 if (typeof overlay === 'function') return overlay(extends_extends({}, props, overlayProps, {
13529 placement: placement,
13530 show: show
13531 }, !transition && show && {
13532 className: 'show'
13533 }, {
13534 popper: popper,
13535 arrowProps: arrowProps
13536 }));
13537 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(overlay, extends_extends({}, props, overlayProps, {
13538 placement: placement,
13539 arrowProps: arrowProps,
13540 popper: popper,
13541 className: classnames_default()(overlay.props.className, !transition && show && 'show'),
13542 style: extends_extends({}, overlay.props.style, overlayProps.style)
13543 }));
13544 });
13545}
13546
13547Overlay_Overlay.propTypes = Overlay_propTypes;
13548Overlay_Overlay.defaultProps = Overlay_defaultProps;
13549/* harmony default export */ const src_Overlay = (Overlay_Overlay);
13550;// CONCATENATED MODULE: ./src/OverlayTrigger.tsx
13551
13552
13553
13554var OverlayTrigger_excluded = ["trigger", "overlay", "children", "popperConfig", "show", "defaultShow", "onToggle", "delay", "placement", "flip"];
13555var OverlayTrigger_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/OverlayTrigger.tsx";
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565var RefHolder = /*#__PURE__*/function (_React$Component) {
13566 inheritsLoose_inheritsLoose(RefHolder, _React$Component);
13567
13568 function RefHolder() {
13569 return _React$Component.apply(this, arguments) || this;
13570 }
13571
13572 var _proto = RefHolder.prototype;
13573
13574 _proto.render = function render() {
13575 return this.props.children;
13576 };
13577
13578 return RefHolder;
13579}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
13580
13581function normalizeDelay(delay) {
13582 return delay && typeof delay === 'object' ? delay : {
13583 show: delay,
13584 hide: delay
13585 };
13586} // Simple implementation of mouseEnter and mouseLeave.
13587// React's built version is broken: https://github.com/facebook/react/issues/4251
13588// for cases when the trigger is disabled and mouseOut/Over can cause flicker
13589// moving from one child element to another.
13590
13591
13592function handleMouseOverOut( // eslint-disable-next-line @typescript-eslint/no-shadow
13593handler, args, relatedNative) {
13594 var e = args[0];
13595 var target = e.currentTarget;
13596 var related = e.relatedTarget || e.nativeEvent[relatedNative];
13597
13598 if ((!related || related !== target) && !contains_contains(target, related)) {
13599 handler.apply(void 0, args);
13600 }
13601}
13602
13603var triggerType = prop_types_default().oneOf(['click', 'hover', 'focus']);
13604var OverlayTrigger_propTypes = {
13605 children: prop_types_default().oneOfType([(prop_types_default()).element, (prop_types_default()).func]).isRequired,
13606
13607 /**
13608 * Specify which action or actions trigger Overlay visibility
13609 *
13610 * @type {'hover' | 'click' |'focus' | Array<'hover' | 'click' |'focus'>}
13611 */
13612 trigger: prop_types_default().oneOfType([triggerType, prop_types_default().arrayOf(triggerType)]),
13613
13614 /**
13615 * A millisecond delay amount to show and hide the Overlay once triggered
13616 */
13617 delay: prop_types_default().oneOfType([(prop_types_default()).number, prop_types_default().shape({
13618 show: (prop_types_default()).number,
13619 hide: (prop_types_default()).number
13620 })]),
13621
13622 /**
13623 * The visibility of the Overlay. `show` is a _controlled_ prop so should be paired
13624 * with `onToggle` to avoid breaking user interactions.
13625 *
13626 * Manually toggling `show` does **not** wait for `delay` to change the visibility.
13627 *
13628 * @controllable onToggle
13629 */
13630 show: (prop_types_default()).bool,
13631
13632 /**
13633 * The initial visibility state of the Overlay.
13634 */
13635 defaultShow: (prop_types_default()).bool,
13636
13637 /**
13638 * A callback that fires when the user triggers a change in tooltip visibility.
13639 *
13640 * `onToggle` is called with the desired next `show`, and generally should be passed
13641 * back to the `show` prop. `onToggle` fires _after_ the configured `delay`
13642 *
13643 * @controllable `show`
13644 */
13645 onToggle: (prop_types_default()).func,
13646
13647 /**
13648 The initial flip state of the Overlay.
13649 */
13650 flip: (prop_types_default()).bool,
13651
13652 /**
13653 * An element or text to overlay next to the target.
13654 */
13655 overlay: prop_types_default().oneOfType([(prop_types_default()).func, (prop_types_default()).element.isRequired]),
13656
13657 /**
13658 * A Popper.js config object passed to the the underlying popper instance.
13659 */
13660 popperConfig: (prop_types_default()).object,
13661 // Overridden props from `<Overlay>`.
13662
13663 /**
13664 * @private
13665 */
13666 target: prop_types_default().oneOf([null]),
13667
13668 /**
13669 * @private
13670 */
13671 onHide: prop_types_default().oneOf([null]),
13672
13673 /**
13674 * The placement of the Overlay in relation to it's `target`.
13675 */
13676 placement: prop_types_default().oneOf(['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'])
13677};
13678var OverlayTrigger_defaultProps = {
13679 defaultShow: false,
13680 trigger: ['hover', 'focus']
13681};
13682
13683function OverlayTrigger(_ref) {
13684 var trigger = _ref.trigger,
13685 overlay = _ref.overlay,
13686 children = _ref.children,
13687 _ref$popperConfig = _ref.popperConfig,
13688 popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig,
13689 propsShow = _ref.show,
13690 _ref$defaultShow = _ref.defaultShow,
13691 defaultShow = _ref$defaultShow === void 0 ? false : _ref$defaultShow,
13692 onToggle = _ref.onToggle,
13693 propsDelay = _ref.delay,
13694 placement = _ref.placement,
13695 _ref$flip = _ref.flip,
13696 flip = _ref$flip === void 0 ? placement && placement.indexOf('auto') !== -1 : _ref$flip,
13697 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, OverlayTrigger_excluded);
13698
13699 var triggerNodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
13700 var timeout = useTimeout();
13701 var hoverStateRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('');
13702
13703 var _useUncontrolledProp = useUncontrolledProp(propsShow, defaultShow, onToggle),
13704 show = _useUncontrolledProp[0],
13705 setShow = _useUncontrolledProp[1];
13706
13707 var delay = normalizeDelay(propsDelay);
13708
13709 var _ref2 = typeof children !== 'function' ? external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children).props : {},
13710 onFocus = _ref2.onFocus,
13711 onBlur = _ref2.onBlur,
13712 onClick = _ref2.onClick;
13713
13714 var getTarget = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
13715 return safeFindDOMNode(triggerNodeRef.current);
13716 }, []);
13717 var handleShow = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
13718 timeout.clear();
13719 hoverStateRef.current = 'show';
13720
13721 if (!delay.show) {
13722 setShow(true);
13723 return;
13724 }
13725
13726 timeout.set(function () {
13727 if (hoverStateRef.current === 'show') setShow(true);
13728 }, delay.show);
13729 }, [delay.show, setShow, timeout]);
13730 var handleHide = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
13731 timeout.clear();
13732 hoverStateRef.current = 'hide';
13733
13734 if (!delay.hide) {
13735 setShow(false);
13736 return;
13737 }
13738
13739 timeout.set(function () {
13740 if (hoverStateRef.current === 'hide') setShow(false);
13741 }, delay.hide);
13742 }, [delay.hide, setShow, timeout]);
13743 var handleFocus = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
13744 handleShow();
13745
13746 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
13747 args[_key] = arguments[_key];
13748 }
13749
13750 onFocus == null ? void 0 : onFocus.apply(void 0, args);
13751 }, [handleShow, onFocus]);
13752 var handleBlur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
13753 handleHide();
13754
13755 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
13756 args[_key2] = arguments[_key2];
13757 }
13758
13759 onBlur == null ? void 0 : onBlur.apply(void 0, args);
13760 }, [handleHide, onBlur]);
13761 var handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
13762 setShow(!show);
13763 if (onClick) onClick.apply(void 0, arguments);
13764 }, [onClick, setShow, show]);
13765 var handleMouseOver = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
13766 for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
13767 args[_key3] = arguments[_key3];
13768 }
13769
13770 handleMouseOverOut(handleShow, args, 'fromElement');
13771 }, [handleShow]);
13772 var handleMouseOut = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
13773 for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
13774 args[_key4] = arguments[_key4];
13775 }
13776
13777 handleMouseOverOut(handleHide, args, 'toElement');
13778 }, [handleHide]);
13779 var triggers = trigger == null ? [] : [].concat(trigger);
13780 var triggerProps = {};
13781
13782 if (triggers.indexOf('click') !== -1) {
13783 triggerProps.onClick = handleClick;
13784 }
13785
13786 if (triggers.indexOf('focus') !== -1) {
13787 triggerProps.onFocus = handleFocus;
13788 triggerProps.onBlur = handleBlur;
13789 }
13790
13791 if (triggers.indexOf('hover') !== -1) {
13792 false ? 0 : void 0;
13793 triggerProps.onMouseOver = handleMouseOver;
13794 triggerProps.onMouseOut = handleMouseOut;
13795 }
13796
13797 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof children === 'function' ? children(extends_extends({}, triggerProps, {
13798 ref: triggerNodeRef
13799 })) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(RefHolder, {
13800 ref: triggerNodeRef,
13801 __self: this,
13802 __source: {
13803 fileName: OverlayTrigger_jsxFileName,
13804 lineNumber: 299,
13805 columnNumber: 9
13806 }
13807 }, /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, triggerProps)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Overlay, extends_extends({}, props, {
13808 show: show,
13809 onHide: handleHide,
13810 flip: flip,
13811 placement: placement,
13812 popperConfig: popperConfig,
13813 target: getTarget,
13814 __self: this,
13815 __source: {
13816 fileName: OverlayTrigger_jsxFileName,
13817 lineNumber: 303,
13818 columnNumber: 7
13819 }
13820 }), overlay));
13821}
13822
13823OverlayTrigger.propTypes = OverlayTrigger_propTypes;
13824OverlayTrigger.defaultProps = OverlayTrigger_defaultProps;
13825/* harmony default export */ const src_OverlayTrigger = (OverlayTrigger);
13826;// CONCATENATED MODULE: ./src/PageItem.tsx
13827
13828
13829var PageItem_excluded = ["active", "disabled", "className", "style", "activeLabel", "children"],
13830 PageItem_excluded2 = ["children"];
13831
13832var PageItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PageItem.tsx",
13833 PageItem_this = undefined;
13834
13835/* eslint-disable react/no-multi-comp */
13836
13837
13838
13839
13840var PageItem_propTypes = {
13841 /** Disables the PageItem */
13842 disabled: (prop_types_default()).bool,
13843
13844 /** Styles PageItem as active, and renders a `<span>` instead of an `<a>`. */
13845 active: (prop_types_default()).bool,
13846
13847 /** An accessible label indicating the active state.. */
13848 activeLabel: (prop_types_default()).string,
13849
13850 /** A callback function for when this component is clicked */
13851 onClick: (prop_types_default()).func
13852};
13853var PageItem_defaultProps = {
13854 active: false,
13855 disabled: false,
13856 activeLabel: '(current)'
13857};
13858var PageItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
13859 var active = _ref.active,
13860 disabled = _ref.disabled,
13861 className = _ref.className,
13862 style = _ref.style,
13863 activeLabel = _ref.activeLabel,
13864 children = _ref.children,
13865 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, PageItem_excluded);
13866
13867 var Component = active || disabled ? 'span' : src_SafeAnchor;
13868 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
13869 ref: ref,
13870 style: style,
13871 className: classnames_default()(className, 'page-item', {
13872 active: active,
13873 disabled: disabled
13874 }),
13875 __self: PageItem_this,
13876 __source: {
13877 fileName: PageItem_jsxFileName,
13878 lineNumber: 58,
13879 columnNumber: 7
13880 }
13881 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
13882 className: "page-link",
13883 disabled: disabled
13884 }, props, {
13885 __self: PageItem_this,
13886 __source: {
13887 fileName: PageItem_jsxFileName,
13888 lineNumber: 63,
13889 columnNumber: 9
13890 }
13891 }), children, active && activeLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
13892 className: "sr-only",
13893 __self: PageItem_this,
13894 __source: {
13895 fileName: PageItem_jsxFileName,
13896 lineNumber: 66,
13897 columnNumber: 13
13898 }
13899 }, activeLabel)));
13900});
13901PageItem.propTypes = PageItem_propTypes;
13902PageItem.defaultProps = PageItem_defaultProps;
13903PageItem.displayName = 'PageItem';
13904/* harmony default export */ const src_PageItem = (PageItem);
13905
13906function createButton(name, defaultValue, label) {
13907 if (label === void 0) {
13908 label = name;
13909 }
13910
13911 function Button(_ref2) {
13912 var children = _ref2.children,
13913 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, PageItem_excluded2);
13914
13915 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PageItem, extends_extends({}, props, {
13916 __self: this,
13917 __source: {
13918 fileName: PageItem_jsxFileName,
13919 lineNumber: 83,
13920 columnNumber: 7
13921 }
13922 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
13923 "aria-hidden": "true",
13924 __self: this,
13925 __source: {
13926 fileName: PageItem_jsxFileName,
13927 lineNumber: 84,
13928 columnNumber: 9
13929 }
13930 }, children || defaultValue), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
13931 className: "sr-only",
13932 __self: this,
13933 __source: {
13934 fileName: PageItem_jsxFileName,
13935 lineNumber: 85,
13936 columnNumber: 9
13937 }
13938 }, label));
13939 }
13940
13941 Button.displayName = name;
13942 return Button;
13943}
13944
13945var First = createButton('First', '«');
13946var Prev = createButton('Prev', '‹', 'Previous');
13947var Ellipsis = createButton('Ellipsis', '…', 'More');
13948var Next = createButton('Next', '›');
13949var Last = createButton('Last', '»');
13950;// CONCATENATED MODULE: ./src/Pagination.tsx
13951
13952
13953var Pagination_excluded = ["bsPrefix", "className", "children", "size"];
13954
13955var Pagination_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Pagination.tsx",
13956 Pagination_this = undefined;
13957
13958
13959
13960
13961
13962
13963var Pagination_propTypes = {
13964 /**
13965 * @default 'pagination'
13966 * */
13967 bsPrefix: (prop_types_default()).string,
13968
13969 /**
13970 * Set's the size of all PageItems.
13971 *
13972 * @type {('sm'|'lg')}
13973 */
13974 size: (prop_types_default()).string
13975};
13976/**
13977 * @property {PageItem} Item
13978 * @property {PageItem} First
13979 * @property {PageItem} Prev
13980 * @property {PageItem} Ellipsis
13981 * @property {PageItem} Next
13982 * @property {PageItem} Last
13983 */
13984
13985var Pagination = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
13986 var bsPrefix = _ref.bsPrefix,
13987 className = _ref.className,
13988 children = _ref.children,
13989 size = _ref.size,
13990 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Pagination_excluded);
13991
13992 var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'pagination');
13993 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", extends_extends({
13994 ref: ref
13995 }, props, {
13996 className: classnames_default()(className, decoratedBsPrefix, size && decoratedBsPrefix + "-" + size),
13997 __self: Pagination_this,
13998 __source: {
13999 fileName: Pagination_jsxFileName,
14000 lineNumber: 53,
14001 columnNumber: 5
14002 }
14003 }), children);
14004});
14005Pagination.propTypes = Pagination_propTypes;
14006Pagination.First = First;
14007Pagination.Prev = Prev;
14008Pagination.Ellipsis = Ellipsis;
14009Pagination.Item = src_PageItem;
14010Pagination.Next = Next;
14011Pagination.Last = Last;
14012/* harmony default export */ const src_Pagination = (Pagination);
14013;// CONCATENATED MODULE: ./src/PopoverTitle.tsx
14014
14015
14016var PopoverTitle_excluded = ["as", "bsPrefix", "className", "children"];
14017
14018var PopoverTitle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PopoverTitle.tsx",
14019 PopoverTitle_this = undefined;
14020
14021
14022
14023
14024
14025var PopoverTitle_propTypes = {
14026 /** Set a custom element for this component */
14027 as: (prop_types_default()).elementType,
14028
14029 /** @default 'popover-header' */
14030 bsPrefix: (prop_types_default()).string
14031};
14032var PopoverTitle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
14033 var _ref$as = _ref.as,
14034 Component = _ref$as === void 0 ? 'div' : _ref$as,
14035 bsPrefix = _ref.bsPrefix,
14036 className = _ref.className,
14037 children = _ref.children,
14038 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, PopoverTitle_excluded);
14039
14040 bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-header');
14041 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
14042 ref: ref
14043 }, props, {
14044 className: classnames_default()(bsPrefix, className),
14045 __self: PopoverTitle_this,
14046 __source: {
14047 fileName: PopoverTitle_jsxFileName,
14048 lineNumber: 37,
14049 columnNumber: 7
14050 }
14051 }), children);
14052});
14053PopoverTitle.propTypes = PopoverTitle_propTypes;
14054/* harmony default export */ const src_PopoverTitle = (PopoverTitle);
14055;// CONCATENATED MODULE: ./src/PopoverContent.tsx
14056
14057
14058var PopoverContent_excluded = ["as", "bsPrefix", "className", "children"];
14059
14060var PopoverContent_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PopoverContent.tsx",
14061 PopoverContent_this = undefined;
14062
14063
14064
14065
14066
14067var PopoverContent_propTypes = {
14068 /** Set a custom element for this component */
14069 as: (prop_types_default()).elementType,
14070
14071 /** @default 'popover-body' */
14072 bsPrefix: (prop_types_default()).string
14073};
14074var PopoverContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
14075 var _ref$as = _ref.as,
14076 Component = _ref$as === void 0 ? 'div' : _ref$as,
14077 bsPrefix = _ref.bsPrefix,
14078 className = _ref.className,
14079 children = _ref.children,
14080 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, PopoverContent_excluded);
14081
14082 bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-body');
14083 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
14084 ref: ref
14085 }, props, {
14086 className: classnames_default()(className, bsPrefix),
14087 __self: PopoverContent_this,
14088 __source: {
14089 fileName: PopoverContent_jsxFileName,
14090 lineNumber: 40,
14091 columnNumber: 7
14092 }
14093 }), children);
14094});
14095PopoverContent.propTypes = PopoverContent_propTypes;
14096/* harmony default export */ const src_PopoverContent = (PopoverContent);
14097;// CONCATENATED MODULE: ./src/Popover.tsx
14098
14099
14100var Popover_excluded = ["bsPrefix", "placement", "className", "style", "children", "content", "arrowProps", "popper", "show"];
14101
14102var Popover_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Popover.tsx",
14103 Popover_this = undefined;
14104
14105
14106
14107
14108
14109
14110
14111
14112var Popover_propTypes = {
14113 /**
14114 * @default 'popover'
14115 */
14116 bsPrefix: (prop_types_default()).string,
14117
14118 /**
14119 * An html id attribute, necessary for accessibility
14120 * @type {string|number}
14121 * @required
14122 */
14123 id: isRequiredForA11y_default()(prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])),
14124
14125 /**
14126 * Sets the direction the Popover is positioned towards.
14127 *
14128 * > This is generally provided by the `Overlay` component positioning the popover
14129 */
14130 placement: prop_types_default().oneOf(['auto', 'top', 'bottom', 'left', 'right']),
14131
14132 /**
14133 * An Overlay injected set of props for positioning the popover arrow.
14134 *
14135 * > This is generally provided by the `Overlay` component positioning the popover
14136 */
14137 arrowProps: prop_types_default().shape({
14138 ref: (prop_types_default()).any,
14139 style: (prop_types_default()).object
14140 }),
14141
14142 /**
14143 * When this prop is set, it creates a Popover with a Popover.Content inside
14144 * passing the children directly to it
14145 */
14146 content: (prop_types_default()).bool,
14147
14148 /** @private */
14149 popper: (prop_types_default()).object,
14150
14151 /** @private */
14152 show: (prop_types_default()).bool
14153};
14154var Popover_defaultProps = {
14155 placement: 'right'
14156};
14157var Popover = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
14158 var bsPrefix = _ref.bsPrefix,
14159 placement = _ref.placement,
14160 className = _ref.className,
14161 style = _ref.style,
14162 children = _ref.children,
14163 content = _ref.content,
14164 arrowProps = _ref.arrowProps,
14165 _ = _ref.popper,
14166 _1 = _ref.show,
14167 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Popover_excluded);
14168
14169 var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'popover');
14170
14171 var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],
14172 primaryPlacement = _ref2[0];
14173
14174 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
14175 ref: ref,
14176 role: "tooltip",
14177 style: style,
14178 "x-placement": primaryPlacement,
14179 className: classnames_default()(className, decoratedBsPrefix, primaryPlacement && "bs-popover-" + primaryPlacement)
14180 }, props, {
14181 __self: Popover_this,
14182 __source: {
14183 fileName: Popover_jsxFileName,
14184 lineNumber: 100,
14185 columnNumber: 7
14186 }
14187 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
14188 className: "arrow"
14189 }, arrowProps, {
14190 __self: Popover_this,
14191 __source: {
14192 fileName: Popover_jsxFileName,
14193 lineNumber: 112,
14194 columnNumber: 9
14195 }
14196 })), content ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_PopoverContent, {
14197 __self: Popover_this,
14198 __source: {
14199 fileName: Popover_jsxFileName,
14200 lineNumber: 113,
14201 columnNumber: 20
14202 }
14203 }, children) : children);
14204});
14205Popover.propTypes = Popover_propTypes;
14206Popover.defaultProps = Popover_defaultProps;
14207Popover.Title = src_PopoverTitle;
14208Popover.Content = src_PopoverContent;
14209/* harmony default export */ const src_Popover = (Popover);
14210;// CONCATENATED MODULE: ./src/ProgressBar.tsx
14211
14212
14213var ProgressBar_excluded = ["min", "now", "max", "label", "srOnly", "striped", "animated", "className", "style", "variant", "bsPrefix"],
14214 ProgressBar_excluded2 = ["isChild"],
14215 _excluded3 = ["min", "now", "max", "label", "srOnly", "striped", "animated", "bsPrefix", "variant", "className", "children"];
14216
14217var ProgressBar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ProgressBar.tsx",
14218 _this2 = undefined;
14219
14220
14221
14222
14223
14224
14225var ROUND_PRECISION = 1000;
14226/**
14227 * Validate that children, if any, are instances of `<ProgressBar>`.
14228 */
14229
14230function onlyProgressBar(props, propName, componentName) {
14231 var _this = this;
14232
14233 var children = props[propName];
14234
14235 if (!children) {
14236 return null;
14237 }
14238
14239 var error = null;
14240 external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(children, function (child) {
14241 if (error) {
14242 return;
14243 }
14244 /**
14245 * Compare types in a way that works with libraries that patch and proxy
14246 * components like react-hot-loader.
14247 *
14248 * see https://github.com/gaearon/react-hot-loader#checking-element-types
14249 */
14250 // eslint-disable-next-line @typescript-eslint/no-use-before-define
14251
14252
14253 var element = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ProgressBar, {
14254 __self: _this,
14255 __source: {
14256 fileName: ProgressBar_jsxFileName,
14257 lineNumber: 49,
14258 columnNumber: 21
14259 }
14260 });
14261 if (child.type === element.type) return;
14262 var childType = child.type;
14263 var childIdentifier = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child) ? childType.displayName || childType.name || childType : child;
14264 error = new Error("Children of " + componentName + " can contain only ProgressBar " + ("components. Found " + childIdentifier + "."));
14265 });
14266 return error;
14267}
14268
14269var ProgressBar_propTypes = {
14270 /**
14271 * Minimum value progress can begin from
14272 */
14273 min: (prop_types_default()).number,
14274
14275 /**
14276 * Current value of progress
14277 */
14278 now: (prop_types_default()).number,
14279
14280 /**
14281 * Maximum value progress can reach
14282 */
14283 max: (prop_types_default()).number,
14284
14285 /**
14286 * Show label that represents visual percentage.
14287 * EG. 60%
14288 */
14289 label: (prop_types_default()).node,
14290
14291 /**
14292 * Hide's the label visually.
14293 */
14294 srOnly: (prop_types_default()).bool,
14295
14296 /**
14297 * Uses a gradient to create a striped effect.
14298 */
14299 striped: (prop_types_default()).bool,
14300
14301 /**
14302 * Animate's the stripes from right to left
14303 */
14304 animated: (prop_types_default()).bool,
14305
14306 /**
14307 * @private
14308 * @default 'progress-bar'
14309 */
14310 bsPrefix: (prop_types_default()).string,
14311
14312 /**
14313 * Sets the background class of the progress bar.
14314 *
14315 * @type ('success'|'danger'|'warning'|'info')
14316 */
14317 variant: (prop_types_default()).string,
14318
14319 /**
14320 * Child elements (only allows elements of type <ProgressBar />)
14321 */
14322 children: onlyProgressBar,
14323
14324 /**
14325 * @private
14326 */
14327 isChild: (prop_types_default()).bool
14328};
14329var ProgressBar_defaultProps = {
14330 min: 0,
14331 max: 100,
14332 animated: false,
14333 isChild: false,
14334 srOnly: false,
14335 striped: false
14336};
14337
14338function getPercentage(now, min, max) {
14339 var percentage = (now - min) / (max - min) * 100;
14340 return Math.round(percentage * ROUND_PRECISION) / ROUND_PRECISION;
14341}
14342
14343function renderProgressBar(_ref, ref) {
14344 var _classNames;
14345
14346 var min = _ref.min,
14347 now = _ref.now,
14348 max = _ref.max,
14349 label = _ref.label,
14350 srOnly = _ref.srOnly,
14351 striped = _ref.striped,
14352 animated = _ref.animated,
14353 className = _ref.className,
14354 style = _ref.style,
14355 variant = _ref.variant,
14356 bsPrefix = _ref.bsPrefix,
14357 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ProgressBar_excluded);
14358
14359 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
14360 ref: ref
14361 }, props, {
14362 role: "progressbar",
14363 className: classnames_default()(className, bsPrefix + "-bar", (_classNames = {}, _classNames["bg-" + variant] = variant, _classNames[bsPrefix + "-bar-animated"] = animated, _classNames[bsPrefix + "-bar-striped"] = animated || striped, _classNames)),
14364 style: extends_extends({
14365 width: getPercentage(now, min, max) + "%"
14366 }, style),
14367 "aria-valuenow": now,
14368 "aria-valuemin": min,
14369 "aria-valuemax": max,
14370 __self: this,
14371 __source: {
14372 fileName: ProgressBar_jsxFileName,
14373 lineNumber: 158,
14374 columnNumber: 5
14375 }
14376 }), srOnly ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
14377 className: "sr-only",
14378 __self: this,
14379 __source: {
14380 fileName: ProgressBar_jsxFileName,
14381 lineNumber: 172,
14382 columnNumber: 17
14383 }
14384 }, label) : label);
14385}
14386
14387renderProgressBar.propTypes = ProgressBar_propTypes;
14388var ProgressBar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref2, ref) {
14389 var isChild = _ref2.isChild,
14390 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, ProgressBar_excluded2);
14391
14392 props.bsPrefix = useBootstrapPrefix(props.bsPrefix, 'progress');
14393
14394 if (isChild) {
14395 return renderProgressBar(props, ref);
14396 }
14397
14398 var min = props.min,
14399 now = props.now,
14400 max = props.max,
14401 label = props.label,
14402 srOnly = props.srOnly,
14403 striped = props.striped,
14404 animated = props.animated,
14405 bsPrefix = props.bsPrefix,
14406 variant = props.variant,
14407 className = props.className,
14408 children = props.children,
14409 wrapperProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(props, _excluded3);
14410
14411 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
14412 ref: ref
14413 }, wrapperProps, {
14414 className: classnames_default()(className, bsPrefix),
14415 __self: _this2,
14416 __source: {
14417 fileName: ProgressBar_jsxFileName,
14418 lineNumber: 203,
14419 columnNumber: 7
14420 }
14421 }), children ? map(children, function (child) {
14422 return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(child, {
14423 isChild: true
14424 });
14425 }) : renderProgressBar({
14426 min: min,
14427 now: now,
14428 max: max,
14429 label: label,
14430 srOnly: srOnly,
14431 striped: striped,
14432 animated: animated,
14433 bsPrefix: bsPrefix,
14434 variant: variant
14435 }, ref));
14436});
14437ProgressBar.displayName = 'ProgressBar';
14438ProgressBar.propTypes = ProgressBar_propTypes;
14439ProgressBar.defaultProps = ProgressBar_defaultProps;
14440/* harmony default export */ const src_ProgressBar = (ProgressBar);
14441;// CONCATENATED MODULE: ./src/ResponsiveEmbed.tsx
14442
14443
14444var ResponsiveEmbed_excluded = ["bsPrefix", "className", "children", "aspectRatio"];
14445
14446var ResponsiveEmbed_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ResponsiveEmbed.tsx",
14447 ResponsiveEmbed_this = undefined;
14448
14449
14450
14451
14452
14453var ResponsiveEmbed_propTypes = {
14454 /**
14455 * @default 'embed-responsive'
14456 */
14457 bsPrefix: (prop_types_default()).string,
14458
14459 /**
14460 * This component requires a single child element
14461 */
14462 children: (prop_types_default()).element.isRequired,
14463
14464 /**
14465 * Set the aspect ration of the embed
14466 */
14467 aspectRatio: prop_types_default().oneOf(['21by9', '16by9', '4by3', '1by1'])
14468};
14469var ResponsiveEmbed_defaultProps = {
14470 aspectRatio: '1by1'
14471};
14472var ResponsiveEmbed = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
14473 var bsPrefix = _ref.bsPrefix,
14474 className = _ref.className,
14475 children = _ref.children,
14476 aspectRatio = _ref.aspectRatio,
14477 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ResponsiveEmbed_excluded);
14478
14479 var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'embed-responsive');
14480 var child = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children);
14481 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
14482 ref: ref
14483 }, props, {
14484 className: classnames_default()(decoratedBsPrefix, className, aspectRatio && decoratedBsPrefix + "-" + aspectRatio),
14485 __self: ResponsiveEmbed_this,
14486 __source: {
14487 fileName: ResponsiveEmbed_jsxFileName,
14488 lineNumber: 59,
14489 columnNumber: 7
14490 }
14491 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
14492 className: classnames_default()(child.props.className, decoratedBsPrefix + "-item")
14493 }));
14494});
14495ResponsiveEmbed.propTypes = ResponsiveEmbed_propTypes;
14496ResponsiveEmbed.defaultProps = ResponsiveEmbed_defaultProps;
14497/* harmony default export */ const src_ResponsiveEmbed = (ResponsiveEmbed);
14498;// CONCATENATED MODULE: ./src/Row.tsx
14499
14500
14501var Row_excluded = ["bsPrefix", "className", "noGutters", "as"];
14502
14503var Row_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Row.tsx",
14504 Row_this = undefined;
14505
14506
14507
14508
14509
14510var Row_DEVICE_SIZES = ['xl', 'lg', 'md', 'sm', 'xs'];
14511var rowColWidth = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]);
14512var rowColumns = prop_types_default().oneOfType([rowColWidth, prop_types_default().shape({
14513 cols: rowColWidth
14514})]);
14515var Row_propTypes = {
14516 /**
14517 * @default 'row'
14518 */
14519 bsPrefix: (prop_types_default()).string,
14520
14521 /** Removes the gutter spacing between `Col`s as well as any added negative margins. */
14522 noGutters: (prop_types_default()).bool.isRequired,
14523 as: (prop_types_default()).elementType,
14524
14525 /**
14526 * The number of columns that will fit next to each other on extra small devices (<576px)
14527 *
14528 * @type {(number|{ cols: number })}
14529 */
14530 xs: rowColumns,
14531
14532 /**
14533 * The number of columns that will fit next to each other on small devices (≥576px)
14534 *
14535 * @type {(number|{ cols: number })}
14536 */
14537 sm: rowColumns,
14538
14539 /**
14540 * The number of columns that will fit next to each other on medium devices (≥768px)
14541 *
14542 * @type {(number|{ cols: number })}
14543 */
14544 md: rowColumns,
14545
14546 /**
14547 * The number of columns that will fit next to each other on large devices (≥992px)
14548 *
14549 * @type {(number|{ cols: number })}
14550 */
14551 lg: rowColumns,
14552
14553 /**
14554 * The number of columns that will fit next to each other on extra large devices (≥1200px)
14555 *
14556 * @type {(number|{ cols: number })}
14557 */
14558 xl: rowColumns
14559};
14560var Row_defaultProps = {
14561 noGutters: false
14562};
14563var Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
14564 var bsPrefix = _ref.bsPrefix,
14565 className = _ref.className,
14566 noGutters = _ref.noGutters,
14567 _ref$as = _ref.as,
14568 Component = _ref$as === void 0 ? 'div' : _ref$as,
14569 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Row_excluded);
14570
14571 var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');
14572 var sizePrefix = decoratedBsPrefix + "-cols";
14573 var classes = [];
14574 Row_DEVICE_SIZES.forEach(function (brkPoint) {
14575 var propValue = props[brkPoint];
14576 delete props[brkPoint];
14577 var cols;
14578
14579 if (propValue != null && typeof propValue === 'object') {
14580 cols = propValue.cols;
14581 } else {
14582 cols = propValue;
14583 }
14584
14585 var infix = brkPoint !== 'xs' ? "-" + brkPoint : '';
14586 if (cols != null) classes.push("" + sizePrefix + infix + "-" + cols);
14587 });
14588 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
14589 ref: ref
14590 }, props, {
14591 className: classnames_default().apply(void 0, [className, decoratedBsPrefix, noGutters && 'no-gutters'].concat(classes)),
14592 __self: Row_this,
14593 __source: {
14594 fileName: Row_jsxFileName,
14595 lineNumber: 132,
14596 columnNumber: 7
14597 }
14598 }));
14599});
14600Row.displayName = 'Row';
14601Row.propTypes = Row_propTypes;
14602Row.defaultProps = Row_defaultProps;
14603/* harmony default export */ const src_Row = (Row);
14604;// CONCATENATED MODULE: ./src/Spinner.tsx
14605
14606
14607var Spinner_excluded = ["bsPrefix", "variant", "animation", "size", "children", "as", "className"];
14608
14609var Spinner_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Spinner.tsx",
14610 Spinner_this = undefined;
14611
14612
14613
14614
14615
14616var Spinner_propTypes = {
14617 /**
14618 * @default 'spinner'
14619 */
14620 bsPrefix: (prop_types_default()).string,
14621
14622 /**
14623 * The visual color style of the spinner
14624 *
14625 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'light'|'dark')}
14626 */
14627 variant: (prop_types_default()).string,
14628
14629 /**
14630 * Changes the animation style of the spinner.
14631 *
14632 * @type {('border'|'grow')}
14633 * @default true
14634 */
14635 animation: prop_types_default().oneOf(['border', 'grow']).isRequired,
14636
14637 /**
14638 * Component size variations.
14639 *
14640 * @type {('sm')}
14641 */
14642 size: (prop_types_default()).string,
14643
14644 /**
14645 * This component may be used to wrap child elements or components.
14646 */
14647 children: (prop_types_default()).element,
14648
14649 /**
14650 * An ARIA accessible role applied to the Menu component. This should generally be set to 'status'
14651 */
14652 role: (prop_types_default()).string,
14653
14654 /**
14655 * @default div
14656 */
14657 as: (prop_types_default()).elementType
14658};
14659var Spinner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
14660 var bsPrefix = _ref.bsPrefix,
14661 variant = _ref.variant,
14662 animation = _ref.animation,
14663 size = _ref.size,
14664 children = _ref.children,
14665 _ref$as = _ref.as,
14666 Component = _ref$as === void 0 ? 'div' : _ref$as,
14667 className = _ref.className,
14668 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Spinner_excluded);
14669
14670 bsPrefix = useBootstrapPrefix(bsPrefix, 'spinner');
14671 var bsSpinnerPrefix = bsPrefix + "-" + animation;
14672 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
14673 ref: ref
14674 }, props, {
14675 className: classnames_default()(className, bsSpinnerPrefix, size && bsSpinnerPrefix + "-" + size, variant && "text-" + variant),
14676 __self: Spinner_this,
14677 __source: {
14678 fileName: Spinner_jsxFileName,
14679 lineNumber: 80,
14680 columnNumber: 7
14681 }
14682 }), children);
14683});
14684Spinner.propTypes = Spinner_propTypes;
14685Spinner.displayName = 'Spinner';
14686/* harmony default export */ const src_Spinner = (Spinner);
14687;// CONCATENATED MODULE: ./src/SplitButton.tsx
14688
14689
14690var SplitButton_excluded = ["id", "bsPrefix", "size", "variant", "title", "type", "toggleLabel", "children", "onClick", "href", "target", "menuAlign", "menuRole", "renderMenuOnMount", "rootCloseEvent"];
14691
14692var SplitButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/SplitButton.tsx",
14693 SplitButton_this = undefined;
14694
14695
14696
14697
14698
14699
14700
14701var SplitButton_propTypes = {
14702 /**
14703 * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
14704 * @type {string|number}
14705 * @required
14706 */
14707 id: (prop_types_default()).any,
14708
14709 /**
14710 * Accessible label for the toggle; the value of `title` if not specified.
14711 */
14712 toggleLabel: (prop_types_default()).string,
14713
14714 /** An `href` passed to the non-toggle Button */
14715 href: (prop_types_default()).string,
14716
14717 /** An anchor `target` passed to the non-toggle Button */
14718 target: (prop_types_default()).string,
14719
14720 /** An `onClick` handler passed to the non-toggle Button */
14721 onClick: (prop_types_default()).func,
14722
14723 /** The content of the non-toggle Button. */
14724 title: (prop_types_default()).node.isRequired,
14725
14726 /** A `type` passed to the non-toggle Button */
14727 type: (prop_types_default()).string,
14728
14729 /** Disables both Buttons */
14730 disabled: (prop_types_default()).bool,
14731
14732 /**
14733 * Aligns the dropdown menu responsively.
14734 *
14735 * _see [DropdownMenu](#dropdown-menu-props) for more details_
14736 *
14737 * @type {"left"|"right"|{ sm: "left"|"right" }|{ md: "left"|"right" }|{ lg: "left"|"right" }|{ xl: "left"|"right"} }
14738 */
14739 menuAlign: alignPropType,
14740
14741 /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
14742 menuRole: (prop_types_default()).string,
14743
14744 /** Whether to render the dropdown menu in the DOM before the first time it is shown */
14745 renderMenuOnMount: (prop_types_default()).bool,
14746
14747 /**
14748 * Which event when fired outside the component will cause it to be closed.
14749 *
14750 * _see [DropdownMenu](#dropdown-menu-props) for more details_
14751 */
14752 rootCloseEvent: (prop_types_default()).string,
14753
14754 /** @ignore */
14755 bsPrefix: (prop_types_default()).string,
14756
14757 /** @ignore */
14758 variant: (prop_types_default()).string,
14759
14760 /** @ignore */
14761 size: (prop_types_default()).string
14762};
14763var SplitButton_defaultProps = {
14764 toggleLabel: 'Toggle dropdown',
14765 type: 'button'
14766};
14767/**
14768 * A convenience component for simple or general use split button dropdowns. Renders a
14769 * `ButtonGroup` containing a `Button` and a `Button` toggle for the `Dropdown`. All `children`
14770 * are passed directly to the default `Dropdown.Menu`. This component accepts all of [`Dropdown`'s
14771 * props](#dropdown-props).
14772 *
14773 * _All unknown props are passed through to the `Dropdown` component._
14774 * The Button `variant`, `size` and `bsPrefix` props are passed to the button and toggle,
14775 * and menu-related props are passed to the `Dropdown.Menu`
14776 */
14777
14778var SplitButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
14779 var id = _ref.id,
14780 bsPrefix = _ref.bsPrefix,
14781 size = _ref.size,
14782 variant = _ref.variant,
14783 title = _ref.title,
14784 type = _ref.type,
14785 toggleLabel = _ref.toggleLabel,
14786 children = _ref.children,
14787 onClick = _ref.onClick,
14788 href = _ref.href,
14789 target = _ref.target,
14790 menuAlign = _ref.menuAlign,
14791 menuRole = _ref.menuRole,
14792 renderMenuOnMount = _ref.renderMenuOnMount,
14793 rootCloseEvent = _ref.rootCloseEvent,
14794 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, SplitButton_excluded);
14795
14796 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown, extends_extends({
14797 ref: ref
14798 }, props, {
14799 as: src_ButtonGroup,
14800 __self: SplitButton_this,
14801 __source: {
14802 fileName: SplitButton_jsxFileName,
14803 lineNumber: 125,
14804 columnNumber: 5
14805 }
14806 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Button, {
14807 size: size,
14808 variant: variant,
14809 disabled: props.disabled,
14810 bsPrefix: bsPrefix,
14811 href: href,
14812 target: target,
14813 onClick: onClick,
14814 type: type,
14815 __self: SplitButton_this,
14816 __source: {
14817 fileName: SplitButton_jsxFileName,
14818 lineNumber: 126,
14819 columnNumber: 7
14820 }
14821 }, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown.Toggle, {
14822 split: true,
14823 id: id ? id.toString() : undefined,
14824 size: size,
14825 variant: variant,
14826 disabled: props.disabled,
14827 childBsPrefix: bsPrefix,
14828 __self: SplitButton_this,
14829 __source: {
14830 fileName: SplitButton_jsxFileName,
14831 lineNumber: 138,
14832 columnNumber: 7
14833 }
14834 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
14835 className: "sr-only",
14836 __self: SplitButton_this,
14837 __source: {
14838 fileName: SplitButton_jsxFileName,
14839 lineNumber: 146,
14840 columnNumber: 9
14841 }
14842 }, toggleLabel)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown.Menu, {
14843 align: menuAlign,
14844 role: menuRole,
14845 renderOnMount: renderMenuOnMount,
14846 rootCloseEvent: rootCloseEvent,
14847 __self: SplitButton_this,
14848 __source: {
14849 fileName: SplitButton_jsxFileName,
14850 lineNumber: 149,
14851 columnNumber: 7
14852 }
14853 }, children));
14854});
14855SplitButton.propTypes = SplitButton_propTypes;
14856SplitButton.defaultProps = SplitButton_defaultProps;
14857SplitButton.displayName = 'SplitButton';
14858/* harmony default export */ const src_SplitButton = (SplitButton);
14859;// CONCATENATED MODULE: ./src/TabContainer.tsx
14860var TabContainer_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabContainer.tsx",
14861 TabContainer_this = undefined;
14862
14863
14864
14865
14866
14867
14868
14869var validateId = function validateId(props) {
14870 var error = null;
14871
14872 if (!props.generateChildId) {
14873 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14874 args[_key - 1] = arguments[_key];
14875 }
14876
14877 error = prop_types_default().string.apply((prop_types_default()), [props].concat(args));
14878
14879 if (!error && !props.id) {
14880 error = new Error('In order to properly initialize Tabs in a way that is accessible ' + 'to assistive technologies (such as screen readers) an `id` or a ' + '`generateChildId` prop to TabContainer is required');
14881 }
14882 }
14883
14884 return error;
14885};
14886/* eslint-disable react/no-unused-prop-types */
14887
14888
14889var TabContainer_propTypes = {
14890 /**
14891 * HTML id attribute, required if no `generateChildId` prop
14892 * is specified.
14893 *
14894 * @type {string}
14895 */
14896 id: validateId,
14897
14898 /**
14899 * Sets a default animation strategy for all children `<TabPane>`s.
14900 * Defaults to `<Fade>` animation; else, use `false` to disable, or a
14901 * custom react-transition-group `<Transition/>` component.
14902 *
14903 * @type {{Transition | false}}
14904 * @default {Fade}
14905 */
14906 transition: prop_types_default().oneOfType([prop_types_default().oneOf([false]), (prop_types_default()).elementType]),
14907
14908 /**
14909 * Wait until the first "enter" transition to mount tabs (add them to the DOM)
14910 */
14911 mountOnEnter: (prop_types_default()).bool,
14912
14913 /**
14914 * Unmount tabs (remove it from the DOM) when they are no longer visible
14915 */
14916 unmountOnExit: (prop_types_default()).bool,
14917
14918 /**
14919 * A function that takes an `eventKey` and `type` and returns a unique id for
14920 * child tab `<NavItem>`s and `<TabPane>`s. The function _must_ be a pure
14921 * function, meaning it should always return the _same_ id for the same set
14922 * of inputs. The default value requires that an `id` to be set for the
14923 * `<TabContainer>`.
14924 *
14925 * The `type` argument will either be `"tab"` or `"pane"`.
14926 *
14927 * @defaultValue (eventKey, type) => `${props.id}-${type}-${eventKey}`
14928 */
14929 generateChildId: (prop_types_default()).func,
14930
14931 /**
14932 * A callback fired when a tab is selected.
14933 *
14934 * @controllable activeKey
14935 */
14936 onSelect: (prop_types_default()).func,
14937
14938 /**
14939 * The `eventKey` of the currently active tab.
14940 *
14941 * @controllable onSelect
14942 */
14943 activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])
14944};
14945
14946var TabContainer = function TabContainer(props) {
14947 var _useUncontrolled = useUncontrolled(props, {
14948 activeKey: 'onSelect'
14949 }),
14950 id = _useUncontrolled.id,
14951 generateCustomChildId = _useUncontrolled.generateChildId,
14952 onSelect = _useUncontrolled.onSelect,
14953 activeKey = _useUncontrolled.activeKey,
14954 transition = _useUncontrolled.transition,
14955 mountOnEnter = _useUncontrolled.mountOnEnter,
14956 unmountOnExit = _useUncontrolled.unmountOnExit,
14957 children = _useUncontrolled.children;
14958
14959 var generateChildId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
14960 return generateCustomChildId || function (key, type) {
14961 return id ? id + "-" + type + "-" + key : null;
14962 };
14963 }, [id, generateCustomChildId]);
14964 var tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
14965 return {
14966 onSelect: onSelect,
14967 activeKey: activeKey,
14968 transition: transition,
14969 mountOnEnter: mountOnEnter || false,
14970 unmountOnExit: unmountOnExit || false,
14971 getControlledId: function getControlledId(key) {
14972 return generateChildId(key, 'tabpane');
14973 },
14974 getControllerId: function getControllerId(key) {
14975 return generateChildId(key, 'tab');
14976 }
14977 };
14978 }, [onSelect, activeKey, transition, mountOnEnter, unmountOnExit, generateChildId]);
14979 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabContext.Provider, {
14980 value: tabContext,
14981 __self: TabContainer_this,
14982 __source: {
14983 fileName: TabContainer_jsxFileName,
14984 lineNumber: 139,
14985 columnNumber: 5
14986 }
14987 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
14988 value: onSelect || null,
14989 __self: TabContainer_this,
14990 __source: {
14991 fileName: TabContainer_jsxFileName,
14992 lineNumber: 140,
14993 columnNumber: 7
14994 }
14995 }, children));
14996};
14997
14998TabContainer.propTypes = TabContainer_propTypes;
14999/* harmony default export */ const src_TabContainer = (TabContainer);
15000;// CONCATENATED MODULE: ./src/TabContent.tsx
15001
15002
15003var TabContent_excluded = ["bsPrefix", "as", "className"];
15004
15005var TabContent_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabContent.tsx",
15006 TabContent_this = undefined;
15007
15008
15009
15010
15011
15012var TabContent_propTypes = {
15013 /**
15014 * @default 'tab-content'
15015 */
15016 bsPrefix: (prop_types_default()).string,
15017 as: (prop_types_default()).elementType
15018};
15019var TabContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
15020 var bsPrefix = _ref.bsPrefix,
15021 _ref$as = _ref.as,
15022 Component = _ref$as === void 0 ? 'div' : _ref$as,
15023 className = _ref.className,
15024 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, TabContent_excluded);
15025
15026 var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'tab-content');
15027 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
15028 ref: ref
15029 }, props, {
15030 className: classnames_default()(className, decoratedBsPrefix),
15031 __self: TabContent_this,
15032 __source: {
15033 fileName: TabContent_jsxFileName,
15034 lineNumber: 36,
15035 columnNumber: 7
15036 }
15037 }));
15038});
15039TabContent.propTypes = TabContent_propTypes;
15040/* harmony default export */ const src_TabContent = (TabContent);
15041;// CONCATENATED MODULE: ./src/TabPane.tsx
15042
15043
15044var TabPane_excluded = ["activeKey", "getControlledId", "getControllerId"],
15045 TabPane_excluded2 = ["bsPrefix", "className", "active", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "mountOnEnter", "unmountOnExit", "transition", "as", "eventKey"];
15046
15047var TabPane_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabPane.tsx",
15048 TabPane_this = undefined;
15049
15050
15051
15052
15053
15054
15055
15056
15057var TabPane_propTypes = {
15058 /**
15059 * @default 'tab-pane'
15060 */
15061 bsPrefix: (prop_types_default()).string,
15062 as: (prop_types_default()).elementType,
15063
15064 /**
15065 * A key that associates the `TabPane` with it's controlling `NavLink`.
15066 */
15067 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
15068
15069 /**
15070 * Toggles the active state of the TabPane, this is generally controlled by a
15071 * TabContainer.
15072 */
15073 active: (prop_types_default()).bool,
15074
15075 /**
15076 * Use animation when showing or hiding `<TabPane>`s. Defaults to `<Fade>`
15077 * animation, else use `false` to disable or a react-transition-group
15078 * `<Transition/>` component.
15079 */
15080 transition: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).elementType]),
15081
15082 /**
15083 * Transition onEnter callback when animation is not `false`
15084 */
15085 onEnter: (prop_types_default()).func,
15086
15087 /**
15088 * Transition onEntering callback when animation is not `false`
15089 */
15090 onEntering: (prop_types_default()).func,
15091
15092 /**
15093 * Transition onEntered callback when animation is not `false`
15094 */
15095 onEntered: (prop_types_default()).func,
15096
15097 /**
15098 * Transition onExit callback when animation is not `false`
15099 */
15100 onExit: (prop_types_default()).func,
15101
15102 /**
15103 * Transition onExiting callback when animation is not `false`
15104 */
15105 onExiting: (prop_types_default()).func,
15106
15107 /**
15108 * Transition onExited callback when animation is not `false`
15109 */
15110 onExited: (prop_types_default()).func,
15111
15112 /**
15113 * Wait until the first "enter" transition to mount the tab (add it to the DOM)
15114 */
15115 mountOnEnter: (prop_types_default()).bool,
15116
15117 /**
15118 * Unmount the tab (remove it from the DOM) when it is no longer visible
15119 */
15120 unmountOnExit: (prop_types_default()).bool,
15121
15122 /** @ignore * */
15123 id: (prop_types_default()).string,
15124
15125 /** @ignore * */
15126 'aria-labelledby': (prop_types_default()).string
15127};
15128
15129function useTabContext(props) {
15130 var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_TabContext);
15131 if (!context) return props;
15132
15133 var activeKey = context.activeKey,
15134 getControlledId = context.getControlledId,
15135 getControllerId = context.getControllerId,
15136 rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(context, TabPane_excluded);
15137
15138 var shouldTransition = props.transition !== false && rest.transition !== false;
15139 var key = makeEventKey(props.eventKey);
15140 return extends_extends({}, props, {
15141 active: props.active == null && key != null ? makeEventKey(activeKey) === key : props.active,
15142 id: getControlledId(props.eventKey),
15143 'aria-labelledby': getControllerId(props.eventKey),
15144 transition: shouldTransition && (props.transition || rest.transition || src_Fade),
15145 mountOnEnter: props.mountOnEnter != null ? props.mountOnEnter : rest.mountOnEnter,
15146 unmountOnExit: props.unmountOnExit != null ? props.unmountOnExit : rest.unmountOnExit
15147 });
15148}
15149
15150var TabPane = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
15151 var _useTabContext = useTabContext(props),
15152 bsPrefix = _useTabContext.bsPrefix,
15153 className = _useTabContext.className,
15154 active = _useTabContext.active,
15155 onEnter = _useTabContext.onEnter,
15156 onEntering = _useTabContext.onEntering,
15157 onEntered = _useTabContext.onEntered,
15158 onExit = _useTabContext.onExit,
15159 onExiting = _useTabContext.onExiting,
15160 onExited = _useTabContext.onExited,
15161 mountOnEnter = _useTabContext.mountOnEnter,
15162 unmountOnExit = _useTabContext.unmountOnExit,
15163 Transition = _useTabContext.transition,
15164 _useTabContext$as = _useTabContext.as,
15165 Component = _useTabContext$as === void 0 ? 'div' : _useTabContext$as,
15166 _ = _useTabContext.eventKey,
15167 rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useTabContext, TabPane_excluded2);
15168
15169 var prefix = useBootstrapPrefix(bsPrefix, 'tab-pane');
15170 if (!active && !Transition && unmountOnExit) return null;
15171 var pane = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, rest, {
15172 ref: ref,
15173 role: "tabpanel",
15174 "aria-hidden": !active,
15175 className: classnames_default()(className, prefix, {
15176 active: active
15177 }),
15178 __self: TabPane_this,
15179 __source: {
15180 fileName: TabPane_jsxFileName,
15181 lineNumber: 153,
15182 columnNumber: 5
15183 }
15184 }));
15185 if (Transition) pane = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, {
15186 in: active,
15187 onEnter: onEnter,
15188 onEntering: onEntering,
15189 onEntered: onEntered,
15190 onExit: onExit,
15191 onExiting: onExiting,
15192 onExited: onExited,
15193 mountOnEnter: mountOnEnter,
15194 unmountOnExit: unmountOnExit,
15195 __self: TabPane_this,
15196 __source: {
15197 fileName: TabPane_jsxFileName,
15198 lineNumber: 164,
15199 columnNumber: 7
15200 }
15201 }, pane); // We provide an empty the TabContext so `<Nav>`s in `<TabPane>`s don't
15202 // conflict with the top level one.
15203
15204 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabContext.Provider, {
15205 value: null,
15206 __self: TabPane_this,
15207 __source: {
15208 fileName: TabPane_jsxFileName,
15209 lineNumber: 182,
15210 columnNumber: 5
15211 }
15212 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
15213 value: null,
15214 __self: TabPane_this,
15215 __source: {
15216 fileName: TabPane_jsxFileName,
15217 lineNumber: 183,
15218 columnNumber: 7
15219 }
15220 }, pane));
15221});
15222TabPane.displayName = 'TabPane';
15223TabPane.propTypes = TabPane_propTypes;
15224/* harmony default export */ const src_TabPane = (TabPane);
15225;// CONCATENATED MODULE: ./src/Tab.tsx
15226
15227
15228
15229
15230
15231
15232
15233/* eslint-disable react/require-render-return, react/no-unused-prop-types */
15234var Tab = /*#__PURE__*/function (_React$Component) {
15235 inheritsLoose_inheritsLoose(Tab, _React$Component);
15236
15237 function Tab() {
15238 return _React$Component.apply(this, arguments) || this;
15239 }
15240
15241 var _proto = Tab.prototype;
15242
15243 _proto.render = function render() {
15244 throw new Error('ReactBootstrap: The `Tab` component is not meant to be rendered! ' + "It's an abstract component that is only valid as a direct Child of the `Tabs` Component. " + 'For custom tabs components use TabPane and TabsContainer directly');
15245 return null;
15246 };
15247
15248 return Tab;
15249}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
15250
15251Tab.propTypes = {
15252 title: (prop_types_default()).node.isRequired,
15253 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])
15254};
15255Tab.Container = src_TabContainer;
15256Tab.Content = src_TabContent;
15257Tab.Pane = src_TabPane;
15258/* harmony default export */ const src_Tab = (Tab);
15259;// CONCATENATED MODULE: ./src/Table.tsx
15260
15261
15262var Table_excluded = ["bsPrefix", "className", "striped", "bordered", "borderless", "hover", "size", "variant", "responsive"];
15263
15264var Table_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Table.tsx",
15265 Table_this = undefined;
15266
15267
15268
15269
15270
15271var Table_propTypes = {
15272 /**
15273 * @default 'table'
15274 */
15275 bsPrefix: (prop_types_default()).string,
15276
15277 /**
15278 * Adds zebra-striping to any table row within the `<tbody>`.
15279 */
15280 striped: (prop_types_default()).bool,
15281
15282 /**
15283 * Adds borders on all sides of the table and cells.
15284 */
15285 bordered: (prop_types_default()).bool,
15286
15287 /**
15288 * Removes all borders on the table and cells, including table header.
15289 */
15290 borderless: (prop_types_default()).bool,
15291
15292 /**
15293 * Enable a hover state on table rows within a `<tbody>`.
15294 */
15295 hover: (prop_types_default()).bool,
15296
15297 /**
15298 * Make tables more compact by cutting cell padding in half by setting
15299 * size as `sm`.
15300 */
15301 size: (prop_types_default()).string,
15302
15303 /**
15304 * Invert the colors of the table — with light text on dark backgrounds
15305 * by setting variant as `dark`.
15306 */
15307 variant: (prop_types_default()).string,
15308
15309 /**
15310 * Responsive tables allow tables to be scrolled horizontally with ease.
15311 * Across every breakpoint, use `responsive` for horizontally
15312 * scrolling tables. Responsive tables are wrapped automatically in a `div`.
15313 * Use `responsive="sm"`, `responsive="md"`, `responsive="lg"`, or
15314 * `responsive="xl"` as needed to create responsive tables up to
15315 * a particular breakpoint. From that breakpoint and up, the table will
15316 * behave normally and not scroll horizontally.
15317 */
15318 responsive: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string])
15319};
15320var Table = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
15321 var bsPrefix = _ref.bsPrefix,
15322 className = _ref.className,
15323 striped = _ref.striped,
15324 bordered = _ref.bordered,
15325 borderless = _ref.borderless,
15326 hover = _ref.hover,
15327 size = _ref.size,
15328 variant = _ref.variant,
15329 responsive = _ref.responsive,
15330 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Table_excluded);
15331
15332 var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');
15333 var classes = classnames_default()(className, decoratedBsPrefix, variant && decoratedBsPrefix + "-" + variant, size && decoratedBsPrefix + "-" + size, striped && decoratedBsPrefix + "-striped", bordered && decoratedBsPrefix + "-bordered", borderless && decoratedBsPrefix + "-borderless", hover && decoratedBsPrefix + "-hover");
15334 var table = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("table", extends_extends({}, props, {
15335 className: classes,
15336 ref: ref,
15337 __self: Table_this,
15338 __source: {
15339 fileName: Table_jsxFileName,
15340 lineNumber: 101,
15341 columnNumber: 19
15342 }
15343 }));
15344
15345 if (responsive) {
15346 var responsiveClass = decoratedBsPrefix + "-responsive";
15347
15348 if (typeof responsive === 'string') {
15349 responsiveClass = responsiveClass + "-" + responsive;
15350 }
15351
15352 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
15353 className: responsiveClass,
15354 __self: Table_this,
15355 __source: {
15356 fileName: Table_jsxFileName,
15357 lineNumber: 108,
15358 columnNumber: 14
15359 }
15360 }, table);
15361 }
15362
15363 return table;
15364});
15365Table.propTypes = Table_propTypes;
15366/* harmony default export */ const src_Table = (Table);
15367;// CONCATENATED MODULE: ./src/Tabs.tsx
15368
15369
15370var Tabs_excluded = ["id", "onSelect", "transition", "mountOnEnter", "unmountOnExit", "children", "activeKey"];
15371
15372var Tabs_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tabs.tsx",
15373 Tabs_this = undefined;
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386var Tabs_propTypes = {
15387 /**
15388 * Mark the Tab with a matching `eventKey` as active.
15389 *
15390 * @controllable onSelect
15391 */
15392 activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
15393
15394 /** The default active key that is selected on start */
15395 defaultActiveKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
15396
15397 /**
15398 * Navigation style
15399 *
15400 * @type {('tabs'| 'pills')}
15401 */
15402 variant: (prop_types_default()).string,
15403
15404 /**
15405 * Sets a default animation strategy for all children `<TabPane>`s.
15406 * Defaults to `<Fade>` animation, else use `false` to disable or a
15407 * react-transition-group `<Transition/>` component.
15408 *
15409 * @type {Transition | false}
15410 * @default {Fade}
15411 */
15412 transition: prop_types_default().oneOfType([prop_types_default().oneOf([false]), (prop_types_default()).elementType]),
15413
15414 /**
15415 * HTML id attribute, required if no `generateChildId` prop
15416 * is specified.
15417 *
15418 * @type {string}
15419 */
15420 id: isRequiredForA11y_default()((prop_types_default()).string),
15421
15422 /**
15423 * Callback fired when a Tab is selected.
15424 *
15425 * ```js
15426 * function (
15427 * Any eventKey,
15428 * SyntheticEvent event?
15429 * )
15430 * ```
15431 *
15432 * @controllable activeKey
15433 */
15434 onSelect: (prop_types_default()).func,
15435
15436 /**
15437 * Wait until the first "enter" transition to mount tabs (add them to the DOM)
15438 */
15439 mountOnEnter: (prop_types_default()).bool,
15440
15441 /**
15442 * Unmount tabs (remove it from the DOM) when it is no longer visible
15443 */
15444 unmountOnExit: (prop_types_default()).bool
15445};
15446var Tabs_defaultProps = {
15447 variant: 'tabs',
15448 mountOnEnter: false,
15449 unmountOnExit: false
15450};
15451
15452function getDefaultActiveKey(children) {
15453 var defaultActiveKey;
15454 forEach(children, function (child) {
15455 if (defaultActiveKey == null) {
15456 defaultActiveKey = child.props.eventKey;
15457 }
15458 });
15459 return defaultActiveKey;
15460}
15461
15462function renderTab(child) {
15463 var _child$props = child.props,
15464 title = _child$props.title,
15465 eventKey = _child$props.eventKey,
15466 disabled = _child$props.disabled,
15467 tabClassName = _child$props.tabClassName,
15468 id = _child$props.id;
15469
15470 if (title == null) {
15471 return null;
15472 }
15473
15474 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_NavItem, {
15475 as: src_NavLink,
15476 eventKey: eventKey,
15477 disabled: disabled,
15478 id: id,
15479 className: tabClassName,
15480 __self: this,
15481 __source: {
15482 fileName: Tabs_jsxFileName,
15483 lineNumber: 116,
15484 columnNumber: 5
15485 }
15486 }, title);
15487}
15488
15489var Tabs = function Tabs(props) {
15490 var _useUncontrolled = useUncontrolled(props, {
15491 activeKey: 'onSelect'
15492 }),
15493 id = _useUncontrolled.id,
15494 onSelect = _useUncontrolled.onSelect,
15495 transition = _useUncontrolled.transition,
15496 mountOnEnter = _useUncontrolled.mountOnEnter,
15497 unmountOnExit = _useUncontrolled.unmountOnExit,
15498 children = _useUncontrolled.children,
15499 _useUncontrolled$acti = _useUncontrolled.activeKey,
15500 activeKey = _useUncontrolled$acti === void 0 ? getDefaultActiveKey(children) : _useUncontrolled$acti,
15501 controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Tabs_excluded);
15502
15503 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabContainer, {
15504 id: id,
15505 activeKey: activeKey,
15506 onSelect: onSelect,
15507 transition: transition,
15508 mountOnEnter: mountOnEnter,
15509 unmountOnExit: unmountOnExit,
15510 __self: Tabs_this,
15511 __source: {
15512 fileName: Tabs_jsxFileName,
15513 lineNumber: 143,
15514 columnNumber: 5
15515 }
15516 }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Nav, extends_extends({}, controlledProps, {
15517 role: "tablist",
15518 as: "nav",
15519 __self: Tabs_this,
15520 __source: {
15521 fileName: Tabs_jsxFileName,
15522 lineNumber: 151,
15523 columnNumber: 7
15524 }
15525 }), map(children, renderTab)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabContent, {
15526 __self: Tabs_this,
15527 __source: {
15528 fileName: Tabs_jsxFileName,
15529 lineNumber: 155,
15530 columnNumber: 7
15531 }
15532 }, map(children, function (child) {
15533 var childProps = extends_extends({}, child.props);
15534
15535 delete childProps.title;
15536 delete childProps.disabled;
15537 delete childProps.tabClassName;
15538 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabPane, extends_extends({}, childProps, {
15539 __self: Tabs_this,
15540 __source: {
15541 fileName: Tabs_jsxFileName,
15542 lineNumber: 163,
15543 columnNumber: 18
15544 }
15545 }));
15546 })));
15547};
15548
15549Tabs.propTypes = Tabs_propTypes;
15550Tabs.defaultProps = Tabs_defaultProps;
15551Tabs.displayName = 'Tabs';
15552/* harmony default export */ const src_Tabs = (Tabs);
15553;// CONCATENATED MODULE: ./src/ToastContext.tsx
15554 // TODO: check
15555
15556var ToastContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
15557 // eslint-disable-next-line @typescript-eslint/no-empty-function
15558 onClose: function onClose() {}
15559});
15560/* harmony default export */ const src_ToastContext = (ToastContext);
15561;// CONCATENATED MODULE: ./src/ToastHeader.tsx
15562
15563
15564var ToastHeader_excluded = ["bsPrefix", "closeLabel", "closeButton", "className", "children"];
15565
15566var ToastHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToastHeader.tsx",
15567 ToastHeader_this = undefined;
15568
15569
15570
15571
15572
15573
15574
15575
15576var ToastHeader_propTypes = {
15577 bsPrefix: (prop_types_default()).string,
15578
15579 /**
15580 * Provides an accessible label for the close
15581 * button. It is used for Assistive Technology when the label text is not
15582 * readable.
15583 */
15584 closeLabel: (prop_types_default()).string,
15585
15586 /**
15587 * Specify whether the Component should contain a close button
15588 */
15589 closeButton: (prop_types_default()).bool
15590};
15591var ToastHeader_defaultProps = {
15592 closeLabel: 'Close',
15593 closeButton: true
15594};
15595var ToastHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
15596 var bsPrefix = _ref.bsPrefix,
15597 closeLabel = _ref.closeLabel,
15598 closeButton = _ref.closeButton,
15599 className = _ref.className,
15600 children = _ref.children,
15601 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ToastHeader_excluded);
15602
15603 bsPrefix = useBootstrapPrefix(bsPrefix, 'toast-header');
15604 var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_ToastContext);
15605 var handleClick = useEventCallback(function (e) {
15606 if (context && context.onClose) {
15607 context.onClose(e);
15608 }
15609 });
15610 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
15611 ref: ref
15612 }, props, {
15613 className: classnames_default()(bsPrefix, className),
15614 __self: ToastHeader_this,
15615 __source: {
15616 fileName: ToastHeader_jsxFileName,
15617 lineNumber: 69,
15618 columnNumber: 7
15619 }
15620 }), children, closeButton && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_CloseButton, {
15621 label: closeLabel,
15622 onClick: handleClick,
15623 className: "ml-2 mb-1",
15624 "data-dismiss": "toast",
15625 __self: ToastHeader_this,
15626 __source: {
15627 fileName: ToastHeader_jsxFileName,
15628 lineNumber: 73,
15629 columnNumber: 11
15630 }
15631 }));
15632});
15633ToastHeader.displayName = 'ToastHeader';
15634ToastHeader.propTypes = ToastHeader_propTypes;
15635ToastHeader.defaultProps = ToastHeader_defaultProps;
15636/* harmony default export */ const src_ToastHeader = (ToastHeader);
15637;// CONCATENATED MODULE: ./src/ToastBody.tsx
15638
15639/* harmony default export */ const ToastBody = (createWithBsPrefix('toast-body'));
15640;// CONCATENATED MODULE: ./src/Toast.tsx
15641
15642
15643var Toast_excluded = ["bsPrefix", "className", "children", "transition", "show", "animation", "delay", "autohide", "onClose"];
15644
15645var Toast_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Toast.tsx",
15646 Toast_this = undefined;
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657var Toast_propTypes = {
15658 /**
15659 * @default 'toast'
15660 */
15661 bsPrefix: (prop_types_default()).string,
15662
15663 /**
15664 * Apply a CSS fade transition to the toast
15665 */
15666 animation: (prop_types_default()).bool,
15667
15668 /**
15669 * Auto hide the toast
15670 */
15671 autohide: (prop_types_default()).bool,
15672
15673 /**
15674 * Delay hiding the toast (ms)
15675 */
15676 delay: (prop_types_default()).number,
15677
15678 /**
15679 * A Callback fired when the close button is clicked.
15680 */
15681 onClose: (prop_types_default()).func,
15682
15683 /**
15684 * When `true` The modal will show itself.
15685 */
15686 show: (prop_types_default()).bool,
15687
15688 /**
15689 * A `react-transition-group` Transition component used to animate the Toast on dismissal.
15690 */
15691 transition: (prop_types_default()).elementType
15692};
15693var Toast = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
15694 var bsPrefix = _ref.bsPrefix,
15695 className = _ref.className,
15696 children = _ref.children,
15697 _ref$transition = _ref.transition,
15698 Transition = _ref$transition === void 0 ? src_Fade : _ref$transition,
15699 _ref$show = _ref.show,
15700 show = _ref$show === void 0 ? true : _ref$show,
15701 _ref$animation = _ref.animation,
15702 animation = _ref$animation === void 0 ? true : _ref$animation,
15703 _ref$delay = _ref.delay,
15704 delay = _ref$delay === void 0 ? 3000 : _ref$delay,
15705 _ref$autohide = _ref.autohide,
15706 autohide = _ref$autohide === void 0 ? false : _ref$autohide,
15707 onClose = _ref.onClose,
15708 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Toast_excluded);
15709
15710 bsPrefix = useBootstrapPrefix(bsPrefix, 'toast'); // We use refs for these, because we don't want to restart the autohide
15711 // timer in case these values change.
15712
15713 var delayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(delay);
15714 var onCloseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(onClose);
15715 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
15716 delayRef.current = delay;
15717 onCloseRef.current = onClose;
15718 }, [delay, onClose]);
15719 var autohideTimeout = useTimeout();
15720 var autohideToast = !!(autohide && show);
15721 var autohideFunc = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
15722 if (autohideToast) {
15723 onCloseRef.current == null ? void 0 : onCloseRef.current();
15724 }
15725 }, [autohideToast]);
15726 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
15727 // Only reset timer if show or autohide changes.
15728 autohideTimeout.set(autohideFunc, delayRef.current);
15729 }, [autohideTimeout, autohideFunc]);
15730 var toastContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
15731 return {
15732 onClose: onClose
15733 };
15734 }, [onClose]);
15735 var hasAnimation = !!(Transition && animation);
15736 var toast = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, props, {
15737 ref: ref,
15738 className: classnames_default()(bsPrefix, className, !hasAnimation && (show ? 'show' : 'hide')),
15739 role: "alert",
15740 "aria-live": "assertive",
15741 "aria-atomic": "true",
15742 __self: Toast_this,
15743 __source: {
15744 fileName: Toast_jsxFileName,
15745 lineNumber: 118,
15746 columnNumber: 7
15747 }
15748 }), children);
15749 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_ToastContext.Provider, {
15750 value: toastContext,
15751 __self: Toast_this,
15752 __source: {
15753 fileName: Toast_jsxFileName,
15754 lineNumber: 135,
15755 columnNumber: 7
15756 }
15757 }, hasAnimation && Transition ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, {
15758 in: show,
15759 unmountOnExit: true,
15760 __self: Toast_this,
15761 __source: {
15762 fileName: Toast_jsxFileName,
15763 lineNumber: 137,
15764 columnNumber: 11
15765 }
15766 }, toast) : toast);
15767});
15768Toast.propTypes = Toast_propTypes;
15769Toast.displayName = 'Toast';
15770/* harmony default export */ const src_Toast = (Object.assign(Toast, {
15771 Body: ToastBody,
15772 Header: src_ToastHeader
15773}));
15774;// CONCATENATED MODULE: ./src/ToggleButton.tsx
15775
15776
15777var ToggleButton_excluded = ["children", "name", "className", "checked", "type", "onChange", "value", "disabled", "inputRef"];
15778
15779var ToggleButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToggleButton.tsx",
15780 ToggleButton_this = undefined;
15781
15782
15783
15784
15785
15786
15787var ToggleButton_noop = function noop() {
15788 return undefined;
15789};
15790
15791var ToggleButton_propTypes = {
15792 /**
15793 * The `<input>` element `type`
15794 */
15795 type: prop_types_default().oneOf(['checkbox', 'radio']),
15796
15797 /**
15798 * The HTML input name, used to group like checkboxes or radio buttons together
15799 * semantically
15800 */
15801 name: (prop_types_default()).string,
15802
15803 /**
15804 * The checked state of the input, managed by `<ToggleButtonGroup>` automatically
15805 */
15806 checked: (prop_types_default()).bool,
15807
15808 /**
15809 * The disabled state of both the label and input
15810 */
15811 disabled: (prop_types_default()).bool,
15812
15813 /**
15814 * A callback fired when the underlying input element changes. This is passed
15815 * directly to the `<input>` so shares the same signature as a native `onChange` event.
15816 */
15817 onChange: (prop_types_default()).func,
15818
15819 /**
15820 * The value of the input, should be unique amongst it's siblings when nested in a
15821 * `ToggleButtonGroup`.
15822 */
15823 value: prop_types_default().oneOfType([(prop_types_default()).string, prop_types_default().arrayOf((prop_types_default()).string), (prop_types_default()).number]).isRequired,
15824
15825 /**
15826 * A ref attached to the `<input>` element
15827 * @type {ReactRef}
15828 */
15829 inputRef: prop_types_default().oneOfType([(prop_types_default()).func, (prop_types_default()).object])
15830};
15831var ToggleButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
15832 var children = _ref.children,
15833 name = _ref.name,
15834 className = _ref.className,
15835 checked = _ref.checked,
15836 type = _ref.type,
15837 onChange = _ref.onChange,
15838 value = _ref.value,
15839 disabled = _ref.disabled,
15840 inputRef = _ref.inputRef,
15841 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ToggleButton_excluded);
15842
15843 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
15844 focused = _useState[0],
15845 setFocused = _useState[1];
15846
15847 var handleFocus = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
15848 if (e.target.tagName === 'INPUT') setFocused(true);
15849 }, []);
15850 var handleBlur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
15851 if (e.target.tagName === 'INPUT') setFocused(false);
15852 }, []);
15853 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Button, extends_extends({}, props, {
15854 ref: ref,
15855 className: classnames_default()(className, focused && 'focus', disabled && 'disabled'),
15856 type: undefined,
15857 active: !!checked,
15858 as: "label",
15859 __self: ToggleButton_this,
15860 __source: {
15861 fileName: ToggleButton_jsxFileName,
15862 lineNumber: 98,
15863 columnNumber: 7
15864 }
15865 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
15866 name: name,
15867 type: type,
15868 value: value,
15869 ref: inputRef,
15870 autoComplete: "off",
15871 checked: !!checked,
15872 disabled: !!disabled,
15873 onFocus: handleFocus,
15874 onBlur: handleBlur,
15875 onChange: onChange || ToggleButton_noop,
15876 __self: ToggleButton_this,
15877 __source: {
15878 fileName: ToggleButton_jsxFileName,
15879 lineNumber: 110,
15880 columnNumber: 9
15881 }
15882 }), children);
15883});
15884ToggleButton.propTypes = ToggleButton_propTypes;
15885ToggleButton.displayName = 'ToggleButton';
15886/* harmony default export */ const src_ToggleButton = (ToggleButton);
15887;// CONCATENATED MODULE: ./src/ToggleButtonGroup.tsx
15888
15889
15890var ToggleButtonGroup_excluded = ["children", "type", "name", "value", "onChange"];
15891
15892var ToggleButtonGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToggleButtonGroup.tsx",
15893 ToggleButtonGroup_this = undefined;
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903var ToggleButtonGroup_propTypes = {
15904 /**
15905 * An HTML `<input>` name for each child button.
15906 *
15907 * __Required if `type` is set to `'radio'`__
15908 */
15909 name: (prop_types_default()).string,
15910
15911 /**
15912 * The value, or array of values, of the active (pressed) buttons
15913 *
15914 * @controllable onChange
15915 */
15916 value: (prop_types_default()).any,
15917
15918 /**
15919 * Callback fired when a button is pressed, depending on whether the `type`
15920 * is `'radio'` or `'checkbox'`, `onChange` will be called with the value or
15921 * array of active values
15922 *
15923 * @controllable value
15924 */
15925 onChange: (prop_types_default()).func,
15926
15927 /**
15928 * The input `type` of the rendered buttons, determines the toggle behavior
15929 * of the buttons
15930 */
15931 type: prop_types_default().oneOf(['checkbox', 'radio']).isRequired,
15932
15933 /**
15934 * Sets the size for all Buttons in the group.
15935 *
15936 * @type ('sm'|'lg')
15937 */
15938 size: (prop_types_default()).string,
15939
15940 /** Make the set of Buttons appear vertically stacked. */
15941 vertical: (prop_types_default()).bool
15942};
15943var ToggleButtonGroup_defaultProps = {
15944 type: 'radio',
15945 vertical: false
15946};
15947var ToggleButtonGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
15948 var _useUncontrolled = useUncontrolled(props, {
15949 value: 'onChange'
15950 }),
15951 children = _useUncontrolled.children,
15952 type = _useUncontrolled.type,
15953 name = _useUncontrolled.name,
15954 value = _useUncontrolled.value,
15955 onChange = _useUncontrolled.onChange,
15956 controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, ToggleButtonGroup_excluded);
15957
15958 var getValues = function getValues() {
15959 return value == null ? [] : [].concat(value);
15960 };
15961
15962 var handleToggle = function handleToggle(inputVal, event) {
15963 if (!onChange) {
15964 return;
15965 }
15966
15967 var values = getValues();
15968 var isActive = values.indexOf(inputVal) !== -1;
15969
15970 if (type === 'radio') {
15971 if (!isActive && onChange) onChange(inputVal, event);
15972 return;
15973 }
15974
15975 if (isActive) {
15976 onChange(values.filter(function (n) {
15977 return n !== inputVal;
15978 }), event);
15979 } else {
15980 onChange([].concat(values, [inputVal]), event);
15981 }
15982 };
15983
15984 !(type !== 'radio' || !!name) ? false ? 0 : browser_default()(false) : void 0;
15985 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_ButtonGroup, extends_extends({}, controlledProps, {
15986 ref: ref,
15987 toggle: true,
15988 __self: ToggleButtonGroup_this,
15989 __source: {
15990 fileName: ToggleButtonGroup_jsxFileName,
15991 lineNumber: 132,
15992 columnNumber: 7
15993 }
15994 }), map(children, function (child) {
15995 var values = getValues();
15996 var _child$props = child.props,
15997 childVal = _child$props.value,
15998 childOnChange = _child$props.onChange;
15999
16000 var handler = function handler(e) {
16001 return handleToggle(childVal, e);
16002 };
16003
16004 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
16005 type: type,
16006 name: child.name || name,
16007 checked: values.indexOf(childVal) !== -1,
16008 onChange: src_createChainedFunction(childOnChange, handler)
16009 });
16010 }));
16011});
16012ToggleButtonGroup.propTypes = ToggleButtonGroup_propTypes;
16013ToggleButtonGroup.defaultProps = ToggleButtonGroup_defaultProps;
16014ToggleButtonGroup.Button = src_ToggleButton;
16015/* harmony default export */ const src_ToggleButtonGroup = (ToggleButtonGroup);
16016;// CONCATENATED MODULE: ./src/Tooltip.tsx
16017
16018
16019var Tooltip_excluded = ["bsPrefix", "placement", "className", "style", "children", "arrowProps", "popper", "show"];
16020
16021var Tooltip_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tooltip.tsx",
16022 Tooltip_this = undefined;
16023
16024
16025
16026
16027
16028
16029var Tooltip_propTypes = {
16030 /**
16031 * @default 'tooltip'
16032 */
16033 bsPrefix: (prop_types_default()).string,
16034
16035 /**
16036 * An html id attribute, necessary for accessibility
16037 * @type {string|number}
16038 * @required
16039 */
16040 id: isRequiredForA11y_default()(prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])),
16041
16042 /**
16043 * Sets the direction the Tooltip is positioned towards.
16044 *
16045 * > This is generally provided by the `Overlay` component positioning the tooltip
16046 */
16047 placement: prop_types_default().oneOf(['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']),
16048
16049 /**
16050 * An Overlay injected set of props for positioning the tooltip arrow.
16051 *
16052 * > This is generally provided by the `Overlay` component positioning the tooltip
16053 *
16054 * @type {{ ref: ReactRef, style: Object }}
16055 */
16056 arrowProps: prop_types_default().shape({
16057 ref: (prop_types_default()).any,
16058 style: (prop_types_default()).object
16059 }),
16060
16061 /** @private */
16062 popper: (prop_types_default()).object,
16063
16064 /** @private */
16065 show: (prop_types_default()).any
16066};
16067var Tooltip_defaultProps = {
16068 placement: 'right'
16069};
16070var Tooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
16071 var bsPrefix = _ref.bsPrefix,
16072 placement = _ref.placement,
16073 className = _ref.className,
16074 style = _ref.style,
16075 children = _ref.children,
16076 arrowProps = _ref.arrowProps,
16077 _ = _ref.popper,
16078 _2 = _ref.show,
16079 props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Tooltip_excluded);
16080
16081 bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');
16082
16083 var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],
16084 primaryPlacement = _ref2[0];
16085
16086 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
16087 ref: ref,
16088 style: style,
16089 role: "tooltip",
16090 "x-placement": primaryPlacement,
16091 className: classnames_default()(className, bsPrefix, "bs-tooltip-" + primaryPlacement)
16092 }, props, {
16093 __self: Tooltip_this,
16094 __source: {
16095 fileName: Tooltip_jsxFileName,
16096 lineNumber: 106,
16097 columnNumber: 7
16098 }
16099 }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
16100 className: "arrow"
16101 }, arrowProps, {
16102 __self: Tooltip_this,
16103 __source: {
16104 fileName: Tooltip_jsxFileName,
16105 lineNumber: 118,
16106 columnNumber: 9
16107 }
16108 })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
16109 className: bsPrefix + "-inner",
16110 __self: Tooltip_this,
16111 __source: {
16112 fileName: Tooltip_jsxFileName,
16113 lineNumber: 119,
16114 columnNumber: 9
16115 }
16116 }, children));
16117});
16118Tooltip.propTypes = Tooltip_propTypes;
16119Tooltip.defaultProps = Tooltip_defaultProps;
16120Tooltip.displayName = 'Tooltip';
16121/* harmony default export */ const src_Tooltip = (Tooltip);
16122;// CONCATENATED MODULE: ./src/index.tsx
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199})();
16200
16201/******/ return __webpack_exports__;
16202/******/ })()
16203;
16204});
\No newline at end of file