Skip to content

Instantly share code, notes, and snippets.

@balloob
Created June 26, 2017 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balloob/79cb8c9d930dae9ab5a0c4cf8900e823 to your computer and use it in GitHub Desktop.
Save balloob/79cb8c9d930dae9ab5a0c4cf8900e823 to your computer and use it in GitHub Desktop.
Build output Reactstrap optimizations
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var React__default = _interopDefault(React);
var PropTypes = _interopDefault(require('prop-types'));
var classNames = _interopDefault(require('classnames'));
var isobject = _interopDefault(require('lodash.isobject'));
var ReactDOM = _interopDefault(require('react-dom'));
var omit = _interopDefault(require('lodash.omit'));
var isFunction = _interopDefault(require('lodash.isfunction'));
var Tether = _interopDefault(require('reactstrap-tether'));
var toNumber = _interopDefault(require('lodash.tonumber'));
var reactTransitionGroup = require('react-transition-group');
function getTetherAttachments(placement) {
var attachments = {};
switch (placement) {
case 'top':
case 'top center':
attachments = {
attachment: 'bottom center',
targetAttachment: 'top center'
};
break;
case 'bottom':
case 'bottom center':
attachments = {
attachment: 'top center',
targetAttachment: 'bottom center'
};
break;
case 'left':
case 'left center':
attachments = {
attachment: 'middle right',
targetAttachment: 'middle left'
};
break;
case 'right':
case 'right center':
attachments = {
attachment: 'middle left',
targetAttachment: 'middle right'
};
break;
case 'top left':
attachments = {
attachment: 'bottom left',
targetAttachment: 'top left'
};
break;
case 'top right':
attachments = {
attachment: 'bottom right',
targetAttachment: 'top right'
};
break;
case 'bottom left':
attachments = {
attachment: 'top left',
targetAttachment: 'bottom left'
};
break;
case 'bottom right':
attachments = {
attachment: 'top right',
targetAttachment: 'bottom right'
};
break;
case 'right top':
attachments = {
attachment: 'top left',
targetAttachment: 'top right'
};
break;
case 'right bottom':
attachments = {
attachment: 'bottom left',
targetAttachment: 'bottom right'
};
break;
case 'left top':
attachments = {
attachment: 'top right',
targetAttachment: 'top left'
};
break;
case 'left bottom':
attachments = {
attachment: 'bottom right',
targetAttachment: 'bottom left'
};
break;
default:
attachments = {
attachment: 'top center',
targetAttachment: 'bottom center'
};
}
return attachments;
}
var tetherAttachements = ['top', 'bottom', 'left', 'right', 'top left', 'top center', 'top right', 'right top', 'right middle', 'right bottom', 'bottom right', 'bottom center', 'bottom left', 'left top', 'left middle', 'left bottom'];
// https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/js/src/modal.js#L436-L443
function getScrollbarWidth() {
var scrollDiv = document.createElement('div');
// .modal-scrollbar-measure styles // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/scss/_modal.scss#L106-L113
scrollDiv.style.position = 'absolute';
scrollDiv.style.top = '-9999px';
scrollDiv.style.width = '50px';
scrollDiv.style.height = '50px';
scrollDiv.style.overflow = 'scroll';
document.body.appendChild(scrollDiv);
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
return scrollbarWidth;
}
function setScrollbarWidth(padding) {
document.body.style.paddingRight = padding > 0 ? padding + 'px' : null;
}
function isBodyOverflowing() {
return document.body.clientWidth < window.innerWidth;
}
function getOriginalBodyPadding() {
return parseInt(window.getComputedStyle(document.body, null).getPropertyValue('padding-right') || 0, 10);
}
function conditionallyUpdateScrollbar() {
var scrollbarWidth = getScrollbarWidth();
// https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/js/src/modal.js#L420
var fixedContent = document.querySelectorAll('.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed')[0];
var bodyPadding = fixedContent ? parseInt(fixedContent.style.paddingRight || 0, 10) : 0;
if (isBodyOverflowing()) {
setScrollbarWidth(bodyPadding + scrollbarWidth);
}
}
function mapToCssModules(className, cssModule) {
if (!cssModule) return className;
return className.split(' ').map(function (c) {
return cssModule[c] || c;
}).join(' ');
}
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var defineProperty = function (obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
var possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
var propTypes = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
fluid: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps = {
tag: 'div'
};
var Container = function Container(props) {
var className = props.className,
cssModule = props.cssModule,
fluid = props.fluid,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'fluid', 'tag']);
var classes = mapToCssModules(classNames(className, fluid ? 'container-fluid' : 'container'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Container.propTypes = propTypes;
Container.defaultProps = defaultProps;
var propTypes$1 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
noGutters: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$1 = {
tag: 'div'
};
var Row = function Row(props) {
var className = props.className,
cssModule = props.cssModule,
noGutters = props.noGutters,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'noGutters', 'tag']);
var classes = mapToCssModules(classNames(className, noGutters ? 'no-gutters' : null, 'row'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Row.propTypes = propTypes$1;
Row.defaultProps = defaultProps$1;
var colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
var stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);
var columnProps = PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string, PropTypes.shape({
size: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string]),
push: stringOrNumberProp,
pull: stringOrNumberProp,
offset: stringOrNumberProp
})]);
var propTypes$2 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
xs: columnProps,
sm: columnProps,
md: columnProps,
lg: columnProps,
xl: columnProps,
className: PropTypes.string,
cssModule: PropTypes.object,
widths: PropTypes.array
};
var defaultProps$2 = {
tag: 'div',
widths: colWidths
};
var getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {
if (colSize === true || colSize === '') {
return isXs ? 'col' : 'col-' + colWidth;
} else if (colSize === 'auto') {
return isXs ? 'col-auto' : 'col-' + colWidth + '-auto';
}
return isXs ? 'col-' + colSize : 'col-' + colWidth + '-' + colSize;
};
var Col = function Col(props) {
var className = props.className,
cssModule = props.cssModule,
widths = props.widths,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'widths', 'tag']);
var colClasses = [];
widths.forEach(function (colWidth, i) {
var columnProp = props[colWidth];
if (!i && columnProp === undefined) {
columnProp = true;
}
delete attributes[colWidth];
if (!columnProp) {
return;
}
var isXs = !i;
var colClass = void 0;
if (isobject(columnProp)) {
var _classNames;
var colSizeInterfix = isXs ? '-' : '-' + colWidth + '-';
colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
colClasses.push(mapToCssModules(classNames((_classNames = {}, defineProperty(_classNames, colClass, columnProp.size || columnProp.size === ''), defineProperty(_classNames, 'push' + colSizeInterfix + columnProp.push, columnProp.push || columnProp.push === 0), defineProperty(_classNames, 'pull' + colSizeInterfix + columnProp.pull, columnProp.pull || columnProp.pull === 0), defineProperty(_classNames, 'offset' + colSizeInterfix + columnProp.offset, columnProp.offset || columnProp.offset === 0), _classNames))), cssModule);
} else {
colClass = getColumnSizeClass(isXs, colWidth, columnProp);
colClasses.push(colClass);
}
});
var classes = mapToCssModules(classNames(className, colClasses), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Col.propTypes = propTypes$2;
Col.defaultProps = defaultProps$2;
var propTypes$3 = {
light: PropTypes.bool,
inverse: PropTypes.bool,
full: PropTypes.bool,
fixed: PropTypes.string,
sticky: PropTypes.string,
color: PropTypes.string,
role: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object,
toggleable: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])
};
var defaultProps$3 = {
tag: 'nav',
role: 'navigation',
toggleable: false
};
var getToggleableClass = function getToggleableClass(toggleable) {
if (toggleable === false) {
return false;
} else if (toggleable === true || toggleable === 'xs') {
return 'navbar-toggleable';
}
return 'navbar-toggleable-' + toggleable;
};
var Navbar = function Navbar(props) {
var _classNames;
var toggleable = props.toggleable,
className = props.className,
cssModule = props.cssModule,
light = props.light,
inverse = props.inverse,
full = props.full,
fixed = props.fixed,
sticky = props.sticky,
color = props.color,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['toggleable', 'className', 'cssModule', 'light', 'inverse', 'full', 'fixed', 'sticky', 'color', 'tag']);
var classes = mapToCssModules(classNames(className, 'navbar', getToggleableClass(toggleable), (_classNames = {
'navbar-light': light,
'navbar-inverse': inverse
}, defineProperty(_classNames, 'bg-' + color, color), defineProperty(_classNames, 'navbar-full', full), defineProperty(_classNames, 'fixed-' + fixed, fixed), defineProperty(_classNames, 'sticky-' + sticky, sticky), _classNames)), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Navbar.propTypes = propTypes$3;
Navbar.defaultProps = defaultProps$3;
var propTypes$4 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$4 = {
tag: 'a'
};
var NavbarBrand = function NavbarBrand(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'navbar-brand'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
NavbarBrand.propTypes = propTypes$4;
NavbarBrand.defaultProps = defaultProps$4;
var propTypes$5 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
type: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object,
children: PropTypes.node,
right: PropTypes.bool,
left: PropTypes.bool
};
var defaultProps$5 = {
tag: 'button',
type: 'button'
};
var navbarToggleIcon = React__default.createElement('span', { className: 'navbar-toggler-icon' });
var NavbarToggler = function NavbarToggler(props) {
var className = props.className,
cssModule = props.cssModule,
children = props.children,
right = props.right,
left = props.left,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'children', 'right', 'left', 'tag']);
var classes = mapToCssModules(classNames(className, 'navbar-toggler', right && 'navbar-toggler-right', left && 'navbar-toggler-left'), cssModule);
return React__default.createElement(
Tag,
_extends({}, attributes, { className: classes }),
children || navbarToggleIcon
);
};
NavbarToggler.propTypes = propTypes$5;
NavbarToggler.defaultProps = defaultProps$5;
var propTypes$6 = {
tabs: PropTypes.bool,
pills: PropTypes.bool,
vertical: PropTypes.bool,
navbar: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$6 = {
tag: 'ul'
};
var Nav = function Nav(props) {
var className = props.className,
cssModule = props.cssModule,
tabs = props.tabs,
pills = props.pills,
vertical = props.vertical,
navbar = props.navbar,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tabs', 'pills', 'vertical', 'navbar', 'tag']);
var classes = mapToCssModules(classNames(className, navbar ? 'navbar-nav' : 'nav', {
'nav-tabs': tabs,
'nav-pills': pills,
'flex-column': vertical
}), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Nav.propTypes = propTypes$6;
Nav.defaultProps = defaultProps$6;
var propTypes$7 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$7 = {
tag: 'li'
};
var NavItem = function NavItem(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'nav-item'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
NavItem.propTypes = propTypes$7;
NavItem.defaultProps = defaultProps$7;
var propTypes$10 = {
children: PropTypes.node.isRequired,
className: PropTypes.string,
arrow: PropTypes.string,
disabled: PropTypes.bool,
isOpen: PropTypes.bool.isRequired,
toggle: PropTypes.func.isRequired,
tether: PropTypes.object.isRequired,
tetherRef: PropTypes.func,
style: PropTypes.node,
cssModule: PropTypes.object
};
var defaultProps$10 = {
isOpen: false,
tetherRef: function tetherRef() {}
};
var TetherContent = function (_React$Component) {
inherits(TetherContent, _React$Component);
function TetherContent(props) {
classCallCheck(this, TetherContent);
var _this = possibleConstructorReturn(this, (TetherContent.__proto__ || Object.getPrototypeOf(TetherContent)).call(this, props));
_this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
_this.toggle = _this.toggle.bind(_this);
return _this;
}
createClass(TetherContent, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.handleProps();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (this.props.isOpen !== prevProps.isOpen) {
this.handleProps();
} else if (this._element) {
// rerender
this.renderIntoSubtree();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.hide();
}
}, {
key: 'getTarget',
value: function getTarget() {
var target = this.props.tether.target;
if (isFunction(target)) {
return target();
}
return target;
}
}, {
key: 'getTetherConfig',
value: function getTetherConfig() {
var config = _extends({}, this.props.tether);
config.element = this._element;
config.target = this.getTarget();
return config;
}
}, {
key: 'handleDocumentClick',
value: function handleDocumentClick(e) {
var container = this._element;
if (e.target === container || !container.contains(e.target)) {
this.toggle();
}
}
}, {
key: 'handleProps',
value: function handleProps() {
if (this.props.isOpen) {
this.show();
} else {
this.hide();
}
}
}, {
key: 'hide',
value: function hide() {
document.removeEventListener('click', this.handleDocumentClick, true);
if (this._element) {
document.body.removeChild(this._element);
ReactDOM.unmountComponentAtNode(this._element);
this._element = null;
}
if (this._tether) {
this._tether.destroy();
this._tether = null;
this.props.tetherRef(this._tether);
}
}
}, {
key: 'show',
value: function show() {
document.addEventListener('click', this.handleDocumentClick, true);
this._element = document.createElement('div');
this._element.className = this.props.className;
document.body.appendChild(this._element);
this.renderIntoSubtree();
this._tether = new Tether(this.getTetherConfig());
this.props.tetherRef(this._tether);
this._tether.position();
this._element.childNodes[0].focus();
}
}, {
key: 'toggle',
value: function toggle(e) {
if (this.props.disabled) {
return e && e.preventDefault();
}
return this.props.toggle();
}
}, {
key: 'renderIntoSubtree',
value: function renderIntoSubtree() {
ReactDOM.unstable_renderSubtreeIntoContainer(this, this.renderChildren(), this._element);
}
}, {
key: 'renderChildren',
value: function renderChildren() {
var _props = this.props,
children = _props.children,
style = _props.style;
return React__default.cloneElement(children, { style: style });
}
}, {
key: 'render',
value: function render() {
return null;
}
}]);
return TetherContent;
}(React__default.Component);
TetherContent.propTypes = propTypes$10;
TetherContent.defaultProps = defaultProps$10;
var propTypes$11 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
children: PropTypes.node.isRequired,
right: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$11 = {
tag: 'div'
};
var contextTypes = {
isOpen: PropTypes.bool.isRequired
};
var DropdownMenu = function DropdownMenu(props, context) {
var className = props.className,
cssModule = props.cssModule,
right = props.right,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'right', 'tag']);
var classes = mapToCssModules(classNames(className, 'dropdown-menu', { 'dropdown-menu-right': right }), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { tabIndex: '-1', 'aria-hidden': !context.isOpen, role: 'menu', className: classes }));
};
DropdownMenu.propTypes = propTypes$11;
DropdownMenu.defaultProps = defaultProps$11;
DropdownMenu.contextTypes = contextTypes;
/* eslint react/no-find-dom-node: 0 */
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
var propTypes$9 = {
disabled: PropTypes.bool,
dropup: PropTypes.bool,
group: PropTypes.bool,
isOpen: PropTypes.bool,
size: PropTypes.string,
tag: PropTypes.string,
tether: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]),
toggle: PropTypes.func,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$9 = {
isOpen: false,
tag: 'div'
};
var childContextTypes = {
toggle: PropTypes.func.isRequired,
isOpen: PropTypes.bool.isRequired
};
var defaultTetherConfig = {
classPrefix: 'bs-tether',
classes: { element: 'dropdown', enabled: 'show' },
constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
};
var Dropdown = function (_React$Component) {
inherits(Dropdown, _React$Component);
function Dropdown(props) {
classCallCheck(this, Dropdown);
var _this = possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, props));
_this.addEvents = _this.addEvents.bind(_this);
_this.getTetherConfig = _this.getTetherConfig.bind(_this);
_this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
_this.removeEvents = _this.removeEvents.bind(_this);
_this.toggle = _this.toggle.bind(_this);
return _this;
}
createClass(Dropdown, [{
key: 'getChildContext',
value: function getChildContext() {
return {
toggle: this.props.toggle,
isOpen: this.props.isOpen
};
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
this.handleProps();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (this.props.isOpen !== prevProps.isOpen) {
this.handleProps();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.removeEvents();
}
}, {
key: 'getTetherTarget',
value: function getTetherTarget() {
var container = ReactDOM.findDOMNode(this);
return container.querySelector('[data-toggle="dropdown"]');
}
}, {
key: 'getTetherConfig',
value: function getTetherConfig(childProps) {
var _this2 = this;
var target = function target() {
return _this2.getTetherTarget();
};
var vElementAttach = 'top';
var hElementAttach = 'left';
var vTargetAttach = 'bottom';
var hTargetAttach = 'left';
if (childProps.right) {
hElementAttach = 'right';
hTargetAttach = 'right';
}
if (this.props.dropup) {
vElementAttach = 'bottom';
vTargetAttach = 'top';
}
return _extends({}, defaultTetherConfig, {
attachment: vElementAttach + ' ' + hElementAttach,
targetAttachment: vTargetAttach + ' ' + hTargetAttach,
target: target
}, this.props.tether);
}
}, {
key: 'addEvents',
value: function addEvents() {
document.addEventListener('click', this.handleDocumentClick, true);
}
}, {
key: 'removeEvents',
value: function removeEvents() {
document.removeEventListener('click', this.handleDocumentClick, true);
}
}, {
key: 'handleDocumentClick',
value: function handleDocumentClick(e) {
var container = ReactDOM.findDOMNode(this);
if (container.contains(e.target) && container !== e.target) {
return;
}
this.toggle();
}
}, {
key: 'handleProps',
value: function handleProps() {
if (this.props.tether) {
return;
}
if (this.props.isOpen) {
this.addEvents();
} else {
this.removeEvents();
}
}
}, {
key: 'toggle',
value: function toggle(e) {
if (this.props.disabled) {
return e && e.preventDefault();
}
return this.props.toggle();
}
}, {
key: 'renderChildren',
value: function renderChildren() {
var _this3 = this;
var _props = this.props,
tether = _props.tether,
children = _props.children,
attrs = objectWithoutProperties(_props, ['tether', 'children']);
attrs.toggle = this.toggle;
return React__default.Children.map(React__default.Children.toArray(children), function (child) {
if (tether && child.type === DropdownMenu) {
var tetherConfig = _this3.getTetherConfig(child.props);
return React__default.createElement(
TetherContent,
_extends({}, attrs, { tether: tetherConfig }),
child
);
}
return child;
});
}
}, {
key: 'render',
value: function render() {
var _classNames;
var _omit = omit(this.props, ['toggle', 'tether']),
className = _omit.className,
cssModule = _omit.cssModule,
dropup = _omit.dropup,
group = _omit.group,
size = _omit.size,
Tag = _omit.tag,
isOpen = _omit.isOpen,
attributes = objectWithoutProperties(_omit, ['className', 'cssModule', 'dropup', 'group', 'size', 'tag', 'isOpen']);
var classes = mapToCssModules(classNames(className, (_classNames = {
'btn-group': group
}, defineProperty(_classNames, 'btn-group-' + size, !!size), defineProperty(_classNames, 'dropdown', !group), defineProperty(_classNames, 'show', isOpen), defineProperty(_classNames, 'dropup', dropup), _classNames)), cssModule);
return React__default.createElement(
Tag,
_extends({}, attributes, {
className: classes
}),
this.renderChildren()
);
}
}]);
return Dropdown;
}(React__default.Component);
Dropdown.propTypes = propTypes$9;
Dropdown.defaultProps = defaultProps$9;
Dropdown.childContextTypes = childContextTypes;
var propTypes$8 = {
children: PropTypes.node,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$8 = {
tag: 'li'
};
var NavDropdown = function NavDropdown(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'nav-item'), cssModule);
return React__default.createElement(Dropdown, _extends({}, attributes, { tag: Tag, className: classes }));
};
NavDropdown.propTypes = propTypes$8;
NavDropdown.defaultProps = defaultProps$8;
var propTypes$12 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
disabled: PropTypes.bool,
active: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object,
onClick: PropTypes.func,
href: PropTypes.any
};
var defaultProps$12 = {
tag: 'a'
};
var NavLink = function (_React$Component) {
inherits(NavLink, _React$Component);
function NavLink(props) {
classCallCheck(this, NavLink);
var _this = possibleConstructorReturn(this, (NavLink.__proto__ || Object.getPrototypeOf(NavLink)).call(this, props));
_this.onClick = _this.onClick.bind(_this);
return _this;
}
createClass(NavLink, [{
key: 'onClick',
value: function onClick(e) {
if (this.props.disabled) {
e.preventDefault();
return;
}
if (this.props.href === '#') {
e.preventDefault();
}
if (this.props.onClick) {
this.props.onClick(e);
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
className = _props.className,
cssModule = _props.cssModule,
active = _props.active,
Tag = _props.tag,
getRef = _props.getRef,
attributes = objectWithoutProperties(_props, ['className', 'cssModule', 'active', 'tag', 'getRef']);
var classes = mapToCssModules(classNames(className, 'nav-link', {
disabled: attributes.disabled,
active: active
}), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { ref: getRef, onClick: this.onClick, className: classes }));
}
}]);
return NavLink;
}(React__default.Component);
NavLink.propTypes = propTypes$12;
NavLink.defaultProps = defaultProps$12;
var propTypes$13 = {
tag: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$13 = {
tag: 'ol'
};
var Breadcrumb = function Breadcrumb(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'breadcrumb'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Breadcrumb.propTypes = propTypes$13;
Breadcrumb.defaultProps = defaultProps$13;
var propTypes$14 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
active: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$14 = {
tag: 'li'
};
var BreadcrumbItem = function BreadcrumbItem(props) {
var className = props.className,
cssModule = props.cssModule,
active = props.active,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'active', 'tag']);
var classes = mapToCssModules(classNames(className, active ? 'active' : false, 'breadcrumb-item'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
BreadcrumbItem.propTypes = propTypes$14;
BreadcrumbItem.defaultProps = defaultProps$14;
var propTypes$15 = {
active: PropTypes.bool,
block: PropTypes.bool,
color: PropTypes.string,
disabled: PropTypes.bool,
outline: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
onClick: PropTypes.func,
size: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$15 = {
color: 'secondary',
tag: 'button'
};
var Button = function (_React$Component) {
inherits(Button, _React$Component);
function Button(props) {
classCallCheck(this, Button);
var _this = possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).call(this, props));
_this.onClick = _this.onClick.bind(_this);
return _this;
}
createClass(Button, [{
key: 'onClick',
value: function onClick(e) {
if (this.props.disabled) {
e.preventDefault();
return;
}
if (this.props.onClick) {
this.props.onClick(e);
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
active = _props.active,
block = _props.block,
className = _props.className,
cssModule = _props.cssModule,
color = _props.color,
outline = _props.outline,
size = _props.size,
Tag = _props.tag,
getRef = _props.getRef,
attributes = objectWithoutProperties(_props, ['active', 'block', 'className', 'cssModule', 'color', 'outline', 'size', 'tag', 'getRef']);
var classes = mapToCssModules(classNames(className, 'btn', 'btn' + (outline ? '-outline' : '') + '-' + color, size ? 'btn-' + size : false, block ? 'btn-block' : false, { active: active, disabled: this.props.disabled }), cssModule);
if (attributes.href && Tag === 'button') {
Tag = 'a';
}
return React__default.createElement(Tag, _extends({
type: Tag === 'button' && attributes.onClick ? 'button' : undefined
}, attributes, {
className: classes,
ref: getRef,
onClick: this.onClick
}));
}
}]);
return Button;
}(React__default.Component);
Button.propTypes = propTypes$15;
Button.defaultProps = defaultProps$15;
var propTypes$16 = {
children: PropTypes.node
};
var ButtonDropdown = function ButtonDropdown(props) {
return React__default.createElement(Dropdown, _extends({ group: true }, props));
};
ButtonDropdown.propTypes = propTypes$16;
var propTypes$17 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
'aria-label': PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object,
role: PropTypes.string,
size: PropTypes.string,
vertical: PropTypes.bool
};
var defaultProps$16 = {
tag: 'div',
role: 'group'
};
var ButtonGroup = function ButtonGroup(props) {
var className = props.className,
cssModule = props.cssModule,
size = props.size,
vertical = props.vertical,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'size', 'vertical', 'tag']);
var classes = mapToCssModules(classNames(className, size ? 'btn-group-' + size : false, vertical ? 'btn-group-vertical' : 'btn-group'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ButtonGroup.propTypes = propTypes$17;
ButtonGroup.defaultProps = defaultProps$16;
var propTypes$18 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
'aria-label': PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object,
role: PropTypes.string
};
var defaultProps$17 = {
tag: 'div',
role: 'toolbar'
};
var ButtonToolbar = function ButtonToolbar(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'btn-toolbar'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ButtonToolbar.propTypes = propTypes$18;
ButtonToolbar.defaultProps = defaultProps$17;
var propTypes$19 = {
children: PropTypes.node,
disabled: PropTypes.bool,
divider: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
header: PropTypes.bool,
onClick: PropTypes.func,
className: PropTypes.string,
cssModule: PropTypes.object,
toggle: PropTypes.bool
};
var contextTypes$1 = {
toggle: PropTypes.func
};
var defaultProps$18 = {
tag: 'button',
toggle: true
};
var DropdownItem = function (_React$Component) {
inherits(DropdownItem, _React$Component);
function DropdownItem(props) {
classCallCheck(this, DropdownItem);
var _this = possibleConstructorReturn(this, (DropdownItem.__proto__ || Object.getPrototypeOf(DropdownItem)).call(this, props));
_this.onClick = _this.onClick.bind(_this);
_this.getTabIndex = _this.getTabIndex.bind(_this);
return _this;
}
createClass(DropdownItem, [{
key: 'onClick',
value: function onClick(e) {
if (this.props.disabled || this.props.header || this.props.divider) {
e.preventDefault();
return;
}
if (this.props.onClick) {
this.props.onClick(e);
}
if (this.props.toggle) {
this.context.toggle();
}
}
}, {
key: 'getTabIndex',
value: function getTabIndex() {
if (this.props.disabled || this.props.header || this.props.divider) {
return '-1';
}
return '0';
}
}, {
key: 'render',
value: function render() {
var tabIndex = this.getTabIndex();
var _omit = omit(this.props, ['toggle']),
className = _omit.className,
cssModule = _omit.cssModule,
divider = _omit.divider,
Tag = _omit.tag,
header = _omit.header,
props = objectWithoutProperties(_omit, ['className', 'cssModule', 'divider', 'tag', 'header']);
var classes = mapToCssModules(classNames(className, {
disabled: props.disabled,
'dropdown-item': !divider && !header,
'dropdown-header': header,
'dropdown-divider': divider
}), cssModule);
if (Tag === 'button') {
if (header) {
Tag = 'h6';
} else if (divider) {
Tag = 'div';
} else if (props.href) {
Tag = 'a';
}
}
return React__default.createElement(Tag, _extends({
type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined
}, props, {
tabIndex: tabIndex,
className: classes,
onClick: this.onClick
}));
}
}]);
return DropdownItem;
}(React__default.Component);
DropdownItem.propTypes = propTypes$19;
DropdownItem.defaultProps = defaultProps$18;
DropdownItem.contextTypes = contextTypes$1;
var propTypes$20 = {
caret: PropTypes.bool,
color: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
disabled: PropTypes.bool,
onClick: PropTypes.func,
'data-toggle': PropTypes.string,
'aria-haspopup': PropTypes.bool,
split: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
nav: PropTypes.bool
};
var defaultProps$19 = {
'data-toggle': 'dropdown',
'aria-haspopup': true,
color: 'secondary'
};
var contextTypes$2 = {
isOpen: PropTypes.bool.isRequired,
toggle: PropTypes.func.isRequired
};
var DropdownToggle = function (_React$Component) {
inherits(DropdownToggle, _React$Component);
function DropdownToggle(props) {
classCallCheck(this, DropdownToggle);
var _this = possibleConstructorReturn(this, (DropdownToggle.__proto__ || Object.getPrototypeOf(DropdownToggle)).call(this, props));
_this.onClick = _this.onClick.bind(_this);
return _this;
}
createClass(DropdownToggle, [{
key: 'onClick',
value: function onClick(e) {
if (this.props.disabled) {
e.preventDefault();
return;
}
if (this.props.nav && !this.props.tag) {
e.preventDefault();
}
if (this.props.onClick) {
this.props.onClick(e);
}
this.context.toggle();
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
className = _props.className,
cssModule = _props.cssModule,
caret = _props.caret,
split = _props.split,
nav = _props.nav,
tag = _props.tag,
props = objectWithoutProperties(_props, ['className', 'cssModule', 'caret', 'split', 'nav', 'tag']);
var ariaLabel = props['aria-label'] || 'Toggle Dropdown';
var classes = mapToCssModules(classNames(className, {
'dropdown-toggle': caret || split,
'dropdown-toggle-split': split,
active: this.context.isOpen,
'nav-link': nav
}), cssModule);
var children = props.children || React__default.createElement(
'span',
{ className: 'sr-only' },
ariaLabel
);
var Tag = void 0;
if (nav && !tag) {
Tag = 'a';
props.href = '#';
} else if (!tag) {
Tag = Button;
} else {
Tag = tag;
}
return React__default.createElement(Tag, _extends({}, props, {
className: classes,
onClick: this.onClick,
'aria-haspopup': 'true',
'aria-expanded': this.context.isOpen,
children: children
}));
}
}]);
return DropdownToggle;
}(React__default.Component);
DropdownToggle.propTypes = propTypes$20;
DropdownToggle.defaultProps = defaultProps$19;
DropdownToggle.contextTypes = contextTypes$2;
var propTypes$21 = {
baseClass: PropTypes.string,
baseClassIn: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object,
transitionAppearTimeout: PropTypes.number,
transitionEnterTimeout: PropTypes.number,
transitionLeaveTimeout: PropTypes.number,
transitionAppear: PropTypes.bool,
transitionEnter: PropTypes.bool,
transitionLeave: PropTypes.bool,
onLeave: PropTypes.func,
onEnter: PropTypes.func
};
var defaultProps$20 = {
tag: 'div',
baseClass: 'fade',
baseClassIn: 'show',
transitionAppearTimeout: 0,
transitionEnterTimeout: 0,
transitionLeaveTimeout: 0,
transitionAppear: true,
transitionEnter: true,
transitionLeave: true
};
var Fade = function (_React$Component) {
inherits(Fade, _React$Component);
function Fade(props) {
classCallCheck(this, Fade);
var _this = possibleConstructorReturn(this, (Fade.__proto__ || Object.getPrototypeOf(Fade)).call(this, props));
_this.state = {
mounted: !props.transitionAppear
};
_this.onLeave = _this.onLeave.bind(_this);
_this.onEnter = _this.onEnter.bind(_this);
_this.timers = [];
return _this;
}
createClass(Fade, [{
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.timers.forEach(function (timer) {
return clearTimeout(timer);
});
}
}, {
key: 'onEnter',
value: function onEnter(cb) {
var _this2 = this;
return function () {
cb();
if (_this2.props.onEnter) {
_this2.props.onEnter();
}
};
}
}, {
key: 'onLeave',
value: function onLeave(cb) {
var _this3 = this;
return function () {
cb();
if (_this3.props.onLeave) {
_this3.props.onLeave();
}
};
}
}, {
key: 'componentWillAppear',
value: function componentWillAppear(cb) {
if (!this.props.transitionAppear) {
this.onEnter(cb)();
}
this.timers.push(setTimeout(this.onEnter(cb), this.props.transitionAppearTimeout));
}
}, {
key: 'componentDidAppear',
value: function componentDidAppear() {
this.setState({
mounted: true
});
}
}, {
key: 'componentWillEnter',
value: function componentWillEnter(cb) {
if (!this.props.transitionEnter) {
this.onEnter(cb)();
}
this.timers.push(setTimeout(this.onEnter(cb), this.props.transitionEnterTimeout));
}
}, {
key: 'componentDidEnter',
value: function componentDidEnter() {
this.setState({
mounted: true
});
}
}, {
key: 'componentWillLeave',
value: function componentWillLeave(cb) {
this.setState({
mounted: false
});
if (!this.props.transitionLeave) {
this.onLeave(cb)();
}
this.timers.push(setTimeout(this.onLeave(cb), this.props.transitionLeaveTimeout));
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
baseClass = _props.baseClass,
baseClassIn = _props.baseClassIn,
className = _props.className,
cssModule = _props.cssModule,
Tag = _props.tag;
var attributes = omit(this.props, Object.keys(propTypes$21));
var classes = mapToCssModules(classNames(className, baseClass, this.state.mounted ? baseClassIn : false), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
}
}]);
return Fade;
}(React__default.Component);
Fade.propTypes = propTypes$21;
Fade.defaultProps = defaultProps$20;
var propTypes$22 = {
color: PropTypes.string,
pill: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$21 = {
color: 'default',
pill: false,
tag: 'span'
};
var Badge = function Badge(props) {
var className = props.className,
cssModule = props.cssModule,
color = props.color,
pill = props.pill,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'color', 'pill', 'tag']);
var classes = mapToCssModules(classNames(className, 'badge', 'badge-' + color, pill ? 'badge-pill' : false), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Badge.propTypes = propTypes$22;
Badge.defaultProps = defaultProps$21;
var propTypes$23 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
inverse: PropTypes.bool,
color: PropTypes.string,
block: PropTypes.bool,
outline: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$22 = {
tag: 'div'
};
var Card = function Card(props) {
var className = props.className,
cssModule = props.cssModule,
color = props.color,
block = props.block,
inverse = props.inverse,
outline = props.outline,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'color', 'block', 'inverse', 'outline', 'tag']);
var classes = mapToCssModules(classNames(className, 'card', inverse ? 'card-inverse' : false, block ? 'card-block' : false, color ? 'card' + (outline ? '-outline' : '') + '-' + color : false), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Card.propTypes = propTypes$23;
Card.defaultProps = defaultProps$22;
var propTypes$24 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$23 = {
tag: 'div'
};
var CardGroup = function CardGroup(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-group'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardGroup.propTypes = propTypes$24;
CardGroup.defaultProps = defaultProps$23;
var propTypes$25 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$24 = {
tag: 'div'
};
var CardDeck = function CardDeck(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-deck'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardDeck.propTypes = propTypes$25;
CardDeck.defaultProps = defaultProps$24;
var propTypes$26 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$25 = {
tag: 'div'
};
var CardColumns = function CardColumns(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-columns'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardColumns.propTypes = propTypes$26;
CardColumns.defaultProps = defaultProps$25;
var propTypes$27 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$26 = {
tag: 'div'
};
var CardBlock = function CardBlock(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-block'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardBlock.propTypes = propTypes$27;
CardBlock.defaultProps = defaultProps$26;
var propTypes$28 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$27 = {
tag: 'a'
};
var CardLink = function CardLink(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
getRef = props.getRef,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'getRef']);
var classes = mapToCssModules(classNames(className, 'card-link'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
};
CardLink.propTypes = propTypes$28;
CardLink.defaultProps = defaultProps$27;
var propTypes$29 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$28 = {
tag: 'div'
};
var CardFooter = function CardFooter(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-footer'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardFooter.propTypes = propTypes$29;
CardFooter.defaultProps = defaultProps$28;
var propTypes$30 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$29 = {
tag: 'div'
};
var CardHeader = function CardHeader(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-header'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardHeader.propTypes = propTypes$30;
CardHeader.defaultProps = defaultProps$29;
var propTypes$31 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
top: PropTypes.bool,
bottom: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$30 = {
tag: 'img'
};
var CardImg = function CardImg(props) {
var className = props.className,
cssModule = props.cssModule,
top = props.top,
bottom = props.bottom,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'top', 'bottom', 'tag']);
var cardImgClassName = 'card-img';
if (top) {
cardImgClassName = 'card-img-top';
}
if (bottom) {
cardImgClassName = 'card-img-bottom';
}
var classes = mapToCssModules(classNames(className, cardImgClassName), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardImg.propTypes = propTypes$31;
CardImg.defaultProps = defaultProps$30;
var propTypes$32 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$31 = {
tag: 'div'
};
var CardImgOverlay = function CardImgOverlay(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-img-overlay'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardImgOverlay.propTypes = propTypes$32;
CardImgOverlay.defaultProps = defaultProps$31;
var propTypes$33 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$32 = {
tag: 'h6'
};
var CardSubtitle = function CardSubtitle(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-subtitle'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardSubtitle.propTypes = propTypes$33;
CardSubtitle.defaultProps = defaultProps$32;
var propTypes$34 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$33 = {
tag: 'p'
};
var CardText = function CardText(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-text'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardText.propTypes = propTypes$34;
CardText.defaultProps = defaultProps$33;
var propTypes$35 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$34 = {
tag: 'h4'
};
var CardTitle = function CardTitle(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-title'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardTitle.propTypes = propTypes$35;
CardTitle.defaultProps = defaultProps$34;
var propTypes$36 = {
placement: PropTypes.oneOf(tetherAttachements),
target: PropTypes.string.isRequired,
isOpen: PropTypes.bool,
tether: PropTypes.object,
tetherRef: PropTypes.func,
className: PropTypes.string,
cssModule: PropTypes.object,
toggle: PropTypes.func
};
var defaultProps$35 = {
isOpen: false,
placement: 'bottom',
toggle: function toggle() {}
};
var defaultTetherConfig$1 = {
classPrefix: 'bs-tether',
classes: {
element: false,
enabled: 'show'
},
constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
};
var Popover = function (_React$Component) {
inherits(Popover, _React$Component);
function Popover(props) {
classCallCheck(this, Popover);
var _this = possibleConstructorReturn(this, (Popover.__proto__ || Object.getPrototypeOf(Popover)).call(this, props));
_this.getTetherConfig = _this.getTetherConfig.bind(_this);
return _this;
}
createClass(Popover, [{
key: 'getTetherConfig',
value: function getTetherConfig() {
var attachments = getTetherAttachments(this.props.placement);
return _extends({}, defaultTetherConfig$1, attachments, {
target: '#' + this.props.target
}, this.props.tether);
}
}, {
key: 'render',
value: function render() {
if (!this.props.isOpen) {
return null;
}
var tetherConfig = this.getTetherConfig();
var classes = mapToCssModules(classNames('popover-inner', this.props.className), this.props.cssModule);
var attributes = omit(this.props, Object.keys(propTypes$36));
return React__default.createElement(
TetherContent,
{
className: mapToCssModules('popover', this.props.cssModule),
tether: tetherConfig,
tetherRef: this.props.tetherRef,
isOpen: this.props.isOpen,
toggle: this.props.toggle
},
React__default.createElement('div', _extends({}, attributes, { className: classes }))
);
}
}]);
return Popover;
}(React__default.Component);
Popover.propTypes = propTypes$36;
Popover.defaultProps = defaultProps$35;
var propTypes$37 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$36 = {
tag: 'h3'
};
var PopoverTitle = function PopoverTitle(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'popover-title'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
PopoverTitle.propTypes = propTypes$37;
PopoverTitle.defaultProps = defaultProps$36;
var propTypes$38 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$37 = {
tag: 'div'
};
var PopoverContent = function PopoverContent(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'popover-content'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
PopoverContent.propTypes = propTypes$38;
PopoverContent.defaultProps = defaultProps$37;
var propTypes$39 = {
children: PropTypes.node,
bar: PropTypes.bool,
multi: PropTypes.bool,
tag: PropTypes.string,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
max: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
animated: PropTypes.bool,
striped: PropTypes.bool,
color: PropTypes.string,
className: PropTypes.string,
barClassName: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$38 = {
tag: 'div',
value: 0,
max: 100
};
var Progress = function Progress(props) {
var children = props.children,
className = props.className,
barClassName = props.barClassName,
cssModule = props.cssModule,
value = props.value,
max = props.max,
animated = props.animated,
striped = props.striped,
color = props.color,
bar = props.bar,
multi = props.multi,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['children', 'className', 'barClassName', 'cssModule', 'value', 'max', 'animated', 'striped', 'color', 'bar', 'multi', 'tag']);
var percent = toNumber(value) / toNumber(max) * 100;
var progressClasses = mapToCssModules(classNames(className, 'progress'), cssModule);
var progressBarClasses = mapToCssModules(classNames('progress-bar', bar ? className || barClassName : barClassName, animated ? 'progress-bar-animated' : null, color ? 'bg-' + color : null, striped || animated ? 'progress-bar-striped' : null), cssModule);
var ProgressBar = multi ? children : React__default.createElement('div', {
className: progressBarClasses,
style: { width: percent + '%' },
role: 'progressbar',
'aria-valuenow': value,
'aria-valuemin': '0',
'aria-valuemax': max,
children: children
});
if (bar) {
return ProgressBar;
}
return React__default.createElement(Tag, _extends({}, attributes, { className: progressClasses, children: ProgressBar }));
};
Progress.propTypes = propTypes$39;
Progress.defaultProps = defaultProps$38;
var propTypes$40 = {
isOpen: PropTypes.bool,
autoFocus: PropTypes.bool,
size: PropTypes.string,
toggle: PropTypes.func,
keyboard: PropTypes.bool,
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
onEnter: PropTypes.func,
onExit: PropTypes.func,
children: PropTypes.node,
className: PropTypes.string,
wrapClassName: PropTypes.string,
modalClassName: PropTypes.string,
backdropClassName: PropTypes.string,
contentClassName: PropTypes.string,
fade: PropTypes.bool,
cssModule: PropTypes.object,
zIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
backdropTransitionTimeout: PropTypes.number,
backdropTransitionAppearTimeout: PropTypes.number,
backdropTransitionEnterTimeout: PropTypes.number,
backdropTransitionLeaveTimeout: PropTypes.number,
modalTransitionTimeout: PropTypes.number,
modalTransitionAppearTimeout: PropTypes.number,
modalTransitionEnterTimeout: PropTypes.number,
modalTransitionLeaveTimeout: PropTypes.number
};
var defaultProps$39 = {
isOpen: false,
autoFocus: true,
backdrop: true,
keyboard: true,
zIndex: 1050,
fade: true,
modalTransitionTimeout: 300,
backdropTransitionTimeout: 150
};
var Modal = function (_React$Component) {
inherits(Modal, _React$Component);
function Modal(props) {
classCallCheck(this, Modal);
var _this = possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, props));
_this.originalBodyPadding = null;
_this.isBodyOverflowing = false;
_this.togglePortal = _this.togglePortal.bind(_this);
_this.handleBackdropClick = _this.handleBackdropClick.bind(_this);
_this.handleEscape = _this.handleEscape.bind(_this);
_this.destroy = _this.destroy.bind(_this);
_this.onEnter = _this.onEnter.bind(_this);
_this.onExit = _this.onExit.bind(_this);
return _this;
}
createClass(Modal, [{
key: 'componentDidMount',
value: function componentDidMount() {
if (this.props.isOpen) {
this.togglePortal();
}
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (this.props.isOpen !== prevProps.isOpen) {
// handle portal events/dom updates
this.togglePortal();
} else if (this._element) {
// rerender portal
this.renderIntoSubtree();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.onExit();
}
}, {
key: 'onEnter',
value: function onEnter() {
if (this.props.onEnter) {
this.props.onEnter();
}
}
}, {
key: 'onExit',
value: function onExit() {
this.destroy();
if (this.props.onExit) {
this.props.onExit();
}
}
}, {
key: 'handleEscape',
value: function handleEscape(e) {
if (this.props.keyboard && e.keyCode === 27 && this.props.toggle) {
this.props.toggle();
}
}
}, {
key: 'handleBackdropClick',
value: function handleBackdropClick(e) {
if (this.props.backdrop !== true) return;
var container = this._dialog;
if (e.target && !container.contains(e.target) && this.props.toggle) {
this.props.toggle();
}
}
}, {
key: 'hasTransition',
value: function hasTransition() {
if (this.props.fade === false) {
return false;
}
return this.props.modalTransitionTimeout > 0;
}
}, {
key: 'togglePortal',
value: function togglePortal() {
if (this.props.isOpen) {
if (this.props.autoFocus) {
this._focus = true;
}
this.show();
if (!this.hasTransition()) {
this.onEnter();
}
} else {
this.hide();
if (!this.hasTransition()) {
this.onExit();
}
}
}
}, {
key: 'destroy',
value: function destroy() {
if (this._element) {
ReactDOM.unmountComponentAtNode(this._element);
document.body.removeChild(this._element);
this._element = null;
}
// Use regex to prevent matching `modal-open` as part of a different class, e.g. `my-modal-opened`
var classes = document.body.className.replace(/(^| )modal-open( |$)/, ' ');
document.body.className = mapToCssModules(classNames(classes).trim(), this.props.cssModule);
setScrollbarWidth(this.originalBodyPadding);
}
}, {
key: 'hide',
value: function hide() {
this.renderIntoSubtree();
}
}, {
key: 'show',
value: function show() {
var classes = document.body.className;
this._element = document.createElement('div');
this._element.setAttribute('tabindex', '-1');
this._element.style.position = 'relative';
this._element.style.zIndex = this.props.zIndex;
this.originalBodyPadding = getOriginalBodyPadding();
conditionallyUpdateScrollbar();
document.body.appendChild(this._element);
document.body.className = mapToCssModules(classNames(classes, 'modal-open'), this.props.cssModule);
this.renderIntoSubtree();
}
}, {
key: 'renderModalDialog',
value: function renderModalDialog() {
var _this2 = this;
return React__default.createElement(
'div',
{
className: mapToCssModules(classNames('modal-dialog', this.props.className, defineProperty({}, 'modal-' + this.props.size, this.props.size)), this.props.cssModule),
role: 'document',
ref: function ref(c) {
return _this2._dialog = c;
}
},
React__default.createElement(
'div',
{
className: mapToCssModules(classNames('modal-content', this.props.contentClassName), this.props.cssModule)
},
this.props.children
)
);
}
}, {
key: 'renderIntoSubtree',
value: function renderIntoSubtree() {
ReactDOM.unstable_renderSubtreeIntoContainer(this, this.renderChildren(), this._element);
// check if modal should receive focus
if (this._focus) {
this._dialog.parentNode.focus();
this._focus = false;
}
}
}, {
key: 'renderChildren',
value: function renderChildren() {
var _props = this.props,
wrapClassName = _props.wrapClassName,
modalClassName = _props.modalClassName,
backdropClassName = _props.backdropClassName,
cssModule = _props.cssModule,
isOpen = _props.isOpen,
backdrop = _props.backdrop,
modalTransitionTimeout = _props.modalTransitionTimeout,
backdropTransitionTimeout = _props.backdropTransitionTimeout;
var modalAttributes = {
onClickCapture: this.handleBackdropClick,
onKeyUp: this.handleEscape,
style: { display: 'block' },
tabIndex: '-1'
};
if (this.hasTransition()) {
return React__default.createElement(
reactTransitionGroup.TransitionGroup,
{ component: 'div', className: mapToCssModules(wrapClassName) },
isOpen && React__default.createElement(
Fade,
_extends({
key: 'modal-dialog',
onEnter: this.onEnter,
onLeave: this.onExit,
transitionAppearTimeout: typeof this.props.modalTransitionAppearTimeout === 'number' ? this.props.modalTransitionAppearTimeout : modalTransitionTimeout,
transitionEnterTimeout: typeof this.props.modalTransitionEnterTimeout === 'number' ? this.props.modalTransitionEnterTimeout : modalTransitionTimeout,
transitionLeaveTimeout: typeof this.props.modalTransitionLeaveTimeout === 'number' ? this.props.modalTransitionLeaveTimeout : modalTransitionTimeout,
cssModule: cssModule,
className: mapToCssModules(classNames('modal', modalClassName), cssModule)
}, modalAttributes),
this.renderModalDialog()
),
isOpen && backdrop && React__default.createElement(Fade, {
key: 'modal-backdrop',
transitionAppearTimeout: typeof this.props.backdropTransitionAppearTimeout === 'number' ? this.props.backdropTransitionAppearTimeout : backdropTransitionTimeout,
transitionEnterTimeout: typeof this.props.backdropTransitionEnterTimeout === 'number' ? this.props.backdropTransitionEnterTimeout : backdropTransitionTimeout,
transitionLeaveTimeout: typeof this.props.backdropTransitionLeaveTimeout === 'number' ? this.props.backdropTransitionLeaveTimeout : backdropTransitionTimeout,
cssModule: cssModule,
className: mapToCssModules(classNames('modal-backdrop', backdropClassName), cssModule)
})
);
}
return React__default.createElement(
'div',
{ className: mapToCssModules(wrapClassName) },
isOpen && React__default.createElement(
'div',
_extends({
className: mapToCssModules(classNames('modal', 'show', modalClassName), cssModule)
}, modalAttributes),
this.renderModalDialog()
),
isOpen && backdrop && React__default.createElement('div', {
className: mapToCssModules(classNames('modal-backdrop', 'show', backdropClassName), cssModule)
})
);
}
}, {
key: 'render',
value: function render() {
return null;
}
}]);
return Modal;
}(React__default.Component);
Modal.propTypes = propTypes$40;
Modal.defaultProps = defaultProps$39;
var propTypes$41 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
wrapTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
toggle: PropTypes.func,
className: PropTypes.string,
cssModule: PropTypes.object,
children: PropTypes.node
};
var defaultProps$40 = {
tag: 'h4',
wrapTag: 'div'
};
var ModalHeader = function ModalHeader(props) {
var closeButton = void 0;
var className = props.className,
cssModule = props.cssModule,
children = props.children,
toggle = props.toggle,
Tag = props.tag,
WrapTag = props.wrapTag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'children', 'toggle', 'tag', 'wrapTag']);
var classes = mapToCssModules(classNames(className, 'modal-header'), cssModule);
if (toggle) {
closeButton = React__default.createElement(
'button',
{ type: 'button', onClick: toggle, className: 'close', 'aria-label': 'Close' },
React__default.createElement(
'span',
{ 'aria-hidden': 'true' },
String.fromCharCode(215)
)
);
}
return React__default.createElement(
WrapTag,
_extends({}, attributes, { className: classes }),
React__default.createElement(
Tag,
{ className: mapToCssModules('modal-title', cssModule) },
children
),
closeButton
);
};
ModalHeader.propTypes = propTypes$41;
ModalHeader.defaultProps = defaultProps$40;
var propTypes$42 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$41 = {
tag: 'div'
};
var ModalBody = function ModalBody(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'modal-body'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ModalBody.propTypes = propTypes$42;
ModalBody.defaultProps = defaultProps$41;
var propTypes$43 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$42 = {
tag: 'div'
};
var ModalFooter = function ModalFooter(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'modal-footer'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ModalFooter.propTypes = propTypes$43;
ModalFooter.defaultProps = defaultProps$42;
var propTypes$44 = {
placement: PropTypes.oneOf(tetherAttachements),
target: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
isOpen: PropTypes.bool,
disabled: PropTypes.bool,
tether: PropTypes.object,
tetherRef: PropTypes.func,
className: PropTypes.string,
cssModule: PropTypes.object,
toggle: PropTypes.func,
autohide: PropTypes.bool,
delay: PropTypes.oneOfType([PropTypes.shape({ show: PropTypes.number, hide: PropTypes.number }), PropTypes.number])
};
var DEFAULT_DELAYS = {
show: 0,
hide: 250
};
var defaultProps$43 = {
isOpen: false,
placement: 'bottom',
delay: DEFAULT_DELAYS,
autohide: true,
toggle: function toggle() {}
};
var defaultTetherConfig$2 = {
classPrefix: 'bs-tether',
classes: {
element: false,
enabled: 'show'
},
constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
};
var Tooltip = function (_React$Component) {
inherits(Tooltip, _React$Component);
function Tooltip(props) {
classCallCheck(this, Tooltip);
var _this = possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, props));
_this.addTargetEvents = _this.addTargetEvents.bind(_this);
_this.getTarget = _this.getTarget.bind(_this);
_this.getTetherConfig = _this.getTetherConfig.bind(_this);
_this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
_this.removeTargetEvents = _this.removeTargetEvents.bind(_this);
_this.toggle = _this.toggle.bind(_this);
_this.onMouseOverTooltip = _this.onMouseOverTooltip.bind(_this);
_this.onMouseLeaveTooltip = _this.onMouseLeaveTooltip.bind(_this);
_this.onMouseOverTooltipContent = _this.onMouseOverTooltipContent.bind(_this);
_this.onMouseLeaveTooltipContent = _this.onMouseLeaveTooltipContent.bind(_this);
_this.show = _this.show.bind(_this);
_this.hide = _this.hide.bind(_this);
return _this;
}
createClass(Tooltip, [{
key: 'componentDidMount',
value: function componentDidMount() {
this._target = this.getTarget();
this.addTargetEvents();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.removeTargetEvents();
}
}, {
key: 'onMouseOverTooltip',
value: function onMouseOverTooltip() {
if (this._hideTimeout) {
this.clearHideTimeout();
}
this._showTimeout = setTimeout(this.show, this.getDelay('show'));
}
}, {
key: 'onMouseLeaveTooltip',
value: function onMouseLeaveTooltip() {
if (this._showTimeout) {
this.clearShowTimeout();
}
this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));
}
}, {
key: 'onMouseOverTooltipContent',
value: function onMouseOverTooltipContent() {
if (this.props.autohide) {
return;
}
if (this._hideTimeout) {
this.clearHideTimeout();
}
}
}, {
key: 'onMouseLeaveTooltipContent',
value: function onMouseLeaveTooltipContent() {
if (this.props.autohide) {
return;
}
if (this._showTimeout) {
this.clearShowTimeout();
}
this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));
}
}, {
key: 'getDelay',
value: function getDelay(key) {
var delay = this.props.delay;
if ((typeof delay === 'undefined' ? 'undefined' : _typeof(delay)) === 'object') {
return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];
}
return delay;
}
}, {
key: 'getTarget',
value: function getTarget() {
var target = this.props.target;
if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object') {
return target;
}
return document.getElementById(target);
}
}, {
key: 'getTetherConfig',
value: function getTetherConfig() {
var attachments = getTetherAttachments(this.props.placement);
return _extends({}, defaultTetherConfig$2, attachments, {
target: this.getTarget
}, this.props.tether);
}
}, {
key: 'show',
value: function show() {
if (!this.props.isOpen) {
this.clearShowTimeout();
this.toggle();
}
}
}, {
key: 'hide',
value: function hide() {
if (this.props.isOpen) {
this.clearHideTimeout();
this.toggle();
}
}
}, {
key: 'clearShowTimeout',
value: function clearShowTimeout() {
clearTimeout(this._showTimeout);
this._showTimeout = undefined;
}
}, {
key: 'clearHideTimeout',
value: function clearHideTimeout() {
clearTimeout(this._hideTimeout);
this._hideTimeout = undefined;
}
}, {
key: 'handleDocumentClick',
value: function handleDocumentClick(e) {
if (e.target === this._target || this._target.contains(e.target)) {
if (this._hideTimeout) {
this.clearHideTimeout();
}
if (!this.props.isOpen) {
this.toggle();
}
}
}
}, {
key: 'addTargetEvents',
value: function addTargetEvents() {
this._target.addEventListener('mouseover', this.onMouseOverTooltip, true);
this._target.addEventListener('mouseout', this.onMouseLeaveTooltip, true);
document.addEventListener('click', this.handleDocumentClick, true);
}
}, {
key: 'removeTargetEvents',
value: function removeTargetEvents() {
this._target.removeEventListener('mouseover', this.onMouseOverTooltip, true);
this._target.removeEventListener('mouseout', this.onMouseLeaveTooltip, true);
document.removeEventListener('click', this.handleDocumentClick, true);
}
}, {
key: 'toggle',
value: function toggle(e) {
if (this.props.disabled) {
return e && e.preventDefault();
}
return this.props.toggle();
}
}, {
key: 'render',
value: function render() {
if (!this.props.isOpen) {
return null;
}
var attributes = omit(this.props, Object.keys(propTypes$44));
var classes = mapToCssModules(classNames('tooltip-inner', this.props.className), this.props.cssModule);
var tetherConfig = this.getTetherConfig();
return React__default.createElement(
TetherContent,
{
className: 'tooltip',
tether: tetherConfig,
tetherRef: this.props.tetherRef,
isOpen: this.props.isOpen,
toggle: this.toggle
},
React__default.createElement('div', _extends({}, attributes, {
className: classes,
onMouseOver: this.onMouseOverTooltipContent,
onMouseLeave: this.onMouseLeaveTooltipContent
}))
);
}
}]);
return Tooltip;
}(React__default.Component);
Tooltip.propTypes = propTypes$44;
Tooltip.defaultProps = defaultProps$43;
var propTypes$45 = {
className: PropTypes.string,
cssModule: PropTypes.object,
size: PropTypes.string,
bordered: PropTypes.bool,
striped: PropTypes.bool,
inverse: PropTypes.bool,
hover: PropTypes.bool,
reflow: PropTypes.bool,
responsive: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
responsiveTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
var defaultProps$44 = {
tag: 'table',
responsiveTag: 'div'
};
var Table = function Table(props) {
var className = props.className,
cssModule = props.cssModule,
size = props.size,
bordered = props.bordered,
striped = props.striped,
inverse = props.inverse,
hover = props.hover,
reflow = props.reflow,
responsive = props.responsive,
Tag = props.tag,
ResponsiveTag = props.responsiveTag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'size', 'bordered', 'striped', 'inverse', 'hover', 'reflow', 'responsive', 'tag', 'responsiveTag']);
var classes = mapToCssModules(classNames(className, 'table', size ? 'table-' + size : false, bordered ? 'table-bordered' : false, striped ? 'table-striped' : false, inverse ? 'table-inverse' : false, hover ? 'table-hover' : false, reflow ? 'table-reflow' : false), cssModule);
var table = React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
if (responsive) {
return React__default.createElement(
ResponsiveTag,
{ className: 'table-responsive' },
table
);
}
return table;
};
Table.propTypes = propTypes$45;
Table.defaultProps = defaultProps$44;
var propTypes$46 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
flush: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$45 = {
tag: 'ul'
};
var ListGroup = function ListGroup(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
flush = props.flush,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'flush']);
var classes = mapToCssModules(classNames(className, 'list-group', flush ? 'list-group-flush' : false), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ListGroup.propTypes = propTypes$46;
ListGroup.defaultProps = defaultProps$45;
var propTypes$47 = {
children: PropTypes.node,
inline: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$46 = {
tag: 'form'
};
var Form = function Form(props) {
var className = props.className,
cssModule = props.cssModule,
inline = props.inline,
Tag = props.tag,
getRef = props.getRef,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'inline', 'tag', 'getRef']);
var classes = mapToCssModules(classNames(className, inline ? 'form-inline' : false), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
};
Form.propTypes = propTypes$47;
Form.defaultProps = defaultProps$46;
var propTypes$48 = {
children: PropTypes.node,
tag: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$47 = {
tag: 'div'
};
var FormFeedback = function FormFeedback(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'form-control-feedback'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
FormFeedback.propTypes = propTypes$48;
FormFeedback.defaultProps = defaultProps$47;
var propTypes$49 = {
children: PropTypes.node,
row: PropTypes.bool,
check: PropTypes.bool,
disabled: PropTypes.bool,
tag: PropTypes.string,
color: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$48 = {
tag: 'div'
};
var FormGroup = function FormGroup(props) {
var className = props.className,
cssModule = props.cssModule,
row = props.row,
disabled = props.disabled,
color = props.color,
check = props.check,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'row', 'disabled', 'color', 'check', 'tag']);
var classes = mapToCssModules(classNames(className, color ? 'has-' + color : false, row ? 'row' : false, check ? 'form-check' : 'form-group', check && disabled ? 'disabled' : false), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
FormGroup.propTypes = propTypes$49;
FormGroup.defaultProps = defaultProps$48;
var propTypes$50 = {
children: PropTypes.node,
inline: PropTypes.bool,
tag: PropTypes.string,
color: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$49 = {
tag: 'small'
};
var FormText = function FormText(props) {
var className = props.className,
cssModule = props.cssModule,
inline = props.inline,
color = props.color,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'inline', 'color', 'tag']);
var classes = mapToCssModules(classNames(className, !inline ? 'form-text' : false, color ? 'text-' + color : false), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
FormText.propTypes = propTypes$50;
FormText.defaultProps = defaultProps$49;
/* eslint react/prefer-stateless-function: 0 */
var propTypes$51 = {
children: PropTypes.node,
type: PropTypes.string,
size: PropTypes.string,
state: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
static: PropTypes.bool,
addon: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$50 = {
tag: 'p',
type: 'text'
};
var Input = function (_React$Component) {
inherits(Input, _React$Component);
function Input() {
classCallCheck(this, Input);
return possibleConstructorReturn(this, (Input.__proto__ || Object.getPrototypeOf(Input)).apply(this, arguments));
}
createClass(Input, [{
key: 'render',
value: function render() {
var _props = this.props,
className = _props.className,
cssModule = _props.cssModule,
type = _props.type,
size = _props.size,
state = _props.state,
tag = _props.tag,
addon = _props.addon,
staticInput = _props.static,
getRef = _props.getRef,
attributes = objectWithoutProperties(_props, ['className', 'cssModule', 'type', 'size', 'state', 'tag', 'addon', 'static', 'getRef']);
var checkInput = ['radio', 'checkbox'].indexOf(type) > -1;
var fileInput = type === 'file';
var textareaInput = type === 'textarea';
var selectInput = type === 'select';
var Tag = selectInput || textareaInput ? type : 'input';
var formControlClass = 'form-control';
if (staticInput) {
formControlClass = formControlClass + '-static';
Tag = tag;
} else if (fileInput) {
formControlClass = formControlClass + '-file';
} else if (checkInput) {
if (addon) {
formControlClass = null;
} else {
formControlClass = 'form-check-input';
}
}
var classes = mapToCssModules(classNames(className, state ? 'form-control-' + state : false, size ? 'form-control-' + size : false, formControlClass), cssModule);
if (Tag === 'input') {
attributes.type = type;
}
return React__default.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
}
}]);
return Input;
}(React__default.Component);
Input.propTypes = propTypes$51;
Input.defaultProps = defaultProps$50;
var propTypes$52 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
size: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$51 = {
tag: 'div'
};
var InputGroup = function InputGroup(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
size = props.size,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'size']);
var classes = mapToCssModules(classNames(className, 'input-group', size ? 'input-group-' + size : null), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
InputGroup.propTypes = propTypes$52;
InputGroup.defaultProps = defaultProps$51;
var propTypes$53 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$52 = {
tag: 'div'
};
var InputGroupAddon = function InputGroupAddon(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'input-group-addon'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
InputGroupAddon.propTypes = propTypes$53;
InputGroupAddon.defaultProps = defaultProps$52;
var propTypes$54 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
children: PropTypes.node,
groupClassName: PropTypes.string,
groupAttributes: PropTypes.object,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$53 = {
tag: 'div'
};
var InputGroupButton = function InputGroupButton(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
children = props.children,
groupClassName = props.groupClassName,
groupAttributes = props.groupAttributes,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'children', 'groupClassName', 'groupAttributes']);
if (typeof children === 'string') {
var groupClasses = mapToCssModules(classNames(groupClassName, 'input-group-btn'), cssModule);
return React__default.createElement(
Tag,
_extends({}, groupAttributes, { className: groupClasses }),
React__default.createElement(Button, _extends({}, attributes, { className: className, children: children }))
);
}
var classes = mapToCssModules(classNames(className, 'input-group-btn'), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes, children: children }));
};
InputGroupButton.propTypes = propTypes$54;
InputGroupButton.defaultProps = defaultProps$53;
var colSizes = ['xs', 'sm', 'md', 'lg', 'xl'];
var stringOrNumberProp$1 = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);
var columnProps$1 = PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.shape({
size: stringOrNumberProp$1,
push: stringOrNumberProp$1,
pull: stringOrNumberProp$1,
offset: stringOrNumberProp$1
})]);
var propTypes$55 = {
children: PropTypes.node,
hidden: PropTypes.bool,
check: PropTypes.bool,
inline: PropTypes.bool,
disabled: PropTypes.bool,
size: PropTypes.string,
for: PropTypes.string,
tag: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object,
xs: columnProps$1,
sm: columnProps$1,
md: columnProps$1,
lg: columnProps$1,
xl: columnProps$1
};
var defaultProps$54 = {
tag: 'label'
};
var Label = function Label(props) {
var className = props.className,
cssModule = props.cssModule,
hidden = props.hidden,
Tag = props.tag,
check = props.check,
inline = props.inline,
disabled = props.disabled,
size = props.size,
htmlFor = props.for,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'hidden', 'tag', 'check', 'inline', 'disabled', 'size', 'for']);
var colClasses = [];
colSizes.forEach(function (colSize) {
var columnProp = props[colSize];
delete attributes[colSize];
if (columnProp && columnProp.size) {
var _classNames;
colClasses.push(mapToCssModules(classNames((_classNames = {}, defineProperty(_classNames, 'col-' + colSize + '-' + columnProp.size, columnProp.size), defineProperty(_classNames, 'push-' + colSize + '-' + columnProp.push, columnProp.push), defineProperty(_classNames, 'pull-' + colSize + '-' + columnProp.pull, columnProp.pull), defineProperty(_classNames, 'offset-' + colSize + '-' + columnProp.offset, columnProp.offset), _classNames))), cssModule);
} else if (columnProp) {
colClasses.push('col-' + colSize + '-' + columnProp);
}
});
var classes = mapToCssModules(classNames(className, hidden ? 'sr-only' : false, check ? 'form-check-' + (inline ? 'inline' : 'label') : false, check && inline && disabled ? 'disabled' : false, size ? 'col-form-label-' + size : false, colClasses, colClasses.length ? 'col-form-label' : false), cssModule);
return React__default.createElement(Tag, _extends({ htmlFor: htmlFor }, attributes, { className: classes }));
};
Label.propTypes = propTypes$55;
Label.defaultProps = defaultProps$54;
var propTypes$56 = {
body: PropTypes.bool,
bottom: PropTypes.bool,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
heading: PropTypes.bool,
left: PropTypes.bool,
list: PropTypes.bool,
middle: PropTypes.bool,
object: PropTypes.bool,
right: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
top: PropTypes.bool
};
var Media = function Media(props) {
var body = props.body,
bottom = props.bottom,
className = props.className,
cssModule = props.cssModule,
heading = props.heading,
left = props.left,
list = props.list,
middle = props.middle,
object = props.object,
right = props.right,
tag = props.tag,
top = props.top,
attributes = objectWithoutProperties(props, ['body', 'bottom', 'className', 'cssModule', 'heading', 'left', 'list', 'middle', 'object', 'right', 'tag', 'top']);
var defaultTag = void 0;
if (heading) {
defaultTag = 'h4';
} else if (left || right) {
defaultTag = 'a';
} else if (object) {
defaultTag = 'img';
} else if (list) {
defaultTag = 'ul';
} else {
defaultTag = 'div';
}
var Tag = tag || defaultTag;
var classes = mapToCssModules(classNames(className, {
'media-body': body,
'media-heading': heading,
'media-left': left,
'media-right': right,
'media-top': top,
'media-bottom': bottom,
'media-middle': middle,
'media-object': object,
'media-list': list,
media: !body && !heading && !left && !right && !top && !bottom && !middle && !object && !list
}), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Media.propTypes = propTypes$56;
var propTypes$57 = {
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
size: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
var defaultProps$55 = {
tag: 'ul'
};
var Pagination = function Pagination(props) {
var className = props.className,
cssModule = props.cssModule,
size = props.size,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'size', 'tag']);
var classes = mapToCssModules(classNames(className, 'pagination', defineProperty({}, 'pagination-' + size, !!size)), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Pagination.propTypes = propTypes$57;
Pagination.defaultProps = defaultProps$55;
var propTypes$58 = {
active: PropTypes.bool,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
disabled: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
var defaultProps$56 = {
tag: 'li'
};
var PaginationItem = function PaginationItem(props) {
var active = props.active,
className = props.className,
cssModule = props.cssModule,
disabled = props.disabled,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['active', 'className', 'cssModule', 'disabled', 'tag']);
var classes = mapToCssModules(classNames(className, 'page-item', {
active: active,
disabled: disabled
}), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
PaginationItem.propTypes = propTypes$58;
PaginationItem.defaultProps = defaultProps$56;
var propTypes$59 = {
'aria-label': PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
next: PropTypes.bool,
previous: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
var defaultProps$57 = {
tag: 'a'
};
var PaginationLink = function PaginationLink(props) {
var className = props.className,
cssModule = props.cssModule,
next = props.next,
previous = props.previous,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'next', 'previous', 'tag']);
var classes = mapToCssModules(classNames(className, 'page-link'), cssModule);
var defaultAriaLabel = void 0;
if (previous) {
defaultAriaLabel = 'Previous';
} else if (next) {
defaultAriaLabel = 'Next';
}
var ariaLabel = props['aria-label'] || defaultAriaLabel;
var defaultCaret = void 0;
if (previous) {
defaultCaret = '\xAB';
} else if (next) {
defaultCaret = '\xBB';
}
var children = props.children;
if (previous || next) {
children = [React__default.createElement(
'span',
{
'aria-hidden': 'true',
key: 'caret'
},
children || defaultCaret
), React__default.createElement(
'span',
{
className: 'sr-only',
key: 'sr'
},
ariaLabel
)];
}
return React__default.createElement(
Tag,
_extends({}, attributes, {
className: classes,
'aria-label': ariaLabel
}),
children
);
};
PaginationLink.propTypes = propTypes$59;
PaginationLink.defaultProps = defaultProps$57;
var propTypes$60 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
activeTab: PropTypes.any,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$58 = {
tag: 'div'
};
var childContextTypes$1 = {
activeTabId: PropTypes.any
};
var TabContent = function (_Component) {
inherits(TabContent, _Component);
function TabContent(props) {
classCallCheck(this, TabContent);
var _this = possibleConstructorReturn(this, (TabContent.__proto__ || Object.getPrototypeOf(TabContent)).call(this, props));
_this.state = {
activeTab: _this.props.activeTab
};
return _this;
}
createClass(TabContent, [{
key: 'getChildContext',
value: function getChildContext() {
return {
activeTabId: this.state.activeTab
};
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.state.activeTab !== nextProps.activeTab) {
this.setState({
activeTab: nextProps.activeTab
});
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
className = _props.className,
cssModule = _props.cssModule,
Tag = _props.tag;
var attributes = omit(this.props, Object.keys(propTypes$60));
var classes = mapToCssModules(classNames('tab-content', className), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
}
}]);
return TabContent;
}(React.Component);
TabContent.propTypes = propTypes$60;
TabContent.defaultProps = defaultProps$58;
TabContent.childContextTypes = childContextTypes$1;
var propTypes$61 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object,
tabId: PropTypes.any
};
var defaultProps$59 = {
tag: 'div'
};
var contextTypes$3 = {
activeTabId: PropTypes.any
};
function TabPane(props, context) {
var className = props.className,
cssModule = props.cssModule,
tabId = props.tabId,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tabId', 'tag']);
var classes = mapToCssModules(classNames('tab-pane', className, { active: tabId === context.activeTabId }), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
}
TabPane.propTypes = propTypes$61;
TabPane.defaultProps = defaultProps$59;
TabPane.contextTypes = contextTypes$3;
var propTypes$62 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
fluid: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$60 = {
tag: 'div'
};
var Jumbotron = function Jumbotron(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
fluid = props.fluid,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'fluid']);
var classes = mapToCssModules(classNames(className, 'jumbotron', fluid ? 'jumbotron-fluid' : false), cssModule);
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Jumbotron.propTypes = propTypes$62;
Jumbotron.defaultProps = defaultProps$60;
var FirstChild = function FirstChild(_ref) {
var children = _ref.children;
return React__default.Children.toArray(children)[0] || null;
};
var propTypes$63 = {
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
color: PropTypes.string,
isOpen: PropTypes.bool,
toggle: PropTypes.func,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
transitionAppearTimeout: PropTypes.number,
transitionEnterTimeout: PropTypes.number,
transitionLeaveTimeout: PropTypes.number
};
var defaultProps$61 = {
color: 'success',
isOpen: true,
tag: 'div',
transitionAppearTimeout: 150,
transitionEnterTimeout: 150,
transitionLeaveTimeout: 150
};
var Alert = function Alert(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
color = props.color,
isOpen = props.isOpen,
toggle = props.toggle,
children = props.children,
transitionAppearTimeout = props.transitionAppearTimeout,
transitionEnterTimeout = props.transitionEnterTimeout,
transitionLeaveTimeout = props.transitionLeaveTimeout,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'color', 'isOpen', 'toggle', 'children', 'transitionAppearTimeout', 'transitionEnterTimeout', 'transitionLeaveTimeout']);
var classes = mapToCssModules(classNames(className, 'alert', 'alert-' + color, { 'alert-dismissible': toggle }), cssModule);
var alert = React__default.createElement(
Tag,
_extends({}, attributes, { className: classes, role: 'alert' }),
toggle ? React__default.createElement(
'button',
{ type: 'button', className: 'close', 'aria-label': 'Close', onClick: toggle },
React__default.createElement(
'span',
{ 'aria-hidden': 'true' },
'\xD7'
)
) : null,
children
);
return React__default.createElement(
reactTransitionGroup.CSSTransitionGroup,
{
component: FirstChild,
transitionName: {
appear: 'fade',
appearActive: 'show',
enter: 'fade',
enterActive: 'show',
leave: 'fade',
leaveActive: 'out'
},
transitionAppear: transitionAppearTimeout > 0,
transitionAppearTimeout: transitionAppearTimeout,
transitionEnter: transitionEnterTimeout > 0,
transitionEnterTimeout: transitionEnterTimeout,
transitionLeave: transitionLeaveTimeout > 0,
transitionLeaveTimeout: transitionLeaveTimeout
},
isOpen ? alert : null
);
};
Alert.propTypes = propTypes$63;
Alert.defaultProps = defaultProps$61;
var SHOW = 'SHOW';
var SHOWN = 'SHOWN';
var HIDE = 'HIDE';
var HIDDEN = 'HIDDEN';
var propTypes$64 = {
isOpen: PropTypes.bool,
className: PropTypes.node,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
cssModule: PropTypes.object,
navbar: PropTypes.bool,
delay: PropTypes.oneOfType([PropTypes.shape({ show: PropTypes.number, hide: PropTypes.number }), PropTypes.number]),
onOpened: PropTypes.func,
onClosed: PropTypes.func
};
var DEFAULT_DELAYS$1 = {
show: 350,
hide: 350
};
var defaultProps$62 = {
isOpen: false,
tag: 'div',
delay: DEFAULT_DELAYS$1,
onOpened: function onOpened() {},
onClosed: function onClosed() {}
};
var Collapse = function (_Component) {
inherits(Collapse, _Component);
function Collapse(props) {
classCallCheck(this, Collapse);
var _this = possibleConstructorReturn(this, (Collapse.__proto__ || Object.getPrototypeOf(Collapse)).call(this, props));
_this.state = {
collapse: props.isOpen ? SHOWN : HIDDEN,
height: null
};
_this.element = null;
return _this;
}
createClass(Collapse, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var _this2 = this;
var willOpen = nextProps.isOpen;
var collapse = this.state.collapse;
if (willOpen && collapse === HIDDEN) {
// will open
this.setState({ collapse: SHOW }, function () {
// the height transition will work after class "collapsing" applied
_this2.setState({ height: _this2.getHeight() });
_this2.transitionTag = setTimeout(function () {
_this2.setState({
collapse: SHOWN,
height: null
});
}, _this2.getDelay('show'));
});
} else if (!willOpen && collapse === SHOWN) {
// will hide
this.setState({ height: this.getHeight() }, function () {
_this2.setState({
collapse: HIDE,
height: _this2.getHeight()
}, function () {
_this2.setState({ height: 0 });
});
});
this.transitionTag = setTimeout(function () {
_this2.setState({
collapse: HIDDEN,
height: null
});
}, this.getDelay('hide'));
}
// else: do nothing.
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState) {
if (this.state.collapse === SHOWN && prevState && prevState.collapse !== SHOWN) {
this.props.onOpened();
}
if (this.state.collapse === HIDDEN && prevState && prevState.collapse !== HIDDEN) {
this.props.onClosed();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
clearTimeout(this.transitionTag);
}
}, {
key: 'getDelay',
value: function getDelay(key) {
var delay = this.props.delay;
if ((typeof delay === 'undefined' ? 'undefined' : _typeof(delay)) === 'object') {
return isNaN(delay[key]) ? DEFAULT_DELAYS$1[key] : delay[key];
}
return delay;
}
}, {
key: 'getHeight',
value: function getHeight() {
return this.element.scrollHeight;
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
var _omit = omit(this.props, ['isOpen', 'delay', 'onOpened', 'onClosed']),
navbar = _omit.navbar,
className = _omit.className,
cssModule = _omit.cssModule,
Tag = _omit.tag,
attributes = objectWithoutProperties(_omit, ['navbar', 'className', 'cssModule', 'tag']);
var _state = this.state,
collapse = _state.collapse,
height = _state.height;
var collapseClass = void 0;
switch (collapse) {
case SHOW:
collapseClass = 'collapsing';
break;
case SHOWN:
collapseClass = 'collapse show';
break;
case HIDE:
collapseClass = 'collapsing';
break;
case HIDDEN:
collapseClass = 'collapse';
break;
default:
// HIDDEN
collapseClass = 'collapse';
}
var classes = mapToCssModules(classNames(className, collapseClass, navbar && 'navbar-collapse'), cssModule);
var style = height === null ? null : { height: height };
return React__default.createElement(Tag, _extends({}, attributes, {
style: _extends({}, attributes.style, style),
className: classes,
ref: function ref(c) {
_this3.element = c;
}
}));
}
}]);
return Collapse;
}(React.Component);
Collapse.propTypes = propTypes$64;
Collapse.defaultProps = defaultProps$62;
var propTypes$65 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
active: PropTypes.bool,
disabled: PropTypes.bool,
color: PropTypes.string,
action: PropTypes.bool,
className: PropTypes.any
};
var defaultProps$63 = {
tag: 'li'
};
var handleDisabledOnClick = function handleDisabledOnClick(e) {
e.preventDefault();
};
var ListGroupItem = function ListGroupItem(props) {
var className = props.className,
Tag = props.tag,
active = props.active,
disabled = props.disabled,
action = props.action,
color = props.color,
attributes = objectWithoutProperties(props, ['className', 'tag', 'active', 'disabled', 'action', 'color']);
var classes = classNames(className, active ? 'active' : false, disabled ? 'disabled' : false, action ? 'list-group-item-action' : false, color ? 'list-group-item-' + color : false, 'list-group-item');
// Prevent click event when disabled.
if (disabled) {
attributes.onClick = handleDisabledOnClick;
}
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ListGroupItem.propTypes = propTypes$65;
ListGroupItem.defaultProps = defaultProps$63;
var propTypes$66 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.any
};
var defaultProps$64 = {
tag: 'h5'
};
var ListGroupItemHeading = function ListGroupItemHeading(props) {
var className = props.className,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'tag']);
var classes = classNames(className, 'list-group-item-heading');
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ListGroupItemHeading.propTypes = propTypes$66;
ListGroupItemHeading.defaultProps = defaultProps$64;
var propTypes$67 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.any
};
var defaultProps$65 = {
tag: 'p'
};
var ListGroupItemText = function ListGroupItemText(props) {
var className = props.className,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'tag']);
var classes = classNames(className, 'list-group-item-text');
return React__default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ListGroupItemText.propTypes = propTypes$67;
ListGroupItemText.defaultProps = defaultProps$65;
var Component$1 = React__default.Component;
var components = {
UncontrolledAlert: Alert,
UncontrolledButtonDropdown: ButtonDropdown,
UncontrolledDropdown: Dropdown,
UncontrolledNavDropdown: NavDropdown,
UncontrolledTooltip: Tooltip
};
Object.keys(components).forEach(function (key) {
var Tag = components[key];
var defaultValue = Tag === Alert;
var Uncontrolled = function (_Component) {
inherits(Uncontrolled, _Component);
function Uncontrolled(props) {
classCallCheck(this, Uncontrolled);
var _this = possibleConstructorReturn(this, (Uncontrolled.__proto__ || Object.getPrototypeOf(Uncontrolled)).call(this, props));
_this.state = { isOpen: defaultValue };
_this.toggle = _this.toggle.bind(_this);
return _this;
}
createClass(Uncontrolled, [{
key: 'toggle',
value: function toggle() {
this.setState({ isOpen: !this.state.isOpen });
}
}, {
key: 'render',
value: function render() {
return React__default.createElement(Tag, _extends({ isOpen: this.state.isOpen, toggle: this.toggle }, this.props));
}
}]);
return Uncontrolled;
}(Component$1);
Uncontrolled.displayName = key;
components[key] = Uncontrolled;
});
var UncontrolledAlert = components.UncontrolledAlert;
var UncontrolledButtonDropdown = components.UncontrolledButtonDropdown;
var UncontrolledDropdown = components.UncontrolledDropdown;
var UncontrolledNavDropdown = components.UncontrolledNavDropdown;
var UncontrolledTooltip = components.UncontrolledTooltip;
exports.Alert = Alert;
exports.Container = Container;
exports.Row = Row;
exports.Col = Col;
exports.Navbar = Navbar;
exports.NavbarBrand = NavbarBrand;
exports.NavbarToggler = NavbarToggler;
exports.Nav = Nav;
exports.NavItem = NavItem;
exports.NavDropdown = NavDropdown;
exports.NavLink = NavLink;
exports.Breadcrumb = Breadcrumb;
exports.BreadcrumbItem = BreadcrumbItem;
exports.Button = Button;
exports.ButtonDropdown = ButtonDropdown;
exports.ButtonGroup = ButtonGroup;
exports.ButtonToolbar = ButtonToolbar;
exports.Dropdown = Dropdown;
exports.DropdownItem = DropdownItem;
exports.DropdownMenu = DropdownMenu;
exports.DropdownToggle = DropdownToggle;
exports.Fade = Fade;
exports.Badge = Badge;
exports.Card = Card;
exports.CardLink = CardLink;
exports.CardGroup = CardGroup;
exports.CardDeck = CardDeck;
exports.CardColumns = CardColumns;
exports.CardBlock = CardBlock;
exports.CardFooter = CardFooter;
exports.CardHeader = CardHeader;
exports.CardImg = CardImg;
exports.CardImgOverlay = CardImgOverlay;
exports.CardSubtitle = CardSubtitle;
exports.CardText = CardText;
exports.CardTitle = CardTitle;
exports.Popover = Popover;
exports.PopoverContent = PopoverContent;
exports.PopoverTitle = PopoverTitle;
exports.Progress = Progress;
exports.Modal = Modal;
exports.ModalHeader = ModalHeader;
exports.ModalBody = ModalBody;
exports.ModalFooter = ModalFooter;
exports.TetherContent = TetherContent;
exports.Tooltip = Tooltip;
exports.Table = Table;
exports.ListGroup = ListGroup;
exports.Form = Form;
exports.FormFeedback = FormFeedback;
exports.FormGroup = FormGroup;
exports.FormText = FormText;
exports.Input = Input;
exports.InputGroup = InputGroup;
exports.InputGroupAddon = InputGroupAddon;
exports.InputGroupButton = InputGroupButton;
exports.Label = Label;
exports.Media = Media;
exports.Pagination = Pagination;
exports.PaginationItem = PaginationItem;
exports.PaginationLink = PaginationLink;
exports.TabContent = TabContent;
exports.TabPane = TabPane;
exports.Jumbotron = Jumbotron;
exports.Collapse = Collapse;
exports.ListGroupItem = ListGroupItem;
exports.ListGroupItemText = ListGroupItemText;
exports.ListGroupItemHeading = ListGroupItemHeading;
exports.UncontrolledAlert = UncontrolledAlert;
exports.UncontrolledButtonDropdown = UncontrolledButtonDropdown;
exports.UncontrolledDropdown = UncontrolledDropdown;
exports.UncontrolledNavDropdown = UncontrolledNavDropdown;
exports.UncontrolledTooltip = UncontrolledTooltip;
//# sourceMappingURL=reactstrap.cjs.js.map
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import isobject from 'lodash.isobject';
import ReactDOM from 'react-dom';
import omit from 'lodash.omit';
import isFunction from 'lodash.isfunction';
import Tether from 'reactstrap-tether';
import toNumber from 'lodash.tonumber';
import { CSSTransitionGroup, TransitionGroup } from 'react-transition-group';
function getTetherAttachments(placement) {
var attachments = {};
switch (placement) {
case 'top':
case 'top center':
attachments = {
attachment: 'bottom center',
targetAttachment: 'top center'
};
break;
case 'bottom':
case 'bottom center':
attachments = {
attachment: 'top center',
targetAttachment: 'bottom center'
};
break;
case 'left':
case 'left center':
attachments = {
attachment: 'middle right',
targetAttachment: 'middle left'
};
break;
case 'right':
case 'right center':
attachments = {
attachment: 'middle left',
targetAttachment: 'middle right'
};
break;
case 'top left':
attachments = {
attachment: 'bottom left',
targetAttachment: 'top left'
};
break;
case 'top right':
attachments = {
attachment: 'bottom right',
targetAttachment: 'top right'
};
break;
case 'bottom left':
attachments = {
attachment: 'top left',
targetAttachment: 'bottom left'
};
break;
case 'bottom right':
attachments = {
attachment: 'top right',
targetAttachment: 'bottom right'
};
break;
case 'right top':
attachments = {
attachment: 'top left',
targetAttachment: 'top right'
};
break;
case 'right bottom':
attachments = {
attachment: 'bottom left',
targetAttachment: 'bottom right'
};
break;
case 'left top':
attachments = {
attachment: 'top right',
targetAttachment: 'top left'
};
break;
case 'left bottom':
attachments = {
attachment: 'bottom right',
targetAttachment: 'bottom left'
};
break;
default:
attachments = {
attachment: 'top center',
targetAttachment: 'bottom center'
};
}
return attachments;
}
var tetherAttachements = ['top', 'bottom', 'left', 'right', 'top left', 'top center', 'top right', 'right top', 'right middle', 'right bottom', 'bottom right', 'bottom center', 'bottom left', 'left top', 'left middle', 'left bottom'];
// https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/js/src/modal.js#L436-L443
function getScrollbarWidth() {
var scrollDiv = document.createElement('div');
// .modal-scrollbar-measure styles // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/scss/_modal.scss#L106-L113
scrollDiv.style.position = 'absolute';
scrollDiv.style.top = '-9999px';
scrollDiv.style.width = '50px';
scrollDiv.style.height = '50px';
scrollDiv.style.overflow = 'scroll';
document.body.appendChild(scrollDiv);
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
return scrollbarWidth;
}
function setScrollbarWidth(padding) {
document.body.style.paddingRight = padding > 0 ? padding + 'px' : null;
}
function isBodyOverflowing() {
return document.body.clientWidth < window.innerWidth;
}
function getOriginalBodyPadding() {
return parseInt(window.getComputedStyle(document.body, null).getPropertyValue('padding-right') || 0, 10);
}
function conditionallyUpdateScrollbar() {
var scrollbarWidth = getScrollbarWidth();
// https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/js/src/modal.js#L420
var fixedContent = document.querySelectorAll('.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed')[0];
var bodyPadding = fixedContent ? parseInt(fixedContent.style.paddingRight || 0, 10) : 0;
if (isBodyOverflowing()) {
setScrollbarWidth(bodyPadding + scrollbarWidth);
}
}
function mapToCssModules(className, cssModule) {
if (!cssModule) return className;
return className.split(' ').map(function (c) {
return cssModule[c] || c;
}).join(' ');
}
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var defineProperty = function (obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
var possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
var propTypes = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
fluid: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps = {
tag: 'div'
};
var Container = function Container(props) {
var className = props.className,
cssModule = props.cssModule,
fluid = props.fluid,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'fluid', 'tag']);
var classes = mapToCssModules(classNames(className, fluid ? 'container-fluid' : 'container'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Container.propTypes = propTypes;
Container.defaultProps = defaultProps;
var propTypes$1 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
noGutters: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$1 = {
tag: 'div'
};
var Row = function Row(props) {
var className = props.className,
cssModule = props.cssModule,
noGutters = props.noGutters,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'noGutters', 'tag']);
var classes = mapToCssModules(classNames(className, noGutters ? 'no-gutters' : null, 'row'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Row.propTypes = propTypes$1;
Row.defaultProps = defaultProps$1;
var colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
var stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);
var columnProps = PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string, PropTypes.shape({
size: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string]),
push: stringOrNumberProp,
pull: stringOrNumberProp,
offset: stringOrNumberProp
})]);
var propTypes$2 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
xs: columnProps,
sm: columnProps,
md: columnProps,
lg: columnProps,
xl: columnProps,
className: PropTypes.string,
cssModule: PropTypes.object,
widths: PropTypes.array
};
var defaultProps$2 = {
tag: 'div',
widths: colWidths
};
var getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {
if (colSize === true || colSize === '') {
return isXs ? 'col' : 'col-' + colWidth;
} else if (colSize === 'auto') {
return isXs ? 'col-auto' : 'col-' + colWidth + '-auto';
}
return isXs ? 'col-' + colSize : 'col-' + colWidth + '-' + colSize;
};
var Col = function Col(props) {
var className = props.className,
cssModule = props.cssModule,
widths = props.widths,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'widths', 'tag']);
var colClasses = [];
widths.forEach(function (colWidth, i) {
var columnProp = props[colWidth];
if (!i && columnProp === undefined) {
columnProp = true;
}
delete attributes[colWidth];
if (!columnProp) {
return;
}
var isXs = !i;
var colClass = void 0;
if (isobject(columnProp)) {
var _classNames;
var colSizeInterfix = isXs ? '-' : '-' + colWidth + '-';
colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
colClasses.push(mapToCssModules(classNames((_classNames = {}, defineProperty(_classNames, colClass, columnProp.size || columnProp.size === ''), defineProperty(_classNames, 'push' + colSizeInterfix + columnProp.push, columnProp.push || columnProp.push === 0), defineProperty(_classNames, 'pull' + colSizeInterfix + columnProp.pull, columnProp.pull || columnProp.pull === 0), defineProperty(_classNames, 'offset' + colSizeInterfix + columnProp.offset, columnProp.offset || columnProp.offset === 0), _classNames))), cssModule);
} else {
colClass = getColumnSizeClass(isXs, colWidth, columnProp);
colClasses.push(colClass);
}
});
var classes = mapToCssModules(classNames(className, colClasses), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Col.propTypes = propTypes$2;
Col.defaultProps = defaultProps$2;
var propTypes$3 = {
light: PropTypes.bool,
inverse: PropTypes.bool,
full: PropTypes.bool,
fixed: PropTypes.string,
sticky: PropTypes.string,
color: PropTypes.string,
role: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object,
toggleable: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])
};
var defaultProps$3 = {
tag: 'nav',
role: 'navigation',
toggleable: false
};
var getToggleableClass = function getToggleableClass(toggleable) {
if (toggleable === false) {
return false;
} else if (toggleable === true || toggleable === 'xs') {
return 'navbar-toggleable';
}
return 'navbar-toggleable-' + toggleable;
};
var Navbar = function Navbar(props) {
var _classNames;
var toggleable = props.toggleable,
className = props.className,
cssModule = props.cssModule,
light = props.light,
inverse = props.inverse,
full = props.full,
fixed = props.fixed,
sticky = props.sticky,
color = props.color,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['toggleable', 'className', 'cssModule', 'light', 'inverse', 'full', 'fixed', 'sticky', 'color', 'tag']);
var classes = mapToCssModules(classNames(className, 'navbar', getToggleableClass(toggleable), (_classNames = {
'navbar-light': light,
'navbar-inverse': inverse
}, defineProperty(_classNames, 'bg-' + color, color), defineProperty(_classNames, 'navbar-full', full), defineProperty(_classNames, 'fixed-' + fixed, fixed), defineProperty(_classNames, 'sticky-' + sticky, sticky), _classNames)), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Navbar.propTypes = propTypes$3;
Navbar.defaultProps = defaultProps$3;
var propTypes$4 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$4 = {
tag: 'a'
};
var NavbarBrand = function NavbarBrand(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'navbar-brand'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
NavbarBrand.propTypes = propTypes$4;
NavbarBrand.defaultProps = defaultProps$4;
var propTypes$5 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
type: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object,
children: PropTypes.node,
right: PropTypes.bool,
left: PropTypes.bool
};
var defaultProps$5 = {
tag: 'button',
type: 'button'
};
var navbarToggleIcon = React.createElement('span', { className: 'navbar-toggler-icon' });
var NavbarToggler = function NavbarToggler(props) {
var className = props.className,
cssModule = props.cssModule,
children = props.children,
right = props.right,
left = props.left,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'children', 'right', 'left', 'tag']);
var classes = mapToCssModules(classNames(className, 'navbar-toggler', right && 'navbar-toggler-right', left && 'navbar-toggler-left'), cssModule);
return React.createElement(
Tag,
_extends({}, attributes, { className: classes }),
children || navbarToggleIcon
);
};
NavbarToggler.propTypes = propTypes$5;
NavbarToggler.defaultProps = defaultProps$5;
var propTypes$6 = {
tabs: PropTypes.bool,
pills: PropTypes.bool,
vertical: PropTypes.bool,
navbar: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$6 = {
tag: 'ul'
};
var Nav = function Nav(props) {
var className = props.className,
cssModule = props.cssModule,
tabs = props.tabs,
pills = props.pills,
vertical = props.vertical,
navbar = props.navbar,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tabs', 'pills', 'vertical', 'navbar', 'tag']);
var classes = mapToCssModules(classNames(className, navbar ? 'navbar-nav' : 'nav', {
'nav-tabs': tabs,
'nav-pills': pills,
'flex-column': vertical
}), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Nav.propTypes = propTypes$6;
Nav.defaultProps = defaultProps$6;
var propTypes$7 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$7 = {
tag: 'li'
};
var NavItem = function NavItem(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'nav-item'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
NavItem.propTypes = propTypes$7;
NavItem.defaultProps = defaultProps$7;
var propTypes$10 = {
children: PropTypes.node.isRequired,
className: PropTypes.string,
arrow: PropTypes.string,
disabled: PropTypes.bool,
isOpen: PropTypes.bool.isRequired,
toggle: PropTypes.func.isRequired,
tether: PropTypes.object.isRequired,
tetherRef: PropTypes.func,
style: PropTypes.node,
cssModule: PropTypes.object
};
var defaultProps$10 = {
isOpen: false,
tetherRef: function tetherRef() {}
};
var TetherContent = function (_React$Component) {
inherits(TetherContent, _React$Component);
function TetherContent(props) {
classCallCheck(this, TetherContent);
var _this = possibleConstructorReturn(this, (TetherContent.__proto__ || Object.getPrototypeOf(TetherContent)).call(this, props));
_this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
_this.toggle = _this.toggle.bind(_this);
return _this;
}
createClass(TetherContent, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.handleProps();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (this.props.isOpen !== prevProps.isOpen) {
this.handleProps();
} else if (this._element) {
// rerender
this.renderIntoSubtree();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.hide();
}
}, {
key: 'getTarget',
value: function getTarget() {
var target = this.props.tether.target;
if (isFunction(target)) {
return target();
}
return target;
}
}, {
key: 'getTetherConfig',
value: function getTetherConfig() {
var config = _extends({}, this.props.tether);
config.element = this._element;
config.target = this.getTarget();
return config;
}
}, {
key: 'handleDocumentClick',
value: function handleDocumentClick(e) {
var container = this._element;
if (e.target === container || !container.contains(e.target)) {
this.toggle();
}
}
}, {
key: 'handleProps',
value: function handleProps() {
if (this.props.isOpen) {
this.show();
} else {
this.hide();
}
}
}, {
key: 'hide',
value: function hide() {
document.removeEventListener('click', this.handleDocumentClick, true);
if (this._element) {
document.body.removeChild(this._element);
ReactDOM.unmountComponentAtNode(this._element);
this._element = null;
}
if (this._tether) {
this._tether.destroy();
this._tether = null;
this.props.tetherRef(this._tether);
}
}
}, {
key: 'show',
value: function show() {
document.addEventListener('click', this.handleDocumentClick, true);
this._element = document.createElement('div');
this._element.className = this.props.className;
document.body.appendChild(this._element);
this.renderIntoSubtree();
this._tether = new Tether(this.getTetherConfig());
this.props.tetherRef(this._tether);
this._tether.position();
this._element.childNodes[0].focus();
}
}, {
key: 'toggle',
value: function toggle(e) {
if (this.props.disabled) {
return e && e.preventDefault();
}
return this.props.toggle();
}
}, {
key: 'renderIntoSubtree',
value: function renderIntoSubtree() {
ReactDOM.unstable_renderSubtreeIntoContainer(this, this.renderChildren(), this._element);
}
}, {
key: 'renderChildren',
value: function renderChildren() {
var _props = this.props,
children = _props.children,
style = _props.style;
return React.cloneElement(children, { style: style });
}
}, {
key: 'render',
value: function render() {
return null;
}
}]);
return TetherContent;
}(React.Component);
TetherContent.propTypes = propTypes$10;
TetherContent.defaultProps = defaultProps$10;
var propTypes$11 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
children: PropTypes.node.isRequired,
right: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$11 = {
tag: 'div'
};
var contextTypes = {
isOpen: PropTypes.bool.isRequired
};
var DropdownMenu = function DropdownMenu(props, context) {
var className = props.className,
cssModule = props.cssModule,
right = props.right,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'right', 'tag']);
var classes = mapToCssModules(classNames(className, 'dropdown-menu', { 'dropdown-menu-right': right }), cssModule);
return React.createElement(Tag, _extends({}, attributes, { tabIndex: '-1', 'aria-hidden': !context.isOpen, role: 'menu', className: classes }));
};
DropdownMenu.propTypes = propTypes$11;
DropdownMenu.defaultProps = defaultProps$11;
DropdownMenu.contextTypes = contextTypes;
/* eslint react/no-find-dom-node: 0 */
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
var propTypes$9 = {
disabled: PropTypes.bool,
dropup: PropTypes.bool,
group: PropTypes.bool,
isOpen: PropTypes.bool,
size: PropTypes.string,
tag: PropTypes.string,
tether: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]),
toggle: PropTypes.func,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$9 = {
isOpen: false,
tag: 'div'
};
var childContextTypes = {
toggle: PropTypes.func.isRequired,
isOpen: PropTypes.bool.isRequired
};
var defaultTetherConfig = {
classPrefix: 'bs-tether',
classes: { element: 'dropdown', enabled: 'show' },
constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
};
var Dropdown = function (_React$Component) {
inherits(Dropdown, _React$Component);
function Dropdown(props) {
classCallCheck(this, Dropdown);
var _this = possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, props));
_this.addEvents = _this.addEvents.bind(_this);
_this.getTetherConfig = _this.getTetherConfig.bind(_this);
_this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
_this.removeEvents = _this.removeEvents.bind(_this);
_this.toggle = _this.toggle.bind(_this);
return _this;
}
createClass(Dropdown, [{
key: 'getChildContext',
value: function getChildContext() {
return {
toggle: this.props.toggle,
isOpen: this.props.isOpen
};
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
this.handleProps();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (this.props.isOpen !== prevProps.isOpen) {
this.handleProps();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.removeEvents();
}
}, {
key: 'getTetherTarget',
value: function getTetherTarget() {
var container = ReactDOM.findDOMNode(this);
return container.querySelector('[data-toggle="dropdown"]');
}
}, {
key: 'getTetherConfig',
value: function getTetherConfig(childProps) {
var _this2 = this;
var target = function target() {
return _this2.getTetherTarget();
};
var vElementAttach = 'top';
var hElementAttach = 'left';
var vTargetAttach = 'bottom';
var hTargetAttach = 'left';
if (childProps.right) {
hElementAttach = 'right';
hTargetAttach = 'right';
}
if (this.props.dropup) {
vElementAttach = 'bottom';
vTargetAttach = 'top';
}
return _extends({}, defaultTetherConfig, {
attachment: vElementAttach + ' ' + hElementAttach,
targetAttachment: vTargetAttach + ' ' + hTargetAttach,
target: target
}, this.props.tether);
}
}, {
key: 'addEvents',
value: function addEvents() {
document.addEventListener('click', this.handleDocumentClick, true);
}
}, {
key: 'removeEvents',
value: function removeEvents() {
document.removeEventListener('click', this.handleDocumentClick, true);
}
}, {
key: 'handleDocumentClick',
value: function handleDocumentClick(e) {
var container = ReactDOM.findDOMNode(this);
if (container.contains(e.target) && container !== e.target) {
return;
}
this.toggle();
}
}, {
key: 'handleProps',
value: function handleProps() {
if (this.props.tether) {
return;
}
if (this.props.isOpen) {
this.addEvents();
} else {
this.removeEvents();
}
}
}, {
key: 'toggle',
value: function toggle(e) {
if (this.props.disabled) {
return e && e.preventDefault();
}
return this.props.toggle();
}
}, {
key: 'renderChildren',
value: function renderChildren() {
var _this3 = this;
var _props = this.props,
tether = _props.tether,
children = _props.children,
attrs = objectWithoutProperties(_props, ['tether', 'children']);
attrs.toggle = this.toggle;
return React.Children.map(React.Children.toArray(children), function (child) {
if (tether && child.type === DropdownMenu) {
var tetherConfig = _this3.getTetherConfig(child.props);
return React.createElement(
TetherContent,
_extends({}, attrs, { tether: tetherConfig }),
child
);
}
return child;
});
}
}, {
key: 'render',
value: function render() {
var _classNames;
var _omit = omit(this.props, ['toggle', 'tether']),
className = _omit.className,
cssModule = _omit.cssModule,
dropup = _omit.dropup,
group = _omit.group,
size = _omit.size,
Tag = _omit.tag,
isOpen = _omit.isOpen,
attributes = objectWithoutProperties(_omit, ['className', 'cssModule', 'dropup', 'group', 'size', 'tag', 'isOpen']);
var classes = mapToCssModules(classNames(className, (_classNames = {
'btn-group': group
}, defineProperty(_classNames, 'btn-group-' + size, !!size), defineProperty(_classNames, 'dropdown', !group), defineProperty(_classNames, 'show', isOpen), defineProperty(_classNames, 'dropup', dropup), _classNames)), cssModule);
return React.createElement(
Tag,
_extends({}, attributes, {
className: classes
}),
this.renderChildren()
);
}
}]);
return Dropdown;
}(React.Component);
Dropdown.propTypes = propTypes$9;
Dropdown.defaultProps = defaultProps$9;
Dropdown.childContextTypes = childContextTypes;
var propTypes$8 = {
children: PropTypes.node,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$8 = {
tag: 'li'
};
var NavDropdown = function NavDropdown(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'nav-item'), cssModule);
return React.createElement(Dropdown, _extends({}, attributes, { tag: Tag, className: classes }));
};
NavDropdown.propTypes = propTypes$8;
NavDropdown.defaultProps = defaultProps$8;
var propTypes$12 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
disabled: PropTypes.bool,
active: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object,
onClick: PropTypes.func,
href: PropTypes.any
};
var defaultProps$12 = {
tag: 'a'
};
var NavLink = function (_React$Component) {
inherits(NavLink, _React$Component);
function NavLink(props) {
classCallCheck(this, NavLink);
var _this = possibleConstructorReturn(this, (NavLink.__proto__ || Object.getPrototypeOf(NavLink)).call(this, props));
_this.onClick = _this.onClick.bind(_this);
return _this;
}
createClass(NavLink, [{
key: 'onClick',
value: function onClick(e) {
if (this.props.disabled) {
e.preventDefault();
return;
}
if (this.props.href === '#') {
e.preventDefault();
}
if (this.props.onClick) {
this.props.onClick(e);
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
className = _props.className,
cssModule = _props.cssModule,
active = _props.active,
Tag = _props.tag,
getRef = _props.getRef,
attributes = objectWithoutProperties(_props, ['className', 'cssModule', 'active', 'tag', 'getRef']);
var classes = mapToCssModules(classNames(className, 'nav-link', {
disabled: attributes.disabled,
active: active
}), cssModule);
return React.createElement(Tag, _extends({}, attributes, { ref: getRef, onClick: this.onClick, className: classes }));
}
}]);
return NavLink;
}(React.Component);
NavLink.propTypes = propTypes$12;
NavLink.defaultProps = defaultProps$12;
var propTypes$13 = {
tag: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$13 = {
tag: 'ol'
};
var Breadcrumb = function Breadcrumb(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'breadcrumb'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Breadcrumb.propTypes = propTypes$13;
Breadcrumb.defaultProps = defaultProps$13;
var propTypes$14 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
active: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$14 = {
tag: 'li'
};
var BreadcrumbItem = function BreadcrumbItem(props) {
var className = props.className,
cssModule = props.cssModule,
active = props.active,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'active', 'tag']);
var classes = mapToCssModules(classNames(className, active ? 'active' : false, 'breadcrumb-item'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
BreadcrumbItem.propTypes = propTypes$14;
BreadcrumbItem.defaultProps = defaultProps$14;
var propTypes$15 = {
active: PropTypes.bool,
block: PropTypes.bool,
color: PropTypes.string,
disabled: PropTypes.bool,
outline: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
onClick: PropTypes.func,
size: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$15 = {
color: 'secondary',
tag: 'button'
};
var Button = function (_React$Component) {
inherits(Button, _React$Component);
function Button(props) {
classCallCheck(this, Button);
var _this = possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).call(this, props));
_this.onClick = _this.onClick.bind(_this);
return _this;
}
createClass(Button, [{
key: 'onClick',
value: function onClick(e) {
if (this.props.disabled) {
e.preventDefault();
return;
}
if (this.props.onClick) {
this.props.onClick(e);
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
active = _props.active,
block = _props.block,
className = _props.className,
cssModule = _props.cssModule,
color = _props.color,
outline = _props.outline,
size = _props.size,
Tag = _props.tag,
getRef = _props.getRef,
attributes = objectWithoutProperties(_props, ['active', 'block', 'className', 'cssModule', 'color', 'outline', 'size', 'tag', 'getRef']);
var classes = mapToCssModules(classNames(className, 'btn', 'btn' + (outline ? '-outline' : '') + '-' + color, size ? 'btn-' + size : false, block ? 'btn-block' : false, { active: active, disabled: this.props.disabled }), cssModule);
if (attributes.href && Tag === 'button') {
Tag = 'a';
}
return React.createElement(Tag, _extends({
type: Tag === 'button' && attributes.onClick ? 'button' : undefined
}, attributes, {
className: classes,
ref: getRef,
onClick: this.onClick
}));
}
}]);
return Button;
}(React.Component);
Button.propTypes = propTypes$15;
Button.defaultProps = defaultProps$15;
var propTypes$16 = {
children: PropTypes.node
};
var ButtonDropdown = function ButtonDropdown(props) {
return React.createElement(Dropdown, _extends({ group: true }, props));
};
ButtonDropdown.propTypes = propTypes$16;
var propTypes$17 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
'aria-label': PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object,
role: PropTypes.string,
size: PropTypes.string,
vertical: PropTypes.bool
};
var defaultProps$16 = {
tag: 'div',
role: 'group'
};
var ButtonGroup = function ButtonGroup(props) {
var className = props.className,
cssModule = props.cssModule,
size = props.size,
vertical = props.vertical,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'size', 'vertical', 'tag']);
var classes = mapToCssModules(classNames(className, size ? 'btn-group-' + size : false, vertical ? 'btn-group-vertical' : 'btn-group'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ButtonGroup.propTypes = propTypes$17;
ButtonGroup.defaultProps = defaultProps$16;
var propTypes$18 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
'aria-label': PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object,
role: PropTypes.string
};
var defaultProps$17 = {
tag: 'div',
role: 'toolbar'
};
var ButtonToolbar = function ButtonToolbar(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'btn-toolbar'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ButtonToolbar.propTypes = propTypes$18;
ButtonToolbar.defaultProps = defaultProps$17;
var propTypes$19 = {
children: PropTypes.node,
disabled: PropTypes.bool,
divider: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
header: PropTypes.bool,
onClick: PropTypes.func,
className: PropTypes.string,
cssModule: PropTypes.object,
toggle: PropTypes.bool
};
var contextTypes$1 = {
toggle: PropTypes.func
};
var defaultProps$18 = {
tag: 'button',
toggle: true
};
var DropdownItem = function (_React$Component) {
inherits(DropdownItem, _React$Component);
function DropdownItem(props) {
classCallCheck(this, DropdownItem);
var _this = possibleConstructorReturn(this, (DropdownItem.__proto__ || Object.getPrototypeOf(DropdownItem)).call(this, props));
_this.onClick = _this.onClick.bind(_this);
_this.getTabIndex = _this.getTabIndex.bind(_this);
return _this;
}
createClass(DropdownItem, [{
key: 'onClick',
value: function onClick(e) {
if (this.props.disabled || this.props.header || this.props.divider) {
e.preventDefault();
return;
}
if (this.props.onClick) {
this.props.onClick(e);
}
if (this.props.toggle) {
this.context.toggle();
}
}
}, {
key: 'getTabIndex',
value: function getTabIndex() {
if (this.props.disabled || this.props.header || this.props.divider) {
return '-1';
}
return '0';
}
}, {
key: 'render',
value: function render() {
var tabIndex = this.getTabIndex();
var _omit = omit(this.props, ['toggle']),
className = _omit.className,
cssModule = _omit.cssModule,
divider = _omit.divider,
Tag = _omit.tag,
header = _omit.header,
props = objectWithoutProperties(_omit, ['className', 'cssModule', 'divider', 'tag', 'header']);
var classes = mapToCssModules(classNames(className, {
disabled: props.disabled,
'dropdown-item': !divider && !header,
'dropdown-header': header,
'dropdown-divider': divider
}), cssModule);
if (Tag === 'button') {
if (header) {
Tag = 'h6';
} else if (divider) {
Tag = 'div';
} else if (props.href) {
Tag = 'a';
}
}
return React.createElement(Tag, _extends({
type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined
}, props, {
tabIndex: tabIndex,
className: classes,
onClick: this.onClick
}));
}
}]);
return DropdownItem;
}(React.Component);
DropdownItem.propTypes = propTypes$19;
DropdownItem.defaultProps = defaultProps$18;
DropdownItem.contextTypes = contextTypes$1;
var propTypes$20 = {
caret: PropTypes.bool,
color: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
disabled: PropTypes.bool,
onClick: PropTypes.func,
'data-toggle': PropTypes.string,
'aria-haspopup': PropTypes.bool,
split: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
nav: PropTypes.bool
};
var defaultProps$19 = {
'data-toggle': 'dropdown',
'aria-haspopup': true,
color: 'secondary'
};
var contextTypes$2 = {
isOpen: PropTypes.bool.isRequired,
toggle: PropTypes.func.isRequired
};
var DropdownToggle = function (_React$Component) {
inherits(DropdownToggle, _React$Component);
function DropdownToggle(props) {
classCallCheck(this, DropdownToggle);
var _this = possibleConstructorReturn(this, (DropdownToggle.__proto__ || Object.getPrototypeOf(DropdownToggle)).call(this, props));
_this.onClick = _this.onClick.bind(_this);
return _this;
}
createClass(DropdownToggle, [{
key: 'onClick',
value: function onClick(e) {
if (this.props.disabled) {
e.preventDefault();
return;
}
if (this.props.nav && !this.props.tag) {
e.preventDefault();
}
if (this.props.onClick) {
this.props.onClick(e);
}
this.context.toggle();
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
className = _props.className,
cssModule = _props.cssModule,
caret = _props.caret,
split = _props.split,
nav = _props.nav,
tag = _props.tag,
props = objectWithoutProperties(_props, ['className', 'cssModule', 'caret', 'split', 'nav', 'tag']);
var ariaLabel = props['aria-label'] || 'Toggle Dropdown';
var classes = mapToCssModules(classNames(className, {
'dropdown-toggle': caret || split,
'dropdown-toggle-split': split,
active: this.context.isOpen,
'nav-link': nav
}), cssModule);
var children = props.children || React.createElement(
'span',
{ className: 'sr-only' },
ariaLabel
);
var Tag = void 0;
if (nav && !tag) {
Tag = 'a';
props.href = '#';
} else if (!tag) {
Tag = Button;
} else {
Tag = tag;
}
return React.createElement(Tag, _extends({}, props, {
className: classes,
onClick: this.onClick,
'aria-haspopup': 'true',
'aria-expanded': this.context.isOpen,
children: children
}));
}
}]);
return DropdownToggle;
}(React.Component);
DropdownToggle.propTypes = propTypes$20;
DropdownToggle.defaultProps = defaultProps$19;
DropdownToggle.contextTypes = contextTypes$2;
var propTypes$21 = {
baseClass: PropTypes.string,
baseClassIn: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object,
transitionAppearTimeout: PropTypes.number,
transitionEnterTimeout: PropTypes.number,
transitionLeaveTimeout: PropTypes.number,
transitionAppear: PropTypes.bool,
transitionEnter: PropTypes.bool,
transitionLeave: PropTypes.bool,
onLeave: PropTypes.func,
onEnter: PropTypes.func
};
var defaultProps$20 = {
tag: 'div',
baseClass: 'fade',
baseClassIn: 'show',
transitionAppearTimeout: 0,
transitionEnterTimeout: 0,
transitionLeaveTimeout: 0,
transitionAppear: true,
transitionEnter: true,
transitionLeave: true
};
var Fade = function (_React$Component) {
inherits(Fade, _React$Component);
function Fade(props) {
classCallCheck(this, Fade);
var _this = possibleConstructorReturn(this, (Fade.__proto__ || Object.getPrototypeOf(Fade)).call(this, props));
_this.state = {
mounted: !props.transitionAppear
};
_this.onLeave = _this.onLeave.bind(_this);
_this.onEnter = _this.onEnter.bind(_this);
_this.timers = [];
return _this;
}
createClass(Fade, [{
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.timers.forEach(function (timer) {
return clearTimeout(timer);
});
}
}, {
key: 'onEnter',
value: function onEnter(cb) {
var _this2 = this;
return function () {
cb();
if (_this2.props.onEnter) {
_this2.props.onEnter();
}
};
}
}, {
key: 'onLeave',
value: function onLeave(cb) {
var _this3 = this;
return function () {
cb();
if (_this3.props.onLeave) {
_this3.props.onLeave();
}
};
}
}, {
key: 'componentWillAppear',
value: function componentWillAppear(cb) {
if (!this.props.transitionAppear) {
this.onEnter(cb)();
}
this.timers.push(setTimeout(this.onEnter(cb), this.props.transitionAppearTimeout));
}
}, {
key: 'componentDidAppear',
value: function componentDidAppear() {
this.setState({
mounted: true
});
}
}, {
key: 'componentWillEnter',
value: function componentWillEnter(cb) {
if (!this.props.transitionEnter) {
this.onEnter(cb)();
}
this.timers.push(setTimeout(this.onEnter(cb), this.props.transitionEnterTimeout));
}
}, {
key: 'componentDidEnter',
value: function componentDidEnter() {
this.setState({
mounted: true
});
}
}, {
key: 'componentWillLeave',
value: function componentWillLeave(cb) {
this.setState({
mounted: false
});
if (!this.props.transitionLeave) {
this.onLeave(cb)();
}
this.timers.push(setTimeout(this.onLeave(cb), this.props.transitionLeaveTimeout));
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
baseClass = _props.baseClass,
baseClassIn = _props.baseClassIn,
className = _props.className,
cssModule = _props.cssModule,
Tag = _props.tag;
var attributes = omit(this.props, Object.keys(propTypes$21));
var classes = mapToCssModules(classNames(className, baseClass, this.state.mounted ? baseClassIn : false), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
}
}]);
return Fade;
}(React.Component);
Fade.propTypes = propTypes$21;
Fade.defaultProps = defaultProps$20;
var propTypes$22 = {
color: PropTypes.string,
pill: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$21 = {
color: 'default',
pill: false,
tag: 'span'
};
var Badge = function Badge(props) {
var className = props.className,
cssModule = props.cssModule,
color = props.color,
pill = props.pill,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'color', 'pill', 'tag']);
var classes = mapToCssModules(classNames(className, 'badge', 'badge-' + color, pill ? 'badge-pill' : false), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Badge.propTypes = propTypes$22;
Badge.defaultProps = defaultProps$21;
var propTypes$23 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
inverse: PropTypes.bool,
color: PropTypes.string,
block: PropTypes.bool,
outline: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$22 = {
tag: 'div'
};
var Card = function Card(props) {
var className = props.className,
cssModule = props.cssModule,
color = props.color,
block = props.block,
inverse = props.inverse,
outline = props.outline,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'color', 'block', 'inverse', 'outline', 'tag']);
var classes = mapToCssModules(classNames(className, 'card', inverse ? 'card-inverse' : false, block ? 'card-block' : false, color ? 'card' + (outline ? '-outline' : '') + '-' + color : false), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Card.propTypes = propTypes$23;
Card.defaultProps = defaultProps$22;
var propTypes$24 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$23 = {
tag: 'div'
};
var CardGroup = function CardGroup(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-group'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardGroup.propTypes = propTypes$24;
CardGroup.defaultProps = defaultProps$23;
var propTypes$25 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$24 = {
tag: 'div'
};
var CardDeck = function CardDeck(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-deck'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardDeck.propTypes = propTypes$25;
CardDeck.defaultProps = defaultProps$24;
var propTypes$26 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$25 = {
tag: 'div'
};
var CardColumns = function CardColumns(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-columns'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardColumns.propTypes = propTypes$26;
CardColumns.defaultProps = defaultProps$25;
var propTypes$27 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$26 = {
tag: 'div'
};
var CardBlock = function CardBlock(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-block'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardBlock.propTypes = propTypes$27;
CardBlock.defaultProps = defaultProps$26;
var propTypes$28 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$27 = {
tag: 'a'
};
var CardLink = function CardLink(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
getRef = props.getRef,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'getRef']);
var classes = mapToCssModules(classNames(className, 'card-link'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
};
CardLink.propTypes = propTypes$28;
CardLink.defaultProps = defaultProps$27;
var propTypes$29 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$28 = {
tag: 'div'
};
var CardFooter = function CardFooter(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-footer'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardFooter.propTypes = propTypes$29;
CardFooter.defaultProps = defaultProps$28;
var propTypes$30 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$29 = {
tag: 'div'
};
var CardHeader = function CardHeader(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-header'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardHeader.propTypes = propTypes$30;
CardHeader.defaultProps = defaultProps$29;
var propTypes$31 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
top: PropTypes.bool,
bottom: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$30 = {
tag: 'img'
};
var CardImg = function CardImg(props) {
var className = props.className,
cssModule = props.cssModule,
top = props.top,
bottom = props.bottom,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'top', 'bottom', 'tag']);
var cardImgClassName = 'card-img';
if (top) {
cardImgClassName = 'card-img-top';
}
if (bottom) {
cardImgClassName = 'card-img-bottom';
}
var classes = mapToCssModules(classNames(className, cardImgClassName), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardImg.propTypes = propTypes$31;
CardImg.defaultProps = defaultProps$30;
var propTypes$32 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$31 = {
tag: 'div'
};
var CardImgOverlay = function CardImgOverlay(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-img-overlay'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardImgOverlay.propTypes = propTypes$32;
CardImgOverlay.defaultProps = defaultProps$31;
var propTypes$33 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$32 = {
tag: 'h6'
};
var CardSubtitle = function CardSubtitle(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-subtitle'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardSubtitle.propTypes = propTypes$33;
CardSubtitle.defaultProps = defaultProps$32;
var propTypes$34 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$33 = {
tag: 'p'
};
var CardText = function CardText(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-text'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardText.propTypes = propTypes$34;
CardText.defaultProps = defaultProps$33;
var propTypes$35 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$34 = {
tag: 'h4'
};
var CardTitle = function CardTitle(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'card-title'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
CardTitle.propTypes = propTypes$35;
CardTitle.defaultProps = defaultProps$34;
var propTypes$36 = {
placement: PropTypes.oneOf(tetherAttachements),
target: PropTypes.string.isRequired,
isOpen: PropTypes.bool,
tether: PropTypes.object,
tetherRef: PropTypes.func,
className: PropTypes.string,
cssModule: PropTypes.object,
toggle: PropTypes.func
};
var defaultProps$35 = {
isOpen: false,
placement: 'bottom',
toggle: function toggle() {}
};
var defaultTetherConfig$1 = {
classPrefix: 'bs-tether',
classes: {
element: false,
enabled: 'show'
},
constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
};
var Popover = function (_React$Component) {
inherits(Popover, _React$Component);
function Popover(props) {
classCallCheck(this, Popover);
var _this = possibleConstructorReturn(this, (Popover.__proto__ || Object.getPrototypeOf(Popover)).call(this, props));
_this.getTetherConfig = _this.getTetherConfig.bind(_this);
return _this;
}
createClass(Popover, [{
key: 'getTetherConfig',
value: function getTetherConfig() {
var attachments = getTetherAttachments(this.props.placement);
return _extends({}, defaultTetherConfig$1, attachments, {
target: '#' + this.props.target
}, this.props.tether);
}
}, {
key: 'render',
value: function render() {
if (!this.props.isOpen) {
return null;
}
var tetherConfig = this.getTetherConfig();
var classes = mapToCssModules(classNames('popover-inner', this.props.className), this.props.cssModule);
var attributes = omit(this.props, Object.keys(propTypes$36));
return React.createElement(
TetherContent,
{
className: mapToCssModules('popover', this.props.cssModule),
tether: tetherConfig,
tetherRef: this.props.tetherRef,
isOpen: this.props.isOpen,
toggle: this.props.toggle
},
React.createElement('div', _extends({}, attributes, { className: classes }))
);
}
}]);
return Popover;
}(React.Component);
Popover.propTypes = propTypes$36;
Popover.defaultProps = defaultProps$35;
var propTypes$37 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$36 = {
tag: 'h3'
};
var PopoverTitle = function PopoverTitle(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'popover-title'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
PopoverTitle.propTypes = propTypes$37;
PopoverTitle.defaultProps = defaultProps$36;
var propTypes$38 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$37 = {
tag: 'div'
};
var PopoverContent = function PopoverContent(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'popover-content'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
PopoverContent.propTypes = propTypes$38;
PopoverContent.defaultProps = defaultProps$37;
var propTypes$39 = {
children: PropTypes.node,
bar: PropTypes.bool,
multi: PropTypes.bool,
tag: PropTypes.string,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
max: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
animated: PropTypes.bool,
striped: PropTypes.bool,
color: PropTypes.string,
className: PropTypes.string,
barClassName: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$38 = {
tag: 'div',
value: 0,
max: 100
};
var Progress = function Progress(props) {
var children = props.children,
className = props.className,
barClassName = props.barClassName,
cssModule = props.cssModule,
value = props.value,
max = props.max,
animated = props.animated,
striped = props.striped,
color = props.color,
bar = props.bar,
multi = props.multi,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['children', 'className', 'barClassName', 'cssModule', 'value', 'max', 'animated', 'striped', 'color', 'bar', 'multi', 'tag']);
var percent = toNumber(value) / toNumber(max) * 100;
var progressClasses = mapToCssModules(classNames(className, 'progress'), cssModule);
var progressBarClasses = mapToCssModules(classNames('progress-bar', bar ? className || barClassName : barClassName, animated ? 'progress-bar-animated' : null, color ? 'bg-' + color : null, striped || animated ? 'progress-bar-striped' : null), cssModule);
var ProgressBar = multi ? children : React.createElement('div', {
className: progressBarClasses,
style: { width: percent + '%' },
role: 'progressbar',
'aria-valuenow': value,
'aria-valuemin': '0',
'aria-valuemax': max,
children: children
});
if (bar) {
return ProgressBar;
}
return React.createElement(Tag, _extends({}, attributes, { className: progressClasses, children: ProgressBar }));
};
Progress.propTypes = propTypes$39;
Progress.defaultProps = defaultProps$38;
var propTypes$40 = {
isOpen: PropTypes.bool,
autoFocus: PropTypes.bool,
size: PropTypes.string,
toggle: PropTypes.func,
keyboard: PropTypes.bool,
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
onEnter: PropTypes.func,
onExit: PropTypes.func,
children: PropTypes.node,
className: PropTypes.string,
wrapClassName: PropTypes.string,
modalClassName: PropTypes.string,
backdropClassName: PropTypes.string,
contentClassName: PropTypes.string,
fade: PropTypes.bool,
cssModule: PropTypes.object,
zIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
backdropTransitionTimeout: PropTypes.number,
backdropTransitionAppearTimeout: PropTypes.number,
backdropTransitionEnterTimeout: PropTypes.number,
backdropTransitionLeaveTimeout: PropTypes.number,
modalTransitionTimeout: PropTypes.number,
modalTransitionAppearTimeout: PropTypes.number,
modalTransitionEnterTimeout: PropTypes.number,
modalTransitionLeaveTimeout: PropTypes.number
};
var defaultProps$39 = {
isOpen: false,
autoFocus: true,
backdrop: true,
keyboard: true,
zIndex: 1050,
fade: true,
modalTransitionTimeout: 300,
backdropTransitionTimeout: 150
};
var Modal = function (_React$Component) {
inherits(Modal, _React$Component);
function Modal(props) {
classCallCheck(this, Modal);
var _this = possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, props));
_this.originalBodyPadding = null;
_this.isBodyOverflowing = false;
_this.togglePortal = _this.togglePortal.bind(_this);
_this.handleBackdropClick = _this.handleBackdropClick.bind(_this);
_this.handleEscape = _this.handleEscape.bind(_this);
_this.destroy = _this.destroy.bind(_this);
_this.onEnter = _this.onEnter.bind(_this);
_this.onExit = _this.onExit.bind(_this);
return _this;
}
createClass(Modal, [{
key: 'componentDidMount',
value: function componentDidMount() {
if (this.props.isOpen) {
this.togglePortal();
}
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (this.props.isOpen !== prevProps.isOpen) {
// handle portal events/dom updates
this.togglePortal();
} else if (this._element) {
// rerender portal
this.renderIntoSubtree();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.onExit();
}
}, {
key: 'onEnter',
value: function onEnter() {
if (this.props.onEnter) {
this.props.onEnter();
}
}
}, {
key: 'onExit',
value: function onExit() {
this.destroy();
if (this.props.onExit) {
this.props.onExit();
}
}
}, {
key: 'handleEscape',
value: function handleEscape(e) {
if (this.props.keyboard && e.keyCode === 27 && this.props.toggle) {
this.props.toggle();
}
}
}, {
key: 'handleBackdropClick',
value: function handleBackdropClick(e) {
if (this.props.backdrop !== true) return;
var container = this._dialog;
if (e.target && !container.contains(e.target) && this.props.toggle) {
this.props.toggle();
}
}
}, {
key: 'hasTransition',
value: function hasTransition() {
if (this.props.fade === false) {
return false;
}
return this.props.modalTransitionTimeout > 0;
}
}, {
key: 'togglePortal',
value: function togglePortal() {
if (this.props.isOpen) {
if (this.props.autoFocus) {
this._focus = true;
}
this.show();
if (!this.hasTransition()) {
this.onEnter();
}
} else {
this.hide();
if (!this.hasTransition()) {
this.onExit();
}
}
}
}, {
key: 'destroy',
value: function destroy() {
if (this._element) {
ReactDOM.unmountComponentAtNode(this._element);
document.body.removeChild(this._element);
this._element = null;
}
// Use regex to prevent matching `modal-open` as part of a different class, e.g. `my-modal-opened`
var classes = document.body.className.replace(/(^| )modal-open( |$)/, ' ');
document.body.className = mapToCssModules(classNames(classes).trim(), this.props.cssModule);
setScrollbarWidth(this.originalBodyPadding);
}
}, {
key: 'hide',
value: function hide() {
this.renderIntoSubtree();
}
}, {
key: 'show',
value: function show() {
var classes = document.body.className;
this._element = document.createElement('div');
this._element.setAttribute('tabindex', '-1');
this._element.style.position = 'relative';
this._element.style.zIndex = this.props.zIndex;
this.originalBodyPadding = getOriginalBodyPadding();
conditionallyUpdateScrollbar();
document.body.appendChild(this._element);
document.body.className = mapToCssModules(classNames(classes, 'modal-open'), this.props.cssModule);
this.renderIntoSubtree();
}
}, {
key: 'renderModalDialog',
value: function renderModalDialog() {
var _this2 = this;
return React.createElement(
'div',
{
className: mapToCssModules(classNames('modal-dialog', this.props.className, defineProperty({}, 'modal-' + this.props.size, this.props.size)), this.props.cssModule),
role: 'document',
ref: function ref(c) {
return _this2._dialog = c;
}
},
React.createElement(
'div',
{
className: mapToCssModules(classNames('modal-content', this.props.contentClassName), this.props.cssModule)
},
this.props.children
)
);
}
}, {
key: 'renderIntoSubtree',
value: function renderIntoSubtree() {
ReactDOM.unstable_renderSubtreeIntoContainer(this, this.renderChildren(), this._element);
// check if modal should receive focus
if (this._focus) {
this._dialog.parentNode.focus();
this._focus = false;
}
}
}, {
key: 'renderChildren',
value: function renderChildren() {
var _props = this.props,
wrapClassName = _props.wrapClassName,
modalClassName = _props.modalClassName,
backdropClassName = _props.backdropClassName,
cssModule = _props.cssModule,
isOpen = _props.isOpen,
backdrop = _props.backdrop,
modalTransitionTimeout = _props.modalTransitionTimeout,
backdropTransitionTimeout = _props.backdropTransitionTimeout;
var modalAttributes = {
onClickCapture: this.handleBackdropClick,
onKeyUp: this.handleEscape,
style: { display: 'block' },
tabIndex: '-1'
};
if (this.hasTransition()) {
return React.createElement(
TransitionGroup,
{ component: 'div', className: mapToCssModules(wrapClassName) },
isOpen && React.createElement(
Fade,
_extends({
key: 'modal-dialog',
onEnter: this.onEnter,
onLeave: this.onExit,
transitionAppearTimeout: typeof this.props.modalTransitionAppearTimeout === 'number' ? this.props.modalTransitionAppearTimeout : modalTransitionTimeout,
transitionEnterTimeout: typeof this.props.modalTransitionEnterTimeout === 'number' ? this.props.modalTransitionEnterTimeout : modalTransitionTimeout,
transitionLeaveTimeout: typeof this.props.modalTransitionLeaveTimeout === 'number' ? this.props.modalTransitionLeaveTimeout : modalTransitionTimeout,
cssModule: cssModule,
className: mapToCssModules(classNames('modal', modalClassName), cssModule)
}, modalAttributes),
this.renderModalDialog()
),
isOpen && backdrop && React.createElement(Fade, {
key: 'modal-backdrop',
transitionAppearTimeout: typeof this.props.backdropTransitionAppearTimeout === 'number' ? this.props.backdropTransitionAppearTimeout : backdropTransitionTimeout,
transitionEnterTimeout: typeof this.props.backdropTransitionEnterTimeout === 'number' ? this.props.backdropTransitionEnterTimeout : backdropTransitionTimeout,
transitionLeaveTimeout: typeof this.props.backdropTransitionLeaveTimeout === 'number' ? this.props.backdropTransitionLeaveTimeout : backdropTransitionTimeout,
cssModule: cssModule,
className: mapToCssModules(classNames('modal-backdrop', backdropClassName), cssModule)
})
);
}
return React.createElement(
'div',
{ className: mapToCssModules(wrapClassName) },
isOpen && React.createElement(
'div',
_extends({
className: mapToCssModules(classNames('modal', 'show', modalClassName), cssModule)
}, modalAttributes),
this.renderModalDialog()
),
isOpen && backdrop && React.createElement('div', {
className: mapToCssModules(classNames('modal-backdrop', 'show', backdropClassName), cssModule)
})
);
}
}, {
key: 'render',
value: function render() {
return null;
}
}]);
return Modal;
}(React.Component);
Modal.propTypes = propTypes$40;
Modal.defaultProps = defaultProps$39;
var propTypes$41 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
wrapTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
toggle: PropTypes.func,
className: PropTypes.string,
cssModule: PropTypes.object,
children: PropTypes.node
};
var defaultProps$40 = {
tag: 'h4',
wrapTag: 'div'
};
var ModalHeader = function ModalHeader(props) {
var closeButton = void 0;
var className = props.className,
cssModule = props.cssModule,
children = props.children,
toggle = props.toggle,
Tag = props.tag,
WrapTag = props.wrapTag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'children', 'toggle', 'tag', 'wrapTag']);
var classes = mapToCssModules(classNames(className, 'modal-header'), cssModule);
if (toggle) {
closeButton = React.createElement(
'button',
{ type: 'button', onClick: toggle, className: 'close', 'aria-label': 'Close' },
React.createElement(
'span',
{ 'aria-hidden': 'true' },
String.fromCharCode(215)
)
);
}
return React.createElement(
WrapTag,
_extends({}, attributes, { className: classes }),
React.createElement(
Tag,
{ className: mapToCssModules('modal-title', cssModule) },
children
),
closeButton
);
};
ModalHeader.propTypes = propTypes$41;
ModalHeader.defaultProps = defaultProps$40;
var propTypes$42 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$41 = {
tag: 'div'
};
var ModalBody = function ModalBody(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'modal-body'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ModalBody.propTypes = propTypes$42;
ModalBody.defaultProps = defaultProps$41;
var propTypes$43 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$42 = {
tag: 'div'
};
var ModalFooter = function ModalFooter(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'modal-footer'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ModalFooter.propTypes = propTypes$43;
ModalFooter.defaultProps = defaultProps$42;
var propTypes$44 = {
placement: PropTypes.oneOf(tetherAttachements),
target: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
isOpen: PropTypes.bool,
disabled: PropTypes.bool,
tether: PropTypes.object,
tetherRef: PropTypes.func,
className: PropTypes.string,
cssModule: PropTypes.object,
toggle: PropTypes.func,
autohide: PropTypes.bool,
delay: PropTypes.oneOfType([PropTypes.shape({ show: PropTypes.number, hide: PropTypes.number }), PropTypes.number])
};
var DEFAULT_DELAYS = {
show: 0,
hide: 250
};
var defaultProps$43 = {
isOpen: false,
placement: 'bottom',
delay: DEFAULT_DELAYS,
autohide: true,
toggle: function toggle() {}
};
var defaultTetherConfig$2 = {
classPrefix: 'bs-tether',
classes: {
element: false,
enabled: 'show'
},
constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
};
var Tooltip = function (_React$Component) {
inherits(Tooltip, _React$Component);
function Tooltip(props) {
classCallCheck(this, Tooltip);
var _this = possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, props));
_this.addTargetEvents = _this.addTargetEvents.bind(_this);
_this.getTarget = _this.getTarget.bind(_this);
_this.getTetherConfig = _this.getTetherConfig.bind(_this);
_this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
_this.removeTargetEvents = _this.removeTargetEvents.bind(_this);
_this.toggle = _this.toggle.bind(_this);
_this.onMouseOverTooltip = _this.onMouseOverTooltip.bind(_this);
_this.onMouseLeaveTooltip = _this.onMouseLeaveTooltip.bind(_this);
_this.onMouseOverTooltipContent = _this.onMouseOverTooltipContent.bind(_this);
_this.onMouseLeaveTooltipContent = _this.onMouseLeaveTooltipContent.bind(_this);
_this.show = _this.show.bind(_this);
_this.hide = _this.hide.bind(_this);
return _this;
}
createClass(Tooltip, [{
key: 'componentDidMount',
value: function componentDidMount() {
this._target = this.getTarget();
this.addTargetEvents();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.removeTargetEvents();
}
}, {
key: 'onMouseOverTooltip',
value: function onMouseOverTooltip() {
if (this._hideTimeout) {
this.clearHideTimeout();
}
this._showTimeout = setTimeout(this.show, this.getDelay('show'));
}
}, {
key: 'onMouseLeaveTooltip',
value: function onMouseLeaveTooltip() {
if (this._showTimeout) {
this.clearShowTimeout();
}
this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));
}
}, {
key: 'onMouseOverTooltipContent',
value: function onMouseOverTooltipContent() {
if (this.props.autohide) {
return;
}
if (this._hideTimeout) {
this.clearHideTimeout();
}
}
}, {
key: 'onMouseLeaveTooltipContent',
value: function onMouseLeaveTooltipContent() {
if (this.props.autohide) {
return;
}
if (this._showTimeout) {
this.clearShowTimeout();
}
this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));
}
}, {
key: 'getDelay',
value: function getDelay(key) {
var delay = this.props.delay;
if ((typeof delay === 'undefined' ? 'undefined' : _typeof(delay)) === 'object') {
return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];
}
return delay;
}
}, {
key: 'getTarget',
value: function getTarget() {
var target = this.props.target;
if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object') {
return target;
}
return document.getElementById(target);
}
}, {
key: 'getTetherConfig',
value: function getTetherConfig() {
var attachments = getTetherAttachments(this.props.placement);
return _extends({}, defaultTetherConfig$2, attachments, {
target: this.getTarget
}, this.props.tether);
}
}, {
key: 'show',
value: function show() {
if (!this.props.isOpen) {
this.clearShowTimeout();
this.toggle();
}
}
}, {
key: 'hide',
value: function hide() {
if (this.props.isOpen) {
this.clearHideTimeout();
this.toggle();
}
}
}, {
key: 'clearShowTimeout',
value: function clearShowTimeout() {
clearTimeout(this._showTimeout);
this._showTimeout = undefined;
}
}, {
key: 'clearHideTimeout',
value: function clearHideTimeout() {
clearTimeout(this._hideTimeout);
this._hideTimeout = undefined;
}
}, {
key: 'handleDocumentClick',
value: function handleDocumentClick(e) {
if (e.target === this._target || this._target.contains(e.target)) {
if (this._hideTimeout) {
this.clearHideTimeout();
}
if (!this.props.isOpen) {
this.toggle();
}
}
}
}, {
key: 'addTargetEvents',
value: function addTargetEvents() {
this._target.addEventListener('mouseover', this.onMouseOverTooltip, true);
this._target.addEventListener('mouseout', this.onMouseLeaveTooltip, true);
document.addEventListener('click', this.handleDocumentClick, true);
}
}, {
key: 'removeTargetEvents',
value: function removeTargetEvents() {
this._target.removeEventListener('mouseover', this.onMouseOverTooltip, true);
this._target.removeEventListener('mouseout', this.onMouseLeaveTooltip, true);
document.removeEventListener('click', this.handleDocumentClick, true);
}
}, {
key: 'toggle',
value: function toggle(e) {
if (this.props.disabled) {
return e && e.preventDefault();
}
return this.props.toggle();
}
}, {
key: 'render',
value: function render() {
if (!this.props.isOpen) {
return null;
}
var attributes = omit(this.props, Object.keys(propTypes$44));
var classes = mapToCssModules(classNames('tooltip-inner', this.props.className), this.props.cssModule);
var tetherConfig = this.getTetherConfig();
return React.createElement(
TetherContent,
{
className: 'tooltip',
tether: tetherConfig,
tetherRef: this.props.tetherRef,
isOpen: this.props.isOpen,
toggle: this.toggle
},
React.createElement('div', _extends({}, attributes, {
className: classes,
onMouseOver: this.onMouseOverTooltipContent,
onMouseLeave: this.onMouseLeaveTooltipContent
}))
);
}
}]);
return Tooltip;
}(React.Component);
Tooltip.propTypes = propTypes$44;
Tooltip.defaultProps = defaultProps$43;
var propTypes$45 = {
className: PropTypes.string,
cssModule: PropTypes.object,
size: PropTypes.string,
bordered: PropTypes.bool,
striped: PropTypes.bool,
inverse: PropTypes.bool,
hover: PropTypes.bool,
reflow: PropTypes.bool,
responsive: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
responsiveTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
var defaultProps$44 = {
tag: 'table',
responsiveTag: 'div'
};
var Table = function Table(props) {
var className = props.className,
cssModule = props.cssModule,
size = props.size,
bordered = props.bordered,
striped = props.striped,
inverse = props.inverse,
hover = props.hover,
reflow = props.reflow,
responsive = props.responsive,
Tag = props.tag,
ResponsiveTag = props.responsiveTag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'size', 'bordered', 'striped', 'inverse', 'hover', 'reflow', 'responsive', 'tag', 'responsiveTag']);
var classes = mapToCssModules(classNames(className, 'table', size ? 'table-' + size : false, bordered ? 'table-bordered' : false, striped ? 'table-striped' : false, inverse ? 'table-inverse' : false, hover ? 'table-hover' : false, reflow ? 'table-reflow' : false), cssModule);
var table = React.createElement(Tag, _extends({}, attributes, { className: classes }));
if (responsive) {
return React.createElement(
ResponsiveTag,
{ className: 'table-responsive' },
table
);
}
return table;
};
Table.propTypes = propTypes$45;
Table.defaultProps = defaultProps$44;
var propTypes$46 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
flush: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$45 = {
tag: 'ul'
};
var ListGroup = function ListGroup(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
flush = props.flush,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'flush']);
var classes = mapToCssModules(classNames(className, 'list-group', flush ? 'list-group-flush' : false), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ListGroup.propTypes = propTypes$46;
ListGroup.defaultProps = defaultProps$45;
var propTypes$47 = {
children: PropTypes.node,
inline: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$46 = {
tag: 'form'
};
var Form = function Form(props) {
var className = props.className,
cssModule = props.cssModule,
inline = props.inline,
Tag = props.tag,
getRef = props.getRef,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'inline', 'tag', 'getRef']);
var classes = mapToCssModules(classNames(className, inline ? 'form-inline' : false), cssModule);
return React.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
};
Form.propTypes = propTypes$47;
Form.defaultProps = defaultProps$46;
var propTypes$48 = {
children: PropTypes.node,
tag: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$47 = {
tag: 'div'
};
var FormFeedback = function FormFeedback(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'form-control-feedback'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
FormFeedback.propTypes = propTypes$48;
FormFeedback.defaultProps = defaultProps$47;
var propTypes$49 = {
children: PropTypes.node,
row: PropTypes.bool,
check: PropTypes.bool,
disabled: PropTypes.bool,
tag: PropTypes.string,
color: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$48 = {
tag: 'div'
};
var FormGroup = function FormGroup(props) {
var className = props.className,
cssModule = props.cssModule,
row = props.row,
disabled = props.disabled,
color = props.color,
check = props.check,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'row', 'disabled', 'color', 'check', 'tag']);
var classes = mapToCssModules(classNames(className, color ? 'has-' + color : false, row ? 'row' : false, check ? 'form-check' : 'form-group', check && disabled ? 'disabled' : false), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
FormGroup.propTypes = propTypes$49;
FormGroup.defaultProps = defaultProps$48;
var propTypes$50 = {
children: PropTypes.node,
inline: PropTypes.bool,
tag: PropTypes.string,
color: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$49 = {
tag: 'small'
};
var FormText = function FormText(props) {
var className = props.className,
cssModule = props.cssModule,
inline = props.inline,
color = props.color,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'inline', 'color', 'tag']);
var classes = mapToCssModules(classNames(className, !inline ? 'form-text' : false, color ? 'text-' + color : false), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
FormText.propTypes = propTypes$50;
FormText.defaultProps = defaultProps$49;
/* eslint react/prefer-stateless-function: 0 */
var propTypes$51 = {
children: PropTypes.node,
type: PropTypes.string,
size: PropTypes.string,
state: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
getRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
static: PropTypes.bool,
addon: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$50 = {
tag: 'p',
type: 'text'
};
var Input = function (_React$Component) {
inherits(Input, _React$Component);
function Input() {
classCallCheck(this, Input);
return possibleConstructorReturn(this, (Input.__proto__ || Object.getPrototypeOf(Input)).apply(this, arguments));
}
createClass(Input, [{
key: 'render',
value: function render() {
var _props = this.props,
className = _props.className,
cssModule = _props.cssModule,
type = _props.type,
size = _props.size,
state = _props.state,
tag = _props.tag,
addon = _props.addon,
staticInput = _props.static,
getRef = _props.getRef,
attributes = objectWithoutProperties(_props, ['className', 'cssModule', 'type', 'size', 'state', 'tag', 'addon', 'static', 'getRef']);
var checkInput = ['radio', 'checkbox'].indexOf(type) > -1;
var fileInput = type === 'file';
var textareaInput = type === 'textarea';
var selectInput = type === 'select';
var Tag = selectInput || textareaInput ? type : 'input';
var formControlClass = 'form-control';
if (staticInput) {
formControlClass = formControlClass + '-static';
Tag = tag;
} else if (fileInput) {
formControlClass = formControlClass + '-file';
} else if (checkInput) {
if (addon) {
formControlClass = null;
} else {
formControlClass = 'form-check-input';
}
}
var classes = mapToCssModules(classNames(className, state ? 'form-control-' + state : false, size ? 'form-control-' + size : false, formControlClass), cssModule);
if (Tag === 'input') {
attributes.type = type;
}
return React.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
}
}]);
return Input;
}(React.Component);
Input.propTypes = propTypes$51;
Input.defaultProps = defaultProps$50;
var propTypes$52 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
size: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$51 = {
tag: 'div'
};
var InputGroup = function InputGroup(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
size = props.size,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'size']);
var classes = mapToCssModules(classNames(className, 'input-group', size ? 'input-group-' + size : null), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
InputGroup.propTypes = propTypes$52;
InputGroup.defaultProps = defaultProps$51;
var propTypes$53 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$52 = {
tag: 'div'
};
var InputGroupAddon = function InputGroupAddon(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
var classes = mapToCssModules(classNames(className, 'input-group-addon'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
InputGroupAddon.propTypes = propTypes$53;
InputGroupAddon.defaultProps = defaultProps$52;
var propTypes$54 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
children: PropTypes.node,
groupClassName: PropTypes.string,
groupAttributes: PropTypes.object,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$53 = {
tag: 'div'
};
var InputGroupButton = function InputGroupButton(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
children = props.children,
groupClassName = props.groupClassName,
groupAttributes = props.groupAttributes,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'children', 'groupClassName', 'groupAttributes']);
if (typeof children === 'string') {
var groupClasses = mapToCssModules(classNames(groupClassName, 'input-group-btn'), cssModule);
return React.createElement(
Tag,
_extends({}, groupAttributes, { className: groupClasses }),
React.createElement(Button, _extends({}, attributes, { className: className, children: children }))
);
}
var classes = mapToCssModules(classNames(className, 'input-group-btn'), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes, children: children }));
};
InputGroupButton.propTypes = propTypes$54;
InputGroupButton.defaultProps = defaultProps$53;
var colSizes = ['xs', 'sm', 'md', 'lg', 'xl'];
var stringOrNumberProp$1 = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);
var columnProps$1 = PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.shape({
size: stringOrNumberProp$1,
push: stringOrNumberProp$1,
pull: stringOrNumberProp$1,
offset: stringOrNumberProp$1
})]);
var propTypes$55 = {
children: PropTypes.node,
hidden: PropTypes.bool,
check: PropTypes.bool,
inline: PropTypes.bool,
disabled: PropTypes.bool,
size: PropTypes.string,
for: PropTypes.string,
tag: PropTypes.string,
className: PropTypes.string,
cssModule: PropTypes.object,
xs: columnProps$1,
sm: columnProps$1,
md: columnProps$1,
lg: columnProps$1,
xl: columnProps$1
};
var defaultProps$54 = {
tag: 'label'
};
var Label = function Label(props) {
var className = props.className,
cssModule = props.cssModule,
hidden = props.hidden,
Tag = props.tag,
check = props.check,
inline = props.inline,
disabled = props.disabled,
size = props.size,
htmlFor = props.for,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'hidden', 'tag', 'check', 'inline', 'disabled', 'size', 'for']);
var colClasses = [];
colSizes.forEach(function (colSize) {
var columnProp = props[colSize];
delete attributes[colSize];
if (columnProp && columnProp.size) {
var _classNames;
colClasses.push(mapToCssModules(classNames((_classNames = {}, defineProperty(_classNames, 'col-' + colSize + '-' + columnProp.size, columnProp.size), defineProperty(_classNames, 'push-' + colSize + '-' + columnProp.push, columnProp.push), defineProperty(_classNames, 'pull-' + colSize + '-' + columnProp.pull, columnProp.pull), defineProperty(_classNames, 'offset-' + colSize + '-' + columnProp.offset, columnProp.offset), _classNames))), cssModule);
} else if (columnProp) {
colClasses.push('col-' + colSize + '-' + columnProp);
}
});
var classes = mapToCssModules(classNames(className, hidden ? 'sr-only' : false, check ? 'form-check-' + (inline ? 'inline' : 'label') : false, check && inline && disabled ? 'disabled' : false, size ? 'col-form-label-' + size : false, colClasses, colClasses.length ? 'col-form-label' : false), cssModule);
return React.createElement(Tag, _extends({ htmlFor: htmlFor }, attributes, { className: classes }));
};
Label.propTypes = propTypes$55;
Label.defaultProps = defaultProps$54;
var propTypes$56 = {
body: PropTypes.bool,
bottom: PropTypes.bool,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
heading: PropTypes.bool,
left: PropTypes.bool,
list: PropTypes.bool,
middle: PropTypes.bool,
object: PropTypes.bool,
right: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
top: PropTypes.bool
};
var Media = function Media(props) {
var body = props.body,
bottom = props.bottom,
className = props.className,
cssModule = props.cssModule,
heading = props.heading,
left = props.left,
list = props.list,
middle = props.middle,
object = props.object,
right = props.right,
tag = props.tag,
top = props.top,
attributes = objectWithoutProperties(props, ['body', 'bottom', 'className', 'cssModule', 'heading', 'left', 'list', 'middle', 'object', 'right', 'tag', 'top']);
var defaultTag = void 0;
if (heading) {
defaultTag = 'h4';
} else if (left || right) {
defaultTag = 'a';
} else if (object) {
defaultTag = 'img';
} else if (list) {
defaultTag = 'ul';
} else {
defaultTag = 'div';
}
var Tag = tag || defaultTag;
var classes = mapToCssModules(classNames(className, {
'media-body': body,
'media-heading': heading,
'media-left': left,
'media-right': right,
'media-top': top,
'media-bottom': bottom,
'media-middle': middle,
'media-object': object,
'media-list': list,
media: !body && !heading && !left && !right && !top && !bottom && !middle && !object && !list
}), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Media.propTypes = propTypes$56;
var propTypes$57 = {
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
size: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
var defaultProps$55 = {
tag: 'ul'
};
var Pagination = function Pagination(props) {
var className = props.className,
cssModule = props.cssModule,
size = props.size,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'size', 'tag']);
var classes = mapToCssModules(classNames(className, 'pagination', defineProperty({}, 'pagination-' + size, !!size)), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Pagination.propTypes = propTypes$57;
Pagination.defaultProps = defaultProps$55;
var propTypes$58 = {
active: PropTypes.bool,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
disabled: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
var defaultProps$56 = {
tag: 'li'
};
var PaginationItem = function PaginationItem(props) {
var active = props.active,
className = props.className,
cssModule = props.cssModule,
disabled = props.disabled,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['active', 'className', 'cssModule', 'disabled', 'tag']);
var classes = mapToCssModules(classNames(className, 'page-item', {
active: active,
disabled: disabled
}), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
PaginationItem.propTypes = propTypes$58;
PaginationItem.defaultProps = defaultProps$56;
var propTypes$59 = {
'aria-label': PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
next: PropTypes.bool,
previous: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
var defaultProps$57 = {
tag: 'a'
};
var PaginationLink = function PaginationLink(props) {
var className = props.className,
cssModule = props.cssModule,
next = props.next,
previous = props.previous,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'next', 'previous', 'tag']);
var classes = mapToCssModules(classNames(className, 'page-link'), cssModule);
var defaultAriaLabel = void 0;
if (previous) {
defaultAriaLabel = 'Previous';
} else if (next) {
defaultAriaLabel = 'Next';
}
var ariaLabel = props['aria-label'] || defaultAriaLabel;
var defaultCaret = void 0;
if (previous) {
defaultCaret = '\xAB';
} else if (next) {
defaultCaret = '\xBB';
}
var children = props.children;
if (previous || next) {
children = [React.createElement(
'span',
{
'aria-hidden': 'true',
key: 'caret'
},
children || defaultCaret
), React.createElement(
'span',
{
className: 'sr-only',
key: 'sr'
},
ariaLabel
)];
}
return React.createElement(
Tag,
_extends({}, attributes, {
className: classes,
'aria-label': ariaLabel
}),
children
);
};
PaginationLink.propTypes = propTypes$59;
PaginationLink.defaultProps = defaultProps$57;
var propTypes$60 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
activeTab: PropTypes.any,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$58 = {
tag: 'div'
};
var childContextTypes$1 = {
activeTabId: PropTypes.any
};
var TabContent = function (_Component) {
inherits(TabContent, _Component);
function TabContent(props) {
classCallCheck(this, TabContent);
var _this = possibleConstructorReturn(this, (TabContent.__proto__ || Object.getPrototypeOf(TabContent)).call(this, props));
_this.state = {
activeTab: _this.props.activeTab
};
return _this;
}
createClass(TabContent, [{
key: 'getChildContext',
value: function getChildContext() {
return {
activeTabId: this.state.activeTab
};
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.state.activeTab !== nextProps.activeTab) {
this.setState({
activeTab: nextProps.activeTab
});
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
className = _props.className,
cssModule = _props.cssModule,
Tag = _props.tag;
var attributes = omit(this.props, Object.keys(propTypes$60));
var classes = mapToCssModules(classNames('tab-content', className), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
}
}]);
return TabContent;
}(Component);
TabContent.propTypes = propTypes$60;
TabContent.defaultProps = defaultProps$58;
TabContent.childContextTypes = childContextTypes$1;
var propTypes$61 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object,
tabId: PropTypes.any
};
var defaultProps$59 = {
tag: 'div'
};
var contextTypes$3 = {
activeTabId: PropTypes.any
};
function TabPane(props, context) {
var className = props.className,
cssModule = props.cssModule,
tabId = props.tabId,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tabId', 'tag']);
var classes = mapToCssModules(classNames('tab-pane', className, { active: tabId === context.activeTabId }), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
}
TabPane.propTypes = propTypes$61;
TabPane.defaultProps = defaultProps$59;
TabPane.contextTypes = contextTypes$3;
var propTypes$62 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
fluid: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object
};
var defaultProps$60 = {
tag: 'div'
};
var Jumbotron = function Jumbotron(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
fluid = props.fluid,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'fluid']);
var classes = mapToCssModules(classNames(className, 'jumbotron', fluid ? 'jumbotron-fluid' : false), cssModule);
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Jumbotron.propTypes = propTypes$62;
Jumbotron.defaultProps = defaultProps$60;
var FirstChild = function FirstChild(_ref) {
var children = _ref.children;
return React.Children.toArray(children)[0] || null;
};
var propTypes$63 = {
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
color: PropTypes.string,
isOpen: PropTypes.bool,
toggle: PropTypes.func,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
transitionAppearTimeout: PropTypes.number,
transitionEnterTimeout: PropTypes.number,
transitionLeaveTimeout: PropTypes.number
};
var defaultProps$61 = {
color: 'success',
isOpen: true,
tag: 'div',
transitionAppearTimeout: 150,
transitionEnterTimeout: 150,
transitionLeaveTimeout: 150
};
var Alert = function Alert(props) {
var className = props.className,
cssModule = props.cssModule,
Tag = props.tag,
color = props.color,
isOpen = props.isOpen,
toggle = props.toggle,
children = props.children,
transitionAppearTimeout = props.transitionAppearTimeout,
transitionEnterTimeout = props.transitionEnterTimeout,
transitionLeaveTimeout = props.transitionLeaveTimeout,
attributes = objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'color', 'isOpen', 'toggle', 'children', 'transitionAppearTimeout', 'transitionEnterTimeout', 'transitionLeaveTimeout']);
var classes = mapToCssModules(classNames(className, 'alert', 'alert-' + color, { 'alert-dismissible': toggle }), cssModule);
var alert = React.createElement(
Tag,
_extends({}, attributes, { className: classes, role: 'alert' }),
toggle ? React.createElement(
'button',
{ type: 'button', className: 'close', 'aria-label': 'Close', onClick: toggle },
React.createElement(
'span',
{ 'aria-hidden': 'true' },
'\xD7'
)
) : null,
children
);
return React.createElement(
CSSTransitionGroup,
{
component: FirstChild,
transitionName: {
appear: 'fade',
appearActive: 'show',
enter: 'fade',
enterActive: 'show',
leave: 'fade',
leaveActive: 'out'
},
transitionAppear: transitionAppearTimeout > 0,
transitionAppearTimeout: transitionAppearTimeout,
transitionEnter: transitionEnterTimeout > 0,
transitionEnterTimeout: transitionEnterTimeout,
transitionLeave: transitionLeaveTimeout > 0,
transitionLeaveTimeout: transitionLeaveTimeout
},
isOpen ? alert : null
);
};
Alert.propTypes = propTypes$63;
Alert.defaultProps = defaultProps$61;
var SHOW = 'SHOW';
var SHOWN = 'SHOWN';
var HIDE = 'HIDE';
var HIDDEN = 'HIDDEN';
var propTypes$64 = {
isOpen: PropTypes.bool,
className: PropTypes.node,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
cssModule: PropTypes.object,
navbar: PropTypes.bool,
delay: PropTypes.oneOfType([PropTypes.shape({ show: PropTypes.number, hide: PropTypes.number }), PropTypes.number]),
onOpened: PropTypes.func,
onClosed: PropTypes.func
};
var DEFAULT_DELAYS$1 = {
show: 350,
hide: 350
};
var defaultProps$62 = {
isOpen: false,
tag: 'div',
delay: DEFAULT_DELAYS$1,
onOpened: function onOpened() {},
onClosed: function onClosed() {}
};
var Collapse = function (_Component) {
inherits(Collapse, _Component);
function Collapse(props) {
classCallCheck(this, Collapse);
var _this = possibleConstructorReturn(this, (Collapse.__proto__ || Object.getPrototypeOf(Collapse)).call(this, props));
_this.state = {
collapse: props.isOpen ? SHOWN : HIDDEN,
height: null
};
_this.element = null;
return _this;
}
createClass(Collapse, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var _this2 = this;
var willOpen = nextProps.isOpen;
var collapse = this.state.collapse;
if (willOpen && collapse === HIDDEN) {
// will open
this.setState({ collapse: SHOW }, function () {
// the height transition will work after class "collapsing" applied
_this2.setState({ height: _this2.getHeight() });
_this2.transitionTag = setTimeout(function () {
_this2.setState({
collapse: SHOWN,
height: null
});
}, _this2.getDelay('show'));
});
} else if (!willOpen && collapse === SHOWN) {
// will hide
this.setState({ height: this.getHeight() }, function () {
_this2.setState({
collapse: HIDE,
height: _this2.getHeight()
}, function () {
_this2.setState({ height: 0 });
});
});
this.transitionTag = setTimeout(function () {
_this2.setState({
collapse: HIDDEN,
height: null
});
}, this.getDelay('hide'));
}
// else: do nothing.
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState) {
if (this.state.collapse === SHOWN && prevState && prevState.collapse !== SHOWN) {
this.props.onOpened();
}
if (this.state.collapse === HIDDEN && prevState && prevState.collapse !== HIDDEN) {
this.props.onClosed();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
clearTimeout(this.transitionTag);
}
}, {
key: 'getDelay',
value: function getDelay(key) {
var delay = this.props.delay;
if ((typeof delay === 'undefined' ? 'undefined' : _typeof(delay)) === 'object') {
return isNaN(delay[key]) ? DEFAULT_DELAYS$1[key] : delay[key];
}
return delay;
}
}, {
key: 'getHeight',
value: function getHeight() {
return this.element.scrollHeight;
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
var _omit = omit(this.props, ['isOpen', 'delay', 'onOpened', 'onClosed']),
navbar = _omit.navbar,
className = _omit.className,
cssModule = _omit.cssModule,
Tag = _omit.tag,
attributes = objectWithoutProperties(_omit, ['navbar', 'className', 'cssModule', 'tag']);
var _state = this.state,
collapse = _state.collapse,
height = _state.height;
var collapseClass = void 0;
switch (collapse) {
case SHOW:
collapseClass = 'collapsing';
break;
case SHOWN:
collapseClass = 'collapse show';
break;
case HIDE:
collapseClass = 'collapsing';
break;
case HIDDEN:
collapseClass = 'collapse';
break;
default:
// HIDDEN
collapseClass = 'collapse';
}
var classes = mapToCssModules(classNames(className, collapseClass, navbar && 'navbar-collapse'), cssModule);
var style = height === null ? null : { height: height };
return React.createElement(Tag, _extends({}, attributes, {
style: _extends({}, attributes.style, style),
className: classes,
ref: function ref(c) {
_this3.element = c;
}
}));
}
}]);
return Collapse;
}(Component);
Collapse.propTypes = propTypes$64;
Collapse.defaultProps = defaultProps$62;
var propTypes$65 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
active: PropTypes.bool,
disabled: PropTypes.bool,
color: PropTypes.string,
action: PropTypes.bool,
className: PropTypes.any
};
var defaultProps$63 = {
tag: 'li'
};
var handleDisabledOnClick = function handleDisabledOnClick(e) {
e.preventDefault();
};
var ListGroupItem = function ListGroupItem(props) {
var className = props.className,
Tag = props.tag,
active = props.active,
disabled = props.disabled,
action = props.action,
color = props.color,
attributes = objectWithoutProperties(props, ['className', 'tag', 'active', 'disabled', 'action', 'color']);
var classes = classNames(className, active ? 'active' : false, disabled ? 'disabled' : false, action ? 'list-group-item-action' : false, color ? 'list-group-item-' + color : false, 'list-group-item');
// Prevent click event when disabled.
if (disabled) {
attributes.onClick = handleDisabledOnClick;
}
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ListGroupItem.propTypes = propTypes$65;
ListGroupItem.defaultProps = defaultProps$63;
var propTypes$66 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.any
};
var defaultProps$64 = {
tag: 'h5'
};
var ListGroupItemHeading = function ListGroupItemHeading(props) {
var className = props.className,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'tag']);
var classes = classNames(className, 'list-group-item-heading');
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ListGroupItemHeading.propTypes = propTypes$66;
ListGroupItemHeading.defaultProps = defaultProps$64;
var propTypes$67 = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.any
};
var defaultProps$65 = {
tag: 'p'
};
var ListGroupItemText = function ListGroupItemText(props) {
var className = props.className,
Tag = props.tag,
attributes = objectWithoutProperties(props, ['className', 'tag']);
var classes = classNames(className, 'list-group-item-text');
return React.createElement(Tag, _extends({}, attributes, { className: classes }));
};
ListGroupItemText.propTypes = propTypes$67;
ListGroupItemText.defaultProps = defaultProps$65;
var Component$1 = React.Component;
var components = {
UncontrolledAlert: Alert,
UncontrolledButtonDropdown: ButtonDropdown,
UncontrolledDropdown: Dropdown,
UncontrolledNavDropdown: NavDropdown,
UncontrolledTooltip: Tooltip
};
Object.keys(components).forEach(function (key) {
var Tag = components[key];
var defaultValue = Tag === Alert;
var Uncontrolled = function (_Component) {
inherits(Uncontrolled, _Component);
function Uncontrolled(props) {
classCallCheck(this, Uncontrolled);
var _this = possibleConstructorReturn(this, (Uncontrolled.__proto__ || Object.getPrototypeOf(Uncontrolled)).call(this, props));
_this.state = { isOpen: defaultValue };
_this.toggle = _this.toggle.bind(_this);
return _this;
}
createClass(Uncontrolled, [{
key: 'toggle',
value: function toggle() {
this.setState({ isOpen: !this.state.isOpen });
}
}, {
key: 'render',
value: function render() {
return React.createElement(Tag, _extends({ isOpen: this.state.isOpen, toggle: this.toggle }, this.props));
}
}]);
return Uncontrolled;
}(Component$1);
Uncontrolled.displayName = key;
components[key] = Uncontrolled;
});
var UncontrolledAlert = components.UncontrolledAlert;
var UncontrolledButtonDropdown = components.UncontrolledButtonDropdown;
var UncontrolledDropdown = components.UncontrolledDropdown;
var UncontrolledNavDropdown = components.UncontrolledNavDropdown;
var UncontrolledTooltip = components.UncontrolledTooltip;
export { Alert, Container, Row, Col, Navbar, NavbarBrand, NavbarToggler, Nav, NavItem, NavDropdown, NavLink, Breadcrumb, BreadcrumbItem, Button, ButtonDropdown, ButtonGroup, ButtonToolbar, Dropdown, DropdownItem, DropdownMenu, DropdownToggle, Fade, Badge, Card, CardLink, CardGroup, CardDeck, CardColumns, CardBlock, CardFooter, CardHeader, CardImg, CardImgOverlay, CardSubtitle, CardText, CardTitle, Popover, PopoverContent, PopoverTitle, Progress, Modal, ModalHeader, ModalBody, ModalFooter, TetherContent, Tooltip, Table, ListGroup, Form, FormFeedback, FormGroup, FormText, Input, InputGroup, InputGroupAddon, InputGroupButton, Label, Media, Pagination, PaginationItem, PaginationLink, TabContent, TabPane, Jumbotron, Collapse, ListGroupItem, ListGroupItemText, ListGroupItemHeading, UncontrolledAlert, UncontrolledButtonDropdown, UncontrolledDropdown, UncontrolledNavDropdown, UncontrolledTooltip };
//# sourceMappingURL=reactstrap.es.js.map
(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?t(exports,require('react'),require('react-dom'),require('react-transition-group')):'function'==typeof define&&define.amd?define(['exports','react','react-dom','react-transition-group'],t):t(e.Reactstrap=e.Reactstrap||{},e.React,e.ReactDOM,e.ReactTransitionGroup)})(this,function(e,t,o,a){'use strict';function n(){throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs')}function s(e,t){return t={exports:{}},e(t,t.exports),t.exports}function l(e){return function(){return e}}function r(e){var t={};return t='top'===e||'top center'===e?{attachment:'bottom center',targetAttachment:'top center'}:'bottom'===e||'bottom center'===e?{attachment:'top center',targetAttachment:'bottom center'}:'left'===e||'left center'===e?{attachment:'middle right',targetAttachment:'middle left'}:'right'===e||'right center'===e?{attachment:'middle left',targetAttachment:'middle right'}:'top left'===e?{attachment:'bottom left',targetAttachment:'top left'}:'top right'===e?{attachment:'bottom right',targetAttachment:'top right'}:'bottom left'===e?{attachment:'top left',targetAttachment:'bottom left'}:'bottom right'===e?{attachment:'top right',targetAttachment:'bottom right'}:'right top'===e?{attachment:'top left',targetAttachment:'top right'}:'right bottom'===e?{attachment:'bottom left',targetAttachment:'bottom right'}:'left top'===e?{attachment:'top right',targetAttachment:'top left'}:'left bottom'===e?{attachment:'bottom right',targetAttachment:'bottom left'}:{attachment:'top center',targetAttachment:'bottom center'},t}function i(){var e=document.createElement('div');e.style.position='absolute',e.style.top='-9999px',e.style.width='50px',e.style.height='50px',e.style.overflow='scroll',document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function d(e){document.body.style.paddingRight=0<e?e+'px':null}function p(){return document.body.clientWidth<window.innerWidth}function c(){return parseInt(window.getComputedStyle(document.body,null).getPropertyValue('padding-right')||0,10)}function u(){var e=i(),t=document.querySelectorAll('.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed')[0],o=t?parseInt(t.style.paddingRight||0,10):0;p()&&d(o+e)}function g(e,t){return t?e.split(' ').map(function(e){return t[e]||e}).join(' '):e}function m(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2]);}return e.apply(t,o)}function f(e,t){var o=e?e.length:0;return!!o&&-1<T(e,t,0)}function h(e,t,o){for(var a=-1,s=e?e.length:0;++a<s;)if(o(t,e[a]))return!0;return!1}function b(e,t){for(var o=-1,a=e?e.length:0,s=Array(a);++o<a;)s[o]=t(e[o],o,e);return s}function y(e,t){for(var o=-1,a=t.length,s=e.length;++o<a;)e[s+o]=t[o];return e}function v(e,t,o,a){for(var s=e.length,n=o+(a?1:-1);a?n--:++n<s;)if(t(e[n],n,e))return n;return-1}function T(e,t,o){if(t!==t)return v(e,N,o);for(var a=o-1,s=e.length;++a<s;)if(e[a]===t)return a;return-1}function N(e){return e!==e}function k(e,t){for(var o=-1,a=Array(e);++o<e;)a[o]=t(o);return a}function M(e){return function(t){return e(t)}}function _(e,t){return e.has(t)}function C(e,t){return null==e?void 0:e[t]}function E(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t}function O(e,t){return function(o){return e(t(o))}}function w(e){var t=-1,o=e?e.length:0;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function P(e){var t=-1,o=e?e.length:0;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function x(e){var t=-1,o=e?e.length:0;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function j(e){var t=-1,o=e?e.length:0;for(this.__data__=new x;++t<o;)this.add(e[t])}function A(e,t){var o=Lt(e)||Q(e)?k(e.length,String):[],a=o.length;for(var s in e)(t||Tt.call(e,s))&&!(!!a&&('length'==s||q(s,a)))&&o.push(s);return o}function D(e,t){for(var o=e.length;o--;)if(Z(e[o][0],t))return o;return-1}function L(e,t,o,a){var s=-1,n=f,l=!0,r=e.length,i=[],d=t.length;if(!r)return i;o&&(t=b(t,M(o))),a?(n=h,l=!1):t.length>=et&&(n=_,l=!1,t=new j(t));outer:for(;++s<r;){var p=e[s],c=o?o(p):p;if(p=a||0!==p?p:0,l&&c===c){for(var u=d;u--;)if(t[u]===c)continue outer;i.push(p)}else n(t,c,a)||i.push(p)}return i}function S(e,t,o,a,s){var n=-1,l=e.length;for(o||(o=F),s||(s=[]);++n<l;){var r=e[n];0<t&&o(r)?1<t?S(r,t-1,o,a,s):y(s,r):!a&&(s[s.length]=r)}return s}function R(e,t,o){var a=t(e);return Lt(e)?a:y(a,o(e))}function z(e){if(!se(e)||Y(e))return!1;var t=oe(e)||E(e)?kt:dt;return t.test(J(e))}function I(e){if(!se(e))return $(e);var t=X(e),o=[];for(var a in e)('constructor'!=a||!t&&Tt.call(e,a))&&o.push(a);return o}function B(e,t){return e=Object(e),W(e,t,function(t,o){return o in e})}function W(e,t,o){for(var a=-1,s=t.length,n={};++a<s;){var l=t[a],r=e[l];o(r,l)&&(n[l]=r)}return n}function U(e){return R(e,re,Dt)}function H(e,t){var o=e.__data__;return V(t)?o['string'==typeof t?'string':'hash']:o.map}function G(e,t){var o=C(e,t);return z(o)?o:void 0}function F(e){return Lt(e)||Q(e)||!!(Ot&&e&&e[Ot])}function q(e,t){return t=null==t?at:t,!!t&&('number'==typeof e||pt.test(e))&&-1<e&&0==e%1&&e<t}function V(e){var t='undefined'==typeof e?'undefined':Te(e);return'string'==t||'number'==t||'symbol'==t||'boolean'==t?'__proto__'!==e:null===e}function Y(e){return!!yt&&yt in e}function X(e){var t=e&&e.constructor,o='function'==typeof t&&t.prototype||ht;return e===o}function $(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}function K(e){if('string'==typeof e||le(e))return e;var t=e+'';return'0'==t&&1/e==-ot?'-0':t}function J(e){if(null!=e){try{return vt.call(e)}catch(t){}try{return e+''}catch(t){}}return''}function Z(e,t){return e===t||e!==e&&t!==t}function Q(e){return te(e)&&Tt.call(e,'callee')&&(!Ct.call(e,'callee')||Nt.call(e)==st)}function ee(e){return null!=e&&ae(e.length)&&!oe(e)}function te(e){return ne(e)&&ee(e)}function oe(e){var t=se(e)?Nt.call(e):'';return t==nt||t==lt}function ae(e){return'number'==typeof e&&-1<e&&0==e%1&&e<=at}function se(e){var t='undefined'==typeof e?'undefined':Te(e);return!!e&&('object'==t||'function'==t)}function ne(e){return!!e&&'object'==('undefined'==typeof e?'undefined':Te(e))}function le(e){return'symbol'==('undefined'==typeof e?'undefined':Te(e))||ne(e)&&Nt.call(e)==rt}function re(e){return ee(e)?A(e,!0):I(e)}function ie(){return[]}function de(e){var t='undefined'==typeof e?'undefined':Te(e);return!!e&&('object'==t||'function'==t)}function pe(e){var t='undefined'==typeof e?'undefined':Te(e);return!!e&&('object'==t||'function'==t)}function ce(e){return!!e&&'object'==('undefined'==typeof e?'undefined':Te(e))}function ue(e){return'symbol'==('undefined'==typeof e?'undefined':Te(e))||ce(e)&&ca.call(e)==sa}function ge(e,t){var o=e.className,a=e.cssModule,s=e.tabId,n=e.tag,l=Ee(e,['className','cssModule','tabId','tag']),r=g(xe('tab-pane',o,{active:s===t.activeTabId}),a);return fe.createElement(n,_e({},l,{className:r}))}var me=Math.max,fe='default'in t?t['default']:t;o=o&&'default'in o?o['default']:o;var he='undefined'==typeof window?'undefined'==typeof global?'undefined'==typeof self?{}:self:global:window,be=function(){};be.thatReturns=l,be.thatReturnsFalse=l(!1),be.thatReturnsTrue=l(!0),be.thatReturnsNull=l(null),be.thatReturnsThis=function(){return this},be.thatReturnsArgument=function(e){return e};var ye=function(){},ve=function(t,o,s,a,n,l,r,e){if(ye(o),!t){var i;if(void 0===o)i=new Error('Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.');else{var d=[s,a,n,l,r,e],p=0;i=new Error(o.replace(/%s/g,function(){return d[p++]})),i.name='Invariant Violation'}throw i.framesToPop=1,i}},Te='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&'function'==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?'symbol':typeof e},Ne=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},ke=function(){function e(e,t){for(var o,a=0;a<t.length;a++)o=t[a],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,a){return o&&e(t.prototype,o),a&&e(t,a),t}}(),Me=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},_e=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var a in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Ce=function(e,t){if('function'!=typeof t&&null!==t)throw new TypeError('Super expression must either be null or a function, not '+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Ee=function(e,t){var o={};for(var a in e)0<=t.indexOf(a)||Object.prototype.hasOwnProperty.call(e,a)&&(o[a]=e[a]);return o},Oe=function(e,t){if(!e)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return t&&('object'==typeof t||'function'==typeof t)?t:e},we=function(){function e(e,t,o,a,s,n){n==='SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'||ve(!1,'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')}function t(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return o.checkPropTypes=be,o.PropTypes=o,o},Pe=s(function(e){e.exports=we()}),xe=s(function(e){(function(){function t(){for(var e,a=[],s=0;s<arguments.length;s++)if(e=arguments[s],e){var n='undefined'==typeof e?'undefined':Te(e);if('string'===n||'number'===n)a.push(e);else if(Array.isArray(e))a.push(t.apply(null,e));else if('object'===n)for(var l in e)o.call(e,l)&&e[l]&&a.push(l)}return a.join(' ')}var o={}.hasOwnProperty;e.exports?e.exports=t:window.classNames=t})()}),je=['top','bottom','left','right','top left','top center','top right','right top','right middle','right bottom','bottom right','bottom center','bottom left','left top','left middle','left bottom'],Ae={tag:Pe.oneOfType([Pe.func,Pe.string]),fluid:Pe.bool,className:Pe.string,cssModule:Pe.object},De=function(e){var t=e.className,o=e.cssModule,a=e.fluid,s=e.tag,n=Ee(e,['className','cssModule','fluid','tag']),l=g(xe(t,a?'container-fluid':'container'),o);return fe.createElement(s,_e({},n,{className:l}))};De.propTypes=Ae,De.defaultProps={tag:'div'};var Le={tag:Pe.oneOfType([Pe.func,Pe.string]),noGutters:Pe.bool,className:Pe.string,cssModule:Pe.object},Se=function(e){var t=e.className,o=e.cssModule,a=e.noGutters,s=e.tag,n=Ee(e,['className','cssModule','noGutters','tag']),l=g(xe(t,a?'no-gutters':null,'row'),o);return fe.createElement(s,_e({},n,{className:l}))};Se.propTypes=Le,Se.defaultProps={tag:'div'};var Re=function(e){var t='undefined'==typeof e?'undefined':Te(e);return!!e&&('object'==t||'function'==t)},ze=Pe.oneOfType([Pe.number,Pe.string]),Ie=Pe.oneOfType([Pe.bool,Pe.number,Pe.string,Pe.shape({size:Pe.oneOfType([Pe.bool,Pe.number,Pe.string]),push:ze,pull:ze,offset:ze})]),Be={tag:Pe.oneOfType([Pe.func,Pe.string]),xs:Ie,sm:Ie,md:Ie,lg:Ie,xl:Ie,className:Pe.string,cssModule:Pe.object,widths:Pe.array},We=function(e,t,o){if(!0===o||''===o)return e?'col':'col-'+t;return'auto'===o?e?'col-auto':'col-'+t+'-auto':e?'col-'+o:'col-'+t+'-'+o},Ue=function(e){var t=e.className,o=e.cssModule,a=e.widths,s=e.tag,n=Ee(e,['className','cssModule','widths','tag']),l=[];a.forEach(function(t,a){var s=e[t];if(a||void 0!==s||(s=!0),delete n[t],!!s){var r,d=!a;if(Re(s)){var p,c=d?'-':'-'+t+'-';r=We(d,t,s.size),l.push(g(xe((p={},Me(p,r,s.size||''===s.size),Me(p,'push'+c+s.push,s.push||0===s.push),Me(p,'pull'+c+s.pull,s.pull||0===s.pull),Me(p,'offset'+c+s.offset,s.offset||0===s.offset),p))),o)}else r=We(d,t,s),l.push(r)}});var r=g(xe(t,l),o);return fe.createElement(s,_e({},n,{className:r}))};Ue.propTypes=Be,Ue.defaultProps={tag:'div',widths:['xs','sm','md','lg','xl']};var He={light:Pe.bool,inverse:Pe.bool,full:Pe.bool,fixed:Pe.string,sticky:Pe.string,color:Pe.string,role:Pe.string,tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object,toggleable:Pe.oneOfType([Pe.bool,Pe.string])},Ge=function(e){if(!1===e)return!1;return!0===e||'xs'===e?'navbar-toggleable':'navbar-toggleable-'+e},Fe=function(e){var t,o=e.toggleable,a=e.className,s=e.cssModule,n=e.light,l=e.inverse,r=e.full,i=e.fixed,d=e.sticky,p=e.color,c=e.tag,u=Ee(e,['toggleable','className','cssModule','light','inverse','full','fixed','sticky','color','tag']),m=g(xe(a,'navbar',Ge(o),(t={"navbar-light":n,"navbar-inverse":l},Me(t,'bg-'+p,p),Me(t,'navbar-full',r),Me(t,'fixed-'+i,i),Me(t,'sticky-'+d,d),t)),s);return fe.createElement(c,_e({},u,{className:m}))};Fe.propTypes=He,Fe.defaultProps={tag:'nav',role:'navigation',toggleable:!1};var qe={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Ve=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'navbar-brand'),o);return fe.createElement(a,_e({},s,{className:n}))};Ve.propTypes=qe,Ve.defaultProps={tag:'a'};var Ye={tag:Pe.oneOfType([Pe.func,Pe.string]),type:Pe.string,className:Pe.string,cssModule:Pe.object,children:Pe.node,right:Pe.bool,left:Pe.bool},Xe=fe.createElement('span',{className:'navbar-toggler-icon'}),$e=function(e){var t=e.className,o=e.cssModule,a=e.children,s=e.right,n=e.left,l=e.tag,r=Ee(e,['className','cssModule','children','right','left','tag']),i=g(xe(t,'navbar-toggler',s&&'navbar-toggler-right',n&&'navbar-toggler-left'),o);return fe.createElement(l,_e({},r,{className:i}),a||Xe)};$e.propTypes=Ye,$e.defaultProps={tag:'button',type:'button'};var Ke={tabs:Pe.bool,pills:Pe.bool,vertical:Pe.bool,navbar:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Je=function(e){var t=e.className,o=e.cssModule,a=e.tabs,s=e.pills,n=e.vertical,l=e.navbar,r=e.tag,i=Ee(e,['className','cssModule','tabs','pills','vertical','navbar','tag']),d=g(xe(t,l?'navbar-nav':'nav',{"nav-tabs":a,"nav-pills":s,"flex-column":n}),o);return fe.createElement(r,_e({},i,{className:d}))};Je.propTypes=Ke,Je.defaultProps={tag:'ul'};var Ze={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Qe=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'nav-item'),o);return fe.createElement(a,_e({},s,{className:n}))};Qe.propTypes=Ze,Qe.defaultProps={tag:'li'};var et=200,tt='__lodash_hash_undefined__',ot=1/0,at=9007199254740991,st='[object Arguments]',nt='[object Function]',lt='[object GeneratorFunction]',rt='[object Symbol]',it=/[\\^$.*+?()[\]{}|]/g,dt=/^\[object .+?Constructor\]$/,pt=/^(?:0|[1-9]\d*)$/,ct='object'==Te(he)&&he&&he.Object===Object&&he,ut='object'==('undefined'==typeof self?'undefined':Te(self))&&self&&self.Object===Object&&self,gt=ct||ut||Function('return this')(),mt=Array.prototype,ft=Function.prototype,ht=Object.prototype,bt=gt['__core-js_shared__'],yt=function(){var e=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||'');return e?'Symbol(src)_1.'+e:''}(),vt=ft.toString,Tt=ht.hasOwnProperty,Nt=ht.toString,kt=RegExp('^'+vt.call(Tt).replace(it,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),Mt=gt.Symbol,_t=O(Object.getPrototypeOf,Object),Ct=ht.propertyIsEnumerable,Et=mt.splice,Ot=Mt?Mt.isConcatSpreadable:void 0,wt=Object.getOwnPropertySymbols,Pt=me,xt=G(gt,'Map'),jt=G(Object,'create');w.prototype.clear=function(){this.__data__=jt?jt(null):{}},w.prototype['delete']=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(jt){var o=t[e];return o===tt?void 0:o}return Tt.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return jt?t[e]!==void 0:Tt.call(t,e)},w.prototype.set=function(e,t){var o=this.__data__;return o[e]=jt&&void 0===t?tt:t,this},P.prototype.clear=function(){this.__data__=[]},P.prototype['delete']=function(e){var t=this.__data__,o=D(t,e);if(0>o)return!1;var a=t.length-1;return o==a?t.pop():Et.call(t,o,1),!0},P.prototype.get=function(e){var t=this.__data__,o=D(t,e);return 0>o?void 0:t[o][1]},P.prototype.has=function(e){return-1<D(this.__data__,e)},P.prototype.set=function(e,t){var o=this.__data__,a=D(o,e);return 0>a?o.push([e,t]):o[a][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new w,map:new(xt||P),string:new w}},x.prototype['delete']=function(e){return H(this,e)['delete'](e)},x.prototype.get=function(e){return H(this,e).get(e)},x.prototype.has=function(e){return H(this,e).has(e)},x.prototype.set=function(e,t){return H(this,e).set(e,t),this},j.prototype.add=j.prototype.push=function(e){return this.__data__.set(e,tt),this},j.prototype.has=function(e){return this.__data__.has(e)};var At=wt?O(wt,Object):ie,Dt=wt?function(e){for(var t=[];e;)y(t,At(e)),e=_t(e);return t}:ie,Lt=Array.isArray,St=function(e,t){return t=Pt(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=Pt(o.length-t,0),n=Array(s);++a<s;)n[a]=o[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=o[a];return l[t]=n,m(e,this,l)}}(function(e,t){return null==e?{}:(t=b(S(t,1),K),B(e,L(U(e),t)))}),Rt=St,zt=Object.prototype,It=zt.toString,Bt=function(e){var t=de(e)?It.call(e):'';return t=='[object Function]'||t=='[object GeneratorFunction]'},Wt=s(function(e){(function(t){e.exports=t()})(function(){return function d(p,e,t){function a(r,o){if(!e[r]){if(!p[r]){var i='function'==typeof n&&n;if(!o&&i)return i(r,!0);if(s)return s(r,!0);var c=new Error('Cannot find module \''+r+'\'');throw c.code='MODULE_NOT_FOUND',c}var g=e[r]={exports:{}};p[r][0].call(g.exports,function(t){var e=p[r][1][t];return a(e?e:t)},g,g.exports,d,p,e,t)}return e[r].exports}for(var s='function'==typeof n&&n,l=0;l<t.length;l++)a(t[l]);return a}({1:[function(e){var t=e('./utils'),o=function(e){return e&&e.__esModule?e:{default:e}}(t),a=o['default'].Utils,s=a.getBounds,n=a.updateClasses,l=a.defer;o['default'].modules.push({position:function(e){var t=this,o=e.top,a=e.left,r=this.cache('element-bounds',function(){return s(t.element)}),i=r.height,d=r.width,p=this.getTargetBounds(),c=o+i,u=a+d,g=[];o<=p.bottom&&c>=p.top&&['left','right'].forEach(function(e){var t=p[e];(t===a||t===u)&&g.push(e)}),a<=p.right&&u>=p.left&&['top','bottom'].forEach(function(e){var t=p[e];(t===o||t===c)&&g.push(e)});var m=[],f=[];return m.push(this.getClass('abutted')),['left','top','right','bottom'].forEach(function(e){m.push(t.getClass('abutted')+'-'+e)}),g.length&&f.push(this.getClass('abutted')),g.forEach(function(e){f.push(t.getClass('abutted')+'-'+e)}),l(function(){!1===t.options.addTargetClasses||n(t.target,f,m),n(t.element,f,m)}),!0}})},{"./utils":5}],2:[function(e){function t(e,t){return'scrollParent'===t?t=e.scrollParents[0]:'window'===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),'undefined'!=typeof t.nodeType&&function(){var e=t,o=l(t),a=o,s=getComputedStyle(t);if(t=[a.left,a.top,o.width+a.left,o.height+a.top],e.ownerDocument!==document){var n=e.ownerDocument.defaultView;t[0]+=n.pageXOffset,t[1]+=n.pageYOffset,t[2]+=n.pageXOffset,t[3]+=n.pageYOffset}p.forEach(function(e,o){e=e[0].toUpperCase()+e.substr(1),'Top'===e||'Left'===e?t[o]+=parseFloat(s['border'+e+'Width']):t[o]-=parseFloat(s['border'+e+'Width'])})}(),t}var o=function(){function e(e,t){var o,a=[],s=!0,n=!1;try{for(var l,r=e[Symbol.iterator]();!(s=(l=r.next()).done)&&(a.push(l.value),!(t&&a.length===t));s=!0);}catch(e){n=!0,o=e}finally{try{!s&&r['return']&&r['return']()}finally{if(n)throw o}}return a}return function(t,o){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,o);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}(),a=e('./utils'),s=function(e){return e&&e.__esModule?e:{default:e}}(a),n=s['default'].Utils,l=n.getBounds,r=n.extend,i=n.updateClasses,d=n.defer,p=['left','top','right','bottom'];s['default'].modules.push({position:function(e){var a=this,s=e.top,n=e.left,p=e.targetAttachment;if(!this.options.constraints)return!0;var c=this.cache('element-bounds',function(){return l(a.element)}),u=c.height,g=c.width;if(0===g&&0===u&&'undefined'!=typeof this.lastSize){var m=this.lastSize;g=m.width,u=m.height}var f=this.cache('target-bounds',function(){return a.getTargetBounds()}),h=f.height,b=f.width,y=[this.getClass('pinned'),this.getClass('out-of-bounds')];this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,o=e.pinnedClass;t&&y.push(t),o&&y.push(o)}),y.forEach(function(e){['left','top','right','bottom'].forEach(function(t){y.push(e+'-'+t)})});var v=[],T=r({},p),N=r({},this.attachment);return this.options.constraints.forEach(function(e){var l=e.to,r=e.attachment,i=e.pin;'undefined'==typeof r&&(r='');var d,c;if(0<=r.indexOf(' ')){var m=r.split(' '),f=o(m,2);c=f[0],d=f[1]}else d=c=r;var y=t(a,l);('target'===c||'both'===c)&&(s<y[1]&&'top'===T.top&&(s+=h,T.top='bottom'),s+u>y[3]&&'bottom'===T.top&&(s-=h,T.top='top')),'together'===c&&('top'===T.top&&('bottom'===N.top&&s<y[1]?(s+=h,T.top='bottom',s+=u,N.top='top'):'top'===N.top&&s+u>y[3]&&s-(u-h)>=y[1]&&(s-=u-h,T.top='bottom',N.top='bottom')),'bottom'===T.top&&('top'===N.top&&s+u>y[3]?(s-=h,T.top='top',s-=u,N.top='bottom'):'bottom'===N.top&&s<y[1]&&s+(2*u-h)<=y[3]&&(s+=u-h,T.top='top',N.top='top')),'middle'===T.top&&(s+u>y[3]&&'top'===N.top?(s-=u,N.top='bottom'):s<y[1]&&'bottom'===N.top&&(s+=u,N.top='top'))),('target'===d||'both'===d)&&(n<y[0]&&'left'===T.left&&(n+=b,T.left='right'),n+g>y[2]&&'right'===T.left&&(n-=b,T.left='left')),'together'===d&&(n<y[0]&&'left'===T.left?'right'===N.left?(n+=b,T.left='right',n+=g,N.left='left'):'left'===N.left&&(n+=b,T.left='right',n-=g,N.left='right'):n+g>y[2]&&'right'===T.left?'left'===N.left?(n-=b,T.left='left',n-=g,N.left='right'):'right'===N.left&&(n-=b,T.left='left',n+=g,N.left='left'):'center'===T.left&&(n+g>y[2]&&'left'===N.left?(n-=g,N.left='right'):n<y[0]&&'right'===N.left&&(n+=g,N.left='left'))),('element'===c||'both'===c)&&(s<y[1]&&'bottom'===N.top&&(s+=u,N.top='top'),s+u>y[3]&&'top'===N.top&&(s-=u,N.top='bottom')),('element'===d||'both'===d)&&(n<y[0]&&('right'===N.left?(n+=g,N.left='left'):'center'===N.left&&(n+=g/2,N.left='left')),n+g>y[2]&&('left'===N.left?(n-=g,N.left='right'):'center'===N.left&&(n-=g/2,N.left='right'))),'string'==typeof i?i=i.split(',').map(function(e){return e.trim()}):!0===i&&(i=['top','left','right','bottom']),i=i||[];var k=[],M=[];s<y[1]&&(0<=i.indexOf('top')?(s=y[1],k.push('top')):M.push('top')),s+u>y[3]&&(0<=i.indexOf('bottom')?(s=y[3]-u,k.push('bottom')):M.push('bottom')),n<y[0]&&(0<=i.indexOf('left')?(n=y[0],k.push('left')):M.push('left')),n+g>y[2]&&(0<=i.indexOf('right')?(n=y[2]-g,k.push('right')):M.push('right')),k.length&&function(){var e;e='undefined'==typeof a.options.pinnedClass?a.getClass('pinned'):a.options.pinnedClass,v.push(e),k.forEach(function(t){v.push(e+'-'+t)})}(),M.length&&function(){var e;e='undefined'==typeof a.options.outOfBoundsClass?a.getClass('out-of-bounds'):a.options.outOfBoundsClass,v.push(e),M.forEach(function(t){v.push(e+'-'+t)})}(),(0<=k.indexOf('left')||0<=k.indexOf('right'))&&(N.left=T.left=!1),(0<=k.indexOf('top')||0<=k.indexOf('bottom'))&&(N.top=T.top=!1),(T.top!==p.top||T.left!==p.left||N.top!==a.attachment.top||N.left!==a.attachment.left)&&(a.updateAttachClasses(N,T),a.trigger('update',{attachment:N,targetAttachment:T}))}),d(function(){!1===a.options.addTargetClasses||i(a.target,v,y),i(a.element,v,y)}),{top:s,left:n}}})},{"./utils":5}],3:[function(e){var t=function(){function e(e,t){var o,a=[],s=!0,n=!1;try{for(var l,r=e[Symbol.iterator]();!(s=(l=r.next()).done)&&(a.push(l.value),!(t&&a.length===t));s=!0);}catch(e){n=!0,o=e}finally{try{!s&&r['return']&&r['return']()}finally{if(n)throw o}}return a}return function(t,o){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,o);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}(),o=e('./utils'),a=function(e){return e&&e.__esModule?e:{default:e}}(o);a['default'].modules.push({position:function(e){var o=e.top,a=e.left;if(this.options.shift){var s=this.options.shift;'function'==typeof this.options.shift&&(s=this.options.shift.call(this,{top:o,left:a}));var n,l;if('string'==typeof s){s=s.split(' '),s[1]=s[1]||s[0];var r=s,i=t(r,2);n=i[0],l=i[1],n=parseFloat(n,10),l=parseFloat(l,10)}else n=s.top,l=s.left;return o+=n,a+=l,{top:o,left:a}}}})},{"./utils":5}],4:[function(e,t,o){function a(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}function s(e,t){if('function'!=typeof t&&null!==t)throw new TypeError('Super expression must either be null or a function, not '+('undefined'==typeof t?'undefined':Te(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function n(e,t){var o=2>=arguments.length||arguments[2]===void 0?1:arguments[2];return e+o>=t&&t>=e-o}function l(){return'undefined'!=typeof performance&&'undefined'!=typeof performance.now?performance.now():+new Date}function r(){for(var e={top:0,left:0},t=arguments.length,o=Array(t),a=0;a<t;a++)o[a]=arguments[a];return o.forEach(function(t){var o=t.top,a=t.left;'string'==typeof o&&(o=parseFloat(o,10)),'string'==typeof a&&(a=parseFloat(a,10)),e.top+=o,e.left+=a}),e}function d(e,t){return'string'==typeof e.left&&-1!==e.left.indexOf('%')&&(e.left=parseFloat(e.left,10)/100*t.width),'string'==typeof e.top&&-1!==e.top.indexOf('%')&&(e.top=parseFloat(e.top,10)/100*t.height),e}var i=Math.min;Object.defineProperty(o,'__esModule',{value:!0});var p=function(){function e(e,t){var o,a=[],s=!0,n=!1;try{for(var l,r=e[Symbol.iterator]();!(s=(l=r.next()).done)&&(a.push(l.value),!(t&&a.length===t));s=!0);}catch(e){n=!0,o=e}finally{try{!s&&r['return']&&r['return']()}finally{if(n)throw o}}return a}return function(t,o){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,o);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}(),c=function(){function e(e,t){for(var o,a=0;a<t.length;a++)o=t[a],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,a){return o&&e(t.prototype,o),a&&e(t,a),t}}(),u=function(e,t,o){var a=!0;_function:for(;a;){var s=e,n=t,l=o;a=!1,null===s&&(s=Function.prototype);var r=Object.getOwnPropertyDescriptor(s,n);if(r===void 0){var i=Object.getPrototypeOf(s);if(null===i)return;e=i,t=n,o=l,a=!0,r=i=void 0;continue _function}else{if('value'in r)return r.value;var d=r.get;return void 0===d?void 0:d.call(l)}}},g=e('./utils'),m=function(e){return e&&e.__esModule?e:{default:e}}(g);e('./constraint'),e('./abutment'),e('./shift');var f=m['default'].Utils,h=f.getScrollParents,b=f.getBounds,y=f.getOffsetParent,v=f.extend,T=f.addClass,N=f.removeClass,k=f.updateClasses,M=f.defer,_=f.flush,C=f.getScrollBarSize,E=f.removeUtilElements,O=f.Evented,w=function(){if('undefined'==typeof document)return'';for(var e,t=document.createElement('div'),o=['transform','WebkitTransform','OTransform','MozTransform','msTransform'],a=0;a<o.length;++a)if(e=o[a],void 0!==t.style[e])return e}(),P=[],x=function(){P.forEach(function(e){e.position(!1)}),_()};(function(){var e=null,t=null,o=null,a=function a(){return'undefined'!=typeof t&&16<t?(t=i(t-16,250),void(o=setTimeout(a,250))):void('undefined'!=typeof e&&10>l()-e||(null!=o&&(clearTimeout(o),o=null),e=l(),x(),t=l()-e))};'undefined'!=typeof window&&'undefined'!=typeof window.addEventListener&&['resize','scroll','touchmove'].forEach(function(e){window.addEventListener(e,a)})})();var j={center:'center',left:'right',right:'left'},A={middle:'middle',top:'bottom',bottom:'top'},D={top:0,left:0,middle:'50%',center:'50%',bottom:'100%',right:'100%'},L=function(e,t){var o=e.left,a=e.top;return'auto'===o&&(o=j[t.left]),'auto'===a&&(a=A[t.top]),{left:o,top:a}},S=function(e){var t=e.left,o=e.top;return'undefined'!=typeof D[e.left]&&(t=D[e.left]),'undefined'!=typeof D[e.top]&&(o=D[e.top]),{left:t,top:o}},R=function(e){var t=e.split(' '),o=p(t,2),a=o[0],s=o[1];return{top:a,left:s}},z=R,I=function(e){function t(e){var o=this;a(this,t),u(Object.getPrototypeOf(t.prototype),'constructor',this).call(this),this.position=this.position.bind(this),P.push(this),this.history=[],this.setOptions(e,!1),m['default'].modules.forEach(function(e){'undefined'!=typeof e.initialize&&e.initialize.call(o)}),this.position()}return s(t,e),c(t,[{key:'getClass',value:function(){var e=0>=arguments.length||void 0===arguments[0]?'':arguments[0],t=this.options.classes;return'undefined'!=typeof t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+'-'+e:e}},{key:'setOptions',value:function(e){var t=this,o=1>=arguments.length||void 0===arguments[1]||arguments[1];this.options=v({offset:'0 0',targetOffset:'0 0',targetAttachment:'auto auto',classPrefix:'tether'},e);var a=this.options,s=a.element,n=a.target,l=a.targetModifier;if(this.element=s,this.target=n,this.targetModifier=l,'viewport'===this.target?(this.target=document.body,this.targetModifier='visible'):'scroll-handle'===this.target&&(this.target=document.body,this.targetModifier='scroll-handle'),['element','target'].forEach(function(e){if('undefined'==typeof t[e])throw new Error('Tether Error: Both element and target must be defined');'undefined'==typeof t[e].jquery?'string'==typeof t[e]&&(t[e]=document.querySelector(t[e])):t[e]=t[e][0]}),T(this.element,this.getClass('element')),!1===this.options.addTargetClasses||T(this.target,this.getClass('target')),!this.options.attachment)throw new Error('Tether Error: You must provide an attachment');this.targetAttachment=z(this.options.targetAttachment),this.attachment=z(this.options.attachment),this.offset=R(this.options.offset),this.targetOffset=R(this.options.targetOffset),'undefined'!=typeof this.scrollParents&&this.disable(),this.scrollParents='scroll-handle'===this.targetModifier?[this.target]:h(this.target),!1===this.options.enabled||this.enable(o)}},{key:'getTargetBounds',value:function(){if('undefined'!=typeof this.targetModifier){if('visible'===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var e=b(this.target),t={height:e.height,width:e.width,top:e.top,left:e.left};return t.height=i(t.height,e.height-(pageYOffset-e.top)),t.height=i(t.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),t.height=i(innerHeight,t.height),t.height-=2,t.width=i(t.width,e.width-(pageXOffset-e.left)),t.width=i(t.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),t.width=i(innerWidth,t.width),t.width-=2,t.top<pageYOffset&&(t.top=pageYOffset),t.left<pageXOffset&&(t.left=pageXOffset),t}if('scroll-handle'===this.targetModifier){var e=void 0,o=this.target;o===document.body?(o=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=b(o);var a=getComputedStyle(o),s=o.scrollWidth>o.clientWidth||0<=[a.overflow,a.overflowX].indexOf('scroll')||this.target!==document.body,n=0;s&&(n=15);var l=e.height-parseFloat(a.borderTopWidth)-parseFloat(a.borderBottomWidth)-n,t={width:15,height:0.975*l*(l/o.scrollHeight),left:e.left+e.width-parseFloat(a.borderLeftWidth)-15},r=0;408>l&&this.target===document.body&&(r=-1.1e-4*Math.pow(l,2)-0.00727*l+22.58),this.target!==document.body&&(t.height=me(t.height,24));var d=this.target.scrollTop/(o.scrollHeight-l);return t.top=d*(l-t.height-r)+e.top+parseFloat(a.borderTopWidth),this.target===document.body&&(t.height=me(t.height,24)),t}}else return b(this.target)}},{key:'clearCache',value:function(){this._cache={}}},{key:'cache',value:function(e,t){return'undefined'==typeof this._cache&&(this._cache={}),'undefined'==typeof this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:'enable',value:function(){var e=this,t=0>=arguments.length||void 0===arguments[0]||arguments[0];!1===this.options.addTargetClasses||T(this.target,this.getClass('enabled')),T(this.element,this.getClass('enabled')),this.enabled=!0,this.scrollParents.forEach(function(t){t!==e.target.ownerDocument&&t.addEventListener('scroll',e.position)}),t&&this.position()}},{key:'disable',value:function(){var e=this;N(this.target,this.getClass('enabled')),N(this.element,this.getClass('enabled')),this.enabled=!1,'undefined'!=typeof this.scrollParents&&this.scrollParents.forEach(function(t){t.removeEventListener('scroll',e.position)})}},{key:'destroy',value:function(){var e=this;this.disable(),P.forEach(function(t,o){t===e&&P.splice(o,1)}),0===P.length&&E()}},{key:'updateAttachClasses',value:function(e,t){var o=this;e=e||this.attachment,t=t||this.targetAttachment;'undefined'!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),'undefined'==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var a=this._addAttachClasses;e.top&&a.push(this.getClass('element-attached')+'-'+e.top),e.left&&a.push(this.getClass('element-attached')+'-'+e.left),t.top&&a.push(this.getClass('target-attached')+'-'+t.top),t.left&&a.push(this.getClass('target-attached')+'-'+t.left);var s=[];['left','top','bottom','right','middle','center'].forEach(function(e){s.push(o.getClass('element-attached')+'-'+e),s.push(o.getClass('target-attached')+'-'+e)}),M(function(){'undefined'==typeof o._addAttachClasses||(k(o.element,o._addAttachClasses,s),!1!==o.options.addTargetClasses&&k(o.target,o._addAttachClasses,s),delete o._addAttachClasses)})}},{key:'position',value:function(){var e=this,t=0>=arguments.length||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var o=L(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var a=this.cache('element-bounds',function(){return b(e.element)}),s=a.width,n=a.height;if(0===s&&0===n&&'undefined'!=typeof this.lastSize){var l=this.lastSize;s=l.width,n=l.height}else this.lastSize={width:s,height:n};var p=this.cache('target-bounds',function(){return e.getTargetBounds()}),c=p,u=d(S(this.attachment),{width:s,height:n}),g=d(S(o),c),f=d(this.offset,{width:s,height:n}),h=d(this.targetOffset,c);u=r(u,f),g=r(g,h);for(var v=p.left+g.left-u.left,T=p.top+g.top-u.top,N=0;N<m['default'].modules.length;++N){var i=m['default'].modules[N],k=i.position.call(this,{left:v,top:T,targetAttachment:o,targetPos:p,elementPos:a,offset:u,targetOffset:g,manualOffset:f,manualTargetOffset:h,scrollbarSize:M,attachment:this.attachment});if(!1===k)return!1;if('undefined'==typeof k||'object'!==('undefined'==typeof k?'undefined':Te(k)))continue;else T=k.top,v=k.left}var M,E={page:{top:T,left:v},viewport:{top:T-pageYOffset,bottom:pageYOffset-T-n+innerHeight,left:v-pageXOffset,right:pageXOffset-v-s+innerWidth}},O=this.target.ownerDocument,w=O.defaultView;return O.body.scrollWidth>w.innerWidth&&(M=this.cache('scrollbar-size',C),E.viewport.bottom-=M.height),O.body.scrollHeight>w.innerHeight&&(M=this.cache('scrollbar-size',C),E.viewport.right-=M.width),(-1===['','static'].indexOf(O.body.style.position)||-1===['','static'].indexOf(O.body.parentElement.style.position))&&(E.page.bottom=O.body.scrollHeight-T-n,E.page.right=O.body.scrollWidth-v-s),'undefined'==typeof this.options.optimizations||!1===this.options.optimizations.moveElement||'undefined'!=typeof this.targetModifier||function(){var t=e.cache('target-offsetparent',function(){return y(e.target)}),o=e.cache('target-offsetparent-bounds',function(){return b(t)}),a=getComputedStyle(t),s=o,n={};if(['Top','Left','Bottom','Right'].forEach(function(e){n[e.toLowerCase()]=parseFloat(a['border'+e+'Width'])}),o.right=O.body.scrollWidth-o.left-s.width+n.right,o.bottom=O.body.scrollHeight-o.top-s.height+n.bottom,E.page.top>=o.top+n.top&&E.page.bottom>=o.bottom&&E.page.left>=o.left+n.left&&E.page.right>=o.right){var l=t.scrollTop,r=t.scrollLeft;E.offset={top:E.page.top-o.top+l-n.top,left:E.page.left-o.left+r-n.left}}}(),this.move(E),this.history.unshift(E),3<this.history.length&&this.history.pop(),t&&_(),!0}}},{key:'move',value:function(e){var t=this;if('undefined'!=typeof this.element.parentNode){var o={};for(var a in e)for(var s in o[a]={},e[a]){for(var l,r=!1,d=0;d<this.history.length;++d)if(l=this.history[d],'undefined'!=typeof l[a]&&!n(l[a][s],e[a][s])){r=!0;break}r||(o[a][s]=!0)}var i={top:'',left:'',right:'',bottom:''},p=function(e,o){var a=Math.round,s='undefined'!=typeof t.options.optimizations,n=s?t.options.optimizations.gpu:null;if(!1!==n){var l,r;e.top?(i.top=0,l=o.top):(i.bottom=0,l=-o.bottom),e.left?(i.left=0,r=o.left):(i.right=0,r=-o.right),i[w]='translateX('+a(r)+'px) translateY('+a(l)+'px)','msTransform'!==w&&(i[w]+=' translateZ(0)')}else e.top?i.top=o.top+'px':i.bottom=o.bottom+'px',e.left?i.left=o.left+'px':i.right=o.right+'px'},c=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(i.position='absolute',p(o.page,e.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(i.position='fixed',p(o.viewport,e.viewport)):'undefined'!=typeof o.offset&&o.offset.top&&o.offset.left?function(){i.position='absolute';var a=t.cache('target-offsetparent',function(){return y(t.target)});y(t.element)!==a&&M(function(){t.element.parentNode.removeChild(t.element),a.appendChild(t.element)}),p(o.offset,e.offset),c=!0}():(i.position='absolute',p({top:!0,left:!0},e.page)),!c){for(var u=!0,g=this.element.parentNode;g&&1===g.nodeType&&'BODY'!==g.tagName;){if('static'!==getComputedStyle(g).position){u=!1;break}g=g.parentNode}u||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var m={},f=!1;for(var s in i){var h=i[s],b=this.element.style[s];b!==h&&(f=!0,m[s]=h)}f&&M(function(){v(t.element.style,m),t.trigger('repositioned')})}}}]),t}(O);I.modules=[],m['default'].position=x;var B=v(I,m['default']);o['default']=B,t.exports=o['default']},{"./abutment":1,"./constraint":2,"./shift":3,"./utils":5}],5:[function(e,t,o){function a(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}function s(e){var t=e.getBoundingClientRect(),o={};for(var a in t)o[a]=t[a];if(e.ownerDocument!==document){var n=e.ownerDocument.defaultView.frameElement;if(n){var l=s(n);o.top+=l.top,o.bottom+=l.top,o.left+=l.left,o.right+=l.left}}return o}function n(){var e=0>=arguments.length||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach(function(t){if(t)for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}),e}function l(e,t){if('undefined'!=typeof e.classList)t.split(' ').forEach(function(t){t.trim()&&e.classList.remove(t)});else{var o=new RegExp('(^| )'+t.split(' ').join('|')+'( |$)','gi'),a=d(e).replace(o,' ');p(e,a)}}function r(e,t){if('undefined'!=typeof e.classList)t.split(' ').forEach(function(t){t.trim()&&e.classList.add(t)});else{l(e,t);var o=d(e)+(' '+t);p(e,o)}}function i(e,t){if('undefined'!=typeof e.classList)return e.classList.contains(t);var o=d(e);return new RegExp('(^| )'+t+'( |$)','gi').test(o)}function d(e){return e.className instanceof e.ownerDocument.defaultView.SVGAnimatedString?e.className.baseVal:e.className}function p(e,t){e.setAttribute('class',t)}Object.defineProperty(o,'__esModule',{value:!0});var c=function(){function e(e,t){for(var o,a=0;a<t.length;a++)o=t[a],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,a){return o&&e(t.prototype,o),a&&e(t,a),t}}(),u={modules:[]},g=null,m=function(){var e=0;return function(){return++e}}(),f={},h=function(){var e=g;e||(e=document.createElement('div'),e.setAttribute('data-tether-id',m()),n(e.style,{top:0,left:0,position:'absolute'}),document.body.appendChild(e),g=e);var t=e.getAttribute('data-tether-id');return'undefined'==typeof f[t]&&(f[t]=s(e),y(function(){delete f[t]})),f[t]},b=[],y=function(e){b.push(e)},v=function(){function e(){a(this,e)}return c(e,[{key:'on',value:function(e,t,o){var a=3>=arguments.length||void 0===arguments[3]?!1:arguments[3];'undefined'==typeof this.bindings&&(this.bindings={}),'undefined'==typeof this.bindings[e]&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:o,once:a})}},{key:'once',value:function(e,t,o){this.on(e,t,o,!0)}},{key:'off',value:function(e,t){if('undefined'!=typeof this.bindings&&'undefined'!=typeof this.bindings[e])if('undefined'==typeof t)delete this.bindings[e];else for(var o=0;o<this.bindings[e].length;)this.bindings[e][o].handler===t?this.bindings[e].splice(o,1):++o}},{key:'trigger',value:function(e){if('undefined'!=typeof this.bindings&&this.bindings[e]){for(var t=0,o=arguments.length,a=Array(1<o?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];for(;t<this.bindings[e].length;){var n=this.bindings[e][t],l=n.handler,r=n.ctx,i=n.once,d=r;'undefined'==typeof d&&(d=this),l.apply(d,a),i?this.bindings[e].splice(t,1):++t}}}}]),e}();u.Utils={getActualBoundingClientRect:s,getScrollParents:function(e){var t=getComputedStyle(e)||{},o=t.position,a=[];if('fixed'===o)return[e];for(var s,n=e;(n=n.parentNode)&&n&&1===n.nodeType;){s=void 0;try{s=getComputedStyle(n)}catch(e){}if('undefined'==typeof s||null===s)return a.push(n),a;var l=s,r=l.overflow,i=l.overflowX,d=l.overflowY;/(auto|scroll)/.test(r+d+i)&&('absolute'!==o||0<=['relative','absolute','fixed'].indexOf(s.position))&&a.push(n)}return a.push(e.ownerDocument.body),e.ownerDocument!==document&&a.push(e.ownerDocument.defaultView),a},getBounds:function(e){var t;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var o=t.documentElement,a=s(e),n=h();return a.top-=n.top,a.left-=n.left,'undefined'==typeof a.width&&(a.width=document.body.scrollWidth-a.left-a.right),'undefined'==typeof a.height&&(a.height=document.body.scrollHeight-a.top-a.bottom),a.top-=o.clientTop,a.left-=o.clientLeft,a.right=t.body.clientWidth-a.width-a.left,a.bottom=t.body.clientHeight-a.height-a.top,a},getOffsetParent:function(e){return e.offsetParent||document.documentElement},extend:n,addClass:r,removeClass:l,hasClass:i,updateClasses:function(e,t,o){o.forEach(function(o){-1===t.indexOf(o)&&i(e,o)&&l(e,o)}),t.forEach(function(t){i(e,t)||r(e,t)})},defer:y,flush:function(){for(var e;e=b.pop();)e()},uniqueId:m,Evented:v,getScrollBarSize:function(){var e=document.createElement('div');e.style.width='100%',e.style.height='200px';var t=document.createElement('div');n(t.style,{position:'absolute',top:0,left:0,pointerEvents:'none',visibility:'hidden',width:'200px',height:'150px',overflow:'hidden'}),t.appendChild(e),document.body.appendChild(t);var o=e.offsetWidth;t.style.overflow='scroll';var a=e.offsetWidth;o===a&&(a=t.clientWidth),document.body.removeChild(t);var s=o-a;return{width:s,height:s}},removeUtilElements:function(){g&&document.body.removeChild(g),g=null}},o['default']=u,t.exports=o['default']},{}]},{},[4])(4)})}),Ut=function(e){return e&&e.__esModule?e['default']:e}(Wt),Ht={children:Pe.node.isRequired,className:Pe.string,arrow:Pe.string,disabled:Pe.bool,isOpen:Pe.bool.isRequired,toggle:Pe.func.isRequired,tether:Pe.object.isRequired,tetherRef:Pe.func,style:Pe.node,cssModule:Pe.object},Gt=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.handleDocumentClick=o.handleDocumentClick.bind(o),o.toggle=o.toggle.bind(o),o}return Ce(t,e),ke(t,[{key:'componentDidMount',value:function(){this.handleProps()}},{key:'componentDidUpdate',value:function(e){this.props.isOpen===e.isOpen?this._element&&this.renderIntoSubtree():this.handleProps()}},{key:'componentWillUnmount',value:function(){this.hide()}},{key:'getTarget',value:function(){var e=this.props.tether.target;return Bt(e)?e():e}},{key:'getTetherConfig',value:function(){var e=_e({},this.props.tether);return e.element=this._element,e.target=this.getTarget(),e}},{key:'handleDocumentClick',value:function(t){var e=this._element;t.target!==e&&e.contains(t.target)||this.toggle()}},{key:'handleProps',value:function(){this.props.isOpen?this.show():this.hide()}},{key:'hide',value:function(){document.removeEventListener('click',this.handleDocumentClick,!0),this._element&&(document.body.removeChild(this._element),o.unmountComponentAtNode(this._element),this._element=null),this._tether&&(this._tether.destroy(),this._tether=null,this.props.tetherRef(this._tether))}},{key:'show',value:function(){document.addEventListener('click',this.handleDocumentClick,!0),this._element=document.createElement('div'),this._element.className=this.props.className,document.body.appendChild(this._element),this.renderIntoSubtree(),this._tether=new Ut(this.getTetherConfig()),this.props.tetherRef(this._tether),this._tether.position(),this._element.childNodes[0].focus()}},{key:'toggle',value:function(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle()}},{key:'renderIntoSubtree',value:function(){o.unstable_renderSubtreeIntoContainer(this,this.renderChildren(),this._element)}},{key:'renderChildren',value:function(){var e=this.props,t=e.children,o=e.style;return fe.cloneElement(t,{style:o})}},{key:'render',value:function(){return null}}]),t}(fe.Component);Gt.propTypes=Ht,Gt.defaultProps={isOpen:!1,tetherRef:function(){}};var Ft={tag:Pe.oneOfType([Pe.func,Pe.string]),children:Pe.node.isRequired,right:Pe.bool,className:Pe.string,cssModule:Pe.object},qt={isOpen:Pe.bool.isRequired},Vt=function(e,t){var o=e.className,a=e.cssModule,s=e.right,n=e.tag,l=Ee(e,['className','cssModule','right','tag']),r=g(xe(o,'dropdown-menu',{"dropdown-menu-right":s}),a);return fe.createElement(n,_e({},l,{tabIndex:'-1',"aria-hidden":!t.isOpen,role:'menu',className:r}))};Vt.propTypes=Ft,Vt.defaultProps={tag:'div'},Vt.contextTypes=qt;var Yt={disabled:Pe.bool,dropup:Pe.bool,group:Pe.bool,isOpen:Pe.bool,size:Pe.string,tag:Pe.string,tether:Pe.oneOfType([Pe.object,Pe.bool]),toggle:Pe.func,children:Pe.node,className:Pe.string,cssModule:Pe.object},Xt={toggle:Pe.func.isRequired,isOpen:Pe.bool.isRequired},$t={classPrefix:'bs-tether',classes:{element:'dropdown',enabled:'show'},constraints:[{to:'scrollParent',attachment:'together none'},{to:'window',attachment:'together none'}]},Kt=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.addEvents=o.addEvents.bind(o),o.getTetherConfig=o.getTetherConfig.bind(o),o.handleDocumentClick=o.handleDocumentClick.bind(o),o.removeEvents=o.removeEvents.bind(o),o.toggle=o.toggle.bind(o),o}return Ce(t,e),ke(t,[{key:'getChildContext',value:function(){return{toggle:this.props.toggle,isOpen:this.props.isOpen}}},{key:'componentDidMount',value:function(){this.handleProps()}},{key:'componentDidUpdate',value:function(e){this.props.isOpen!==e.isOpen&&this.handleProps()}},{key:'componentWillUnmount',value:function(){this.removeEvents()}},{key:'getTetherTarget',value:function(){var e=o.findDOMNode(this);return e.querySelector('[data-toggle="dropdown"]')}},{key:'getTetherConfig',value:function(e){var t=this,o='top',a='left',s='bottom',n='left';return e.right&&(a='right',n='right'),this.props.dropup&&(o='bottom',s='top'),_e({},$t,{attachment:o+' '+a,targetAttachment:s+' '+n,target:function(){return t.getTetherTarget()}},this.props.tether)}},{key:'addEvents',value:function(){document.addEventListener('click',this.handleDocumentClick,!0)}},{key:'removeEvents',value:function(){document.removeEventListener('click',this.handleDocumentClick,!0)}},{key:'handleDocumentClick',value:function(t){var e=o.findDOMNode(this);e.contains(t.target)&&e!==t.target||this.toggle()}},{key:'handleProps',value:function(){this.props.tether||(this.props.isOpen?this.addEvents():this.removeEvents())}},{key:'toggle',value:function(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle()}},{key:'renderChildren',value:function(){var e=this,t=this.props,o=t.tether,a=t.children,s=Ee(t,['tether','children']);return s.toggle=this.toggle,fe.Children.map(fe.Children.toArray(a),function(t){if(o&&t.type===Vt){var a=e.getTetherConfig(t.props);return fe.createElement(Gt,_e({},s,{tether:a}),t)}return t})}},{key:'render',value:function(){var e,t=Rt(this.props,['toggle','tether']),o=t.className,a=t.cssModule,s=t.dropup,n=t.group,l=t.size,r=t.tag,i=t.isOpen,d=Ee(t,['className','cssModule','dropup','group','size','tag','isOpen']),p=g(xe(o,(e={"btn-group":n},Me(e,'btn-group-'+l,!!l),Me(e,'dropdown',!n),Me(e,'show',i),Me(e,'dropup',s),e)),a);return fe.createElement(r,_e({},d,{className:p}),this.renderChildren())}}]),t}(fe.Component);Kt.propTypes=Yt,Kt.defaultProps={isOpen:!1,tag:'div'},Kt.childContextTypes=Xt;var Jt={children:Pe.node,tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Zt=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'nav-item'),o);return fe.createElement(Kt,_e({},s,{tag:a,className:n}))};Zt.propTypes=Jt,Zt.defaultProps={tag:'li'};var Qt={tag:Pe.oneOfType([Pe.func,Pe.string]),getRef:Pe.oneOfType([Pe.func,Pe.string]),disabled:Pe.bool,active:Pe.bool,className:Pe.string,cssModule:Pe.object,onClick:Pe.func,href:Pe.any},eo=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.onClick=o.onClick.bind(o),o}return Ce(t,e),ke(t,[{key:'onClick',value:function(t){return this.props.disabled?void t.preventDefault():void('#'===this.props.href&&t.preventDefault(),this.props.onClick&&this.props.onClick(t))}},{key:'render',value:function(){var e=this.props,t=e.className,o=e.cssModule,a=e.active,s=e.tag,n=e.getRef,l=Ee(e,['className','cssModule','active','tag','getRef']),r=g(xe(t,'nav-link',{disabled:l.disabled,active:a}),o);return fe.createElement(s,_e({},l,{ref:n,onClick:this.onClick,className:r}))}}]),t}(fe.Component);eo.propTypes=Qt,eo.defaultProps={tag:'a'};var to={tag:Pe.string,className:Pe.string,cssModule:Pe.object},oo=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'breadcrumb'),o);return fe.createElement(a,_e({},s,{className:n}))};oo.propTypes=to,oo.defaultProps={tag:'ol'};var ao={tag:Pe.oneOfType([Pe.func,Pe.string]),active:Pe.bool,className:Pe.string,cssModule:Pe.object},so=function(e){var t=e.className,o=e.cssModule,a=e.active,s=e.tag,n=Ee(e,['className','cssModule','active','tag']),l=g(xe(t,!!a&&'active','breadcrumb-item'),o);return fe.createElement(s,_e({},n,{className:l}))};so.propTypes=ao,so.defaultProps={tag:'li'};var no={active:Pe.bool,block:Pe.bool,color:Pe.string,disabled:Pe.bool,outline:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string]),getRef:Pe.oneOfType([Pe.func,Pe.string]),onClick:Pe.func,size:Pe.string,children:Pe.node,className:Pe.string,cssModule:Pe.object},lo=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.onClick=o.onClick.bind(o),o}return Ce(t,e),ke(t,[{key:'onClick',value:function(t){return this.props.disabled?void t.preventDefault():void(this.props.onClick&&this.props.onClick(t))}},{key:'render',value:function(){var e=this.props,t=e.active,o=e.block,a=e.className,s=e.cssModule,n=e.color,l=e.outline,r=e.size,i=e.tag,d=e.getRef,p=Ee(e,['active','block','className','cssModule','color','outline','size','tag','getRef']),c=g(xe(a,'btn','btn'+(l?'-outline':'')+'-'+n,!!r&&'btn-'+r,!!o&&'btn-block',{active:t,disabled:this.props.disabled}),s);return p.href&&'button'===i&&(i='a'),fe.createElement(i,_e({type:'button'===i&&p.onClick?'button':void 0},p,{className:c,ref:d,onClick:this.onClick}))}}]),t}(fe.Component);lo.propTypes=no,lo.defaultProps={color:'secondary',tag:'button'};var ro={children:Pe.node},io=function(e){return fe.createElement(Kt,_e({group:!0},e))};io.propTypes=ro;var po={tag:Pe.oneOfType([Pe.func,Pe.string]),"aria-label":Pe.string,className:Pe.string,cssModule:Pe.object,role:Pe.string,size:Pe.string,vertical:Pe.bool},co=function(e){var t=e.className,o=e.cssModule,a=e.size,s=e.vertical,n=e.tag,l=Ee(e,['className','cssModule','size','vertical','tag']),r=g(xe(t,!!a&&'btn-group-'+a,s?'btn-group-vertical':'btn-group'),o);return fe.createElement(n,_e({},l,{className:r}))};co.propTypes=po,co.defaultProps={tag:'div',role:'group'};var uo={tag:Pe.oneOfType([Pe.func,Pe.string]),"aria-label":Pe.string,className:Pe.string,cssModule:Pe.object,role:Pe.string},go=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'btn-toolbar'),o);return fe.createElement(a,_e({},s,{className:n}))};go.propTypes=uo,go.defaultProps={tag:'div',role:'toolbar'};var mo={children:Pe.node,disabled:Pe.bool,divider:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string]),header:Pe.bool,onClick:Pe.func,className:Pe.string,cssModule:Pe.object,toggle:Pe.bool},fo={toggle:Pe.func},ho=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.onClick=o.onClick.bind(o),o.getTabIndex=o.getTabIndex.bind(o),o}return Ce(t,e),ke(t,[{key:'onClick',value:function(t){return this.props.disabled||this.props.header||this.props.divider?void t.preventDefault():void(this.props.onClick&&this.props.onClick(t),this.props.toggle&&this.context.toggle())}},{key:'getTabIndex',value:function(){return this.props.disabled||this.props.header||this.props.divider?'-1':'0'}},{key:'render',value:function(){var e=this.getTabIndex(),t=Rt(this.props,['toggle']),o=t.className,a=t.cssModule,s=t.divider,n=t.tag,l=t.header,r=Ee(t,['className','cssModule','divider','tag','header']),i=g(xe(o,{disabled:r.disabled,"dropdown-item":!s&&!l,"dropdown-header":l,"dropdown-divider":s}),a);return'button'===n&&(l?n='h6':s?n='div':r.href&&(n='a')),fe.createElement(n,_e({type:'button'===n&&(r.onClick||this.props.toggle)?'button':void 0},r,{tabIndex:e,className:i,onClick:this.onClick}))}}]),t}(fe.Component);ho.propTypes=mo,ho.defaultProps={tag:'button',toggle:!0},ho.contextTypes=fo;var bo={caret:Pe.bool,color:Pe.string,children:Pe.node,className:Pe.string,cssModule:Pe.object,disabled:Pe.bool,onClick:Pe.func,"data-toggle":Pe.string,"aria-haspopup":Pe.bool,split:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string]),nav:Pe.bool},yo={isOpen:Pe.bool.isRequired,toggle:Pe.func.isRequired},vo=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.onClick=o.onClick.bind(o),o}return Ce(t,e),ke(t,[{key:'onClick',value:function(t){return this.props.disabled?void t.preventDefault():void(this.props.nav&&!this.props.tag&&t.preventDefault(),this.props.onClick&&this.props.onClick(t),this.context.toggle())}},{key:'render',value:function(){var e,t=this.props,o=t.className,a=t.cssModule,s=t.caret,n=t.split,l=t.nav,r=t.tag,i=Ee(t,['className','cssModule','caret','split','nav','tag']),d=i['aria-label']||'Toggle Dropdown',p=g(xe(o,{"dropdown-toggle":s||n,"dropdown-toggle-split":n,active:this.context.isOpen,"nav-link":l}),a),c=i.children||fe.createElement('span',{className:'sr-only'},d);return l&&!r?(e='a',i.href='#'):r?e=r:e=lo,fe.createElement(e,_e({},i,{className:p,onClick:this.onClick,"aria-haspopup":'true',"aria-expanded":this.context.isOpen,children:c}))}}]),t}(fe.Component);vo.propTypes=bo,vo.defaultProps={"data-toggle":'dropdown',"aria-haspopup":!0,color:'secondary'},vo.contextTypes=yo;var To={baseClass:Pe.string,baseClassIn:Pe.string,tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object,transitionAppearTimeout:Pe.number,transitionEnterTimeout:Pe.number,transitionLeaveTimeout:Pe.number,transitionAppear:Pe.bool,transitionEnter:Pe.bool,transitionLeave:Pe.bool,onLeave:Pe.func,onEnter:Pe.func},No=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.state={mounted:!e.transitionAppear},o.onLeave=o.onLeave.bind(o),o.onEnter=o.onEnter.bind(o),o.timers=[],o}return Ce(t,e),ke(t,[{key:'componentWillUnmount',value:function(){this.timers.forEach(function(e){return clearTimeout(e)})}},{key:'onEnter',value:function(e){var t=this;return function(){e(),t.props.onEnter&&t.props.onEnter()}}},{key:'onLeave',value:function(e){var t=this;return function(){e(),t.props.onLeave&&t.props.onLeave()}}},{key:'componentWillAppear',value:function(e){this.props.transitionAppear||this.onEnter(e)(),this.timers.push(setTimeout(this.onEnter(e),this.props.transitionAppearTimeout))}},{key:'componentDidAppear',value:function(){this.setState({mounted:!0})}},{key:'componentWillEnter',value:function(e){this.props.transitionEnter||this.onEnter(e)(),this.timers.push(setTimeout(this.onEnter(e),this.props.transitionEnterTimeout))}},{key:'componentDidEnter',value:function(){this.setState({mounted:!0})}},{key:'componentWillLeave',value:function(e){this.setState({mounted:!1}),this.props.transitionLeave||this.onLeave(e)(),this.timers.push(setTimeout(this.onLeave(e),this.props.transitionLeaveTimeout))}},{key:'render',value:function(){var e=this.props,t=e.baseClass,o=e.baseClassIn,a=e.className,s=e.cssModule,n=e.tag,l=Rt(this.props,Object.keys(To)),r=g(xe(a,t,!!this.state.mounted&&o),s);return fe.createElement(n,_e({},l,{className:r}))}}]),t}(fe.Component);No.propTypes=To,No.defaultProps={tag:'div',baseClass:'fade',baseClassIn:'show',transitionAppearTimeout:0,transitionEnterTimeout:0,transitionLeaveTimeout:0,transitionAppear:!0,transitionEnter:!0,transitionLeave:!0};var ko={color:Pe.string,pill:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string]),children:Pe.node,className:Pe.string,cssModule:Pe.object},Mo=function(e){var t=e.className,o=e.cssModule,a=e.color,s=e.pill,n=e.tag,l=Ee(e,['className','cssModule','color','pill','tag']),r=g(xe(t,'badge','badge-'+a,!!s&&'badge-pill'),o);return fe.createElement(n,_e({},l,{className:r}))};Mo.propTypes=ko,Mo.defaultProps={color:'default',pill:!1,tag:'span'};var _o={tag:Pe.oneOfType([Pe.func,Pe.string]),inverse:Pe.bool,color:Pe.string,block:Pe.bool,outline:Pe.bool,className:Pe.string,cssModule:Pe.object},Co=function(e){var t=e.className,o=e.cssModule,a=e.color,s=e.block,n=e.inverse,l=e.outline,r=e.tag,i=Ee(e,['className','cssModule','color','block','inverse','outline','tag']),d=g(xe(t,'card',!!n&&'card-inverse',!!s&&'card-block',!!a&&'card'+(l?'-outline':'')+'-'+a),o);return fe.createElement(r,_e({},i,{className:d}))};Co.propTypes=_o,Co.defaultProps={tag:'div'};var Eo={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Oo=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-group'),o);return fe.createElement(a,_e({},s,{className:n}))};Oo.propTypes=Eo,Oo.defaultProps={tag:'div'};var wo={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Po=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-deck'),o);return fe.createElement(a,_e({},s,{className:n}))};Po.propTypes=wo,Po.defaultProps={tag:'div'};var xo={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},jo=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-columns'),o);return fe.createElement(a,_e({},s,{className:n}))};jo.propTypes=xo,jo.defaultProps={tag:'div'};var Ao={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Do=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-block'),o);return fe.createElement(a,_e({},s,{className:n}))};Do.propTypes=Ao,Do.defaultProps={tag:'div'};var Lo={tag:Pe.oneOfType([Pe.func,Pe.string]),getRef:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},So=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=e.getRef,n=Ee(e,['className','cssModule','tag','getRef']),l=g(xe(t,'card-link'),o);return fe.createElement(a,_e({},n,{ref:s,className:l}))};So.propTypes=Lo,So.defaultProps={tag:'a'};var Ro={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},zo=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-footer'),o);return fe.createElement(a,_e({},s,{className:n}))};zo.propTypes=Ro,zo.defaultProps={tag:'div'};var Io={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Bo=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-header'),o);return fe.createElement(a,_e({},s,{className:n}))};Bo.propTypes=Io,Bo.defaultProps={tag:'div'};var Wo={tag:Pe.oneOfType([Pe.func,Pe.string]),top:Pe.bool,bottom:Pe.bool,className:Pe.string,cssModule:Pe.object},Uo=function(e){var t=e.className,o=e.cssModule,a=e.top,s=e.bottom,n=e.tag,l=Ee(e,['className','cssModule','top','bottom','tag']),r='card-img';a&&(r='card-img-top'),s&&(r='card-img-bottom');var i=g(xe(t,r),o);return fe.createElement(n,_e({},l,{className:i}))};Uo.propTypes=Wo,Uo.defaultProps={tag:'img'};var Ho={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Go=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-img-overlay'),o);return fe.createElement(a,_e({},s,{className:n}))};Go.propTypes=Ho,Go.defaultProps={tag:'div'};var Fo={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},qo=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-subtitle'),o);return fe.createElement(a,_e({},s,{className:n}))};qo.propTypes=Fo,qo.defaultProps={tag:'h6'};var Vo={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Yo=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-text'),o);return fe.createElement(a,_e({},s,{className:n}))};Yo.propTypes=Vo,Yo.defaultProps={tag:'p'};var Xo={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},$o=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'card-title'),o);return fe.createElement(a,_e({},s,{className:n}))};$o.propTypes=Xo,$o.defaultProps={tag:'h4'};var Ko={placement:Pe.oneOf(je),target:Pe.string.isRequired,isOpen:Pe.bool,tether:Pe.object,tetherRef:Pe.func,className:Pe.string,cssModule:Pe.object,toggle:Pe.func},Jo={classPrefix:'bs-tether',classes:{element:!1,enabled:'show'},constraints:[{to:'scrollParent',attachment:'together none'},{to:'window',attachment:'together none'}]},Zo=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.getTetherConfig=o.getTetherConfig.bind(o),o}return Ce(t,e),ke(t,[{key:'getTetherConfig',value:function(){var e=r(this.props.placement);return _e({},Jo,e,{target:'#'+this.props.target},this.props.tether)}},{key:'render',value:function(){if(!this.props.isOpen)return null;var e=this.getTetherConfig(),t=g(xe('popover-inner',this.props.className),this.props.cssModule),o=Rt(this.props,Object.keys(Ko));return fe.createElement(Gt,{className:g('popover',this.props.cssModule),tether:e,tetherRef:this.props.tetherRef,isOpen:this.props.isOpen,toggle:this.props.toggle},fe.createElement('div',_e({},o,{className:t})))}}]),t}(fe.Component);Zo.propTypes=Ko,Zo.defaultProps={isOpen:!1,placement:'bottom',toggle:function(){}};var Qo={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},ea=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'popover-title'),o);return fe.createElement(a,_e({},s,{className:n}))};ea.propTypes=Qo,ea.defaultProps={tag:'h3'};var ta={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},oa=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'popover-content'),o);return fe.createElement(a,_e({},s,{className:n}))};oa.propTypes=ta,oa.defaultProps={tag:'div'};var aa=0/0,sa='[object Symbol]',na=/^\s+|\s+$/g,la=/^[-+]0x[0-9a-f]+$/i,ra=/^0b[01]+$/i,ia=/^0o[0-7]+$/i,da=parseInt,pa=Object.prototype,ca=pa.toString,ua=function(e){if('number'==typeof e)return e;if(ue(e))return aa;if(pe(e)){var t='function'==typeof e.valueOf?e.valueOf():e;e=pe(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(na,'');var o=ra.test(e);return o||ia.test(e)?da(e.slice(2),o?2:8):la.test(e)?aa:+e},ga={children:Pe.node,bar:Pe.bool,multi:Pe.bool,tag:Pe.string,value:Pe.oneOfType([Pe.string,Pe.number]),max:Pe.oneOfType([Pe.string,Pe.number]),animated:Pe.bool,striped:Pe.bool,color:Pe.string,className:Pe.string,barClassName:Pe.string,cssModule:Pe.object},ma=function(e){var t=e.children,o=e.className,a=e.barClassName,s=e.cssModule,n=e.value,l=e.max,r=e.animated,i=e.striped,d=e.color,p=e.bar,c=e.multi,u=e.tag,m=Ee(e,['children','className','barClassName','cssModule','value','max','animated','striped','color','bar','multi','tag']),f=100*(ua(n)/ua(l)),h=g(xe(o,'progress'),s),b=g(xe('progress-bar',p?o||a:a,r?'progress-bar-animated':null,d?'bg-'+d:null,i||r?'progress-bar-striped':null),s),y=c?t:fe.createElement('div',{className:b,style:{width:f+'%'},role:'progressbar',"aria-valuenow":n,"aria-valuemin":'0',"aria-valuemax":l,children:t});return p?y:fe.createElement(u,_e({},m,{className:h,children:y}))};ma.propTypes=ga,ma.defaultProps={tag:'div',value:0,max:100};var fa={isOpen:Pe.bool,autoFocus:Pe.bool,size:Pe.string,toggle:Pe.func,keyboard:Pe.bool,backdrop:Pe.oneOfType([Pe.bool,Pe.oneOf(['static'])]),onEnter:Pe.func,onExit:Pe.func,children:Pe.node,className:Pe.string,wrapClassName:Pe.string,modalClassName:Pe.string,backdropClassName:Pe.string,contentClassName:Pe.string,fade:Pe.bool,cssModule:Pe.object,zIndex:Pe.oneOfType([Pe.number,Pe.string]),backdropTransitionTimeout:Pe.number,backdropTransitionAppearTimeout:Pe.number,backdropTransitionEnterTimeout:Pe.number,backdropTransitionLeaveTimeout:Pe.number,modalTransitionTimeout:Pe.number,modalTransitionAppearTimeout:Pe.number,modalTransitionEnterTimeout:Pe.number,modalTransitionLeaveTimeout:Pe.number},ha=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.originalBodyPadding=null,o.isBodyOverflowing=!1,o.togglePortal=o.togglePortal.bind(o),o.handleBackdropClick=o.handleBackdropClick.bind(o),o.handleEscape=o.handleEscape.bind(o),o.destroy=o.destroy.bind(o),o.onEnter=o.onEnter.bind(o),o.onExit=o.onExit.bind(o),o}return Ce(t,e),ke(t,[{key:'componentDidMount',value:function(){this.props.isOpen&&this.togglePortal()}},{key:'componentDidUpdate',value:function(e){this.props.isOpen===e.isOpen?this._element&&this.renderIntoSubtree():this.togglePortal()}},{key:'componentWillUnmount',value:function(){this.onExit()}},{key:'onEnter',value:function(){this.props.onEnter&&this.props.onEnter()}},{key:'onExit',value:function(){this.destroy(),this.props.onExit&&this.props.onExit()}},{key:'handleEscape',value:function(t){this.props.keyboard&&27===t.keyCode&&this.props.toggle&&this.props.toggle()}},{key:'handleBackdropClick',value:function(t){if(!0===this.props.backdrop){var e=this._dialog;t.target&&!e.contains(t.target)&&this.props.toggle&&this.props.toggle()}}},{key:'hasTransition',value:function(){return!1!==this.props.fade&&0<this.props.modalTransitionTimeout}},{key:'togglePortal',value:function(){this.props.isOpen?(this.props.autoFocus&&(this._focus=!0),this.show(),!this.hasTransition()&&this.onEnter()):(this.hide(),!this.hasTransition()&&this.onExit())}},{key:'destroy',value:function(){this._element&&(o.unmountComponentAtNode(this._element),document.body.removeChild(this._element),this._element=null);var e=document.body.className.replace(/(^| )modal-open( |$)/,' ');document.body.className=g(xe(e).trim(),this.props.cssModule),d(this.originalBodyPadding)}},{key:'hide',value:function(){this.renderIntoSubtree()}},{key:'show',value:function(){var e=document.body.className;this._element=document.createElement('div'),this._element.setAttribute('tabindex','-1'),this._element.style.position='relative',this._element.style.zIndex=this.props.zIndex,this.originalBodyPadding=c(),u(),document.body.appendChild(this._element),document.body.className=g(xe(e,'modal-open'),this.props.cssModule),this.renderIntoSubtree()}},{key:'renderModalDialog',value:function(){var e=this;return fe.createElement('div',{className:g(xe('modal-dialog',this.props.className,Me({},'modal-'+this.props.size,this.props.size)),this.props.cssModule),role:'document',ref:function(t){return e._dialog=t}},fe.createElement('div',{className:g(xe('modal-content',this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:'renderIntoSubtree',value:function(){o.unstable_renderSubtreeIntoContainer(this,this.renderChildren(),this._element),this._focus&&(this._dialog.parentNode.focus(),this._focus=!1)}},{key:'renderChildren',value:function(){var e=this.props,t=e.wrapClassName,o=e.modalClassName,s=e.backdropClassName,n=e.cssModule,l=e.isOpen,r=e.backdrop,i=e.modalTransitionTimeout,d=e.backdropTransitionTimeout,p={onClickCapture:this.handleBackdropClick,onKeyUp:this.handleEscape,style:{display:'block'},tabIndex:'-1'};return this.hasTransition()?fe.createElement(a.TransitionGroup,{component:'div',className:g(t)},l&&fe.createElement(No,_e({key:'modal-dialog',onEnter:this.onEnter,onLeave:this.onExit,transitionAppearTimeout:'number'==typeof this.props.modalTransitionAppearTimeout?this.props.modalTransitionAppearTimeout:i,transitionEnterTimeout:'number'==typeof this.props.modalTransitionEnterTimeout?this.props.modalTransitionEnterTimeout:i,transitionLeaveTimeout:'number'==typeof this.props.modalTransitionLeaveTimeout?this.props.modalTransitionLeaveTimeout:i,cssModule:n,className:g(xe('modal',o),n)},p),this.renderModalDialog()),l&&r&&fe.createElement(No,{key:'modal-backdrop',transitionAppearTimeout:'number'==typeof this.props.backdropTransitionAppearTimeout?this.props.backdropTransitionAppearTimeout:d,transitionEnterTimeout:'number'==typeof this.props.backdropTransitionEnterTimeout?this.props.backdropTransitionEnterTimeout:d,transitionLeaveTimeout:'number'==typeof this.props.backdropTransitionLeaveTimeout?this.props.backdropTransitionLeaveTimeout:d,cssModule:n,className:g(xe('modal-backdrop',s),n)})):fe.createElement('div',{className:g(t)},l&&fe.createElement('div',_e({className:g(xe('modal','show',o),n)},p),this.renderModalDialog()),l&&r&&fe.createElement('div',{className:g(xe('modal-backdrop','show',s),n)}))}},{key:'render',value:function(){return null}}]),t}(fe.Component);ha.propTypes=fa,ha.defaultProps={isOpen:!1,autoFocus:!0,backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,modalTransitionTimeout:300,backdropTransitionTimeout:150};var ba={tag:Pe.oneOfType([Pe.func,Pe.string]),wrapTag:Pe.oneOfType([Pe.func,Pe.string]),toggle:Pe.func,className:Pe.string,cssModule:Pe.object,children:Pe.node},ya=function(e){var t,o=e.className,a=e.cssModule,s=e.children,n=e.toggle,l=e.tag,r=e.wrapTag,i=Ee(e,['className','cssModule','children','toggle','tag','wrapTag']),d=g(xe(o,'modal-header'),a);return n&&(t=fe.createElement('button',{type:'button',onClick:n,className:'close',"aria-label":'Close'},fe.createElement('span',{"aria-hidden":'true'},'\xD7'))),fe.createElement(r,_e({},i,{className:d}),fe.createElement(l,{className:g('modal-title',a)},s),t)};ya.propTypes=ba,ya.defaultProps={tag:'h4',wrapTag:'div'};var va={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Ta=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'modal-body'),o);return fe.createElement(a,_e({},s,{className:n}))};Ta.propTypes=va,Ta.defaultProps={tag:'div'};var Na={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},ka=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'modal-footer'),o);return fe.createElement(a,_e({},s,{className:n}))};ka.propTypes=Na,ka.defaultProps={tag:'div'};var Ma={placement:Pe.oneOf(je),target:Pe.oneOfType([Pe.string,Pe.object]).isRequired,isOpen:Pe.bool,disabled:Pe.bool,tether:Pe.object,tetherRef:Pe.func,className:Pe.string,cssModule:Pe.object,toggle:Pe.func,autohide:Pe.bool,delay:Pe.oneOfType([Pe.shape({show:Pe.number,hide:Pe.number}),Pe.number])},_a={show:0,hide:250},Ca={classPrefix:'bs-tether',classes:{element:!1,enabled:'show'},constraints:[{to:'scrollParent',attachment:'together none'},{to:'window',attachment:'together none'}]},Ea=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.addTargetEvents=o.addTargetEvents.bind(o),o.getTarget=o.getTarget.bind(o),o.getTetherConfig=o.getTetherConfig.bind(o),o.handleDocumentClick=o.handleDocumentClick.bind(o),o.removeTargetEvents=o.removeTargetEvents.bind(o),o.toggle=o.toggle.bind(o),o.onMouseOverTooltip=o.onMouseOverTooltip.bind(o),o.onMouseLeaveTooltip=o.onMouseLeaveTooltip.bind(o),o.onMouseOverTooltipContent=o.onMouseOverTooltipContent.bind(o),o.onMouseLeaveTooltipContent=o.onMouseLeaveTooltipContent.bind(o),o.show=o.show.bind(o),o.hide=o.hide.bind(o),o}return Ce(t,e),ke(t,[{key:'componentDidMount',value:function(){this._target=this.getTarget(),this.addTargetEvents()}},{key:'componentWillUnmount',value:function(){this.removeTargetEvents()}},{key:'onMouseOverTooltip',value:function(){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show,this.getDelay('show'))}},{key:'onMouseLeaveTooltip',value:function(){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide,this.getDelay('hide'))}},{key:'onMouseOverTooltipContent',value:function(){this.props.autohide||this._hideTimeout&&this.clearHideTimeout()}},{key:'onMouseLeaveTooltipContent',value:function(){this.props.autohide||(this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide,this.getDelay('hide')))}},{key:'getDelay',value:function(e){var t=this.props.delay;return'object'===('undefined'==typeof t?'undefined':Te(t))?isNaN(t[e])?_a[e]:t[e]:t}},{key:'getTarget',value:function(){var e=this.props.target;return'object'===('undefined'==typeof e?'undefined':Te(e))?e:document.getElementById(e)}},{key:'getTetherConfig',value:function(){var e=r(this.props.placement);return _e({},Ca,e,{target:this.getTarget},this.props.tether)}},{key:'show',value:function(){this.props.isOpen||(this.clearShowTimeout(),this.toggle())}},{key:'hide',value:function(){this.props.isOpen&&(this.clearHideTimeout(),this.toggle())}},{key:'clearShowTimeout',value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:'clearHideTimeout',value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:'handleDocumentClick',value:function(t){(t.target===this._target||this._target.contains(t.target))&&(this._hideTimeout&&this.clearHideTimeout(),!this.props.isOpen&&this.toggle())}},{key:'addTargetEvents',value:function(){this._target.addEventListener('mouseover',this.onMouseOverTooltip,!0),this._target.addEventListener('mouseout',this.onMouseLeaveTooltip,!0),document.addEventListener('click',this.handleDocumentClick,!0)}},{key:'removeTargetEvents',value:function(){this._target.removeEventListener('mouseover',this.onMouseOverTooltip,!0),this._target.removeEventListener('mouseout',this.onMouseLeaveTooltip,!0),document.removeEventListener('click',this.handleDocumentClick,!0)}},{key:'toggle',value:function(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle()}},{key:'render',value:function(){if(!this.props.isOpen)return null;var e=Rt(this.props,Object.keys(Ma)),t=g(xe('tooltip-inner',this.props.className),this.props.cssModule),o=this.getTetherConfig();return fe.createElement(Gt,{className:'tooltip',tether:o,tetherRef:this.props.tetherRef,isOpen:this.props.isOpen,toggle:this.toggle},fe.createElement('div',_e({},e,{className:t,onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent})))}}]),t}(fe.Component);Ea.propTypes=Ma,Ea.defaultProps={isOpen:!1,placement:'bottom',delay:_a,autohide:!0,toggle:function(){}};var Oa={className:Pe.string,cssModule:Pe.object,size:Pe.string,bordered:Pe.bool,striped:Pe.bool,inverse:Pe.bool,hover:Pe.bool,reflow:Pe.bool,responsive:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string]),responsiveTag:Pe.oneOfType([Pe.func,Pe.string])},wa=function(e){var t=e.className,o=e.cssModule,a=e.size,s=e.bordered,n=e.striped,l=e.inverse,r=e.hover,i=e.reflow,d=e.responsive,p=e.tag,c=e.responsiveTag,u=Ee(e,['className','cssModule','size','bordered','striped','inverse','hover','reflow','responsive','tag','responsiveTag']),m=g(xe(t,'table',!!a&&'table-'+a,!!s&&'table-bordered',!!n&&'table-striped',!!l&&'table-inverse',!!r&&'table-hover',!!i&&'table-reflow'),o),f=fe.createElement(p,_e({},u,{className:m}));return d?fe.createElement(c,{className:'table-responsive'},f):f};wa.propTypes=Oa,wa.defaultProps={tag:'table',responsiveTag:'div'};var Pa={tag:Pe.oneOfType([Pe.func,Pe.string]),flush:Pe.bool,className:Pe.string,cssModule:Pe.object},xa=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=e.flush,n=Ee(e,['className','cssModule','tag','flush']),l=g(xe(t,'list-group',!!s&&'list-group-flush'),o);return fe.createElement(a,_e({},n,{className:l}))};xa.propTypes=Pa,xa.defaultProps={tag:'ul'};var ja={children:Pe.node,inline:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string]),getRef:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Aa=function(e){var t=e.className,o=e.cssModule,a=e.inline,s=e.tag,n=e.getRef,l=Ee(e,['className','cssModule','inline','tag','getRef']),r=g(xe(t,!!a&&'form-inline'),o);return fe.createElement(s,_e({},l,{ref:n,className:r}))};Aa.propTypes=ja,Aa.defaultProps={tag:'form'};var Da={children:Pe.node,tag:Pe.string,className:Pe.string,cssModule:Pe.object},La=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'form-control-feedback'),o);return fe.createElement(a,_e({},s,{className:n}))};La.propTypes=Da,La.defaultProps={tag:'div'};var Sa={children:Pe.node,row:Pe.bool,check:Pe.bool,disabled:Pe.bool,tag:Pe.string,color:Pe.string,className:Pe.string,cssModule:Pe.object},Ra=function(e){var t=e.className,o=e.cssModule,a=e.row,s=e.disabled,n=e.color,l=e.check,r=e.tag,i=Ee(e,['className','cssModule','row','disabled','color','check','tag']),d=g(xe(t,!!n&&'has-'+n,!!a&&'row',l?'form-check':'form-group',l&&s&&'disabled'),o);return fe.createElement(r,_e({},i,{className:d}))};Ra.propTypes=Sa,Ra.defaultProps={tag:'div'};var za={children:Pe.node,inline:Pe.bool,tag:Pe.string,color:Pe.string,className:Pe.string,cssModule:Pe.object},Ia=function(e){var t=e.className,o=e.cssModule,a=e.inline,s=e.color,n=e.tag,l=Ee(e,['className','cssModule','inline','color','tag']),r=g(xe(t,!a&&'form-text',!!s&&'text-'+s),o);return fe.createElement(n,_e({},l,{className:r}))};Ia.propTypes=za,Ia.defaultProps={tag:'small'};var Ba={children:Pe.node,type:Pe.string,size:Pe.string,state:Pe.string,tag:Pe.oneOfType([Pe.func,Pe.string]),getRef:Pe.oneOfType([Pe.func,Pe.string]),static:Pe.bool,addon:Pe.bool,className:Pe.string,cssModule:Pe.object},Wa=function(e){function t(){return Ne(this,t),Oe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Ce(t,e),ke(t,[{key:'render',value:function(){var e=this.props,t=e.className,o=e.cssModule,a=e.type,s=e.size,n=e.state,l=e.tag,r=e.addon,i=e.static,d=e.getRef,p=Ee(e,['className','cssModule','type','size','state','tag','addon','static','getRef']),c=-1<['radio','checkbox'].indexOf(a),u='select'===a||'textarea'===a?a:'input',m='form-control';i?(m+='-static',u=l):'file'===a?m+='-file':c&&(r?m=null:m='form-check-input');var f=g(xe(t,!!n&&'form-control-'+n,!!s&&'form-control-'+s,m),o);return'input'===u&&(p.type=a),fe.createElement(u,_e({},p,{ref:d,className:f}))}}]),t}(fe.Component);Wa.propTypes=Ba,Wa.defaultProps={tag:'p',type:'text'};var Ua={tag:Pe.oneOfType([Pe.func,Pe.string]),size:Pe.string,className:Pe.string,cssModule:Pe.object},Ha=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=e.size,n=Ee(e,['className','cssModule','tag','size']),l=g(xe(t,'input-group',s?'input-group-'+s:null),o);return fe.createElement(a,_e({},n,{className:l}))};Ha.propTypes=Ua,Ha.defaultProps={tag:'div'};var Ga={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object},Fa=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=Ee(e,['className','cssModule','tag']),n=g(xe(t,'input-group-addon'),o);return fe.createElement(a,_e({},s,{className:n}))};Fa.propTypes=Ga,Fa.defaultProps={tag:'div'};var qa={tag:Pe.oneOfType([Pe.func,Pe.string]),children:Pe.node,groupClassName:Pe.string,groupAttributes:Pe.object,className:Pe.string,cssModule:Pe.object},Va=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=e.children,n=e.groupClassName,l=e.groupAttributes,r=Ee(e,['className','cssModule','tag','children','groupClassName','groupAttributes']);if('string'==typeof s){var i=g(xe(n,'input-group-btn'),o);return fe.createElement(a,_e({},l,{className:i}),fe.createElement(lo,_e({},r,{className:t,children:s})))}var d=g(xe(t,'input-group-btn'),o);return fe.createElement(a,_e({},r,{className:d,children:s}))};Va.propTypes=qa,Va.defaultProps={tag:'div'};var Ya=['xs','sm','md','lg','xl'],Xa=Pe.oneOfType([Pe.number,Pe.string]),$a=Pe.oneOfType([Pe.string,Pe.number,Pe.shape({size:Xa,push:Xa,pull:Xa,offset:Xa})]),Ka={children:Pe.node,hidden:Pe.bool,check:Pe.bool,inline:Pe.bool,disabled:Pe.bool,size:Pe.string,for:Pe.string,tag:Pe.string,className:Pe.string,cssModule:Pe.object,xs:$a,sm:$a,md:$a,lg:$a,xl:$a},Ja=function(e){var t=e.className,o=e.cssModule,a=e.hidden,s=e.tag,n=e.check,l=e.inline,r=e.disabled,i=e.size,d=e.for,p=Ee(e,['className','cssModule','hidden','tag','check','inline','disabled','size','for']),c=[];Ya.forEach(function(t){var a=e[t];if(delete p[t],a&&a.size){var s;c.push(g(xe((s={},Me(s,'col-'+t+'-'+a.size,a.size),Me(s,'push-'+t+'-'+a.push,a.push),Me(s,'pull-'+t+'-'+a.pull,a.pull),Me(s,'offset-'+t+'-'+a.offset,a.offset),s))),o)}else a&&c.push('col-'+t+'-'+a)});var u=g(xe(t,!!a&&'sr-only',!!n&&'form-check-'+(l?'inline':'label'),n&&l&&r&&'disabled',!!i&&'col-form-label-'+i,c,!!c.length&&'col-form-label'),o);return fe.createElement(s,_e({htmlFor:d},p,{className:u}))};Ja.propTypes=Ka,Ja.defaultProps={tag:'label'};var Za={body:Pe.bool,bottom:Pe.bool,children:Pe.node,className:Pe.string,cssModule:Pe.object,heading:Pe.bool,left:Pe.bool,list:Pe.bool,middle:Pe.bool,object:Pe.bool,right:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string]),top:Pe.bool},Qa=function(e){var t,o=e.body,a=e.bottom,s=e.className,n=e.cssModule,l=e.heading,r=e.left,i=e.list,d=e.middle,p=e.object,c=e.right,u=e.tag,m=e.top,f=Ee(e,['body','bottom','className','cssModule','heading','left','list','middle','object','right','tag','top']);t=l?'h4':r||c?'a':p?'img':i?'ul':'div';var h=u||t,b=g(xe(s,{"media-body":o,"media-heading":l,"media-left":r,"media-right":c,"media-top":m,"media-bottom":a,"media-middle":d,"media-object":p,"media-list":i,media:!o&&!l&&!r&&!c&&!m&&!a&&!d&&!p&&!i}),n);return fe.createElement(h,_e({},f,{className:b}))};Qa.propTypes=Za;var es={children:Pe.node,className:Pe.string,cssModule:Pe.object,size:Pe.string,tag:Pe.oneOfType([Pe.func,Pe.string])},ts=function(e){var t=e.className,o=e.cssModule,a=e.size,s=e.tag,n=Ee(e,['className','cssModule','size','tag']),l=g(xe(t,'pagination',Me({},'pagination-'+a,!!a)),o);return fe.createElement(s,_e({},n,{className:l}))};ts.propTypes=es,ts.defaultProps={tag:'ul'};var os={active:Pe.bool,children:Pe.node,className:Pe.string,cssModule:Pe.object,disabled:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string])},as=function(e){var t=e.active,o=e.className,a=e.cssModule,s=e.disabled,n=e.tag,l=Ee(e,['active','className','cssModule','disabled','tag']),r=g(xe(o,'page-item',{active:t,disabled:s}),a);return fe.createElement(n,_e({},l,{className:r}))};as.propTypes=os,as.defaultProps={tag:'li'};var ss={"aria-label":Pe.string,children:Pe.node,className:Pe.string,cssModule:Pe.object,next:Pe.bool,previous:Pe.bool,tag:Pe.oneOfType([Pe.func,Pe.string])},ns=function(e){var t,o=e.className,a=e.cssModule,s=e.next,n=e.previous,l=e.tag,r=Ee(e,['className','cssModule','next','previous','tag']),i=g(xe(o,'page-link'),a);n?t='Previous':s&&(t='Next');var d,p=e['aria-label']||t;n?d='\xAB':s&&(d='\xBB');var c=e.children;return(n||s)&&(c=[fe.createElement('span',{"aria-hidden":'true',key:'caret'},c||d),fe.createElement('span',{className:'sr-only',key:'sr'},p)]),fe.createElement(l,_e({},r,{className:i,"aria-label":p}),c)};ns.propTypes=ss,ns.defaultProps={tag:'a'};var ls={tag:Pe.oneOfType([Pe.func,Pe.string]),activeTab:Pe.any,className:Pe.string,cssModule:Pe.object},rs={activeTabId:Pe.any},is=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.state={activeTab:o.props.activeTab},o}return Ce(t,e),ke(t,[{key:'getChildContext',value:function(){return{activeTabId:this.state.activeTab}}},{key:'componentWillReceiveProps',value:function(e){this.state.activeTab!==e.activeTab&&this.setState({activeTab:e.activeTab})}},{key:'render',value:function(){var e=this.props,t=e.className,o=e.cssModule,a=e.tag,s=Rt(this.props,Object.keys(ls)),n=g(xe('tab-content',t),o);return fe.createElement(a,_e({},s,{className:n}))}}]),t}(t.Component);is.propTypes=ls,is.defaultProps={tag:'div'},is.childContextTypes=rs;var ds={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.string,cssModule:Pe.object,tabId:Pe.any},ps={activeTabId:Pe.any};ge.propTypes=ds,ge.defaultProps={tag:'div'},ge.contextTypes=ps;var cs={tag:Pe.oneOfType([Pe.func,Pe.string]),fluid:Pe.bool,className:Pe.string,cssModule:Pe.object},us=function(e){var t=e.className,o=e.cssModule,a=e.tag,s=e.fluid,n=Ee(e,['className','cssModule','tag','fluid']),l=g(xe(t,'jumbotron',!!s&&'jumbotron-fluid'),o);return fe.createElement(a,_e({},n,{className:l}))};us.propTypes=cs,us.defaultProps={tag:'div'};var gs=function(e){var t=e.children;return fe.Children.toArray(t)[0]||null},ms={children:Pe.node,className:Pe.string,cssModule:Pe.object,color:Pe.string,isOpen:Pe.bool,toggle:Pe.func,tag:Pe.oneOfType([Pe.func,Pe.string]),transitionAppearTimeout:Pe.number,transitionEnterTimeout:Pe.number,transitionLeaveTimeout:Pe.number},fs=function(e){var t=e.className,o=e.cssModule,s=e.tag,n=e.color,l=e.isOpen,r=e.toggle,i=e.children,d=e.transitionAppearTimeout,p=e.transitionEnterTimeout,c=e.transitionLeaveTimeout,u=Ee(e,['className','cssModule','tag','color','isOpen','toggle','children','transitionAppearTimeout','transitionEnterTimeout','transitionLeaveTimeout']),m=g(xe(t,'alert','alert-'+n,{"alert-dismissible":r}),o),f=fe.createElement(s,_e({},u,{className:m,role:'alert'}),r?fe.createElement('button',{type:'button',className:'close',"aria-label":'Close',onClick:r},fe.createElement('span',{"aria-hidden":'true'},'\xD7')):null,i);return fe.createElement(a.CSSTransitionGroup,{component:gs,transitionName:{appear:'fade',appearActive:'show',enter:'fade',enterActive:'show',leave:'fade',leaveActive:'out'},transitionAppear:0<d,transitionAppearTimeout:d,transitionEnter:0<p,transitionEnterTimeout:p,transitionLeave:0<c,transitionLeaveTimeout:c},l?f:null)};fs.propTypes=ms,fs.defaultProps={color:'success',isOpen:!0,tag:'div',transitionAppearTimeout:150,transitionEnterTimeout:150,transitionLeaveTimeout:150};var hs='SHOW',bs='SHOWN',ys='HIDE',vs='HIDDEN',Ts={isOpen:Pe.bool,className:Pe.node,tag:Pe.oneOfType([Pe.func,Pe.string]),cssModule:Pe.object,navbar:Pe.bool,delay:Pe.oneOfType([Pe.shape({show:Pe.number,hide:Pe.number}),Pe.number]),onOpened:Pe.func,onClosed:Pe.func},Ns={show:350,hide:350},ks=function(e){function t(e){Ne(this,t);var o=Oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.state={collapse:e.isOpen?bs:vs,height:null},o.element=null,o}return Ce(t,e),ke(t,[{key:'componentWillReceiveProps',value:function(e){var t=this,o=e.isOpen,a=this.state.collapse;o&&a===vs?this.setState({collapse:hs},function(){t.setState({height:t.getHeight()}),t.transitionTag=setTimeout(function(){t.setState({collapse:bs,height:null})},t.getDelay('show'))}):!o&&a===bs&&(this.setState({height:this.getHeight()},function(){t.setState({collapse:ys,height:t.getHeight()},function(){t.setState({height:0})})}),this.transitionTag=setTimeout(function(){t.setState({collapse:vs,height:null})},this.getDelay('hide')))}},{key:'componentDidUpdate',value:function(e,t){this.state.collapse===bs&&t&&t.collapse!==bs&&this.props.onOpened(),this.state.collapse===vs&&t&&t.collapse!==vs&&this.props.onClosed()}},{key:'componentWillUnmount',value:function(){clearTimeout(this.transitionTag)}},{key:'getDelay',value:function(e){var t=this.props.delay;return'object'===('undefined'==typeof t?'undefined':Te(t))?isNaN(t[e])?Ns[e]:t[e]:t}},{key:'getHeight',value:function(){return this.element.scrollHeight}},{key:'render',value:function(){var e,t=this,o=Rt(this.props,['isOpen','delay','onOpened','onClosed']),a=o.navbar,s=o.className,n=o.cssModule,l=o.tag,r=Ee(o,['navbar','className','cssModule','tag']),i=this.state,d=i.collapse,p=i.height;e=d===hs?'collapsing':d===bs?'collapse show':d===ys?'collapsing':d===vs?'collapse':'collapse';var c=g(xe(s,e,a&&'navbar-collapse'),n),u=null===p?null:{height:p};return fe.createElement(l,_e({},r,{style:_e({},r.style,u),className:c,ref:function(e){t.element=e}}))}}]),t}(t.Component);ks.propTypes=Ts,ks.defaultProps={isOpen:!1,tag:'div',delay:Ns,onOpened:function(){},onClosed:function(){}};var Ms={tag:Pe.oneOfType([Pe.func,Pe.string]),active:Pe.bool,disabled:Pe.bool,color:Pe.string,action:Pe.bool,className:Pe.any},_s=function(t){t.preventDefault()},Cs=function(e){var t=e.className,o=e.tag,a=e.active,s=e.disabled,n=e.action,l=e.color,r=Ee(e,['className','tag','active','disabled','action','color']),i=xe(t,!!a&&'active',!!s&&'disabled',!!n&&'list-group-item-action',!!l&&'list-group-item-'+l,'list-group-item');return s&&(r.onClick=_s),fe.createElement(o,_e({},r,{className:i}))};Cs.propTypes=Ms,Cs.defaultProps={tag:'li'};var Es={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.any},Os=function(e){var t=e.className,o=e.tag,a=Ee(e,['className','tag']),s=xe(t,'list-group-item-heading');return fe.createElement(o,_e({},a,{className:s}))};Os.propTypes=Es,Os.defaultProps={tag:'h5'};var ws={tag:Pe.oneOfType([Pe.func,Pe.string]),className:Pe.any},Ps=function(e){var t=e.className,o=e.tag,a=Ee(e,['className','tag']),s=xe(t,'list-group-item-text');return fe.createElement(o,_e({},a,{className:s}))};Ps.propTypes=ws,Ps.defaultProps={tag:'p'};var xs=fe.Component,js={UncontrolledAlert:fs,UncontrolledButtonDropdown:io,UncontrolledDropdown:Kt,UncontrolledNavDropdown:Zt,UncontrolledTooltip:Ea};Object.keys(js).forEach(function(e){var t=js[e],o=function(e){function o(e){Ne(this,o);var a=Oe(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return a.state={isOpen:t===fs},a.toggle=a.toggle.bind(a),a}return Ce(o,e),ke(o,[{key:'toggle',value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:'render',value:function(){return fe.createElement(t,_e({isOpen:this.state.isOpen,toggle:this.toggle},this.props))}}]),o}(xs);o.displayName=e,js[e]=o});var As=js.UncontrolledAlert,Ds=js.UncontrolledButtonDropdown,Ls=js.UncontrolledDropdown,Ss=js.UncontrolledNavDropdown,Rs=js.UncontrolledTooltip;e.Alert=fs,e.Container=De,e.Row=Se,e.Col=Ue,e.Navbar=Fe,e.NavbarBrand=Ve,e.NavbarToggler=$e,e.Nav=Je,e.NavItem=Qe,e.NavDropdown=Zt,e.NavLink=eo,e.Breadcrumb=oo,e.BreadcrumbItem=so,e.Button=lo,e.ButtonDropdown=io,e.ButtonGroup=co,e.ButtonToolbar=go,e.Dropdown=Kt,e.DropdownItem=ho,e.DropdownMenu=Vt,e.DropdownToggle=vo,e.Fade=No,e.Badge=Mo,e.Card=Co,e.CardLink=So,e.CardGroup=Oo,e.CardDeck=Po,e.CardColumns=jo,e.CardBlock=Do,e.CardFooter=zo,e.CardHeader=Bo,e.CardImg=Uo,e.CardImgOverlay=Go,e.CardSubtitle=qo,e.CardText=Yo,e.CardTitle=$o,e.Popover=Zo,e.PopoverContent=oa,e.PopoverTitle=ea,e.Progress=ma,e.Modal=ha,e.ModalHeader=ya,e.ModalBody=Ta,e.ModalFooter=ka,e.TetherContent=Gt,e.Tooltip=Ea,e.Table=wa,e.ListGroup=xa,e.Form=Aa,e.FormFeedback=La,e.FormGroup=Ra,e.FormText=Ia,e.Input=Wa,e.InputGroup=Ha,e.InputGroupAddon=Fa,e.InputGroupButton=Va,e.Label=Ja,e.Media=Qa,e.Pagination=ts,e.PaginationItem=as,e.PaginationLink=ns,e.TabContent=is,e.TabPane=ge,e.Jumbotron=us,e.Collapse=ks,e.ListGroupItem=Cs,e.ListGroupItemText=Ps,e.ListGroupItemHeading=Os,e.UncontrolledAlert=As,e.UncontrolledButtonDropdown=Ds,e.UncontrolledDropdown=Ls,e.UncontrolledNavDropdown=Ss,e.UncontrolledTooltip=Rs,Object.defineProperty(e,'__esModule',{value:!0})});
//# sourceMappingURL=reactstrap.min.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment