From 173315a65d1dfcc8a6bb0dfc11c3e4706a0e42c2 Mon Sep 17 00:00:00 2001 From: Mateusz Lazaru Date: Mon, 7 Aug 2023 10:07:20 +0200 Subject: [PATCH] release: 6.2.0 --- README.txt | 2 +- app/package.json | 2 +- app/src/components/Accordion/Accordion.tsx | 7 +- .../Accordion/AccordionItem/AccordionItem.tsx | 4 +- app/src/components/Badge/Badge.tsx | 4 +- app/src/components/Button/Button.tsx | 9 +- .../components/ButtonGroup/ButtonGroup.tsx | 6 +- app/src/components/Card/Card.tsx | 4 +- app/src/components/Card/CardBody/CardBody.tsx | 4 +- .../components/Card/CardFooter/CardFooter.tsx | 4 +- .../components/Card/CardGroup/CardGroup.tsx | 4 +- .../components/Card/CardHeader/CardHeader.tsx | 4 +- .../Card/CardOverlay/CardOverlay.tsx | 4 +- .../Card/CardSubTitle/CardSubTitle.tsx | 4 +- app/src/components/Card/CardText/CardText.tsx | 4 +- .../components/Card/CardTitle/CardTitle.tsx | 4 +- app/src/components/Carousel/Carousel.tsx | 48 +- .../Carousel/CarouselItem/types.tsx | 1 + app/src/components/Carousel/types.tsx | 1 + app/src/components/Collapse/Collapse.tsx | 6 +- .../Dropdown/DropdownItem/style.css | 2 +- .../components/Dropdown/hooks/useKeyboard.tsx | 3 +- app/src/components/ListGroup/ListGroup.tsx | 4 +- .../ListGroup/ListGroupItem/ListGroupItem.tsx | 4 +- .../components/Modal/ModalBody/ModalBody.tsx | 4 +- .../Modal/ModalContent/ModalContent.tsx | 4 +- .../Modal/ModalDialog/ModalDialog.tsx | 4 +- .../Modal/ModalFooter/ModalFooter.tsx | 4 +- .../Modal/ModalHeader/ModalHeader.tsx | 4 +- .../Modal/ModalTitle/ModalTitle.tsx | 4 +- app/src/components/Popover/Popover.tsx | 12 +- .../Popover/PopoverBody/PopoverBody.tsx | 11 +- .../Popover/PopoverHeader/PopoverHeader.tsx | 11 +- app/src/components/Progress/Progress.tsx | 4 +- .../Progress/ProgressBar/ProgressBar.tsx | 17 +- app/src/components/Spinner/Spinner.tsx | 4 +- app/src/components/Tooltip/Tooltip.tsx | 8 +- app/src/forms/Input/Input.tsx | 10 +- app/src/forms/InputGroup/InputGroup.tsx | 6 +- app/src/forms/InputTemplate/InputTemplate.tsx | 4 +- app/src/forms/Range/Range.tsx | 4 +- app/src/forms/Range/RangeThumb/RangeThumb.tsx | 4 +- app/src/forms/TextArea/TextArea.tsx | 8 +- app/src/forms/Validation/Validation.tsx | 15 +- .../ValidationItem/ValidationItem.tsx | 9 +- app/src/layout/Column/Column.tsx | 4 +- app/src/layout/Container/Container.tsx | 4 +- app/src/layout/Row/Row.tsx | 18 +- app/src/methods/Ripple/Ripple.tsx | 10 +- .../BreadcrumbItem/BreadcrumbItem.tsx | 6 +- app/src/navigation/Navbar/Navbar.tsx | 6 +- .../Navbar/NavbarBrand/NavbarBrand.tsx | 6 +- .../Navbar/NavbarItem/NavbarItem.tsx | 6 +- .../navigation/Navbar/NavbarLink/NavLink.tsx | 9 +- .../navigation/Navbar/NavbarNav/NavbarNav.tsx | 7 +- .../Navbar/NavbarToggler/NavbarToggler.tsx | 6 +- .../PaginationLink/PaginationLink.tsx | 6 +- .../Scrollspy/ScrollspyLink/ScrollspyLink.tsx | 2 - .../ScrollspySubList/ScrollspySubList.tsx | 2 - .../Tabs/TabsContent/TabsContent.tsx | 4 +- app/src/navigation/Tabs/TabsItem/TabsItem.tsx | 6 +- app/src/navigation/Tabs/TabsItem/types.tsx | 1 + app/src/navigation/Tabs/TabsPane/TabsPane.tsx | 4 +- app/src/styles/Typography/Typography.tsx | 16 +- app/src/utils/hooks.tsx | 20 + dist/mdb-react-ui-kit.esm.js | 2635 ++++++++--------- dist/mdb-react-ui-kit.js | 4 +- .../Carousel/CarouselItem/types.d.ts | 1 + .../types/free/components/Carousel/types.d.ts | 1 + .../free/navigation/Tabs/TabsItem/types.d.ts | 1 + dist/types/utils/hooks.d.ts | 3 + package.json | 2 +- 72 files changed, 1485 insertions(+), 1595 deletions(-) create mode 100644 app/src/utils/hooks.tsx create mode 100644 dist/types/utils/hooks.d.ts diff --git a/README.txt b/README.txt index f2cc4847..115ca3b1 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,6 @@ MDB 5 React -Version: FREE 6.1.0 +Version: FREE 6.2.0 Documentation: https://mdbootstrap.com/docs/b5/react/ diff --git a/app/package.json b/app/package.json index 998fb7de..374095f6 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mdb-react-ui-kit-demo", - "version": "6.1.0", + "version": "6.2.0", "main": "index.js", "repository": { "type": "git", diff --git a/app/src/components/Accordion/Accordion.tsx b/app/src/components/Accordion/Accordion.tsx index 8b56d532..47950351 100644 --- a/app/src/components/Accordion/Accordion.tsx +++ b/app/src/components/Accordion/Accordion.tsx @@ -4,7 +4,10 @@ import type { AccordionProps } from './types'; import { AccordionContext } from './AccordionContext'; const MDBAccordion: React.FC = React.forwardRef( - ({ alwaysOpen, borderless, className, flush, initialActive, tag: Tag, children, onChange, ...props }, ref) => { + ( + { alwaysOpen, borderless, className, flush, initialActive = 0, tag: Tag = 'div', children, onChange, ...props }, + ref + ) => { const classes = clsx('accordion', flush && 'accordion-flush', borderless && 'accordion-borderless', className); const [activeItem, setActiveItem] = useState(initialActive); @@ -25,6 +28,4 @@ const MDBAccordion: React.FC = React.forwardRef = React.forwardRef = React.forwardRef = React.forwardRef( - ({ className, color, pill, light, dot, tag: Tag, children, notification, ...props }, ref) => { + ({ className, color = 'primary', pill, light, dot, tag: Tag = 'span', children, notification, ...props }, ref) => { const classes = clsx( 'badge', light ? color && `badge-${color}` : color && `bg-${color}`, @@ -21,6 +21,4 @@ const MDBBadge: React.FC = React.forwardRef = React.forwardRef = React.forwardRef = React.forwardRef {children} @@ -93,6 +95,7 @@ const MDBBtn: React.FC = React.forwardRef {children} @@ -101,6 +104,4 @@ const MDBBtn: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, shadow, toolbar, size, vertical, tag: Tag, ...props }, ref) => { + ({ className, children, shadow, toolbar, size, vertical, tag: Tag = 'div', role = 'group', ...props }, ref) => { let type; if (toolbar) { @@ -16,13 +16,11 @@ const MDBBtnGroup: React.FC = React.forwardRef + {children} ); } ); -MDBBtnGroup.defaultProps = { tag: 'div', role: 'group' }; - export default MDBBtnGroup; diff --git a/app/src/components/Card/Card.tsx b/app/src/components/Card/Card.tsx index cc9d4b71..4eb4cd34 100755 --- a/app/src/components/Card/Card.tsx +++ b/app/src/components/Card/Card.tsx @@ -3,7 +3,7 @@ import clsx from 'clsx'; import type { CardProps } from './types'; const MDBCard: React.FC = React.forwardRef( - ({ className, children, border, background, tag: Tag, shadow, alignment, ...props }, ref) => { + ({ className, children, border, background, tag: Tag = 'div', shadow, alignment, ...props }, ref) => { const classes = clsx( 'card', border && `border border-${border}`, @@ -21,6 +21,4 @@ const MDBCard: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('card-body', className); return ( @@ -14,6 +14,4 @@ const MDBCardBody: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, border, background, tag: Tag, ...props }, ref) => { + ({ className, children, border, background, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('card-footer', border && `border-${border}`, background && `bg-${background}`, className); return ( @@ -14,6 +14,4 @@ const MDBCardFooter: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('card-group', className); return ( @@ -14,6 +14,4 @@ const MDBCardGroup: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, border, background, tag: Tag, ...props }, ref) => { + ({ className, children, border, background, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('card-header', border && `border-${border}`, background && `bg-${background}`, className); return ( @@ -14,6 +14,4 @@ const MDBCardHeader: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('card-img-overlay', className); return ( @@ -14,6 +14,4 @@ const MDBCardOverlay: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'p', ...props }, ref) => { const classes = clsx('card-subtitle', className); return ( @@ -14,6 +14,4 @@ const MDBCardSubTitle: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'p', ...props }, ref) => { const classes = clsx('card-text', className); return ( @@ -14,6 +14,4 @@ const MDBCardText: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'h5', ...props }, ref) => { const classes = clsx('card-title', className); return ( @@ -14,6 +14,4 @@ const MDBCardTitle: React.FC = React.forwardRef = ({ - fade, + fade = false, className, + carouselInnerClassName, dark, children, - interval, - keyboard, - touch, + interval = 5000, + keyboard = false, + touch = true, showControls, showIndicators, onSlide, @@ -34,14 +35,7 @@ const MDBCarousel: React.FC = ({ const carouselRef = useRef(null); const classes = clsx('carousel', 'slide', fade && 'carousel-fade', dark && 'carousel-dark', className); - - const pauseInterval = () => { - if (carouselInterval.current) { - clearInterval(carouselInterval.current); - - carouselInterval.current = null; - } - }; + const carouselInnerClasses = clsx('carousel-inner', carouselInnerClassName); const setElementActive = useCallback( (direction: string, newIndex?: number) => { @@ -59,8 +53,17 @@ const MDBCarousel: React.FC = ({ [active, itemsLength] ); + const pauseInterval = useCallback(() => { + if (carouselInterval.current) { + clearInterval(carouselInterval.current); + + carouselInterval.current = null; + } + }, []); + const slide = useCallback( (direction: string, nextElement: HTMLDivElement, index?: number) => { + if (!items.current || items.current.length < 2) return; setIsTransitioning(true); const carouselElements = items.current as HTMLDivElement[]; const activeElement = carouselElements[active]; @@ -114,7 +117,7 @@ const MDBCarousel: React.FC = ({ } }, - [carouselRef, active, setElementActive] + [carouselRef, active, setElementActive, pauseInterval] ); const block = (timer: number) => { @@ -194,14 +197,15 @@ const MDBCarousel: React.FC = ({ }, [carouselRef, changeStep]); const startInterval = useCallback(() => { + const individualInterval = (children as ReactElement[])?.[active]?.props?.interval; if (carouselInterval.current) { clearInterval(carouselInterval.current); carouselInterval.current = null; } - carouselInterval.current = setInterval(changeNext, interval); - }, [changeNext, interval]); + carouselInterval.current = setInterval(changeNext, individualInterval || interval); + }, [changeNext, interval, children, active]); const startTouch = (e: React.TouchEvent) => { if (!touch) return; @@ -277,12 +281,16 @@ const MDBCarousel: React.FC = ({ }, [carouselRef]); useEffect(() => { - onSlide?.(); + isTransitioning && onSlide?.(); }, [isTransitioning, onSlide]); useEffect(() => { startInterval(); - }, [startInterval]); + + return () => { + pauseInterval(); + }; + }, [startInterval, pauseInterval]); return (
= ({ ref={carouselRef} {...props} > -
+
{showIndicators && } {children} @@ -306,6 +314,4 @@ const MDBCarousel: React.FC = ({ ); }; -MDBCarousel.defaultProps = { fade: false, interval: 5000, touch: true, keyboard: false }; - export default MDBCarousel; diff --git a/app/src/components/Carousel/CarouselItem/types.tsx b/app/src/components/Carousel/CarouselItem/types.tsx index b1d810c9..f972e5d2 100755 --- a/app/src/components/Carousel/CarouselItem/types.tsx +++ b/app/src/components/Carousel/CarouselItem/types.tsx @@ -6,6 +6,7 @@ type CarouselItemProps = ImgVideo & { captionClassName?: string; itemId: number; video?: boolean; + interval?: number; }; export { CarouselItemProps }; diff --git a/app/src/components/Carousel/types.tsx b/app/src/components/Carousel/types.tsx index 5b5d7e1c..b19ce596 100755 --- a/app/src/components/Carousel/types.tsx +++ b/app/src/components/Carousel/types.tsx @@ -10,6 +10,7 @@ interface CarouselProps extends BaseComponent { showControls?: boolean; showIndicators?: boolean; touch?: boolean; + carouselInnerClassName?: string; } export { CarouselProps }; diff --git a/app/src/components/Collapse/Collapse.tsx b/app/src/components/Collapse/Collapse.tsx index 13fb5814..d879ce9a 100755 --- a/app/src/components/Collapse/Collapse.tsx +++ b/app/src/components/Collapse/Collapse.tsx @@ -8,7 +8,7 @@ const MDBCollapse: React.FC = ({ show = false, id, navbar, - tag: Tag, + tag: Tag = 'div', collapseRef, style, onShow, @@ -65,7 +65,7 @@ const MDBCollapse: React.FC = ({ } else { setCollapseHeight(0); } - }, [showCollapse, refCollapse]); + }, [showCollapse, refCollapse, children]); useEffect(() => { window.addEventListener('resize', handleResize); @@ -82,6 +82,4 @@ const MDBCollapse: React.FC = ({ ); }; -MDBCollapse.defaultProps = { tag: 'div' }; - export default MDBCollapse; diff --git a/app/src/components/Dropdown/DropdownItem/style.css b/app/src/components/Dropdown/DropdownItem/style.css index f8f5e90e..46c0e1e0 100755 --- a/app/src/components/Dropdown/DropdownItem/style.css +++ b/app/src/components/Dropdown/DropdownItem/style.css @@ -1,4 +1,4 @@ -.dropdown-menu .active { +.dropdown-menu .active:not(.form-control) { color: #16181b; background-color: #eee; } diff --git a/app/src/components/Dropdown/hooks/useKeyboard.tsx b/app/src/components/Dropdown/hooks/useKeyboard.tsx index 2049f2ae..82e82e93 100644 --- a/app/src/components/Dropdown/hooks/useKeyboard.tsx +++ b/app/src/components/Dropdown/hooks/useKeyboard.tsx @@ -8,7 +8,8 @@ export const useKeyboard = (children: ReactElement[] | ReactElement) => { const handleKeyboard = useCallback( (e: KeyboardEvent) => { - if (!Array.isArray(children)) return; + const controlKeys = ['ArrowUp', 'ArrowDown', 'Tab', 'Enter', 'Escape']; + if (!Array.isArray(children) || !controlKeys.includes(e.key)) return; isHtmlElement(document.activeElement) && document.activeElement.blur(); diff --git a/app/src/components/ListGroup/ListGroup.tsx b/app/src/components/ListGroup/ListGroup.tsx index 77138f90..590c0087 100755 --- a/app/src/components/ListGroup/ListGroup.tsx +++ b/app/src/components/ListGroup/ListGroup.tsx @@ -3,7 +3,7 @@ import React from 'react'; import type { ListGroupProps } from './types'; const MDBListGroup: React.FC = React.forwardRef( - ({ className, tag: Tag, horizontal, horizontalSize, light, numbered, children, small, ...props }, ref) => { + ({ className, tag: Tag = 'ul', horizontal, horizontalSize, light, numbered, children, small, ...props }, ref) => { const classes = clsx( 'list-group', horizontal && (horizontalSize ? `list-group-horizontal-${horizontalSize}` : 'list-group-horizontal'), @@ -21,6 +21,4 @@ const MDBListGroup: React.FC = React.forwardRef = React.forwardRef( - ({ className, tag: Tag, active, disabled, action, color, children, noBorders, ...props }, ref) => { + ({ className, tag: Tag = 'li', active, disabled, action, color, children, noBorders, ...props }, ref) => { const isButton = Tag === 'button'; const classes = clsx( @@ -24,6 +24,4 @@ const MDBListGroupItem: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('modal-body', className); return ( @@ -14,6 +14,4 @@ const MDBModalBody: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('modal-content', className); return ( @@ -14,6 +14,4 @@ const MDBModalContent: React.FC = React.forwardRef = React.forwardRef( - ({ className, centered, children, size, scrollable, tag: Tag, ...props }, ref) => { + ({ className, centered, children, size, scrollable, tag: Tag = 'div', ...props }, ref) => { const classes = clsx( 'modal-dialog', scrollable && 'modal-dialog-scrollable', @@ -20,6 +20,4 @@ const MDBModalDialog: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('modal-footer', className); return ( @@ -14,6 +14,4 @@ const MDBModalFooter: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', ...props }, ref) => { const classes = clsx('modal-header', className); return ( @@ -14,6 +14,4 @@ const MDBModalHeader: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'h5', ...props }, ref) => { const classes = clsx('modal-title', className); return ( @@ -14,6 +14,4 @@ const MDBModalTitle: React.FC = React.forwardRef = ({ btnClassName, btnChildren, children, - tag: Tag, + tag: Tag = MDBBtn, onShow, onHide, - popperTag: PopperTag, + popperTag: PopperTag = 'div', isOpen, - placement, + placement = 'bottom', dismiss, options, poperStyle, @@ -119,10 +119,4 @@ const MDBPopover: React.FC = ({ ); }; -MDBPopover.defaultProps = { - tag: MDBBtn, - popperTag: 'div', - placement: 'bottom', -}; - export default MDBPopover; diff --git a/app/src/components/Popover/PopoverBody/PopoverBody.tsx b/app/src/components/Popover/PopoverBody/PopoverBody.tsx index b9113f9e..c91e6d6a 100755 --- a/app/src/components/Popover/PopoverBody/PopoverBody.tsx +++ b/app/src/components/Popover/PopoverBody/PopoverBody.tsx @@ -2,7 +2,12 @@ import clsx from 'clsx'; import React from 'react'; import type { PopoverBodyProps } from './types'; -const MDBPopoverBody: React.FC = ({ className, children, tag: Tag, ...props }): JSX.Element => { +const MDBPopoverBody: React.FC = ({ + className, + children, + tag: Tag = 'div', + ...props +}): JSX.Element => { const classes = clsx('popover-body', className); return ( @@ -12,8 +17,4 @@ const MDBPopoverBody: React.FC = ({ className, children, tag: ); }; -MDBPopoverBody.defaultProps = { - tag: 'div', -}; - export default MDBPopoverBody; diff --git a/app/src/components/Popover/PopoverHeader/PopoverHeader.tsx b/app/src/components/Popover/PopoverHeader/PopoverHeader.tsx index ee2d4ba2..fb55c003 100755 --- a/app/src/components/Popover/PopoverHeader/PopoverHeader.tsx +++ b/app/src/components/Popover/PopoverHeader/PopoverHeader.tsx @@ -2,7 +2,12 @@ import clsx from 'clsx'; import React from 'react'; import type { PopoverHeaderProps } from './types'; -const MDBPopoverHeader: React.FC = ({ className, children, tag: Tag, ...props }): JSX.Element => { +const MDBPopoverHeader: React.FC = ({ + className, + children, + tag: Tag = 'h3', + ...props +}): JSX.Element => { const classes = clsx('popover-header', className); return ( @@ -11,8 +16,4 @@ const MDBPopoverHeader: React.FC = ({ className, children, t ); }; -MDBPopoverHeader.defaultProps = { - tag: 'h3', -}; - export default MDBPopoverHeader; diff --git a/app/src/components/Progress/Progress.tsx b/app/src/components/Progress/Progress.tsx index e540c49c..7db6f068 100755 --- a/app/src/components/Progress/Progress.tsx +++ b/app/src/components/Progress/Progress.tsx @@ -5,7 +5,7 @@ import ProgressBar from './ProgressBar/ProgressBar'; import type { ProgressBarProps } from './ProgressBar/types'; const MDBProgress: React.FC = React.forwardRef( - ({ className, children, tag: Tag, height, style, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', height, style, ...props }, ref) => { const classes = clsx('progress', className); const styles = { height: `${height}px`, ...style }; @@ -24,6 +24,4 @@ const MDBProgress: React.FC = React.forwardRef = React.forwardRef( ( - { animated, children, className, style, tag: Tag, valuenow, valuemax, striped, bgColor, valuemin, width, ...props }, + { + animated, + children, + className, + style, + tag: Tag = 'div', + valuenow, + valuemax, + striped, + bgColor, + valuemin, + width, + ...props + }, ref ) => { const classes = clsx( @@ -33,6 +46,4 @@ const MDBProgressBar: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, color, grow, size, ...props }, ref) => { + ({ className, children, tag: Tag = 'div', color, grow, size, ...props }, ref) => { const classes = clsx( `${grow ? 'spinner-grow' : 'spinner-border'}`, color && `text-${color}`, @@ -19,6 +19,4 @@ const MDBSpinner: React.FC = React.forwardRef = ({ className, children, disableMouseDown, - tag: Tag, - tooltipTag: TooltipTag, + tag: Tag = MDBBtn, + tooltipTag: TooltipTag = 'div', options, - placement, + placement = 'top', title, wrapperProps, wrapperClass, @@ -120,6 +120,4 @@ const MDBTooltip: React.FC = ({ ); }; -MDBTooltip.defaultProps = { tag: MDBBtn, tooltipTag: 'div', placement: 'top' }; - export default MDBTooltip; diff --git a/app/src/forms/Input/Input.tsx b/app/src/forms/Input/Input.tsx index 57f5b714..59307506 100755 --- a/app/src/forms/Input/Input.tsx +++ b/app/src/forms/Input/Input.tsx @@ -1,6 +1,7 @@ import clsx from 'clsx'; import React, { useState, useEffect, useRef, FocusEvent, ChangeEvent, useCallback, useImperativeHandle } from 'react'; import type { InputProps } from './types'; +import { useOnScreen } from '../../utils/hooks'; const MDBInput: React.FC = React.forwardRef( ( @@ -14,7 +15,7 @@ const MDBInput: React.FC = React.forwardRef = React.forwardRef = React.forwardRef(null); + const isVisible = useOnScreen(innerRef); useImperativeHandle(ref, () => innerRef.current as HTMLInputElement); @@ -75,7 +77,7 @@ const MDBInput: React.FC = React.forwardRef { setWidth(); - }, [labelReference.current?.clientWidth, setWidth]); + }, [labelReference.current?.clientWidth, setWidth, isVisible]); const handleChange = (e: ChangeEvent) => { setNewValue(e.target.value); @@ -131,6 +133,4 @@ const MDBInput: React.FC = React.forwardRef = React.forwardRef = React.forwardRef = ({ labelClass, wrapperClass, labelStyle, - wrapperTag: WrapperTag, + wrapperTag: WrapperTag = 'div', wrapperStyle, label, inline, @@ -65,6 +65,4 @@ const InputTemplate: React.FC = ({ ); }; -InputTemplate.defaultProps = { wrapperTag: 'div' }; - export default InputTemplate; diff --git a/app/src/forms/Range/Range.tsx b/app/src/forms/Range/Range.tsx index c6413896..7c26b46b 100755 --- a/app/src/forms/Range/Range.tsx +++ b/app/src/forms/Range/Range.tsx @@ -5,7 +5,7 @@ import type { RangeProps } from './types'; const MDBRange: React.FC = ({ className, - defaultValue, + defaultValue = 0, disableTooltip, labelId, max, @@ -83,6 +83,4 @@ const MDBRange: React.FC = ({ ); }; -MDBRange.defaultProps = { defaultValue: 0 }; - export default MDBRange; diff --git a/app/src/forms/Range/RangeThumb/RangeThumb.tsx b/app/src/forms/Range/RangeThumb/RangeThumb.tsx index 241b4a8c..d24ba751 100644 --- a/app/src/forms/Range/RangeThumb/RangeThumb.tsx +++ b/app/src/forms/Range/RangeThumb/RangeThumb.tsx @@ -8,7 +8,7 @@ type ThumbProps = { showThumb: boolean; }; -const RangeThumb: React.FC = ({ value, min, max, showThumb }) => { +const RangeThumb: React.FC = ({ value, min = '0', max = '100', showThumb }) => { const numberValue = Number(value); const [thumbPosition, setThumbPosition] = useState( @@ -28,6 +28,4 @@ const RangeThumb: React.FC = ({ value, min, max, showThumb }) => { ); }; -RangeThumb.defaultProps = { min: '0', max: '100' }; - export default RangeThumb; diff --git a/app/src/forms/TextArea/TextArea.tsx b/app/src/forms/TextArea/TextArea.tsx index 56a13267..a4171c77 100644 --- a/app/src/forms/TextArea/TextArea.tsx +++ b/app/src/forms/TextArea/TextArea.tsx @@ -12,7 +12,7 @@ const MDBTextArea: React.FC = ({ labelClass, wrapperClass, wrapperStyle, - wrapperTag: WrapperTag, + wrapperTag: WrapperTag = 'div', label, onChange, children, @@ -20,7 +20,7 @@ const MDBTextArea: React.FC = ({ labelStyle, inputRef, onBlur, - readonly, + readonly = false, ...props }) => { const labelEl = useRef(null); @@ -32,7 +32,7 @@ const MDBTextArea: React.FC = ({ const [oldValue, setNewValue] = useState(value || defaultValue); const [labelWidth, setLabelWidth] = useState(0); const [active, setActive] = useState( - (value !== undefined && value.length > 0) || (defaultValue !== undefined && defaultValue.length) > 0 ? true : false + (value !== undefined && value.length > 0) || (defaultValue !== undefined && defaultValue.length > 0) ? true : false ); const wrapperClasses = clsx('form-outline', contrast && 'form-white', wrapperClass); @@ -107,6 +107,4 @@ const MDBTextArea: React.FC = ({ ); }; -MDBTextArea.defaultProps = { wrapperTag: 'div', readonly: false }; - export default MDBTextArea; diff --git a/app/src/forms/Validation/Validation.tsx b/app/src/forms/Validation/Validation.tsx index 9e6bbae2..cf99ac8f 100755 --- a/app/src/forms/Validation/Validation.tsx +++ b/app/src/forms/Validation/Validation.tsx @@ -3,7 +3,7 @@ import type { ValidationProps } from './types'; import React, { useState } from 'react'; const MDBValidation: React.FC = React.forwardRef( - ({ className, children, isValidated, onReset, onSubmit, ...props }, ref) => { + ({ className, children, isValidated, onReset, onSubmit, noValidate = true, ...props }, ref) => { const [validated, setValidated] = useState(isValidated); const classes = clsx('needs-validation', validated && 'was-validated', className); @@ -23,15 +23,18 @@ const MDBValidation: React.FC = React.forwardRef +
{children}
); } ); -MDBValidation.defaultProps = { - noValidate: true, -}; - export default MDBValidation; diff --git a/app/src/forms/Validation/ValidationItem/ValidationItem.tsx b/app/src/forms/Validation/ValidationItem/ValidationItem.tsx index a659dadc..b5d63b5e 100644 --- a/app/src/forms/Validation/ValidationItem/ValidationItem.tsx +++ b/app/src/forms/Validation/ValidationItem/ValidationItem.tsx @@ -6,9 +6,9 @@ import clsx from 'clsx'; const MDBValidationItem: React.FC = ({ children, invalid, - feedback, + feedback = 'Looks good!', tooltip, - tag: Tag, + tag: Tag = 'div', ...props }) => { const [portalElement, setPortalElement] = useState(null); @@ -32,9 +32,4 @@ const MDBValidationItem: React.FC = ({ ); }; -MDBValidationItem.defaultProps = { - tag: 'div', - feedback: 'Looks good!', -}; - export default MDBValidationItem; diff --git a/app/src/layout/Column/Column.tsx b/app/src/layout/Column/Column.tsx index c4ca907d..74e14d49 100755 --- a/app/src/layout/Column/Column.tsx +++ b/app/src/layout/Column/Column.tsx @@ -18,7 +18,7 @@ const MDBCol: React.FC = React.forwardRef = React.forwardRef = React.forwardRef( - ({ breakpoint, fluid, children, className, tag: Tag, ...props }, ref) => { + ({ breakpoint, fluid, children, className, tag: Tag = 'div', ...props }, ref) => { const classes = clsx(`${fluid ? 'container-fluid' : `container${breakpoint ? '-' + breakpoint : ''}`}`, className); return ( @@ -14,6 +14,4 @@ const MDBContainer: React.FC = React.forwardRef = React.forwardRef( ( - { around, between, bottom, center, children, className, evenly, end, middle, start, tag: Tag, top, ...props }, + { + around, + between, + bottom, + center, + children, + className, + evenly, + end, + middle, + start, + tag: Tag = 'div', + top, + ...props + }, ref ) => { const classes = clsx( @@ -29,6 +43,4 @@ const MDBRow: React.FC = React.forwardRef } ); -MDBRow.defaultProps = { tag: 'div' }; - export default MDBRow; diff --git a/app/src/methods/Ripple/Ripple.tsx b/app/src/methods/Ripple/Ripple.tsx index cb171c5d..e25de673 100755 --- a/app/src/methods/Ripple/Ripple.tsx +++ b/app/src/methods/Ripple/Ripple.tsx @@ -25,12 +25,12 @@ const MDBRipple: React.FC = React.forwardRef = React.forwardRef = React.forwardRef( - ({ className, active, current, children, ...props }, ref) => { + ({ className, active, current = 'page', children, ...props }, ref) => { const classes = clsx('breadcrumb-item', active && 'active', className); return ( @@ -14,8 +14,4 @@ const MDBBreadcrumbItem: React.FC = React.forwardRef = React.forwardRef = React.forwardRef = React.forwardRef( - ({ className, children, tag: Tag, ...props }, ref) => { + ({ className, children, tag: Tag = 'a', ...props }, ref) => { const classes = clsx('navbar-brand', className); return ( @@ -14,8 +14,4 @@ const MDBNavbarBrand: React.FC = React.forwardRef = React.forwardRef( - ({ children, className, active, text, tag: Tag, ...props }, ref) => { + ({ children, className, active, text, tag: Tag = 'li', ...props }, ref) => { const classes = clsx('nav-item', active && 'active', text && 'navbar-text', className); return ( @@ -14,8 +14,4 @@ const MDBNavbarItem: React.FC = React.forwardRef = React.forwardRef( - ({ children, className, disabled, active, tag: Tag, ...props }, ref) => { + ({ children, className = '', disabled = false, active = false, tag: Tag = 'a', ...props }, ref) => { const classes = clsx('nav-link', disabled ? 'disabled' : active ? 'active' : '', className); return ( @@ -14,11 +14,4 @@ const MDBNavbarLink: React.FC = React.forwardRef = React.forwardRef( - ({ children, className, right, fullWidth, left, tag: Tag, ...props }, ref) => { + ({ children, className, right, fullWidth = true, left, tag: Tag = 'ul', ...props }, ref) => { const classes = clsx('navbar-nav', fullWidth && 'w-100', right && 'ms-auto', left && 'me-auto', className); return ( @@ -14,9 +14,4 @@ const MDBNavbarNav: React.FC = React.forwardRef( } ); -MDBNavbarNav.defaultProps = { - tag: 'ul', - fullWidth: true, -}; - export default MDBNavbarNav; diff --git a/app/src/navigation/Navbar/NavbarToggler/NavbarToggler.tsx b/app/src/navigation/Navbar/NavbarToggler/NavbarToggler.tsx index e1300d48..75d2e5ff 100755 --- a/app/src/navigation/Navbar/NavbarToggler/NavbarToggler.tsx +++ b/app/src/navigation/Navbar/NavbarToggler/NavbarToggler.tsx @@ -3,7 +3,7 @@ import clsx from 'clsx'; import type { NavbarTogglerProps } from './types'; const MDBNavbarToggler: React.FC = React.forwardRef( - ({ children, className, tag: Tag, ...props }, ref) => { + ({ children, className, tag: Tag = 'button', ...props }, ref) => { const classes = clsx('navbar-toggler', className); return ( @@ -14,8 +14,4 @@ const MDBNavbarToggler: React.FC = React.forwardRef = React.forwardRef( - ({ children, className, tag: Tag, ...props }, ref) => { + ({ children, className, tag: Tag = 'a', ...props }, ref) => { const classes = clsx('page-link', className); return ( @@ -14,8 +14,4 @@ const MDBPaginationLink: React.FC = React.forwardRef = ({ ); }; -MDBScrollspyLink.defaultProps = {}; - export default MDBScrollspyLink; diff --git a/app/src/navigation/Scrollspy/ScrollspySubList/ScrollspySubList.tsx b/app/src/navigation/Scrollspy/ScrollspySubList/ScrollspySubList.tsx index f266e571..7b7622ba 100755 --- a/app/src/navigation/Scrollspy/ScrollspySubList/ScrollspySubList.tsx +++ b/app/src/navigation/Scrollspy/ScrollspySubList/ScrollspySubList.tsx @@ -44,6 +44,4 @@ const MDBScrollspySubList: React.FC = ({ ); }; -MDBScrollspySubList.defaultProps = {}; - export default MDBScrollspySubList; diff --git a/app/src/navigation/Tabs/TabsContent/TabsContent.tsx b/app/src/navigation/Tabs/TabsContent/TabsContent.tsx index b07c23f0..09d7c692 100755 --- a/app/src/navigation/Tabs/TabsContent/TabsContent.tsx +++ b/app/src/navigation/Tabs/TabsContent/TabsContent.tsx @@ -3,7 +3,7 @@ import React from 'react'; import type { TabsContentProps } from './types'; const MDBTabsContent: React.FC = React.forwardRef( - ({ className, tag: Tag, children, ...props }, ref) => { + ({ className, tag: Tag = 'div', children, ...props }, ref) => { const classes = clsx('tab-content', className); return ( @@ -14,6 +14,4 @@ const MDBTabsContent: React.FC = React.forwardRef = React.forwardRef( - ({ className, children, style, ...props }, ref) => { + ({ className, children, style, tag: Tag = 'li', ...props }, ref) => { const classes = clsx('nav-item', className); return ( -
  • + {children} -
  • +
    ); } ); diff --git a/app/src/navigation/Tabs/TabsItem/types.tsx b/app/src/navigation/Tabs/TabsItem/types.tsx index c186895e..99655cdb 100755 --- a/app/src/navigation/Tabs/TabsItem/types.tsx +++ b/app/src/navigation/Tabs/TabsItem/types.tsx @@ -1,5 +1,6 @@ interface TabsItemProps extends React.LiHTMLAttributes { ref?: React.Ref; + tag?: React.ComponentProps; } export { TabsItemProps }; diff --git a/app/src/navigation/Tabs/TabsPane/TabsPane.tsx b/app/src/navigation/Tabs/TabsPane/TabsPane.tsx index 6320f23a..8ca74a12 100755 --- a/app/src/navigation/Tabs/TabsPane/TabsPane.tsx +++ b/app/src/navigation/Tabs/TabsPane/TabsPane.tsx @@ -3,7 +3,7 @@ import React, { useState, useEffect } from 'react'; import type { TabsPaneProps } from './types'; const MDBTabsPane: React.FC = React.forwardRef( - ({ className, tag: Tag, show, children, ...props }, ref) => { + ({ className, tag: Tag = 'div', show, children, ...props }, ref) => { const [isReadyToHide, setIsReadyToHide] = useState(false); const classes = clsx('tab-pane', 'fade', isReadyToHide && 'show', show && 'active', className); @@ -31,6 +31,4 @@ const MDBTabsPane: React.FC = React.forwardRef = React.forwardRef( ( - { className, children, tag: Tag, variant, color, blockquote, note, noteColor, listUnStyled, listInLine, ...props }, + { + className, + children, + tag: Tag = 'p', + variant, + color, + blockquote, + note, + noteColor, + listUnStyled, + listInLine, + ...props + }, ref ) => { const classes = clsx( @@ -34,6 +46,4 @@ const MDBTypography: React.FC = React.forwardRef) => { + const [isIntersecting, setIntersecting] = useState(false); + + // prettier-ignore + const observer = useMemo(() => new IntersectionObserver(([entry]) => { + setIntersecting(entry.isIntersecting) + }), []); + + useEffect(() => { + if (!ref.current) return; + observer.observe(ref.current); + return () => observer.disconnect(); + }, [observer, ref]); + + return isIntersecting; +}; + +export { useOnScreen }; diff --git a/dist/mdb-react-ui-kit.esm.js b/dist/mdb-react-ui-kit.esm.js index efa5ff57..7093e8fc 100755 --- a/dist/mdb-react-ui-kit.esm.js +++ b/dist/mdb-react-ui-kit.esm.js @@ -1,2048 +1,1981 @@ -(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".dropdown-menu .active{color:#16181b;background-color:#eee}.dropdown-menu [data-active=true] a.dropdown-item,.dropdown-menu .dropdown-item:focus,.dropdown-menu li:focus .dropdown-item :not(.disabled){color:#16181b;background-color:#eee}.dropdown-menu li:focus{outline:none}.dropdown-menu.dropdown-menu-dark [data-active=true] a.dropdown-item,.dropdown-menu.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu.dropdown-menu-dark li:focus .dropdown-item{color:#fff;background-color:#1266f1}.btn-group.dropstart>.dropdown-menu{right:0!important}")),document.head.appendChild(o)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})(); -import { jsx as i, jsxs as V, Fragment as Q } from "react/jsx-runtime"; -import w, { useState as B, useEffect as x, useRef as J, useCallback as G, useMemo as Te, useImperativeHandle as Be, createContext as pe, useContext as ee, Children as De, cloneElement as Me } from "react"; +(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".dropdown-menu .active:not(.form-control){color:#16181b;background-color:#eee}.dropdown-menu [data-active=true] a.dropdown-item,.dropdown-menu .dropdown-item:focus,.dropdown-menu li:focus .dropdown-item :not(.disabled){color:#16181b;background-color:#eee}.dropdown-menu li:focus{outline:none}.dropdown-menu.dropdown-menu-dark [data-active=true] a.dropdown-item,.dropdown-menu.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu.dropdown-menu-dark li:focus .dropdown-item{color:#fff;background-color:#1266f1}.btn-group.dropstart>.dropdown-menu{right:0!important}")),document.head.appendChild(o)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})(); +import { jsx as l, jsxs as G, Fragment as Q } from "react/jsx-runtime"; +import N, { useState as w, useEffect as I, useRef as K, useCallback as q, useMemo as be, useImperativeHandle as we, createContext as ve, useContext as se, Children as Te, cloneElement as Be } from "react"; import p from "clsx"; -import se, { createPortal as ge } from "react-dom"; +import re, { createPortal as he } from "react-dom"; import { usePopper as le } from "react-popper"; -import { flip as Re } from "@popperjs/core"; -const $e = w.forwardRef( - ({ breakpoint: e, fluid: t, children: s, className: r, tag: n, ...a }, c) => { - const o = p(`${t ? "container-fluid" : `container${e ? "-" + e : ""}`}`, r); - return /* @__PURE__ */ i(n, { className: o, ...a, ref: c, children: s }); +import { flip as De } from "@popperjs/core"; +const nt = N.forwardRef( + ({ breakpoint: e, fluid: t, children: n, className: s, tag: r = "div", ...a }, c) => { + const o = p(`${t ? "container-fluid" : `container${e ? "-" + e : ""}`}`, s); + return /* @__PURE__ */ l(r, { className: o, ...a, ref: c, children: n }); } -); -$e.defaultProps = { tag: "div" }; -const Ee = w.forwardRef( +), rt = N.forwardRef( ({ center: e, children: t, - className: s, - end: r, - lg: n, + className: n, + end: s, + lg: r, md: a, offsetLg: c, offsetMd: o, - offsetSm: l, - order: u, - size: f, + offsetSm: i, + order: d, + size: u, sm: m, - start: d, - tag: b, - xl: g, + start: f, + tag: g = "div", + xl: b, xxl: h, xs: v, - ...y + ...D }, $) => { - const M = p( - f && `col-${f}`, + const B = p( + u && `col-${u}`, v && `col-xs-${v}`, m && `col-sm-${m}`, a && `col-md-${a}`, - n && `col-lg-${n}`, - g && `col-xl-${g}`, + r && `col-lg-${r}`, + b && `col-xl-${b}`, h && `col-xxl-${h}`, - !f && !v && !m && !a && !n && !g && !h ? "col" : "", - u && `order-${u}`, - d && "align-self-start", + !u && !v && !m && !a && !r && !b && !h ? "col" : "", + d && `order-${d}`, + f && "align-self-start", e && "align-self-center", - r && "align-self-end", - l && `offset-sm-${l}`, + s && "align-self-end", + i && `offset-sm-${i}`, o && `offset-md-${o}`, c && `offset-lg-${c}`, - s + n ); - return /* @__PURE__ */ i(b, { className: M, ref: $, ...y, children: t }); + return /* @__PURE__ */ l(g, { className: B, ref: $, ...D, children: t }); } -); -Ee.defaultProps = { tag: "div" }; -const Pe = w.forwardRef( - ({ className: e, color: t, pill: s, light: r, dot: n, tag: a, children: c, notification: o, ...l }, u) => { - const f = p( +), at = N.forwardRef( + ({ className: e, color: t = "primary", pill: n, light: s, dot: r, tag: a = "span", children: c, notification: o, ...i }, d) => { + const u = p( "badge", - r ? t && `badge-${t}` : t && `bg-${t}`, - n && "badge-dot", - s && "rounded-pill", + s ? t && `badge-${t}` : t && `bg-${t}`, + r && "badge-dot", + n && "rounded-pill", o && "badge-notification", e ); - return /* @__PURE__ */ i(a, { className: f, ref: u, ...l, children: c }); + return /* @__PURE__ */ l(a, { className: u, ref: d, ...i, children: c }); } -); -Pe.defaultProps = { tag: "span", color: "primary" }; -const Ce = ({ ...e }) => { - const [t, s] = B(!1), r = p("ripple-wave", t && "active"); - return x(() => { - const n = setTimeout(() => { - s(!0); +), Me = ({ ...e }) => { + const [t, n] = w(!1), s = p("ripple-wave", t && "active"); + return I(() => { + const r = setTimeout(() => { + n(!0); }, 50); return () => { - clearTimeout(n); + clearTimeout(r); }; - }, []), /* @__PURE__ */ i("div", { className: r, ...e }); -}, Ie = (...e) => { - const t = w.useRef(); - return w.useEffect(() => { - e.forEach((s) => { - s && (typeof s == "function" ? s(t.current) : s.current = t.current); + }, []), /* @__PURE__ */ l("div", { className: s, ...e }); +}, $e = (...e) => { + const t = N.useRef(); + return N.useEffect(() => { + e.forEach((n) => { + n && (typeof n == "function" ? n(t.current) : n.current = t.current); }); }, [e]), t; -}, be = w.forwardRef( +}, Re = N.forwardRef( ({ className: e, - rippleTag: t, - rippleCentered: s, - rippleDuration: r, - rippleUnbound: n, - rippleRadius: a, - rippleColor: c, + rippleTag: t = "div", + rippleCentered: n, + rippleDuration: s = 500, + rippleUnbound: r, + rippleRadius: a = 0, + rippleColor: c = "dark", children: o, - onMouseDown: l, - ...u - }, f) => { - const m = J(null), d = Ie(f, m), b = "rgba({{color}}, 0.2) 0, rgba({{color}}, 0.3) 40%, rgba({{color}}, 0.4) 50%, rgba({{color}}, 0.5) 60%, rgba({{color}}, 0) 70%", g = [0, 0, 0], h = ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark"], [v, y] = B([]), [$, M] = B(!1), C = p( + onMouseDown: i, + ...d + }, u) => { + const m = K(null), f = $e(u, m), g = "rgba({{color}}, 0.2) 0, rgba({{color}}, 0.3) 40%, rgba({{color}}, 0.4) 50%, rgba({{color}}, 0.5) 60%, rgba({{color}}, 0) 70%", b = [0, 0, 0], h = ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark"], [v, D] = w([]), [$, B] = w(!1), x = p( "ripple", "ripple-surface", - n && "ripple-surface-unbound", + r && "ripple-surface-unbound", $ && `ripple-surface-${c}`, e - ), N = () => { + ), y = () => { if (h.find((E) => E === (c == null ? void 0 : c.toLowerCase()))) - return M(!0); + return B(!0); { - const E = S(c).join(","); - return `radial-gradient(circle, ${b.split("{{color}}").join(`${E}`)})`; + const E = P(c).join(","); + return `radial-gradient(circle, ${g.split("{{color}}").join(`${E}`)})`; } - }, S = (T) => { - const E = (D) => (D.length < 7 && (D = `#${D[1]}${D[1]}${D[2]}${D[2]}${D[3]}${D[3]}`), [parseInt(D.substr(1, 2), 16), parseInt(D.substr(3, 2), 16), parseInt(D.substr(5, 2), 16)]), R = (D) => { - const F = document.body.appendChild(document.createElement("fictum")), O = "rgb(1, 2, 3)"; - return F.style.color = O, F.style.color !== O || (F.style.color = D, F.style.color === O || F.style.color === "") ? g : (D = getComputedStyle(F).color, document.body.removeChild(F), D); - }, W = (D) => (D = D.match(/[.\d]+/g).map((F) => +Number(F)), D.length = 3, D); - return T.toLowerCase() === "transparent" ? g : T[0] === "#" ? E(T) : (T.indexOf("rgb") === -1 && (T = R(T)), T.indexOf("rgb") === 0 ? W(T) : g); - }, I = (T) => { - const { offsetX: E, offsetY: R, height: W, width: D } = T, F = R <= W / 2, O = E <= D / 2, L = (q, P) => Math.sqrt(q ** 2 + P ** 2), K = R === W / 2 && E === D / 2, Y = { - first: F === !0 && O === !1, - second: F === !0 && O === !0, - third: F === !1 && O === !0, - fourth: F === !1 && O === !1 - }, _ = { - topLeft: L(E, R), - topRight: L(D - E, R), - bottomLeft: L(E, W - R), - bottomRight: L(D - E, W - R) + }, P = (T) => { + const E = (M) => (M.length < 7 && (M = `#${M[1]}${M[1]}${M[2]}${M[2]}${M[3]}${M[3]}`), [parseInt(M.substr(1, 2), 16), parseInt(M.substr(3, 2), 16), parseInt(M.substr(5, 2), 16)]), R = (M) => { + const S = document.body.appendChild(document.createElement("fictum")), j = "rgb(1, 2, 3)"; + return S.style.color = j, S.style.color !== j || (S.style.color = M, S.style.color === j || S.style.color === "") ? b : (M = getComputedStyle(S).color, document.body.removeChild(S), M); + }, W = (M) => (M = M.match(/[.\d]+/g).map((S) => +Number(S)), M.length = 3, M); + return T.toLowerCase() === "transparent" ? b : T[0] === "#" ? E(T) : (T.indexOf("rgb") === -1 && (T = R(T)), T.indexOf("rgb") === 0 ? W(T) : b); + }, L = (T) => { + const { offsetX: E, offsetY: R, height: W, width: M } = T, S = R <= W / 2, j = E <= M / 2, k = (X, Z) => Math.sqrt(X ** 2 + Z ** 2), _ = R === W / 2 && E === M / 2, V = { + first: S === !0 && j === !1, + second: S === !0 && j === !0, + third: S === !1 && j === !0, + fourth: S === !1 && j === !1 + }, Y = { + topLeft: k(E, R), + topRight: k(M - E, R), + bottomLeft: k(E, W - R), + bottomRight: k(M - E, W - R) }; - let j = 0; - return K || Y.fourth ? j = _.topLeft : Y.third ? j = _.topRight : Y.second ? j = _.bottomRight : Y.first && (j = _.bottomLeft), j * 2; - }, X = (T) => { - var j; - const E = (j = d.current) == null ? void 0 : j.getBoundingClientRect(), R = T.clientX - E.left, W = T.clientY - E.top, D = E.height, F = E.width, O = { - offsetX: s ? D / 2 : R, - offsetY: s ? F / 2 : W, - height: D, - width: F - }, L = { - delay: r && r * 0.5, - duration: r && r - r * 0.5 - }, K = I(O), Y = a || K / 2, _ = { - left: s ? `${F / 2 - Y}px` : `${R - Y}px`, - top: s ? `${D / 2 - Y}px` : `${W - Y}px`, - height: a ? `${a * 2}px` : `${K}px`, - width: a ? `${a * 2}px` : `${K}px`, - transitionDelay: `0s, ${L.delay}ms`, - transitionDuration: `${r}ms, ${L.duration}ms` + let U = 0; + return _ || V.fourth ? U = Y.topLeft : V.third ? U = Y.topRight : V.second ? U = Y.bottomRight : V.first && (U = Y.bottomLeft), U * 2; + }, F = (T) => { + var U; + const E = (U = f.current) == null ? void 0 : U.getBoundingClientRect(), R = T.clientX - E.left, W = T.clientY - E.top, M = E.height, S = E.width, j = { + offsetX: n ? M / 2 : R, + offsetY: n ? S / 2 : W, + height: M, + width: S + }, k = { + delay: s && s * 0.5, + duration: s && s - s * 0.5 + }, _ = L(j), V = a || _ / 2, Y = { + left: n ? `${S / 2 - V}px` : `${R - V}px`, + top: n ? `${M / 2 - V}px` : `${W - V}px`, + height: a ? `${a * 2}px` : `${_}px`, + width: a ? `${a * 2}px` : `${_}px`, + transitionDelay: `0s, ${k.delay}ms`, + transitionDuration: `${s}ms, ${k.duration}ms` }; - return $ ? _ : { ..._, backgroundImage: `${N()}` }; + return $ ? Y : { ...Y, backgroundImage: `${y()}` }; }, A = (T) => { - const E = X(T), R = v.concat(E); - y(R), l && l(T); + const E = F(T), R = v.concat(E); + D(R), i && i(T); }; - return x(() => { + return I(() => { const T = setTimeout(() => { - v.length > 0 && y(v.splice(1, v.length - 1)); - }, r); + v.length > 0 && D(v.splice(1, v.length - 1)); + }, s); return () => { clearTimeout(T); }; - }, [r, v]), /* @__PURE__ */ V(t, { className: C, onMouseDown: (T) => A(T), ref: d, ...u, children: [ + }, [s, v]), /* @__PURE__ */ G(t, { className: x, onMouseDown: (T) => A(T), ref: f, ...d, children: [ o, - v.map((T, E) => /* @__PURE__ */ i(Ce, { style: T }, E)) + v.map((T, E) => /* @__PURE__ */ l(Me, { style: T }, E)) ] }); } -); -be.defaultProps = { rippleTag: "div", rippleDuration: 500, rippleRadius: 0, rippleColor: "dark" }; -const ae = w.forwardRef( +), ie = N.forwardRef( ({ className: e, - color: t, - outline: s, - children: r, - rounded: n, + color: t = "primary", + outline: n, + children: s, + rounded: r, disabled: a, floating: c, size: o, - href: l, - block: u, - active: f, + href: i, + block: d, + active: u, toggle: m, - noRipple: d, - tag: b, - ...g - }, h) => { - const [v, y] = B(f || !1); - let $; - const M = t && ["light", "link"].includes(t) || s ? "dark" : "light"; - t !== "none" ? s ? t ? $ = `btn-outline-${t}` : $ = "btn-outline-primary" : t ? $ = `btn-${t}` : $ = "btn-primary" : $ = ""; - const C = p( + noRipple: f, + tag: g = "button", + role: b = "button", + ...h + }, v) => { + const [D, $] = w(u || !1); + let B; + const x = t && ["light", "link"].includes(t) || n ? "dark" : "light"; + t !== "none" ? n ? t ? B = `btn-outline-${t}` : B = "btn-outline-primary" : t ? B = `btn-${t}` : B = "btn-primary" : B = ""; + const y = p( t !== "none" && "btn", - $, - n && "btn-rounded", + B, + r && "btn-rounded", c && "btn-floating", o && `btn-${o}`, - `${(l || b !== "button") && a ? "disabled" : ""}`, - u && "btn-block", - v && "active", + `${(i || g !== "button") && a ? "disabled" : ""}`, + d && "btn-block", + D && "active", e ); - return l && b !== "a" && (b = "a"), ["hr", "img", "input"].includes(b) || d ? /* @__PURE__ */ i( - b, + return i && g !== "a" && (g = "a"), ["hr", "img", "input"].includes(g) || f ? /* @__PURE__ */ l( + g, { - className: C, + className: y, onClick: m ? () => { - y(!v); + $(!D); } : void 0, - disabled: a && b === "button" ? !0 : void 0, - href: l, - ref: h, - ...g, - children: r + disabled: a && g === "button" ? !0 : void 0, + href: i, + ref: v, + role: b, + ...h, + children: s } - ) : /* @__PURE__ */ i( - be, + ) : /* @__PURE__ */ l( + Re, { - rippleTag: b, - rippleColor: M, - className: C, + rippleTag: g, + rippleColor: x, + className: y, onClick: m ? () => { - y(!v); + $(!D); } : void 0, - disabled: a && b === "button" ? !0 : void 0, - href: l, - ref: h, - ...g, - children: r + disabled: a && g === "button" ? !0 : void 0, + href: i, + ref: v, + role: b, + ...h, + children: s } ); } -); -ae.defaultProps = { tag: "button", role: "button", color: "primary" }; -const xe = w.forwardRef( - ({ className: e, children: t, shadow: s, toolbar: r, size: n, vertical: a, tag: c, ...o }, l) => { +), ot = N.forwardRef( + ({ className: e, children: t, shadow: n, toolbar: s, size: r, vertical: a, tag: c = "div", role: o = "group", ...i }, d) => { let u; - r ? u = "btn-toolbar" : a ? u = "btn-group-vertical" : u = "btn-group"; - const f = p(u, s && `shadow-${s}`, n && `btn-group-${n}`, e); - return /* @__PURE__ */ i(c, { className: f, ref: l, ...o, children: t }); + s ? u = "btn-toolbar" : a ? u = "btn-group-vertical" : u = "btn-group"; + const m = p(u, n && `shadow-${n}`, r && `btn-group-${r}`, e); + return /* @__PURE__ */ l(c, { className: m, ref: d, role: o, ...i, children: t }); } -); -xe.defaultProps = { tag: "div", role: "group" }; -const Le = w.forwardRef( - ({ className: e, children: t, tag: s, color: r, grow: n, size: a, ...c }, o) => { - const l = p( - `${n ? "spinner-grow" : "spinner-border"}`, - r && `text-${r}`, - `${a ? n ? "spinner-grow-" + a : "spinner-border-" + a : ""}`, +), ct = N.forwardRef( + ({ className: e, children: t, tag: n = "div", color: s, grow: r, size: a, ...c }, o) => { + const i = p( + `${r ? "spinner-grow" : "spinner-border"}`, + s && `text-${s}`, + `${a ? r ? "spinner-grow-" + a : "spinner-border-" + a : ""}`, e ); - return /* @__PURE__ */ i(s, { className: l, ref: o, ...c, children: t }); + return /* @__PURE__ */ l(n, { className: i, ref: o, ...c, children: t }); } -); -Le.defaultProps = { tag: "div" }; -const ke = w.forwardRef( - ({ className: e, children: t, border: s, background: r, tag: n, shadow: a, alignment: c, ...o }, l) => { - const u = p( +), lt = N.forwardRef( + ({ className: e, children: t, border: n, background: s, tag: r = "div", shadow: a, alignment: c, ...o }, i) => { + const d = p( "card", - s && `border border-${s}`, - r && `bg-${r}`, + n && `border border-${n}`, + s && `bg-${s}`, a && `shadow-${a}`, c && `text-${c}`, e ); - return /* @__PURE__ */ i(n, { className: u, ref: l, ...o, children: t }); + return /* @__PURE__ */ l(r, { className: d, ref: i, ...o, children: t }); } -); -ke.defaultProps = { tag: "div" }; -const Oe = w.forwardRef( - ({ className: e, children: t, border: s, background: r, tag: n, ...a }, c) => { - const o = p("card-header", s && `border-${s}`, r && `bg-${r}`, e); - return /* @__PURE__ */ i(n, { className: o, ...a, ref: c, children: t }); +), it = N.forwardRef( + ({ className: e, children: t, border: n, background: s, tag: r = "div", ...a }, c) => { + const o = p("card-header", n && `border-${n}`, s && `bg-${s}`, e); + return /* @__PURE__ */ l(r, { className: o, ...a, ref: c, children: t }); } -); -Oe.defaultProps = { tag: "div" }; -const Ae = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), ut = N.forwardRef( + ({ className: e, children: t, tag: n = "p", ...s }, r) => { const a = p("card-subtitle", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -Ae.defaultProps = { tag: "p" }; -const Se = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), dt = N.forwardRef( + ({ className: e, children: t, tag: n = "h5", ...s }, r) => { const a = p("card-title", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -Se.defaultProps = { tag: "h5" }; -const Fe = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), ft = N.forwardRef( + ({ className: e, children: t, tag: n = "p", ...s }, r) => { const a = p("card-text", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -Fe.defaultProps = { tag: "p" }; -const We = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), mt = N.forwardRef( + ({ className: e, children: t, tag: n = "div", ...s }, r) => { const a = p("card-body", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -We.defaultProps = { tag: "div" }; -const Xe = w.forwardRef( - ({ className: e, children: t, border: s, background: r, tag: n, ...a }, c) => { - const o = p("card-footer", s && `border-${s}`, r && `bg-${r}`, e); - return /* @__PURE__ */ i(n, { className: o, ...a, ref: c, children: t }); +), pt = N.forwardRef( + ({ className: e, children: t, border: n, background: s, tag: r = "div", ...a }, c) => { + const o = p("card-footer", n && `border-${n}`, s && `bg-${s}`, e); + return /* @__PURE__ */ l(r, { className: o, ...a, ref: c, children: t }); } -); -Xe.defaultProps = { tag: "div" }; -const Qt = ({ className: e, children: t, overlay: s, position: r, fluid: n, ...a }) => { - const c = p(r && `card-img-${r}`, n && "img-fluid", s && "card-img", e); - return /* @__PURE__ */ i("img", { className: c, ...a, children: t }); -}, _e = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), gt = ({ className: e, children: t, overlay: n, position: s, fluid: r, ...a }) => { + const c = p(s && `card-img-${s}`, r && "img-fluid", n && "card-img", e); + return /* @__PURE__ */ l("img", { className: c, ...a, children: t }); +}, bt = N.forwardRef( + ({ className: e, children: t, tag: n = "div", ...s }, r) => { const a = p("card-img-overlay", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -_e.defaultProps = { tag: "div" }; -const Zt = ({ className: e, children: t, ...s }) => { - const r = p("card-link", e); - return /* @__PURE__ */ i("a", { className: r, ...s, children: t }); -}, je = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), vt = ({ className: e, children: t, ...n }) => { + const s = p("card-link", e); + return /* @__PURE__ */ l("a", { className: s, ...n, children: t }); +}, ht = N.forwardRef( + ({ className: e, children: t, tag: n = "div", ...s }, r) => { const a = p("card-group", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -je.defaultProps = { tag: "div" }; -const Ye = w.forwardRef( - ({ className: e, tag: t, horizontal: s, horizontalSize: r, light: n, numbered: a, children: c, small: o, ...l }, u) => { - const f = p( +), yt = N.forwardRef( + ({ className: e, tag: t = "ul", horizontal: n, horizontalSize: s, light: r, numbered: a, children: c, small: o, ...i }, d) => { + const u = p( "list-group", - s && (r ? `list-group-horizontal-${r}` : "list-group-horizontal"), - n && "list-group-light", + n && (s ? `list-group-horizontal-${s}` : "list-group-horizontal"), + r && "list-group-light", a && "list-group-numbered", o && "list-group-small", e ); - return /* @__PURE__ */ i(t, { className: f, ref: u, ...l, children: c }); + return /* @__PURE__ */ l(t, { className: u, ref: d, ...i, children: c }); } -); -Ye.defaultProps = { tag: "ul" }; -const Ve = w.forwardRef( - ({ className: e, tag: t, active: s, disabled: r, action: n, color: a, children: c, noBorders: o, ...l }, u) => { - const f = t === "button", m = p( +), Nt = N.forwardRef( + ({ className: e, tag: t = "li", active: n, disabled: s, action: r, color: a, children: c, noBorders: o, ...i }, d) => { + const u = t === "button", m = p( "list-group-item", - s && "active", - r && !f && "disabled", - n && "list-group-item-action", + n && "active", + s && !u && "disabled", + r && "list-group-item-action", a && `list-group-item-${a}`, o && "border-0", e ); - return /* @__PURE__ */ i(t, { className: m, disabled: f && r, ref: u, ...l, children: c }); + return /* @__PURE__ */ l(t, { className: m, disabled: u && s, ref: d, ...i, children: c }); } -); -Ve.defaultProps = { tag: "li" }; -const qe = ({ +), wt = ({ className: e, children: t, - disableMouseDown: s, - tag: r, - tooltipTag: n, + disableMouseDown: n, + tag: s = ie, + tooltipTag: r = "div", options: a, - placement: c, + placement: c = "top", title: o, - wrapperProps: l, - wrapperClass: u, - onShow: f, + wrapperProps: i, + wrapperClass: d, + onShow: u, onHide: m, - onMouseEnter: d, - onMouseLeave: b, - ...g + onMouseEnter: f, + onMouseLeave: g, + ...b }) => { - const [h, v] = B(null), [y, $] = B(null), [M, C] = B(!1), [N, S] = B(!1), [I, X] = B(!1), [A, T] = B(!1), E = p("tooltip", I && "show", "fade", `bs-tooltip-${c}`, e), { styles: R, attributes: W } = le(h, y, { + const [h, v] = w(null), [D, $] = w(null), [B, x] = w(!1), [y, P] = w(!1), [L, F] = w(!1), [A, T] = w(!1), E = p("tooltip", L && "show", "fade", `bs-tooltip-${c}`, e), { styles: R, attributes: W } = le(h, D, { placement: c, ...a }); - x(() => { - let L, K; - return M || N ? (T(!0), L = setTimeout(() => { - X(!0); - }, 4)) : (X(!1), K = setTimeout(() => { + I(() => { + let k, _; + return B || y ? (T(!0), k = setTimeout(() => { + F(!0); + }, 4)) : (F(!1), _ = setTimeout(() => { T(!1); }, 300)), () => { - clearTimeout(L), clearTimeout(K); + clearTimeout(k), clearTimeout(_); }; - }, [M, N]); - const D = (L) => { - f == null || f(L), !L.defaultPrevented && C(!0), d == null || d(L); - }, F = (L) => { - m == null || m(L), !L.defaultPrevented && C(!1), b == null || b(L); - }, O = G( - (L) => { - L.target === h ? S(!0) : S(!1); + }, [B, y]); + const M = (k) => { + u == null || u(k), !k.defaultPrevented && x(!0), f == null || f(k); + }, S = (k) => { + m == null || m(k), !k.defaultPrevented && x(!1), g == null || g(k); + }, j = q( + (k) => { + k.target === h ? P(!0) : P(!1); }, [h] ); - return x(() => { - if (!s) - return document.addEventListener("mousedown", O), () => { - document.removeEventListener("mousedown", O); + return I(() => { + if (!n) + return document.addEventListener("mousedown", j), () => { + document.removeEventListener("mousedown", j); }; - }, [O, s]), /* @__PURE__ */ V(Q, { children: [ - /* @__PURE__ */ i( - r, + }, [j, n]), /* @__PURE__ */ G(Q, { children: [ + /* @__PURE__ */ l( + s, { - className: u, - onMouseEnter: D, - onMouseLeave: F, + className: d, + onMouseEnter: M, + onMouseLeave: S, ref: v, - ...l, + ...i, children: t } ), - A && se.createPortal( - /* @__PURE__ */ i( - n, + A && re.createPortal( + /* @__PURE__ */ l( + r, { ref: $, className: E, style: R.popper, ...W.popper, role: "tooltip", - ...g, - children: /* @__PURE__ */ i("div", { className: "tooltip-inner", children: o }) + ...b, + children: /* @__PURE__ */ l("div", { className: "tooltip-inner", children: o }) } ), document.body ) ] }); -}; -qe.defaultProps = { tag: ae, tooltipTag: "div", placement: "top" }; -const Ge = w.forwardRef( - ({ around: e, between: t, bottom: s, center: r, children: n, className: a, evenly: c, end: o, middle: l, start: u, tag: f, top: m, ...d }, b) => { - const g = p( +}, Tt = N.forwardRef( + ({ + around: e, + between: t, + bottom: n, + center: s, + children: r, + className: a, + evenly: c, + end: o, + middle: i, + start: d, + tag: u = "div", + top: m, + ...f + }, g) => { + const b = p( "row", e && "justify-content-around", t && "justify-content-between", - s && "align-self-end", - r && "justify-content-center", + n && "align-self-end", + s && "justify-content-center", c && "justifty-content-evenly", o && "justify-content-end", - l && "align-self-center", - u && "justify-content-start", + i && "align-self-center", + d && "justify-content-start", m && "align-self-start", a ); - return /* @__PURE__ */ i(f, { className: g, ...d, ref: b, children: n }); + return /* @__PURE__ */ l(u, { className: b, ...f, ref: g, children: r }); } -); -Ge.defaultProps = { tag: "div" }; -const zt = ({ +), Bt = ({ animate: e, className: t, - icon: s, - fab: r, - fas: n, + icon: n, + fab: s, + fas: r, fal: a, far: c, flag: o, - spin: l, - fixed: u, - flip: f, + spin: i, + fixed: d, + flip: u, list: m, - size: d, - pull: b, - pulse: g, + size: f, + pull: g, + pulse: b, color: h, border: v, - rotate: y, + rotate: D, inverse: $, - stack: M, - iconType: C, - children: N, - ...S + stack: B, + iconType: x, + children: y, + ...P }) => { - let I; - o ? I = "flag" : r ? I = "fab" : n ? I = "fas" : c ? I = "far" : a ? I = "fal" : I = "fa"; - const X = p( - C ? `fa-${C}` : I, + let L; + o ? L = "flag" : s ? L = "fab" : r ? L = "fas" : c ? L = "far" : a ? L = "fal" : L = "fa"; + const F = p( + x ? `fa-${x}` : L, e && `fa-${e}`, - o ? `flag-${o}` : s && `fa-${s}`, - d && `fa-${d}`, + o ? `flag-${o}` : n && `fa-${n}`, + f && `fa-${f}`, h && `text-${h}`, v && "fa-border", - y && `fa-rotate-${y}`, - b && `fa-pull-${b}`, - l && !e && "fa-spin", + D && `fa-rotate-${D}`, + g && `fa-pull-${g}`, + i && !e && "fa-spin", m && "fa-li", - u && "fa-fw", - g && !e && "fa-pulse", + d && "fa-fw", + b && !e && "fa-pulse", $ && "fa-inverse", - f && `fa-flip-${f}`, - M && `fa-stack-${M}`, + u && `fa-flip-${u}`, + B && `fa-stack-${B}`, t ); - return /* @__PURE__ */ i("i", { className: X, ...S, children: N }); -}, Ke = w.forwardRef( - ({ className: e, children: t, tag: s, variant: r, color: n, blockquote: a, note: c, noteColor: o, listUnStyled: l, listInLine: u, ...f }, m) => { - const d = p( - r && r, + return /* @__PURE__ */ l("i", { className: F, ...P, children: y }); +}, Dt = N.forwardRef( + ({ + className: e, + children: t, + tag: n = "p", + variant: s, + color: r, + blockquote: a, + note: c, + noteColor: o, + listUnStyled: i, + listInLine: d, + ...u + }, m) => { + const f = p( + s && s, a && "blockquote", c && "note", - n && `text-${n}`, + r && `text-${r}`, o && `note-${o}`, - l && "list-unstyled", - u && "list-inline", + i && "list-unstyled", + d && "list-inline", e ); - return a && (s = "blockquote"), (l || u) && (s = "ul"), /* @__PURE__ */ i(s, { className: d, ref: m, ...f, children: t }); + return a && (n = "blockquote"), (i || d) && (n = "ul"), /* @__PURE__ */ l(n, { className: f, ref: m, ...u, children: t }); } -); -Ke.defaultProps = { tag: "p" }; -const Ht = w.forwardRef( - ({ className: e, color: t, uppercase: s, bold: r, children: n, ...a }, c) => { +), Mt = N.forwardRef( + ({ className: e, color: t, uppercase: n, bold: s, children: r, ...a }, c) => { const o = p( "breadcrumb", - r && "font-weight-bold", + s && "font-weight-bold", t && `text-${t}`, - s && "text-uppercase", + n && "text-uppercase", e ); - return /* @__PURE__ */ i("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ i("ol", { className: o, ref: c, ...a, children: n }) }); + return /* @__PURE__ */ l("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ l("ol", { className: o, ref: c, ...a, children: r }) }); } -), Ue = w.forwardRef( - ({ className: e, active: t, current: s, children: r, ...n }, a) => { +), $t = N.forwardRef( + ({ className: e, active: t, current: n = "page", children: s, ...r }, a) => { const c = p("breadcrumb-item", t && "active", e); - return /* @__PURE__ */ i("li", { className: c, ref: a, "aria-current": t && s, ...n, children: r }); + return /* @__PURE__ */ l("li", { className: c, ref: a, "aria-current": t && n, ...r, children: s }); } -); -Ue.defaultProps = { - current: "page" -}; -const Je = (e) => { +), Ee = (e) => { if (e !== !1) return `navbar-expand-${e}`; -}, Qe = w.forwardRef( +}, Rt = N.forwardRef( ({ className: e, children: t, - light: s, - dark: r, - scrolling: n, + light: n, + dark: s, + scrolling: r, fixed: a, sticky: c, scrollingNavbarOffset: o, - color: l, - transparent: u, - expand: f, - tag: m, - bgColor: d, - ...b - }, g) => { - const [h, v] = B(!1), y = p( + color: i, + transparent: d, + expand: u, + tag: m = "nav", + bgColor: f, + ...g + }, b) => { + const [h, v] = w(!1), D = p( { - "navbar-light": s, - "navbar-dark": r, - "scrolling-navbar": n || o, + "navbar-light": n, + "navbar-dark": s, + "scrolling-navbar": r || o, "top-nav-collapse": h, - [`text-${l}`]: l && u ? h : l + [`text-${i}`]: i && d ? h : i }, a && `fixed-${a}`, c && "sticky-top", "navbar", - f && Je(f), - d && `bg-${d}`, + u && Ee(u), + f && `bg-${f}`, e - ), $ = G(() => { + ), $ = q(() => { o && window.pageYOffset > o ? v(!0) : v(!1); }, [o]); - return x(() => ((n || o) && window.addEventListener("scroll", $), () => { + return I(() => ((r || o) && window.addEventListener("scroll", $), () => { window.removeEventListener("scroll", $); - }), [$, n, o]), /* @__PURE__ */ i(m, { className: y, role: "navigation", ...b, ref: g, children: t }); + }), [$, r, o]), /* @__PURE__ */ l(m, { className: D, role: "navigation", ...g, ref: b, children: t }); } -); -Qe.defaultProps = { - tag: "nav" -}; -const Ze = w.forwardRef( - ({ children: e, className: t, disabled: s, active: r, tag: n, ...a }, c) => { - const o = p("nav-link", s ? "disabled" : r ? "active" : "", t); - return /* @__PURE__ */ i(n, { "data-test": "nav-link", className: o, style: { cursor: "pointer" }, ref: c, ...a, children: e }); +), Et = N.forwardRef( + ({ children: e, className: t = "", disabled: n = !1, active: s = !1, tag: r = "a", ...a }, c) => { + const o = p("nav-link", n ? "disabled" : s ? "active" : "", t); + return /* @__PURE__ */ l(r, { "data-test": "nav-link", className: o, style: { cursor: "pointer" }, ref: c, ...a, children: e }); } -); -Ze.defaultProps = { - tag: "a", - active: !1, - className: "", - disabled: !1 -}; -const ze = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), Ct = N.forwardRef( + ({ className: e, children: t, tag: n = "a", ...s }, r) => { const a = p("navbar-brand", e); - return /* @__PURE__ */ i(s, { className: a, ref: n, ...r, children: t }); + return /* @__PURE__ */ l(n, { className: a, ref: r, ...s, children: t }); } -); -ze.defaultProps = { - tag: "a" -}; -const He = w.forwardRef( - ({ children: e, className: t, active: s, text: r, tag: n, ...a }, c) => { - const o = p("nav-item", s && "active", r && "navbar-text", t); - return /* @__PURE__ */ i(n, { ...a, className: o, ref: c, children: e }); +), It = N.forwardRef( + ({ children: e, className: t, active: n, text: s, tag: r = "li", ...a }, c) => { + const o = p("nav-item", n && "active", s && "navbar-text", t); + return /* @__PURE__ */ l(r, { ...a, className: o, ref: c, children: e }); } -); -He.defaultProps = { - tag: "li" -}; -const et = w.forwardRef( - ({ children: e, className: t, right: s, fullWidth: r, left: n, tag: a, ...c }, o) => { - const l = p("navbar-nav", r && "w-100", s && "ms-auto", n && "me-auto", t); - return /* @__PURE__ */ i(a, { className: l, ref: o, ...c, children: e }); +), xt = N.forwardRef( + ({ children: e, className: t, right: n, fullWidth: s = !0, left: r, tag: a = "ul", ...c }, o) => { + const i = p("navbar-nav", s && "w-100", n && "ms-auto", r && "me-auto", t); + return /* @__PURE__ */ l(a, { className: i, ref: o, ...c, children: e }); } -); -et.defaultProps = { - tag: "ul", - fullWidth: !0 -}; -const tt = w.forwardRef( - ({ children: e, className: t, tag: s, ...r }, n) => { +), Lt = N.forwardRef( + ({ children: e, className: t, tag: n = "button", ...s }, r) => { const a = p("navbar-toggler", t); - return /* @__PURE__ */ i(s, { ...r, className: a, ref: n, children: e }); + return /* @__PURE__ */ l(n, { ...s, className: a, ref: r, children: e }); } -); -tt.defaultProps = { - tag: "button" -}; -const es = w.forwardRef( - ({ children: e, bgColor: t, color: s, className: r, ...n }, a) => { - const c = p(t && `bg-${t}`, s && `text-${s}`, r); - return /* @__PURE__ */ i("footer", { className: c, ...n, ref: a, children: e }); +), kt = N.forwardRef( + ({ children: e, bgColor: t, color: n, className: s, ...r }, a) => { + const c = p(t && `bg-${t}`, n && `text-${n}`, s); + return /* @__PURE__ */ l("footer", { className: c, ...r, ref: a, children: e }); } -), ts = w.forwardRef( - ({ children: e, size: t, circle: s, center: r, end: n, start: a, className: c, ...o }, l) => { - const u = p( +), Ot = N.forwardRef( + ({ children: e, size: t, circle: n, center: s, end: r, start: a, className: c, ...o }, i) => { + const d = p( "pagination", - r && "justify-content-center", - s && "pagination-circle", - n && "justify-content-end", + s && "justify-content-center", + n && "pagination-circle", + r && "justify-content-end", t && `pagination-${t}`, a && "justify-content-start", c ); - return /* @__PURE__ */ i("ul", { className: u, ...o, ref: l, children: e }); + return /* @__PURE__ */ l("ul", { className: d, ...o, ref: i, children: e }); } -), st = w.forwardRef( - ({ children: e, className: t, tag: s, ...r }, n) => { +), At = N.forwardRef( + ({ children: e, className: t, tag: n = "a", ...s }, r) => { const a = p("page-link", t); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: e }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: e }); } -); -st.defaultProps = { - tag: "a" -}; -const ss = w.forwardRef( - ({ children: e, className: t, active: s, disabled: r, ...n }, a) => { - const c = p("page-item", s && "active", r && "disabled", t); - return /* @__PURE__ */ i("li", { className: c, ...n, ref: a, children: e }); +), Pt = N.forwardRef( + ({ children: e, className: t, active: n, disabled: s, ...r }, a) => { + const c = p("page-item", n && "active", s && "disabled", t); + return /* @__PURE__ */ l("li", { className: c, ...r, ref: a, children: e }); } -), rs = ({ +), St = ({ className: e, classNameResponsive: t, - responsive: s, - align: r, - borderColor: n, + responsive: n, + align: s, + borderColor: r, bordered: a, borderless: c, children: o, - color: l, - hover: u, - small: f, + color: i, + hover: d, + small: u, striped: m, - ...d + ...f }) => { - const b = p( + const g = p( "table", - r && `align-${r}`, - n && `border-${n}`, + s && `align-${s}`, + r && `border-${r}`, a && "table-bordered", c && "table-borderless", - l && `table-${l}`, - u && "table-hover", - f && "table-sm", + i && `table-${i}`, + d && "table-hover", + u && "table-sm", m && "table-striped", e - ), g = Te(() => /* @__PURE__ */ i("table", { className: b, ...d, children: o }), [o, b, d]); - if (s) { + ), b = be(() => /* @__PURE__ */ l("table", { className: g, ...f, children: o }), [o, g, f]); + if (n) { const h = p( - typeof s == "string" ? `table-responsive-${s}` : "table-responsive", + typeof n == "string" ? `table-responsive-${n}` : "table-responsive", t ); - return /* @__PURE__ */ i("div", { className: h, children: g }); + return /* @__PURE__ */ l("div", { className: h, children: b }); } else - return g; -}, ns = ({ className: e, children: t, dark: s, light: r, ...n }) => { - const a = p(s && "table-dark", r && "table-light", e); - return /* @__PURE__ */ i("thead", { className: a, ...n, children: t }); -}, as = ({ className: e, children: t, ...s }) => { - const r = p(e); - return /* @__PURE__ */ i("tbody", { className: r, ...s, children: t }); -}, ve = w.forwardRef( - ({ animated: e, children: t, className: s, style: r, tag: n, valuenow: a, valuemax: c, striped: o, bgColor: l, valuemin: u, width: f, ...m }, d) => { - const b = p( + return b; +}, Ft = ({ className: e, children: t, dark: n, light: s, ...r }) => { + const a = p(n && "table-dark", s && "table-light", e); + return /* @__PURE__ */ l("thead", { className: a, ...r, children: t }); +}, Wt = ({ className: e, children: t, ...n }) => { + const s = p(e); + return /* @__PURE__ */ l("tbody", { className: s, ...n, children: t }); +}, Ce = N.forwardRef( + ({ + animated: e, + children: t, + className: n, + style: s, + tag: r = "div", + valuenow: a, + valuemax: c, + striped: o, + bgColor: i, + valuemin: d, + width: u, + ...m + }, f) => { + const g = p( "progress-bar", - l && `bg-${l}`, + i && `bg-${i}`, o && "progress-bar-striped", e && "progress-bar-animated", - s - ), g = { width: `${f}%`, ...r }; - return /* @__PURE__ */ i( - n, + n + ), b = { width: `${u}%`, ...s }; + return /* @__PURE__ */ l( + r, { - className: b, - style: g, - ref: d, + className: g, + style: b, + ref: f, role: "progressbar", ...m, - "aria-valuenow": Number(f) ?? a, - "aria-valuemin": Number(u), + "aria-valuenow": Number(u) ?? a, + "aria-valuemin": Number(d), "aria-valuemax": Number(c), children: t } ); } -); -ve.defaultProps = { tag: "div" }; -const rt = w.forwardRef( - ({ className: e, children: t, tag: s, height: r, style: n, ...a }, c) => { - const o = p("progress", e), l = { height: `${r}px`, ...n }; - return /* @__PURE__ */ i(s, { className: o, ref: c, style: l, ...a, children: w.Children.map(t, (u) => { - if (!w.isValidElement(u) || u.type !== ve) { +), Xt = N.forwardRef( + ({ className: e, children: t, tag: n = "div", height: s, style: r, ...a }, c) => { + const o = p("progress", e), i = { height: `${s}px`, ...r }; + return /* @__PURE__ */ l(n, { className: o, ref: c, style: i, ...a, children: N.Children.map(t, (d) => { + if (!N.isValidElement(d) || d.type !== Ce) { console.error("Progress component only allows ProgressBar as child"); return; } else - return u; + return d; }) }); } -); -rt.defaultProps = { tag: "div" }; -const nt = w.forwardRef( +), Ie = (e) => { + const [t, n] = w(!1), s = be(() => new IntersectionObserver(([r]) => { + n(r.isIntersecting); + }), []); + return I(() => { + if (e.current) + return s.observe(e.current), () => s.disconnect(); + }, [s, e]), t; +}, _t = N.forwardRef( ({ className: e, size: t, - contrast: s, - value: r, - defaultValue: n, + contrast: n, + value: s, + defaultValue: r, id: a, labelClass: c, wrapperClass: o, - wrapperStyle: l, - wrapperTag: u, - label: f, + wrapperStyle: i, + wrapperTag: d = "div", + label: u, onChange: m, - children: d, - labelRef: b, - labelStyle: g, + children: f, + labelRef: g, + labelStyle: b, type: h, onBlur: v, - readonly: y, + readonly: D = !1, ...$ - }, M) => { - var Y, _; - const [C, N] = B(r || n), [S, I] = B(0), [X, A] = B(!1), T = J(null); - Be(M, () => T.current); - const E = J(null), R = b || E, W = p("form-outline", s && "form-white", o), D = p( + }, B) => { + var Y, U; + const [x, y] = w(s || r), [P, L] = w(0), [F, A] = w(!1), T = K(null), E = Ie(T); + we(B, () => T.current); + const R = K(null), W = g || R, M = p("form-outline", n && "form-white", o), S = p( "form-control", - X && "active", + F && "active", h === "date" && "active", t && `form-control-${t}`, e - ), F = p("form-label", c); - x(() => { + ), j = p("form-label", c); + I(() => { if (!T.current) return; - const { value: j } = T.current; - j != "" ? A(!0) : A(!1); - }, [(Y = T.current) == null ? void 0 : Y.value]), x(() => { + const { value: X } = T.current; + X != "" ? A(!0) : A(!1); + }, [(Y = T.current) == null ? void 0 : Y.value]), I(() => { + s !== void 0 && (s != "" ? A(!0) : A(!1)); + }, [s]), I(() => { r !== void 0 && (r != "" ? A(!0) : A(!1)); - }, [r]), x(() => { - n !== void 0 && (n != "" ? A(!0) : A(!1)); - }, [n]); - const O = G(() => { - var j; - (j = R.current) != null && j.clientWidth && I(R.current.clientWidth * 0.8 + 8); - }, [R]); - x(() => { - O(); - }, [(_ = R.current) == null ? void 0 : _.clientWidth, O]); - const L = (j) => { - N(j.target.value), m == null || m(j); - }, K = G( - (j) => { - T.current && (C !== void 0 && C != "" || r !== void 0 && r != "" || T.current.value != "" ? A(!0) : A(!1), v && v(j)); + }, [r]); + const k = q(() => { + var X; + (X = W.current) != null && X.clientWidth && L(W.current.clientWidth * 0.8 + 8); + }, [W]); + I(() => { + k(); + }, [(U = W.current) == null ? void 0 : U.clientWidth, k, E]); + const _ = (X) => { + y(X.target.value), m == null || m(X); + }, V = q( + (X) => { + T.current && (x !== void 0 && x != "" || s !== void 0 && s != "" || T.current.value != "" ? A(!0) : A(!1), v && v(X)); }, - [C, r, v] + [x, s, v] ); - return /* @__PURE__ */ V(u, { className: W, style: l, children: [ - /* @__PURE__ */ i( + return /* @__PURE__ */ G(d, { className: M, style: i, children: [ + /* @__PURE__ */ l( "input", { type: h, - readOnly: y, - className: D, - onBlur: K, - onChange: L, - onFocus: O, - value: r, - defaultValue: n, + readOnly: D, + className: S, + onBlur: V, + onChange: _, + onFocus: k, + value: s, + defaultValue: r, id: a, ref: T, ...$ } ), - f && /* @__PURE__ */ i("label", { className: F, style: g, htmlFor: a, ref: R, children: f }), - /* @__PURE__ */ V("div", { className: "form-notch", children: [ - /* @__PURE__ */ i("div", { className: "form-notch-leading" }), - /* @__PURE__ */ i("div", { className: "form-notch-middle", style: { width: S } }), - /* @__PURE__ */ i("div", { className: "form-notch-trailing" }) + u && /* @__PURE__ */ l("label", { className: j, style: b, htmlFor: a, ref: W, children: u }), + /* @__PURE__ */ G("div", { className: "form-notch", children: [ + /* @__PURE__ */ l("div", { className: "form-notch-leading" }), + /* @__PURE__ */ l("div", { className: "form-notch-middle", style: { width: P } }), + /* @__PURE__ */ l("div", { className: "form-notch-trailing" }) ] }), - d + f ] }); } -); -nt.defaultProps = { wrapperTag: "div", readonly: !1 }; -const oe = ({ +), ue = ({ className: e, inputRef: t, - labelClass: s, - wrapperClass: r, - labelStyle: n, - wrapperTag: a, + labelClass: n, + wrapperClass: s, + labelStyle: r, + wrapperTag: a = "div", wrapperStyle: c, label: o, - inline: l, - btn: u, - id: f, + inline: i, + btn: d, + id: u, btnColor: m, - disableWrapper: d, - toggleSwitch: b, - ...g + disableWrapper: f, + toggleSwitch: g, + ...b }) => { let h = "form-check-input", v = "form-check-label"; - u && (h = "btn-check", m ? v = `btn btn-${m}` : v = "btn btn-primary"); - const y = p( - o && !u && "form-check", - l && !u && "form-check-inline", - b && "form-switch", - r - ), $ = p(h, e), M = p(v, s), C = /* @__PURE__ */ V(Q, { children: [ - /* @__PURE__ */ i("input", { className: $, id: f, ref: t, ...g }), - o && /* @__PURE__ */ i("label", { className: M, style: n, htmlFor: f, children: o }) + d && (h = "btn-check", m ? v = `btn btn-${m}` : v = "btn btn-primary"); + const D = p( + o && !d && "form-check", + i && !d && "form-check-inline", + g && "form-switch", + s + ), $ = p(h, e), B = p(v, n), x = /* @__PURE__ */ G(Q, { children: [ + /* @__PURE__ */ l("input", { className: $, id: u, ref: t, ...b }), + o && /* @__PURE__ */ l("label", { className: B, style: r, htmlFor: u, children: o }) ] }); - return /* @__PURE__ */ i(Q, { children: d ? C : /* @__PURE__ */ i(a, { style: c, className: y, children: C }) }); -}; -oe.defaultProps = { wrapperTag: "div" }; -const os = ({ ...e }) => /* @__PURE__ */ i(oe, { type: "checkbox", ...e }), cs = ({ ...e }) => /* @__PURE__ */ i(oe, { type: "radio", ...e }), he = ({ + return /* @__PURE__ */ l(Q, { children: f ? x : /* @__PURE__ */ l(a, { style: c, className: D, children: x }) }); +}, jt = ({ ...e }) => /* @__PURE__ */ l(ue, { type: "checkbox", ...e }), Yt = ({ ...e }) => /* @__PURE__ */ l(ue, { type: "radio", ...e }), xe = ({ className: e, children: t, - show: s = !1, - id: r, - navbar: n, - tag: a, + show: n = !1, + id: s, + navbar: r, + tag: a = "div", collapseRef: c, style: o, - onShow: l, - onHide: u, - ...f + onShow: i, + onHide: d, + ...u }) => { - const [m, d] = B(!1), [b, g] = B(void 0), [h, v] = B(!1), y = p( + const [m, f] = w(!1), [g, b] = w(void 0), [h, v] = w(!1), D = p( h ? "collapsing" : "collapse", !h && m && "show", - n && "navbar-collapse", + r && "navbar-collapse", e - ), $ = J(null), M = c ?? $, C = G(() => { - m && g(void 0); + ), $ = K(null), B = c ?? $, x = q(() => { + m && b(void 0); }, [m]); - return x(() => { - var N; - b === void 0 && m && g((N = M == null ? void 0 : M.current) == null ? void 0 : N.scrollHeight); - }, [b, m, M]), x(() => { - m !== s && (s ? l == null || l() : u == null || u(), d(s)), m && v(!0); - const N = setTimeout(() => { + return I(() => { + var y; + g === void 0 && m && b((y = B == null ? void 0 : B.current) == null ? void 0 : y.scrollHeight); + }, [g, m, B]), I(() => { + m !== n && (n ? i == null || i() : d == null || d(), f(n)), m && v(!0); + const y = setTimeout(() => { v(!1); }, 350); return () => { - clearTimeout(N); + clearTimeout(y); }; - }, [s, m, l, u]), x(() => { - var N; - g(m ? (N = M == null ? void 0 : M.current) == null ? void 0 : N.scrollHeight : 0); - }, [m, M]), x(() => (window.addEventListener("resize", C), () => { - window.removeEventListener("resize", C); - }), [C]), /* @__PURE__ */ i(a, { style: { height: b, ...o }, id: r, className: y, ...f, ref: M, children: t }); -}; -he.defaultProps = { tag: "div" }; -const ye = pe(null), at = ({ + }, [n, m, i, d]), I(() => { + var y; + b(m ? (y = B == null ? void 0 : B.current) == null ? void 0 : y.scrollHeight : 0); + }, [m, B, t]), I(() => (window.addEventListener("resize", x), () => { + window.removeEventListener("resize", x); + }), [x]), /* @__PURE__ */ l(a, { style: { height: g, ...o }, id: s, className: D, ...u, ref: B, children: t }); +}, ye = ve(null), Le = ({ children: e, isOpen: t = !1, - options: s, - animation: r = !0, - dropup: n, + options: n, + animation: s = !0, + dropup: r, dropright: a, dropleft: c, onHide: o, - onShow: l + onShow: i }) => { - const [u, f] = B(t), [m, d] = B(null), [b, g] = B(null), [h, v] = B(-1); - return /* @__PURE__ */ i( + const [d, u] = w(t), [m, f] = w(null), [g, b] = w(null), [h, v] = w(-1); + return /* @__PURE__ */ l( ye.Provider, { value: { - animation: r, + animation: s, activeIndex: h, - isOpenState: u, - setReferenceElement: d, - setPopperElement: g, + isOpenState: d, + setReferenceElement: f, + setPopperElement: b, setActiveIndex: v, - popperElement: b, - setIsOpenState: f, + popperElement: g, + setIsOpenState: u, referenceElement: m, onHide: o, - onShow: l, - dropup: n, - options: s, + onShow: i, + dropup: r, + options: n, dropright: a, dropleft: c }, children: e } ); -}, ot = (e) => e instanceof HTMLElement, ct = (e) => e instanceof Node, te = () => { - const e = ee(ye); +}, ke = (e) => e instanceof HTMLElement, Oe = (e) => e instanceof Node, ne = () => { + const e = se(ye); if (!e) throw new Error("Missing context data"); return e; -}, lt = () => { - const { isOpenState: e, setIsOpenState: t, setActiveIndex: s, popperElement: r, referenceElement: n, onHide: a } = te(), c = G( +}, Ae = () => { + const { isOpenState: e, setIsOpenState: t, setActiveIndex: n, popperElement: s, referenceElement: r, onHide: a } = ne(), c = q( (o) => { - a == null || a(o), !(!e || !ct(o.target) || r && r.contains(o.target) || n && n.contains(o.target) || o.defaultPrevented) && (t(!1), setTimeout(() => s(-1), 300)); + a == null || a(o), !(!e || !Oe(o.target) || s && s.contains(o.target) || r && r.contains(o.target) || o.defaultPrevented) && (t(!1), setTimeout(() => n(-1), 300)); }, - [e, t, s, r, n, a] + [e, t, n, s, r, a] ); - x(() => (document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c)), [c]); -}, it = ({ + I(() => (document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c)), [c]); +}, Pe = ({ className: e, tag: t = "div", - group: s, - children: r, - dropup: n, + group: n, + children: s, + dropup: r, dropright: a, dropleft: c, ...o }) => { - lt(); - const l = p( - s ? "btn-group" : "dropdown", - n && "dropup", + Ae(); + const i = p( + n ? "btn-group" : "dropdown", + r && "dropup", a && "dropend", c && "dropstart", e ); - return /* @__PURE__ */ i(t, { className: l, ...o, children: r }); -}, ls = ({ animation: e, onHide: t, onShow: s, ...r }) => /* @__PURE__ */ i(at, { animation: e, onHide: t, onShow: s, ...r, children: /* @__PURE__ */ i(it, { ...r }) }), ut = ({ + return /* @__PURE__ */ l(t, { className: i, ...o, children: s }); +}, Vt = ({ animation: e, onHide: t, onShow: n, ...s }) => /* @__PURE__ */ l(Le, { animation: e, onHide: t, onShow: n, ...s, children: /* @__PURE__ */ l(Pe, { ...s }) }), Se = ({ childTag: e, children: t, - disabled: s, - link: r, - divider: n, + disabled: n, + link: s, + divider: r, header: a, href: c = "#" }) => { - const o = p("dropdown-item", s && "disabled"); - return r ? e ? /* @__PURE__ */ i(e, { className: o, children: t }) : /* @__PURE__ */ i("a", { href: c, className: o, children: t }) : n ? e ? /* @__PURE__ */ i(e, { className: "dropdown-divider", children: t }) : /* @__PURE__ */ i("hr", { className: "dropdown-divider" }) : a ? e ? /* @__PURE__ */ i(e, { className: "dropdown-header", children: t }) : /* @__PURE__ */ i("h6", { className: "dropdown-header", children: t }) : /* @__PURE__ */ i(Q, { children: t }); + const o = p("dropdown-item", n && "disabled"); + return s ? e ? /* @__PURE__ */ l(e, { className: o, children: t }) : /* @__PURE__ */ l("a", { href: c, className: o, children: t }) : r ? e ? /* @__PURE__ */ l(e, { className: "dropdown-divider", children: t }) : /* @__PURE__ */ l("hr", { className: "dropdown-divider" }) : a ? e ? /* @__PURE__ */ l(e, { className: "dropdown-header", children: t }) : /* @__PURE__ */ l("h6", { className: "dropdown-header", children: t }) : /* @__PURE__ */ l(Q, { children: t }); }; -const is = ({ +const qt = ({ onClick: e, tag: t = "li", - childTag: s, - children: r, - style: n, + childTag: n, + children: s, + style: r, link: a, divider: c, header: o, - disabled: l, - href: u, - preventCloseOnClick: f, + disabled: i, + href: d, + preventCloseOnClick: u, ...m }) => { - const { setIsOpenState: d, onHide: b, setActiveIndex: g } = te(); - return /* @__PURE__ */ i(t, { style: n, onClick: (v) => { - b == null || b(v), e == null || e(v), !(l || f || v.defaultPrevented) && (setTimeout(() => g(-1), 300), d(!1)); - }, ...m, children: /* @__PURE__ */ i( - ut, + const { setIsOpenState: f, onHide: g, setActiveIndex: b } = ne(); + return /* @__PURE__ */ l(t, { style: r, onClick: (v) => { + g == null || g(v), e == null || e(v), !(i || u || v.defaultPrevented) && (setTimeout(() => b(-1), 300), f(!1)); + }, ...m, children: /* @__PURE__ */ l( + Se, { link: a, divider: c, header: o, - disabled: l, - href: u, - childTag: s, - children: r + disabled: i, + href: d, + childTag: n, + children: s } ) }); -}, fe = (e, t, s) => s === "up" ? e <= 0 ? t[t.length - 1].props.divider === !0 || t[t.length - 1].props.disabled === !0 : t[e - 1].props.divider === !0 || t[e - 1].props.disabled === !0 : e === t.length - 1 ? t[0].props.divider === !0 || t[0].props.disabled === !0 : t[e + 1].props.divider === !0 || t[e + 1].props.disabled === !0, dt = (e) => { - const { activeIndex: t, isOpenState: s, setIsOpenState: r, setActiveIndex: n, onHide: a } = te(), c = G( +}, pe = (e, t, n) => n === "up" ? e <= 0 ? t[t.length - 1].props.divider === !0 || t[t.length - 1].props.disabled === !0 : t[e - 1].props.divider === !0 || t[e - 1].props.disabled === !0 : e === t.length - 1 ? t[0].props.divider === !0 || t[0].props.disabled === !0 : t[e + 1].props.divider === !0 || t[e + 1].props.disabled === !0, Fe = (e) => { + const { activeIndex: t, isOpenState: n, setIsOpenState: s, setActiveIndex: r, onHide: a } = ne(), c = q( (o) => { - if (Array.isArray(e)) { - if (ot(document.activeElement) && document.activeElement.blur(), o.key === "ArrowUp") { + const i = ["ArrowUp", "ArrowDown", "Tab", "Enter", "Escape"]; + if (!(!Array.isArray(e) || !i.includes(o.key))) { + if (ke(document.activeElement) && document.activeElement.blur(), o.key === "ArrowUp") { o.preventDefault(); - const l = fe(t, e, "up"); + const d = pe(t, e, "up"); if (t === 1) { - n(l ? e.length - 1 : 0); + r(d ? e.length - 1 : 0); return; } if (t <= 0) { - n(l ? e.length - 2 : e.length - 1); + r(d ? e.length - 2 : e.length - 1); return; } - n((u) => l ? u - 2 : u - 1); + r((u) => d ? u - 2 : u - 1); } if (o.key === "ArrowDown" || o.key === "Tab") { o.preventDefault(); - const l = fe(t, e, "down"); + const d = pe(t, e, "down"); if (t === e.length - 2) { - n((u) => l ? 0 : u + 1); + r((u) => d ? 0 : u + 1); return; } if (t === e.length - 1) { - n(l ? 1 : 0); + r(d ? 1 : 0); return; } - n((u) => l ? u + 2 : u + 1); + r((u) => d ? u + 2 : u + 1); } if (o.key === "Enter") { - const l = document.querySelector('[data-active="true"]'), u = l == null ? void 0 : l.firstElementChild; + const d = document.querySelector('[data-active="true"]'), u = d == null ? void 0 : d.firstElementChild; if (u) return u.click(); if (a == null || a(o), o.defaultPrevented) return; - r(!1), setTimeout(() => n(-1), 300); + s(!1), setTimeout(() => r(-1), 300); } if (o.key === "Escape") { if (a == null || a(o), o.defaultPrevented) return; - r(!1), setTimeout(() => n(-1), 300); + s(!1), setTimeout(() => r(-1), 300); } } }, - [e, r, n, t, a] + [e, s, r, t, a] ); - x(() => (s && document.addEventListener("keydown", c), () => { - s && document.removeEventListener("keydown", c); - }), [s, c]), x(() => { - const o = document.querySelector('[data-active="true"]'), l = o == null ? void 0 : o.firstElementChild; - return l == null || l.focus(), () => l == null ? void 0 : l.blur(); + I(() => (n && document.addEventListener("keydown", c), () => { + n && document.removeEventListener("keydown", c); + }), [n, c]), I(() => { + const o = document.querySelector('[data-active="true"]'), i = o == null ? void 0 : o.firstElementChild; + return i == null || i.focus(), () => i == null ? void 0 : i.blur(); }, [t]); -}, ft = () => { - const { isOpenState: e } = te(), [t, s] = B(!1), [r, n] = B(!1), [a, c] = B(e); - return x(() => { +}, We = () => { + const { isOpenState: e } = ne(), [t, n] = w(!1), [s, r] = w(!1), [a, c] = w(e); + return I(() => { let o; - return e || (n(!0), s(!1), o = setTimeout(() => { - n(!1), c(!1); - }, 300)), e && (s(!0), n(!1), c(!0), o = setTimeout(() => { - s(!1); + return e || (r(!0), n(!1), o = setTimeout(() => { + r(!1), c(!1); + }, 300)), e && (n(!0), r(!1), c(!0), o = setTimeout(() => { + n(!1); }, 300)), () => clearTimeout(o); - }, [e]), { show: a, isFadeIn: t, isFadeOut: r }; + }, [e]), { show: a, isFadeIn: t, isFadeOut: s }; }; -const us = ({ +const Gt = ({ className: e, tag: t = "ul", - children: s, - style: r, - dark: n, + children: n, + style: s, + dark: r, responsive: a = "", appendToBody: c = !1, alwaysOpen: o, - ...l + ...i }) => { const { - activeIndex: u, - setPopperElement: f, + activeIndex: d, + setPopperElement: u, isOpenState: m, - animation: d, - referenceElement: b, - popperElement: g, + animation: f, + referenceElement: g, + popperElement: b, options: h, dropleft: v, - dropup: y, + dropup: D, dropright: $ - } = te(), { show: M, isFadeIn: C, isFadeOut: N } = ft(); - dt(s); - const S = () => { + } = ne(), { show: B, isFadeIn: x, isFadeOut: y } = We(); + Fe(n); + const P = () => { if ($) return "right-start"; if (v) return "left-start"; - const T = g && getComputedStyle(g).getPropertyValue("--mdb-position").trim() === "end"; - return y ? T ? "top-end" : "top-start" : T ? "bottom-end" : "bottom-start"; - }, { styles: I } = le(b, g, { - placement: S(), - modifiers: [Re], + const T = b && getComputedStyle(b).getPropertyValue("--mdb-position").trim() === "end"; + return D ? T ? "top-end" : "top-start" : T ? "bottom-end" : "bottom-start"; + }, { styles: L } = le(g, b, { + placement: P(), + modifiers: [De], ...h - }), X = p( + }), F = p( "dropdown-menu", - n && "dropdown-menu-dark", + r && "dropdown-menu-dark", m && "show", - d && "animation", - C && "fade-in", - N && "fade-out", + f && "animation", + x && "fade-in", + y && "fade-out", a && `dropdown-menu-${a}`, e ); - if (!M && !o) + if (!B && !o) return null; - const A = /* @__PURE__ */ i( + const A = /* @__PURE__ */ l( t, { - className: X, - style: { position: "absolute", zIndex: 1e3, ...I.popper, ...r }, - ref: f, - ...l, - children: De.map( - s, - (T, E) => Me(T, { + className: F, + style: { position: "absolute", zIndex: 1e3, ...L.popper, ...s }, + ref: u, + ...i, + children: Te.map( + n, + (T, E) => Be(T, { tabIndex: 1, - "data-active": u === E && !0, - className: p(u === E ? "active" : "", T.props.className) + "data-active": d === E && !0, + className: p(d === E ? "active" : "", T.props.className) }) ) } ); - return /* @__PURE__ */ i(Q, { children: c ? ge(A, document.body) : A }); -}, ds = ({ + return /* @__PURE__ */ l(Q, { children: c ? he(A, document.body) : A }); +}, Kt = ({ className: e, - tag: t = ae, - children: s, - onClick: r, - split: n, + tag: t = ie, + children: n, + onClick: s, + split: r, ...a }) => { - const { setIsOpenState: c, setReferenceElement: o, isOpenState: l, setActiveIndex: u, onHide: f, onShow: m } = te(), d = p("dropdown-toggle", n && "dropdown-toggle-split", e); - return /* @__PURE__ */ i( + const { setIsOpenState: c, setReferenceElement: o, isOpenState: i, setActiveIndex: d, onHide: u, onShow: m } = ne(), f = p("dropdown-toggle", r && "dropdown-toggle-split", e); + return /* @__PURE__ */ l( t, { - onClick: (g) => { - r == null || r(g), l ? f == null || f(g) : m == null || m(g), !g.defaultPrevented && (c((h) => !h), setTimeout(() => u(-1), 300)); + onClick: (b) => { + s == null || s(b), i ? u == null || u(b) : m == null || m(b), !b.defaultPrevented && (c((h) => !h), setTimeout(() => d(-1), 300)); }, ref: o, - className: d, - "aria-expanded": !!l, + className: f, + "aria-expanded": !!i, ...a, - children: s + children: n } ); -}, mt = ({ +}, Ut = ({ className: e, btnClassName: t, - btnChildren: s, - children: r, - tag: n, + btnChildren: n, + children: s, + tag: r = ie, onShow: a, onHide: c, - popperTag: o, - isOpen: l, - placement: u, - dismiss: f, + popperTag: o = "div", + isOpen: i, + placement: d = "bottom", + dismiss: u, options: m, - poperStyle: d, - onClick: b, - ...g + poperStyle: f, + onClick: g, + ...b }) => { - const [h, v] = B(), [y, $] = B(), { styles: M, attributes: C } = le(h, y, { placement: u, ...m }), [N, S] = B(l ?? !1), [I, X] = B(!1), [A, T] = B(!1), E = p( + const [h, v] = w(), [D, $] = w(), { styles: B, attributes: x } = le(h, D, { placement: d, ...m }), [y, P] = w(i ?? !1), [L, F] = w(!1), [A, T] = w(!1), E = p( "popover fade", - I && N && "show", - `bs-popover-${u === "left" ? "start" : u === "right" ? "end" : u}`, + L && y && "show", + `bs-popover-${d === "left" ? "start" : d === "right" ? "end" : d}`, e - ), R = (D) => { - N && !f ? c == null || c() : N || a == null || a(), f ? (T(!0), S(!0)) : S(!N), b && b(D); + ), R = (M) => { + y && !u ? c == null || c() : y || a == null || a(), u ? (T(!0), P(!0)) : P(!y), g && g(M); }; - x(() => { - l || S(!1); - }, [l]); - const W = G( - (D) => { - A && y && y !== null && N && h && h !== null && (h.contains(D.target) || (S(!1), c == null || c())); + I(() => { + i || P(!1); + }, [i]); + const W = q( + (M) => { + A && D && D !== null && y && h && h !== null && (h.contains(M.target) || (P(!1), c == null || c())); }, - [A, N, y, h, c] + [A, y, D, h, c] ); - return x(() => { - const D = setTimeout(() => { - X(N); + return I(() => { + const M = setTimeout(() => { + F(y); }, 150); return () => { - clearTimeout(D); + clearTimeout(M); }; - }, [N]), x(() => (N && document.addEventListener("mousedown", W), () => { + }, [y]), I(() => (y && document.addEventListener("mousedown", W), () => { document.removeEventListener("mousedown", W); - }), [W, N]), /* @__PURE__ */ V(Q, { children: [ - /* @__PURE__ */ i(n, { onClick: R, className: t, ...g, ref: v, children: s }), - (I || N) && se.createPortal( - /* @__PURE__ */ i( + }), [W, y]), /* @__PURE__ */ G(Q, { children: [ + /* @__PURE__ */ l(r, { onClick: R, className: t, ...b, ref: v, children: n }), + (L || y) && re.createPortal( + /* @__PURE__ */ l( o, { className: E, ref: $, - style: { ...M.popper, ...d }, - ...C.popper, - children: r + style: { ...B.popper, ...f }, + ...x.popper, + children: s } ), document.body ) ] }); -}; -mt.defaultProps = { - tag: ae, - popperTag: "div", - placement: "bottom" -}; -const pt = ({ className: e, children: t, tag: s, ...r }) => { - const n = p("popover-body", e); - return /* @__PURE__ */ i(s, { className: n, ...r, children: t }); -}; -pt.defaultProps = { - tag: "div" -}; -const gt = ({ className: e, children: t, tag: s, ...r }) => { - const n = p("popover-header", e); - return /* @__PURE__ */ i(s, { className: n, ...r, children: t }); -}; -gt.defaultProps = { - tag: "h3" -}; -const fs = ({ +}, Jt = ({ + className: e, + children: t, + tag: n = "div", + ...s +}) => { + const r = p("popover-body", e); + return /* @__PURE__ */ l(n, { className: r, ...s, children: t }); +}, Qt = ({ + className: e, + children: t, + tag: n = "h3", + ...s +}) => { + const r = p("popover-header", e); + return /* @__PURE__ */ l(n, { className: r, ...s, children: t }); +}, Zt = ({ animationDirection: e, appendToBody: t, - backdrop: s = !0, - children: r, - className: n, + backdrop: n = !0, + children: s, + className: r, closeOnEsc: a = !0, setShow: c, leaveHiddenModal: o = !0, - modalRef: l, - onHide: u, - onHidePrevented: f, + modalRef: i, + onHide: d, + onHidePrevented: u, onShow: m, - show: d, - staticBackdrop: b, - nonInvasive: g = !1, + show: f, + staticBackdrop: g, + nonInvasive: b = !1, tag: h = "div", ...v }) => { - const [y, $] = B(d), [M, C] = B(d), [N, S] = B(d), [I, X] = B(!1), [A, T] = B(0), [E, R] = B([]), W = J(null), D = l || W, F = p( + const [D, $] = w(f), [B, x] = w(f), [y, P] = w(f), [L, F] = w(!1), [A, T] = w(0), [E, R] = w([]), W = K(null), M = i || W, S = p( "modal", - I && "modal-static", + L && "modal-static", e, "fade", - M && "show", - y && g && "modal-non-invasive-show", - n - ), O = p("modal-backdrop", "fade", y && "show"), L = G(() => { - C((q) => (q && (u == null || u()), !1)), setTimeout(() => { + B && "show", + D && b && "modal-non-invasive-show", + r + ), j = p("modal-backdrop", "fade", D && "show"), k = q(() => { + x((X) => (X && (d == null || d()), !1)), setTimeout(() => { $(!1), c == null || c(!1); }, 150), setTimeout(() => { - S(!1); + P(!1); }, 350); - }, [u, c]), K = G( - (q) => { - g || M && q.target === D.current && (b ? (X(!0), f == null || f(), setTimeout(() => { - X(!1); - }, 300)) : L()); + }, [d, c]), _ = q( + (X) => { + b || B && X.target === M.current && (g ? (F(!0), u == null || u(), setTimeout(() => { + F(!1); + }, 300)) : k()); }, - [M, D, b, L, f, g] - ), Y = G( - (q) => { - M && q.key === "Tab" && (q.preventDefault(), T(A + 1)), a && M && q.key === "Escape" && (b ? (X(!0), f == null || f(), setTimeout(() => { - X(!1); - }, 300)) : L()); + [B, M, g, k, u, b] + ), V = q( + (X) => { + B && X.key === "Tab" && (X.preventDefault(), T(A + 1)), a && B && X.key === "Escape" && (g ? (F(!0), u == null || u(), setTimeout(() => { + F(!1); + }, 300)) : k()); }, - [M, a, A, b, L, f] + [B, a, A, g, k, u] ); - x(() => { - var k; - const q = (k = D.current) == null ? void 0 : k.querySelectorAll( + I(() => { + var z; + const X = (z = M.current) == null ? void 0 : z.querySelectorAll( "button, a, input, select, textarea, [tabindex]" - ), P = Array.from(q).filter((U) => U.tabIndex !== -1).sort((U, Z) => U.tabIndex === Z.tabIndex ? 0 : Z.tabIndex === null ? -1 : U.tabIndex === null ? 1 : U.tabIndex - Z.tabIndex); - R(P), T(P.length - 1); - }, [D]), x(() => { + ), Z = Array.from(X).filter((C) => C.tabIndex !== -1).sort((C, O) => C.tabIndex === O.tabIndex ? 0 : O.tabIndex === null ? -1 : C.tabIndex === null ? 1 : C.tabIndex - O.tabIndex); + R(Z), T(Z.length - 1); + }, [M]), I(() => { E && E.length > 0 && (A === E.length ? (E[0].focus(), T(0)) : E[A].focus()); - }, [A, E]), x(() => { - const q = () => { - const k = document.documentElement.clientWidth; - return Math.abs(window.innerWidth - k); - }, P = window.innerWidth > document.documentElement.clientWidth && window.innerWidth >= 576; - if (N && P && !g) { - const k = q(); - document.body.classList.add("modal-open"), document.body.style.overflow = "hidden", document.body.style.paddingRight = `${k}px`; + }, [A, E]), I(() => { + const X = () => { + const z = document.documentElement.clientWidth; + return Math.abs(window.innerWidth - z); + }, Z = window.innerWidth > document.documentElement.clientWidth && window.innerWidth >= 576; + if (y && Z && !b) { + const z = X(); + document.body.classList.add("modal-open"), document.body.style.overflow = "hidden", document.body.style.paddingRight = `${z}px`; } else document.body.classList.remove("modal-open"), document.body.style.overflow = "", document.body.style.paddingRight = ""; return () => { document.body.classList.remove("modal-open"), document.body.style.overflow = "", document.body.style.paddingRight = ""; }; - }, [N, g]), x(() => { - d ? (m == null || m(), S(!0), setTimeout(() => { + }, [y, b]), I(() => { + f ? (m == null || m(), P(!0), setTimeout(() => { $(!0); }, 0), setTimeout(() => { - C(!0), c == null || c(!0); - }, 150)) : L(); - }, [d, L, c, m]), x(() => { - const q = (P) => { - P.target.closest(".modal-dialog") || window.addEventListener("mouseup", K, { once: !0 }); + x(!0), c == null || c(!0); + }, 150)) : k(); + }, [f, k, c, m]), I(() => { + const X = (Z) => { + Z.target.closest(".modal-dialog") || window.addEventListener("mouseup", _, { once: !0 }); }; - return window.addEventListener("mousedown", q), window.addEventListener("keydown", Y), () => { - window.removeEventListener("mousedown", q), window.removeEventListener("keydown", Y); + return window.addEventListener("mousedown", X), window.addEventListener("keydown", V), () => { + window.removeEventListener("mousedown", X), window.removeEventListener("keydown", V); }; - }, [Y, K]); - const _ = /* @__PURE__ */ i(Q, { children: (o || d || N) && se.createPortal( - /* @__PURE__ */ V(Q, { children: [ - /* @__PURE__ */ i( + }, [V, _]); + const Y = /* @__PURE__ */ l(Q, { children: (o || f || y) && re.createPortal( + /* @__PURE__ */ G(Q, { children: [ + /* @__PURE__ */ l( h, { - className: F, - ref: D, - style: { display: N || d ? "block" : "none", pointerEvents: g ? "none" : "initial" }, + className: S, + ref: M, + style: { display: y || f ? "block" : "none", pointerEvents: b ? "none" : "initial" }, ...v, - children: r + children: s } ), - se.createPortal( - s && N && !g && /* @__PURE__ */ i("div", { className: O }), + re.createPortal( + n && y && !b && /* @__PURE__ */ l("div", { className: j }), document.body ) ] }), document.body - ) }), j = /* @__PURE__ */ i(Q, { children: (o || d || N) && /* @__PURE__ */ V(Q, { children: [ - /* @__PURE__ */ i( + ) }), U = /* @__PURE__ */ l(Q, { children: (o || f || y) && /* @__PURE__ */ G(Q, { children: [ + /* @__PURE__ */ l( h, { - className: F, - ref: D, - style: { display: N || d ? "block" : "none", pointerEvents: g ? "none" : "initial" }, + className: S, + ref: M, + style: { display: y || f ? "block" : "none", pointerEvents: b ? "none" : "initial" }, ...v, - children: r + children: s } ), - se.createPortal( - s && N && !g && /* @__PURE__ */ i("div", { onClick: L, className: O }), + re.createPortal( + n && y && !b && /* @__PURE__ */ l("div", { onClick: k, className: j }), document.body ) ] }) }); - return /* @__PURE__ */ i(Q, { children: t ? _ : j }); -}, bt = w.forwardRef( - ({ className: e, centered: t, children: s, size: r, scrollable: n, tag: a, ...c }, o) => { - const l = p( + return /* @__PURE__ */ l(Q, { children: t ? Y : U }); +}, zt = N.forwardRef( + ({ className: e, centered: t, children: n, size: s, scrollable: r, tag: a = "div", ...c }, o) => { + const i = p( "modal-dialog", - n && "modal-dialog-scrollable", + r && "modal-dialog-scrollable", t && "modal-dialog-centered", - r && `modal-${r}`, + s && `modal-${s}`, e ); - return /* @__PURE__ */ i(a, { className: l, ...c, ref: o, children: s }); + return /* @__PURE__ */ l(a, { className: i, ...c, ref: o, children: n }); } -); -bt.defaultProps = { tag: "div" }; -const vt = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), Ht = N.forwardRef( + ({ className: e, children: t, tag: n = "div", ...s }, r) => { const a = p("modal-content", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -vt.defaultProps = { tag: "div" }; -const ht = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), es = N.forwardRef( + ({ className: e, children: t, tag: n = "div", ...s }, r) => { const a = p("modal-header", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -ht.defaultProps = { tag: "div" }; -const yt = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), ts = N.forwardRef( + ({ className: e, children: t, tag: n = "h5", ...s }, r) => { const a = p("modal-title", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -yt.defaultProps = { tag: "h5" }; -const Nt = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), ss = N.forwardRef( + ({ className: e, children: t, tag: n = "div", ...s }, r) => { const a = p("modal-body", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -Nt.defaultProps = { tag: "div" }; -const wt = w.forwardRef( - ({ className: e, children: t, tag: s, ...r }, n) => { +), ns = N.forwardRef( + ({ className: e, children: t, tag: n = "div", ...s }, r) => { const a = p("modal-footer", e); - return /* @__PURE__ */ i(s, { className: a, ...r, ref: n, children: t }); + return /* @__PURE__ */ l(n, { className: a, ...s, ref: r, children: t }); } -); -wt.defaultProps = { tag: "div" }; -const ie = w.createContext({ +), de = N.createContext({ activeElement: null, setTargets: null -}), ms = ({ +}), rs = ({ container: e = typeof window !== void 0 ? window : null, className: t, - children: s, - offset: r = 10, - ...n + children: n, + offset: s = 10, + ...r }) => { - const a = p("sticky-top", t), [c, o] = B(null), [l, u] = B([]), f = e instanceof Window, m = G(() => { - var y, $, M; - if (!l.length) + const a = p("sticky-top", t), [c, o] = w(null), [i, d] = w([]), u = e instanceof Window, m = q(() => { + var D, $, B; + if (!i.length) return; - const d = f ? window.pageYOffset : (y = e == null ? void 0 : e.current) == null ? void 0 : y.scrollTop, b = Number(r), g = ($ = l[l.length - 1]) == null ? void 0 : $.current, h = (M = l[0]) == null ? void 0 : M.current; - d + b < h.offsetTop && o(null), l.forEach((C, N) => { + const f = u ? window.pageYOffset : (D = e == null ? void 0 : e.current) == null ? void 0 : D.scrollTop, g = Number(s), b = ($ = i[i.length - 1]) == null ? void 0 : $.current, h = (B = i[0]) == null ? void 0 : B.current; + f + g < h.offsetTop && o(null), i.forEach((x, y) => { var A; - const S = (A = l[N + 1]) == null ? void 0 : A.current, I = C.current; - if (d > I.offsetTop - b && d < (S == null ? void 0 : S.offsetTop) - b) { - o(I); + const P = (A = i[y + 1]) == null ? void 0 : A.current, L = x.current; + if (f > L.offsetTop - g && f < (P == null ? void 0 : P.offsetTop) - g) { + o(L); return; } - }), d > g.offsetTop - b && o(g); - }, [r, l, f, e]); - return x(() => { - const d = f ? e : e == null ? void 0 : e.current; - return m(), d == null || d.addEventListener("scroll", m), () => { - d == null || d.removeEventListener("scroll", m); + }), f > b.offsetTop - g && o(b); + }, [s, i, u, e]); + return I(() => { + const f = u ? e : e == null ? void 0 : e.current; + return m(), f == null || f.addEventListener("scroll", m), () => { + f == null || f.removeEventListener("scroll", m); }; - }, [m, e, f]), /* @__PURE__ */ i("div", { className: a, ...n, children: /* @__PURE__ */ i("ul", { className: "nav flex-column nav-pills menu-sidebar", children: /* @__PURE__ */ i(ie.Provider, { value: { activeElement: c, setTargets: u }, children: s }) }) }); -}, Tt = ({ + }, [m, e, u]), /* @__PURE__ */ l("div", { className: a, ...r, children: /* @__PURE__ */ l("ul", { className: "nav flex-column nav-pills menu-sidebar", children: /* @__PURE__ */ l(de.Provider, { value: { activeElement: c, setTargets: d }, children: n }) }) }); +}, as = ({ className: e, collapsible: t, - targetRef: s, - children: r, - subsections: n, + targetRef: n, + children: s, + subsections: r, onClick: a, onActivate: c, ...o }) => { var h; - const { activeElement: l, setTargets: u } = ee(ie), f = () => n == null ? void 0 : n.some((v) => v.current.id === (l == null ? void 0 : l.id)), m = (l == null ? void 0 : l.id) === ((h = s.current) == null ? void 0 : h.id), d = m || f(); - m && (c == null || c(l == null ? void 0 : l.id)); - const b = p("nav-link", t && "collapsible-scrollspy", d && "active", e), g = (v) => { - const y = s == null ? void 0 : s.current; - y == null || y.scrollIntoView({ behavior: "smooth" }), a == null || a(v); + const { activeElement: i, setTargets: d } = se(de), u = () => r == null ? void 0 : r.some((v) => v.current.id === (i == null ? void 0 : i.id)), m = (i == null ? void 0 : i.id) === ((h = n.current) == null ? void 0 : h.id), f = m || u(); + m && (c == null || c(i == null ? void 0 : i.id)); + const g = p("nav-link", t && "collapsible-scrollspy", f && "active", e), b = (v) => { + const D = n == null ? void 0 : n.current; + D == null || D.scrollIntoView({ behavior: "smooth" }), a == null || a(v); }; - return x(() => { - u((v) => [...v, s]); - }, [u, s]), /* @__PURE__ */ i("li", { className: "nav-item", style: { cursor: "pointer" }, children: /* @__PURE__ */ i("a", { className: b, onClick: g, ...o, children: r }) }); -}; -Tt.defaultProps = {}; -const Bt = ({ + return I(() => { + d((v) => [...v, n]); + }, [d, n]), /* @__PURE__ */ l("li", { className: "nav-item", style: { cursor: "pointer" }, children: /* @__PURE__ */ l("a", { className: g, onClick: b, ...o, children: s }) }); +}, os = ({ collapsible: e, className: t, - children: s, - style: r, - ...n + children: n, + style: s, + ...r }) => { - const [a, c] = B("0px"), { activeElement: o } = ee(ie), l = p("nav flex-column", t), u = J(null); - x(() => { - const m = () => e == null ? void 0 : e.some((b) => b.current.id === (o == null ? void 0 : o.id)), d = u.current; - m() ? c(`${d == null ? void 0 : d.scrollHeight}px`) : c("0px"); + const [a, c] = w("0px"), { activeElement: o } = se(de), i = p("nav flex-column", t), d = K(null); + I(() => { + const m = () => e == null ? void 0 : e.some((g) => g.current.id === (o == null ? void 0 : o.id)), f = d.current; + m() ? c(`${f == null ? void 0 : f.scrollHeight}px`) : c("0px"); }, [o, e]); - const f = { + const u = { overflow: "hidden", height: a, transition: "height .5s ease", flexWrap: "nowrap", - ...r + ...s }; - return /* @__PURE__ */ i("ul", { className: l, ref: u, style: e ? f : r, ...n, children: s }); -}; -Bt.defaultProps = {}; -const ps = ({ ...e }) => /* @__PURE__ */ i(oe, { type: "checkbox", toggleSwitch: !0, ...e }), Ne = ({ value: e, min: t, max: s, showThumb: r }) => { - const n = Number(e), [a, c] = B( - (n || 0 - Number(t)) * 100 / (Number(s) - Number(t)) - ), o = p("thumb", r && "thumb-active"); - return x(() => { - c((Number(e) - Number(t)) * 100 / (Number(s) - Number(t))); - }, [e, s, t]), /* @__PURE__ */ i("span", { className: o, style: { left: `calc(${a}% + (${8 - a * 0.15}px))` }, children: /* @__PURE__ */ i("span", { className: "thumb-value", children: e }) }); -}; -Ne.defaultProps = { min: "0", max: "100" }; -const Dt = ({ + return /* @__PURE__ */ l("ul", { className: i, ref: d, style: e ? u : s, ...r, children: n }); +}, cs = ({ ...e }) => /* @__PURE__ */ l(ue, { type: "checkbox", toggleSwitch: !0, ...e }), Xe = ({ value: e, min: t = "0", max: n = "100", showThumb: s }) => { + const r = Number(e), [a, c] = w( + (r || 0 - Number(t)) * 100 / (Number(n) - Number(t)) + ), o = p("thumb", s && "thumb-active"); + return I(() => { + c((Number(e) - Number(t)) * 100 / (Number(n) - Number(t))); + }, [e, n, t]), /* @__PURE__ */ l("span", { className: o, style: { left: `calc(${a}% + (${8 - a * 0.15}px))` }, children: /* @__PURE__ */ l("span", { className: "thumb-value", children: e }) }); +}, ls = ({ className: e, - defaultValue: t, - disableTooltip: s, - labelId: r, - max: n, + defaultValue: t = 0, + disableTooltip: n, + labelId: s, + max: r, min: a, onMouseDown: c, onMouseUp: o, - onTouchStart: l, - onTouchEnd: u, - onChange: f, + onTouchStart: i, + onTouchEnd: d, + onChange: u, labelClass: m, - value: d, - label: b, - id: g, + value: f, + label: g, + id: b, inputRef: h, ...v }) => { - const [y, $] = B(t), [M, C] = B(!1), N = p("form-range", e), S = p("form-label", m); - return /* @__PURE__ */ V(Q, { children: [ - b && /* @__PURE__ */ i("label", { className: S, id: r, htmlFor: g, children: b }), - /* @__PURE__ */ V("div", { className: "range", children: [ - /* @__PURE__ */ i( + const [D, $] = w(t), [B, x] = w(!1), y = p("form-range", e), P = p("form-label", m); + return /* @__PURE__ */ G(Q, { children: [ + g && /* @__PURE__ */ l("label", { className: P, id: s, htmlFor: b, children: g }), + /* @__PURE__ */ G("div", { className: "range", children: [ + /* @__PURE__ */ l( "input", { type: "range", onMouseDown: (R) => { - C(!0), c && c(R); + x(!0), c && c(R); }, onMouseUp: (R) => { - C(!1), o && o(R); + x(!1), o && o(R); }, onTouchStart: (R) => { - C(!0), l && l(R); + x(!0), i && i(R); }, onTouchEnd: (R) => { - C(!1), u && u(R); + x(!1), d && d(R); }, onChange: (R) => { - $(R.target.value), f && f(R); + $(R.target.value), u && u(R); }, - className: N, - value: d || y, - id: g, + className: y, + value: f || D, + id: b, min: a, - max: n, + max: r, ref: h, ...v } ), - !s && /* @__PURE__ */ i(Ne, { value: d || y, showThumb: M, min: a, max: n }) + !n && /* @__PURE__ */ l(Xe, { value: f || D, showThumb: B, min: a, max: r }) ] }) ] }); -}; -Dt.defaultProps = { defaultValue: 0 }; -const gs = ({ className: e, labelClass: t, labelStyle: s, inputRef: r, size: n, label: a, id: c, ...o }) => { - const l = p("form-control", `form-control-${n}`, e), u = p("form-label", t); - return /* @__PURE__ */ V(Q, { children: [ - a && /* @__PURE__ */ i("label", { className: u, style: s, htmlFor: c, children: a }), - /* @__PURE__ */ i("input", { className: l, type: "file", id: c, ref: r, ...o }) +}, is = ({ className: e, labelClass: t, labelStyle: n, inputRef: s, size: r, label: a, id: c, ...o }) => { + const i = p("form-control", `form-control-${r}`, e), d = p("form-label", t); + return /* @__PURE__ */ G(Q, { children: [ + a && /* @__PURE__ */ l("label", { className: d, style: n, htmlFor: c, children: a }), + /* @__PURE__ */ l("input", { className: i, type: "file", id: c, ref: s, ...o }) ] }); -}, Mt = w.forwardRef( +}, us = N.forwardRef( ({ className: e, children: t, - noBorder: s, - textBefore: r, - textAfter: n, + noBorder: n, + textBefore: s, + textAfter: r, noWrap: a, - tag: c, - textTag: o, - textClass: l, - size: u, - textProps: f, + tag: c = "div", + textTag: o = "span", + textClass: i, + size: d, + textProps: u, ...m - }, d) => { - const b = p("input-group", a && "flex-nowrap", u && `input-group-${u}`, e), g = p("input-group-text", s && "border-0", l), h = (v) => /* @__PURE__ */ i(Q, { children: v && Array.isArray(v) ? v.map((y, $) => /* @__PURE__ */ i(o, { className: g, ...f, children: y }, $)) : /* @__PURE__ */ i(o, { className: g, ...f, children: v }) }); - return /* @__PURE__ */ V(c, { className: b, ref: d, ...m, children: [ - r && h(r), + }, f) => { + const g = p("input-group", a && "flex-nowrap", d && `input-group-${d}`, e), b = p("input-group-text", n && "border-0", i), h = (v) => /* @__PURE__ */ l(Q, { children: v && Array.isArray(v) ? v.map((D, $) => /* @__PURE__ */ l(o, { className: b, ...u, children: D }, $)) : /* @__PURE__ */ l(o, { className: b, ...u, children: v }) }); + return /* @__PURE__ */ G(c, { className: g, ref: f, ...m, children: [ + s && h(s), t, - n && h(n) + r && h(r) ] }); } -); -Mt.defaultProps = { tag: "div", textTag: "span" }; -const Rt = w.forwardRef( - ({ className: e, children: t, isValidated: s, onReset: r, onSubmit: n, ...a }, c) => { - const [o, l] = B(s), u = p("needs-validation", o && "was-validated", e); - return /* @__PURE__ */ i("form", { className: u, onSubmit: (d) => { - d.preventDefault(), l(!0), n && n(d); - }, onReset: (d) => { - d.preventDefault(), l(!1), r && r(d); - }, ref: c, ...a, children: t }); +), ds = N.forwardRef( + ({ className: e, children: t, isValidated: n, onReset: s, onSubmit: r, noValidate: a = !0, ...c }, o) => { + const [i, d] = w(n), u = p("needs-validation", i && "was-validated", e); + return /* @__PURE__ */ l( + "form", + { + className: u, + onSubmit: (g) => { + g.preventDefault(), d(!0), r && r(g); + }, + onReset: (g) => { + g.preventDefault(), d(!1), s && s(g); + }, + ref: o, + noValidate: a, + ...c, + children: t + } + ); } -); -Rt.defaultProps = { - noValidate: !0 -}; -const bs = w.forwardRef( - ({ className: e, fill: t, pills: s, justify: r, children: n, ...a }, c) => { +), fs = N.forwardRef( + ({ className: e, fill: t, pills: n, justify: s, children: r, ...a }, c) => { const o = p( "nav", - s ? "nav-pills" : "nav-tabs", + n ? "nav-pills" : "nav-tabs", t && "nav-fill", - r && "nav-justified", + s && "nav-justified", e ); - return /* @__PURE__ */ i("ul", { className: o, ref: c, ...a, children: n }); + return /* @__PURE__ */ l("ul", { className: o, ref: c, ...a, children: r }); } -), vs = w.forwardRef( - ({ className: e, children: t, style: s, ...r }, n) => { - const a = p("nav-item", e); - return /* @__PURE__ */ i("li", { className: a, style: { cursor: "pointer", ...s }, role: "presentation", ref: n, ...r, children: t }); +), ms = N.forwardRef( + ({ className: e, children: t, style: n, tag: s = "li", ...r }, a) => { + const c = p("nav-item", e); + return /* @__PURE__ */ l(s, { className: c, style: { cursor: "pointer", ...n }, role: "presentation", ref: a, ...r, children: t }); } -), hs = w.forwardRef( - ({ className: e, color: t, active: s, onShow: r, onHide: n, children: a, ...c }, o) => { - const l = p("nav-link", s && "active", t && `bg-${t}`, e); - return x(() => { - s ? r == null || r() : n == null || n(); - }, [s]), /* @__PURE__ */ i("a", { className: l, ref: o, ...c, children: a }); +), ps = N.forwardRef( + ({ className: e, color: t, active: n, onShow: s, onHide: r, children: a, ...c }, o) => { + const i = p("nav-link", n && "active", t && `bg-${t}`, e); + return I(() => { + n ? s == null || s() : r == null || r(); + }, [n]), /* @__PURE__ */ l("a", { className: i, ref: o, ...c, children: a }); } -), $t = w.forwardRef( - ({ className: e, tag: t, children: s, ...r }, n) => { +), gs = N.forwardRef( + ({ className: e, tag: t = "div", children: n, ...s }, r) => { const a = p("tab-content", e); - return /* @__PURE__ */ i(t, { className: a, ref: n, ...r, children: s }); + return /* @__PURE__ */ l(t, { className: a, ref: r, ...s, children: n }); } -); -$t.defaultProps = { tag: "div" }; -const Et = w.forwardRef( - ({ className: e, tag: t, show: s, children: r, ...n }, a) => { - const [c, o] = B(!1), l = p("tab-pane", "fade", c && "show", s && "active", e); - return x(() => { - let u; - return s ? u = setTimeout(() => { +), bs = N.forwardRef( + ({ className: e, tag: t = "div", show: n, children: s, ...r }, a) => { + const [c, o] = w(!1), i = p("tab-pane", "fade", c && "show", n && "active", e); + return I(() => { + let d; + return n ? d = setTimeout(() => { o(!0); }, 100) : o(!1), () => { - clearTimeout(u); + clearTimeout(d); }; - }, [s]), /* @__PURE__ */ i(t, { className: l, role: "tabpanel", ref: a, ...n, children: r }); + }, [n]), /* @__PURE__ */ l(t, { className: i, role: "tabpanel", ref: a, ...r, children: s }); } -); -Et.defaultProps = { tag: "div" }; -const ue = pe({ +), fe = ve({ active: 0 -}), Pt = ({ imagesCount: e, to: t }) => { - const { active: s } = ee(ue); - return /* @__PURE__ */ i("ol", { className: "carousel-indicators", children: Array.from(Array(e)).map((r, n) => /* @__PURE__ */ i("li", { "data-mdb-target": n, className: p(s === n && "active"), onClick: () => t(n) }, n)) }); -}, Ct = ({ move: e }) => /* @__PURE__ */ V(Q, { children: [ - /* @__PURE__ */ V("a", { role: "button", className: "carousel-control-prev", onClick: () => e("prev"), children: [ - /* @__PURE__ */ i("span", { className: "carousel-control-prev-icon" }), - /* @__PURE__ */ i("span", { className: "visually-hidden", children: "Previous" }) +}), _e = ({ imagesCount: e, to: t }) => { + const { active: n } = se(fe); + return /* @__PURE__ */ l("ol", { className: "carousel-indicators", children: Array.from(Array(e)).map((s, r) => /* @__PURE__ */ l("li", { "data-mdb-target": r, className: p(n === r && "active"), onClick: () => t(r) }, r)) }); +}, je = ({ move: e }) => /* @__PURE__ */ G(Q, { children: [ + /* @__PURE__ */ G("a", { role: "button", className: "carousel-control-prev", onClick: () => e("prev"), children: [ + /* @__PURE__ */ l("span", { className: "carousel-control-prev-icon" }), + /* @__PURE__ */ l("span", { className: "visually-hidden", children: "Previous" }) ] }), - /* @__PURE__ */ V("a", { role: "button", className: "carousel-control-next", onClick: () => e("next"), children: [ - /* @__PURE__ */ i("span", { className: "carousel-control-next-icon" }), - /* @__PURE__ */ i("span", { className: "visually-hidden", children: "Next" }) + /* @__PURE__ */ G("a", { role: "button", className: "carousel-control-next", onClick: () => e("next"), children: [ + /* @__PURE__ */ l("span", { className: "carousel-control-next-icon" }), + /* @__PURE__ */ l("span", { className: "visually-hidden", children: "Next" }) ] }) -] }), It = (e) => { - const t = getComputedStyle(e), s = getComputedStyle(e == null ? void 0 : e.parentNode); - return t.display !== "none" && s.display !== "none" && t.visibility !== "hidden"; -}, xt = (e) => Array.from(e == null ? void 0 : e.querySelectorAll(".carousel-item")), Lt = (e) => e.offsetHeight, kt = (e, t, s = !0) => { - if (!s) { - me(e); +] }), Ye = (e) => { + const t = getComputedStyle(e), n = getComputedStyle(e == null ? void 0 : e.parentNode); + return t.display !== "none" && n.display !== "none" && t.visibility !== "hidden"; +}, Ve = (e) => Array.from(e == null ? void 0 : e.querySelectorAll(".carousel-item")), qe = (e) => e.offsetHeight, Ge = (e, t, n = !0) => { + if (!n) { + ge(e); return; } - const r = Ot(t); - t.addEventListener("transitionend", () => me(e), { once: !0 }), St(t, r); -}, me = (e) => { + const s = Ke(t); + t.addEventListener("transitionend", () => ge(e), { once: !0 }), Je(t, s); +}, ge = (e) => { typeof e == "function" && e(); -}, Ot = (e) => { +}, Ke = (e) => { if (!e) return 0; - let { transitionDuration: t, transitionDelay: s } = window.getComputedStyle(e); - const r = Number.parseFloat(t), n = Number.parseFloat(s); - return !r && !n ? 0 : (t = t.split(",")[0], s = s.split(",")[0], (Number.parseFloat(t) + Number.parseFloat(s)) * 1e3); -}, At = (e) => { + let { transitionDuration: t, transitionDelay: n } = window.getComputedStyle(e); + const s = Number.parseFloat(t), r = Number.parseFloat(n); + return !s && !r ? 0 : (t = t.split(",")[0], n = n.split(",")[0], (Number.parseFloat(t) + Number.parseFloat(n)) * 1e3); +}, Ue = (e) => { e.dispatchEvent(new Event("transitionend")); -}, St = (e, t) => { - let s = !1; - const n = t + 5; +}, Je = (e, t) => { + let n = !1; + const r = t + 5; function a() { - s = !0, e.removeEventListener("transitionend", a); + n = !0, e.removeEventListener("transitionend", a); } e.addEventListener("transitionend", a), setTimeout(() => { - s || At(e); - }, n); -}, Ft = ({ - fade: e, + n || Ue(e); + }, r); +}, vs = ({ + fade: e = !1, className: t, + carouselInnerClassName: n, dark: s, children: r, - interval: n, - keyboard: a, - touch: c, - showControls: o, - showIndicators: l, + interval: a = 5e3, + keyboard: c = !1, + touch: o = !0, + showControls: i, + showIndicators: d, onSlide: u, - ...f + ...m }) => { - const m = J([]), d = J(null), b = J(0), g = J(!1), [h, v] = B(0), [y, $] = B(0), [M, C] = B({ initialX: 0, initialY: 0 }), [N, S] = B(!1), I = J(null), X = p("carousel", "slide", e && "carousel-fade", s && "carousel-dark", t), A = () => { - d.current && (clearInterval(d.current), d.current = null); - }, T = G( - (P, k) => { - if (k !== void 0) - b.current = k, v(k); + const f = K([]), g = K(null), b = K(0), h = K(!1), [v, D] = w(0), [$, B] = w(0), [x, y] = w({ initialX: 0, initialY: 0 }), [P, L] = w(!1), F = K(null), A = p("carousel", "slide", e && "carousel-fade", s && "carousel-dark", t), T = p("carousel-inner", n), E = q( + (C, O) => { + if (O !== void 0) + b.current = O, D(O); else { - const U = h === y - 1 ? 0 : h + 1, Z = h === 0 ? y - 1 : h - 1; - b.current = P === "next" ? U : Z, v(P === "next" ? U : Z); + const J = v === $ - 1 ? 0 : v + 1, ee = v === 0 ? $ - 1 : v - 1; + b.current = C === "next" ? J : ee, D(C === "next" ? J : ee); } }, - [h, y] - ), E = G( - (P, k, U) => { - var de; - S(!0); - const z = m.current[h], H = Boolean(d.current), re = P === "next", ne = re ? "carousel-item-start" : "carousel-item-end", ce = re ? "carousel-item-next" : "carousel-item-prev"; - if (k.classList.contains("active")) { - g.current = !1; + [v, $] + ), R = q(() => { + g.current && (clearInterval(g.current), g.current = null); + }, []), W = q( + (C, O, J) => { + var me; + if (!f.current || f.current.length < 2) + return; + L(!0); + const H = f.current[v], te = Boolean(g.current), ae = C === "next", oe = ae ? "carousel-item-start" : "carousel-item-end", ce = ae ? "carousel-item-next" : "carousel-item-prev"; + if (O.classList.contains("active")) { + h.current = !1; return; } - T(P, U), !(!z || !k) && (g.current = !0, H && A(), (de = I.current) != null && de.classList.contains("slide") ? (k.classList.add(ce), Lt(k), z.classList.add(ne), k.classList.add(ne), kt(() => { - S(!1), k.classList.remove(ne, ce), k.classList.add("active"), z.classList.remove("active", ce, ne), g.current = !1; - }, z, !0)) : (z.classList.remove("active"), k.classList.add("active"), g.current = !1)); + E(C, J), !(!H || !O) && (h.current = !0, te && R(), (me = F.current) != null && me.classList.contains("slide") ? (O.classList.add(ce), qe(O), H.classList.add(oe), O.classList.add(oe), Ge(() => { + L(!1), O.classList.remove(oe, ce), O.classList.add("active"), H.classList.remove("active", ce, oe), h.current = !1; + }, H, !0)) : (H.classList.remove("active"), O.classList.add("active"), h.current = !1)); }, - [I, h, T] - ), R = (P) => { - g.current || (g.current = !0, setTimeout(() => { - g.current = !1; - }, P)); - }, W = G( - (P) => { - const k = P === "prev", z = (b.current + (k ? -1 : 1)) % y, H = m.current; - return z === -1 ? H[y - 1] : H[z]; + [F, v, E, R] + ), M = (C) => { + h.current || (h.current = !0, setTimeout(() => { + h.current = !1; + }, C)); + }, S = q( + (C) => { + const O = C === "prev", H = (b.current + (O ? -1 : 1)) % $, te = f.current; + return H === -1 ? te[$ - 1] : te[H]; }, - [y] - ), D = (P) => { - const k = b.current, U = P > k ? "next" : "prev", Z = m.current; - return { direction: U, nextElement: Z[P] }; - }, F = (P) => { - if (g.current || (R(700), P > y - 1 || P < 0)) + [$] + ), j = (C) => { + const O = b.current, J = C > O ? "next" : "prev", ee = f.current; + return { direction: J, nextElement: ee[C] }; + }, k = (C) => { + if (h.current || (M(700), C > $ - 1 || C < 0)) return; - const { direction: k, nextElement: U } = D(P); - E(k, U, P); - }, O = G( - (P) => { - if (g.current) + const { direction: O, nextElement: J } = j(C); + W(O, J, C); + }, _ = q( + (C) => { + if (h.current) return; - R(600); - const k = W(P); - E(P, k); + M(600); + const O = S(C); + W(C, O); }, - [W, E] - ), L = G(() => { - const { visibilityState: P, hidden: k } = document; - if (P) - return k || !It(I.current) ? void 0 : O("next"); - O("next"); - }, [I, O]), K = G(() => { - d.current && (clearInterval(d.current), d.current = null), d.current = setInterval(L, n); - }, [L, n]), Y = (P) => { - c && C({ initialX: P.touches[0].clientX, initialY: P.touches[0].clientY }); - }, _ = (P) => { - g.current = !0; - const { initialX: k, initialY: U } = M; - if (!k || !U) + [S, W] + ), V = q(() => { + const { visibilityState: C, hidden: O } = document; + if (C) + return O || !Ye(F.current) ? void 0 : _("next"); + _("next"); + }, [F, _]), Y = q(() => { + var O, J; + const C = (J = (O = r == null ? void 0 : r[v]) == null ? void 0 : O.props) == null ? void 0 : J.interval; + g.current && (clearInterval(g.current), g.current = null), g.current = setInterval(V, C || a); + }, [V, a, r, v]), U = (C) => { + o && y({ initialX: C.touches[0].clientX, initialY: C.touches[0].clientY }); + }, X = (C) => { + h.current = !0; + const { initialX: O, initialY: J } = x; + if (!O || !J) return; - const Z = P.touches[0].clientX, z = P.touches[0].clientY, H = k - Z, re = U - z; - Math.abs(H) > Math.abs(re) && (H > 0 ? O("prev") : O("next")), C({ initialX: 0, initialY: 0 }); - }, j = () => { - g.current = !1; - }, q = G( - (P) => { - switch (P.key) { + const ee = C.touches[0].clientX, H = C.touches[0].clientY, te = O - ee, ae = J - H; + Math.abs(te) > Math.abs(ae) && (te > 0 ? _("prev") : _("next")), y({ initialX: 0, initialY: 0 }); + }, Z = () => { + h.current = !1; + }, z = q( + (C) => { + switch (C.key) { case "ArrowLeft": - P.preventDefault(), O("prev"); + C.preventDefault(), _("prev"); break; case "ArrowRight": - P.preventDefault(), O("next"); + C.preventDefault(), _("next"); break; } }, - [O] + [_] ); - return x(() => { - if (a) - return window.addEventListener("keydown", q), () => { - window.removeEventListener("keydown", q); + return I(() => { + if (c) + return window.addEventListener("keydown", z), () => { + window.removeEventListener("keydown", z); }; - }, [q, a]), x(() => { - const P = I.current, k = xt(P); - m.current = k, $(k.length); - }, [I]), x(() => { - u == null || u(); - }, [N, u]), x(() => { - K(); - }, [K]), /* @__PURE__ */ i( + }, [z, c]), I(() => { + const C = F.current, O = Ve(C); + f.current = O, B(O.length); + }, [F]), I(() => { + P && (u == null || u()); + }, [P, u]), I(() => (Y(), () => { + R(); + }), [Y, R]), /* @__PURE__ */ l( "div", { - onTouchStart: Y, - onTouchMove: _, - onTouchEnd: j, - onMouseEnter: A, - onMouseLeave: K, - className: X, - ref: I, - ...f, - children: /* @__PURE__ */ i("div", { className: "carousel-inner", children: /* @__PURE__ */ V(ue.Provider, { value: { active: h }, children: [ - l && /* @__PURE__ */ i(Pt, { to: F, imagesCount: y }), + onTouchStart: U, + onTouchMove: X, + onTouchEnd: Z, + onMouseEnter: R, + onMouseLeave: Y, + className: A, + ref: F, + ...m, + children: /* @__PURE__ */ l("div", { className: T, children: /* @__PURE__ */ G(fe.Provider, { value: { active: v }, children: [ + d && /* @__PURE__ */ l(_e, { to: k, imagesCount: $ }), r, - o && /* @__PURE__ */ i(Ct, { move: O }) + i && /* @__PURE__ */ l(je, { move: _ }) ] }) }) } ); -}; -Ft.defaultProps = { fade: !1, interval: 5e3, touch: !0, keyboard: !1 }; -const ys = ({ +}, hs = ({ className: e, captionClassName: t, - children: s, - src: r, - alt: n, + children: n, + src: s, + alt: r, itemId: a, video: c, ...o }) => { - const { active: l } = ee(ue), u = J(!0), f = J(null), m = p("carousel-caption d-none d-md-block", t); - return x(() => { - if (u.current && l === a - 1) { - const d = f.current; - d == null || d.classList.add("active"); + const { active: i } = se(fe), d = K(!0), u = K(null), m = p("carousel-caption d-none d-md-block", t); + return I(() => { + if (d.current && i === a - 1) { + const f = u.current; + f == null || f.classList.add("active"); } - u.current = !1; - }, [l, a]), /* @__PURE__ */ V("div", { className: "carousel-item", ref: f, children: [ - c ? /* @__PURE__ */ i("video", { className: e, autoPlay: !0, loop: !0, muted: !0, ...o, children: /* @__PURE__ */ i("source", { src: r, type: "video/mp4" }) }) : /* @__PURE__ */ i("img", { className: e, src: r, alt: n, ...o }), - /* @__PURE__ */ i("div", { className: m, children: s }) + d.current = !1; + }, [i, a]), /* @__PURE__ */ G("div", { className: "carousel-item", ref: u, children: [ + c ? /* @__PURE__ */ l("video", { className: e, autoPlay: !0, loop: !0, muted: !0, ...o, children: /* @__PURE__ */ l("source", { src: s, type: "video/mp4" }) }) : /* @__PURE__ */ l("img", { className: e, src: s, alt: r, ...o }), + /* @__PURE__ */ l("div", { className: m, children: n }) ] }); -}, we = w.createContext({ +}, Ne = N.createContext({ activeItem: 0, setActiveItem: null, alwaysOpen: !1, initialActive: 0 -}), Wt = w.forwardRef( - ({ alwaysOpen: e, borderless: t, className: s, flush: r, initialActive: n, tag: a, children: c, onChange: o, ...l }, u) => { - const f = p("accordion", r && "accordion-flush", t && "accordion-borderless", s), [m, d] = B(n); - return x(() => { +}), ys = N.forwardRef( + ({ alwaysOpen: e, borderless: t, className: n, flush: s, initialActive: r = 0, tag: a = "div", children: c, onChange: o, ...i }, d) => { + const u = p("accordion", s && "accordion-flush", t && "accordion-borderless", n), [m, f] = w(r); + return I(() => { m && o && o(m); - }, [o, m]), /* @__PURE__ */ i(a, { className: f, ref: u, ...l, children: /* @__PURE__ */ i(we.Provider, { value: { activeItem: m, setActiveItem: d, alwaysOpen: e, initialActive: n }, children: c }) }); + }, [o, m]), /* @__PURE__ */ l(a, { className: u, ref: d, ...i, children: /* @__PURE__ */ l(Ne.Provider, { value: { activeItem: m, setActiveItem: f, alwaysOpen: e, initialActive: r }, children: c }) }); } -); -Wt.defaultProps = { tag: "div", initialActive: 0 }; -const Xt = w.forwardRef( +), Ns = N.forwardRef( ({ className: e, bodyClassName: t, - bodyStyle: s, - headerClassName: r, - collapseId: n, + bodyStyle: n, + headerClassName: s, + collapseId: r, headerTitle: a, headerStyle: c, btnClassName: o, - tag: l, - children: u, - ...f + tag: i = "div", + children: d, + ...u }, m) => { - const { activeItem: d, setActiveItem: b, alwaysOpen: g, initialActive: h } = ee(we), [v, y] = B(h), $ = p("accordion-item", e), M = p("accordion-header", r), C = p("accordion-body", t), N = p( + const { activeItem: f, setActiveItem: g, alwaysOpen: b, initialActive: h } = se(Ne), [v, D] = w(h), $ = p("accordion-item", e), B = p("accordion-header", s), x = p("accordion-body", t), y = p( "accordion-button", - g ? n !== v && "collapsed" : n !== d && "collapsed", + b ? r !== v && "collapsed" : r !== f && "collapsed", o - ), S = (I) => { - g ? y(I !== v ? I : 0) : b(I !== d ? I : 0); + ), P = (L) => { + b ? D(L !== v ? L : 0) : g(L !== f ? L : 0); }; - return /* @__PURE__ */ V(l, { className: $, ref: m, ...f, children: [ - /* @__PURE__ */ i("h2", { className: M, style: c, children: /* @__PURE__ */ i("button", { onClick: () => S(n), className: N, type: "button", children: a }) }), - /* @__PURE__ */ i( - he, + return /* @__PURE__ */ G(i, { className: $, ref: m, ...u, children: [ + /* @__PURE__ */ l("h2", { className: B, style: c, children: /* @__PURE__ */ l("button", { onClick: () => P(r), className: y, type: "button", children: a }) }), + /* @__PURE__ */ l( + xe, { - id: n.toString(), - show: g ? v === n : d === n, - children: /* @__PURE__ */ i("div", { className: C, style: s, children: u }) + id: r.toString(), + show: b ? v === r : f === r, + children: /* @__PURE__ */ l("div", { className: x, style: n, children: d }) } ) ] }); } -); -Xt.defaultProps = { tag: "div" }; -const _t = ({ +), ws = ({ className: e, size: t, - contrast: s, - value: r, - defaultValue: n, + contrast: n, + value: s, + defaultValue: r, id: a, labelClass: c, wrapperClass: o, - wrapperStyle: l, - wrapperTag: u, - label: f, + wrapperStyle: i, + wrapperTag: d = "div", + label: u, onChange: m, - children: d, - labelRef: b, - labelStyle: g, + children: f, + labelRef: g, + labelStyle: b, inputRef: h, onBlur: v, - readonly: y, + readonly: D = !1, ...$ }) => { - var Y; - const M = J(null), C = J(null), N = b || M, S = h || C, [I, X] = B(r || n), [A, T] = B(0), [E, R] = B( - r !== void 0 && r.length > 0 || (n !== void 0 && n.length) > 0 - ), W = p("form-outline", s && "form-white", o), D = p("form-control", E && "active", t && `form-control-${t}`, e), F = p("form-label", c); - x(() => { - var _; - N.current && ((_ = N.current) == null ? void 0 : _.clientWidth) !== 0 && T(N.current.clientWidth * 0.8 + 8); - }, [N, (Y = N.current) == null ? void 0 : Y.clientWidth]); - const O = () => { - N.current && T(N.current.clientWidth * 0.8 + 8); + var V; + const B = K(null), x = K(null), y = g || B, P = h || x, [L, F] = w(s || r), [A, T] = w(0), [E, R] = w( + s !== void 0 && s.length > 0 || r !== void 0 && r.length > 0 + ), W = p("form-outline", n && "form-white", o), M = p("form-control", E && "active", t && `form-control-${t}`, e), S = p("form-label", c); + I(() => { + var Y; + y.current && ((Y = y.current) == null ? void 0 : Y.clientWidth) !== 0 && T(y.current.clientWidth * 0.8 + 8); + }, [y, (V = y.current) == null ? void 0 : V.clientWidth]); + const j = () => { + y.current && T(y.current.clientWidth * 0.8 + 8); }; - x(() => { + I(() => { + s !== void 0 && (s.length > 0 ? R(!0) : R(!1)); + }, [s]), I(() => { r !== void 0 && (r.length > 0 ? R(!0) : R(!1)); - }, [r]), x(() => { - n !== void 0 && (n.length > 0 ? R(!0) : R(!1)); - }, [n]); - const L = (_) => { - X(_.currentTarget.value), m && m(_); - }, K = G( - (_) => { - I !== void 0 && I.length > 0 || r !== void 0 && r.length > 0 ? R(!0) : R(!1), v && v(_); + }, [r]); + const k = (Y) => { + F(Y.currentTarget.value), m && m(Y); + }, _ = q( + (Y) => { + L !== void 0 && L.length > 0 || s !== void 0 && s.length > 0 ? R(!0) : R(!1), v && v(Y); }, - [I, r, v] + [L, s, v] ); - return /* @__PURE__ */ V(u, { className: W, style: { ...l }, children: [ - /* @__PURE__ */ i( + return /* @__PURE__ */ G(d, { className: W, style: { ...i }, children: [ + /* @__PURE__ */ l( "textarea", { - readOnly: y, - className: D, - onBlur: K, - onChange: L, - onFocus: O, - defaultValue: n, - value: r, + readOnly: D, + className: M, + onBlur: _, + onChange: k, + onFocus: j, + defaultValue: r, + value: s, id: a, - ref: S, + ref: P, ...$ } ), - f && /* @__PURE__ */ i("label", { className: F, style: g, htmlFor: a, ref: N, children: f }), - /* @__PURE__ */ V("div", { className: "form-notch", children: [ - /* @__PURE__ */ i("div", { className: "form-notch-leading" }), - /* @__PURE__ */ i("div", { className: "form-notch-middle", style: { width: A } }), - /* @__PURE__ */ i("div", { className: "form-notch-trailing" }) + u && /* @__PURE__ */ l("label", { className: S, style: b, htmlFor: a, ref: y, children: u }), + /* @__PURE__ */ G("div", { className: "form-notch", children: [ + /* @__PURE__ */ l("div", { className: "form-notch-leading" }), + /* @__PURE__ */ l("div", { className: "form-notch-middle", style: { width: A } }), + /* @__PURE__ */ l("div", { className: "form-notch-trailing" }) ] }), - d + f ] }); -}; -_t.defaultProps = { wrapperTag: "div", readonly: !1 }; -const jt = ({ +}, Ts = ({ children: e, invalid: t, - feedback: s, - tooltip: r, - tag: n, + feedback: n = "Looks good!", + tooltip: s, + tag: r = "div", ...a }) => { - const [c, o] = B(null), l = J(null), u = p( - t ? `invalid-${r ? "tooltip" : "feedback"}` : `valid-${r ? "tooltip" : "feedback"}` + const [c, o] = w(null), i = K(null), d = p( + t ? `invalid-${s ? "tooltip" : "feedback"}` : `valid-${s ? "tooltip" : "feedback"}` ); - return x(() => { - var m, d; - const f = (d = (m = l.current) == null ? void 0 : m.querySelector("input, textarea")) == null ? void 0 : d.parentElement; - f && o(f); - }, []), /* @__PURE__ */ V(n, { ref: l, ...a, children: [ - c && ge(/* @__PURE__ */ i("div", { className: u, children: s }), c), + return I(() => { + var m, f; + const u = (f = (m = i.current) == null ? void 0 : m.querySelector("input, textarea")) == null ? void 0 : f.parentElement; + u && o(u); + }, []), /* @__PURE__ */ G(r, { ref: i, ...a, children: [ + c && he(/* @__PURE__ */ l("div", { className: d, children: n }), c), e ] }); }; -jt.defaultProps = { - tag: "div", - feedback: "Looks good!" -}; export { - Wt as MDBAccordion, - Xt as MDBAccordionItem, - Pe as MDBBadge, - Ht as MDBBreadcrumb, - Ue as MDBBreadcrumbItem, - ae as MDBBtn, - xe as MDBBtnGroup, - ke as MDBCard, - We as MDBCardBody, - Xe as MDBCardFooter, - je as MDBCardGroup, - Oe as MDBCardHeader, - Qt as MDBCardImage, - Zt as MDBCardLink, - _e as MDBCardOverlay, - Ae as MDBCardSubTitle, - Fe as MDBCardText, - Se as MDBCardTitle, - Ft as MDBCarousel, - ys as MDBCarouselItem, - os as MDBCheckbox, - Ee as MDBCol, - he as MDBCollapse, - $e as MDBContainer, - ls as MDBDropdown, - is as MDBDropdownItem, - us as MDBDropdownMenu, - ds as MDBDropdownToggle, - gs as MDBFile, - es as MDBFooter, - zt as MDBIcon, - nt as MDBInput, - Mt as MDBInputGroup, - Ye as MDBListGroup, - Ve as MDBListGroupItem, - fs as MDBModal, - Nt as MDBModalBody, - vt as MDBModalContent, - bt as MDBModalDialog, - wt as MDBModalFooter, - ht as MDBModalHeader, - yt as MDBModalTitle, - Qe as MDBNavbar, - ze as MDBNavbarBrand, - He as MDBNavbarItem, - Ze as MDBNavbarLink, - et as MDBNavbarNav, - tt as MDBNavbarToggler, - ts as MDBPagination, - ss as MDBPaginationItem, - st as MDBPaginationLink, - mt as MDBPopover, - pt as MDBPopoverBody, - gt as MDBPopoverHeader, - rt as MDBProgress, - ve as MDBProgressBar, - cs as MDBRadio, - Dt as MDBRange, - be as MDBRipple, - Ge as MDBRow, - ms as MDBScrollspy, - Tt as MDBScrollspyLink, - Bt as MDBScrollspySubList, - Le as MDBSpinner, - ps as MDBSwitch, - rs as MDBTable, - as as MDBTableBody, - ns as MDBTableHead, - bs as MDBTabs, - $t as MDBTabsContent, - vs as MDBTabsItem, - hs as MDBTabsLink, - Et as MDBTabsPane, - _t as MDBTextArea, - qe as MDBTooltip, - Ke as MDBTypography, - Rt as MDBValidation, - jt as MDBValidationItem + ys as MDBAccordion, + Ns as MDBAccordionItem, + at as MDBBadge, + Mt as MDBBreadcrumb, + $t as MDBBreadcrumbItem, + ie as MDBBtn, + ot as MDBBtnGroup, + lt as MDBCard, + mt as MDBCardBody, + pt as MDBCardFooter, + ht as MDBCardGroup, + it as MDBCardHeader, + gt as MDBCardImage, + vt as MDBCardLink, + bt as MDBCardOverlay, + ut as MDBCardSubTitle, + ft as MDBCardText, + dt as MDBCardTitle, + vs as MDBCarousel, + hs as MDBCarouselItem, + jt as MDBCheckbox, + rt as MDBCol, + xe as MDBCollapse, + nt as MDBContainer, + Vt as MDBDropdown, + qt as MDBDropdownItem, + Gt as MDBDropdownMenu, + Kt as MDBDropdownToggle, + is as MDBFile, + kt as MDBFooter, + Bt as MDBIcon, + _t as MDBInput, + us as MDBInputGroup, + yt as MDBListGroup, + Nt as MDBListGroupItem, + Zt as MDBModal, + ss as MDBModalBody, + Ht as MDBModalContent, + zt as MDBModalDialog, + ns as MDBModalFooter, + es as MDBModalHeader, + ts as MDBModalTitle, + Rt as MDBNavbar, + Ct as MDBNavbarBrand, + It as MDBNavbarItem, + Et as MDBNavbarLink, + xt as MDBNavbarNav, + Lt as MDBNavbarToggler, + Ot as MDBPagination, + Pt as MDBPaginationItem, + At as MDBPaginationLink, + Ut as MDBPopover, + Jt as MDBPopoverBody, + Qt as MDBPopoverHeader, + Xt as MDBProgress, + Ce as MDBProgressBar, + Yt as MDBRadio, + ls as MDBRange, + Re as MDBRipple, + Tt as MDBRow, + rs as MDBScrollspy, + as as MDBScrollspyLink, + os as MDBScrollspySubList, + ct as MDBSpinner, + cs as MDBSwitch, + St as MDBTable, + Wt as MDBTableBody, + Ft as MDBTableHead, + fs as MDBTabs, + gs as MDBTabsContent, + ms as MDBTabsItem, + ps as MDBTabsLink, + bs as MDBTabsPane, + ws as MDBTextArea, + wt as MDBTooltip, + Dt as MDBTypography, + ds as MDBValidation, + Ts as MDBValidationItem }; diff --git a/dist/mdb-react-ui-kit.js b/dist/mdb-react-ui-kit.js index 5fd877ba..a8a9f0d3 100755 --- a/dist/mdb-react-ui-kit.js +++ b/dist/mdb-react-ui-kit.js @@ -1,2 +1,2 @@ -(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".dropdown-menu .active{color:#16181b;background-color:#eee}.dropdown-menu [data-active=true] a.dropdown-item,.dropdown-menu .dropdown-item:focus,.dropdown-menu li:focus .dropdown-item :not(.disabled){color:#16181b;background-color:#eee}.dropdown-menu li:focus{outline:none}.dropdown-menu.dropdown-menu-dark [data-active=true] a.dropdown-item,.dropdown-menu.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu.dropdown-menu-dark li:focus .dropdown-item{color:#fff;background-color:#1266f1}.btn-group.dropstart>.dropdown-menu{right:0!important}")),document.head.appendChild(o)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})(); -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),n=require("react"),g=require("clsx"),U=require("react-dom"),te=require("react-popper"),it=require("@popperjs/core"),ue=n.forwardRef(({breakpoint:e,fluid:t,children:s,className:a,tag:r,...o},i)=>{const l=g(`${t?"container-fluid":`container${e?"-"+e:""}`}`,a);return c.jsx(r,{className:l,...o,ref:i,children:s})});ue.defaultProps={tag:"div"};const de=n.forwardRef(({center:e,children:t,className:s,end:a,lg:r,md:o,offsetLg:i,offsetMd:l,offsetSm:u,order:d,size:m,sm:p,start:f,tag:v,xl:b,xxl:x,xs:h,...y},w)=>{const j=g(m&&`col-${m}`,h&&`col-xs-${h}`,p&&`col-sm-${p}`,o&&`col-md-${o}`,r&&`col-lg-${r}`,b&&`col-xl-${b}`,x&&`col-xxl-${x}`,!m&&!h&&!p&&!o&&!r&&!b&&!x?"col":"",d&&`order-${d}`,f&&"align-self-start",e&&"align-self-center",a&&"align-self-end",u&&`offset-sm-${u}`,l&&`offset-md-${l}`,i&&`offset-lg-${i}`,s);return c.jsx(v,{className:j,ref:w,...y,children:t})});de.defaultProps={tag:"div"};const fe=n.forwardRef(({className:e,color:t,pill:s,light:a,dot:r,tag:o,children:i,notification:l,...u},d)=>{const m=g("badge",a?t&&`badge-${t}`:t&&`bg-${t}`,r&&"badge-dot",s&&"rounded-pill",l&&"badge-notification",e);return c.jsx(o,{className:m,ref:d,...u,children:i})});fe.defaultProps={tag:"span",color:"primary"};const ut=({...e})=>{const[t,s]=n.useState(!1),a=g("ripple-wave",t&&"active");return n.useEffect(()=>{const r=setTimeout(()=>{s(!0)},50);return()=>{clearTimeout(r)}},[]),c.jsx("div",{className:a,...e})},dt=(...e)=>{const t=n.useRef();return n.useEffect(()=>{e.forEach(s=>{s&&(typeof s=="function"?s(t.current):s.current=t.current)})},[e]),t},se=n.forwardRef(({className:e,rippleTag:t,rippleCentered:s,rippleDuration:a,rippleUnbound:r,rippleRadius:o,rippleColor:i,children:l,onMouseDown:u,...d},m)=>{const p=n.useRef(null),f=dt(m,p),v="rgba({{color}}, 0.2) 0, rgba({{color}}, 0.3) 40%, rgba({{color}}, 0.4) 50%, rgba({{color}}, 0.5) 60%, rgba({{color}}, 0) 70%",b=[0,0,0],x=["primary","secondary","success","danger","warning","info","light","dark"],[h,y]=n.useState([]),[w,j]=n.useState(!1),T=g("ripple","ripple-surface",r&&"ripple-surface-unbound",w&&`ripple-surface-${i}`,e),B=()=>{if(x.find(C=>C===(i==null?void 0:i.toLowerCase())))return j(!0);{const C=I(i).join(",");return`radial-gradient(circle, ${v.split("{{color}}").join(`${C}`)})`}},I=D=>{const C=M=>(M.length<7&&(M=`#${M[1]}${M[1]}${M[2]}${M[2]}${M[3]}${M[3]}`),[parseInt(M.substr(1,2),16),parseInt(M.substr(3,2),16),parseInt(M.substr(5,2),16)]),N=M=>{const L=document.body.appendChild(document.createElement("fictum")),S="rgb(1, 2, 3)";return L.style.color=S,L.style.color!==S||(L.style.color=M,L.style.color===S||L.style.color==="")?b:(M=getComputedStyle(L).color,document.body.removeChild(L),M)},F=M=>(M=M.match(/[.\d]+/g).map(L=>+Number(L)),M.length=3,M);return D.toLowerCase()==="transparent"?b:D[0]==="#"?C(D):(D.indexOf("rgb")===-1&&(D=N(D)),D.indexOf("rgb")===0?F(D):b)},R=D=>{const{offsetX:C,offsetY:N,height:F,width:M}=D,L=N<=F/2,S=C<=M/2,P=(q,E)=>Math.sqrt(q**2+E**2),_=N===F/2&&C===M/2,X={first:L===!0&&S===!1,second:L===!0&&S===!0,third:L===!1&&S===!0,fourth:L===!1&&S===!1},A={topLeft:P(C,N),topRight:P(M-C,N),bottomLeft:P(C,F-N),bottomRight:P(M-C,F-N)};let W=0;return _||X.fourth?W=A.topLeft:X.third?W=A.topRight:X.second?W=A.bottomRight:X.first&&(W=A.bottomLeft),W*2},O=D=>{var W;const C=(W=f.current)==null?void 0:W.getBoundingClientRect(),N=D.clientX-C.left,F=D.clientY-C.top,M=C.height,L=C.width,S={offsetX:s?M/2:N,offsetY:s?L/2:F,height:M,width:L},P={delay:a&&a*.5,duration:a&&a-a*.5},_=R(S),X=o||_/2,A={left:s?`${L/2-X}px`:`${N-X}px`,top:s?`${M/2-X}px`:`${F-X}px`,height:o?`${o*2}px`:`${_}px`,width:o?`${o*2}px`:`${_}px`,transitionDelay:`0s, ${P.delay}ms`,transitionDuration:`${a}ms, ${P.duration}ms`};return w?A:{...A,backgroundImage:`${B()}`}},k=D=>{const C=O(D),N=h.concat(C);y(N),u&&u(D)};return n.useEffect(()=>{const D=setTimeout(()=>{h.length>0&&y(h.splice(1,h.length-1))},a);return()=>{clearTimeout(D)}},[a,h]),c.jsxs(t,{className:T,onMouseDown:D=>k(D),ref:f,...d,children:[l,h.map((D,C)=>c.jsx(ut,{style:D},C))]})});se.defaultProps={rippleTag:"div",rippleDuration:500,rippleRadius:0,rippleColor:"dark"};const Q=n.forwardRef(({className:e,color:t,outline:s,children:a,rounded:r,disabled:o,floating:i,size:l,href:u,block:d,active:m,toggle:p,noRipple:f,tag:v,...b},x)=>{const[h,y]=n.useState(m||!1);let w;const j=t&&["light","link"].includes(t)||s?"dark":"light";t!=="none"?s?t?w=`btn-outline-${t}`:w="btn-outline-primary":t?w=`btn-${t}`:w="btn-primary":w="";const T=g(t!=="none"&&"btn",w,r&&"btn-rounded",i&&"btn-floating",l&&`btn-${l}`,`${(u||v!=="button")&&o?"disabled":""}`,d&&"btn-block",h&&"active",e);return u&&v!=="a"&&(v="a"),["hr","img","input"].includes(v)||f?c.jsx(v,{className:T,onClick:p?()=>{y(!h)}:void 0,disabled:o&&v==="button"?!0:void 0,href:u,ref:x,...b,children:a}):c.jsx(se,{rippleTag:v,rippleColor:j,className:T,onClick:p?()=>{y(!h)}:void 0,disabled:o&&v==="button"?!0:void 0,href:u,ref:x,...b,children:a})});Q.defaultProps={tag:"button",role:"button",color:"primary"};const me=n.forwardRef(({className:e,children:t,shadow:s,toolbar:a,size:r,vertical:o,tag:i,...l},u)=>{let d;a?d="btn-toolbar":o?d="btn-group-vertical":d="btn-group";const m=g(d,s&&`shadow-${s}`,r&&`btn-group-${r}`,e);return c.jsx(i,{className:m,ref:u,...l,children:t})});me.defaultProps={tag:"div",role:"group"};const pe=n.forwardRef(({className:e,children:t,tag:s,color:a,grow:r,size:o,...i},l)=>{const u=g(`${r?"spinner-grow":"spinner-border"}`,a&&`text-${a}`,`${o?r?"spinner-grow-"+o:"spinner-border-"+o:""}`,e);return c.jsx(s,{className:u,ref:l,...i,children:t})});pe.defaultProps={tag:"div"};const ge=n.forwardRef(({className:e,children:t,border:s,background:a,tag:r,shadow:o,alignment:i,...l},u)=>{const d=g("card",s&&`border border-${s}`,a&&`bg-${a}`,o&&`shadow-${o}`,i&&`text-${i}`,e);return c.jsx(r,{className:d,ref:u,...l,children:t})});ge.defaultProps={tag:"div"};const be=n.forwardRef(({className:e,children:t,border:s,background:a,tag:r,...o},i)=>{const l=g("card-header",s&&`border-${s}`,a&&`bg-${a}`,e);return c.jsx(r,{className:l,...o,ref:i,children:t})});be.defaultProps={tag:"div"};const ve=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("card-subtitle",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});ve.defaultProps={tag:"p"};const xe=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("card-title",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});xe.defaultProps={tag:"h5"};const he=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("card-text",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});he.defaultProps={tag:"p"};const ye=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("card-body",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});ye.defaultProps={tag:"div"};const Be=n.forwardRef(({className:e,children:t,border:s,background:a,tag:r,...o},i)=>{const l=g("card-footer",s&&`border-${s}`,a&&`bg-${a}`,e);return c.jsx(r,{className:l,...o,ref:i,children:t})});Be.defaultProps={tag:"div"};const ft=({className:e,children:t,overlay:s,position:a,fluid:r,...o})=>{const i=g(a&&`card-img-${a}`,r&&"img-fluid",s&&"card-img",e);return c.jsx("img",{className:i,...o,children:t})},De=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("card-img-overlay",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});De.defaultProps={tag:"div"};const mt=({className:e,children:t,...s})=>{const a=g("card-link",e);return c.jsx("a",{className:a,...s,children:t})},Me=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("card-group",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});Me.defaultProps={tag:"div"};const je=n.forwardRef(({className:e,tag:t,horizontal:s,horizontalSize:a,light:r,numbered:o,children:i,small:l,...u},d)=>{const m=g("list-group",s&&(a?`list-group-horizontal-${a}`:"list-group-horizontal"),r&&"list-group-light",o&&"list-group-numbered",l&&"list-group-small",e);return c.jsx(t,{className:m,ref:d,...u,children:i})});je.defaultProps={tag:"ul"};const Ne=n.forwardRef(({className:e,tag:t,active:s,disabled:a,action:r,color:o,children:i,noBorders:l,...u},d)=>{const m=t==="button",p=g("list-group-item",s&&"active",a&&!m&&"disabled",r&&"list-group-item-action",o&&`list-group-item-${o}`,l&&"border-0",e);return c.jsx(t,{className:p,disabled:m&&a,ref:d,...u,children:i})});Ne.defaultProps={tag:"li"};const we=({className:e,children:t,disableMouseDown:s,tag:a,tooltipTag:r,options:o,placement:i,title:l,wrapperProps:u,wrapperClass:d,onShow:m,onHide:p,onMouseEnter:f,onMouseLeave:v,...b})=>{const[x,h]=n.useState(null),[y,w]=n.useState(null),[j,T]=n.useState(!1),[B,I]=n.useState(!1),[R,O]=n.useState(!1),[k,D]=n.useState(!1),C=g("tooltip",R&&"show","fade",`bs-tooltip-${i}`,e),{styles:N,attributes:F}=te.usePopper(x,y,{placement:i,...o});n.useEffect(()=>{let P,_;return j||B?(D(!0),P=setTimeout(()=>{O(!0)},4)):(O(!1),_=setTimeout(()=>{D(!1)},300)),()=>{clearTimeout(P),clearTimeout(_)}},[j,B]);const M=P=>{m==null||m(P),!P.defaultPrevented&&T(!0),f==null||f(P)},L=P=>{p==null||p(P),!P.defaultPrevented&&T(!1),v==null||v(P)},S=n.useCallback(P=>{P.target===x?I(!0):I(!1)},[x]);return n.useEffect(()=>{if(!s)return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[S,s]),c.jsxs(c.Fragment,{children:[c.jsx(a,{className:d,onMouseEnter:M,onMouseLeave:L,ref:h,...u,children:t}),k&&U.createPortal(c.jsx(r,{ref:w,className:C,style:N.popper,...F.popper,role:"tooltip",...b,children:c.jsx("div",{className:"tooltip-inner",children:l})}),document.body)]})};we.defaultProps={tag:Q,tooltipTag:"div",placement:"top"};const Ce=n.forwardRef(({around:e,between:t,bottom:s,center:a,children:r,className:o,evenly:i,end:l,middle:u,start:d,tag:m,top:p,...f},v)=>{const b=g("row",e&&"justify-content-around",t&&"justify-content-between",s&&"align-self-end",a&&"justify-content-center",i&&"justifty-content-evenly",l&&"justify-content-end",u&&"align-self-center",d&&"justify-content-start",p&&"align-self-start",o);return c.jsx(m,{className:b,...f,ref:v,children:r})});Ce.defaultProps={tag:"div"};const pt=({animate:e,className:t,icon:s,fab:a,fas:r,fal:o,far:i,flag:l,spin:u,fixed:d,flip:m,list:p,size:f,pull:v,pulse:b,color:x,border:h,rotate:y,inverse:w,stack:j,iconType:T,children:B,...I})=>{let R;l?R="flag":a?R="fab":r?R="fas":i?R="far":o?R="fal":R="fa";const O=g(T?`fa-${T}`:R,e&&`fa-${e}`,l?`flag-${l}`:s&&`fa-${s}`,f&&`fa-${f}`,x&&`text-${x}`,h&&"fa-border",y&&`fa-rotate-${y}`,v&&`fa-pull-${v}`,u&&!e&&"fa-spin",p&&"fa-li",d&&"fa-fw",b&&!e&&"fa-pulse",w&&"fa-inverse",m&&`fa-flip-${m}`,j&&`fa-stack-${j}`,t);return c.jsx("i",{className:O,...I,children:B})},Ee=n.forwardRef(({className:e,children:t,tag:s,variant:a,color:r,blockquote:o,note:i,noteColor:l,listUnStyled:u,listInLine:d,...m},p)=>{const f=g(a&&a,o&&"blockquote",i&&"note",r&&`text-${r}`,l&&`note-${l}`,u&&"list-unstyled",d&&"list-inline",e);return o&&(s="blockquote"),(u||d)&&(s="ul"),c.jsx(s,{className:f,ref:p,...m,children:t})});Ee.defaultProps={tag:"p"};const gt=n.forwardRef(({className:e,color:t,uppercase:s,bold:a,children:r,...o},i)=>{const l=g("breadcrumb",a&&"font-weight-bold",t&&`text-${t}`,s&&"text-uppercase",e);return c.jsx("nav",{"aria-label":"breadcrumb",children:c.jsx("ol",{className:l,ref:i,...o,children:r})})}),Te=n.forwardRef(({className:e,active:t,current:s,children:a,...r},o)=>{const i=g("breadcrumb-item",t&&"active",e);return c.jsx("li",{className:i,ref:o,"aria-current":t&&s,...r,children:a})});Te.defaultProps={current:"page"};const bt=e=>{if(e!==!1)return`navbar-expand-${e}`},Re=n.forwardRef(({className:e,children:t,light:s,dark:a,scrolling:r,fixed:o,sticky:i,scrollingNavbarOffset:l,color:u,transparent:d,expand:m,tag:p,bgColor:f,...v},b)=>{const[x,h]=n.useState(!1),y=g({"navbar-light":s,"navbar-dark":a,"scrolling-navbar":r||l,"top-nav-collapse":x,[`text-${u}`]:u&&d?x:u},o&&`fixed-${o}`,i&&"sticky-top","navbar",m&&bt(m),f&&`bg-${f}`,e),w=n.useCallback(()=>{l&&window.pageYOffset>l?h(!0):h(!1)},[l]);return n.useEffect(()=>((r||l)&&window.addEventListener("scroll",w),()=>{window.removeEventListener("scroll",w)}),[w,r,l]),c.jsx(p,{className:y,role:"navigation",...v,ref:b,children:t})});Re.defaultProps={tag:"nav"};const Pe=n.forwardRef(({children:e,className:t,disabled:s,active:a,tag:r,...o},i)=>{const l=g("nav-link",s?"disabled":a?"active":"",t);return c.jsx(r,{"data-test":"nav-link",className:l,style:{cursor:"pointer"},ref:i,...o,children:e})});Pe.defaultProps={tag:"a",active:!1,className:"",disabled:!1};const $e=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("navbar-brand",e);return c.jsx(s,{className:o,ref:r,...a,children:t})});$e.defaultProps={tag:"a"};const ke=n.forwardRef(({children:e,className:t,active:s,text:a,tag:r,...o},i)=>{const l=g("nav-item",s&&"active",a&&"navbar-text",t);return c.jsx(r,{...o,className:l,ref:i,children:e})});ke.defaultProps={tag:"li"};const Se=n.forwardRef(({children:e,className:t,right:s,fullWidth:a,left:r,tag:o,...i},l)=>{const u=g("navbar-nav",a&&"w-100",s&&"ms-auto",r&&"me-auto",t);return c.jsx(o,{className:u,ref:l,...i,children:e})});Se.defaultProps={tag:"ul",fullWidth:!0};const Ie=n.forwardRef(({children:e,className:t,tag:s,...a},r)=>{const o=g("navbar-toggler",t);return c.jsx(s,{...a,className:o,ref:r,children:e})});Ie.defaultProps={tag:"button"};const vt=n.forwardRef(({children:e,bgColor:t,color:s,className:a,...r},o)=>{const i=g(t&&`bg-${t}`,s&&`text-${s}`,a);return c.jsx("footer",{className:i,...r,ref:o,children:e})}),xt=n.forwardRef(({children:e,size:t,circle:s,center:a,end:r,start:o,className:i,...l},u)=>{const d=g("pagination",a&&"justify-content-center",s&&"pagination-circle",r&&"justify-content-end",t&&`pagination-${t}`,o&&"justify-content-start",i);return c.jsx("ul",{className:d,...l,ref:u,children:e})}),Le=n.forwardRef(({children:e,className:t,tag:s,...a},r)=>{const o=g("page-link",t);return c.jsx(s,{className:o,...a,ref:r,children:e})});Le.defaultProps={tag:"a"};const ht=n.forwardRef(({children:e,className:t,active:s,disabled:a,...r},o)=>{const i=g("page-item",s&&"active",a&&"disabled",t);return c.jsx("li",{className:i,...r,ref:o,children:e})}),yt=({className:e,classNameResponsive:t,responsive:s,align:a,borderColor:r,bordered:o,borderless:i,children:l,color:u,hover:d,small:m,striped:p,...f})=>{const v=g("table",a&&`align-${a}`,r&&`border-${r}`,o&&"table-bordered",i&&"table-borderless",u&&`table-${u}`,d&&"table-hover",m&&"table-sm",p&&"table-striped",e),b=n.useMemo(()=>c.jsx("table",{className:v,...f,children:l}),[l,v,f]);if(s){const x=g(typeof s=="string"?`table-responsive-${s}`:"table-responsive",t);return c.jsx("div",{className:x,children:b})}else return b},Bt=({className:e,children:t,dark:s,light:a,...r})=>{const o=g(s&&"table-dark",a&&"table-light",e);return c.jsx("thead",{className:o,...r,children:t})},Dt=({className:e,children:t,...s})=>{const a=g(e);return c.jsx("tbody",{className:a,...s,children:t})},ae=n.forwardRef(({animated:e,children:t,className:s,style:a,tag:r,valuenow:o,valuemax:i,striped:l,bgColor:u,valuemin:d,width:m,...p},f)=>{const v=g("progress-bar",u&&`bg-${u}`,l&&"progress-bar-striped",e&&"progress-bar-animated",s),b={width:`${m}%`,...a};return c.jsx(r,{className:v,style:b,ref:f,role:"progressbar",...p,"aria-valuenow":Number(m)??o,"aria-valuemin":Number(d),"aria-valuemax":Number(i),children:t})});ae.defaultProps={tag:"div"};const Oe=n.forwardRef(({className:e,children:t,tag:s,height:a,style:r,...o},i)=>{const l=g("progress",e),u={height:`${a}px`,...r};return c.jsx(s,{className:l,ref:i,style:u,...o,children:n.Children.map(t,d=>{if(!n.isValidElement(d)||d.type!==ae){console.error("Progress component only allows ProgressBar as child");return}else return d})})});Oe.defaultProps={tag:"div"};const Fe=n.forwardRef(({className:e,size:t,contrast:s,value:a,defaultValue:r,id:o,labelClass:i,wrapperClass:l,wrapperStyle:u,wrapperTag:d,label:m,onChange:p,children:f,labelRef:v,labelStyle:b,type:x,onBlur:h,readonly:y,...w},j)=>{var X,A;const[T,B]=n.useState(a||r),[I,R]=n.useState(0),[O,k]=n.useState(!1),D=n.useRef(null);n.useImperativeHandle(j,()=>D.current);const C=n.useRef(null),N=v||C,F=g("form-outline",s&&"form-white",l),M=g("form-control",O&&"active",x==="date"&&"active",t&&`form-control-${t}`,e),L=g("form-label",i);n.useEffect(()=>{if(!D.current)return;const{value:W}=D.current;W!=""?k(!0):k(!1)},[(X=D.current)==null?void 0:X.value]),n.useEffect(()=>{a!==void 0&&(a!=""?k(!0):k(!1))},[a]),n.useEffect(()=>{r!==void 0&&(r!=""?k(!0):k(!1))},[r]);const S=n.useCallback(()=>{var W;(W=N.current)!=null&&W.clientWidth&&R(N.current.clientWidth*.8+8)},[N]);n.useEffect(()=>{S()},[(A=N.current)==null?void 0:A.clientWidth,S]);const P=W=>{B(W.target.value),p==null||p(W)},_=n.useCallback(W=>{D.current&&(T!==void 0&&T!=""||a!==void 0&&a!=""||D.current.value!=""?k(!0):k(!1),h&&h(W))},[T,a,h]);return c.jsxs(d,{className:F,style:u,children:[c.jsx("input",{type:x,readOnly:y,className:M,onBlur:_,onChange:P,onFocus:S,value:a,defaultValue:r,id:o,ref:D,...w}),m&&c.jsx("label",{className:L,style:b,htmlFor:o,ref:N,children:m}),c.jsxs("div",{className:"form-notch",children:[c.jsx("div",{className:"form-notch-leading"}),c.jsx("div",{className:"form-notch-middle",style:{width:I}}),c.jsx("div",{className:"form-notch-trailing"})]}),f]})});Fe.defaultProps={wrapperTag:"div",readonly:!1};const H=({className:e,inputRef:t,labelClass:s,wrapperClass:a,labelStyle:r,wrapperTag:o,wrapperStyle:i,label:l,inline:u,btn:d,id:m,btnColor:p,disableWrapper:f,toggleSwitch:v,...b})=>{let x="form-check-input",h="form-check-label";d&&(x="btn-check",p?h=`btn btn-${p}`:h="btn btn-primary");const y=g(l&&!d&&"form-check",u&&!d&&"form-check-inline",v&&"form-switch",a),w=g(x,e),j=g(h,s),T=c.jsxs(c.Fragment,{children:[c.jsx("input",{className:w,id:m,ref:t,...b}),l&&c.jsx("label",{className:j,style:r,htmlFor:m,children:l})]});return c.jsx(c.Fragment,{children:f?T:c.jsx(o,{style:i,className:y,children:T})})};H.defaultProps={wrapperTag:"div"};const Mt=({...e})=>c.jsx(H,{type:"checkbox",...e}),jt=({...e})=>c.jsx(H,{type:"radio",...e}),re=({className:e,children:t,show:s=!1,id:a,navbar:r,tag:o,collapseRef:i,style:l,onShow:u,onHide:d,...m})=>{const[p,f]=n.useState(!1),[v,b]=n.useState(void 0),[x,h]=n.useState(!1),y=g(x?"collapsing":"collapse",!x&&p&&"show",r&&"navbar-collapse",e),w=n.useRef(null),j=i??w,T=n.useCallback(()=>{p&&b(void 0)},[p]);return n.useEffect(()=>{var B;v===void 0&&p&&b((B=j==null?void 0:j.current)==null?void 0:B.scrollHeight)},[v,p,j]),n.useEffect(()=>{p!==s&&(s?u==null||u():d==null||d(),f(s)),p&&h(!0);const B=setTimeout(()=>{h(!1)},350);return()=>{clearTimeout(B)}},[s,p,u,d]),n.useEffect(()=>{var B;b(p?(B=j==null?void 0:j.current)==null?void 0:B.scrollHeight:0)},[p,j]),n.useEffect(()=>(window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T)}),[T]),c.jsx(o,{style:{height:v,...l},id:a,className:y,...m,ref:j,children:t})};re.defaultProps={tag:"div"};const Ae=n.createContext(null),Nt=({children:e,isOpen:t=!1,options:s,animation:a=!0,dropup:r,dropright:o,dropleft:i,onHide:l,onShow:u})=>{const[d,m]=n.useState(t),[p,f]=n.useState(null),[v,b]=n.useState(null),[x,h]=n.useState(-1);return c.jsx(Ae.Provider,{value:{animation:a,activeIndex:x,isOpenState:d,setReferenceElement:f,setPopperElement:b,setActiveIndex:h,popperElement:v,setIsOpenState:m,referenceElement:p,onHide:l,onShow:u,dropup:r,options:s,dropright:o,dropleft:i},children:e})},wt=e=>e instanceof HTMLElement,Ct=e=>e instanceof Node,J=()=>{const e=n.useContext(Ae);if(!e)throw new Error("Missing context data");return e},Et=()=>{const{isOpenState:e,setIsOpenState:t,setActiveIndex:s,popperElement:a,referenceElement:r,onHide:o}=J(),i=n.useCallback(l=>{o==null||o(l),!(!e||!Ct(l.target)||a&&a.contains(l.target)||r&&r.contains(l.target)||l.defaultPrevented)&&(t(!1),setTimeout(()=>s(-1),300))},[e,t,s,a,r,o]);n.useEffect(()=>(document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)),[i])},Tt=({className:e,tag:t="div",group:s,children:a,dropup:r,dropright:o,dropleft:i,...l})=>{Et();const u=g(s?"btn-group":"dropdown",r&&"dropup",o&&"dropend",i&&"dropstart",e);return c.jsx(t,{className:u,...l,children:a})},Rt=({animation:e,onHide:t,onShow:s,...a})=>c.jsx(Nt,{animation:e,onHide:t,onShow:s,...a,children:c.jsx(Tt,{...a})}),Pt=({childTag:e,children:t,disabled:s,link:a,divider:r,header:o,href:i="#"})=>{const l=g("dropdown-item",s&&"disabled");return a?e?c.jsx(e,{className:l,children:t}):c.jsx("a",{href:i,className:l,children:t}):r?e?c.jsx(e,{className:"dropdown-divider",children:t}):c.jsx("hr",{className:"dropdown-divider"}):o?e?c.jsx(e,{className:"dropdown-header",children:t}):c.jsx("h6",{className:"dropdown-header",children:t}):c.jsx(c.Fragment,{children:t})};const $t=({onClick:e,tag:t="li",childTag:s,children:a,style:r,link:o,divider:i,header:l,disabled:u,href:d,preventCloseOnClick:m,...p})=>{const{setIsOpenState:f,onHide:v,setActiveIndex:b}=J(),x=h=>{v==null||v(h),e==null||e(h),!(u||m||h.defaultPrevented)&&(setTimeout(()=>b(-1),300),f(!1))};return c.jsx(t,{style:r,onClick:x,...p,children:c.jsx(Pt,{link:o,divider:i,header:l,disabled:u,href:d,childTag:s,children:a})})},le=(e,t,s)=>s==="up"?e<=0?t[t.length-1].props.divider===!0||t[t.length-1].props.disabled===!0:t[e-1].props.divider===!0||t[e-1].props.disabled===!0:e===t.length-1?t[0].props.divider===!0||t[0].props.disabled===!0:t[e+1].props.divider===!0||t[e+1].props.disabled===!0,kt=e=>{const{activeIndex:t,isOpenState:s,setIsOpenState:a,setActiveIndex:r,onHide:o}=J(),i=n.useCallback(l=>{if(Array.isArray(e)){if(wt(document.activeElement)&&document.activeElement.blur(),l.key==="ArrowUp"){l.preventDefault();const u=le(t,e,"up");if(t===1){r(u?e.length-1:0);return}if(t<=0){r(u?e.length-2:e.length-1);return}r(d=>u?d-2:d-1)}if(l.key==="ArrowDown"||l.key==="Tab"){l.preventDefault();const u=le(t,e,"down");if(t===e.length-2){r(d=>u?0:d+1);return}if(t===e.length-1){r(u?1:0);return}r(d=>u?d+2:d+1)}if(l.key==="Enter"){const u=document.querySelector('[data-active="true"]'),d=u==null?void 0:u.firstElementChild;if(d)return d.click();if(o==null||o(l),l.defaultPrevented)return;a(!1),setTimeout(()=>r(-1),300)}if(l.key==="Escape"){if(o==null||o(l),l.defaultPrevented)return;a(!1),setTimeout(()=>r(-1),300)}}},[e,a,r,t,o]);n.useEffect(()=>(s&&document.addEventListener("keydown",i),()=>{s&&document.removeEventListener("keydown",i)}),[s,i]),n.useEffect(()=>{const l=document.querySelector('[data-active="true"]'),u=l==null?void 0:l.firstElementChild;return u==null||u.focus(),()=>u==null?void 0:u.blur()},[t])},St=()=>{const{isOpenState:e}=J(),[t,s]=n.useState(!1),[a,r]=n.useState(!1),[o,i]=n.useState(e);return n.useEffect(()=>{let l;return e||(r(!0),s(!1),l=setTimeout(()=>{r(!1),i(!1)},300)),e&&(s(!0),r(!1),i(!0),l=setTimeout(()=>{s(!1)},300)),()=>clearTimeout(l)},[e]),{show:o,isFadeIn:t,isFadeOut:a}};const It=({className:e,tag:t="ul",children:s,style:a,dark:r,responsive:o="",appendToBody:i=!1,alwaysOpen:l,...u})=>{const{activeIndex:d,setPopperElement:m,isOpenState:p,animation:f,referenceElement:v,popperElement:b,options:x,dropleft:h,dropup:y,dropright:w}=J(),{show:j,isFadeIn:T,isFadeOut:B}=St();kt(s);const I=()=>{if(w)return"right-start";if(h)return"left-start";const D=b&&getComputedStyle(b).getPropertyValue("--mdb-position").trim()==="end";return y?D?"top-end":"top-start":D?"bottom-end":"bottom-start"},{styles:R}=te.usePopper(v,b,{placement:I(),modifiers:[it.flip],...x}),O=g("dropdown-menu",r&&"dropdown-menu-dark",p&&"show",f&&"animation",T&&"fade-in",B&&"fade-out",o&&`dropdown-menu-${o}`,e);if(!j&&!l)return null;const k=c.jsx(t,{className:O,style:{position:"absolute",zIndex:1e3,...R.popper,...a},ref:m,...u,children:n.Children.map(s,(D,C)=>n.cloneElement(D,{tabIndex:1,"data-active":d===C&&!0,className:g(d===C?"active":"",D.props.className)}))});return c.jsx(c.Fragment,{children:i?U.createPortal(k,document.body):k})},Lt=({className:e,tag:t=Q,children:s,onClick:a,split:r,...o})=>{const{setIsOpenState:i,setReferenceElement:l,isOpenState:u,setActiveIndex:d,onHide:m,onShow:p}=J(),f=g("dropdown-toggle",r&&"dropdown-toggle-split",e),v=b=>{a==null||a(b),u?m==null||m(b):p==null||p(b),!b.defaultPrevented&&(i(x=>!x),setTimeout(()=>d(-1),300))};return c.jsx(t,{onClick:v,ref:l,className:f,"aria-expanded":!!u,...o,children:s})},We=({className:e,btnClassName:t,btnChildren:s,children:a,tag:r,onShow:o,onHide:i,popperTag:l,isOpen:u,placement:d,dismiss:m,options:p,poperStyle:f,onClick:v,...b})=>{const[x,h]=n.useState(),[y,w]=n.useState(),{styles:j,attributes:T}=te.usePopper(x,y,{placement:d,...p}),[B,I]=n.useState(u??!1),[R,O]=n.useState(!1),[k,D]=n.useState(!1),C=g("popover fade",R&&B&&"show",`bs-popover-${d==="left"?"start":d==="right"?"end":d}`,e),N=M=>{B&&!m?i==null||i():B||o==null||o(),m?(D(!0),I(!0)):I(!B),v&&v(M)};n.useEffect(()=>{u||I(!1)},[u]);const F=n.useCallback(M=>{k&&y&&y!==null&&B&&x&&x!==null&&(x.contains(M.target)||(I(!1),i==null||i()))},[k,B,y,x,i]);return n.useEffect(()=>{const M=setTimeout(()=>{O(B)},150);return()=>{clearTimeout(M)}},[B]),n.useEffect(()=>(B&&document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}),[F,B]),c.jsxs(c.Fragment,{children:[c.jsx(r,{onClick:N,className:t,...b,ref:h,children:s}),(R||B)&&U.createPortal(c.jsx(l,{className:C,ref:w,style:{...j.popper,...f},...T.popper,children:a}),document.body)]})};We.defaultProps={tag:Q,popperTag:"div",placement:"bottom"};const Xe=({className:e,children:t,tag:s,...a})=>{const r=g("popover-body",e);return c.jsx(s,{className:r,...a,children:t})};Xe.defaultProps={tag:"div"};const qe=({className:e,children:t,tag:s,...a})=>{const r=g("popover-header",e);return c.jsx(s,{className:r,...a,children:t})};qe.defaultProps={tag:"h3"};const Ot=({animationDirection:e,appendToBody:t,backdrop:s=!0,children:a,className:r,closeOnEsc:o=!0,setShow:i,leaveHiddenModal:l=!0,modalRef:u,onHide:d,onHidePrevented:m,onShow:p,show:f,staticBackdrop:v,nonInvasive:b=!1,tag:x="div",...h})=>{const[y,w]=n.useState(f),[j,T]=n.useState(f),[B,I]=n.useState(f),[R,O]=n.useState(!1),[k,D]=n.useState(0),[C,N]=n.useState([]),F=n.useRef(null),M=u||F,L=g("modal",R&&"modal-static",e,"fade",j&&"show",y&&b&&"modal-non-invasive-show",r),S=g("modal-backdrop","fade",y&&"show"),P=n.useCallback(()=>{T(q=>(q&&(d==null||d()),!1)),setTimeout(()=>{w(!1),i==null||i(!1)},150),setTimeout(()=>{I(!1)},350)},[d,i]),_=n.useCallback(q=>{b||j&&q.target===M.current&&(v?(O(!0),m==null||m(),setTimeout(()=>{O(!1)},300)):P())},[j,M,v,P,m,b]),X=n.useCallback(q=>{j&&q.key==="Tab"&&(q.preventDefault(),D(k+1)),o&&j&&q.key==="Escape"&&(v?(O(!0),m==null||m(),setTimeout(()=>{O(!1)},300)):P())},[j,o,k,v,P,m]);n.useEffect(()=>{var $;const q=($=M.current)==null?void 0:$.querySelectorAll("button, a, input, select, textarea, [tabindex]"),E=Array.from(q).filter(G=>G.tabIndex!==-1).sort((G,V)=>G.tabIndex===V.tabIndex?0:V.tabIndex===null?-1:G.tabIndex===null?1:G.tabIndex-V.tabIndex);N(E),D(E.length-1)},[M]),n.useEffect(()=>{C&&C.length>0&&(k===C.length?(C[0].focus(),D(0)):C[k].focus())},[k,C]),n.useEffect(()=>{const q=()=>{const $=document.documentElement.clientWidth;return Math.abs(window.innerWidth-$)},E=window.innerWidth>document.documentElement.clientWidth&&window.innerWidth>=576;if(B&&E&&!b){const $=q();document.body.classList.add("modal-open"),document.body.style.overflow="hidden",document.body.style.paddingRight=`${$}px`}else document.body.classList.remove("modal-open"),document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.classList.remove("modal-open"),document.body.style.overflow="",document.body.style.paddingRight=""}},[B,b]),n.useEffect(()=>{f?(p==null||p(),I(!0),setTimeout(()=>{w(!0)},0),setTimeout(()=>{T(!0),i==null||i(!0)},150)):P()},[f,P,i,p]),n.useEffect(()=>{const q=E=>{E.target.closest(".modal-dialog")||window.addEventListener("mouseup",_,{once:!0})};return window.addEventListener("mousedown",q),window.addEventListener("keydown",X),()=>{window.removeEventListener("mousedown",q),window.removeEventListener("keydown",X)}},[X,_]);const A=c.jsx(c.Fragment,{children:(l||f||B)&&U.createPortal(c.jsxs(c.Fragment,{children:[c.jsx(x,{className:L,ref:M,style:{display:B||f?"block":"none",pointerEvents:b?"none":"initial"},...h,children:a}),U.createPortal(s&&B&&!b&&c.jsx("div",{className:S}),document.body)]}),document.body)}),W=c.jsx(c.Fragment,{children:(l||f||B)&&c.jsxs(c.Fragment,{children:[c.jsx(x,{className:L,ref:M,style:{display:B||f?"block":"none",pointerEvents:b?"none":"initial"},...h,children:a}),U.createPortal(s&&B&&!b&&c.jsx("div",{onClick:P,className:S}),document.body)]})});return c.jsx(c.Fragment,{children:t?A:W})},_e=n.forwardRef(({className:e,centered:t,children:s,size:a,scrollable:r,tag:o,...i},l)=>{const u=g("modal-dialog",r&&"modal-dialog-scrollable",t&&"modal-dialog-centered",a&&`modal-${a}`,e);return c.jsx(o,{className:u,...i,ref:l,children:s})});_e.defaultProps={tag:"div"};const Ge=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("modal-content",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});Ge.defaultProps={tag:"div"};const Ve=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("modal-header",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});Ve.defaultProps={tag:"div"};const Ye=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("modal-title",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});Ye.defaultProps={tag:"h5"};const Ke=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("modal-body",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});Ke.defaultProps={tag:"div"};const Ue=n.forwardRef(({className:e,children:t,tag:s,...a},r)=>{const o=g("modal-footer",e);return c.jsx(s,{className:o,...a,ref:r,children:t})});Ue.defaultProps={tag:"div"};const ne=n.createContext({activeElement:null,setTargets:null}),Ft=({container:e=typeof window!==void 0?window:null,className:t,children:s,offset:a=10,...r})=>{const o=g("sticky-top",t),[i,l]=n.useState(null),[u,d]=n.useState([]),m=e instanceof Window,p=n.useCallback(()=>{var y,w,j;if(!u.length)return;const f=m?window.pageYOffset:(y=e==null?void 0:e.current)==null?void 0:y.scrollTop,v=Number(a),b=(w=u[u.length-1])==null?void 0:w.current,x=(j=u[0])==null?void 0:j.current;f+v{var k;const I=(k=u[B+1])==null?void 0:k.current,R=T.current;if(f>R.offsetTop-v&&f<(I==null?void 0:I.offsetTop)-v){l(R);return}}),f>b.offsetTop-v&&l(b)},[a,u,m,e]);return n.useEffect(()=>{const f=m?e:e==null?void 0:e.current;return p(),f==null||f.addEventListener("scroll",p),()=>{f==null||f.removeEventListener("scroll",p)}},[p,e,m]),c.jsx("div",{className:o,...r,children:c.jsx("ul",{className:"nav flex-column nav-pills menu-sidebar",children:c.jsx(ne.Provider,{value:{activeElement:i,setTargets:d},children:s})})})},Je=({className:e,collapsible:t,targetRef:s,children:a,subsections:r,onClick:o,onActivate:i,...l})=>{var x;const{activeElement:u,setTargets:d}=n.useContext(ne),m=()=>r==null?void 0:r.some(h=>h.current.id===(u==null?void 0:u.id)),p=(u==null?void 0:u.id)===((x=s.current)==null?void 0:x.id),f=p||m();p&&(i==null||i(u==null?void 0:u.id));const v=g("nav-link",t&&"collapsible-scrollspy",f&&"active",e),b=h=>{const y=s==null?void 0:s.current;y==null||y.scrollIntoView({behavior:"smooth"}),o==null||o(h)};return n.useEffect(()=>{d(h=>[...h,s])},[d,s]),c.jsx("li",{className:"nav-item",style:{cursor:"pointer"},children:c.jsx("a",{className:v,onClick:b,...l,children:a})})};Je.defaultProps={};const Qe=({collapsible:e,className:t,children:s,style:a,...r})=>{const[o,i]=n.useState("0px"),{activeElement:l}=n.useContext(ne),u=g("nav flex-column",t),d=n.useRef(null);n.useEffect(()=>{const p=()=>e==null?void 0:e.some(v=>v.current.id===(l==null?void 0:l.id)),f=d.current;p()?i(`${f==null?void 0:f.scrollHeight}px`):i("0px")},[l,e]);const m={overflow:"hidden",height:o,transition:"height .5s ease",flexWrap:"nowrap",...a};return c.jsx("ul",{className:u,ref:d,style:e?m:a,...r,children:s})};Qe.defaultProps={};const At=({...e})=>c.jsx(H,{type:"checkbox",toggleSwitch:!0,...e}),Ze=({value:e,min:t,max:s,showThumb:a})=>{const r=Number(e),[o,i]=n.useState((r||0-Number(t))*100/(Number(s)-Number(t))),l=g("thumb",a&&"thumb-active");return n.useEffect(()=>{i((Number(e)-Number(t))*100/(Number(s)-Number(t)))},[e,s,t]),c.jsx("span",{className:l,style:{left:`calc(${o}% + (${8-o*.15}px))`},children:c.jsx("span",{className:"thumb-value",children:e})})};Ze.defaultProps={min:"0",max:"100"};const ze=({className:e,defaultValue:t,disableTooltip:s,labelId:a,max:r,min:o,onMouseDown:i,onMouseUp:l,onTouchStart:u,onTouchEnd:d,onChange:m,labelClass:p,value:f,label:v,id:b,inputRef:x,...h})=>{const[y,w]=n.useState(t),[j,T]=n.useState(!1),B=g("form-range",e),I=g("form-label",p),R=N=>{T(!0),i&&i(N)},O=N=>{T(!1),l&&l(N)},k=N=>{T(!0),u&&u(N)},D=N=>{T(!1),d&&d(N)},C=N=>{w(N.target.value),m&&m(N)};return c.jsxs(c.Fragment,{children:[v&&c.jsx("label",{className:I,id:a,htmlFor:b,children:v}),c.jsxs("div",{className:"range",children:[c.jsx("input",{type:"range",onMouseDown:R,onMouseUp:O,onTouchStart:k,onTouchEnd:D,onChange:C,className:B,value:f||y,id:b,min:o,max:r,ref:x,...h}),!s&&c.jsx(Ze,{value:f||y,showThumb:j,min:o,max:r})]})]})};ze.defaultProps={defaultValue:0};const Wt=({className:e,labelClass:t,labelStyle:s,inputRef:a,size:r,label:o,id:i,...l})=>{const u=g("form-control",`form-control-${r}`,e),d=g("form-label",t);return c.jsxs(c.Fragment,{children:[o&&c.jsx("label",{className:d,style:s,htmlFor:i,children:o}),c.jsx("input",{className:u,type:"file",id:i,ref:a,...l})]})},He=n.forwardRef(({className:e,children:t,noBorder:s,textBefore:a,textAfter:r,noWrap:o,tag:i,textTag:l,textClass:u,size:d,textProps:m,...p},f)=>{const v=g("input-group",o&&"flex-nowrap",d&&`input-group-${d}`,e),b=g("input-group-text",s&&"border-0",u),x=h=>c.jsx(c.Fragment,{children:h&&Array.isArray(h)?h.map((y,w)=>c.jsx(l,{className:b,...m,children:y},w)):c.jsx(l,{className:b,...m,children:h})});return c.jsxs(i,{className:v,ref:f,...p,children:[a&&x(a),t,r&&x(r)]})});He.defaultProps={tag:"div",textTag:"span"};const et=n.forwardRef(({className:e,children:t,isValidated:s,onReset:a,onSubmit:r,...o},i)=>{const[l,u]=n.useState(s),d=g("needs-validation",l&&"was-validated",e),m=f=>{f.preventDefault(),u(!0),r&&r(f)},p=f=>{f.preventDefault(),u(!1),a&&a(f)};return c.jsx("form",{className:d,onSubmit:m,onReset:p,ref:i,...o,children:t})});et.defaultProps={noValidate:!0};const Xt=n.forwardRef(({className:e,fill:t,pills:s,justify:a,children:r,...o},i)=>{const l=g("nav",s?"nav-pills":"nav-tabs",t&&"nav-fill",a&&"nav-justified",e);return c.jsx("ul",{className:l,ref:i,...o,children:r})}),qt=n.forwardRef(({className:e,children:t,style:s,...a},r)=>{const o=g("nav-item",e);return c.jsx("li",{className:o,style:{cursor:"pointer",...s},role:"presentation",ref:r,...a,children:t})}),_t=n.forwardRef(({className:e,color:t,active:s,onShow:a,onHide:r,children:o,...i},l)=>{const u=g("nav-link",s&&"active",t&&`bg-${t}`,e);return n.useEffect(()=>{s?a==null||a():r==null||r()},[s]),c.jsx("a",{className:u,ref:l,...i,children:o})}),tt=n.forwardRef(({className:e,tag:t,children:s,...a},r)=>{const o=g("tab-content",e);return c.jsx(t,{className:o,ref:r,...a,children:s})});tt.defaultProps={tag:"div"};const st=n.forwardRef(({className:e,tag:t,show:s,children:a,...r},o)=>{const[i,l]=n.useState(!1),u=g("tab-pane","fade",i&&"show",s&&"active",e);return n.useEffect(()=>{let d;return s?d=setTimeout(()=>{l(!0)},100):l(!1),()=>{clearTimeout(d)}},[s]),c.jsx(t,{className:u,role:"tabpanel",ref:o,...r,children:a})});st.defaultProps={tag:"div"};const oe=n.createContext({active:0}),Gt=({imagesCount:e,to:t})=>{const{active:s}=n.useContext(oe);return c.jsx("ol",{className:"carousel-indicators",children:Array.from(Array(e)).map((a,r)=>c.jsx("li",{"data-mdb-target":r,className:g(s===r&&"active"),onClick:()=>t(r)},r))})},Vt=({move:e})=>c.jsxs(c.Fragment,{children:[c.jsxs("a",{role:"button",className:"carousel-control-prev",onClick:()=>e("prev"),children:[c.jsx("span",{className:"carousel-control-prev-icon"}),c.jsx("span",{className:"visually-hidden",children:"Previous"})]}),c.jsxs("a",{role:"button",className:"carousel-control-next",onClick:()=>e("next"),children:[c.jsx("span",{className:"carousel-control-next-icon"}),c.jsx("span",{className:"visually-hidden",children:"Next"})]})]}),Yt=e=>{const t=getComputedStyle(e),s=getComputedStyle(e==null?void 0:e.parentNode);return t.display!=="none"&&s.display!=="none"&&t.visibility!=="hidden"},Kt=e=>Array.from(e==null?void 0:e.querySelectorAll(".carousel-item")),Ut=e=>e.offsetHeight,Jt=(e,t,s=!0)=>{if(!s){ie(e);return}const a=Qt(t);t.addEventListener("transitionend",()=>ie(e),{once:!0}),zt(t,a)},ie=e=>{typeof e=="function"&&e()},Qt=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:s}=window.getComputedStyle(e);const a=Number.parseFloat(t),r=Number.parseFloat(s);return!a&&!r?0:(t=t.split(",")[0],s=s.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(s))*1e3)},Zt=e=>{e.dispatchEvent(new Event("transitionend"))},zt=(e,t)=>{let s=!1;const r=t+5;function o(){s=!0,e.removeEventListener("transitionend",o)}e.addEventListener("transitionend",o),setTimeout(()=>{s||Zt(e)},r)},at=({fade:e,className:t,dark:s,children:a,interval:r,keyboard:o,touch:i,showControls:l,showIndicators:u,onSlide:d,...m})=>{const p=n.useRef([]),f=n.useRef(null),v=n.useRef(0),b=n.useRef(!1),[x,h]=n.useState(0),[y,w]=n.useState(0),[j,T]=n.useState({initialX:0,initialY:0}),[B,I]=n.useState(!1),R=n.useRef(null),O=g("carousel","slide",e&&"carousel-fade",s&&"carousel-dark",t),k=()=>{f.current&&(clearInterval(f.current),f.current=null)},D=n.useCallback((E,$)=>{if($!==void 0)v.current=$,h($);else{const G=x===y-1?0:x+1,V=x===0?y-1:x-1;v.current=E==="next"?G:V,h(E==="next"?G:V)}},[x,y]),C=n.useCallback((E,$,G)=>{var ce;I(!0);const Y=p.current[x],K=Boolean(f.current),Z=E==="next",z=Z?"carousel-item-start":"carousel-item-end",ee=Z?"carousel-item-next":"carousel-item-prev";if($.classList.contains("active")){b.current=!1;return}D(E,G),!(!Y||!$)&&(b.current=!0,K&&k(),(ce=R.current)!=null&&ce.classList.contains("slide")?($.classList.add(ee),Ut($),Y.classList.add(z),$.classList.add(z),Jt(()=>{I(!1),$.classList.remove(z,ee),$.classList.add("active"),Y.classList.remove("active",ee,z),b.current=!1},Y,!0)):(Y.classList.remove("active"),$.classList.add("active"),b.current=!1))},[R,x,D]),N=E=>{b.current||(b.current=!0,setTimeout(()=>{b.current=!1},E))},F=n.useCallback(E=>{const $=E==="prev",Y=(v.current+($?-1:1))%y,K=p.current;return Y===-1?K[y-1]:K[Y]},[y]),M=E=>{const $=v.current,G=E>$?"next":"prev",V=p.current;return{direction:G,nextElement:V[E]}},L=E=>{if(b.current||(N(700),E>y-1||E<0))return;const{direction:$,nextElement:G}=M(E);C($,G,E)},S=n.useCallback(E=>{if(b.current)return;N(600);const $=F(E);C(E,$)},[F,C]),P=n.useCallback(()=>{const{visibilityState:E,hidden:$}=document;if(E)return $||!Yt(R.current)?void 0:S("next");S("next")},[R,S]),_=n.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null),f.current=setInterval(P,r)},[P,r]),X=E=>{i&&T({initialX:E.touches[0].clientX,initialY:E.touches[0].clientY})},A=E=>{b.current=!0;const{initialX:$,initialY:G}=j;if(!$||!G)return;const V=E.touches[0].clientX,Y=E.touches[0].clientY,K=$-V,Z=G-Y;Math.abs(K)>Math.abs(Z)&&(K>0?S("prev"):S("next")),T({initialX:0,initialY:0})},W=()=>{b.current=!1},q=n.useCallback(E=>{switch(E.key){case"ArrowLeft":E.preventDefault(),S("prev");break;case"ArrowRight":E.preventDefault(),S("next");break}},[S]);return n.useEffect(()=>{if(o)return window.addEventListener("keydown",q),()=>{window.removeEventListener("keydown",q)}},[q,o]),n.useEffect(()=>{const E=R.current,$=Kt(E);p.current=$,w($.length)},[R]),n.useEffect(()=>{d==null||d()},[B,d]),n.useEffect(()=>{_()},[_]),c.jsx("div",{onTouchStart:X,onTouchMove:A,onTouchEnd:W,onMouseEnter:k,onMouseLeave:_,className:O,ref:R,...m,children:c.jsx("div",{className:"carousel-inner",children:c.jsxs(oe.Provider,{value:{active:x},children:[u&&c.jsx(Gt,{to:L,imagesCount:y}),a,l&&c.jsx(Vt,{move:S})]})})})};at.defaultProps={fade:!1,interval:5e3,touch:!0,keyboard:!1};const Ht=({className:e,captionClassName:t,children:s,src:a,alt:r,itemId:o,video:i,...l})=>{const{active:u}=n.useContext(oe),d=n.useRef(!0),m=n.useRef(null),p=g("carousel-caption d-none d-md-block",t);return n.useEffect(()=>{if(d.current&&u===o-1){const f=m.current;f==null||f.classList.add("active")}d.current=!1},[u,o]),c.jsxs("div",{className:"carousel-item",ref:m,children:[i?c.jsx("video",{className:e,autoPlay:!0,loop:!0,muted:!0,...l,children:c.jsx("source",{src:a,type:"video/mp4"})}):c.jsx("img",{className:e,src:a,alt:r,...l}),c.jsx("div",{className:p,children:s})]})},rt=n.createContext({activeItem:0,setActiveItem:null,alwaysOpen:!1,initialActive:0}),nt=n.forwardRef(({alwaysOpen:e,borderless:t,className:s,flush:a,initialActive:r,tag:o,children:i,onChange:l,...u},d)=>{const m=g("accordion",a&&"accordion-flush",t&&"accordion-borderless",s),[p,f]=n.useState(r);return n.useEffect(()=>{p&&l&&l(p)},[l,p]),c.jsx(o,{className:m,ref:d,...u,children:c.jsx(rt.Provider,{value:{activeItem:p,setActiveItem:f,alwaysOpen:e,initialActive:r},children:i})})});nt.defaultProps={tag:"div",initialActive:0};const ot=n.forwardRef(({className:e,bodyClassName:t,bodyStyle:s,headerClassName:a,collapseId:r,headerTitle:o,headerStyle:i,btnClassName:l,tag:u,children:d,...m},p)=>{const{activeItem:f,setActiveItem:v,alwaysOpen:b,initialActive:x}=n.useContext(rt),[h,y]=n.useState(x),w=g("accordion-item",e),j=g("accordion-header",a),T=g("accordion-body",t),B=g("accordion-button",b?r!==h&&"collapsed":r!==f&&"collapsed",l),I=R=>{b?y(R!==h?R:0):v(R!==f?R:0)};return c.jsxs(u,{className:w,ref:p,...m,children:[c.jsx("h2",{className:j,style:i,children:c.jsx("button",{onClick:()=>I(r),className:B,type:"button",children:o})}),c.jsx(re,{id:r.toString(),show:b?h===r:f===r,children:c.jsx("div",{className:T,style:s,children:d})})]})});ot.defaultProps={tag:"div"};const ct=({className:e,size:t,contrast:s,value:a,defaultValue:r,id:o,labelClass:i,wrapperClass:l,wrapperStyle:u,wrapperTag:d,label:m,onChange:p,children:f,labelRef:v,labelStyle:b,inputRef:x,onBlur:h,readonly:y,...w})=>{var X;const j=n.useRef(null),T=n.useRef(null),B=v||j,I=x||T,[R,O]=n.useState(a||r),[k,D]=n.useState(0),[C,N]=n.useState(a!==void 0&&a.length>0||(r!==void 0&&r.length)>0),F=g("form-outline",s&&"form-white",l),M=g("form-control",C&&"active",t&&`form-control-${t}`,e),L=g("form-label",i);n.useEffect(()=>{var A;B.current&&((A=B.current)==null?void 0:A.clientWidth)!==0&&D(B.current.clientWidth*.8+8)},[B,(X=B.current)==null?void 0:X.clientWidth]);const S=()=>{B.current&&D(B.current.clientWidth*.8+8)};n.useEffect(()=>{a!==void 0&&(a.length>0?N(!0):N(!1))},[a]),n.useEffect(()=>{r!==void 0&&(r.length>0?N(!0):N(!1))},[r]);const P=A=>{O(A.currentTarget.value),p&&p(A)},_=n.useCallback(A=>{R!==void 0&&R.length>0||a!==void 0&&a.length>0?N(!0):N(!1),h&&h(A)},[R,a,h]);return c.jsxs(d,{className:F,style:{...u},children:[c.jsx("textarea",{readOnly:y,className:M,onBlur:_,onChange:P,onFocus:S,defaultValue:r,value:a,id:o,ref:I,...w}),m&&c.jsx("label",{className:L,style:b,htmlFor:o,ref:B,children:m}),c.jsxs("div",{className:"form-notch",children:[c.jsx("div",{className:"form-notch-leading"}),c.jsx("div",{className:"form-notch-middle",style:{width:k}}),c.jsx("div",{className:"form-notch-trailing"})]}),f]})};ct.defaultProps={wrapperTag:"div",readonly:!1};const lt=({children:e,invalid:t,feedback:s,tooltip:a,tag:r,...o})=>{const[i,l]=n.useState(null),u=n.useRef(null),d=g(t?`invalid-${a?"tooltip":"feedback"}`:`valid-${a?"tooltip":"feedback"}`);return n.useEffect(()=>{var p,f;const m=(f=(p=u.current)==null?void 0:p.querySelector("input, textarea"))==null?void 0:f.parentElement;m&&l(m)},[]),c.jsxs(r,{ref:u,...o,children:[i&&U.createPortal(c.jsx("div",{className:d,children:s}),i),e]})};lt.defaultProps={tag:"div",feedback:"Looks good!"};exports.MDBAccordion=nt;exports.MDBAccordionItem=ot;exports.MDBBadge=fe;exports.MDBBreadcrumb=gt;exports.MDBBreadcrumbItem=Te;exports.MDBBtn=Q;exports.MDBBtnGroup=me;exports.MDBCard=ge;exports.MDBCardBody=ye;exports.MDBCardFooter=Be;exports.MDBCardGroup=Me;exports.MDBCardHeader=be;exports.MDBCardImage=ft;exports.MDBCardLink=mt;exports.MDBCardOverlay=De;exports.MDBCardSubTitle=ve;exports.MDBCardText=he;exports.MDBCardTitle=xe;exports.MDBCarousel=at;exports.MDBCarouselItem=Ht;exports.MDBCheckbox=Mt;exports.MDBCol=de;exports.MDBCollapse=re;exports.MDBContainer=ue;exports.MDBDropdown=Rt;exports.MDBDropdownItem=$t;exports.MDBDropdownMenu=It;exports.MDBDropdownToggle=Lt;exports.MDBFile=Wt;exports.MDBFooter=vt;exports.MDBIcon=pt;exports.MDBInput=Fe;exports.MDBInputGroup=He;exports.MDBListGroup=je;exports.MDBListGroupItem=Ne;exports.MDBModal=Ot;exports.MDBModalBody=Ke;exports.MDBModalContent=Ge;exports.MDBModalDialog=_e;exports.MDBModalFooter=Ue;exports.MDBModalHeader=Ve;exports.MDBModalTitle=Ye;exports.MDBNavbar=Re;exports.MDBNavbarBrand=$e;exports.MDBNavbarItem=ke;exports.MDBNavbarLink=Pe;exports.MDBNavbarNav=Se;exports.MDBNavbarToggler=Ie;exports.MDBPagination=xt;exports.MDBPaginationItem=ht;exports.MDBPaginationLink=Le;exports.MDBPopover=We;exports.MDBPopoverBody=Xe;exports.MDBPopoverHeader=qe;exports.MDBProgress=Oe;exports.MDBProgressBar=ae;exports.MDBRadio=jt;exports.MDBRange=ze;exports.MDBRipple=se;exports.MDBRow=Ce;exports.MDBScrollspy=Ft;exports.MDBScrollspyLink=Je;exports.MDBScrollspySubList=Qe;exports.MDBSpinner=pe;exports.MDBSwitch=At;exports.MDBTable=yt;exports.MDBTableBody=Dt;exports.MDBTableHead=Bt;exports.MDBTabs=Xt;exports.MDBTabsContent=tt;exports.MDBTabsItem=qt;exports.MDBTabsLink=_t;exports.MDBTabsPane=st;exports.MDBTextArea=ct;exports.MDBTooltip=we;exports.MDBTypography=Ee;exports.MDBValidation=et;exports.MDBValidationItem=lt; +(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".dropdown-menu .active:not(.form-control){color:#16181b;background-color:#eee}.dropdown-menu [data-active=true] a.dropdown-item,.dropdown-menu .dropdown-item:focus,.dropdown-menu li:focus .dropdown-item :not(.disabled){color:#16181b;background-color:#eee}.dropdown-menu li:focus{outline:none}.dropdown-menu.dropdown-menu-dark [data-active=true] a.dropdown-item,.dropdown-menu.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu.dropdown-menu-dark li:focus .dropdown-item{color:#fff;background-color:#1266f1}.btn-group.dropstart>.dropdown-menu{right:0!important}")),document.head.appendChild(o)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})(); +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),a=require("react"),b=require("clsx"),Q=require("react-dom"),se=require("react-popper"),pe=require("@popperjs/core"),be=a.forwardRef(({breakpoint:e,fluid:t,children:n,className:s,tag:r="div",...o},i)=>{const l=b(`${t?"container-fluid":`container${e?"-"+e:""}`}`,s);return c.jsx(r,{className:l,...o,ref:i,children:n})}),ge=a.forwardRef(({center:e,children:t,className:n,end:s,lg:r,md:o,offsetLg:i,offsetMd:l,offsetSm:u,order:f,size:d,sm:p,start:m,tag:g="div",xl:v,xxl:h,xs:x,...D},N)=>{const M=b(d&&`col-${d}`,x&&`col-xs-${x}`,p&&`col-sm-${p}`,o&&`col-md-${o}`,r&&`col-lg-${r}`,v&&`col-xl-${v}`,h&&`col-xxl-${h}`,!d&&!x&&!p&&!o&&!r&&!v&&!h?"col":"",f&&`order-${f}`,m&&"align-self-start",e&&"align-self-center",s&&"align-self-end",u&&`offset-sm-${u}`,l&&`offset-md-${l}`,i&&`offset-lg-${i}`,n);return c.jsx(g,{className:M,ref:N,...D,children:t})}),ve=a.forwardRef(({className:e,color:t="primary",pill:n,light:s,dot:r,tag:o="span",children:i,notification:l,...u},f)=>{const d=b("badge",s?t&&`badge-${t}`:t&&`bg-${t}`,r&&"badge-dot",n&&"rounded-pill",l&&"badge-notification",e);return c.jsx(o,{className:d,ref:f,...u,children:i})}),xe=({...e})=>{const[t,n]=a.useState(!1),s=b("ripple-wave",t&&"active");return a.useEffect(()=>{const r=setTimeout(()=>{n(!0)},50);return()=>{clearTimeout(r)}},[]),c.jsx("div",{className:s,...e})},he=(...e)=>{const t=a.useRef();return a.useEffect(()=>{e.forEach(n=>{n&&(typeof n=="function"?n(t.current):n.current=t.current)})},[e]),t},ie=a.forwardRef(({className:e,rippleTag:t="div",rippleCentered:n,rippleDuration:s=500,rippleUnbound:r,rippleRadius:o=0,rippleColor:i="dark",children:l,onMouseDown:u,...f},d)=>{const p=a.useRef(null),m=he(d,p),g="rgba({{color}}, 0.2) 0, rgba({{color}}, 0.3) 40%, rgba({{color}}, 0.4) 50%, rgba({{color}}, 0.5) 60%, rgba({{color}}, 0) 70%",v=[0,0,0],h=["primary","secondary","success","danger","warning","info","light","dark"],[x,D]=a.useState([]),[N,M]=a.useState(!1),T=b("ripple","ripple-surface",r&&"ripple-surface-unbound",N&&`ripple-surface-${i}`,e),y=()=>{if(h.find(E=>E===(i==null?void 0:i.toLowerCase())))return M(!0);{const E=S(i).join(",");return`radial-gradient(circle, ${g.split("{{color}}").join(`${E}`)})`}},S=B=>{const E=j=>(j.length<7&&(j=`#${j[1]}${j[1]}${j[2]}${j[2]}${j[3]}${j[3]}`),[parseInt(j.substr(1,2),16),parseInt(j.substr(3,2),16),parseInt(j.substr(5,2),16)]),w=j=>{const L=document.body.appendChild(document.createElement("fictum")),W="rgb(1, 2, 3)";return L.style.color=W,L.style.color!==W||(L.style.color=j,L.style.color===W||L.style.color==="")?v:(j=getComputedStyle(L).color,document.body.removeChild(L),j)},P=j=>(j=j.match(/[.\d]+/g).map(L=>+Number(L)),j.length=3,j);return B.toLowerCase()==="transparent"?v:B[0]==="#"?E(B):(B.indexOf("rgb")===-1&&(B=w(B)),B.indexOf("rgb")===0?P(B):v)},R=B=>{const{offsetX:E,offsetY:w,height:P,width:j}=B,L=w<=P/2,W=E<=j/2,$=(F,Y)=>Math.sqrt(F**2+Y**2),A=w===P/2&&E===j/2,q={first:L===!0&&W===!1,second:L===!0&&W===!0,third:L===!1&&W===!0,fourth:L===!1&&W===!1},X={topLeft:$(E,w),topRight:$(j-E,w),bottomLeft:$(E,P-w),bottomRight:$(j-E,P-w)};let _=0;return A||q.fourth?_=X.topLeft:q.third?_=X.topRight:q.second?_=X.bottomRight:q.first&&(_=X.bottomLeft),_*2},O=B=>{var _;const E=(_=m.current)==null?void 0:_.getBoundingClientRect(),w=B.clientX-E.left,P=B.clientY-E.top,j=E.height,L=E.width,W={offsetX:n?j/2:w,offsetY:n?L/2:P,height:j,width:L},$={delay:s&&s*.5,duration:s&&s-s*.5},A=R(W),q=o||A/2,X={left:n?`${L/2-q}px`:`${w-q}px`,top:n?`${j/2-q}px`:`${P-q}px`,height:o?`${o*2}px`:`${A}px`,width:o?`${o*2}px`:`${A}px`,transitionDelay:`0s, ${$.delay}ms`,transitionDuration:`${s}ms, ${$.duration}ms`};return N?X:{...X,backgroundImage:`${y()}`}},k=B=>{const E=O(B),w=x.concat(E);D(w),u&&u(B)};return a.useEffect(()=>{const B=setTimeout(()=>{x.length>0&&D(x.splice(1,x.length-1))},s);return()=>{clearTimeout(B)}},[s,x]),c.jsxs(t,{className:T,onMouseDown:B=>k(B),ref:m,...f,children:[l,x.map((B,E)=>c.jsx(xe,{style:B},E))]})}),ee=a.forwardRef(({className:e,color:t="primary",outline:n,children:s,rounded:r,disabled:o,floating:i,size:l,href:u,block:f,active:d,toggle:p,noRipple:m,tag:g="button",role:v="button",...h},x)=>{const[D,N]=a.useState(d||!1);let M;const T=t&&["light","link"].includes(t)||n?"dark":"light";t!=="none"?n?t?M=`btn-outline-${t}`:M="btn-outline-primary":t?M=`btn-${t}`:M="btn-primary":M="";const y=b(t!=="none"&&"btn",M,r&&"btn-rounded",i&&"btn-floating",l&&`btn-${l}`,`${(u||g!=="button")&&o?"disabled":""}`,f&&"btn-block",D&&"active",e);return u&&g!=="a"&&(g="a"),["hr","img","input"].includes(g)||m?c.jsx(g,{className:y,onClick:p?()=>{N(!D)}:void 0,disabled:o&&g==="button"?!0:void 0,href:u,ref:x,role:v,...h,children:s}):c.jsx(ie,{rippleTag:g,rippleColor:T,className:y,onClick:p?()=>{N(!D)}:void 0,disabled:o&&g==="button"?!0:void 0,href:u,ref:x,role:v,...h,children:s})}),ye=a.forwardRef(({className:e,children:t,shadow:n,toolbar:s,size:r,vertical:o,tag:i="div",role:l="group",...u},f)=>{let d;s?d="btn-toolbar":o?d="btn-group-vertical":d="btn-group";const p=b(d,n&&`shadow-${n}`,r&&`btn-group-${r}`,e);return c.jsx(i,{className:p,ref:f,role:l,...u,children:t})}),Be=a.forwardRef(({className:e,children:t,tag:n="div",color:s,grow:r,size:o,...i},l)=>{const u=b(`${r?"spinner-grow":"spinner-border"}`,s&&`text-${s}`,`${o?r?"spinner-grow-"+o:"spinner-border-"+o:""}`,e);return c.jsx(n,{className:u,ref:l,...i,children:t})}),Me=a.forwardRef(({className:e,children:t,border:n,background:s,tag:r="div",shadow:o,alignment:i,...l},u)=>{const f=b("card",n&&`border border-${n}`,s&&`bg-${s}`,o&&`shadow-${o}`,i&&`text-${i}`,e);return c.jsx(r,{className:f,ref:u,...l,children:t})}),De=a.forwardRef(({className:e,children:t,border:n,background:s,tag:r="div",...o},i)=>{const l=b("card-header",n&&`border-${n}`,s&&`bg-${s}`,e);return c.jsx(r,{className:l,...o,ref:i,children:t})}),je=a.forwardRef(({className:e,children:t,tag:n="p",...s},r)=>{const o=b("card-subtitle",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),Ne=a.forwardRef(({className:e,children:t,tag:n="h5",...s},r)=>{const o=b("card-title",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),we=a.forwardRef(({className:e,children:t,tag:n="p",...s},r)=>{const o=b("card-text",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),Ee=a.forwardRef(({className:e,children:t,tag:n="div",...s},r)=>{const o=b("card-body",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),Ce=a.forwardRef(({className:e,children:t,border:n,background:s,tag:r="div",...o},i)=>{const l=b("card-footer",n&&`border-${n}`,s&&`bg-${s}`,e);return c.jsx(r,{className:l,...o,ref:i,children:t})}),Te=({className:e,children:t,overlay:n,position:s,fluid:r,...o})=>{const i=b(s&&`card-img-${s}`,r&&"img-fluid",n&&"card-img",e);return c.jsx("img",{className:i,...o,children:t})},Re=a.forwardRef(({className:e,children:t,tag:n="div",...s},r)=>{const o=b("card-img-overlay",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),$e=({className:e,children:t,...n})=>{const s=b("card-link",e);return c.jsx("a",{className:s,...n,children:t})},Ie=a.forwardRef(({className:e,children:t,tag:n="div",...s},r)=>{const o=b("card-group",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),ke=a.forwardRef(({className:e,tag:t="ul",horizontal:n,horizontalSize:s,light:r,numbered:o,children:i,small:l,...u},f)=>{const d=b("list-group",n&&(s?`list-group-horizontal-${s}`:"list-group-horizontal"),r&&"list-group-light",o&&"list-group-numbered",l&&"list-group-small",e);return c.jsx(t,{className:d,ref:f,...u,children:i})}),Se=a.forwardRef(({className:e,tag:t="li",active:n,disabled:s,action:r,color:o,children:i,noBorders:l,...u},f)=>{const d=t==="button",p=b("list-group-item",n&&"active",s&&!d&&"disabled",r&&"list-group-item-action",o&&`list-group-item-${o}`,l&&"border-0",e);return c.jsx(t,{className:p,disabled:d&&s,ref:f,...u,children:i})}),Le=({className:e,children:t,disableMouseDown:n,tag:s=ee,tooltipTag:r="div",options:o,placement:i="top",title:l,wrapperProps:u,wrapperClass:f,onShow:d,onHide:p,onMouseEnter:m,onMouseLeave:g,...v})=>{const[h,x]=a.useState(null),[D,N]=a.useState(null),[M,T]=a.useState(!1),[y,S]=a.useState(!1),[R,O]=a.useState(!1),[k,B]=a.useState(!1),E=b("tooltip",R&&"show","fade",`bs-tooltip-${i}`,e),{styles:w,attributes:P}=se.usePopper(h,D,{placement:i,...o});a.useEffect(()=>{let $,A;return M||y?(B(!0),$=setTimeout(()=>{O(!0)},4)):(O(!1),A=setTimeout(()=>{B(!1)},300)),()=>{clearTimeout($),clearTimeout(A)}},[M,y]);const j=$=>{d==null||d($),!$.defaultPrevented&&T(!0),m==null||m($)},L=$=>{p==null||p($),!$.defaultPrevented&&T(!1),g==null||g($)},W=a.useCallback($=>{$.target===h?S(!0):S(!1)},[h]);return a.useEffect(()=>{if(!n)return document.addEventListener("mousedown",W),()=>{document.removeEventListener("mousedown",W)}},[W,n]),c.jsxs(c.Fragment,{children:[c.jsx(s,{className:f,onMouseEnter:j,onMouseLeave:L,ref:x,...u,children:t}),k&&Q.createPortal(c.jsx(r,{ref:N,className:E,style:w.popper,...P.popper,role:"tooltip",...v,children:c.jsx("div",{className:"tooltip-inner",children:l})}),document.body)]})},Oe=a.forwardRef(({around:e,between:t,bottom:n,center:s,children:r,className:o,evenly:i,end:l,middle:u,start:f,tag:d="div",top:p,...m},g)=>{const v=b("row",e&&"justify-content-around",t&&"justify-content-between",n&&"align-self-end",s&&"justify-content-center",i&&"justifty-content-evenly",l&&"justify-content-end",u&&"align-self-center",f&&"justify-content-start",p&&"align-self-start",o);return c.jsx(d,{className:v,...m,ref:g,children:r})}),Pe=({animate:e,className:t,icon:n,fab:s,fas:r,fal:o,far:i,flag:l,spin:u,fixed:f,flip:d,list:p,size:m,pull:g,pulse:v,color:h,border:x,rotate:D,inverse:N,stack:M,iconType:T,children:y,...S})=>{let R;l?R="flag":s?R="fab":r?R="fas":i?R="far":o?R="fal":R="fa";const O=b(T?`fa-${T}`:R,e&&`fa-${e}`,l?`flag-${l}`:n&&`fa-${n}`,m&&`fa-${m}`,h&&`text-${h}`,x&&"fa-border",D&&`fa-rotate-${D}`,g&&`fa-pull-${g}`,u&&!e&&"fa-spin",p&&"fa-li",f&&"fa-fw",v&&!e&&"fa-pulse",N&&"fa-inverse",d&&`fa-flip-${d}`,M&&`fa-stack-${M}`,t);return c.jsx("i",{className:O,...S,children:y})},Fe=a.forwardRef(({className:e,children:t,tag:n="p",variant:s,color:r,blockquote:o,note:i,noteColor:l,listUnStyled:u,listInLine:f,...d},p)=>{const m=b(s&&s,o&&"blockquote",i&&"note",r&&`text-${r}`,l&&`note-${l}`,u&&"list-unstyled",f&&"list-inline",e);return o&&(n="blockquote"),(u||f)&&(n="ul"),c.jsx(n,{className:m,ref:p,...d,children:t})}),Ae=a.forwardRef(({className:e,color:t,uppercase:n,bold:s,children:r,...o},i)=>{const l=b("breadcrumb",s&&"font-weight-bold",t&&`text-${t}`,n&&"text-uppercase",e);return c.jsx("nav",{"aria-label":"breadcrumb",children:c.jsx("ol",{className:l,ref:i,...o,children:r})})}),We=a.forwardRef(({className:e,active:t,current:n="page",children:s,...r},o)=>{const i=b("breadcrumb-item",t&&"active",e);return c.jsx("li",{className:i,ref:o,"aria-current":t&&n,...r,children:s})}),Xe=e=>{if(e!==!1)return`navbar-expand-${e}`},qe=a.forwardRef(({className:e,children:t,light:n,dark:s,scrolling:r,fixed:o,sticky:i,scrollingNavbarOffset:l,color:u,transparent:f,expand:d,tag:p="nav",bgColor:m,...g},v)=>{const[h,x]=a.useState(!1),D=b({"navbar-light":n,"navbar-dark":s,"scrolling-navbar":r||l,"top-nav-collapse":h,[`text-${u}`]:u&&f?h:u},o&&`fixed-${o}`,i&&"sticky-top","navbar",d&&Xe(d),m&&`bg-${m}`,e),N=a.useCallback(()=>{l&&window.pageYOffset>l?x(!0):x(!1)},[l]);return a.useEffect(()=>((r||l)&&window.addEventListener("scroll",N),()=>{window.removeEventListener("scroll",N)}),[N,r,l]),c.jsx(p,{className:D,role:"navigation",...g,ref:v,children:t})}),_e=a.forwardRef(({children:e,className:t="",disabled:n=!1,active:s=!1,tag:r="a",...o},i)=>{const l=b("nav-link",n?"disabled":s?"active":"",t);return c.jsx(r,{"data-test":"nav-link",className:l,style:{cursor:"pointer"},ref:i,...o,children:e})}),Ge=a.forwardRef(({className:e,children:t,tag:n="a",...s},r)=>{const o=b("navbar-brand",e);return c.jsx(n,{className:o,ref:r,...s,children:t})}),Ye=a.forwardRef(({children:e,className:t,active:n,text:s,tag:r="li",...o},i)=>{const l=b("nav-item",n&&"active",s&&"navbar-text",t);return c.jsx(r,{...o,className:l,ref:i,children:e})}),Ve=a.forwardRef(({children:e,className:t,right:n,fullWidth:s=!0,left:r,tag:o="ul",...i},l)=>{const u=b("navbar-nav",s&&"w-100",n&&"ms-auto",r&&"me-auto",t);return c.jsx(o,{className:u,ref:l,...i,children:e})}),Ke=a.forwardRef(({children:e,className:t,tag:n="button",...s},r)=>{const o=b("navbar-toggler",t);return c.jsx(n,{...s,className:o,ref:r,children:e})}),Ue=a.forwardRef(({children:e,bgColor:t,color:n,className:s,...r},o)=>{const i=b(t&&`bg-${t}`,n&&`text-${n}`,s);return c.jsx("footer",{className:i,...r,ref:o,children:e})}),Je=a.forwardRef(({children:e,size:t,circle:n,center:s,end:r,start:o,className:i,...l},u)=>{const f=b("pagination",s&&"justify-content-center",n&&"pagination-circle",r&&"justify-content-end",t&&`pagination-${t}`,o&&"justify-content-start",i);return c.jsx("ul",{className:f,...l,ref:u,children:e})}),Qe=a.forwardRef(({children:e,className:t,tag:n="a",...s},r)=>{const o=b("page-link",t);return c.jsx(n,{className:o,...s,ref:r,children:e})}),Ze=a.forwardRef(({children:e,className:t,active:n,disabled:s,...r},o)=>{const i=b("page-item",n&&"active",s&&"disabled",t);return c.jsx("li",{className:i,...r,ref:o,children:e})}),ze=({className:e,classNameResponsive:t,responsive:n,align:s,borderColor:r,bordered:o,borderless:i,children:l,color:u,hover:f,small:d,striped:p,...m})=>{const g=b("table",s&&`align-${s}`,r&&`border-${r}`,o&&"table-bordered",i&&"table-borderless",u&&`table-${u}`,f&&"table-hover",d&&"table-sm",p&&"table-striped",e),v=a.useMemo(()=>c.jsx("table",{className:g,...m,children:l}),[l,g,m]);if(n){const h=b(typeof n=="string"?`table-responsive-${n}`:"table-responsive",t);return c.jsx("div",{className:h,children:v})}else return v},He=({className:e,children:t,dark:n,light:s,...r})=>{const o=b(n&&"table-dark",s&&"table-light",e);return c.jsx("thead",{className:o,...r,children:t})},et=({className:e,children:t,...n})=>{const s=b(e);return c.jsx("tbody",{className:s,...n,children:t})},ue=a.forwardRef(({animated:e,children:t,className:n,style:s,tag:r="div",valuenow:o,valuemax:i,striped:l,bgColor:u,valuemin:f,width:d,...p},m)=>{const g=b("progress-bar",u&&`bg-${u}`,l&&"progress-bar-striped",e&&"progress-bar-animated",n),v={width:`${d}%`,...s};return c.jsx(r,{className:g,style:v,ref:m,role:"progressbar",...p,"aria-valuenow":Number(d)??o,"aria-valuemin":Number(f),"aria-valuemax":Number(i),children:t})}),tt=a.forwardRef(({className:e,children:t,tag:n="div",height:s,style:r,...o},i)=>{const l=b("progress",e),u={height:`${s}px`,...r};return c.jsx(n,{className:l,ref:i,style:u,...o,children:a.Children.map(t,f=>{if(!a.isValidElement(f)||f.type!==ue){console.error("Progress component only allows ProgressBar as child");return}else return f})})}),st=e=>{const[t,n]=a.useState(!1),s=a.useMemo(()=>new IntersectionObserver(([r])=>{n(r.isIntersecting)}),[]);return a.useEffect(()=>{if(e.current)return s.observe(e.current),()=>s.disconnect()},[s,e]),t},nt=a.forwardRef(({className:e,size:t,contrast:n,value:s,defaultValue:r,id:o,labelClass:i,wrapperClass:l,wrapperStyle:u,wrapperTag:f="div",label:d,onChange:p,children:m,labelRef:g,labelStyle:v,type:h,onBlur:x,readonly:D=!1,...N},M)=>{var X,_;const[T,y]=a.useState(s||r),[S,R]=a.useState(0),[O,k]=a.useState(!1),B=a.useRef(null),E=st(B);a.useImperativeHandle(M,()=>B.current);const w=a.useRef(null),P=g||w,j=b("form-outline",n&&"form-white",l),L=b("form-control",O&&"active",h==="date"&&"active",t&&`form-control-${t}`,e),W=b("form-label",i);a.useEffect(()=>{if(!B.current)return;const{value:F}=B.current;F!=""?k(!0):k(!1)},[(X=B.current)==null?void 0:X.value]),a.useEffect(()=>{s!==void 0&&(s!=""?k(!0):k(!1))},[s]),a.useEffect(()=>{r!==void 0&&(r!=""?k(!0):k(!1))},[r]);const $=a.useCallback(()=>{var F;(F=P.current)!=null&&F.clientWidth&&R(P.current.clientWidth*.8+8)},[P]);a.useEffect(()=>{$()},[(_=P.current)==null?void 0:_.clientWidth,$,E]);const A=F=>{y(F.target.value),p==null||p(F)},q=a.useCallback(F=>{B.current&&(T!==void 0&&T!=""||s!==void 0&&s!=""||B.current.value!=""?k(!0):k(!1),x&&x(F))},[T,s,x]);return c.jsxs(f,{className:j,style:u,children:[c.jsx("input",{type:h,readOnly:D,className:L,onBlur:q,onChange:A,onFocus:$,value:s,defaultValue:r,id:o,ref:B,...N}),d&&c.jsx("label",{className:W,style:v,htmlFor:o,ref:P,children:d}),c.jsxs("div",{className:"form-notch",children:[c.jsx("div",{className:"form-notch-leading"}),c.jsx("div",{className:"form-notch-middle",style:{width:S}}),c.jsx("div",{className:"form-notch-trailing"})]}),m]})}),ne=({className:e,inputRef:t,labelClass:n,wrapperClass:s,labelStyle:r,wrapperTag:o="div",wrapperStyle:i,label:l,inline:u,btn:f,id:d,btnColor:p,disableWrapper:m,toggleSwitch:g,...v})=>{let h="form-check-input",x="form-check-label";f&&(h="btn-check",p?x=`btn btn-${p}`:x="btn btn-primary");const D=b(l&&!f&&"form-check",u&&!f&&"form-check-inline",g&&"form-switch",s),N=b(h,e),M=b(x,n),T=c.jsxs(c.Fragment,{children:[c.jsx("input",{className:N,id:d,ref:t,...v}),l&&c.jsx("label",{className:M,style:r,htmlFor:d,children:l})]});return c.jsx(c.Fragment,{children:m?T:c.jsx(o,{style:i,className:D,children:T})})},rt=({...e})=>c.jsx(ne,{type:"checkbox",...e}),at=({...e})=>c.jsx(ne,{type:"radio",...e}),de=({className:e,children:t,show:n=!1,id:s,navbar:r,tag:o="div",collapseRef:i,style:l,onShow:u,onHide:f,...d})=>{const[p,m]=a.useState(!1),[g,v]=a.useState(void 0),[h,x]=a.useState(!1),D=b(h?"collapsing":"collapse",!h&&p&&"show",r&&"navbar-collapse",e),N=a.useRef(null),M=i??N,T=a.useCallback(()=>{p&&v(void 0)},[p]);return a.useEffect(()=>{var y;g===void 0&&p&&v((y=M==null?void 0:M.current)==null?void 0:y.scrollHeight)},[g,p,M]),a.useEffect(()=>{p!==n&&(n?u==null||u():f==null||f(),m(n)),p&&x(!0);const y=setTimeout(()=>{x(!1)},350);return()=>{clearTimeout(y)}},[n,p,u,f]),a.useEffect(()=>{var y;v(p?(y=M==null?void 0:M.current)==null?void 0:y.scrollHeight:0)},[p,M,t]),a.useEffect(()=>(window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T)}),[T]),c.jsx(o,{style:{height:g,...l},id:s,className:D,...d,ref:M,children:t})},fe=a.createContext(null),ot=({children:e,isOpen:t=!1,options:n,animation:s=!0,dropup:r,dropright:o,dropleft:i,onHide:l,onShow:u})=>{const[f,d]=a.useState(t),[p,m]=a.useState(null),[g,v]=a.useState(null),[h,x]=a.useState(-1);return c.jsx(fe.Provider,{value:{animation:s,activeIndex:h,isOpenState:f,setReferenceElement:m,setPopperElement:v,setActiveIndex:x,popperElement:g,setIsOpenState:d,referenceElement:p,onHide:l,onShow:u,dropup:r,options:n,dropright:o,dropleft:i},children:e})},ct=e=>e instanceof HTMLElement,lt=e=>e instanceof Node,Z=()=>{const e=a.useContext(fe);if(!e)throw new Error("Missing context data");return e},it=()=>{const{isOpenState:e,setIsOpenState:t,setActiveIndex:n,popperElement:s,referenceElement:r,onHide:o}=Z(),i=a.useCallback(l=>{o==null||o(l),!(!e||!lt(l.target)||s&&s.contains(l.target)||r&&r.contains(l.target)||l.defaultPrevented)&&(t(!1),setTimeout(()=>n(-1),300))},[e,t,n,s,r,o]);a.useEffect(()=>(document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)),[i])},ut=({className:e,tag:t="div",group:n,children:s,dropup:r,dropright:o,dropleft:i,...l})=>{it();const u=b(n?"btn-group":"dropdown",r&&"dropup",o&&"dropend",i&&"dropstart",e);return c.jsx(t,{className:u,...l,children:s})},dt=({animation:e,onHide:t,onShow:n,...s})=>c.jsx(ot,{animation:e,onHide:t,onShow:n,...s,children:c.jsx(ut,{...s})}),ft=({childTag:e,children:t,disabled:n,link:s,divider:r,header:o,href:i="#"})=>{const l=b("dropdown-item",n&&"disabled");return s?e?c.jsx(e,{className:l,children:t}):c.jsx("a",{href:i,className:l,children:t}):r?e?c.jsx(e,{className:"dropdown-divider",children:t}):c.jsx("hr",{className:"dropdown-divider"}):o?e?c.jsx(e,{className:"dropdown-header",children:t}):c.jsx("h6",{className:"dropdown-header",children:t}):c.jsx(c.Fragment,{children:t})};const mt=({onClick:e,tag:t="li",childTag:n,children:s,style:r,link:o,divider:i,header:l,disabled:u,href:f,preventCloseOnClick:d,...p})=>{const{setIsOpenState:m,onHide:g,setActiveIndex:v}=Z(),h=x=>{g==null||g(x),e==null||e(x),!(u||d||x.defaultPrevented)&&(setTimeout(()=>v(-1),300),m(!1))};return c.jsx(t,{style:r,onClick:h,...p,children:c.jsx(ft,{link:o,divider:i,header:l,disabled:u,href:f,childTag:n,children:s})})},ce=(e,t,n)=>n==="up"?e<=0?t[t.length-1].props.divider===!0||t[t.length-1].props.disabled===!0:t[e-1].props.divider===!0||t[e-1].props.disabled===!0:e===t.length-1?t[0].props.divider===!0||t[0].props.disabled===!0:t[e+1].props.divider===!0||t[e+1].props.disabled===!0,pt=e=>{const{activeIndex:t,isOpenState:n,setIsOpenState:s,setActiveIndex:r,onHide:o}=Z(),i=a.useCallback(l=>{const u=["ArrowUp","ArrowDown","Tab","Enter","Escape"];if(!(!Array.isArray(e)||!u.includes(l.key))){if(ct(document.activeElement)&&document.activeElement.blur(),l.key==="ArrowUp"){l.preventDefault();const f=ce(t,e,"up");if(t===1){r(f?e.length-1:0);return}if(t<=0){r(f?e.length-2:e.length-1);return}r(d=>f?d-2:d-1)}if(l.key==="ArrowDown"||l.key==="Tab"){l.preventDefault();const f=ce(t,e,"down");if(t===e.length-2){r(d=>f?0:d+1);return}if(t===e.length-1){r(f?1:0);return}r(d=>f?d+2:d+1)}if(l.key==="Enter"){const f=document.querySelector('[data-active="true"]'),d=f==null?void 0:f.firstElementChild;if(d)return d.click();if(o==null||o(l),l.defaultPrevented)return;s(!1),setTimeout(()=>r(-1),300)}if(l.key==="Escape"){if(o==null||o(l),l.defaultPrevented)return;s(!1),setTimeout(()=>r(-1),300)}}},[e,s,r,t,o]);a.useEffect(()=>(n&&document.addEventListener("keydown",i),()=>{n&&document.removeEventListener("keydown",i)}),[n,i]),a.useEffect(()=>{const l=document.querySelector('[data-active="true"]'),u=l==null?void 0:l.firstElementChild;return u==null||u.focus(),()=>u==null?void 0:u.blur()},[t])},bt=()=>{const{isOpenState:e}=Z(),[t,n]=a.useState(!1),[s,r]=a.useState(!1),[o,i]=a.useState(e);return a.useEffect(()=>{let l;return e||(r(!0),n(!1),l=setTimeout(()=>{r(!1),i(!1)},300)),e&&(n(!0),r(!1),i(!0),l=setTimeout(()=>{n(!1)},300)),()=>clearTimeout(l)},[e]),{show:o,isFadeIn:t,isFadeOut:s}};const gt=({className:e,tag:t="ul",children:n,style:s,dark:r,responsive:o="",appendToBody:i=!1,alwaysOpen:l,...u})=>{const{activeIndex:f,setPopperElement:d,isOpenState:p,animation:m,referenceElement:g,popperElement:v,options:h,dropleft:x,dropup:D,dropright:N}=Z(),{show:M,isFadeIn:T,isFadeOut:y}=bt();pt(n);const S=()=>{if(N)return"right-start";if(x)return"left-start";const B=v&&getComputedStyle(v).getPropertyValue("--mdb-position").trim()==="end";return D?B?"top-end":"top-start":B?"bottom-end":"bottom-start"},{styles:R}=se.usePopper(g,v,{placement:S(),modifiers:[pe.flip],...h}),O=b("dropdown-menu",r&&"dropdown-menu-dark",p&&"show",m&&"animation",T&&"fade-in",y&&"fade-out",o&&`dropdown-menu-${o}`,e);if(!M&&!l)return null;const k=c.jsx(t,{className:O,style:{position:"absolute",zIndex:1e3,...R.popper,...s},ref:d,...u,children:a.Children.map(n,(B,E)=>a.cloneElement(B,{tabIndex:1,"data-active":f===E&&!0,className:b(f===E?"active":"",B.props.className)}))});return c.jsx(c.Fragment,{children:i?Q.createPortal(k,document.body):k})},vt=({className:e,tag:t=ee,children:n,onClick:s,split:r,...o})=>{const{setIsOpenState:i,setReferenceElement:l,isOpenState:u,setActiveIndex:f,onHide:d,onShow:p}=Z(),m=b("dropdown-toggle",r&&"dropdown-toggle-split",e),g=v=>{s==null||s(v),u?d==null||d(v):p==null||p(v),!v.defaultPrevented&&(i(h=>!h),setTimeout(()=>f(-1),300))};return c.jsx(t,{onClick:g,ref:l,className:m,"aria-expanded":!!u,...o,children:n})},xt=({className:e,btnClassName:t,btnChildren:n,children:s,tag:r=ee,onShow:o,onHide:i,popperTag:l="div",isOpen:u,placement:f="bottom",dismiss:d,options:p,poperStyle:m,onClick:g,...v})=>{const[h,x]=a.useState(),[D,N]=a.useState(),{styles:M,attributes:T}=se.usePopper(h,D,{placement:f,...p}),[y,S]=a.useState(u??!1),[R,O]=a.useState(!1),[k,B]=a.useState(!1),E=b("popover fade",R&&y&&"show",`bs-popover-${f==="left"?"start":f==="right"?"end":f}`,e),w=j=>{y&&!d?i==null||i():y||o==null||o(),d?(B(!0),S(!0)):S(!y),g&&g(j)};a.useEffect(()=>{u||S(!1)},[u]);const P=a.useCallback(j=>{k&&D&&D!==null&&y&&h&&h!==null&&(h.contains(j.target)||(S(!1),i==null||i()))},[k,y,D,h,i]);return a.useEffect(()=>{const j=setTimeout(()=>{O(y)},150);return()=>{clearTimeout(j)}},[y]),a.useEffect(()=>(y&&document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P)}),[P,y]),c.jsxs(c.Fragment,{children:[c.jsx(r,{onClick:w,className:t,...v,ref:x,children:n}),(R||y)&&Q.createPortal(c.jsx(l,{className:E,ref:N,style:{...M.popper,...m},...T.popper,children:s}),document.body)]})},ht=({className:e,children:t,tag:n="div",...s})=>{const r=b("popover-body",e);return c.jsx(n,{className:r,...s,children:t})},yt=({className:e,children:t,tag:n="h3",...s})=>{const r=b("popover-header",e);return c.jsx(n,{className:r,...s,children:t})},Bt=({animationDirection:e,appendToBody:t,backdrop:n=!0,children:s,className:r,closeOnEsc:o=!0,setShow:i,leaveHiddenModal:l=!0,modalRef:u,onHide:f,onHidePrevented:d,onShow:p,show:m,staticBackdrop:g,nonInvasive:v=!1,tag:h="div",...x})=>{const[D,N]=a.useState(m),[M,T]=a.useState(m),[y,S]=a.useState(m),[R,O]=a.useState(!1),[k,B]=a.useState(0),[E,w]=a.useState([]),P=a.useRef(null),j=u||P,L=b("modal",R&&"modal-static",e,"fade",M&&"show",D&&v&&"modal-non-invasive-show",r),W=b("modal-backdrop","fade",D&&"show"),$=a.useCallback(()=>{T(F=>(F&&(f==null||f()),!1)),setTimeout(()=>{N(!1),i==null||i(!1)},150),setTimeout(()=>{S(!1)},350)},[f,i]),A=a.useCallback(F=>{v||M&&F.target===j.current&&(g?(O(!0),d==null||d(),setTimeout(()=>{O(!1)},300)):$())},[M,j,g,$,d,v]),q=a.useCallback(F=>{M&&F.key==="Tab"&&(F.preventDefault(),B(k+1)),o&&M&&F.key==="Escape"&&(g?(O(!0),d==null||d(),setTimeout(()=>{O(!1)},300)):$())},[M,o,k,g,$,d]);a.useEffect(()=>{var V;const F=(V=j.current)==null?void 0:V.querySelectorAll("button, a, input, select, textarea, [tabindex]"),Y=Array.from(F).filter(C=>C.tabIndex!==-1).sort((C,I)=>C.tabIndex===I.tabIndex?0:I.tabIndex===null?-1:C.tabIndex===null?1:C.tabIndex-I.tabIndex);w(Y),B(Y.length-1)},[j]),a.useEffect(()=>{E&&E.length>0&&(k===E.length?(E[0].focus(),B(0)):E[k].focus())},[k,E]),a.useEffect(()=>{const F=()=>{const V=document.documentElement.clientWidth;return Math.abs(window.innerWidth-V)},Y=window.innerWidth>document.documentElement.clientWidth&&window.innerWidth>=576;if(y&&Y&&!v){const V=F();document.body.classList.add("modal-open"),document.body.style.overflow="hidden",document.body.style.paddingRight=`${V}px`}else document.body.classList.remove("modal-open"),document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.classList.remove("modal-open"),document.body.style.overflow="",document.body.style.paddingRight=""}},[y,v]),a.useEffect(()=>{m?(p==null||p(),S(!0),setTimeout(()=>{N(!0)},0),setTimeout(()=>{T(!0),i==null||i(!0)},150)):$()},[m,$,i,p]),a.useEffect(()=>{const F=Y=>{Y.target.closest(".modal-dialog")||window.addEventListener("mouseup",A,{once:!0})};return window.addEventListener("mousedown",F),window.addEventListener("keydown",q),()=>{window.removeEventListener("mousedown",F),window.removeEventListener("keydown",q)}},[q,A]);const X=c.jsx(c.Fragment,{children:(l||m||y)&&Q.createPortal(c.jsxs(c.Fragment,{children:[c.jsx(h,{className:L,ref:j,style:{display:y||m?"block":"none",pointerEvents:v?"none":"initial"},...x,children:s}),Q.createPortal(n&&y&&!v&&c.jsx("div",{className:W}),document.body)]}),document.body)}),_=c.jsx(c.Fragment,{children:(l||m||y)&&c.jsxs(c.Fragment,{children:[c.jsx(h,{className:L,ref:j,style:{display:y||m?"block":"none",pointerEvents:v?"none":"initial"},...x,children:s}),Q.createPortal(n&&y&&!v&&c.jsx("div",{onClick:$,className:W}),document.body)]})});return c.jsx(c.Fragment,{children:t?X:_})},Mt=a.forwardRef(({className:e,centered:t,children:n,size:s,scrollable:r,tag:o="div",...i},l)=>{const u=b("modal-dialog",r&&"modal-dialog-scrollable",t&&"modal-dialog-centered",s&&`modal-${s}`,e);return c.jsx(o,{className:u,...i,ref:l,children:n})}),Dt=a.forwardRef(({className:e,children:t,tag:n="div",...s},r)=>{const o=b("modal-content",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),jt=a.forwardRef(({className:e,children:t,tag:n="div",...s},r)=>{const o=b("modal-header",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),Nt=a.forwardRef(({className:e,children:t,tag:n="h5",...s},r)=>{const o=b("modal-title",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),wt=a.forwardRef(({className:e,children:t,tag:n="div",...s},r)=>{const o=b("modal-body",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),Et=a.forwardRef(({className:e,children:t,tag:n="div",...s},r)=>{const o=b("modal-footer",e);return c.jsx(n,{className:o,...s,ref:r,children:t})}),re=a.createContext({activeElement:null,setTargets:null}),Ct=({container:e=typeof window!==void 0?window:null,className:t,children:n,offset:s=10,...r})=>{const o=b("sticky-top",t),[i,l]=a.useState(null),[u,f]=a.useState([]),d=e instanceof Window,p=a.useCallback(()=>{var D,N,M;if(!u.length)return;const m=d?window.pageYOffset:(D=e==null?void 0:e.current)==null?void 0:D.scrollTop,g=Number(s),v=(N=u[u.length-1])==null?void 0:N.current,h=(M=u[0])==null?void 0:M.current;m+g{var k;const S=(k=u[y+1])==null?void 0:k.current,R=T.current;if(m>R.offsetTop-g&&m<(S==null?void 0:S.offsetTop)-g){l(R);return}}),m>v.offsetTop-g&&l(v)},[s,u,d,e]);return a.useEffect(()=>{const m=d?e:e==null?void 0:e.current;return p(),m==null||m.addEventListener("scroll",p),()=>{m==null||m.removeEventListener("scroll",p)}},[p,e,d]),c.jsx("div",{className:o,...r,children:c.jsx("ul",{className:"nav flex-column nav-pills menu-sidebar",children:c.jsx(re.Provider,{value:{activeElement:i,setTargets:f},children:n})})})},Tt=({className:e,collapsible:t,targetRef:n,children:s,subsections:r,onClick:o,onActivate:i,...l})=>{var h;const{activeElement:u,setTargets:f}=a.useContext(re),d=()=>r==null?void 0:r.some(x=>x.current.id===(u==null?void 0:u.id)),p=(u==null?void 0:u.id)===((h=n.current)==null?void 0:h.id),m=p||d();p&&(i==null||i(u==null?void 0:u.id));const g=b("nav-link",t&&"collapsible-scrollspy",m&&"active",e),v=x=>{const D=n==null?void 0:n.current;D==null||D.scrollIntoView({behavior:"smooth"}),o==null||o(x)};return a.useEffect(()=>{f(x=>[...x,n])},[f,n]),c.jsx("li",{className:"nav-item",style:{cursor:"pointer"},children:c.jsx("a",{className:g,onClick:v,...l,children:s})})},Rt=({collapsible:e,className:t,children:n,style:s,...r})=>{const[o,i]=a.useState("0px"),{activeElement:l}=a.useContext(re),u=b("nav flex-column",t),f=a.useRef(null);a.useEffect(()=>{const p=()=>e==null?void 0:e.some(g=>g.current.id===(l==null?void 0:l.id)),m=f.current;p()?i(`${m==null?void 0:m.scrollHeight}px`):i("0px")},[l,e]);const d={overflow:"hidden",height:o,transition:"height .5s ease",flexWrap:"nowrap",...s};return c.jsx("ul",{className:u,ref:f,style:e?d:s,...r,children:n})},$t=({...e})=>c.jsx(ne,{type:"checkbox",toggleSwitch:!0,...e}),It=({value:e,min:t="0",max:n="100",showThumb:s})=>{const r=Number(e),[o,i]=a.useState((r||0-Number(t))*100/(Number(n)-Number(t))),l=b("thumb",s&&"thumb-active");return a.useEffect(()=>{i((Number(e)-Number(t))*100/(Number(n)-Number(t)))},[e,n,t]),c.jsx("span",{className:l,style:{left:`calc(${o}% + (${8-o*.15}px))`},children:c.jsx("span",{className:"thumb-value",children:e})})},kt=({className:e,defaultValue:t=0,disableTooltip:n,labelId:s,max:r,min:o,onMouseDown:i,onMouseUp:l,onTouchStart:u,onTouchEnd:f,onChange:d,labelClass:p,value:m,label:g,id:v,inputRef:h,...x})=>{const[D,N]=a.useState(t),[M,T]=a.useState(!1),y=b("form-range",e),S=b("form-label",p),R=w=>{T(!0),i&&i(w)},O=w=>{T(!1),l&&l(w)},k=w=>{T(!0),u&&u(w)},B=w=>{T(!1),f&&f(w)},E=w=>{N(w.target.value),d&&d(w)};return c.jsxs(c.Fragment,{children:[g&&c.jsx("label",{className:S,id:s,htmlFor:v,children:g}),c.jsxs("div",{className:"range",children:[c.jsx("input",{type:"range",onMouseDown:R,onMouseUp:O,onTouchStart:k,onTouchEnd:B,onChange:E,className:y,value:m||D,id:v,min:o,max:r,ref:h,...x}),!n&&c.jsx(It,{value:m||D,showThumb:M,min:o,max:r})]})]})},St=({className:e,labelClass:t,labelStyle:n,inputRef:s,size:r,label:o,id:i,...l})=>{const u=b("form-control",`form-control-${r}`,e),f=b("form-label",t);return c.jsxs(c.Fragment,{children:[o&&c.jsx("label",{className:f,style:n,htmlFor:i,children:o}),c.jsx("input",{className:u,type:"file",id:i,ref:s,...l})]})},Lt=a.forwardRef(({className:e,children:t,noBorder:n,textBefore:s,textAfter:r,noWrap:o,tag:i="div",textTag:l="span",textClass:u,size:f,textProps:d,...p},m)=>{const g=b("input-group",o&&"flex-nowrap",f&&`input-group-${f}`,e),v=b("input-group-text",n&&"border-0",u),h=x=>c.jsx(c.Fragment,{children:x&&Array.isArray(x)?x.map((D,N)=>c.jsx(l,{className:v,...d,children:D},N)):c.jsx(l,{className:v,...d,children:x})});return c.jsxs(i,{className:g,ref:m,...p,children:[s&&h(s),t,r&&h(r)]})}),Ot=a.forwardRef(({className:e,children:t,isValidated:n,onReset:s,onSubmit:r,noValidate:o=!0,...i},l)=>{const[u,f]=a.useState(n),d=b("needs-validation",u&&"was-validated",e),p=g=>{g.preventDefault(),f(!0),r&&r(g)},m=g=>{g.preventDefault(),f(!1),s&&s(g)};return c.jsx("form",{className:d,onSubmit:p,onReset:m,ref:l,noValidate:o,...i,children:t})}),Pt=a.forwardRef(({className:e,fill:t,pills:n,justify:s,children:r,...o},i)=>{const l=b("nav",n?"nav-pills":"nav-tabs",t&&"nav-fill",s&&"nav-justified",e);return c.jsx("ul",{className:l,ref:i,...o,children:r})}),Ft=a.forwardRef(({className:e,children:t,style:n,tag:s="li",...r},o)=>{const i=b("nav-item",e);return c.jsx(s,{className:i,style:{cursor:"pointer",...n},role:"presentation",ref:o,...r,children:t})}),At=a.forwardRef(({className:e,color:t,active:n,onShow:s,onHide:r,children:o,...i},l)=>{const u=b("nav-link",n&&"active",t&&`bg-${t}`,e);return a.useEffect(()=>{n?s==null||s():r==null||r()},[n]),c.jsx("a",{className:u,ref:l,...i,children:o})}),Wt=a.forwardRef(({className:e,tag:t="div",children:n,...s},r)=>{const o=b("tab-content",e);return c.jsx(t,{className:o,ref:r,...s,children:n})}),Xt=a.forwardRef(({className:e,tag:t="div",show:n,children:s,...r},o)=>{const[i,l]=a.useState(!1),u=b("tab-pane","fade",i&&"show",n&&"active",e);return a.useEffect(()=>{let f;return n?f=setTimeout(()=>{l(!0)},100):l(!1),()=>{clearTimeout(f)}},[n]),c.jsx(t,{className:u,role:"tabpanel",ref:o,...r,children:s})}),ae=a.createContext({active:0}),qt=({imagesCount:e,to:t})=>{const{active:n}=a.useContext(ae);return c.jsx("ol",{className:"carousel-indicators",children:Array.from(Array(e)).map((s,r)=>c.jsx("li",{"data-mdb-target":r,className:b(n===r&&"active"),onClick:()=>t(r)},r))})},_t=({move:e})=>c.jsxs(c.Fragment,{children:[c.jsxs("a",{role:"button",className:"carousel-control-prev",onClick:()=>e("prev"),children:[c.jsx("span",{className:"carousel-control-prev-icon"}),c.jsx("span",{className:"visually-hidden",children:"Previous"})]}),c.jsxs("a",{role:"button",className:"carousel-control-next",onClick:()=>e("next"),children:[c.jsx("span",{className:"carousel-control-next-icon"}),c.jsx("span",{className:"visually-hidden",children:"Next"})]})]}),Gt=e=>{const t=getComputedStyle(e),n=getComputedStyle(e==null?void 0:e.parentNode);return t.display!=="none"&&n.display!=="none"&&t.visibility!=="hidden"},Yt=e=>Array.from(e==null?void 0:e.querySelectorAll(".carousel-item")),Vt=e=>e.offsetHeight,Kt=(e,t,n=!0)=>{if(!n){le(e);return}const s=Ut(t);t.addEventListener("transitionend",()=>le(e),{once:!0}),Qt(t,s)},le=e=>{typeof e=="function"&&e()},Ut=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const s=Number.parseFloat(t),r=Number.parseFloat(n);return!s&&!r?0:(t=t.split(",")[0],n=n.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(n))*1e3)},Jt=e=>{e.dispatchEvent(new Event("transitionend"))},Qt=(e,t)=>{let n=!1;const r=t+5;function o(){n=!0,e.removeEventListener("transitionend",o)}e.addEventListener("transitionend",o),setTimeout(()=>{n||Jt(e)},r)},Zt=({fade:e=!1,className:t,carouselInnerClassName:n,dark:s,children:r,interval:o=5e3,keyboard:i=!1,touch:l=!0,showControls:u,showIndicators:f,onSlide:d,...p})=>{const m=a.useRef([]),g=a.useRef(null),v=a.useRef(0),h=a.useRef(!1),[x,D]=a.useState(0),[N,M]=a.useState(0),[T,y]=a.useState({initialX:0,initialY:0}),[S,R]=a.useState(!1),O=a.useRef(null),k=b("carousel","slide",e&&"carousel-fade",s&&"carousel-dark",t),B=b("carousel-inner",n),E=a.useCallback((C,I)=>{if(I!==void 0)v.current=I,D(I);else{const G=x===N-1?0:x+1,U=x===0?N-1:x-1;v.current=C==="next"?G:U,D(C==="next"?G:U)}},[x,N]),w=a.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),P=a.useCallback((C,I,G)=>{var oe;if(!m.current||m.current.length<2)return;R(!0);const K=m.current[x],J=Boolean(g.current),z=C==="next",H=z?"carousel-item-start":"carousel-item-end",te=z?"carousel-item-next":"carousel-item-prev";if(I.classList.contains("active")){h.current=!1;return}E(C,G),!(!K||!I)&&(h.current=!0,J&&w(),(oe=O.current)!=null&&oe.classList.contains("slide")?(I.classList.add(te),Vt(I),K.classList.add(H),I.classList.add(H),Kt(()=>{R(!1),I.classList.remove(H,te),I.classList.add("active"),K.classList.remove("active",te,H),h.current=!1},K,!0)):(K.classList.remove("active"),I.classList.add("active"),h.current=!1))},[O,x,E,w]),j=C=>{h.current||(h.current=!0,setTimeout(()=>{h.current=!1},C))},L=a.useCallback(C=>{const I=C==="prev",K=(v.current+(I?-1:1))%N,J=m.current;return K===-1?J[N-1]:J[K]},[N]),W=C=>{const I=v.current,G=C>I?"next":"prev",U=m.current;return{direction:G,nextElement:U[C]}},$=C=>{if(h.current||(j(700),C>N-1||C<0))return;const{direction:I,nextElement:G}=W(C);P(I,G,C)},A=a.useCallback(C=>{if(h.current)return;j(600);const I=L(C);P(C,I)},[L,P]),q=a.useCallback(()=>{const{visibilityState:C,hidden:I}=document;if(C)return I||!Gt(O.current)?void 0:A("next");A("next")},[O,A]),X=a.useCallback(()=>{var I,G;const C=(G=(I=r==null?void 0:r[x])==null?void 0:I.props)==null?void 0:G.interval;g.current&&(clearInterval(g.current),g.current=null),g.current=setInterval(q,C||o)},[q,o,r,x]),_=C=>{l&&y({initialX:C.touches[0].clientX,initialY:C.touches[0].clientY})},F=C=>{h.current=!0;const{initialX:I,initialY:G}=T;if(!I||!G)return;const U=C.touches[0].clientX,K=C.touches[0].clientY,J=I-U,z=G-K;Math.abs(J)>Math.abs(z)&&(J>0?A("prev"):A("next")),y({initialX:0,initialY:0})},Y=()=>{h.current=!1},V=a.useCallback(C=>{switch(C.key){case"ArrowLeft":C.preventDefault(),A("prev");break;case"ArrowRight":C.preventDefault(),A("next");break}},[A]);return a.useEffect(()=>{if(i)return window.addEventListener("keydown",V),()=>{window.removeEventListener("keydown",V)}},[V,i]),a.useEffect(()=>{const C=O.current,I=Yt(C);m.current=I,M(I.length)},[O]),a.useEffect(()=>{S&&(d==null||d())},[S,d]),a.useEffect(()=>(X(),()=>{w()}),[X,w]),c.jsx("div",{onTouchStart:_,onTouchMove:F,onTouchEnd:Y,onMouseEnter:w,onMouseLeave:X,className:k,ref:O,...p,children:c.jsx("div",{className:B,children:c.jsxs(ae.Provider,{value:{active:x},children:[f&&c.jsx(qt,{to:$,imagesCount:N}),r,u&&c.jsx(_t,{move:A})]})})})},zt=({className:e,captionClassName:t,children:n,src:s,alt:r,itemId:o,video:i,...l})=>{const{active:u}=a.useContext(ae),f=a.useRef(!0),d=a.useRef(null),p=b("carousel-caption d-none d-md-block",t);return a.useEffect(()=>{if(f.current&&u===o-1){const m=d.current;m==null||m.classList.add("active")}f.current=!1},[u,o]),c.jsxs("div",{className:"carousel-item",ref:d,children:[i?c.jsx("video",{className:e,autoPlay:!0,loop:!0,muted:!0,...l,children:c.jsx("source",{src:s,type:"video/mp4"})}):c.jsx("img",{className:e,src:s,alt:r,...l}),c.jsx("div",{className:p,children:n})]})},me=a.createContext({activeItem:0,setActiveItem:null,alwaysOpen:!1,initialActive:0}),Ht=a.forwardRef(({alwaysOpen:e,borderless:t,className:n,flush:s,initialActive:r=0,tag:o="div",children:i,onChange:l,...u},f)=>{const d=b("accordion",s&&"accordion-flush",t&&"accordion-borderless",n),[p,m]=a.useState(r);return a.useEffect(()=>{p&&l&&l(p)},[l,p]),c.jsx(o,{className:d,ref:f,...u,children:c.jsx(me.Provider,{value:{activeItem:p,setActiveItem:m,alwaysOpen:e,initialActive:r},children:i})})}),es=a.forwardRef(({className:e,bodyClassName:t,bodyStyle:n,headerClassName:s,collapseId:r,headerTitle:o,headerStyle:i,btnClassName:l,tag:u="div",children:f,...d},p)=>{const{activeItem:m,setActiveItem:g,alwaysOpen:v,initialActive:h}=a.useContext(me),[x,D]=a.useState(h),N=b("accordion-item",e),M=b("accordion-header",s),T=b("accordion-body",t),y=b("accordion-button",v?r!==x&&"collapsed":r!==m&&"collapsed",l),S=R=>{v?D(R!==x?R:0):g(R!==m?R:0)};return c.jsxs(u,{className:N,ref:p,...d,children:[c.jsx("h2",{className:M,style:i,children:c.jsx("button",{onClick:()=>S(r),className:y,type:"button",children:o})}),c.jsx(de,{id:r.toString(),show:v?x===r:m===r,children:c.jsx("div",{className:T,style:n,children:f})})]})}),ts=({className:e,size:t,contrast:n,value:s,defaultValue:r,id:o,labelClass:i,wrapperClass:l,wrapperStyle:u,wrapperTag:f="div",label:d,onChange:p,children:m,labelRef:g,labelStyle:v,inputRef:h,onBlur:x,readonly:D=!1,...N})=>{var q;const M=a.useRef(null),T=a.useRef(null),y=g||M,S=h||T,[R,O]=a.useState(s||r),[k,B]=a.useState(0),[E,w]=a.useState(s!==void 0&&s.length>0||r!==void 0&&r.length>0),P=b("form-outline",n&&"form-white",l),j=b("form-control",E&&"active",t&&`form-control-${t}`,e),L=b("form-label",i);a.useEffect(()=>{var X;y.current&&((X=y.current)==null?void 0:X.clientWidth)!==0&&B(y.current.clientWidth*.8+8)},[y,(q=y.current)==null?void 0:q.clientWidth]);const W=()=>{y.current&&B(y.current.clientWidth*.8+8)};a.useEffect(()=>{s!==void 0&&(s.length>0?w(!0):w(!1))},[s]),a.useEffect(()=>{r!==void 0&&(r.length>0?w(!0):w(!1))},[r]);const $=X=>{O(X.currentTarget.value),p&&p(X)},A=a.useCallback(X=>{R!==void 0&&R.length>0||s!==void 0&&s.length>0?w(!0):w(!1),x&&x(X)},[R,s,x]);return c.jsxs(f,{className:P,style:{...u},children:[c.jsx("textarea",{readOnly:D,className:j,onBlur:A,onChange:$,onFocus:W,defaultValue:r,value:s,id:o,ref:S,...N}),d&&c.jsx("label",{className:L,style:v,htmlFor:o,ref:y,children:d}),c.jsxs("div",{className:"form-notch",children:[c.jsx("div",{className:"form-notch-leading"}),c.jsx("div",{className:"form-notch-middle",style:{width:k}}),c.jsx("div",{className:"form-notch-trailing"})]}),m]})},ss=({children:e,invalid:t,feedback:n="Looks good!",tooltip:s,tag:r="div",...o})=>{const[i,l]=a.useState(null),u=a.useRef(null),f=b(t?`invalid-${s?"tooltip":"feedback"}`:`valid-${s?"tooltip":"feedback"}`);return a.useEffect(()=>{var p,m;const d=(m=(p=u.current)==null?void 0:p.querySelector("input, textarea"))==null?void 0:m.parentElement;d&&l(d)},[]),c.jsxs(r,{ref:u,...o,children:[i&&Q.createPortal(c.jsx("div",{className:f,children:n}),i),e]})};exports.MDBAccordion=Ht;exports.MDBAccordionItem=es;exports.MDBBadge=ve;exports.MDBBreadcrumb=Ae;exports.MDBBreadcrumbItem=We;exports.MDBBtn=ee;exports.MDBBtnGroup=ye;exports.MDBCard=Me;exports.MDBCardBody=Ee;exports.MDBCardFooter=Ce;exports.MDBCardGroup=Ie;exports.MDBCardHeader=De;exports.MDBCardImage=Te;exports.MDBCardLink=$e;exports.MDBCardOverlay=Re;exports.MDBCardSubTitle=je;exports.MDBCardText=we;exports.MDBCardTitle=Ne;exports.MDBCarousel=Zt;exports.MDBCarouselItem=zt;exports.MDBCheckbox=rt;exports.MDBCol=ge;exports.MDBCollapse=de;exports.MDBContainer=be;exports.MDBDropdown=dt;exports.MDBDropdownItem=mt;exports.MDBDropdownMenu=gt;exports.MDBDropdownToggle=vt;exports.MDBFile=St;exports.MDBFooter=Ue;exports.MDBIcon=Pe;exports.MDBInput=nt;exports.MDBInputGroup=Lt;exports.MDBListGroup=ke;exports.MDBListGroupItem=Se;exports.MDBModal=Bt;exports.MDBModalBody=wt;exports.MDBModalContent=Dt;exports.MDBModalDialog=Mt;exports.MDBModalFooter=Et;exports.MDBModalHeader=jt;exports.MDBModalTitle=Nt;exports.MDBNavbar=qe;exports.MDBNavbarBrand=Ge;exports.MDBNavbarItem=Ye;exports.MDBNavbarLink=_e;exports.MDBNavbarNav=Ve;exports.MDBNavbarToggler=Ke;exports.MDBPagination=Je;exports.MDBPaginationItem=Ze;exports.MDBPaginationLink=Qe;exports.MDBPopover=xt;exports.MDBPopoverBody=ht;exports.MDBPopoverHeader=yt;exports.MDBProgress=tt;exports.MDBProgressBar=ue;exports.MDBRadio=at;exports.MDBRange=kt;exports.MDBRipple=ie;exports.MDBRow=Oe;exports.MDBScrollspy=Ct;exports.MDBScrollspyLink=Tt;exports.MDBScrollspySubList=Rt;exports.MDBSpinner=Be;exports.MDBSwitch=$t;exports.MDBTable=ze;exports.MDBTableBody=et;exports.MDBTableHead=He;exports.MDBTabs=Pt;exports.MDBTabsContent=Wt;exports.MDBTabsItem=Ft;exports.MDBTabsLink=At;exports.MDBTabsPane=Xt;exports.MDBTextArea=ts;exports.MDBTooltip=Le;exports.MDBTypography=Fe;exports.MDBValidation=Ot;exports.MDBValidationItem=ss; diff --git a/dist/types/free/components/Carousel/CarouselItem/types.d.ts b/dist/types/free/components/Carousel/CarouselItem/types.d.ts index 0fac64eb..f8e6709f 100644 --- a/dist/types/free/components/Carousel/CarouselItem/types.d.ts +++ b/dist/types/free/components/Carousel/CarouselItem/types.d.ts @@ -4,5 +4,6 @@ type CarouselItemProps = ImgVideo & { captionClassName?: string; itemId: number; video?: boolean; + interval?: number; }; export { CarouselItemProps }; diff --git a/dist/types/free/components/Carousel/types.d.ts b/dist/types/free/components/Carousel/types.d.ts index ee2d0f4f..a6870a6e 100644 --- a/dist/types/free/components/Carousel/types.d.ts +++ b/dist/types/free/components/Carousel/types.d.ts @@ -9,5 +9,6 @@ interface CarouselProps extends BaseComponent { showControls?: boolean; showIndicators?: boolean; touch?: boolean; + carouselInnerClassName?: string; } export { CarouselProps }; diff --git a/dist/types/free/navigation/Tabs/TabsItem/types.d.ts b/dist/types/free/navigation/Tabs/TabsItem/types.d.ts index 1104a2ea..7564e4ef 100644 --- a/dist/types/free/navigation/Tabs/TabsItem/types.d.ts +++ b/dist/types/free/navigation/Tabs/TabsItem/types.d.ts @@ -1,4 +1,5 @@ interface TabsItemProps extends React.LiHTMLAttributes { ref?: React.Ref; + tag?: React.ComponentProps; } export { TabsItemProps }; diff --git a/dist/types/utils/hooks.d.ts b/dist/types/utils/hooks.d.ts new file mode 100644 index 00000000..8cf3bf7d --- /dev/null +++ b/dist/types/utils/hooks.d.ts @@ -0,0 +1,3 @@ +import { RefObject } from 'react'; +declare const useOnScreen: (ref: RefObject) => boolean; +export { useOnScreen }; diff --git a/package.json b/package.json index 9710c5bb..ae145346 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mdb-react-ui-kit", - "version": "6.1.0", + "version": "6.2.0", "main": "./dist/mdb-react-ui-kit.js", "module": "./dist/mdb-react-ui-kit.esm.js", "types": "./dist/types/index-free.d.ts",