{"version":3,"sources":["webpack:///../node_modules/grommet/es6/utils/general-prop-types.js","webpack:///../node_modules/grommet/es6/components/Accordion/propTypes.js","webpack:///../node_modules/grommet/es6/utils/animation.js","webpack:///../node_modules/grommet/es6/utils/mixins.js","webpack:///../node_modules/grommet/es6/utils/colors.js","webpack:///../node_modules/grommet/es6/utils/background.js","webpack:///../node_modules/grommet/es6/utils/border.js","webpack:///../node_modules/grommet/es6/utils/dates.js","webpack:///../node_modules/grommet/es6/utils/DOM.js","webpack:///../node_modules/grommet/es6/utils/graphics.js","webpack:///../node_modules/grommet/es6/utils/icon.js","webpack:///../node_modules/grommet/es6/utils/responsive.js","webpack:///../node_modules/grommet/es6/utils/styles.js","webpack:///../node_modules/grommet/es6/utils/object.js","webpack:///../node_modules/grommet/es6/utils/pagination.js","webpack:///../node_modules/grommet/es6/utils/PortalContext.js","webpack:///../node_modules/grommet/es6/utils/refs.js","webpack:///../node_modules/grommet/es6/utils/use-keyboard.js","webpack:///../node_modules/grommet/es6/utils/index.js","webpack:///../node_modules/grommet/es6/themes/base.js","webpack:///../node_modules/grommet/es6/default-props.js","webpack:///../node_modules/grommet/es6/components/Keyboard/propTypes.js","webpack:///../node_modules/grommet/es6/components/Keyboard/Keyboard.js","webpack:///../node_modules/grommet/es6/components/Box/StyledBox.js","webpack:///../node_modules/grommet/es6/components/Box/propTypes.js","webpack:///../node_modules/grommet/es6/components/Skeleton/propTypes.js","webpack:///../node_modules/grommet/es6/components/Skeleton/SkeletonContext.js","webpack:///../node_modules/grommet/es6/components/Skeleton/StyledSkeleton.js","webpack:///../node_modules/grommet/es6/components/Skeleton/Skeleton.js","webpack:///../node_modules/grommet/es6/components/Skeleton/index.js","webpack:///../node_modules/grommet/es6/contexts/AnnounceContext/propTypes.js","webpack:///../node_modules/grommet/es6/contexts/AnnounceContext/AnnounceContext.js","webpack:///../node_modules/grommet/es6/contexts/OptionsContext.js","webpack:///../node_modules/grommet/es6/components/Box/Box.js","webpack:///../node_modules/grommet/es6/components/Accordion/AccordionContext.js","webpack:///../node_modules/grommet/es6/components/Accordion/Accordion.js","webpack:///../node_modules/grommet/es6/components/Button/propTypes.js","webpack:///../node_modules/grommet/es6/contexts/MessageContext/MessageContext.js","webpack:///../node_modules/grommet/es6/contexts/ContainerTargetContext/ContainerTargetContext.js","webpack:///../node_modules/grommet/es6/contexts/RootsContext.js","webpack:///../node_modules/grommet/es6/components/FocusedContainer.js","webpack:///../node_modules/grommet/es6/components/Drop/StyledDrop.js","webpack:///../node_modules/grommet/es6/components/Drop/DropContainer.js","webpack:///../node_modules/grommet/es6/components/Drop/propTypes.js","webpack:///../node_modules/grommet/es6/components/Drop/Drop.js","webpack:///../node_modules/grommet/es6/components/Tip/propTypes.js","webpack:///../node_modules/grommet/es6/components/Tip/Tip.js","webpack:///../node_modules/grommet/es6/utils/use-isomorphic-layout-effect.js","webpack:///../node_modules/grommet/es6/components/Stack/StyledStack.js","webpack:///../node_modules/grommet/es6/components/Stack/propTypes.js","webpack:///../node_modules/grommet/es6/components/Stack/Stack.js","webpack:///../node_modules/grommet/es6/components/Text/StyledText.js","webpack:///../node_modules/grommet/es6/components/Text/propTypes.js","webpack:///../node_modules/grommet/es6/components/Text/TextSkeleton.js","webpack:///../node_modules/grommet/es6/components/Text/TextContext.js","webpack:///../node_modules/grommet/es6/components/Text/Text.js","webpack:///../node_modules/grommet/es6/components/Button/Badge.js","webpack:///../node_modules/grommet/es6/components/Button/StyledButton.js","webpack:///../node_modules/grommet/es6/components/Button/StyledButtonKind.js","webpack:///../node_modules/grommet/es6/contexts/AnalyticsContext/AnalyticsContext.js","webpack:///../node_modules/grommet/es6/components/Button/BusyAnimation.js","webpack:///../node_modules/grommet/es6/components/Button/Button.js","webpack:///../node_modules/grommet/es6/components/Collapsible/propTypes.js","webpack:///../node_modules/grommet/es6/components/Collapsible/Collapsible.js","webpack:///../node_modules/grommet/es6/components/Heading/StyledHeading.js","webpack:///../node_modules/grommet/es6/components/Heading/propTypes.js","webpack:///../node_modules/grommet/es6/components/Heading/HeadingSkeleton.js","webpack:///../node_modules/grommet/es6/components/Heading/Heading.js","webpack:///../node_modules/grommet/es6/components/AccordionPanel/propTypes.js","webpack:///../node_modules/grommet/es6/components/AccordionPanel/AccordionPanel.js","webpack:///../node_modules/grommet/es6/components/Anchor/StyledAnchor.js","webpack:///../node_modules/grommet/es6/components/Anchor/propTypes.js","webpack:///../node_modules/grommet/es6/components/Anchor/Anchor.js","webpack:///../node_modules/grommet/es6/components/Image/StyledImage.js","webpack:///../node_modules/grommet/es6/components/Image/propTypes.js","webpack:///../node_modules/grommet/es6/components/Image/Image.js","webpack:///../node_modules/grommet/es6/components/Avatar/StyledAvatar.js","webpack:///../node_modules/grommet/es6/components/Avatar/propTypes.js","webpack:///../node_modules/grommet/es6/components/Avatar/Avatar.js","webpack:///../node_modules/grommet/es6/components/Header/Header.js","webpack:///../node_modules/grommet/es6/components/Calendar/propTypes.js","webpack:///../node_modules/grommet/es6/components/Calendar/StyledCalendar.js","webpack:///../node_modules/grommet/es6/components/Calendar/utils.js","webpack:///../node_modules/grommet/es6/components/Calendar/Calendar.js","webpack:///../node_modules/grommet/es6/components/Card/Card.js","webpack:///../node_modules/grommet/es6/components/CardBody/CardBody.js","webpack:///../node_modules/grommet/es6/components/Footer/Footer.js","webpack:///../node_modules/grommet/es6/components/CardFooter/CardFooter.js","webpack:///../node_modules/grommet/es6/components/CardHeader/CardHeader.js","webpack:///../node_modules/grommet/es6/contexts/DataContext.js","webpack:///../node_modules/grommet/es6/components/Grid/StyledGrid.js","webpack:///../node_modules/grommet/es6/components/Grid/propTypes.js","webpack:///../node_modules/grommet/es6/components/Grid/Grid.js","webpack:///../node_modules/grommet/es6/components/InfiniteScroll/propTypes.js","webpack:///../node_modules/grommet/es6/components/InfiniteScroll/InfiniteScroll.js","webpack:///../node_modules/grommet/es6/components/Nav/Nav.js","webpack:///../node_modules/grommet/es6/components/Pagination/StyledPageControl.js","webpack:///../node_modules/grommet/es6/components/Pagination/PageControl.js","webpack:///../node_modules/grommet/es6/components/Pagination/propTypes.js","webpack:///../node_modules/grommet/es6/components/Pagination/Pagination.js","webpack:///../node_modules/grommet/es6/components/Cards/propTypes.js","webpack:///../node_modules/grommet/es6/components/Cards/Cards.js","webpack:///../node_modules/grommet/es6/contexts/ResponsiveContext/propTypes.js","webpack:///../node_modules/grommet/es6/contexts/ResponsiveContext/ResponsiveContext.js","webpack:///../node_modules/grommet/es6/contexts/ThemeContext/propTypes.js","webpack:///../node_modules/grommet/es6/contexts/ThemeContext/ThemeContext.js","webpack:///../node_modules/grommet/es6/contexts/index.js","webpack:///../node_modules/grommet/es6/components/Carousel/StyledCarousel.js","webpack:///../node_modules/grommet/es6/components/Carousel/propTypes.js","webpack:///../node_modules/grommet/es6/components/Carousel/CarouselChild.js","webpack:///../node_modules/grommet/es6/components/Carousel/Carousel.js","webpack:///../node_modules/grommet/es6/components/Form/FormContext.js","webpack:///../node_modules/grommet/es6/components/CheckBox/propTypes.js","webpack:///../node_modules/grommet/es6/components/CheckBox/StyledCheckBox.js","webpack:///../node_modules/grommet/es6/components/CheckBox/CheckBox.js","webpack:///../node_modules/grommet/es6/components/CheckBoxGroup/StyledCheckBoxGroup.js","webpack:///../node_modules/grommet/es6/components/CheckBoxGroup/propTypes.js","webpack:///../node_modules/grommet/es6/components/CheckBoxGroup/CheckBoxGroup.js","webpack:///../node_modules/grommet/es6/components/Chart/StyledChart.js","webpack:///../node_modules/grommet/es6/components/Chart/utils.js","webpack:///../node_modules/grommet/es6/components/Chart/propTypes.js","webpack:///../node_modules/grommet/es6/components/Chart/Chart.js","webpack:///../node_modules/grommet/es6/components/Chart/calcs.js","webpack:///../node_modules/grommet/es6/components/Chart/index.js","webpack:///../node_modules/grommet/es6/components/Clock/StyledClock.js","webpack:///../node_modules/grommet/es6/components/Clock/Analog.js","webpack:///../node_modules/grommet/es6/components/Clock/Digital.js","webpack:///../node_modules/grommet/es6/components/Clock/propTypes.js","webpack:///../node_modules/grommet/es6/components/Clock/Clock.js","webpack:///../node_modules/grommet/es6/components/Form/propTypes.js","webpack:///../node_modules/grommet/es6/components/Form/Form.js","webpack:///../node_modules/grommet/es6/components/Form/index.js","webpack:///../node_modules/grommet/es6/components/Data/DataForm.js","webpack:///../node_modules/grommet/es6/components/RadioButton/StyledRadioButton.js","webpack:///../node_modules/grommet/es6/components/RadioButton/propTypes.js","webpack:///../node_modules/grommet/es6/components/RadioButton/RadioButton.js","webpack:///../node_modules/grommet/es6/components/RadioButtonGroup/propTypes.js","webpack:///../node_modules/grommet/es6/components/RadioButtonGroup/RadioButtonGroup.js","webpack:///../node_modules/grommet/es6/components/TextInput/StyledTextInput.js","webpack:///../node_modules/grommet/es6/components/TextInput/propTypes.js","webpack:///../node_modules/grommet/es6/components/TextInput/TextInput.js","webpack:///../node_modules/grommet/es6/components/FormField/propTypes.js","webpack:///../node_modules/grommet/es6/components/FormField/FormField.js","webpack:///../node_modules/grommet/es6/components/RangeSelector/EdgeControl.js","webpack:///../node_modules/grommet/es6/components/RangeSelector/propTypes.js","webpack:///../node_modules/grommet/es6/components/RangeSelector/RangeSelector.js","webpack:///../node_modules/grommet/es6/components/DropButton/propTypes.js","webpack:///../node_modules/grommet/es6/components/DropButton/DropButton.js","webpack:///../node_modules/grommet/es6/components/Select/StyledSelect.js","webpack:///../node_modules/grommet/es6/components/Select/utils.js","webpack:///../node_modules/grommet/es6/components/SelectMultiple/SelectMultipleValue.js","webpack:///../node_modules/grommet/es6/components/SelectMultiple/SelectionSummary.js","webpack:///../node_modules/grommet/es6/components/Select/EmptySearchOption.js","webpack:///../node_modules/grommet/es6/components/SelectMultiple/SelectMultipleContainer.js","webpack:///../node_modules/grommet/es6/components/Select/DefaultSelectTextInput.js","webpack:///../node_modules/grommet/es6/components/Select/propTypes.js","webpack:///../node_modules/grommet/es6/components/SelectMultiple/propTypes.js","webpack:///../node_modules/grommet/es6/components/SelectMultiple/SelectMultiple.js","webpack:///../node_modules/grommet/es6/components/DataFilter/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataFilter/DataFilter.js","webpack:///../node_modules/grommet/es6/components/Select/SelectContainer.js","webpack:///../node_modules/grommet/es6/components/Select/Select.js","webpack:///../node_modules/grommet/es6/components/DataSort/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataSort/DataSort.js","webpack:///../node_modules/grommet/es6/components/Layer/StyledLayer.js","webpack:///../node_modules/grommet/es6/components/Layer/LayerContainer.js","webpack:///../node_modules/grommet/es6/components/Layer/propTypes.js","webpack:///../node_modules/grommet/es6/components/Layer/Layer.js","webpack:///../node_modules/grommet/es6/components/DataFilters/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataFilters/DataFilters.js","webpack:///../node_modules/grommet/es6/components/DataSearch/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataSearch/DataSearch.js","webpack:///../node_modules/grommet/es6/components/DataSummary/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataSummary/DataSummary.js","webpack:///../node_modules/grommet/es6/components/DataView/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataView/DataView.js","webpack:///../node_modules/grommet/es6/components/Toolbar/propTypes.js","webpack:///../node_modules/grommet/es6/components/Toolbar/Toolbar.js","webpack:///../node_modules/grommet/es6/components/Data/propTypes.js","webpack:///../node_modules/grommet/es6/components/Data/filter.js","webpack:///../node_modules/grommet/es6/components/Data/Data.js","webpack:///../node_modules/grommet/es6/components/Data/index.js","webpack:///../node_modules/grommet/es6/components/DataChart/Swatch.js","webpack:///../node_modules/grommet/es6/components/DataChart/Detail.js","webpack:///../node_modules/grommet/es6/components/DataChart/Legend.js","webpack:///../node_modules/grommet/es6/components/DataChart/utils.js","webpack:///../node_modules/grommet/es6/components/DataChart/XAxis.js","webpack:///../node_modules/grommet/es6/components/DataChart/YAxis.js","webpack:///../node_modules/grommet/es6/components/DataChart/XGuide.js","webpack:///../node_modules/grommet/es6/components/DataChart/YGuide.js","webpack:///../node_modules/grommet/es6/components/DataChart/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataChart/DataChart.js","webpack:///../node_modules/grommet/es6/components/Table/TableContext.js","webpack:///../node_modules/grommet/es6/components/Table/StyledTable.js","webpack:///../node_modules/grommet/es6/components/TableCell/propTypes.js","webpack:///../node_modules/grommet/es6/components/TableCell/TableCell.js","webpack:///../node_modules/grommet/es6/components/DataTable/Resizer.js","webpack:///../node_modules/grommet/es6/components/DataTable/Searcher.js","webpack:///../node_modules/grommet/es6/components/DataTable/ExpanderCell.js","webpack:///../node_modules/grommet/es6/components/TableRow/TableRow.js","webpack:///../node_modules/grommet/es6/components/Table/propTypes.js","webpack:///../node_modules/grommet/es6/components/Table/Table.js","webpack:///../node_modules/grommet/es6/components/TableBody/TableBody.js","webpack:///../node_modules/grommet/es6/components/TableHeader/TableHeader.js","webpack:///../node_modules/grommet/es6/components/TableFooter/TableFooter.js","webpack:///../node_modules/grommet/es6/components/DataTable/StyledDataTable.js","webpack:///../node_modules/grommet/es6/components/DataTable/buildState.js","webpack:///../node_modules/grommet/es6/components/DataTable/Header.js","webpack:///../node_modules/grommet/es6/components/DataTable/Cell.js","webpack:///../node_modules/grommet/es6/components/DataTable/Footer.js","webpack:///../node_modules/grommet/es6/components/DataTable/Body.js","webpack:///../node_modules/grommet/es6/components/DataTable/GroupedBody.js","webpack:///../node_modules/grommet/es6/components/DataTable/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataTable/PlaceholderBody.js","webpack:///../node_modules/grommet/es6/components/DataTable/DataTable.js","webpack:///../node_modules/grommet/es6/components/List/propTypes.js","webpack:///../node_modules/grommet/es6/components/List/List.js","webpack:///../node_modules/grommet/es6/components/Tabs/TabsContext.js","webpack:///../node_modules/grommet/es6/components/Tab/StyledTab.js","webpack:///../node_modules/grommet/es6/components/Tab/propTypes.js","webpack:///../node_modules/grommet/es6/components/Tab/Tab.js","webpack:///../node_modules/grommet/es6/components/Tabs/StyledTabs.js","webpack:///../node_modules/grommet/es6/components/Tabs/propTypes.js","webpack:///../node_modules/grommet/es6/components/Tabs/Tabs.js","webpack:///../node_modules/grommet/es6/components/DataTableColumns/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataTableColumns/DataTableColumns.js","webpack:///../node_modules/grommet/es6/components/DataTableGroupBy/propTypes.js","webpack:///../node_modules/grommet/es6/components/DataTableGroupBy/DataTableGroupBy.js","webpack:///../node_modules/grommet/es6/components/MaskedInput/StyledMaskedInput.js","webpack:///../node_modules/grommet/es6/components/MaskedInput/propTypes.js","webpack:///../node_modules/grommet/es6/components/MaskedInput/MaskedInput.js","webpack:///../node_modules/grommet/es6/components/DateInput/utils.js","webpack:///../node_modules/grommet/es6/components/DateInput/propTypes.js","webpack:///../node_modules/grommet/es6/components/DateInput/DateInput.js","webpack:///../node_modules/grommet/es6/components/Diagram/StyledDiagram.js","webpack:///../node_modules/grommet/es6/components/Diagram/propTypes.js","webpack:///../node_modules/grommet/es6/components/Diagram/Diagram.js","webpack:///../node_modules/grommet/es6/components/Distribution/propTypes.js","webpack:///../node_modules/grommet/es6/components/Distribution/Distribution.js","webpack:///../node_modules/grommet/es6/components/FileInput/StyledFileInput.js","webpack:///../node_modules/grommet/es6/components/FileInput/propTypes.js","webpack:///../node_modules/grommet/es6/components/FileInput/utils/formatBytes.js","webpack:///../node_modules/grommet/es6/components/FileInput/FileInput.js","webpack:///../node_modules/grommet/es6/themes/grommet.js","webpack:///../node_modules/grommet/es6/themes/dark.js","webpack:///../node_modules/grommet/es6/themes/hacktoberfest2022.js","webpack:///../node_modules/grommet/es6/themes/index.js","webpack:///../node_modules/grommet/es6/components/Grommet/StyledGrommet.js","webpack:///../node_modules/grommet/es6/components/Grommet/propTypes.js","webpack:///../node_modules/grommet/es6/components/Grommet/Grommet.js","webpack:///../node_modules/grommet/es6/components/Main/Main.js","webpack:///../node_modules/grommet/es6/components/Paragraph/StyledParagraph.js","webpack:///../node_modules/grommet/es6/components/Paragraph/propTypes.js","webpack:///../node_modules/grommet/es6/components/Paragraph/ParagraphSkeleton.js","webpack:///../node_modules/grommet/es6/components/Paragraph/Paragraph.js","webpack:///../node_modules/grommet/es6/components/Markdown/propTypes.js","webpack:///../node_modules/grommet/es6/components/Markdown/Markdown.js","webpack:///../node_modules/grommet/es6/components/Menu/propTypes.js","webpack:///../node_modules/grommet/es6/components/Menu/Menu.js","webpack:///../node_modules/grommet/es6/components/Meter/StyledMeter.js","webpack:///../node_modules/grommet/es6/components/Meter/utils.js","webpack:///../node_modules/grommet/es6/components/Meter/Bar.js","webpack:///../node_modules/grommet/es6/components/Meter/Circle.js","webpack:///../node_modules/grommet/es6/components/Meter/propTypes.js","webpack:///../node_modules/grommet/es6/components/Meter/Meter.js","webpack:///../node_modules/grommet/es6/components/Page/PageContext.js","webpack:///../node_modules/grommet/es6/components/Page/propTypes.js","webpack:///../node_modules/grommet/es6/components/Page/Page.js","webpack:///../node_modules/grommet/es6/components/Page/index.js","webpack:///../node_modules/grommet/es6/components/PageContent/propTypes.js","webpack:///../node_modules/grommet/es6/components/PageContent/PageContent.js","webpack:///../node_modules/grommet/es6/components/PageHeader/PageHeader.js","webpack:///../node_modules/grommet/es6/components/NameValueList/NameValueListContext.js","webpack:///../node_modules/grommet/es6/components/NameValuePair/NameValuePair.js","webpack:///../node_modules/grommet/es6/components/NameValueList/NameValueList.js","webpack:///../node_modules/grommet/es6/components/Notification/propTypes.js","webpack:///../node_modules/grommet/es6/components/Notification/Notification.js","webpack:///../node_modules/grommet/es6/components/RangeInput/StyledRangeInput.js","webpack:///../node_modules/grommet/es6/components/RangeInput/propTypes.js","webpack:///../node_modules/grommet/es6/components/RangeInput/RangeInput.js","webpack:///../node_modules/grommet/es6/components/RoutedAnchor/RoutedAnchor.js","webpack:///../node_modules/grommet/es6/components/RoutedButton/RoutedButton.js","webpack:///../node_modules/grommet/es6/components/Sidebar/propTypes.js","webpack:///../node_modules/grommet/es6/components/Sidebar/Sidebar.js","webpack:///../node_modules/grommet/es6/components/SkipLink/SkipLink.js","webpack:///../node_modules/grommet/es6/components/SkipLinks/propTypes.js","webpack:///../node_modules/grommet/es6/components/SkipLinks/SkipLinks.js","webpack:///../node_modules/grommet/es6/components/SkipLinkTarget/SkipLinkTarget.js","webpack:///../node_modules/grommet/es6/components/Spinner/propTypes.js","webpack:///../node_modules/grommet/es6/components/Spinner/Spinner.js","webpack:///../node_modules/grommet/es6/components/StarRating/StarRating.js","webpack:///../node_modules/grommet/es6/components/Tag/propTypes.js","webpack:///../node_modules/grommet/es6/components/Tag/StyledTag.js","webpack:///../node_modules/grommet/es6/components/Tag/Tag.js","webpack:///../node_modules/grommet/es6/components/TextArea/StyledTextArea.js","webpack:///../node_modules/grommet/es6/components/TextArea/propTypes.js","webpack:///../node_modules/grommet/es6/components/TextArea/TextArea.js","webpack:///../node_modules/grommet/es6/components/ThumbsRating/ThumbsRating.js","webpack:///../node_modules/grommet/es6/components/Video/StyledVideo.js","webpack:///../node_modules/grommet/es6/components/Video/propTypes.js","webpack:///../node_modules/grommet/es6/components/Video/Video.js","webpack:///../node_modules/grommet/es6/components/WorldMap/StyledWorldMap.js","webpack:///../node_modules/grommet/es6/components/WorldMap/propTypes.js","webpack:///../node_modules/grommet/es6/components/WorldMap/WorldMap.js","webpack:///../node_modules/grommet/es6/components/index.js","webpack:///../node_modules/grommet/es6/index.js","webpack:///../node_modules/grommet/themes/base.js","webpack:///../node_modules/grommet/themes/dark.js","webpack:///../node_modules/grommet/themes/grommet.js","webpack:///../node_modules/grommet/themes/hacktoberfest2022.js","webpack:///../node_modules/grommet/themes/index.js","webpack:///../node_modules/grommet/utils/DOM.js","webpack:///../node_modules/grommet/utils/PortalContext.js","webpack:///../node_modules/grommet/utils/animation.js","webpack:///../node_modules/grommet/utils/background.js","webpack:///../node_modules/grommet/utils/border.js","webpack:///../node_modules/grommet/utils/colors.js","webpack:///../node_modules/grommet/utils/dates.js","webpack:///../node_modules/grommet/utils/graphics.js","webpack:///../node_modules/grommet/utils/icon.js","webpack:///../node_modules/grommet/utils/index.js","webpack:///../node_modules/grommet/utils/mixins.js","webpack:///../node_modules/grommet/utils/object.js","webpack:///../node_modules/grommet/utils/pagination.js","webpack:///../node_modules/grommet/utils/refs.js","webpack:///../node_modules/grommet/utils/responsive.js","webpack:///../node_modules/grommet/utils/styles.js","webpack:///../node_modules/grommet/utils/use-keyboard.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAmC;AAC5B,wBAAwB,oBAAS;AACjC,oBAAoB,oBAAS,YAAY,oBAAS,2DAA2D,oBAAS;AAC7H,qBAAqB,oBAAS;AAC9B,sBAAsB,oBAAS;AAC/B;AACA,SAAS,oBAAS;AAClB,YAAY,oBAAS;AACrB,QAAQ,oBAAS;AACjB,CAAC;AACM,wBAAwB,oBAAS,6CAA6C,oBAAS,SAAS,oBAAS;AACzG,oBAAoB,oBAAS,YAAY,oBAAS,SAAS,oBAAS;AAC3E,QAAQ,oBAAS;AACjB,SAAS,oBAAS;AAClB,CAAC;AACM,yBAAyB,oBAAS,YAAY,oBAAS,SAAS,oBAAS;AAChF,QAAQ,oBAAS,YAAY,oBAAS,kBAAkB,oBAAS;AACjE;AACA,QAAQ,oBAAS,YAAY,oBAAS,OAAO,oBAAS;AACtD,SAAS,oBAAS;AAClB,YAAY,oBAAS;AACrB,WAAW,oBAAS,YAAY,oBAAS,SAAS,oBAAS,OAAO,oBAAS,SAAS,oBAAS;AAC7F,UAAU,oBAAS,YAAY,oBAAS,iCAAiC,oBAAS;AAClF,UAAU,oBAAS,YAAY,oBAAS,SAAS,oBAAS;AAC1D,QAAQ,oBAAS,YAAY,oBAAS,8BAA8B,oBAAS;AAC7E,SAAS,oBAAS;AAClB,CAAC;AACM;AACA;AACA,IAAI,6BAAU,GAAG,oBAAS,YAAY,oBAAS,uCAAuC,oBAAS;AACtG,UAAU,oBAAS,YAAY,oBAAS,sBAAsB,oBAAS;AACvE,OAAO,oBAAS,YAAY,oBAAS,sBA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;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,gDAAgD,sCAAsC;AACtF;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qCAAqC,8BAA8B;AACnE;AACA;AACA,qCAAqC,+BAA+B;AACpE;AACA;AACA,uCAAuC,0BAA0B;AACjE;AACA;AACA,mCAAmC,8BAA8B;AACjE;AACA;AACA,gEAAgE,oBAAoB;AACpF;AACA;AACA,+DAA+D,oBAAoB;AACnF;AACA;AACA,gEAAgE,oBAAoB;AACpF;AACA;AACA,+DAA+D,oBAAoB;AACnF;AACA;AACA,8DAA8D,oBAAoB;AAClF;AACA;AACA,8DAA8D,oBAAoB;AAClF;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAI,8BAAoB;AAC/B;AACA;AACA;AACA,8BAA8B,4CAAG,QAAQ,MAAM,GAAG,MAAM;AACxD;AACA;AACA;AACA,WAAW,4CAAG,0BAA0B,kDAAS;AACjD;AACA;AACA,E;;AC9GwC;AACjC;AACP;AACA,4BAA4B,aAAoB;AAChD;AACA;AACA;AACA;AACO;AACP;AACA;AACO,IAAI,eAAQ;AACnB,SAAS,4CAAG,kBAAkB,iBAAiB;AAC/C;AACA,GAAG;AACH;AACA,GAAG;AACH;AACO,IAAI,sBAAe;AAC1B,SAAS,4CAAG,2BAA2B,MAAM;AAC7C;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,E;;AC3CA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,EAAE;AAC/B;AACA,GAAG;AACH;AACA,2BAA2B,EAAE;AAC7B;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,IAAI,gBAAgB,IAAI;AACpD;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,E;;AC5IwC;AACyD;;AAEjG;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mCAAwB;AAC5B;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,GAAG,UAAU;AACjC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACO,IAAI,2BAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,KAAK;AACL,mBAAmB,cAAc;AACjC;AACA,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;AACA,IAAI,sB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L,GAAG;AACH;AACA;AACA,SAAS,4CAAG,gBAAgB,0BAAe,kJAAkJ;AAC7L,E;;ACvMwC;AACE;AACC;AACpC,IAAI,4BAAqB;AAChC,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6HAA6H;AAC7H,4FAA4F;AAC5F,sEAAsE,oCAAoC;AAC1G,uEAAuE,qCAAqC;AAC5G,2CAA2C;AAC3C,gCAAgC;AAChC;AACO,IAAI,kBAAW;AACtB;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,wCAAwC,4BAAqB;AAC7D;AACA;AACA,sDAAsD;AACtD;AACA,oBAAoB,sBAAe;AACnC;AACA,KAAK;AACL,kBAAkB,4CAAG,2BAA2B;AAChD;AACA,oBAAoB,sBAAe;AACnC;AACA,KAAK;AACL,kBAAkB,4CAAG,oBAAoB,kBAAkB;AAC3D;AACA,oBAAoB,sBAAe;AACnC;AACA,KAAK;AACL,kBAAkB,4CAAG,mBAAmB,mBAAmB;AAC3D;AACA,oBAAoB,sBAAe;AACnC;AACA,KAAK;AACL;AACA,KAAK;AACL,kBAAkB,4CAAG,eAAe;AACpC;AACA,oBAAoB,sBAAe;AACnC;AACA;AACA;AACA,GAAG;AACH;AACA,E;;AC7DO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;ACRO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO;AACP;AACA;AACA;;AAEA;AACO;AACP;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACO;AACP;AACA;AACA,E;;ACvMA;AACO;AACA;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,E;;AClCqC;AAC9B,IAAI,iBAAY;AACvB;AACA,iIAAiI,6BAAY;AAC7I;AACA,GAAG;AACH,E;;ACNO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,E;;AC7BwC;AACO;AACL;AACQ;AACW;AACtD,gBAAgB,4CAAG,oBAAoB,eAAe,iBAAiB,iBAAiB,gCAAgC,8BAA8B,0BAA0B,kCAAkC,mCAAmC;AAC5P;AACA,CAAC;AACD;AACA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ACA;AACA,IAAI,WAAM;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,IAAI,eAAU;AACd;AACA,IAAI,WAAM;AACV,GAAG;AACH;AACA,eAAU;AACV,eAAU;AACV,eAAU;AACV,eAAU;AACV;AACA,EAAE,WAAM;AACR,CAAC;AACM,IAAI,aAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS,CAAC,YAAQ;AACjC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;;AAET,iBAAiB;AACjB,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,cAAc,WAAM;AACpB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,qBAAqB,oCAAoC;AACzD;AACA;AACA;AACA;AACA,OAAO;AACP,YAAY,YAAQ,GAAG;AACvB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,sBAAsB,gBAAgB,2BAA2B,gBAAgB;AACjF,oBAAoB,gBAAgB,2BAA2B,gBAAgB;AAC/E,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,kBAAkB,gBAAM;AACxB,gBAAgB,oBAAQ;AACxB,mBAAmB,oCAAoC;AACvD;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,SAAS;;AAET;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,SAAS;;AAET;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,OAAO;;AAEP;AACA,mBAAmB;AACnB;AACA;AACA,OAAO;AACP,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,wBAAwB;AACxB,0BAA0B;AAC1B,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,wBAAwB;AACxB,0BAA0B;AAC1B,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,wBAAwB;AACxB,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,kBAAkB,oBAAQ;AAC1B,cAAc,YAAI;AAClB;AACA,oBAAoB,4BAAY;AAChC,gBAAgB,oBAAQ;AACxB;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV,gBAAgB;AAChB,cAAc;AACd;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,iBAAiB,oBAAQ;AACzB,cAAc,YAAI;AAClB,kBAAkB,oBAAQ;AAC1B,mBAAmB,oCAAoC;AACvD,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA,qBAAqB,oCAAoC;AACzD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP,iBAAiB,oCAAoC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;;AAEL;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;AACA,mBAAmB,oBAAQ;AAC3B,kBAAkB,gBAAM;AACxB,oBAAoB,gBAAM;AAC1B,gBAAgB,oBAAQ;AACxB;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,YAAY;AACZ;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ;AACR;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,gBAAgB,sBAAS;AACzB,OAAO;AACP,gBAAgB;AAChB;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ,OAAO;;AAEP;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,iBAAiB,YAAQ,GAAG;AAC5B,kBAAkB,YAAQ,GAAG;AAC7B,iBAAiB,YAAQ,GAAG;AAC5B,kBAAkB,YAAQ,GAAG;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,iBAAiB,YAAQ,GAAG;AAC5B,kBAAkB,YAAQ,GAAG;AAC7B,iBAAiB,YAAQ,GAAG;AAC5B,kBAAkB,YAAQ,GAAG;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,iBAAiB,YAAQ,GAAG;AAC5B,kBAAkB,YAAQ,GAAG;AAC7B,iBAAiB,YAAQ,GAAG;A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ACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,cAAc,sBAAS;AACvB,OAAO;AACP;AACA,cAAc,0CAAmB;AACjC;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA,cAAc,wCAAkB;AAChC;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA,cAAc,kCAAe;AAC7B;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA,cAAc,sCAAiB;AAC/B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA,cAAc,wCAAkB;AAChC;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,cAAc,wCAAkB;AAChC;AACA;AACA,qBAAqB;AACrB,oBAAoB;AACpB;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B;AAC5B,yBAAyB;AACzB,YAAY;AACZ;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,kBAAkB,YAAQ,GAAG;AAC7B;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,kBAAkB,YAAQ,GAAG;AAC7B;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,kBAAkB,YAAQ,GAAG;AAC7B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,cAAc,YAAI;AAClB,kBAAkB,oBAAQ;AAC1B;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,aAAa,YAAQ,GAAG;AACxB,cAAc,YAAQ,GAAG;AACzB,aAAa,YAAQ,GAAG;AACxB,cAAc,YAAQ,GAAG;AACzB,eAAe,YAAQ,GAAG;AAC1B,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,YAAY;AACZ,mBAAmB,oCAAoC;AACvD;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA,sBAAsB;AACtB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,cAAc;AACd,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA,OAAO;;AAEP;AACA,mBAAmB,oCAAoC;AACvD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB,mBAAmB;AACnB,UAAU;AACV;AACA,mBAAmB,oCAAoC;AACvD;AACA;AACA,SAAS;AACT,cAAc,oBAAQ;AACtB;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,cAAc,YAAQ,GAAG;AACzB,aAAa,YAAQ,GAAG;AACxB,cAAc,YAAQ,GAAG;AACzB;AACA,aAAa,YAAQ,GAAG;AACxB;AACA,cAAc,YAAQ,GAAG;AACzB,eAAe,YAAQ,GAAG;AAC1B,aAAa,YAAQ,GAAG;AACxB,aAAa,YAAQ,GAAG;AACxB,aAAa,YAAQ,GAAG;AACxB,aAAa,YAAQ,GAAG;AACxB,aAAa,YAAQ,GAAG;AACxB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oBAAoB,qBAAqB;AACzC,KAAK;AACL;AACA;AACA,oBAAoB,qBAAqB;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,oBAAoB,wBAAwB;AAC5C;AACA,uBAAuB,8BAAa;AACpC,mBAAmB,kBAAO;AAC1B,oBAAoB,gBAAM;AAC1B,eAAe,cAAK;AACpB,cAAc,YAAI;AAClB,sBAAsB,sBAAS;AAC/B,gBAAgB,gBAAM;AACtB,qBAAqB,kCAAe;AACpC,mBAAmB,oCAAoC;AACvD,OAAO;;AAEP;AACA;AACA;AACA,mBAAmB;AACnB;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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AAW;AAC5B;AACA,iBAAiB,2BAAU,CAAC,eAAe;AAC3C,EAAE,0BAAS;AACX;AACA,4JAA4J;AAC5J;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,wBAAO;AACzB;AACA,GAAG;AACH,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,wBAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,yBAAyB,wBAAO;AAChC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,iBAAQ;AACZ;AACA;AACA;AACA,SAAS;AACT,sCAAsC,eAAK,eAAe,YAAY;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA,qBAAqB,wBAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAQ,GAAG;AACxB;AACA,OAAO,sDAAsD;AAC7D;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAA6B;AACxD;AACA,oBAAoB,WAAQ,GAAG;AAC/B;AACA;AACA;AACA;AACA,4BAA4B,eAAK,eAAe,eAAe;AAC/D;AACA,KAAK;AACL;;AAEA;AACA;AACA,kBAAkB,wBAAO;AACzB;AACA;AACA,iBAAiB,2BAAgB;AACjC;AACA;AACA,iBAAiB,WAAQ,GAAG;AAC5B;AACA;AACA,OAAO;AACP;AACA;AACA,iBAAiB,WAAQ,GAAG;AAC5B;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B,eAAK,eAAe,SAAS,EAAE,WAAQ;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;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A;AACA;AACA,WAAW,0CAA6B,OAAO,sBAAS;AACxD,wBAAwB,2BAAU,CAAC,sBAAsB;AACzD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,sBAAsB,2BAAU,CAAC,aAAa;AAC9C,iBAAiB,wBAAO;AACxB;AACA,GAAG;AACH,0BAA0B,wBAAO;AACjC;AACA,GAAG;AACH,gBAAgB,oBAAe;AAC/B,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA,GAAG;AACH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AwB,eAAK,eAAe,YAAY,EAAE,YAAQ;AAClE;AACA;AACA;AACA,KAAK;AACL;AACA,sCAAsC,eAAK,eAAe,UAAU,EAAE,YAAQ;AAC9E;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG,yCAAyC,eAAK,eAAe,WAAW;AAC3E;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0BAA0B,eAAK,eAAe,GAAG,EAAE,YAAQ;AAC3D;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,0BAA0B,eAAK,eAAe,GAAG;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,iBAAiB,aAAa;;;;;ACvFoB;AACO;AACV;AAC4B;AAC9C;AACI;AACF;AAC/B,2BAA2B,gDAAM,CAAC,GAAG;AACrC;AACA;AACA,CAAC;AACD;AACA,CAAC;AACM,IAAI,WAAK;AAChB;AACA;AACA,cAAc,2BAAU,CAAC,6CAAY;AACrC,qBAAqB,uBAAM;AAC3B,mBAAmB,uBAAM;AACzB,iBAAiB,uBAAM;AACvB;AACA;AACA,EAAE,gBAAgB;;AAElB;AACA;AACA,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA,6DAA6D,gBAAgB;AAC7E;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA,2BAA2B,eAAK,eAAe,IAAI;AACnD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yBAAyB,eAAK;AAC9B;AACA;AACA;AACA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BAA+B,OAAO;AAC5N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,+BAAc;AAClB,eAAe,gBAAgB;AAC/B,SAAS,4CAAG,yBAAyB,aAAa,gBAAgB,sCAAsC,gBAAgB;AACxH;;AAEA;AACA,IAAI,0BAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAc;AAChC;AACA;AACA;AACA;AACA,oBAAoB,+BAAc;AAClC;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,kBAAkB,qBAAc;AAChC;AACA;AACA;AACA;AACA,oBAAoB,+BAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAc;AACrC;AACA;AACA;AACA;AACA;AACA,uBAAuB,+BAAc;AACrC;AACA;AACA,oBAAoB,4CAAG,WAAW,UAAU;AAC5C;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI,oCAAmB;AACvB;AACA;AACA;AACA,wHAAwH;AACxH;AACA;AACA,GAAG;AACH,eAAe,qBAAc;AAC7B,gCAAgC,4CAAG,WAAW,KAAK;AACnD;AACA;AACA,IAAI,0BAAS;AACb;AACA,wBAAwB;AACxB;AACA;AACA,yBAAyB;AACzB;AACA;AACA,gCAAgC,qBAAqB,wBAAwB,uBAAuB;AACpG;AACA;AACA;AACA,IAAI,2BAAU;AACd,SAAS,4CAAG,gBAAgB,YAAY,UAAU,mBAAmB,cAAc,yCAAyC,sBAAsB,2BAA2B,+BAA+B,OAAO,2DAA2D;AAC9Q;AACA,uBAAuB,wCAAM;AAC7B;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC,yBAAyB,sBAAsB,eAAe,aAAa,qBAAqB,SAAS,uBAAuB,iBAAiB,oBAAoB,qDAAqD,KAAK,4BAA4B,KAAK,uBAAuB,aAAa;AACrS,wBAAwB,2BAAU;AAClC,CAAC;A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,GAAG,gBAAgB,eAAK;AACxB;AACA,WAAW,kDAAS,MAAM,UAAU,qBAAqB,IAAI,UAAU,uBAAuB,IAAI,qBAAqB,IAAI,uBAAuB,IAAI,oBAAoB,KAAK,oBAAoB;AAC5L,oBAAoB,gDAAM,CAAC,sBAAS;AAC3C;AACA;AACA,CAAC,sBAAsB,kBAAkB,gCAAgC;AAClE,yBAAyB,wCAAM;AACtC;AACA;AACA,CAAC,kBAAkB;AACnB;AACA,CAAC,E;;ACxCD,IAAI,eAAS;AACb,SAAS,cAAQ,IAAI,CAAC,cAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,cAAQ,wBAAwB;AACjV,SAAS,mCAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACxL;AAChE;AAC+E;AACrF;AACL;AACmB;AACF;AAClC;AACA;AACG;AACc;AACQ;AACS;AACX;AACmC;AACvF,kBAAkB,gDAAM,CAAC,GAAG;AAC5B;AACA;AACA,CAAC,sBAAsB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAY;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAuB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0BAA0B,2BAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAA6B,OAAO,eAAS;AACxD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,iBAAiB,2BAAU,CAAC,eAAe;AAC3C,oBAAoB,2BAAU,CAAC,cAAc;AAC7C;AACA;AACA;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,iBAAiB,2BAAW;AAC5B,sBAAsB,6BAAY;AAClC,gBAAgB,4BAAW;AAC3B;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA,gBAAgB,wBAAO;AACvB;AACA,GAAG;;AAEH;AACA,aAAa,wBAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wBAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,0BAA0B,mBAAmB,CAAC,cAAc;AAC5D,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,mBAAY,6BAA6B,mBAAY;AACtF,iDAAiD,6BAAY;AAC7D;AACA,SAAS;AACT;AACA,KAAK;AACL,gCAAgC,6BAAY;AAC5C;AACA,OAAO;AACP;AACA,GAAG;AACH,8BAA8B,mBAAY,6BAA6B,mBAAY;AACnF,8CAA8C,6BAAY;AAC1D;AACA,KAAK;AACL;AACA,eAAe,iBAAY;AAC3B;AACA;AACA,wBAAwB,eAAK,eAAe,QAAQ,EAAE,cAAQ;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAK,eAAe,GAAG;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAK,eAAe,WAAK;AACrD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,mBAAY,6BAA6B,mBAAY;AACvF;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAK;AACT;AACA,KAAK,uBAAuB,eAAK,eAAe,+BAAiB,iCAAiC,eAAK,eAAe,GAAG;AACzH;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,aAAa;AACrD;AACA;AACA,KAAK,iBAAiB,eAAK,eAAe,kBAAkB;AAC5D;AACA,KAAK;AACL;AACA;AACA;AACA,sCAAsC,eAAK,eAAe,gBAAgB,EAAE,cAAQ,GAAG;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,eAAK;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,wBAAwB,oBAAoB;;;;;ACjHI;AAC6C;AAC1C;AACnD,IAAI,uBAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4CAAG,kBAAkB,iBAAiB,eAAe,iBAAiB,mBAAmB;AAC3G;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAe,mEAAmE,yDAAyD,uFAAuF;AACxP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wBAAU;AACd,yDAAyD;AACzD;AACA;AACA,WAAW,4CAAG,oBAAoB;AAClC;AACA,oCAAoC,4CAAG,oBAAoB;AAC3D;AACA,IAAI,2BAAa,4BAA4B,qBAAqB,4BAA4B;AAC9F,IAAI,wBAAU,GAAG,4CAAG,cAAc;AAClC,SAAS,cAAc;AACvB,CAAC;AACD,oBAAoB,wCAAM;AAC1B;AACA;AACA,CAAC,0CAA0C,aAAa;AACxD,SAAS,wBAAU;AACnB,CAAC;AACD,SAAS,uBAAS;AAClB,CAAC;AACD,4BAA4B,cAAc;AAC1C,CAAC;AACD,2BAA2B,2BAAa;AACxC,CAAC;AACD,2DAA2D,wBAAU;AACrE,CAAC;AACD;AACA,CAAC;AACD;AACA,kDAAkD,0BAAY;;;ACtD9D,SAAS,yBAAQ,IAAI,CAAC,yBAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO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gB,sBAAsB,YAAY;AAC9D;AACA,kBAAkB,wCAAM;AACxB;AACA;AACA,CAAC,sBAAsB,UAAU;AACjC,gCAAgC,6BAAc;AAC9C,CAAC;AACD,wBAAwB,yBAAU;AAClC,CAAC;AACD;AACA,gDAAgD,0BAAY;AAC5D,iBAAiB,wCAAM;AACvB;AACA;AACA,CAAC,iBAAiB,8BAA8B;AAChD,yCAAyC;AACzC,CAAC;AACD;AACA,+CAA+C,0BAAY;;AAE3D;AACA;AACA,yBAAyB,wCAAM;AAC/B;AACA;AACA,CAAC,kBAAkB;AACnB,8CAA8C;AAC9C,CAAC;AACD;AACA,uDAAuD,0BAAY;AACnE,IAAI,2BAAY;AAChB;AACA,SAAS,4CAAG,cAAc,YAAY;AACtC;AACA,gBAAgB,wCAAM;AACtB;AACA;AACA,CAAC,iBAAiB,uBAAuB,mBAAmB;AAC5D,SAAS,2BAAY;AACrB,CAAC;AACD,6BAA6B,0BAAe,6CAA6C,0BAAe;AACxG;AACA;AACA,GAAG;AACH,CAAC;AACD,2CAA2C;AAC3C,CAAC;AACD,gDAAgD;AAChD,CAAC;AACD;AACA;AACA;AACA,2DAA2D,qBAAc;AACzE;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,8CAA8C,0BAAY;;;AC7G1D;AACA;;AAEA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,E;;AChHA,IAAI,iBAAS;AACb,SAAS,qCAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACjT,SAAS,gBAAQ,IAAI,CAAC,gBAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,gBAAQ,wBAAwB;AACxO;AACxD;AACgB;AACF;AACZ;AACtB;AACM;AACA;AACE;AACE;AACR;AACiB;AACgF;AAC0D;AACnI;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0EAA0E;AAC1E,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI,uBAAc;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,wBAAe;AACnB;AACA;AACA;AACA;AACA,kCAAkC,YAAY;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,0GAA0G;AAC1G;AACA;AACA,IAAI,qBAAY;AAChB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAkB;AACtB;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,iEAAiE,YAAY;AAC7E;AACA,UAAU,YAAY;AACtB,YAAY,OAAO,mBAAmB;AACtC;AACA;AACA,IAAI,4CAAmC;AACvC;AACA;AACA,UAAU,eAAe,2BAA2B,YAAY;AAChE;AACA,IAAI,wCAA+B;AACnC;AACA;AACA,UAAU,cAAc,4BAA4B,YAAY;AAChE;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0BAAiB;AACrB,sBAAsB,eAAK,eAAe,MAAM,EAAE,gBAAQ;AAC1D;AACA;AACA,GAAG;AACH;AACA,IAAI,oBAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,sBAAsB,eAAK,eAAe,kBAAkB;AAC5D;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,0BAAiB,EAAE,gBAAQ;AACjE;AACA,GAAG,6BAA6B,eAAK,eAAe,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,IAAI,0BAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAK,eAAe,kBAAkB;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA,sBAAsB,eAAK,eAAe,kBAAkB;AAC5D;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,0BAAiB,EAAE,gBAAQ;AACjE;AACA,GAAG;AACH;AACA,4BAA4B,2BAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAA6B,QAAQ,iBAAS;AACzD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,iBAAiB,2BAAU,CAAC,eAAe;AAC3C,oBAAoB,2BAAU,CAAC,cAAc;AAC7C;;AAEA;AACA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,sBAAsB,wBAAO;AAC7B,WAAW,UAAU,CAAC,cAAc,CAAC,YAAY;AACjD,GAAG;AACH,kBAAkB,wBAAO;AACzB,WAAW,YAAY,CAAC,SAAS,CAAC,YAAY;AAC9C,GAAG;AACH,gBAAgB,uBAAM;AACtB,oBAAoB,yBAAQ;AAC5B;AACA;AACA,oBAAoB,yBAAQ;AAC5B;AACA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;AACH,wBAAwB,4BAAW;AACnC;AACA;AACA,GAAG;AACH,wBAAwB,4BAAW;AACnC,QAAQ,YAAY;AACpB,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,oBAAoB,4BAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;AACH,mBAAmB,4BAAW;AAC9B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,kBAAkB,wBAAe;AACjC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,wBAAwB,eAAK,eAAe,GAAG;AAC/C;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,MAAM;AAC9C;AACA;AACA;AACA;AACA,KAAK,qGAAqG,eAAK,eAAe,IAAI;AAClI;AACA;AACA;AACA,IAAI,eAAK,eAAe,OAAO;AAC/B;AACA;AACA;AACA;AACA,KAAK,+BAA+B,eAAK,eAAe,GAAG;AAC3D;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,yBAAyB,eAAK;AAC9B;AACA,OAAO;AACP,gBAAgB,4CAAmC;AACnD;AACA;AACA;AACA,KAAK,gBAAgB,eAAK,eAAe,MAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,yBAAyB,eAAK;AAC9B;AACA,OAAO;AACP,gBAAgB,wCAA+B;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAK,eAAe,kBAAkB;AACpE;AACA;AACA;AACA;AACA,OAAO,eAAe,eAAK,eAAe,SAAS;AACnD;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,YAAY,OAAO;AACnB;AACA,wBAAwB,eAAK,eAAe,UAAU;AACtD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,eAAK,eAAe,UAAU;AAC/D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAK,eAAe,kBAAkB;AACpE;AACA;AACA;AACA,OAAO,eAAe,eAAK,eAAe,SAAS;AACnD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAK,eAAe,kBAAkB;AACpE;AACA;AACA;AACA,OAAO,eAAe,eAAK,eAAe,SAAS;AACnD;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC;AACA;AACA,OAAO;AACP;AACA;AACA,wBAAwB,WAAW,MAAM,uBAAc,0BAA0B,YAAY,MAAM,uBAAc;AACjH;AACA;AACA;AACA;AACA,gCAAgC,eAAK,eAAe,oBAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,gCAAgC,eAAK,eAAe,0BAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA,2BAA2B,eAAK,eAAe,UAAU;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,eAAK,eAAe,cAAc,EAAE,gBAAQ;AAClE;AACA;AACA;AACA,GAAG,sBAAsB,eAAK,eAAe,GAAG;AAChD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL,qBAAqB,YAAY;AACjC,iBAAiB,YAAY;AAC7B,GAAG,mGAAmG,eAAK,eAAe,iBAAQ;AAClI;AACA;AACA,KAAK;AACL;AACA;AACA,8BAA8B;AAC9B,gBAAgB,OAAO;AACvB,WAAW,YAAY,CAAC,OAAO;AAC/B,wBAAwB,OAAO;AAC/B;AACA,KAAK;AACL;AACA;AACA,8BAA8B;AAC9B,gBAAgB,OAAO;AACvB,WAAW,YAAY,CAAC,OAAO;AAC/B;AACA;AACA,KAAK;AACL;AACA,gBAAgB,OAAO;AACvB,WAAW,YAAY,CAAC,OAAO;AAC/B;AACA;AACA,KAAK;AACL;AACA,gBAAgB,OAAO;AACvB,WAAW,YAAY,CAAC,OAAO;AAC/B;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA,KAAK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AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4CAAG,wBAAwB;AACrD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAQ;AACZ;AACA;AACA,wDAAwD;AACxD;AACA;AACA,2CAA2C;AAC3C;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uBAAY;AAChB;AACA,WAAW,4CAAG,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,WAAW,4CAAG,6CAA6C;AAC3D;AACA,SAAS,4CAAG,kDAAkD;AAC9D;AACA,IAAI,oBAAS;AACb;AACA,WAAW,4CAAG,2BAA2B;AACzC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,SAAS,4CAAG,uBAAuB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK,gBAAgB;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,iCAAiC,oBAAoB;AACrD,sCAAsC,uBAAuB;AAC7D;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG,gBAAgB;AACnB;AACA,iBAAiB,wCAAM;AACvB;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC,iBAAiB,sBAAsB,8EAA8E,aAAa;AACnI,yBAAyB,kBAAW;AACpC,CAAC;AACD,SAAS,oBAAS;AAClB,CAAC;AACD,wBAAwB,UAAU;AAClC,CAAC;AACD,+BAA+B,iBAAiB;AAChD,CAAC;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iCAA6B,QAAQ,aAAS;AACzD,sBAAsB,eAAK,eAAe,UAAU,EAAE,YAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,iBAAiB,aAAa;;AAE9B;AACA;AACA;;;;;ACpCmC;AACnC,IAAI,iCAAQ;AACZ,IAAI,IAAqC;AACzC,EAAE,iCAAQ;AACV,cAAc,oBAAS;AACvB,WAAW,oBAAS,SAAS,oBAAS;AACtC,YAAY,oBAAS;AACrB,kBAAkB,oBAAS;AAC3B,aAAa,oBAAS;AACtB,UAAU,oBAAS;AACnB,UAAU,oBAAS;AACnB;AACA;AACO,8BAA8B,iCAAQ,C;;ACbuB;AACO;AAC8B;AAC5E;AACyB;AACtD;AACA;AACA;AACA,IAAI,6BAAc;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;;AAEA;AACA,iBAAiB,wBAAO;AACxB;AACA,GAAG;;AAEH;AACA,mBAAmB,yBAAQ;AAC3B;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;;AAEA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,uBAAuB,uBAAM,GAAG;AAChC,uBAAuB,uBAAM;;AAE7B;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C,cAAc,kBAAkB;AAChC;AACA,WAAW,UAAU,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,eAAe;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,oBAAoB,wBAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,oBAAoB,wBAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,8BAA8B,eAAK,eAAe,GAAG;AACrD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,4BAA4B,eAAK;AACjC;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,+BAA+B,eAAK,eAAe,GAAG;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,6BAA6B,eAAK;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,6BAAc,aAAa,uBAAuB;;;;;AC5SlD,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;AACA;AACA;AACA,WAAW,uCAA6B,OAAO,mBAAS;AACxD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,oBAAoB,2BAAU,CAAC,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA,yHAAyH,kBAAQ,GAAG;AACpI;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAQ,GAAG;AAClC;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,eAAK;AAC9B;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA,yBAAyB,eAAK;AAC9B;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH,sBAAsB,eAAK,0CAA0C,kBAAQ;AAC7E;AACA,GAAG,kDAAkD,eAAK,eAAe,OAAG;AAC5E;AACA;AACA,GAAG,eAAe,eAAK,eAAe,GAAG,EAAE,kBAAQ;AACnD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAK,eAAe,uBAAW,EAAE,kBAAQ;AAC/C;AACA;AACA,OAAO;AACP;AACA,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;AACA,GAAG;AACH,gBAAgB,4BAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,eAAe,4BAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,iBAAiB,4BAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,+BAA+B,4BAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA,GAAG;AACH;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA,wBAAwB,iBAAQ;AAChC,iCAAiC,eAAK,eAAe,MAAM;AAC3D;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,yBAAyB,eAAK;AAC9B;AACA,OAAO;AACP;AACA,KAAK;AACL,wBAAwB,eAAK,eAAe,2BAAa;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,sBAAsB,eAAK,eAAe,iBAAQ;AAClD;AACA;AACA,GAAG,eAAe,eAAK,eAAe,uBAAuB,EAAE,gBAAQ;AACvE;AACA;AACA;AACA,GAAG,oCAAoC,eAAK,eAAe,aAAa;AACxE;AACA;AACA,GAAG,eAAe,eAAK,eAAe,MAAM;AAC5C;AACA,uBAAuB,eAAK;AAC5B,aAAa,cAAc;AAC3B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,K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AACxD,oBAAoB,2BAAU,CAAC,WAAW;AAC1C,cAAc,2BAAU,CAAC,6CAAY;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAK,eAAe,mBAAmB,EAAE,qBAAQ;AACvE;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA6B,SAAS,uBAAU;AACnE,sBAAsB,qBAAQ,GAAG;AACjC;AACA;AACA,KAAK;AACL,wBAAwB,eAAK,eAAe,QAAQ,EAAE,qBAAQ;AAC9D;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH,CAAC;AACD;AACA,0BAA0B,sBAAsB;;;;;AC1GW;AACf;AACO;AACnD,IAAI,wBAAY;AAChB;AACA;AACA;AACA;AACA;AACA,8CAA8C,0BAA0B,GAAG,4DAA4D,eAAe,GAAG,4CAA4C,yBAAyB;AAC9N,SAAS,4CAAG,qCAAqC,uDAAuD,GAAG,kDAAS,QAAQ,KAAK,GAAG,KAAK,4JAA4J;AACrS;AACA,kBAAkB,wCAAM;AACxB;AACA;AACA,CAAC,kBAAkB,eAAe,iBAAiB,eAAe,IAAI,aAAa;AACnF,0BAA0B,wBAAY;AACtC,CAAC;AACD;AACA,CAAC;AACD;AACA,gDAAgD,0BAAY;;;ACrBrD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA,IAAI,mBAAa;AACjB,yBAAyB,eAAK;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,mBAAa;AACvD,WAAW,kCAA6B,OAAO,cAAS;AACxD,qBAAqB,oBAAe;AACpC,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,eAAe,wBAAO;AACtB,WAAW,eAAe;AAC1B,GAAG;AACH,mBAAmB,wBAAO;AAC1B;AACA,GAAG;;AAEH,gBAAgB,KAAK,WAAW,MAAM,WAAW;AACjD,eAAe,wBAAO;AACtB,WAAW,eAAe;AAC1B,GAAG;AACH,oBAAoB,wBAAO;AAC3B,WAAW,gBAAgB;AAC3B,GAAG;;AAEH,eAAe;AACf,cAAc,wBAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,wBAAwB,wBAAO;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,0BAA0B,wBAAO;AACjC;AACA,GAAG;;AAEH,cAAc;AACd,aAAa,wBAAO;AACpB,yBAAyB,gBAAgB;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,eAAe;AACf,cAAc,wBAAO;AACrB;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,wBAAO;AAC7B;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kCAA6B,WAAW,eAAU;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,eAAK;AAC/B;AACA;AACA,6BAA6B,cAAc;AAC3C,sCAAsC,gBAAgB;AACtD;AACA,OAAO,eAAe,eAAK,mDAAmD,eAAK,uBAAuB,aAAQ;AAClH;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAK;AAC7B;AACA,KAAK,eAAe,eAAK,uBAAuB,aAAQ;AACxD;AACA,KAAK;AACL;AACA,KAAK,uBAAuB,eAAK,uBAAuB,aAAQ;AAChE;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAK,uCAAuC,eAAK,uBAAuB,aAAQ;AACxG;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kCAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA,oBAAoB,aAAQ,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,eAAK,yBAAyB,aAAQ;AAC7G;AACA;AACA;AACA,SAAS;AACT;AACA,yKAAyK;AACzK;AACA;AACA;AACA,SAAS,wJAAwJ;AACjK;AACA;AACA,4BAA4B,eAAK;AACjC;AACA,SAAS;AACT;AACA,0BAA0B,eAAK;AAC/B;AACA;AACA,2BAA2B,cAAc;AACzC;AACA,OAAO,eAAe,eAAK;AAC3B,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,sDAAsD,kCAAkC;AACxF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,gDAAgD,cAAc,cAAc;AAC5E,GAAG;AACH;AACA;AACA,8CAA8C,YAAY,cAAc;AACxE,GAAG;AACH,6BAA6B,eAAK;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,4BAA4B,eAAK;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,0BAA0B,eAAK;AAC/B;AACA;AACA,mBAAmB,cAAc;AACjC,OAAO;AACP,KAAK;AACL,4BAA4B,eAAK;AACjC;AACA;AACA,KAAK;AACL,gCAAgC,eAAK;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA,6BAA6B,eAAK;AAClC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,6BAA6B,eAAK;AAClC;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,6BAA6B,eAAK;AAClC;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,6BAA6B,eAAK;AAClC;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,6BAA6B,eAAK;AAClC;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,6BAA6B,eAAK;AAClC;AACA;AACA;AACA,OAAO;AACP;AACA,4BAA4B,eAAK;AACjC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,sBAAsB,eAAK,eAAe,WAAW,EAAE,aAAQ;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qCAAqC,eAAK;AAC7C,CAAC;AACD;AACA,kBAAkB,cAAc;;;AC7jBsB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAI,WAAK;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,6DAA6D;AACjE;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mDAAmD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAI,gBAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW;AACX;AACA,KAAK;AACL;AACA;AACA;;AAEA,kEAAkE;AAClE;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,KAAK,WAAW,MAAM,WAAW,EAAE;AACnD;AACA,iCAAiC,gBAAU;AAC3C;AACA;AACA,iDAAiD;AACjD,KAAK;AACL;AACA;AACA;AACA,iDAAiD;AACjD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAK;AACnB,eAAe,WAAK;AACpB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAK;AAC3B,SAAS,WAAK;AACd,eAAe,WAAK;AACpB;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAK;AAC3B,SAAS,WAAK;AACd,eAAe,WAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,E;;ACjQgC;;;ACA2B;AACC;AACT;AACnD,iBAAiB,wCAAM;AACv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;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,aAAQ,GAAG;AACtC;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,2BAA2B,eAAK,eAAe,MAAM,EAAE,aAAQ;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH,2BAA2B,eAAK,eAAe,OAAO,EAAE,aAAQ;AAChE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA,kBAAkB,cAAc;;;;;;;;AC5JG;AACnC,IAAI,uBAAQ;AACZ,IAAI,IAAqC;AACzC,EAAE,uBAAQ;AACV,YAAY,oBAAS,SAAS;AAC9B,WAAW,oBAAS,SAAS;AAC7B,UAAU,oBAAS;AACnB,cAAc,oBAAS;AACvB,eAAe,oBAAS;AACxB,gBAAgB,oBAAS;AACzB,KAAK;AACL,cAAc,oBAAS;AACvB,cAAc,oBAAS;AACvB,aAAa,oBAAS;AACtB,gBAAgB,oBAAS;AACzB,cAAc,oBAAS;AACvB,WAAW,oBAAS,SAAS;AAC7B;AACA;AACO,oBAAoB,uBAAQ,C;;ACnBnC,IAAI,aAAS;AACb,SAAS,iCAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACjT,SAAS,YAAQ,IAAI,CAAC,YAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,YAAQ,wBAAwB;AACxO;AAC3D;AACiB;AACjB;AACF;AACA;AAC5C,IAAI,iBAAY;AAChB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,YAAQ,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+GAA+G;AAC/G;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,IAAI,aAAQ;AACZ;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,6BAA6B,aAAQ;AACrC;AACA,SAAS;AACT,OAAO;AACP,2BAA2B,aAAQ;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,oDAAoD;AACpD;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iCAA6B,QAAQ,aAAS;AACzD,gBAAgB,oBAAe;AAC/B,oBAAoB,2BAAU,CAAC,cAAc;AAC7C;AACA,kBAAkB,yBAAQ,cAAc,iBAAY;AACpD;AACA;AACA,cAAc,wBAAO;AACrB;AACA,GAAG;AACH,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,6BAA6B,uBAAM,GAAG;AACtC;AACA;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,EAAE,0BAAS;AACX,yCAAyC;AACzC,GAAG;AACH;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,2BAA2B,uBAAM,GAAG;AACpC,uBAAuB,uBAAM;AAC7B,qBAAqB,uBAAM;AAC3B;AACA;AACA,GAAG;AACH,sBAAsB,6BAAY;AAClC,mBAAmB,4BAAW;AAC9B;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,6BAA6B,4BAAW;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAQ,GAAG;AAClC,sBAAsB,YAAQ,GAAG;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,YAAQ,GAAG;AAC5C;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAO;AAChC;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAM;;AAE7B;AACA;AACA,MAAM,0BAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;;AAEP;AACA;AACA,MAAM,0BAAS;AACf;AACA;AACA;AACA;AACA,8BAA8B,YAAQ,GAAG;AACzC;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,MAAM,0BAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,kCAAkC;AAClC;AACA,6BAA6B;AAC7B;AACA,gCAAgC;AAChC;AACA;AACA;AACA,4BAA4B,YAAQ,GAAG;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,0BAAS;AACf;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,iBAAiB,YAAQ,GAAG,6BAA6B;AACzD,SAAS;AACT,OAAO;;AAEP;AACA,MAAM,0BAAS;AACf;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,eAAK,uBAAuB,YAAQ;AAC1D;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,sBAAsB,iBAAY;AAClC,+BAA+B,iBAAY;AAC3C;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,8BAA8B,iBAAY;AAC1C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAQ,GAAG;AAChC;AACA,WAAW;AACX;AACA;AACA,OAAO,IAAI;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG,gBAAgB,eAAK,eAAe,WAAW;AAClD;AACA,GAAG;AACH,CAAC;AACD;AACA,iBAAiB,aAAa;;;ACnpBA;;;ACA9B,IAAI,iBAAS;AACb,SAAS,qCAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACjT,SAAS,gBAAQ,IAAI,CAAC,gBAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,gBAAQ,wBAAwB;AACrQ;AACrC;AACV;AACM;AACA;AACJ;AAC0B;AACM;AAC/D,qBAAqB,gDAAM,CAAC,MAAM;AAClC;AACA;AACA,CAAC;AACD,2CAA2C;AAC3C,CAAC;AACD,cAAc,gDAAM,CAAC,IAAI;AACzB;AACA;AACA,CAAC,mBAAmB;AACpB,yCAAyC;AACzC,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,KAAK,aAAa,EAAE,KAAK;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;;AAEA,2CAA2C,WAAW,KAAK,KAAK,OAAO;AACvE;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,eAAe,gBAAQ,GAAG,iDAAiD;AAC3E,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,gBAAQ,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,sBAAsB,gBAAQ,GAAG,yBAAyB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACO,IAAI,iBAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAA6B,OAAO,iBAAS;AACxD,oBAAoB,2BAAU,CAAC,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAAU,CAAC,cAAc;AAC9C;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,iBAAiB,4BAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,iBAAiB,4BAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,gBAAgB,4BAAW;AAC3B;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA,GAAG;AACH;AACA;AACA,2BAA2B,eAAK,eAAe,GAAG;AAClD;AACA,KAAK,eAAe,eAAK,eAAe,GAAG;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,GAAG;AAC3C;AACA,KAAK,uEAAuE,eAAK,eAAe,aAAM;AACtG;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK,eAAe,eAAK,eAAe,MAAM;AAC9C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK,gBAAgB,eAAK,+BAA+B,gBAAQ;AACjE;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK,iCAAiC;AACtC;AACA,sBAAsB,eAAK,wBAAwB,gBAAQ,GAAG;AAC9D;AACA;AACA;AACA,GAAG;AACH,E;;AClTgD;AACS;AACN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AoB,2BAAU,CAAC,WAAW;AAC1C,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG,wBAAQ;AAChB;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,uBAAM;AACzB,mBAAmB,eAAK;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAK,eAAe,iBAAQ;AAClD;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,GAAG,EAAE,wBAAQ;AACnD;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,mBAAmB,6CAA6B,QAAQ,0BAAU;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAK,eAAe,WAAW,EAAE,wBAAQ;AACjE;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH,CAAC;AACD;AACA,6BAA6B,yBAAyB;;;;;ACrKN;AAC0F;AACvF;AACE;AACrD,IAAI,6BAAa;AACjB;AACA,WAAW,4CAAG,kBAAkB,IAAI,eAAe;AACnD;AACA,kBAAkB,eAAe;AACjC;AACA,sBAAsB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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAA6B,OAAO,kBAAS;AACxD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,oBAAoB,2BAAU,CAAC,cAAc;AAC7C;AACA,iBAAiB,2BAAU,CAAC,eAAe;AAC3C,oBAAoB,2BAAU,CAAC,WAAW;AAC1C,iBAAiB,oBAAe;AAChC,gBAAgB,uBAAM;AACtB,uBAAuB,uBAAM;AAC7B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,+BAA+B,wBAAO;AACtC;AACA,GAAG;AACH,yBAAyB,wBAAO;AAChC;AACA,GAAG;AACH,mBAAmB,yBAAQ;AAC3B;AACA;AACA,iBAAiB,4BAAW;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH,kBAAkB,4BAAW;AAC7B,uCAAuC;AACvC;AACA;AACA,GAAG;AACH,qBAAqB,4BAAW;AAChC;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA,GAAG;AACH,6BAA6B,wBAAO;AACpC;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA,6BAA6B,wBAAO;AACpC;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;;AAEA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB,4IAA4I,SAAS,kBAAkB;AACtM;AACA;AACA,KAAK,MAAM;AACX;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4BAAW;AACpC;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B,4BAAW;AACxC;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,8BAA8B,wBAAO;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAK,eAAe,IAAI,EAAE,iBAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,2BAA2B,eAAK;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,iBAAiB;AACzD;AACA,KAAK,eAAe,eAAK,eAAe,6BAAc;AACtD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,6BAA6B,eAAK,eAAe,GAAG;AACpD;AACA;AACA,SAAS;AACT;;AAEA,0BAA0B,eAAK;AAC/B;AACA;AACA,OAAO,eAAe,eAAK,eAAe,MAAM;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG;AACxG;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,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,kBAAS;AACxD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,eAAK,eAAe,IAAI,iBAAiB,mCAAmC,eAAK,eAAe,GAAG;AACtK,iDAAiD,eAAK,uCAAuC,iBAAQ;AACrG;AACA;AACA,KAAK,wCAAwC,eAAK,eAAe,GAAG;AACpE;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,eAAK;AACT;AACA;AACA;AACA;AACA;AACA,WAAW,sCAA6B,QAAQ,mBAAU;AAC1D,oBAAoB,2BAAU,CAAC,WAAW;AAC1C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAK,+BAA+B,iBAAQ;AAClE;AACA;AACA;AACA,GAAG;AACH;AACA,IAAI,qBAAW;AACf,kBAAkB,yBAAQ;AAC1B;AACA;AACA,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,EAAE,0BAAS;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,6BAA6B,2BAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAA6B,QAAQ,mBAAU;AAC1D,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,oBAAoB,2BAAU,CAAC,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,qBAAqB,oBAAe;AACpC;AACA;AACA,iBAAiB,qBAAW;AAC5B,sBAAsB,2BAAU,CAAC,aAAa;;AAE9C;AACA;AACA;AACA,mDAAmD,QAAQ,kBAAkB,aAAa,kBAAkB,gBAAgB;AAC5H,4CAA4C,iBAAQ;AACpD;AACA;AACA;AACA;AACA;AACA,0BAA0B,6BAAY;AACtC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,wCAAwC,eAAK,eAAe,eAAK,EAAE,iBAAQ;AAC3E;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC,KAAK;AACL;AACA,0BAA0B,iBAAQ,GAAG;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,iBAAQ;AAC1B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,4BAA4B,eAAK,eAAe,GAAG,EAAE,iBAAQ,GAAG;AAChE;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,iBAAiB,iBAAQ,GAAG;AAC5B,GAAG,mBAAmB,iBAAQ,GAAG;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAQ,GAAG;AACzB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,4BAA4B,eAAK,oCAAoC,iBAAQ,GAAG;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA,mBAAmB,iBAAQ;AAC3B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,YAAY,iBAAQ,GAAG;AACvB;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,eAAK,eAAe,eAAK,8BAA8B,eAAK;AACjG;AACA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G;AACH,oBAAoB,4BAAW;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,gBAAgB,4BAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,oBAAoB,4BAAW;AAC/B;AACA;AACA,GAAG;;AAEH;AACA,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,gDAAgD,gBAAgB;AAChE;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA,6BAA6B,eAAK,eAAe,uBAAS,EAAE,qBAAQ;AACpE;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;AACA;AACA;AACA,GAAG,gBAAgB,eAAK,eAAe,GAAG,EAAE,qBAAQ;AACpD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG,8BAA8B,eAAK,eAAe,WAAW;AAChE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG,gBAAgB,eAAK,eAAe,GAAG,EAAE,qBAAQ;AACpD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB,eAAK,eAAe,WAAW;AACnD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AAC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B,iCAAsB;AAC/C,CAAC;AACD,yBAAyB,iCAAsB;AAC/C,CAAC;AACD;AACA,CAAC;AACM,IAAI,4BAAe,GAAG,gDAAM,CAAC,SAAS;AAC7C;AACA;AACA,CAAC,gBAAgB;AACjB;AACA,CAAC;AACM,6BAA6B,gDAAM,CAAC,UAAU;AACrD;AACA;AACA,CAAC,SAAS,KAAK,KAAK;AACpB,+BAA+B,kBAAkB;AACjD,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC,E;;ACpDmC;AACS;AACtC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACO,IAAI,iBAAW;AACtB,SAAS,4BAAW;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO,IAAI,kBAAY;AACvB,SAAS,cAAc;AACvB,E;;AC9FgE;AACnC;AACM;AACI;AACe;AACiD;AACvG,IAAI,uCAAmB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,iBAAW;AAC9B,qBAAqB,4BAAW;AAChC,oDAAoD,QAAQ;AAC5D,yBAAyB,aAAa;AACtC,uBAAuB,cAAc;AACrC,sBAAsB,cAAc;AACpC;AACA,qBAAqB,cAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,0BAA0B,eAAK,eAAe,YAAY;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iDAAiD,QAAQ,8BAA8B,QAAQ;AAC/F,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,+GAA+G,cAAc,CAAC,cAAc;AAC5I,iBAAiB,OAAO;AACxB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,iHAAiH,cAAc,CAAC,cAAc;AAC9I,iBAAiB,OAAO;AACxB;AACA;AACA,eAAe;AACf;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO,wBAAwB,eAAK,eAAe,QAAQ;AAC3D;AACA,4BAA4B,eAAK,eAAe,GAAG;AACnD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;;AAEH;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH,sBAAsB,eAAK,eAAe,eAAK,8BAA8B,eAAK,eAAe,GAAG;AACpG;AACA;AACA;AACA;AACA,GAAG;AACH,WAAW,aAAa,sCAAsC,QAAQ;AACtE,GAAG;AACH;AACA;AACA;AACA,GAAG,+BAA+B,eAAK,eAAe,GAAG;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,wFAAwF,eAAK,eAAe,GAAG;AAClH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG,eAAe,eAAK,eAAe,MAAM;AAC5C;AACA;AACA;AACA,GAAG;AACH;;;AC1I2C;AACd;AACM;AACJ;AACwD;AACvF,IAAI,iCAAgB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAW;AAC9B,+BAA+B,4BAAW;AAC1C;AACA;AACA,qBAAqB,uBAAuB;AAC5C,YAAY,aAAa,QAAQ,cAAc;AA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,kBAAkB,uBAAM;AACxB,mBAAmB,uBAAM;AACzB,mBAAmB,yBAAQ;AAC3B;AACA;AACA,kBAAkB,uBAAM;AACxB,mBAAmB,yBAAQ;AAC3B;AACA;AACA,iBAAiB,uBAAM;AACvB,mBAAmB,iBAAW;;AAE9B;AACA,EAAE,0BAAS;AACX;AACA;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B,OAAO;AACP;AACA;AACA,UAAU,qBAAqB;AAC/B;AACA,OAAO;AACP,QAAQ,qBAAqB;AAC7B,OAAO;AACP;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,mBAAmB,4BAAW;AAC9B;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;AACH,qBAAqB,4BAAW;AAChC;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH,qBAAqB,4BAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,yBAAyB,4BAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,wBAAwB,4BAAW;AACnC;AACA;AACA;AACA;AACA,6BAA6B,QAAQ;AACrC,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA,6BAA6B;AAC7B;AACA;AACA,GAAG;AACH;AACA,6CAA6C,SAAS;AACtD,kDAAkD,+BAAQ,GAAG;;AAE7D;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB,OAAO;AACP;AACA;AACA,SAAS;AACT,mBAAmB,cAAc,eAAe,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iDAAiD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA,OAAO,QAAQ;AACf;AACA,GAAG;AACH,oCAAoC,eAAK,eAAe,iCAAgB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,6DAA6D,eAAK,eAAe,GAAG;AACpF;AACA;AACA,KAAK,eAAe,eAAK,eAAe,IAAI;AAC5C;AACA,KAAK,SAAS,gCAAgC,eAAK,eAAe,GAAG;AACrE;AACA,KAAK;AACL;AACA,wDAAwD,eAAK,eAAe,GAAG;AAC/E;AACA;AACA;AACA,GAAG,+BAA+B,eAAK,eAAe,GAAG,qBAAqB,eAAK,eAAe,MAAM;AACxG;AACA;AACA;AACA,GAAG;AACH,sBAAsB,eAAK,eAAe,iBAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,4BAAe;AACrD;AACA,QAAQ,GAAG;AACX;AACA;AACA;AACA,GAAG,2CAA2C,eAAK,eAAe,GAAG;AACrE;AACA;AACA,GAAG,eAAe,eAAK,eAAe,iBAAQ;AAC9C;AACA;AACA;AACA,GAAG,eAAe,eAAK;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iFAAiF,eAAK,eAAe,gBAAgB;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG,eAAe,eAAK,eAAe,6BAAc;AACpD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,aAAa,sCAAsC,QAAQ;AAC5F;AACA,sBAAsB,cAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,2BAA2B,eAAK,eAAe,QAAQ;AACvD,4BAA4B,eAAK,eAAe,GAAG;AACnD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,eAAK;AACtC;AACA,6BAA6B,eAAK,eAAe,QAAQ;AACzD,8BAA8B,eAAK,eAAe,GAAG;AACrD;AACA;AACA;AACA;AACA,WAAW,eAAe,eAAK,eAAe,IAAI;AAClD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,wBAAwB,eAAK,eAAe,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG,kBAAkB,eAAK,eAAe,mCAAiB;AAC1D;AACA;AACA;AACA,GAAG,kDAAkD,eAAK,eAAe,GAAG;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;AC9aD,IAAI,+BAAS;AACb,SAAS,8BAAQ,IAAI,CAAC,8BAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2CAA6B,OAAO,uBAAS;AACxD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,iBAAiB,uBAAM;AACvB,oBAAoB,2BAAU,CAAC,WAAW;AAC1C,oBAAoB,2BAAU,CAAC,cAAc;AAC7C;AACA,qBAAqB,uBAAM;AAC3B,sBAAsB,oBAAe;AACrC,sBAAsB,wBAAW;AACjC,kBAAkB,wBAAO;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAO;AAC/B,WAAW,kBAAkB;AAC7B,GAAG;AACH;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA,GAAG;;AAEH;AACA,6BAA6B,wBAAO;AACpC;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH,mBAAmB,yBAAQ;AAC3B;AACA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;AACH,sBAAsB,4BAAW;AACjC;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA,eAAe,aAAa,sCAAsC,QAAQ;AAC1E,OAAO;AACP;AACA,gBAAgB,aAAa;AAC7B,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA,GAAG;AACH,2BAA2B,4BAAW;AACtC,WAAW,WAAW;AACtB,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,mBAAmB,aAAa;;AAEhC;AACA,oBAAoB,wBAAO;AAC3B;AACA;AACA;AACA,KAAK;AACL,4BAA4B,eAAK,eAAe,uCAAmB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,wBAAwB,wBAAO;AAC/B,WAAW,kBAAkB;AAC7B,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wBAAO;AAC1B;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH,kBAAkB,kBAAY;AAC9B,qDAAqD,eAAK,eAAe,GAAG;AAC5E;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,+BAAc,yCAAyC,eAAK;AAC9E;AACA;AACA,GAAG;AACH,iCAAiC,eAAK,eAAe,uBAAuB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAK,eAAe,iBAAQ;AAClD;AACA;AACA,GAAG,oCAAoC,eAAK;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,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G,gBAAgB,eAAK,eAAe,IAAI;AAC3C,CAAC;AACD,mCAAmC,2BAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,8BAA8B,4BAAW;AACzC;AACA;AACA;AACA,GAAG;AACH,mBAAmB,iBAAW;AAC9B,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,kBAAkB,uBAAM;AACxB,mBAAmB,uBAAM;AACzB,iBAAiB,uBAAM;AACvB,kBAAkB,uBAAM;;AAExB;AACA,EAAE,0BAAS;AACX;AACA;AACA,GAAG;;AAEH;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qBAAqB;AAC/B;AACA,OAAO;AACP,QAAQ,qBAAqB;AAC7B,OAAO;AACP,QAAQ,qBAAqB;AAC7B,OAAO;AACP,QAAQ,qBAAqB;AAC7B;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,mBAAmB,4BAAW;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL,sBAAsB,cAAc;AACpC;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,qBAAqB,4BAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD,WAAW;AACX;AACA,SAAS;AACT,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH,gBAAgB,4BAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH,qBAAqB,4BAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,yBAAyB,4BAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B,OAAO;AACP;AACA,QAAQ,qBAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,wBAAwB,4BAAW;AACnC;AACA;AACA;AACA;AACA,6BAA6B,QAAQ;AACrC,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA,GAAG;AACH,uBAAuB,4BAAW;AAClC,6EAA6E,aAAa;AAC1F;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,6BAA6B;AAC7B;AACA;AACA,GAAG;AACH;AACA,6CAA6C,SAAS;AACtD,kDAAkD,uBAAQ,GAAG;AAC7D,sBAAsB,eAAK,eAAe,iBAAQ;AAClD;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,4BAAe;AACrD;AACA,QAAQ,GAAG;AACX;AACA;AACA,GAAG,2BAA2B,eAAK,eAAe,GAAG;AACrD;AACA;AACA,GAAG,eAAe,eAAK;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iDAAiD,eAAK;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,GAAG,qCAAqC,eAAK,eAAe,gBAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,6BAAc;AACpD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,2BAA2B,eAAK,eAAe,GAAG,mCAAmC,eAAK,eAAe,IAAI,6BAA6B,cAAc;AACxJ;AACA;;AAEA;AACA,wBAAwB,eAAK,eAAe,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,GAAG,kBAAkB,eAAK,eAAe,mCAAiB;AAC1D;AACA;AACA;AACA,GAAG,mDAAmD,eAAK;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH,CAAC;;;ACjYD,IAAI,eAAS;AACb,SAAS,cAAQ,IAAI,CAAC,cAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,cAAQ,wBAAwB;AACjV,SAAS,mCAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACxL;AACxE;AACP;AACS;AACtB;AACU;AACW;AACE;AACiB;AACgD;AACnD;AACH;AACjB;AAC9C,sBAAsB;AACtB,sBAAsB,sBAAsB,eAAe,0BAAY;AACvE,IAAI,uBAAgB;AACpB;AACA;AACA;AACA,0BAA0B,2BAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,uBAAgB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAA6B,OAAO,eAAS;AACxD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,iBAAiB,uBAAM;AACvB,oBAAoB,2BAAU,CAAC,WAAW;AAC1C,oBAAoB,2BAAU,CAAC,cAAc;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,wBAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAO;AAC/B,WAAW,kBAAkB;AAC7B,GAAG;AACH;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;;AAEH;AACA,6BAA6B,wBAAO;AACpC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA,uBAAuB,QAAQ;AAC/B,SAAS;AACT;AACA;AACA,OAAO,8BAA8B,QAAQ;AAC7C;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH,mBAAmB,yBAAQ;AAC3B;AACA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;AACH,sBAAsB,4BAAW;AACjC;AACA;AACA;AACA,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA,GAAG;AACH,2BAA2B,4BAAW;AACtC,WAAW,WAAW;AACtB,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,mBAAmB,aAAa;;AAEhC;AACA,oBAAoB,wBAAO;AAC3B;AACA;AACA,KAAK,wCAAwC,uBAAuB,eAAK,qCAAqC;AAC9G;AACA,GAAG;AACH,wBAAwB,wBAAO;AAC/B,WAAW,kBAAkB;AAC7B,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wBAAO;AAC1B;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,kBAAkB,kBAAY;AAC9B,sBAAsB,eAAK,eAAe,iBAAQ;AAClD;AACA;AACA,GAAG,eAAe,eAAK,eAAe,sBAAsB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAK,eAAe,eAAe;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,GAAG;AACzC;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,GAAG;AACzC;AACA;AACA;AACA,GAAG,gDAAgD,eAAK,eAAe,eAAK,8DAA8D,eAAK,eAAe,WAAW;AACzK;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB,eAAK,eAAe,sBAAsB,EAAE,cAAQ;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sCAAsC,eAAK,eAAe,GAAG;AAChE;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,+BAAc,yCAAyC,eAAK;AAC9E;AACA;AACA,GAAG;AACH,CAAC;AACD,sBAAsB,cAAQ,GAAG,EAAE,0BAAY;AAC/C;AACA,mBAAmB,eAAe;;;;;AC5VC;AACnC,IAAI,2BAAQ;AACZ,IAAI,IAAq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AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B,eAAK,eAAe,2BAAe,EAAE,sBAAQ;AAC1E;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG;AACZ;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB,eAAK;AACxB;AACA;AACA;AACA,GAAG;AACH,yBAAyB,eAAK,eAAe,WAAW;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,wBAAwB,eAAK,eAAe,aAAa;AAC5D;AACA;AACA;AACA,GAAG;AACH;AACA,2BAA2B,eAAK,eAAe,iBAAQ;AACvD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA,0BAA0B,wBAAO;AACjC,eAAe,2BAAgB;AAC/B,WAAW,sBAAQ,GAAG;AACtB;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,6BAA6B,eAAK,eAAe,6CAAY;AAC7D;AACA,OAAO;AACP;AACA;AACA,yBAAyB,eAAK,eAAe,aAAa;AAC1D;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAK,eAAe,iCAAgB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;;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BAAoB,uBAAQ,C;;ACtBnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA,iGAAiG;AACjG;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;AC3GA,IAAI,aAAS;AACb,SAAS,YAAQ,IAAI,CAAC,YAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,YAAQ,wBAAwB;AACjV,SAAS,iCAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACrP;AAC/B;AACgB;AACF;AACE;AACN;AACF;AACoB;AACb;AACV;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACO,IAAI,SAAI;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iCAA6B,OAAO,aAAS;AACxD,kBAAkB,yBAAQ;AAC1B;AACA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;AACH,mBAAmB,yBAAQ;AAC3B;AACA;AAC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qBAAqB,4BAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,wBAAO;AACzB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH,sBAAsB,eAAK,eAAe,eAAK,8BAA8B,eAAK,eAAe,iBAAQ;AACzG;AACA,qEAAqE;AACrE,KAAK;AACL;AACA,uDAAuD;AACvD;AACA,GAAG,eAAe,eAAK,8BAA8B,cAAQ;AAC7D;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,wBAAwB,eAAK,eAAe,GAAG;AAC/C;AACA,MAAM,cAAQ;AACd;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA,oCAAoC;AACpC;AACA,KAAK,gBAAgB,eAAK,eAAe,GAAG;AAC5C;AACA;AACA;AACA,MAAM,cAAQ,GAAG;AACjB;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK,iCAAiC,eAAK,eAAe,GAAG;AAC7D;AACA;AACA,KAAK;AACL,GAAG,0EAA0E,eAAK,eAAe,IAAI;AACrG;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,GAAG;AACzC;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,IAAI;AAC1C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wBAAwB,eAAK,eAAe,iBAAQ;AACpD;AACA,KAAK,+BAA+B,eAAK,eAAe,aAAM,gCAAgC,eAAK,2CAA2C,eAAK,eAAe,IAAI;AACtK;AACA,KAAK,+CAA+C,eAAK,eAAe,IAAI;AAC5E;AACA;AACA,KAAK;AACL,GAAG;AACH;;;ACnKA,SAAS,cAAQ,IAAI,CAAC,cAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,cAAQ,wBAAwB;AAC1S;AACV;AACM;AACJ;AACG;AAClC,IAAI,aAAM;AACV;AACA;AACA;AACA;AACA,eAAe,wBAAO;AACtB;AACA;AACA,KAAK;AACL,GAAG;AACH,oBAAoB,wBAAO;AAC3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH,sBAAsB,eAAK,eAAe,GAAG;AAC7C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,+BAA+B,eAAK,eAAe,GAAG;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK,eAAe,eAAK,eAAe,aAAM,EAAE,cAAQ,GAAG,sDAAsD,eAAK,eAAe,IAAI;AACzI;AACA,6BAA6B,eAAK,eAAe,MAAM;AACvD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;;;ACnEiC;AAC1B,IAAI,YAAM;AACV;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAI,iBAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,6BAA6B,WAAK;AAClC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAA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AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAO;AACtB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA,qBAAqB,wBAAO;AAC5B;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA,oBAAoB,wBAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA,sBAAsB,wBAAO;AAC7B;AACA;AACA;AACA;AACA;AACA,wEAAwE,yCAAyC,iCAAiC,qCAAqC,qCAAqC,qCAAqC;AACjQ;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAQ,GAAG,EAAE,kBAAkB;AACtD;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;;AAEH;AACA,aAAa,wBAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG,iBAAQ,GAAG;AACnB;AACA;AACA,KAAK,GAAG,iBAAQ,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,mBAAmB,wBAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,eAAe,gBAAU;AACzB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa,gBAAU;AACvB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA,qBAAqB,wBAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,qBAAqB,sCAA6B,QAAQ,mBAAU;AACpE;AACA,6BAA6B,iBAAQ,GAAG,gCAAgC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,iBAAQ,GAAG;AACpE;AACA,WAAW,GAAG,oDAAoD,iBAAQ,GAAG;AAC7E,SAAS,EAAE,4DAA4D;AACvE;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAM;AAClC;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA,cAAc,wBAAO;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA,kCAAkC,iBAAQ,GAAG;AAC7C,kCAAkC,iBAAQ,GAAG;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,YAAY,wBAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW,OAAO,OAAO;AACtC,yCAAyC,WAAW,OAAO,OAAO;AAClE,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;;AAEH;AACA,oBAAoB,wBAAO;AAC3B;AACA;AACA,aAAa,gBAAgB;AAC7B,KAAK;AACL,GAAG;;AAEH;AACA,kBAAkB,wBAAO;AACzB,qDAAqD,gBAAgB;AACrE,GAAG;;AAEH;AACA;AACA,gBAAgB,wBAAO;AACvB;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,kBAAkB,wBAAO;AACzB;AACA,GAAG;;AAEH;AACA;AACA;AACA,yBAAyB,wBAAO;AAChC;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD,KAAK;AACL;AACA,GAAG;AACH,oBAAoB,wBAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gHAAgH,eAAK,eAAe,KAAK;AACzI;AACA;AACA,oCAAoC,iBAAQ,GAAG;AAC/C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK,KAAK;AACV;AACA;AACA,GAAG;AACH,gHAAgH,eAAK,eAAe,KAAK;AACzI;AACA;AACA,mCAAmC,iBAAQ,GAAG;AAC9C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,wBAAO;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH,qBAAqB,wBAAO;AAC5B;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC,eAAK,eAAe,KAAK;AAC3D;AACA;AACA;AACA,GAAG,mCAAmC,eAAK,eAAe,MAAM;AAChE;AACA;AACA;AACA,GAAG,oCAAoC,eAAK,eAAe,MAAM;AACjE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,kBAAkB,sCAA6B,QAAQ,mBAAU;AACjE;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAQ,GAAG;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA,qBAAqB,sCAA6B;AAClD,4BAA4B,eAAK,eAAe,KAAK;AACrD;AACA,UAAU,iBAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,wBAAwB,eAAK,eAAe,KAAK;AACjD;AACA,MAAM,iBAAQ;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG,mEAAmE,eAAK,eAAe,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG,eAAe,eAAK,eAAe,IAAI;AAC1C;AACA,GAAG,wDAAwD,eAAK,eAAe,aAAM;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,4CAA4C,eAAK,eAAe,aAAM;AACtE;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B,eAAK,eAAe,IAAI,EAAE,iBAAQ;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;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AC,6CAAY,KAAK,0BAAY;AACtD,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,YAAY,uBAAM;AAClB,oBAAoB,4BAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,oBAAoB,4BAAW;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,4BAAW;AAC7B;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAK,eAAe,KAAK;AAC/C;AACA,GAAG,eAAe,eAAK,eAAe,GAAG,EAAE,eAAQ;AACnD;AACA;AACA;AACA;AACA;AACA,GAAG,yCAAyC,eAAK;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,GAAG;AACzC;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA,eAAO;AACP,eAAO;AACP,sBAAsB,eAAO,eAAe,0BAAY;;;;;;ACtGK;AACZ;AACW;AACT;AACtB;AACM;AACI;AACR;AACU;AACI;AAC7C,IAAI,iBAAQ;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,iBAAiB,uBAAM;AACvB;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA,GAAG;AACH,+CAA+C,eAAK,eAAe,iBAAQ;AAC3E;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,GAAG;AACzC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;A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C9B;AACA;AACA,CAAC,sBAAsB,iBAAiB,QAAQ;AAChD,0CAA0C;AAC1C,CAAC;AACD,gDAAgD;AAChD,CAAC;;;ACxGD;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACO,IAAI,qBAAU;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,iCAAiC;AACjC;;AAEA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,yCAAyC,qBAAU;AACnD,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA,kBAAkB,qBAAU;AAC5B,kBAAkB,qBAAU;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAU;AACvB,KAAK;AACL;AACA,GAAG;AACH;AACA,aAAa,qBAAU;AACvB,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAU;AAC9B;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAU;AAC1B;AACA;AACA,uCAAuC,qBAAU;AACjD;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACO,IAAI,mCAAwB;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,UAAU,aAAa;AACpD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,wBAAwB,mCAAwB;AAChD;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,E;;AC5TA,IAAI,yBAAS;AACb,EAAE,gBAAU;AACZ,SAAS,wBAAQ,IAAI,CAAC,wBAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,wBAAQ,wBAAwB;AACjV,SAAS,6CAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACjT;AACwF;AAC1B;AACX;AACtB;AACM;AACI;AACoC;AAC5C;AACK;AACE;AACQ;AACqD;AACzD;AACU;AACA;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6CAA6B,wBAAwB,yBAAS;AACzE,kBAAkB,wBAAQ;AAC1B;AACA,GAAG;AACH;AACA;AACA;AACA,oBAAoB,wBAAQ,GAAG;AAC/B;AACA;;AAEA;AACA;AACA,IAAI,kBAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,qBAAc;AAC9B;AACA,KAAK;AACL;AACA;AACA,gBAAgB,qBAAc;AAC9B;AACA;AACA;AACA,qBAAqB,qBAAc;AACnC,2CAA2C,4CAAG,WAAW,KAAK;AAC9D;AACA;AACA,gBAAgB,4CAAG,OAAO,YAAY,WAAW,IAAI,cAAc,0BAA0B,cAAc;AAC3G;AACA;AACA;AACA;AACA;AACA,gBAAgB,4CAAG,uBAAuB,iBAAiB;AAC3D;AACA;AACA;AACA,6BAA6B,gDAAM,CAAC,MAAM;AAC1C;AACA;AACA,CAAC;AACD,SAAS,kBAAW;AACpB,CAAC;;AAED;AACA,uBAAuB,gDAAM,CAAC,GAAG;AACjC;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD,IAAI,aAAM,gBAAgB,2BAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6CAA6B,QAAQ,gBAAU;AAC1D,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD;AACA;AACA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,qBAAqB,4BAAW;AAChC;AACA;AACA,KAAK;AACL,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,0BAA0B,4BAAW;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,qBAAU;AACvB,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH,sBAAsB,eAAK,eAAe,qBAAqB,EAAE,wBAAQ;AACzE;AACA;AACA,GAAG,sBAAsB,eAAK,eAAe,kBAAkB,+BAA+B,eAAK,eAAe,yBAAY;AAC9H;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG,0CAA0C,eAAK,eAAe,mBAAmB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,2BAA2B,eAAK,eAAe,QAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,eAAK,eAAe,SAAS;AAC/D;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,eAAK,eAAe,IAAI,EAAE,wBAAQ,GAAG;AACjF;AACA,6BAA6B,eAAK,eAAe,IAAI;AACrD;AACA;AACA;AACA;AACA,+BAA+B,eAAK;AACpC;AACA,KAAK;AACL;AACA,6BAA6B,eAAK,eAAe,GAAG;AACpD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,6BAA6B,eAAK,eAAe,GAAG;AACpD;AACA,iBAAiB,sBAAsB;AACvC,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,6BAA6B,eAAK;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAe,eAAK,eAAe,GAAG;AAC7C;AACA;AACA;AACA;AACA,OAAO,gCAAgC,eAAK;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAK,eAAe,GAAG;AAClD;AACA;AACA;AACA,KAAK;AACL;AACA,4CAA4C,eAAK,eAAe,eAAO;AACvE;AACA;AACA,OAAO;AACP,sDA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;AACjT;AAC4D;AACX;AACP;AACH;AACY;AACZ;AACE;AACF;AACO;AAChB;AAC8C;AACX;AACd;AACnD,uBAAuB,qBAAI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAK,eAAe,eAAK,8BAA8B,eAAK,eAAe,kBAAkB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG,yCAAyC,eAAK,eAAe,IAAI;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAK,eAAe,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb,WAAW;AACX;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG,8BAA8B,eAAK,eAAe,yBAAY;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH,wBAAwB,eAAK,eAAe,IAAI;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG,gDAAgD,eAAK,eAAe,kBAAkB;AACzF;AACA,GAAG,yCAAyC,eAAK,eAAe,SAAS,sBAAsB,eAAK,eAAe,SAAS;AAC5H;AACA,GAAG;AACH,CAAC;AACD,wBAAwB,2BAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iCAA6B,QAAQ,aAAS;AACzD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,wB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;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAA6B,OAAO,oBAAS;AACxD,cAAc,wBAAO;AACrB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,+CAA+C,qBAAU;AACzD;AACA;AACA;AACA;AACA,4CAA4C,qBAAU;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG;AACH,sBAAsB,eAAK,eAAe,mBAAmB,EAAE,mBAAQ;AACvE;AACA;AACA,GAAG,sBAAsB,eAAK,eAAe,6BAAc;AAC3D;AACA;AACA;AACA;AACA,0BAA0B,eAAK,eAAe,QAAQ,qBAAqB,eAAK,eAAe,SAAS;AACxG,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC,wBAAwB,eAAK,eAAe,kBAAkB;AAC9D;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,yBAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,0CAA0C,eAAK,eAAe,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,0BAA0B,eAAK,eAAe,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA;AAC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A;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;AACH,mBAAmB,yBAAQ;AAC3B;AACA;;AAEA;AACA,mBAAmB,yBAAQ,GAAG;AAC9B;AACA;;AAEA;AACA,kBAAkB,uBAAM;AACxB,gBAAgB,uBAAM;AACtB,kBAAkB,uBAAM;AACxB,oBAAoB,yBAAQ;AAC5B;AACA;AACA,oBAAoB,yBAAQ;AAC5B;AACA;;AAEA;AACA,oBAAoB,yBAAQ;AAC5B;AACA;;AAEA;AACA,oBAAoB,yBAAQ;AAC5B;AACA;AACA,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;;AAEH;AACA,EAAE,eAAe;AACjB;AACA;AACA;AACA,GAAG;AACH,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,iBAAQ,GAAG;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iEAAiE,sDAAsD;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAQ,GAAG;AAC1B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,iBAAQ,GAAG;AACtC,mCAAmC,iBAAQ,GAAG;AAC9C;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,iBAAQ,GAAG;AACrC;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,4BAAW;AAC5B;AACA,uBAAuB,iBAAQ,GAAG;AAClC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAa,CAAC,iBAAQ;AAC7C;AACA,YAAY,aAAa;AACzB;AACA,KAAK;AACL;AACA;AACA;AACA,6BAA6B,+BAAe,GAAG,iBAAQ;AACvD,mCAAmC,iBAAQ,GAAG;AAC9C;AACA,GAAG;;AAEH;AACA;AACA,qCAAqC,GAAG,GAAG,iBAAQ;AACnD;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,sCAAsC,eAAK,eAAe,GAAG;AAC7D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,IAAI;AAC5C;AACA,0CAA0C,eAAK,eAAe,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB,eAAK,eAAe,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,eAAK,wDAAwD,eAAK,uEAAuE,eAAK,eAAe,eAAe,EAAE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;AACrC,CAAC,EAAE,aAAa;AAChB,gCAAgC,iBAAU;AAC1C;AACA;AACA,GAAG;AACH,CAAC;AACD,4BAA4B,iBAAU;AACtC;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,CAAC;AACD,iBAAiB,gDAAM,CAAC,GAAG;AAC3B;AACA;AACA,CAAC,sBAAsB,KAAK,aAAa,KAAK;AAC9C,gEAAgE;AAChE,CAAC;AACD,+DAA+D;AAC/D,CAAC,EAAE,mBAAY;AACf;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA,CAAC;AACD,sDAAsD;AACtD,CAAC;AACD;AACA,CAAC;;AAED;AACA,IAAI,oBAAe,GAAG,gDAAM,CAAC,GAAG;AAChC;AACA;AACA,CAAC,SAAS;AACV;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,YAAY,mCAAmC,0BAA0B,aAAa;AACjI;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;;AAEA,wBAAwB,eAAK;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iCAA6B,OAAO,aAAS;AACxD,gBAAgB,oBAAe;AAC/B,cAAc,2BAAU,CAAC,6CAAY;AACrC,oBAAoB,2BAAU,CAAC,WAAW;AAC1C;AACA,wCAAwC,cAAS;;AAEjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;;AAEA;AACA,iBAAiB,wBAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,uBAAuB,wBAAa,CAAC,YAAQ;AAC7C;AACA,YAAY,aAAa;AACzB;AACA,KAAK;AACL;AACA;AACA,6BAA6B,oBAAe,GAAG,iBAAQ;AACvD,mCAAmC,YAAQ,GAAG;AAC9C,oBAAoB,uBAAM;AAC1B,sBAAsB,6BAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAK,wDAAwD,eAAK,eAAe,iBAAQ;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG,eAAe,eAAK,2BAA2B,YAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG,iCAAiC,eAAK,eAAe,6BAAc;AACtE;AACA;AACA;AACA;AACA;AACA,0BAA0B,eAAK,eAAe,GAAG;AACjD;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,0FAA0F,eAAK,eAAe,IAAI;AAClH;AACA;AACA,OAAO;AACP;AACA;AACA,0GAA0G,eAAK,eAAe,IAAI;AAClI;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAK,eAAe,GAAG;AACrD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gDAAgD,eAAK,eAAe,GAAG;AACvE;AACA;AACA;AACA,OAAO,eAAe,eAAK,eAAe,MAAM;AAChD;AACA;AACA,2BAA2B,eAAK;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO,gBAAgB,eAAK,eAAe,MAAM;AACjD;AACA;AACA,2BAA2B,eAAK;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AAC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A;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,kBAAkB,uBAAM;AACxB,aAAa,2BAAU,CAAC,iBAAiB;AACzC,sBAAsB,6BAAY;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,wBAAO;AACvB,WAAW,eAAK;AAChB,0BAA0B,eAAK;AAC/B,KAAK;AACL,GAAG;;AAEH;AACA,kBAAkB,4BAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,yBAAyB,4BAAW;AACpC;AACA;AACA,GAAG;AACH,iBAAiB,4BAAW;AAC5B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA,4FAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA,0IAA0I;AAC1I;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;A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,mBAAQ,wBAAwB;AACjV,SAAS,wCAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACxM;AAChD;AACN;AACtB;AACM;AACJ;AACmB;AACX;AACgC;AACyB;AAC7C;AACnD;AACA;AACA,sBAAsB,KAAK;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,IAAI,wBAAY,GAAG,gDAAM,CAAC,GAAG;AAC7B;AACA;AACA,CAAC,SAAS;AACV,4BAA4B,gBAAS,qEAAqE;AAC1G,CAAC;AACD,IAAI,qBAAS;AACb;AACA;AACA;AACA,+BAA+B,2BAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAA6B,OAAO,oBAAS;AACxD,cAAc,2BAAU,CAAC,6CAAY,KAAK,0BAAY;AACtD,oBAAoB,2BAAU,CAAC,WAAW;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mBAAmB,wBAAO;AAC1B;AACA,GAAG;AACH,iBAAiB,oBAAe;AAChC,gBAAgB,uBAAM;;AAEtB;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,wCAAwC;AACxC;;AAEA;AACA,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM;AACb;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,4BAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA,sBAAsB,4BAAW;AACjC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,iBAAiB,4BAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH,qBAAqB,4BAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,yBAAyB,4BAAW;AACpC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,uBAAuB,4BAAW;AAClC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,cAAc,4BAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,mBAAmB,4BAAW;AAC9B;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA,wBAAwB,iBAAY;AACpC,sBAAsB,eAAK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2B,EAAE,EAAE,EAAE,eAAe,GAAG,QAAQ,aAAQ,wBAAwB;AAChS;AACA;;AAEjD;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,oBAAoB,IAAI;AACxB,GAAG;AACH;AACA;AACA,oBAAoB,IAAI;AACxB;AACA;AACO;AACP;AACA;AACA;AACA;AACA,gEAAgE,aAAQ;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACO,IAAI,iBAAW;AACtB;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAI,oBAAc;AACzB;AACA;AACA,aAAa,kBAAkB;AAC/B,KAAK;AACL;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACO,IAAI,iBAAW;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC,YAAY;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;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,cAAc,wBAAO;AACrB;AACA,GAAG;AACH,8BAA8B,eAAK,eAAe,QAAQ,EAAE,iBAAQ;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,4EAA4E;AAC5E,+BAA+B,iBAAW;AAC1C;AACA,mBAAmB,sBAAY;AAC/B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH,yBAAyB,wBAAO;AAChC;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,wBAAwB,eAAK,eAAe,UAAU,EAAE,iBAAQ;AAChE;AACA;AACA,iBAAiB,iBAAQ;AACzB;AACA,OAAO;AACP;AACA,oDAAoD,eAAK,eAAe,0BAAY;AACpF;AACA,OAAO;AACP,KAAK;AACL;AACA,oCAAoC,eAAK,eAAe,MAAM;AAC9D;AACA;AACA,kDAAkD,eAAK,eAAe,0BAAY;AAClF;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH,2BAA2B,eAAK,eAAe,WAAW;AAC1D;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,iBAAQ;AAC9C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,GAAG;AACzC;AACA;AACA;AACA;AACA;AACA,GAAG,0CAA0C,eAAK,eAAe,WAAW,EAAE,iBAAQ;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,sBAAsB,iBAAW;AACjC,+BAA+B,oBAAc;AAC7C;AACA;AACA;AACA,yDAAyD,sBAAY;AACrE;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,wBAAwB,eAAK,eAAe,GAAG;AAC/C;A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A,GAAG;AACH,iBAAiB,4BAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA,sBAAsB,uBAAM;;AAE5B;AACA;AACA,EAAE,0BAAS;AACX;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,yBAAyB,4BAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,oCAA6B,QAAQ,iBAAU;AACxE;AACA,wBAAwB,eAAQ,GAAG;AACnC;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA,sCAAsC,gBAAgB;AACtD;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,4BAA4B,eAAK,uBAAuB,eAAQ;AAChE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,sBAAsB,eAAK,eAAe,aAAa,EAAE,eAAQ;AACjE;AACA;AACA;AACA;AACA,GAAG,sBAAsB,eAAK;AAC9B,CAAC;AACD;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;;;;;AC9MpC,SAAS,8BAAQ,IAAI,CAAC,8BAAQ,6DAA6D,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAA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BAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA;AACA;AACA,iBAAiB,oBAAe;AAChC,mBAAmB,uBAAM;AACzB,kBAAkB,uBAAM;AACxB;AACA;AACA,sBAAsB,wBAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD,KAAK,eAAe,iBAAQ,GAAG;AAC/B;AACA;AACA,0DAA0D;AAC1D,KAAK,eAAe,iBAAQ,GAAG;AAC/B;AACA;AACA,6DAA6D;AAC7D,KAAK,eAAe,iBAAQ,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,gBAAgB;AACpG;AACA,4DAA4D,gBAAgB;AAC5E,KAAK;AACL,wCAAwC,gBAAgB;AACxD,KAAK;AACL,GAAG;AACH,qEAAqE,gBAAgB;AACrF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,sBAAsB,eAAK,eAAe,eAAK,8BAA8B,eAAK;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG,eAAe,eAAK,eAAe,eAAe,EAAE,iBAAQ;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG,wDAAwD,eAAK,eAAe,GAAG;AAClF;AACA;AACA;AACA;AACA,GAAG,qDAAqD,eAAK,eAAe,eAAK,8BAA8B,eAAK,eAAe,iBAAO,kDAAkD,eAAK,eAAe,iBAAQ;AACxN;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG,wCAAwC,eAAK,eAAe,MAAM;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG,iBAAiB,eAAK,eAAe,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG,wDAAwD,eAAK,eAAe,GAAG;AAClF;AACA;AACA;AACA,GAAG,eAAe,eAAK;AACvB;AACA;AACA,GAAG,iBAAiB,eAAK,eAAe,GAAG;AAC3C;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,MAAM;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL,uBAAuB,eAAK;AAC5B;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,GAAG,gBAAgB,eAAK,eAAe,iBAAQ;AAC/C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG,wCAAwC,eAAK,eAAe,MAAM;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG,iBAAiB,eAAK,eAAe,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH,wBAAwB,eAAK,eAAe,GAAG;AAC/C;AACA;AACA;AACA;AACA,KAAK,+CAA+C,eAAK,eAAe,GAAG,EAAE,iBAAQ,GAAG;AACxF;AACA;AACA;AACA,KAAK,2EAA2E,eAAK,eAAe,0BAAW,sBAAsB,eAAK;AAC1I;AACA;AACA,KAAK,4BAA4B,eAAK,eAAe,GAAG;AACxD;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,MAAM;AAC9C;AACA;AACA;AACA;AACA,OAAO;AACP,yBAAyB,eAAK;AAC9B;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA,KAAK,sCAAsC,eAAK,eAAe,iBAAQ;AACvE;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK,wCAAwC,eAAK,eAAe,MAAM;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK,iBAAiB,eAAK,eAAe,MAAM;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG,2CAA2C,eAAK;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,8CAA8C,0BAAY;AAC1D;AACA,sBAAsB,kBAAkB;;;;;AC1eA;AACK;AACtC,cAAc,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,2HAA2H;AAC3H;AACA,OAAO;AACP;AACA;AACA,kJAAkJ;AAClJ;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA,YAAY,4CAAG;AACf,gDAAgD;AAChD,KAAK;AACL;AACA,CAAC,E;;AClCuC;AACK;AACI;AACjD,IAAI,iBAAY;AAChB,IAAI,kBAAa;AACjB,IAAI,iBAAY;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,oBAAe;AACnB,IAAI,WAAM;AACV;AACA,cAAc,oBAAe;AAC7B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI,eAAU;AACd;AACA,IAAI,WAAM;AACV,GAAG;AACH;AACA,eAAU,CAAC,iBAAY;AACvB,eAAU,CAAC,kBAAa;AACxB,YAAY,iBAAY;AACxB,EAAE,WAAM,sBAAsB,iBAAY;AAC1C,CAAC;AACM,IAAI,SAAI,GAAG,UAAU;AAC5B;AACA,YAAY,WAAM;AAClB;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,4CAAG,QAAQ;AAC1B,iBAAiB,cAAc;AAC/B,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,gBAAgB,oBAAe;AAC/B;AACA;AACA;AACA;AACA,CAAC,E;;AC3EuC;AACK;AACtC,wBAAwB,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,2FAA2F;AAC3F,OAAO;AACP;AACA,2FAA2F;AAC3F,OAAO;AACP;AACA,mHAAmH;AACnH;AACA,OAAO;AACP;AACA,2FAA2F;AAC3F;AACA;AACA,KAAK;AACL;AACA;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BAAwB;AACjV,SAAS,oCAA6B,oBAAoB,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACzO;AAClB;AACmC;AACsC;AAC9E;AACD;AACW;AACI;AACmB;AACvB;AACZ;AACqB;AACpE,sBAAsB,0DAAiB,QAAQ,UAAU;AACzD,IAAI,wBAAgB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA,2BAA2B,2BAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAA6B,QAAQ,gBAAS;AACzD;AACA;AACA;AACA;AACA,kBAAkB,yBAAQ;AAC1B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA,cAAc,wBAAO;AACrB,oBAAoB,SAAS,CAAC,SAAS,iBAAiB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,qBAAqB,2BAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,iBAAiB,wBAAO;AACxB;AACA;AACA,uBAAuB,SAAS,CAAC,iBAAe,+DAA+D;AAC/G;AACA;AACA;AACA;AACA,0DAA0D,OAAO;AACjE;AACA;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,sCAAsC,wBAAgB;AACtD,mBAAmB,oBAAe;AAClC,EAAE,0BAAS;AACX;AACA,GAAG;AACH,sBAAsB,eAAK,eAAe,6CAAY;AACtD;AACA,GAAG,eAAe,eAAK,eAAe,iBAAiB;AACvD;AACA,GAAG,eAAe,eAAK,eAAe,YAAY;AAClD;AACA,GAAG,eAAe,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ACA,yBAAyB,uBAAM;AAC/B,mBAAmB,uBAAM;AACzB,kBAAkB,wBAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,mBAAmB,yBAAQ;AAC3B;AACA;AACA,mBAAmB,yBAAQ;AAC3B;AACA;AACA;AACA,oBAAoB,4BAAW;AAC/B;AACA;AACA,GAAG;AACH,mBAAmB,4BAAW;AAC9B;AACA,GAAG;AACH,EAAE,0BAAS;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,eAAK;AAC7E;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2BAA2B,eAAK,eAAe,GAAG;AAClD;AACA;AACA;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,IAAI;AAC5C;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,eAAK,eAAe,GAAG;AAC1D;AACA,GAAG,eAAe,eAAK,eAAe,MAAM,EAAE,YAAQ;AACtD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,mBAAmB,YAAQ,GAAG;AAC9B;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,oDAAoD,eAAK,eAAe,GAAG;AAC3E;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,MAAM,eAAK,eAAe,GAAG;AAC7B;AACA;AACA;AACA,OAAO,eAAe,eAAK,eAAe,MAAM,EAAE,YAAQ;AAC1D;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO,kBAAkB,YAAQ,GAAG;AACpC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,eAAK,eAAe,GAAG;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,iCAAiC,eAAK,eAAe,GAAG;AAC/D;AACA,OAAO,eAAe,eAAK,eAAe,GAAG;AAC7C;AACA;AACA;AACA;AACA;AACA,OAAO,iBAAiB,eAAK,eAAe,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH,sBAAsB,eAAK,eAAe,iBAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe,eAAK,eAAe,UAAU,EAAE,YAAQ;AAC1D;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAK,eAAe,iBAAQ;AAC1D;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,iBAAY;AACpD;AACA;AACA;AACA,KAAK,gGAAgG,eAAK,eAAe,GAAG;AAC5H;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA,GAAG;AACH,aAAa,4BAAW;AACxB;AACA,GAAG;AACH,cAAc,4BAAW;AACzB;AACA,GAAG;AACH,cAAc,4BAAW;AACzB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,aAAa,4BAAW;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,oBAAoB,4BAAW;AAC/B;AACA;AACA,GAAG;AACH,qBAAqB,4BAAW;AAChC;AACA;AACA,GAAG;AACH,eAAe,4BAAW;AAC1B;AACA,GAAG;AACH,gBAAgB,4BAAW;AAC3B;AACA,GAAG;AACH,qBAAqB,4BAAW;AAChC;AACA,mBAAmB,uBAAuB;AAC1C,GAAG;AACH,mBAAmB,4BAAW;AAC9B;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,eAAK;AAC5D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,yBAAyB,qBAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,yBAAyB,eAAK;AAC9B;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,eAAK;AACvD;AACA,SAAS,iBAAiB,eAAK;AAC/B;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAK;AAChC;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,2BAA2B,eAAK;AAChC;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA,2BAA2B,eAAK;AAChC;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,mCAAmC,eAAK,eAAe,mBAAmB;AAC1E;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA,KAAK,eAAe,eAAK,eAAe,GAAG;AAC3C;AACA;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,MAAM;AAC9C,mCAAmC,eAAK;AACxC;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO,iBAAiB,eAAK;AAC7B;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK,gBAAgB,eAAK,eAAe,GAAG;AAC5C;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,GAAG;AAC3C;AACA,KAAK,eAAe,eAAK,eAAe,KAAK,qBAAqB,eAAK,eAAe,KAAK;AAC3F;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,gBAAgB,eAAK,eAAe,mBAAmB;AAC5D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK,kBAAkB,eAAK,eAAe,GAAG;AAC9C;AACA;AACA;AACA,KAAK,eAAe,eAAK,eAAe,IAAI;AAC5C;AACA,KAAK,iCAAiC,eAAK,eAAe,IAAI;AAC9D,yBAAyB,eAAK;AAC9B;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAK,eAAe,iBAAQ;AAClD;AACA;AACA,GAAG,eAAe,eAAK,eAAe,oBAAoB,EAAE,aAAQ;AACpE;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB,eAAK,eAAe,WAAW,EAAE,aAAQ,GAAG;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA,kBAAkB,cAAc;;;;;AC3kBO;AACK;AACO;AACnD,IAAI,wBAAS;AACb;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;;AAEA;AACA,qBAAqB,wCAAM;AAC3B;AACA;AACA,CAAC,mBAAmB,IAAI,aAAa;AACrC,wCAAwC,wBAAS,gCAAgC;AACjF,CAAC;AACD;AACA,CAAC;AACD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ACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,2BAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAA6B,QAAQ,iBAAS;AACzD,cAAc,eAAK,YAAY,6CAAY;AAC3C,cAAc,eAAK;AACnB,wBAAwB,eAAK,YAAY;AACzC;AACA;AACA,EAAE,eAAK;AACP;AACA;AACA;AACA;AACA;AACA,OAAO,IAAI;AACX,KAAK,sBAAsB;AAC3B,GAAG;AACH,yBAAyB,eAAK;AAC9B;AACA;;AAEA;AACA,yBAAyB,eAAK;AAC9B;AACA;AACA,EAAE,eAAK;AACP;AACA;AACA;AACA,kBAAkB,qCAA6B,QAAQ,kBAAU;AACjE;AACA,eAAe,gBAAQ;AACvB;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,yBAAyB,eAAK;AAC9B;AACA;AACA,yBAAyB,eAAK;AAC9B;AACA;AACA,yBAAyB,eAAK;AAC9B;AACA;AACA,yBAAyB,eAAK;AAC9B;AACA;AACA,qBAAqB,eAAK;AAC1B,iBAAiB,eAAK;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH,oBAAoB,eAAK;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA,uBAAuB,qCAA6B,QAAQ,kBAAU;AACtE;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB,eAAK,oBAAoB,gBAAQ;AACzD;AACA,KAAK,kDAAkD,eAAK;AAC5D;AACA;AACA;AACA;AACA,KAAK,gBAAgB,eAAK;AAC1B;AACA;AACA,mBAAmB,gBAAgB;AACnC,cAAc,cAAc;AAC5B,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qCAA6B,QAAQ,kBAAU;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,uCAAuC,eAAK,eAAe,IAAI,EAAE,gBAAQ;AACzE;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,wBAAwB,eAAK,uBAAuB,gBAAQ;AAC5D;AACA;AACA;AACA,OAAO;AACP;AACA,mBAAmB,gBAAgB;AACnC,cAAc,cAAc;AAC5B,KAAK;AACL;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,eAAK;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,eAAe,eAAK;AACzB;AACA,mBAAmB,gBAAgB;AACnC,cAAc,cAAc;AAC5B;AACA,KAAK;AACL;AACA,sBAAsB,eAAK,eAAe,eAAK,8BAA8B,eAAK,eAAe,cAAc,EAAE,gBAAQ;AACzH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,wCAAwC,eAAK;AAChD;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA,6CAA6C,0BAAY;AACzD,qBAAqB,iBAAiB;;;;;ACrYV;AACK;AACR;AACA;AACH;AACG;AACE;AACJ;AACI;AACE;AACA;AACL;AACG;AACK;AACR;AACG;AACH;AACM;AACP;AACK;AACC;AACC;AACD;AACF;AACG;AACF;AACO;AACA;AACR;AACC;AACF;AACK;AACR;AACM;AACD;AACH;AACF;AACK;AACL;AACG;AACD;AACC;AACF;AACS;AACN;AACH;AACD;AACA;AACI;AACG;AACP;AACC;AACD;AACO;AACD;AACA;AACD;AACI;AACA;AACV;AACS;AACD;AACK;AACN;AACG;AACD;AACA;AACN;AACQ;AACP;AACC;AACA;AACC;AACK;AACP;AACF;AACK;AACL;AACI;AACA;AACE;AACA;AACH;AACL;AACC;AACD;AACC;AACI;AACC;AACN;AACI;AACK;AACP;;;AC5FxB;;AAE6B;AACF;AACK;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJnB;;AAEb;AACA;AACA,eAAe,mBAAO,CAAC,mFAA6B;AACpD,uBAAuB,mBAAO,CAAC,mGAAqC;AACpE,yBAAyB,mBAAO,CAAC,uGAAuC;AACxE,qBAAqB,mBAAO,CAAC,+FAAmC;AAChE,cAAc,mBAAO,CAAC,iFAA4B;AAClD,iBAAiB,mBAAO,CAAC,uFAA+B;AACxD,gBAAgB,mBAAO,CAAC,qFAA8B;AACtD,gBAAgB,mBAAO,CAAC,qFAA8B;AACtD,oBAAoB,mBAAO,CAAC,6FAAkC;AAC9D,cAAc,mBAAO,CAAC,iFAA4B;AAClD,YAAY,mBAAO,CAAC,6EAA0B;AAC9C,aAAa,mBAAO,CAAC,+EAA2B;AAChD,YAAY,mBAAO,CAAC,6EAA0B;AAC9C,eAAe,mBAAO,CAAC,mFAA6B;AACpD,gBAAgB,mBAAO,CAAC,qFAA8B;AACtD,2BAA2B,mBAAO,CAAC,2GAAyC;AAC5E,uBAAuB,mBAAO,CAAC,mGAAqC;AACpE,0BAA0B,mBAAO,CAAC,yGAAwC;AAC1E,0BAA0B,mBAAO,CAAC,yGAAwC;AAC1E,gBAAgB,mBAAO,CAAC,qFAA8B;AACtD,cAAc,mBAAO,CAAC,iFAA4B;AAClD,iBAAiB,mBAAO,CAAC,uFAA+B;AACxD,YAAY,mBAAO,CAAC,+EAA2B;AAC/C,cAAc,mBAAO,CAAC,gEAAiB;AACvC,cAAc,mBAAO,CAAC,gEAAiB;AACvC,qBAAqB,sEAAsE,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,wCAAwC;AACjV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;;AAET,iBAAiB;AACjB,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,qBAAqB,oCAAoC;AACzD;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB;AACvB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,mBAAmB,oCAAoC;AACvD;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,SAAS;;AAET;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,SAAS;;AAET;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,OAAO;;AAEP;AACA,mBAAmB;AACnB;AACA;AACA,OAAO;AACP,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,wBAAwB;AACxB,0BAA0B;AAC1B,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,wBAAwB;AACxB,0BAA0B;AAC1B,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,wBAAwB;AACxB,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV,gBAAgB;AAChB,cAAc;AACd;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mBAAmB,oCAAoC;AACvD,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA,qBAAqB,oCAAoC;AACzD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP,iBAAiB,oCAAoC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;;AAEL;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,YAAY;AACZ;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ;AACR;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP,gBAAgB;AAChB;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ,OAAO;;AAEP;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B;AAC5B,6BAA6B;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B;AAC5B,6BAA6B;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B;AAC5B,6BAA6B;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B;AAC5B,6BAA6B;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B;AAC5B,6BAA6B;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B;AAC5B,6BAA6B;AAC7B;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,UAAU;AACV;AACA,oBAAoB,qBAAqB;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,mBAAmB,oCAAoC;AACvD;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,oBAAoB;AACpB;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B;AAC5B,yBAAyB;AACzB,YAAY;AACZ;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,6BAA6B;AAC7B;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,6BAA6B;AAC7B;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wBAAwB;AACxB,yBAAyB;AACzB,wBAAwB;AACxB,yBAAyB;AACzB,0BAA0B;AAC1B,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,YAAY;AACZ,mBAAmB,oCAAoC;AACvD;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA,sBAAsB;AACtB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,cAAc;AACd,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA,OAAO;;AAEP;AACA,mBAAmB,oCAAoC;AACvD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB,mBAAmB;AACnB,UAAU;AACV;AACA,mBAAmB,oCAAoC;AACvD;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,yBAAyB;AACzB,wBAAwB;AACxB,yBAAyB;AACzB;AACA,wBAAwB;AACxB;AACA,yBAAyB;AACzB,0BAA0B;AAC1B,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oBAAoB,qBAAqB;AACzC,KAAK;AACL;AACA;AACA,oBAAoB,qBAAqB;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oCAAoC;AACvD,OAAO;;AAEP;AACA;AACA;AACA,mBAAmB;AACnB;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,oB;;;;;;;;;;;;;;ACnpEa;;AAEb;AACA;AACA,wBAAwB,mBAAO,CAAC,kGAAmB;AACnD,cAAc,mBAAO,CAAC,gEAAiB;AACvC,cAAc,mBAAO,CAAC,gEAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,iDAAiD;AACjD;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oB;;;;;;;;;;;;;;AChFa;;AAEb;AACA;AACA,wBAAwB,mBAAO,CAAC,kGAAmB;AACnD,cAAc,mBAAO,CAAC,gEAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,2HAA2H;AAC3H;AACA,OAAO;AACP;AACA;AACA,kJAAkJ;AAClJ;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,gDAAgD;AAChD,KAAK;AACL;AACA,CAAC;AACD,0B;;;;;;;;;;;;;;ACvCa;;AAEb;AACA;AACA,wBAAwB,mBAAO,CAAC,kGAAmB;AACnD,cAAc,mBAAO,CAAC,gEAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,2FAA2F;AAC3F,OAAO;AACP;AACA,2FAA2F;AAC3F,OAAO;AACP;AACA,mHAAmH;AACnH;AACA,OAAO;AACP;AACA,2FAA2F;AAC3F;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,sCAAsC,kCAAkC,uBAAuB,qBAAqB,yIAAyI,8KAA8K,GAAG;AAC9a;AACA,GAAG;AACH;AACA,kEAAkE;AAClE,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,kIAAkI,yBAAyB,QAAQ,gBAAgB;AACnL,GAAG;AACH;AACA,0HAA0H;AAC1H;AACA,CAAC;AACD,8C;;;;;;;;;;;;;;ACrIa;;AAEb;AACA;AACA,YAAY,mBAAO,CAAC,sDAAQ;AAC5B;AACA;AACA,eAAe,mBAAO,CAAC,4DAAW;AAClC;AACA,YAAY,mBAAO,CAAC,sDAAQ;AAC5B;AACA,qBAAqB,mBAAO,CAAC,gFAAqB;AAClD,6D;;;;;;;;;;;;;;ACZa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4C;;;;;;;;;;;;;;AC1Na;;AAEb;AACA;AACA,oCAAoC,mBAAO,CAAC,6CAAO;AACnD,sCAAsC,uCAAuC,kBAAkB;AAC/F;AACA,sC;;;;;;;;;;;;;;ACPa;;AAEb;AACA;AACA,wBAAwB,mBAAO,CAAC,kGAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,gDAAgD,sCAAsC;AACtF;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qCAAqC,8BAA8B;AACnE;AACA;AACA,qCAAqC,+BAA+B;AACpE;AACA;AACA,uCAAuC,0BAA0B;AACjE;AACA;AACA,mCAAmC,8BAA8B;AACjE;AACA;AACA,gEAAgE,oBAAoB;AACpF;AACA;AACA,+DAA+D,oBAAoB;AACnF;AACA;AACA,gEAAgE,oBAAoB;AACpF;AACA;AACA,+DAA+D,oBAAoB;AACnF;AACA;AACA,8DAA8D,oBAAoB;AAClF;AACA;AACA,8DAA8D,oBAAoB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,MAAM,GAAG,MAAM;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oD;;;;;;;;;;;;;;ACtHa;;AAEb;AACA;AACA,wBAAwB,mBAAO,CAAC,kGAAmB;AACnD,cAAc,mBAAO,CAAC,yDAAU;AAChC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,GAAG,UAAU;AACjC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,4CAA4C,oCAAoC,8CAA8C;AAC3N;AACA;AACA,gFAAgF,sBAAsB;AACtG;AACA;AACA,sGAAsG,6DAA6D,wGAAwG,8EAA8E,8DAA8D;;AAEvZ;AACA;AACA;AACA;AACA,2FAA2F,qEAAqE,qBAAqB,oBAAoB,wBAAwB,+BAA+B,mBAAmB,qBAAqB,oBAAoB,sBAAsB,wBAAwB,mCAAmC,8LAA8L,WAAW;AACtlB;AACA;AACA,8DAA8D,+DAA+D;AAC7H;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,oNAAoN;AACpN;AACA,wD;;;;;;;;;;;;;;ACjNa;;AAEb;AACA;AACA,wBAAwB,mBAAO,CAAC,kGAAmB;AACnD,cAAc,mBAAO,CAAC,yDAAU;AAChC,cAAc,mBAAO,CAAC,yDAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6HAA6H;AAC7H,4FAA4F;AAC5F,sEAAsE,oCAAoC;AAC1G,uEAAuE,qCAAqC;AAC5G,2CAA2C;AAC3C,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA,KAAK;AACL,uEAAuE;AACvE;AACA;AACA;AACA,KAAK;AACL,gEAAgE,kBAAkB;AAClF;AACA;AACA;AACA,KAAK;AACL,+DAA+D,mBAAmB;AAClF;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,kC;;;;;;;;;;;;;;ACnEa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,EAAE;AAC/B;AACA,GAAG;AACH;AACA,2BAA2B,EAAE;AAC7B;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,IAAI,gBAAgB,IAAI;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0B;;;;;;;;;;;;;;ACrJa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gD;;;;;;;;;;;;;;ACba;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8C;;;;;;;;;;;;;;AC1Ca;;AAEb;AACA;AACA,aAAa,mBAAO,CAAC,6CAAO;AAC5B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,oC;;;;;;;;;;;;;;ACXa;;AAEb;AACA,iBAAiB,mBAAO,CAAC,+DAAa;AACtC;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc,mBAAO,CAAC,yDAAU;AAChC;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB,mBAAO,CAAC,iEAAc;AACxC;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc,mBAAO,CAAC,yDAAU;AAChC;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc,mBAAO,CAAC,yDAAU;AAChC;AACA;AACA;AACA;AACA,CAAC;AACD,aAAa,mBAAO,CAAC,uDAAS;AAC9B;AACA;AACA;AACA;AACA,CAAC;AACD,WAAW,mBAAO,CAAC,mDAAO;AAC1B;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB,mBAAO,CAAC,6DAAY;AACpC;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY,mBAAO,CAAC,qDAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc,mBAAO,CAAC,yDAAU;AAChC;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc,mBAAO,CAAC,yDAAU;AAChC;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB,mBAAO,CAAC,iEAAc;AACxC;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB,mBAAO,CAAC,uEAAiB;AAC9C;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY,mBAAO,CAAC,qDAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB,mBAAO,CAAC,iEAAc;AACxC;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,mBAAO,CAAC,qEAAgB;AAC3C;AACA;AACA;AACA;AACA,CAAC,E;;;;;;;;;;;;;;AClGY;;AAEb;AACA;AACA,wBAAwB,mBAAO,CAAC,kGAAmB;AACnD;AACA;AACA,4BAA4B,aAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,8DAA8D,MAAM;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,kD;;;;;;;;;;;;;;ACrDa;;AAEb;AACA;AACA,qBAAqB,sEAAsE,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,wCAAwC;AACjV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,2FAA2F,aAAa;AACxG;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,0C;;;;;;;;;;;;;;ACpDa;;AAEb;AACA;AACA,aAAa,mBAAO,CAAC,6CAAO;AAC5B;AACA,qBAAqB,sEAAsE,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe,GAAG,wCAAwC;AACjV,0DAA0D,+BAA+B,iBAAiB,sCAAsC,YAAY,YAAY,uBAAuB,OAAO,qBAAqB,0CAA0C,2BAA2B,EAAE,eAAe;AACjT;AACA;AACA;AACA,yDAAyD,UAAU;AACnE;AACA,4EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA,sC;;;;;;;;;;;;;;AC9Ca;;AAEb;AACA;AACA,aAAa,mBAAO,CAAC,6CAAO;AAC5B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,0C;;;;;;;;;;;;;;ACZa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gD;;;;;;;;;;;;;;ACpCa;;AAEb;AAC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AACA;AACA,6CAA6C;AAC7C,sCAAsC,sEAAsE;AAC5G;AACA,kCAAkC,yCAAyC;AAC3E;AACA;AACA;AACA,kCAAkC,sCAAsC;AACxE;AACA,YAAY;AACZ;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,cAAc;AACd;;AAEA;AACA;AACA,4CAA4C,wBAAwB;AACpE;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,sCAAsC,2BAA2B;AACjE;AACA,kCAAkC,yBAAyB;AAC3D;AACA;AACA,kCAAkC,2BAA2B;AAC7D;AACA,YAAY;AACZ;;AAEA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA,0HAA0H,qCAAqC;AAC/J,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL,GAAG,4CAA4C,gBAAgB,KAAK;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA,0HAA0H,uCAAuC;AACjK,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL,GAAG,4CAA4C,gBAAgB,KAAK;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,uEAAuE;;AAE7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA,CAAC;AACD,iFAAiF,MAAM,oBAAoB,MAAM,wBAAwB,MAAM;AAC/I;AACA;AACA;AACA,uDAAuD;AACvD;AACA,qDAAqD,iBAAiB;AACtE;AACA,oEAAoE,yBAAyB,YAAY,wBAAwB,uBAAuB,cAAc,WAAW,wBAAwB,aAAa,MAAM,qCAAqC,yBAAyB,oBAAoB,YAAY,cAAc,uCAAuC,WAAW;AAC1X;AACA,qPAAqP;AACrP,CAAC;AACD,4GAA4G;AAC5G,CAAC;AACD;AACA;AACA;AACA;AACA,kOAAkO;AAClO,CAAC;AACD;AACA;AACA,+HAA+H;AAC/H;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,+BAA+B;AACpF,CAAC;AACD;AACA;AACA;AACA,sDAAsD;AACtD;AACA,gDAAgD,4EAA4E,uEAAuE;AACnM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF,CAAC;AACD,8DAA8D;AAC9D,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA,mDAAmD,eAAe;AAClE;AACA,GAAG;AACH;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,gEAAgE,YAAY;;AAE5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wMAAwM,GAAG,4EAA4E;AACvR;AACA,2NAA2N,8FAA8F;AACzT;AACA,sFAAsF,kBAAkB;AACxG,qFAAqF;AACrF,uFAAuF;AACvF,GAAG,0DAA0D;AAC7D,+HAA+H;AAC/H;AACA;AACA,wFAAwF;AACxF;AACA;AACA,wDAAwD;AACxD;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,6BAA6B;AACxG;AACA,yHAAyH,4DAA4D;AACrL;AACA,KAAK;AACL,8EAA8E,gCAAgC;AAC9G;AACA,4HAA4H,+DAA+D;AAC3L;AACA,KAAK;AACL,2EAA2E,+BAA+B;AAC1G;AACA,yHAAyH,8DAA8D;AACvL;AACA,KAAK;AACL,4EAA4E,gCAAgC;AAC5G;AACA,0HAA0H,+DAA+D;AACzL;AACA,KAAK;AACL,uEAAuE;AACvE;AACA,oIAAoI;AACpI;AACA,KAAK;AACL,kEAAkE;AAClE;AACA,gHAAgH;AAChH;AACA;AACA,GAAG;AACH;AACA,gEAAgE;AAChE;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,yEAAyE;AACzE,uEAAuE;AACvE;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E,2EAA2E;AAC3E;AACA,yEAAyE;AACzE,0EAA0E;AAC1E;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA,kC;;;;;;;;;;;;;;AC3ca;;AAEb;AACA;AACA,aAAa,mBAAO,CAAC,6CAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,8B","file":"vendor.grommet.4b3f6bc0ce32d078f610.js","sourcesContent":["import PropTypes from 'prop-types';\nexport var a11yTitlePropType = PropTypes.string;\nexport var alignPropType = PropTypes.oneOfType([PropTypes.oneOf(['baseline', 'center', 'end', 'start', 'stretch']), PropTypes.string]);\nvar ANIMATION_TYPE = PropTypes.oneOf(['fadeIn', 'fadeOut', 'jiggle', 'pulse', 'rotateLeft', 'rotateRight', 'slideUp', 'slideDown', 'slideLeft', 'slideRight', 'zoomIn', 'zoomOut']);\nvar ANIMATION_SHAPE = PropTypes.shape({\n type: ANIMATION_TYPE,\n delay: PropTypes.number,\n duration: PropTypes.number,\n size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge'])\n});\nexport var animationPropType = PropTypes.oneOfType([ANIMATION_TYPE, ANIMATION_SHAPE, PropTypes.arrayOf(PropTypes.oneOfType([ANIMATION_TYPE, ANIMATION_SHAPE]))]);\nexport var colorPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n})]);\nexport var backgroundPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n clip: PropTypes.oneOfType([PropTypes.oneOf(['text']), PropTypes.string]),\n color: colorPropType,\n dark: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n image: PropTypes.string,\n position: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.oneOf(['weak', 'medium', 'strong'])]),\n repeat: PropTypes.oneOfType([PropTypes.oneOf(['no-repeat', 'repeat']), PropTypes.string]),\n rotate: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['cover', 'contain']), PropTypes.string]),\n light: PropTypes.string\n})]);\nexport var backgroundDoc = backgroundPropType;\nexport var MARGIN_SIZES = ['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge'];\nexport var marginProp = PropTypes.oneOfType([PropTypes.oneOf(['none'].concat(MARGIN_SIZES)), PropTypes.shape({\n bottom: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n end: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n left: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n right: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n start: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n top: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n vertical: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string])\n}), PropTypes.string]);\nvar PAD_SIZES = ['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge'];\nexport var padPropType = PropTypes.oneOfType([PropTypes.oneOf(['none'].concat(PAD_SIZES)), PropTypes.shape({\n bottom: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n end: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n left: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n right: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n start: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n top: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n vertical: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string])\n}), PropTypes.string]);\nexport var genericProps = {\n a11yTitle: a11yTitlePropType,\n alignSelf: PropTypes.oneOf(['start', 'center', 'end', 'stretch', 'baseline']),\n gridArea: PropTypes.string,\n margin: marginProp\n};\nexport var elevationPropType = PropTypes.oneOfType([PropTypes.oneOf(['none', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]);\nexport var hoverIndicatorPropType = PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.oneOf(['background']), backgroundPropType, PropTypes.shape({\n background: backgroundPropType,\n elevation: elevationPropType\n})]);\nexport var pointPropType = PropTypes.oneOf(['circle', 'diamond', 'square', 'star', 'triangle', 'triangleDown']);\nexport var patternPropType = PropTypes.oneOf(['squares', 'circles', 'stripesHorizontal', 'stripesVertical', 'stripesDiagonalDown', 'stripesDiagonalUp']);\nexport var roundPropType = PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'full']), PropTypes.string, PropTypes.shape({\n corner: PropTypes.oneOf(['top', 'left', 'bottom', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right']),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string])\n})]);\nexport var skeletonColorsPropType = PropTypes.shape({\n dark: PropTypes.arrayOf(PropTypes.string),\n light: PropTypes.arrayOf(PropTypes.string)\n});\nexport var skeletonPropType = PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n animation: animationPropType,\n colors: skeletonColorsPropType,\n depth: PropTypes.number,\n message: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n start: PropTypes.string,\n end: PropTypes.string\n })])\n})]);\nvar dimSizeType = PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge']);\nexport var heightPropType = PropTypes.oneOfType([dimSizeType, PropTypes.string, PropTypes.shape({\n height: PropTypes.oneOfType([dimSizeType, PropTypes.string]),\n min: PropTypes.oneOfType([dimSizeType, PropTypes.string]),\n max: PropTypes.oneOfType([dimSizeType, PropTypes.string])\n})]);\nexport var widthPropType = PropTypes.oneOfType([dimSizeType, PropTypes.string, PropTypes.shape({\n width: PropTypes.oneOfType([dimSizeType, PropTypes.string]),\n min: PropTypes.oneOfType([dimSizeType, PropTypes.string]),\n max: PropTypes.oneOfType([dimSizeType, PropTypes.string])\n})]);\nexport var OVERFLOW_VALUES = ['auto', 'hidden', 'scroll', 'visible'];","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n activeIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n animate: PropTypes.bool,\n children: PropTypes.node,\n level: PropTypes.number,\n onActive: PropTypes.func,\n multiple: PropTypes.bool,\n messages: PropTypes.shape({\n tabContents: PropTypes.string\n })\n });\n}\nexport var AccordionPropTypes = PropType;","import { css, keyframes } from 'styled-components';\nvar PULSE_SIZES = {\n xsmall: 1.001,\n small: 1.01,\n medium: 1.1,\n large: 1.5,\n xlarge: 2\n};\nvar SLIDE_SIZES = {\n xsmall: 1,\n small: 5,\n medium: 10,\n large: 50,\n xlarge: 200\n};\nvar JIGGLE_SIZES = {\n xsmall: 0.1,\n small: 1,\n medium: 5,\n large: 400,\n xlarge: 1000\n};\nvar ZOOM_SIZES = {\n xsmall: 0.001,\n small: 0.01,\n medium: 0.05,\n large: 0.1,\n xlarge: 0.5\n};\nexport var animationBounds = function animationBounds(type, size) {\n if (size === void 0) {\n size = 'medium';\n }\n if (type === 'draw') {\n return ['', \"stroke-dashoffset: 0\"];\n }\n if (type === 'fadeIn') {\n return ['opacity: 0;', 'opacity: 1;'];\n }\n if (type === 'fadeOut') {\n return ['opacity: 1;', 'opacity: 0;'];\n }\n if (type === 'jiggle') {\n var deg = JIGGLE_SIZES[size];\n return [\"transform: rotate(-\" + deg + \"deg);\", \"transform: rotate(\" + deg + \"deg);\"];\n }\n if (type === 'pulse') {\n return ['transform: scale(1);', \"transform: scale(\" + PULSE_SIZES[size] + \")\"];\n }\n if (type === 'rotateRight') {\n return [\"transform: rotate(0deg);\", \"transform: rotate(359deg);\"];\n }\n if (type === 'rotateLeft') {\n return [\"transform: rotate(0deg);\", \"transform: rotate(-359deg);\"];\n }\n if (type === 'flipIn') {\n return ['transform: rotateY(90deg);', 'transform: rotateY(0);'];\n }\n if (type === 'flipOut') {\n return ['transform: rotateY(0);', 'transform: rotateY(90deg);'];\n }\n if (type === 'slideDown') {\n return [\"transform: translateY(-\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideLeft') {\n return [\"transform: translateX(\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideRight') {\n return [\"transform: translateX(-\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideUp') {\n return [\"transform: translateY(\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'zoomIn') {\n return [\"transform: scale(\" + (1 - ZOOM_SIZES[size]) + \");\", 'transform: none;'];\n }\n if (type === 'zoomOut') {\n return [\"transform: scale(\" + (1 + ZOOM_SIZES[size]) + \");\", 'transform: none;'];\n }\n return [];\n};\nexport var normalizeTiming = function normalizeTiming(time, defaultTiming) {\n return typeof time === 'number' ? time / 1000.0 + \"s\" : time || defaultTiming;\n};\nexport var animationEnding = function animationEnding(type) {\n if (type === 'draw') {\n return 'linear forwards';\n }\n if (type === 'jiggle') {\n return 'alternate infinite';\n }\n if (type === 'pulse') {\n return 'alternate infinite';\n }\n if (type === 'rotateRight' || type === 'rotateLeft') {\n return 'infinite linear';\n }\n return 'forwards';\n};\nexport var animationObjectStyle = function animationObjectStyle(animation, theme, themeObj) {\n var bounds = animationBounds(animation.type, animation.size);\n var animationTheme = themeObj && themeObj.animation || theme.global.animation;\n if (bounds) {\n var animationTransition = css([\"from{\", \";}to{\", \";}\"], bounds[0], bounds[1]);\n var defaultDuration = function defaultDuration() {\n return normalizeTiming(animationTheme[animation.type] ? animationTheme[animation.type].duration : animation.duration, animationTheme.duration);\n };\n return css([\"\", \" \", \" \", \" \", \"\"], keyframes([\"\", \"\"], animationTransition), normalizeTiming(animation.duration, defaultDuration()), normalizeTiming(animation.delay, '0s'), animationEnding(animation.type));\n }\n return '';\n};","import { css } from 'styled-components';\nexport var parseMetricToNum = function parseMetricToNum(metric) {\n if (typeof metric === 'number') return metric;\n if (metric.match(/\\s/) && process.env.NODE_ENV !== 'production') {\n console.warn(\"Invalid single measurement value: \\\"\" + metric + \"\\\"\");\n }\n return parseFloat(metric.match(/\\d+(\\.\\d+)?/), 10);\n};\nexport var edgeToNum = function edgeToNum(size, theme) {\n return size ? parseMetricToNum(theme.global.edgeSize[size] || size) : 0;\n};\nexport var fontSize = function fontSize(size, lineHeight) {\n return css([\"font-size:\", \";line-height:\", \";\"], function (props) {\n return parseMetricToNum(size) / parseMetricToNum(props.theme.global.font.size) * 1 + \"rem\";\n }, function (props) {\n return lineHeight || Math.ceil(parseMetricToNum(size) / parseMetricToNum(props.theme.global.lineHeight)) * (parseMetricToNum(props.theme.global.lineHeight) / parseMetricToNum(size)) + \"px\";\n });\n};\nexport var breakpointStyle = function breakpointStyle(breakpoint, content) {\n return css([\"@media only screen \", \"{\", \";}\"], breakpoint.value && \"and (max-width: \" + breakpoint.value + \"px)\", content);\n};\nexport var findAllByType = function findAllByType(component, type) {\n var matches = [];\n if (component.type === type) {\n matches.push(component);\n }\n if (component.children) {\n component.children.forEach(function (child) {\n matches = matches.concat(findAllByType(child, type));\n });\n }\n return matches;\n};\nexport var getAvailableAtBadge = function getAvailableAtBadge(availableAt, componentType) {\n return [{\n url: \"https://storybook.grommet.io/?selectedKind=\" + componentType + \"-\" + availableAt + \"&full=0&stories=1&panelRight=0\",\n badge: 'https://cdn-images-1.medium.com/fit/c/120/120/1*TD1P0HtIH9zF0UEH28zYtw.png',\n label: 'Storybook'\n }, {\n url: \"https://codesandbox.io/s/github/grommet/grommet-sandbox?initialpath=/\" + availableAt.toLowerCase() + \"&module=%2Fsrc%2F\" + availableAt + \".js\",\n badge: 'https://codesandbox.io/static/img/play-codesandbox.svg',\n label: 'CodeSandbox'\n }];\n};","// Returns the specific color that should be used according to the theme.\n// If 'dark' is supplied, it takes precedence over 'theme.dark'.\n// Can return undefined.\nexport var normalizeColor = function normalizeColor(color, theme, dark) {\n var colorSpec = theme.global && theme.global.colors[color] !== undefined ? theme.global.colors[color] : color;\n // If the color has a light or dark object, use that\n var result = colorSpec;\n if (colorSpec) {\n if ((dark === true || dark === undefined && theme.dark) && colorSpec.dark !== undefined) {\n result = colorSpec.dark;\n } else if ((dark === false || !theme.dark) && colorSpec.light !== undefined) {\n result = colorSpec.light;\n }\n }\n // allow one level of indirection in color names\n if (result && theme.global && theme.global.colors[result] !== undefined) {\n result = normalizeColor(result, theme, dark);\n }\n return result;\n};\nvar parseHexToRGB = function parseHexToRGB(color) {\n return color.length < 7 // 7 is what's needed for '#RRGGBB'\n ? color.match(/[A-Za-z0-9]{1}/g).map(function (v) {\n return parseInt(\"\" + v + v, 16);\n }) :\n // https://stackoverflow.com/a/42429333\n color.match(/[A-Za-z0-9]{2}/g).map(function (v) {\n return parseInt(v, 16);\n });\n};\n\n// From: https://stackoverflow.com/a/9493060/8513067\n// Converts an HSL color value to RGB. Conversion formula\n// adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n// Assumes h, s, and l are contained in the set [0, 1] and\n// returns r, g, and b in the set [0, 255].\nvar hslToRGB = function hslToRGB(h, s, l) {\n var r;\n var g;\n var b;\n if (s === 0 || s === '0') {\n // achromatic\n r = l;\n g = l;\n b = l;\n } else {\n var hue2rgb = function hue2rgb(p, q, inT) {\n var t = inT;\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 0.16666667) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 0.66666667) return p + (q - p) * (0.66666667 - t) * 6;\n return p;\n };\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 0.33333333);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 0.33333333);\n }\n return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];\n};\n\n// allow for alpha: #RGB, #RGBA, #RRGGBB, or #RRGGBBAA\nvar hexExp = /^#[A-Za-z0-9]{3,4}$|^#[A-Za-z0-9]{6,8}$/;\nvar rgbExp = /^rgba?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?\\)/;\nvar rgbaExp = /^rgba?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([.0-9]*)\\s?\\)/;\n// e.g. hsl(240, 60%, 50%)\nvar hslExp = /^hsla?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)%?\\s?,\\s?([0-9]*)%?\\s?.*?\\)/;\nexport var canExtractRGBArray = function canExtractRGBArray(color) {\n return hexExp.test(color) || rgbExp.test(color) || rgbaExp.test(color) || hslExp.test(color);\n};\nexport var getRGBArray = function getRGBArray(color) {\n if (hexExp.test(color)) {\n var _parseHexToRGB = parseHexToRGB(color),\n red = _parseHexToRGB[0],\n green = _parseHexToRGB[1],\n blue = _parseHexToRGB[2],\n alpha = _parseHexToRGB[3];\n return [red, green, blue, alpha !== undefined ? alpha / 255.0 : undefined];\n }\n var match = color.match(rgbExp);\n if (match) {\n return match.splice(1).map(function (v) {\n return parseInt(v, 10);\n });\n }\n match = color.match(rgbaExp);\n if (match) {\n return match.splice(1).map(function (v) {\n return parseFloat(v, 10);\n });\n }\n match = color.match(hslExp);\n if (match) {\n var _match$splice$map = match.splice(1).map(function (v) {\n return parseInt(v, 10);\n }),\n h = _match$splice$map[0],\n s = _match$splice$map[1],\n l = _match$splice$map[2];\n return hslToRGB(h / 360.0, s / 100.0, l / 100.0);\n }\n return color;\n};\nexport var colorIsDark = function colorIsDark(color) {\n if (color && canExtractRGBArray(color)) {\n var _getRGBArray = getRGBArray(color),\n red = _getRGBArray[0],\n green = _getRGBArray[1],\n blue = _getRGBArray[2],\n alpha = _getRGBArray[3];\n // if there is an alpha and it's greater than 50%, we can't really tell\n if (alpha < 0.5) return undefined;\n var brightness = (299 * red + 587 * green + 114 * blue) / 1000;\n // From: http://www.had2know.com/technology/color-contrast-calculator-web-design.html\n // Above domain is no longer registered.\n return brightness < 125;\n }\n return undefined;\n};\nexport var getRGBA = function getRGBA(color, opacity) {\n if (color && canExtractRGBArray(color)) {\n var _getRGBArray2 = getRGBArray(color),\n red = _getRGBArray2[0],\n green = _getRGBArray2[1],\n blue = _getRGBArray2[2],\n alpha = _getRGBArray2[3];\n var normalizedAlpha;\n if (opacity !== undefined) {\n normalizedAlpha = opacity;\n } else if (alpha !== undefined) {\n normalizedAlpha = alpha;\n } else {\n normalizedAlpha = 1;\n }\n return \"rgba(\" + red + \", \" + green + \", \" + blue + \", \" + normalizedAlpha + \")\";\n }\n return undefined;\n};","import { css } from 'styled-components';\nimport { colorIsDark, getRGBA, normalizeColor, canExtractRGBArray, getRGBArray } from './colors';\n\n// evalStyle() converts a styled-components item into a string\nvar evalStyle = function evalStyle(arg, theme) {\n if (arg && Array.isArray(arg) && typeof arg[0] === 'function') {\n return arg[0]({\n theme: theme\n });\n }\n return arg;\n};\nexport var normalizeBackground = function normalizeBackground(backgroundArg, theme) {\n var _theme$global$backgro;\n var background = ((_theme$global$backgro = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro[backgroundArg]) || backgroundArg;\n var result = background;\n // If the background has a light or dark object, use that\n if (background) {\n if (theme.dark && background.dark && typeof background.dark !== 'boolean') {\n result = background.dark;\n } else if (!theme.dark && background.light && typeof background.light !== 'boolean') {\n result = background.light;\n }\n result = evalStyle(result, theme);\n }\n return result;\n};\nvar normalizeBackgroundColor = function normalizeBackgroundColor(backgroundArg, theme) {\n var _theme$global$backgro2;\n var background = backgroundArg.color || backgroundArg;\n var result = normalizeColor(\n // Background color may be defined by theme.global.backgrounds or\n // theme.global.colors.\n ((_theme$global$backgro2 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro2[background]) || background, theme, backgroundArg.dark);\n return result;\n};\nvar normalizeBackgroundImage = function normalizeBackgroundImage(background, theme) {\n var result;\n if (background.image) {\n var _theme$global$backgro3, _theme$global$backgro4;\n result = normalizeBackground(background.dark ? (_theme$global$backgro3 = theme.global.backgrounds) == null || (_theme$global$backgro3 = _theme$global$backgro3[background.image]) == null ? void 0 : _theme$global$backgro3.dark : (_theme$global$backgro4 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro4[background.image], theme) || background.image;\n } else {\n var _theme$global$backgro5;\n var normalized = normalizeBackground((_theme$global$backgro5 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro5[background], theme);\n result = typeof normalized === 'object' ? normalizeBackgroundImage(normalized, theme) : normalized;\n }\n return result;\n};\nvar rotateBackground = function rotateBackground(background, theme) {\n var backgroundImage = normalizeBackgroundImage(background, theme);\n var result = backgroundImage;\n if (backgroundImage.lastIndexOf('linear-gradient', 0) === 0) {\n var regex = /\\d{1,}deg\\b,/gm; // Contains rotation specified in degrees. Only targets 'deg' string with a trailing comma. Do not match 'deg' string for hsl, etc..\n result = backgroundImage.lastIndexOf('deg,') >= 0 ? backgroundImage.replace(regex, background.rotate + \"deg,\") : backgroundImage.replace('linear-gradient(', \"linear-gradient(\" + background.rotate + \"deg, \");\n } else {\n console.warn( // eslint-disable-next-line max-len\n \"'background.rotate' property only supports 'background.image' containing a linear-gradient string.\");\n }\n return result;\n};\nexport var backgroundIsDark = function backgroundIsDark(backgroundArg, theme) {\n var background = normalizeBackground(backgroundArg, theme);\n var result;\n if (background) {\n if (typeof background === 'object') {\n var color = background.color,\n dark = background.dark,\n opacity = background.opacity;\n if (typeof dark === 'boolean') {\n result = dark;\n } else if (color && (\n // weak opacity means we keep the existing darkness\n !opacity || opacity !== 'weak')) {\n var backgroundColor = normalizeColor(background.color, theme);\n if (backgroundColor) {\n result = colorIsDark(backgroundColor);\n }\n }\n } else {\n var _color = normalizeColor(background, theme);\n if (_color) {\n result = colorIsDark(_color);\n }\n }\n }\n return result;\n};\nvar darkContext = function darkContext(backgroundColor) {\n var isDark = colorIsDark(backgroundColor);\n if (isDark === undefined) return undefined;\n return isDark ? 'dark' : 'light';\n};\n\n// Returns an array of two CSS colors: [background, color]\n// Either could be undefined.\n// background could be a CSS gradient, like \"linear-gradient(...)\"\nexport var backgroundAndTextColors = function backgroundAndTextColors(backgroundArg, textArg, theme) {\n if (!backgroundArg) return [undefined, textArg];\n var global = theme.global;\n var background = normalizeBackground(backgroundArg, theme);\n var text = textArg || global.colors.text;\n var backgroundColor;\n var textColor;\n if (typeof background === 'object') {\n if (background.dark === false) {\n textColor = text.light || text;\n } else if (background.dark) {\n textColor = text.dark || text;\n }\n if (background.color) {\n var color = normalizeBackgroundColor(background, theme);\n var opacity = background.opacity === true ? global.opacity.medium : global.opacity[background.opacity] || background.opacity;\n backgroundColor = getRGBA(color, opacity) || color;\n\n // If we don't have a textColor already, and we aren't too translucent,\n // set the textColor to have the best contrast against the background\n // color.\n if (!textColor && (opacity === undefined || opacity > 0.3)) {\n var shade = darkContext(backgroundColor, theme);\n textColor = normalizeColor(shade && text[shade] || text, theme);\n }\n }\n } else {\n backgroundColor = normalizeBackgroundColor(background, theme);\n var _shade = darkContext(backgroundColor, theme);\n var transparent;\n if (backgroundColor && canExtractRGBArray(backgroundColor)) {\n var colorArray = getRGBArray(backgroundColor);\n // check if the alpha value is less than 0.5\n if (colorArray[3] < 0.5) transparent = true;\n }\n if (_shade) {\n textColor = normalizeColor(text[_shade] || text, theme, _shade === 'dark');\n } else if (transparent && text) {\n textColor = normalizeColor(text, theme);\n } else {\n // If we can't determine the shade, we assume this isn't a simple color.\n // It could be a gradient. backgroundStyle() will take care of that case.\n if (backgroundColor !== 'transparent') backgroundColor = undefined;\n if (text) textColor = normalizeColor(text, theme);\n }\n }\n // if textArg is false, we don't want the textColor, used for Button hover\n if (textArg === false) textColor = undefined;\n return [backgroundColor, textColor];\n};\nexport var backgroundStyle = function backgroundStyle(backgroundArg, theme, textColorArg) {\n // for Grommet component, if the background isn't defined, don't set it\n if (backgroundArg === undefined) return undefined;\n var background = normalizeBackground(backgroundArg, theme);\n var _backgroundAndTextCol = backgroundAndTextColors(background, textColorArg, theme),\n backgroundColor = _backgroundAndTextCol[0],\n textColor = _backgroundAndTextCol[1];\n var backgroundImage = background.rotate ? rotateBackground(background, theme) : normalizeBackgroundImage(background, theme);\n var backgroundClipStyle = '';\n if (background.clip) {\n backgroundClipStyle = background.clip === 'text' ? \"-webkit-text-fill-color: transparent; \\n -webkit-background-clip: text; \\n background-clip: text;\" : \"background-clip: \" + background.clip + \";\";\n }\n if (typeof background === 'string' && background.lastIndexOf('url', 0) === 0) {\n return css([\"background:\", \" no-repeat center center;background-size:cover;\"], background);\n }\n if (backgroundImage) {\n var backgroundStyles = \"\\n \" + (backgroundColor ? \"background-color: \" + backgroundColor + \";\" : '') + \"\\n background-image: \" + backgroundImage + \";\\n background-repeat: \" + (typeof background === 'object' && background.repeat || 'no-repeat') + \";\\n background-position: \" + (background.position || 'center center') + \";\\n background-size: \" + (background.size || 'cover') + \";\\n \" + backgroundClipStyle + \"\\n \";\n\n // allow both background color and image, in case the image doesn't fill\n // when image and opacity are used together, we need to use pseudo :before\n // to ensure that only image and background color are affected by opacity\n // but not the container contents\n return css([\"\", \" \", \"\"], textColor ? \"color: \" + textColor + \";\" : '', !background.opacity ? backgroundStyles : \"position: relative;\\n z-index: 0;\\n &:before {\\n content: '';\\n position: absolute;\\n top: 0;\\n right: 0;\\n left: 0;\\n bottom: 0;\\n z-index: -1;\\n border-radius: inherit;\\n \" + backgroundStyles + \"\\n opacity: \" + (background.opacity === true ? theme.global.opacity.medium : theme.global.opacity[background.opacity] || background.opacity) + \";\\n }\");\n }\n if (backgroundColor) {\n return css([\"background-color:\", \";\", \"\"], backgroundColor, textColor ? \"color: \" + textColor + \";\" : '');\n }\n if (typeof background === 'string')\n // This case takes care of gradients\n // or theme colors that use CSS names like 'crimson' that we don't parse\n return css([\"background:\", \";\"], normalizeColor(background, theme));\n return undefined;\n};\nexport var activeStyle = css([\"\", \"\"], function (props) {\n return backgroundStyle(normalizeColor(props.theme.global.active.background, props.theme), props.theme, props.theme.global.active.color);\n});\nexport var selectedStyle = css([\"\", \"\"], function (props) {\n return backgroundStyle(normalizeColor(props.theme.global.selected.background, props.theme), props.theme, props.theme.global.selected.color);\n});\nexport var getHoverIndicatorStyle = function getHoverIndicatorStyle(hoverIndicator, theme) {\n var background;\n var elevation;\n if (hoverIndicator === true || hoverIndicator === 'background') {\n background = theme.global.hover.background;\n } else if (typeof hoverIndicator === 'object') {\n if (hoverIndicator.elevation || hoverIndicator.background) {\n elevation = hoverIndicator.elevation;\n background = hoverIndicator.background;\n } else background = hoverIndicator;\n } else {\n background = hoverIndicator;\n }\n return css([\"\", \" \", \"\"], backgroundStyle(background, theme, theme.global.hover.color), elevation && \"box-shadow: \" + theme.global.elevation[theme.dark ? 'dark' : 'light'][elevation] + \";\");\n};","import { css } from 'styled-components';\nimport { normalizeColor } from './colors';\nimport { breakpointStyle } from './mixins';\nexport var responsiveBorderStyle = function responsiveBorderStyle(data, theme) {\n var color = normalizeColor(data.color || 'border', theme);\n var borderSize = data.size || 'xsmall';\n var style = data.style || 'solid';\n var side = typeof data === 'string' ? data : data.side || 'all';\n var breakpoint = theme.box.responsiveBreakpoint && theme.global.breakpoints[theme.box.responsiveBreakpoint];\n if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;\n var value = breakpoint && (breakpoint.borderSize[borderSize] || borderSize) && style + \" \" + (breakpoint.borderSize[borderSize] || borderSize) + \" \" + color;\n if (!value) return undefined;\n if (side === 'top' || side === 'bottom' || side === 'left' || side === 'right') return \"border-\" + side + \": \" + value + \";\";\n if (side === 'end' || side === 'start') return \"border-inline-\" + side + \": \" + value + \";\";\n if (side === 'vertical') return \"\\n border-left: \" + value + \";\\n border-right: \" + value + \";\\n \";\n if (side === 'horizontal') return \"\\n border-top: \" + value + \";\\n border-bottom: \" + value + \";\\n \";\n if (side === 'between') return undefined; // no-op\n return \"border: \" + value + \";\";\n};\nexport var borderStyle = function borderStyle(borderData, responsive, theme) {\n var borderStyles = [];\n (Array.isArray(borderData) ? borderData : [borderData]).forEach(function (data) {\n var styles = [];\n var color = normalizeColor(data.color || 'border', theme);\n var borderSize = data.size || 'xsmall';\n var style = data.style || 'solid';\n var side = typeof data === 'string' ? data : data.side || 'all';\n var value = style + \" \" + (theme.global.borderSize[borderSize] || borderSize) + \" \" + color;\n var responsiveStyle = responsive && responsiveBorderStyle(data, theme);\n var breakpoint = responsiveStyle && theme.box.responsiveBreakpoint && theme.global.breakpoints[theme.box.responsiveBreakpoint];\n if (side === 'top' || side === 'bottom' || side === 'left' || side === 'right') {\n styles.push(\"border-\" + side + \": \" + value + \";\");\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n } else if (side === 'end' || side === 'start') {\n styles.push(css([\"border-inline-\", \":\", \";\"], side, value));\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n } else if (side === 'vertical') {\n styles.push(css([\"border-left:\", \";border-right:\", \";\"], value, value));\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n } else if (side === 'horizontal') {\n styles.push(css([\"border-top:\", \";border-bottom:\", \";\"], value, value));\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n } else if (side === 'between') {\n // no-op\n } else {\n styles.push(css([\"border:\", \";\"], value));\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n }\n borderStyles.push(styles);\n });\n return borderStyles;\n};","export var setHoursWithOffset = function setHoursWithOffset(date) {\n var newDate = new Date(date);\n if ((date == null ? void 0 : date.indexOf('T')) === -1) {\n var offset = newDate.getTimezoneOffset();\n var hour = newDate.getHours();\n newDate.setHours(hour, offset < 0 ? -offset : offset);\n }\n return newDate;\n};","export var findScrollParent = function findScrollParent(element, horizontal) {\n var result;\n if (element) {\n var parent = element.parentNode;\n while (!result && parent && parent.getBoundingClientRect) {\n var rect = parent.getBoundingClientRect();\n // 10px is to account for borders and scrollbars in a lazy way\n if (horizontal) {\n if (rect.width && parent.scrollWidth > rect.width + 10) {\n result = parent;\n }\n } else if (rect.height && parent.scrollHeight > rect.height + 10) {\n result = parent;\n }\n parent = parent.parentNode;\n }\n // last scrollable element will be the document\n // if nothing else is scrollable in the page\n if (!result) {\n result = document;\n } else if (result.tagName.toLowerCase() === 'body') {\n result = document;\n }\n }\n return result;\n};\nvar documentTags = ['html', 'body'];\nexport var findScrollParents = function findScrollParents(element, horizontal) {\n var result = [];\n if (element) {\n var parent = element.parentNode;\n while (parent && parent.getBoundingClientRect) {\n var rect = parent.getBoundingClientRect();\n // 10px is to account for borders and scrollbars in a lazy way\n if (horizontal) {\n if (rect.width && parent.scrollWidth > rect.width + 10) {\n result.push(parent);\n }\n } else if (rect.height && parent.scrollHeight > rect.height + 10) {\n result.push(parent);\n }\n parent = parent.parentNode;\n }\n if (result.length && documentTags.includes(result[0].tagName.toLowerCase())) {\n result.length = 0;\n }\n // last scrollable element will be the document\n result.push(document);\n }\n return result;\n};\nexport var containsFocus = function containsFocus(node) {\n var root = node.getRootNode();\n var element = root.activeElement;\n while (element) {\n if (element === node) break;\n element = element.parentElement;\n }\n return !!element;\n};\nexport var withinDropPortal = function withinDropPortal(node, portalContext) {\n var root = node == null ? void 0 : node.getRootNode();\n var element = node;\n var portalId;\n while (element && element !== root) {\n if (element.hasAttribute('data-g-portal-id')) {\n portalId = element.getAttribute('data-g-portal-id');\n element = root;\n } else {\n element = element.parentElement;\n }\n }\n // if portalContext doesn't contain the portalId then the\n // portal is new and node is within a drop that just opened\n if (portalId === undefined || portalContext.indexOf(parseInt(portalId, 10)) !== -1) return false;\n return true;\n};\n\n// Check if the element.tagName is an input, select or textarea\nexport var isFocusable = function isFocusable(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName === 'input' || tagName === 'select' || tagName === 'textarea';\n};\n\n// Get the first element that can receive focus\nexport var getFirstFocusableDescendant = function getFirstFocusableDescendant(element) {\n var children = element.getElementsByTagName('*');\n for (var i = 0; i < children.length; i += 1) {\n var child = children[i];\n if (isFocusable(child)) {\n return child;\n }\n }\n return undefined;\n};\nexport var shouldKeepFocus = function shouldKeepFocus(root) {\n var element = root.activeElement;\n if (isFocusable(element)) return true;\n return !!getFirstFocusableDescendant(element);\n};\nexport var getNewContainer = function getNewContainer(target, targetChildPosition) {\n if (target === void 0) {\n target = document.body;\n }\n // setup DOM\n var container = document.createElement('div');\n if (targetChildPosition === 'first') {\n // for SkipLinks\n target.prepend(container);\n } else {\n target.appendChild(container);\n }\n return container;\n};\nexport var setFocusWithoutScroll = function setFocusWithoutScroll(element) {\n var x = window.scrollX;\n var y = window.scrollY;\n element.focus();\n window.scrollTo(x, y);\n};\nvar TABINDEX = 'tabindex';\nvar TABINDEX_STATE = 'data-g-tabindex';\nexport var makeNodeFocusable = function makeNodeFocusable(node) {\n // do not touch aria live containers so that announcements work\n if (!node.hasAttribute('aria-live')) {\n node.removeAttribute('aria-hidden');\n // allow children to receive focus again\n var elements = node.getElementsByTagName('*');\n // only reset elements we've changed in makeNodeUnfocusable()\n Array.prototype.filter.call(elements || [], function (element) {\n return element.hasAttribute(TABINDEX_STATE);\n }).forEach(function (element) {\n var prior = element.getAttribute(TABINDEX_STATE);\n if (prior >= 0) {\n element.setAttribute(TABINDEX, element.getAttribute(TABINDEX_STATE));\n } else if (prior === 'none') {\n element.removeAttribute(TABINDEX);\n }\n element.removeAttribute(TABINDEX_STATE);\n });\n }\n};\nvar autoFocusingTags = /(a|area|input|select|textarea|button|iframe)$/;\nexport var makeNodeUnfocusable = function makeNodeUnfocusable(node) {\n // do not touch aria live containers so that announcements work\n if (!node.hasAttribute('aria-live')) {\n node.setAttribute('aria-hidden', true);\n // prevent children to receive focus\n var elements = node.getElementsByTagName('*');\n // first, save off the tabIndex of any element with one\n Array.prototype.filter.call(elements || [], function (element) {\n return element.getAttribute(TABINDEX) !== null;\n }).forEach(function (element) {\n element.setAttribute(TABINDEX_STATE, element.getAttribute(TABINDEX));\n element.setAttribute(TABINDEX, -1);\n });\n // then, if any element is inherently focusable and not handled above,\n // give it a tabIndex of -1 so it can't receive focus\n Array.prototype.filter.call(elements || [], function (element) {\n var currentTag = element.tagName.toLowerCase();\n return currentTag.match(autoFocusingTags) && element.focus && element.getAttribute(TABINDEX_STATE) === null;\n }).forEach(function (element) {\n element.setAttribute(TABINDEX_STATE, 'none');\n element.setAttribute(TABINDEX, -1);\n });\n }\n};\nexport var findVisibleParent = function findVisibleParent(element) {\n if (element) {\n // Get the closest ancestor element that is positioned.\n return element.offsetParent ? element : findVisibleParent(element.parentElement) || element;\n }\n return undefined;\n};\nexport var isNodeAfterScroll = function isNodeAfterScroll(node, target) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n bottom = _node$getBoundingClie.bottom;\n // target will be the document from findScrollParent()\n var _ref = target.getBoundingClientRect ? target.getBoundingClientRect() : {\n height: 0,\n top: 0\n },\n height = _ref.height,\n top = _ref.top;\n return bottom >= top + height;\n};\nexport var isNodeBeforeScroll = function isNodeBeforeScroll(node, target) {\n var _node$getBoundingClie2 = node.getBoundingClientRect(),\n top = _node$getBoundingClie2.top;\n // target will be the document from findScrollParent()\n var _ref2 = target.getBoundingClientRect ? target.getBoundingClientRect() : {\n top: 0\n },\n targetTop = _ref2.top;\n return top <= targetTop;\n};\nexport var findButtonParent = function findButtonParent(element) {\n if (element && element.nodeName !== 'BUTTON' && element.nodeName !== 'A') return findButtonParent(element.parentElement);\n return element;\n};","var POST_DECIMAL_DIGITS = 10;\nexport var baseUnit = 24;\nexport var polarToCartesian = function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians)\n };\n};\nexport var arcCommands = function arcCommands(centerX, centerY, radius, startAngle, endAngle) {\n // handle that we can't draw a complete circle\n var normalizedEndAngle = endAngle;\n /* \n added endAngle - startAngle >= 360 \n for SemiCircle the endAngle will never be greater then startAngle \n since it starts with a startAngle of 270.\n */\n if (endAngle > startAngle && endAngle - startAngle >= 360) {\n normalizedEndAngle = startAngle + 359.99;\n }\n var start = polarToCartesian(centerX, centerY, radius, normalizedEndAngle);\n var end = polarToCartesian(centerX, centerY, radius, startAngle);\n var arcSweep = normalizedEndAngle - startAngle <= 180 ? '0' : '1';\n var d = ['M', start.x.toFixed(POST_DECIMAL_DIGITS), start.y.toFixed(POST_DECIMAL_DIGITS), 'A', radius.toFixed(POST_DECIMAL_DIGITS), radius.toFixed(POST_DECIMAL_DIGITS), 0, arcSweep, 0, end.x.toFixed(POST_DECIMAL_DIGITS), end.y.toFixed(POST_DECIMAL_DIGITS)].join(' ');\n return d;\n};\n\n/* TranslatedEngAngle will now take the value of the\nstartAngle + anglePer * value and mod by 360. This was added\nto take account the startAngle not being 0. So no matter the\nvalue it will be % 360 to get the correct angle. \n*/\nexport var translateEndAngle = function translateEndAngle(startAngle, anglePer, value) {\n return Math.max(0, startAngle + anglePer * value) % 360;\n};","import { cloneElement } from 'react';\nexport var useSizedIcon = function useSizedIcon(icon, size, theme) {\n var _theme$icon;\n return icon && theme != null && (_theme$icon = theme.icon) != null && _theme$icon.matchSize && !icon.props.size ? /*#__PURE__*/cloneElement(icon, {\n size: size\n }) : icon;\n};","export var getBreakpoint = function getBreakpoint(viewportWidth, theme) {\n var sortedBreakpoints = Object.keys(theme.global.breakpoints).sort(function (a, b) {\n var first = theme.global.breakpoints[a];\n var second = theme.global.breakpoints[b];\n if (!first) return 1;\n if (!second) return -1;\n if (!first.value) return 1;\n if (!second.value) return -1;\n return first.value - second.value;\n });\n\n // the last breakpoint on the sorted array should have\n // no windowWidth boundaries\n var lastBreakpoint = sortedBreakpoints[sortedBreakpoints.length - 1];\n var result = sortedBreakpoints.find(function (name) {\n var breakpoint = theme.global.breakpoints[name];\n return !breakpoint.value || breakpoint.value >= viewportWidth ? name : false;\n });\n return result || lastBreakpoint;\n};\nexport var getDeviceBreakpoint = function getDeviceBreakpoint(type, theme) {\n return theme.global.deviceBreakpoints[type];\n};\nexport var getBreakpointStyle = function getBreakpointStyle(theme, breakpointSize) {\n var breakpoint = breakpointSize && theme.global.breakpoints[breakpointSize] || {};\n if (!breakpoint.edgeSize) breakpoint.edgeSize = theme.global.edgeSize;\n if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;\n if (!breakpoint.size) breakpoint.size = theme.global.size;\n return breakpoint;\n};","import { css } from 'styled-components';\nimport { backgroundStyle } from './background';\nimport { normalizeColor } from './colors';\nimport { getBreakpointStyle } from './responsive';\nimport { breakpointStyle, parseMetricToNum } from './mixins';\nexport var baseStyle = css([\"font-family:\", \";font-size:\", \";line-height:\", \";font-weight:\", \";\", \" \", \" box-sizing:border-box;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;\"], function (props) {\n return props.theme.global.font.family;\n}, function (props) {\n return props.theme.global.font.size;\n}, function (props) {\n return props.theme.global.font.height;\n}, function (props) {\n return props.theme.global.font.weight;\n}, function (props) {\n return props.theme.global.font.variant && \"\\n font-variant:\" + props.theme.global.font.variant + \";\\n \";\n}, function (props) {\n return !props.plain && backgroundStyle(props.theme.baseBackground, props.theme);\n});\nexport var controlBorderStyle = css([\"border:\", \" solid \", \";border-radius:\", \";\"], function (props) {\n return props.theme.global.control.border.width;\n}, function (props) {\n return normalizeColor(props.theme.global.control.border.color || 'border', props.theme);\n}, function (props) {\n return props.theme.global.control.border.radius;\n});\nexport var edgeStyle = function edgeStyle(kind, data, responsive, responsiveBreakpoint, theme) {\n var breakpoint = responsiveBreakpoint && theme.global.breakpoints[responsiveBreakpoint];\n if (typeof data === 'string') {\n return css([\"\", \":\", \";\", \";\"], kind, theme.global.edgeSize[data] || data, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \": \" + (breakpoint.edgeSize[data] || data) + \";\\n \") : '');\n }\n var result = [];\n var horizontal = data.horizontal,\n vertical = data.vertical,\n top = data.top,\n bottom = data.bottom,\n left = data.left,\n right = data.right;\n\n // if horizontal and vertical are equal OR all sides are equal,\n // we can just return a single css value such as padding: 12px\n // instead of breaking out by sides.\n var horizontalVerticalEqual = horizontal && vertical && horizontal === vertical;\n var allSidesEqual = top && bottom && left && right && top === bottom === left === right;\n if (horizontalVerticalEqual || allSidesEqual) {\n // since the values will be the same between vertical & horizontal OR\n // left, right, top, & bottom, we can just choose one\n var value = horizontalVerticalEqual ? horizontal : top;\n return css([\"\", \":\", \";\", \";\"], kind, theme.global.edgeSize[value] || value, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \": \" + (breakpoint.edgeSize[value] || value) + \";\\n \") : '');\n }\n if (horizontal) {\n result.push(css([\"\", \"-left:\", \";\", \"-right:\", \";\", \";\"], kind, theme.global.edgeSize[horizontal] || horizontal, kind, theme.global.edgeSize[horizontal] || horizontal, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-left: \" + (breakpoint.edgeSize[horizontal] || horizontal) + \";\\n \" + kind + \"-right: \" + (breakpoint.edgeSize[horizontal] || horizontal) + \";\\n \") : ''));\n }\n if (vertical) {\n result.push(css([\"\", \"-top:\", \";\", \"-bottom:\", \";\", \";\"], kind, theme.global.edgeSize[vertical] || vertical, kind, theme.global.edgeSize[vertical] || vertical, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-top: \" + (breakpoint.edgeSize[vertical] || vertical) + \";\\n \" + kind + \"-bottom: \" + (breakpoint.edgeSize[vertical] || vertical) + \";\\n \") : ''));\n }\n if (top) {\n result.push(css([\"\", \"-top:\", \";\", \";\"], kind, theme.global.edgeSize[top] || top, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-top: \" + (breakpoint.edgeSize[top] || top) + \";\\n \") : ''));\n }\n if (bottom) {\n result.push(css([\"\", \"-bottom:\", \";\", \";\"], kind, theme.global.edgeSize[bottom] || bottom, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-bottom: \" + (breakpoint.edgeSize[bottom] || bottom) + \";\\n \") : ''));\n }\n if (left) {\n result.push(css([\"\", \"-left:\", \";\", \";\"], kind, theme.global.edgeSize[left] || left, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-left: \" + (breakpoint.edgeSize[left] || left) + \";\\n \") : ''));\n }\n if (right) {\n result.push(css([\"\", \"-right:\", \";\", \";\"], kind, theme.global.edgeSize[right] || right, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-right: \" + (breakpoint.edgeSize[right] || right) + \";\\n \") : ''));\n }\n if (data.start) {\n result.push(css([\"\", \"-inline-start:\", \";\", \";\"], kind, theme.global.edgeSize[data.start] || data.start, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-inline-start: \" + (breakpoint.edgeSize[data.start] || data.start) + \";\\n \") : ''));\n }\n if (data.end) {\n result.push(css([\"\", \"-inline-end:\", \";\", \";\"], kind, theme.global.edgeSize[data.end] || data.end, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-inline-end: \" + (breakpoint.edgeSize[data.end] || data.end) + \";\\n \") : ''));\n }\n return result;\n};\nexport var fillStyle = function fillStyle(fillProp) {\n if (fillProp === 'horizontal') {\n return 'width: 100%;';\n }\n if (fillProp === 'vertical') {\n return 'height: 100%;';\n }\n if (fillProp) {\n return \"\\n width: 100%;\\n height: 100%;\\n \";\n }\n return undefined;\n};\nvar focusStyles = function focusStyles(props, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n forceOutline = _ref.forceOutline,\n justBorder = _ref.justBorder;\n var focus = props.theme.global.focus;\n if (!focus || forceOutline && !focus.outline) {\n var color = normalizeColor('focus', props.theme);\n if (color) return \"outline: 2px solid \" + color + \";\";\n return ''; // native\n }\n\n if (focus.outline && (!focus.border || !justBorder)) {\n if (typeof focus.outline === 'object') {\n var _color = normalizeColor(focus.outline.color || 'focus', props.theme);\n var size = focus.outline.size || '2px';\n return \"\\n outline-offset: 0px;\\n outline: \" + size + \" solid \" + _color + \";\\n \";\n }\n return \"outline: \" + focus.outline + \";\";\n }\n if (focus.shadow && (!focus.border || !justBorder)) {\n if (typeof focus.shadow === 'object') {\n var _color2 = normalizeColor(\n // If there is a focus.border.color, use that for shadow too.\n // This is for backwards compatibility in v2.\n focus.border && focus.border.color || focus.shadow.color || 'focus', props.theme);\n var _size = focus.shadow.size || '2px'; // backwards compatible default\n return \"\\n outline: none;\\n box-shadow: 0 0 \" + _size + \" \" + _size + \" \" + _color2 + \";\\n \";\n }\n return \"\\n outline: none;\\n box-shadow: \" + focus.shadow + \";\\n \";\n }\n if (focus.border) {\n var _color3 = normalizeColor(focus.border.color || 'focus', props.theme);\n return \"\\n outline: none;\\n border-color: \" + _color3 + \";\\n \";\n }\n return ''; // defensive\n};\n\nvar unfocusStyles = function unfocusStyles(props, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n forceOutline = _ref2.forceOutline,\n justBorder = _ref2.justBorder;\n var focus = props.theme.global.focus;\n if (!focus || forceOutline && !focus.outline) {\n var color = normalizeColor('focus', props.theme);\n if (color) return \"outline: none;\";\n return ''; // native\n }\n\n if (focus.outline && (!focus.border || !justBorder)) {\n if (typeof focus.outline === 'object') {\n return \"\\n outline-offset: 0px;\\n outline: none;\\n \";\n }\n return \"outline: none;\";\n }\n if (focus.shadow && (!focus.border || !justBorder)) {\n if (typeof focus.shadow === 'object') {\n return \"\\n outline: none;\\n box-shadow: none;\\n \";\n }\n return \"\\n outline: none;\\n box-shadow: none;\\n \";\n }\n if (focus.border) {\n return \"\\n outline: none;\\n border-color: none;\\n \";\n }\n return ''; // defensive\n};\n\n// focus also supports clickable elements inside svg\nexport var focusStyle = function focusStyle(_temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n forceOutline = _ref3.forceOutline,\n justBorder = _ref3.justBorder,\n skipSvgChildren = _ref3.skipSvgChildren;\n return css([\"\", \" \", \" \", \"\"], function (props) {\n return !skipSvgChildren && \"\\n > circle,\\n > ellipse,\\n > line,\\n > path,\\n > polygon,\\n > polyline,\\n > rect {\\n \" + focusStyles(props) + \"\\n }\";\n }, function (props) {\n return focusStyles(props, {\n forceOutline: forceOutline,\n justBorder: justBorder\n });\n }, !forceOutline && \"\\n ::-moz-focus-inner {\\n border: 0;\\n }\\n \");\n};\n\n// This is placed next to focusStyle for easy maintainability\n// of code since changes to focusStyle should be reflected in\n// unfocusStyle as well.\n// this function can be used to reset focus styles which is\n// applicable when turning the focus ring off when using the mouse\n// see https://nelo.is/writing/styling-better-focus-states/\nexport var unfocusStyle = function unfocusStyle(_temp4) {\n var _ref4 = _temp4 === void 0 ? {} : _temp4,\n forceOutline = _ref4.forceOutline,\n justBorder = _ref4.justBorder,\n skipSvgChildren = _ref4.skipSvgChildren;\n return css([\"\", \" \", \" \", \"\"], function (props) {\n return !skipSvgChildren && \"\\n > circle,\\n > ellipse,\\n > line,\\n > path,\\n > polygon,\\n > polyline,\\n > rect {\\n \" + unfocusStyles(props) + \"\\n }\";\n }, function (props) {\n return unfocusStyles(props, {\n forceOutline: forceOutline,\n justBorder: justBorder\n });\n }, !forceOutline && \"\\n ::-moz-focus-inner {\\n border: 0;\\n }\\n \");\n};\n\n// For backwards compatibility we need to add back the control border width.\n// Based on how grommet was functioning prior to https://github.com/grommet/grommet/pull/3939,\n// the padding was subtracting the border width from the theme value, but the\n// placeholder was not. Because we're now placing the subtraction into the\n// theme itself, we have to add back in the border width here.\n// This is used for placeholder/icon in TextInput and MaskedInput.\nvar adjustPad = function adjustPad(props, value) {\n return parseMetricToNum((props.theme.global.edgeSize[value] || value) + \"px\") + parseMetricToNum(props.theme.global.control.border.width + \"px\") + \"px\";\n};\nexport var getInputPadBySide = function getInputPadBySide(props, side) {\n if (typeof props.theme.global.input.padding !== 'object') {\n var _adjustedPad = adjustPad(props, props.theme.global.input.padding);\n return _adjustedPad;\n }\n var orientation;\n if (side === 'left' || side === 'right') orientation = 'horizontal';else if (side === 'top' || side === 'bottom') orientation = 'vertical';else orientation = undefined;\n\n // if individual side isn't available, fallback to the\n // orientation if possible\n var pad = props.theme.global.input.padding[side] || props.theme.global.input.padding[orientation];\n var adjustedPad = adjustPad(props, pad);\n return adjustedPad;\n};\nvar placeholderColor = css([\"color:\", \";\"], function (props) {\n return normalizeColor(props.theme.global.colors.placeholder, props.theme);\n});\nvar placeholderStyle = css([\"&::-webkit-input-placeholder{\", \";}&::-moz-placeholder{\", \";}&:-ms-input-placeholder{\", \";}\"], placeholderColor, placeholderColor, placeholderColor);\nvar inputSizeStyle = function inputSizeStyle(props) {\n var data = props.theme.text[props.size];\n if (!data) {\n return css([\"font-size:\", \";\"], props.size);\n }\n return css([\"font-size:\", \";line-height:\", \";\"], data.size, data.height);\n};\nexport var inputStyle = css([\"box-sizing:border-box;\", \" font-family:inherit;border:none;-webkit-appearance:none;background:transparent;color:inherit;width:100%;\", \" \", \" \", \" margin:0;\", \" &:focus{\", \";}\", \" \", \"::-webkit-search-decoration{-webkit-appearance:none;}&::-moz-focus-inner{border:none;outline:none;}&:-moz-placeholder,&::-moz-placeholder{opacity:1;}\", \"\"], function (props) {\n var _props$theme$text$pro;\n return \"font-size: \" + (props.theme.global.input.font.size ? ((_props$theme$text$pro = props.theme.text[props.theme.global.input.font.size]) == null ? void 0 : _props$theme$text$pro.size) || props.theme.global.input.font.size : 'inherit') + \";\";\n}, function (props) {\n return props.theme.global.input.font.height && \"line-height: \" + props.theme.global.input.font.height + \";\";\n}, function (props) {\n return props.theme.global.input.padding && typeof props.theme.global.input.padding !== 'object' ? // On a breaking change release, this condition could be removed and\n // just the edgeStyle could remain. Currently, this is needed for\n // backwards compatibility since we are placing the calculation in\n // base.js\n \"padding: \" + (parseMetricToNum(props.theme.global.edgeSize[props.theme.global.input.padding] || props.theme.global.input.padding) - parseMetricToNum(props.theme.global.control.border.width)) + \"px;\" : edgeStyle('padding', props.theme.global.input.padding, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return (\n // for backwards compatibility, check if props.theme.global.input.weight\n (props.theme.global.input.weight || props.theme.global.input.font.weight) && css([\"font-weight:\", \";\"], props.theme.global.input.weight || props.theme.global.input.font.weight)\n );\n}, function (props) {\n return props.size && inputSizeStyle(props);\n}, function (props) {\n return (!props.plain || props.focusIndicator) && focusStyle();\n}, controlBorderStyle, placeholderStyle, function (props) {\n return props.theme.global.input.extend;\n});\n\n// Apply padding on input to create space for icon.\n// When theme.icon.matchSize is true, the space for the\n// icon should equal the icon dimension + 12px (edgeSize.medium)\n// to ensure there is reasonable space between the icon and value or placeholder\nexport var inputPadForIcon = css([\"\", \"\"], function (props) {\n var _props$theme, _props$theme$icon;\n var pad = (_props$theme = props.theme) != null && (_props$theme = _props$theme.icon) != null && _props$theme.matchSize ? parseMetricToNum((_props$theme$icon = props.theme.icon) == null || (_props$theme$icon = _props$theme$icon.size) == null ? void 0 : _props$theme$icon[(props == null ? void 0 : props.size) || 'medium']) + parseMetricToNum(props.theme.global.edgeSize.medium) + \"px\" : props.theme.global.edgeSize.large;\n return props.reverse ? \"padding-right: \" + pad + \";\" : \"padding-left: \" + pad + \";\";\n});\nexport var overflowStyle = function overflowStyle(overflowProp) {\n if (typeof overflowProp === 'string') {\n return css([\"overflow:\", \";\"], overflowProp);\n }\n return css([\"\", \" \", \";\"], overflowProp.horizontal && \"overflow-x: \" + overflowProp.horizontal + \";\", overflowProp.vertical && \"overflow-y: \" + overflowProp.vertical + \";\");\n};\nvar ALIGN_SELF_MAP = {\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n baseline: 'baseline'\n};\nexport var genericStyles = css([\"\", \" \", \" \", \"\"], function (props) {\n return props.alignSelf && \"align-self: \" + ALIGN_SELF_MAP[props.alignSelf] + \";\";\n}, function (props) {\n return props.gridArea && \"grid-area: \" + props.gridArea + \";\";\n}, function (props) {\n return props.margin && props.theme.global && edgeStyle('margin', props.margin, props.responsive, props.theme.global.edgeSize.responsiveBreakpoint, props.theme);\n});\nexport var disabledStyle = function disabledStyle(componentStyle) {\n return css([\"opacity:\", \";cursor:default;\"], function (props) {\n return componentStyle || props.theme.global.control.disabled.opacity;\n });\n};\nexport var sizeStyle = function sizeStyle(name, value, theme) {\n return css([\"\", \":\", \";\"], name, theme.global.size[value] || value);\n};\nexport var plainInputStyle = css([\"outline:none;border:none;\"]);\n\n// CSS for this sub-object in the theme\nexport var kindPartStyles = function kindPartStyles(obj, theme, colorValue) {\n var styles = [];\n if (obj.padding || obj.pad) {\n // button uses `padding` but other components use Grommet `pad`\n var pad = obj.padding || obj.pad;\n if (pad.vertical || pad.horizontal) styles.push(\"padding: \" + (theme.global.edgeSize[pad.vertical] || pad.vertical || 0) + \" \" + (theme.global.edgeSize[pad.horizontal] || pad.horizontal || 0) + \";\");else styles.push(\"padding: \" + (theme.global.edgeSize[pad] || pad || 0) + \";\");\n }\n if (obj.background) styles.push(backgroundStyle(colorValue || obj.background, theme, obj.color || (Object.prototype.hasOwnProperty.call(obj, 'color') && obj.color === undefined ? false : undefined)));else if (obj.color) styles.push(\"color: \" + normalizeColor(obj.color, theme) + \";\");\n if (obj.border) {\n if (obj.border.width) styles.push(css([\"border-style:solid;border-width:\", \";\"], obj.border.width));\n if (obj.border.color) styles.push(css([\"border-color:\", \";\"], normalizeColor(!obj.background && colorValue || obj.border.color || 'border', theme)));\n if (obj.border.radius) styles.push(css([\"border-radius:\", \";\"], obj.border.radius));\n } else if (obj.border === false) styles.push('border: none;');\n if (colorValue && !obj.border && !obj.background) styles.push(\"color: \" + normalizeColor(colorValue, theme) + \";\");\n if (obj.font) {\n if (obj.font.size) {\n styles.push(\"font-size: \" + (theme.text[obj.font.size].size || obj.font.size) + \";\");\n }\n if (obj.font.height) {\n styles.push(\"line-height: \" + obj.font.height + \";\");\n }\n if (obj.font.weight) {\n styles.push(\"font-weight: \" + obj.font.weight + \";\");\n }\n }\n if (obj.opacity) {\n var opacity = obj.opacity === true ? theme.global.opacity.medium : theme.global.opacity[obj.opacity] || obj.opacity;\n styles.push(\"opacity: \" + opacity + \";\");\n }\n if (obj.extend) styles.push(obj.extend);\n return styles;\n};\nvar ROUND_MAP = {\n full: '100%'\n};\nexport var roundStyle = function roundStyle(data, responsive, theme) {\n var breakpoint = getBreakpointStyle(theme, theme.box.responsiveBreakpoint);\n var styles = [];\n if (typeof data === 'object') {\n var size = ROUND_MAP[data.size] || theme.global.edgeSize[data.size || 'medium'] || data.size;\n var responsiveSize = responsive && breakpoint && breakpoint.edgeSize[data.size] && (breakpoint.edgeSize[data.size] || data.size);\n if (data.corner === 'top') {\n styles.push(css([\"border-top-left-radius:\", \";border-top-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-top-left-radius: \" + responsiveSize + \";\\n border-top-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'bottom') {\n styles.push(css([\"border-bottom-left-radius:\", \";border-bottom-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-bottom-left-radius: \" + responsiveSize + \";\\n border-bottom-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'left') {\n styles.push(css([\"border-top-left-radius:\", \";border-bottom-left-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-top-left-radius: \" + responsiveSize + \";\\n border-bottom-left-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'right') {\n styles.push(css([\"border-top-right-radius:\", \";border-bottom-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-top-right-radius: \" + responsiveSize + \";\\n border-bottom-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner) {\n styles.push(css([\"border-\", \"-radius:\", \";\"], data.corner, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-\" + data.corner + \"-radius: \" + responsiveSize + \";\\n \"));\n }\n } else {\n styles.push(css([\"border-radius:\", \";\"], size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-radius: \" + responsiveSize + \";\\n \"));\n }\n }\n } else {\n var _size2 = data === true ? 'medium' : data;\n styles.push(css([\"border-radius:\", \";\"], ROUND_MAP[_size2] || theme.global.edgeSize[_size2] || _size2));\n var _responsiveSize = breakpoint && breakpoint.edgeSize[_size2];\n if (_responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-radius: \" + _responsiveSize + \";\\n \"));\n }\n }\n return styles;\n};\nvar TEXT_ALIGN_MAP = {\n center: 'center',\n end: 'right',\n justify: 'justify',\n start: 'left'\n};\nexport var textAlignStyle = css([\"text-align:\", \";\"], function (props) {\n return TEXT_ALIGN_MAP[props.textAlign];\n});\nvar ALIGN_ITEMS_MAP = {\n baseline: 'baseline',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nexport var alignStyle = css([\"align-items:\", \";\"], function (props) {\n var _ALIGN_ITEMS_MAP$prop;\n return (_ALIGN_ITEMS_MAP$prop = ALIGN_ITEMS_MAP[props.align]) != null ? _ALIGN_ITEMS_MAP$prop : props.align;\n});\nvar ALIGN_CONTENT_MAP = {\n around: 'space-around',\n baseline: 'baseline',\n between: 'space-between',\n center: 'center',\n evenly: 'space-evenly',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nexport var alignContentStyle = css([\"align-content:\", \";\"], function (props) {\n var _ALIGN_CONTENT_MAP$pr;\n return (_ALIGN_CONTENT_MAP$pr = ALIGN_CONTENT_MAP[props.alignContent]) != null ? _ALIGN_CONTENT_MAP$pr : props.alignContent;\n});\nvar getSize = function getSize(theme, size) {\n return theme.global.size[size] || size;\n};\nvar widthObjectStyle = function widthObjectStyle(width, theme) {\n var result = [];\n if (width.max) result.push(css([\"max-width:\", \";\"], getSize(theme, width.max)));\n if (width.min) result.push(css([\"min-width:\", \";\"], getSize(theme, width.min)));\n if (width.width) result.push(css([\"width:\", \";\"], getSize(theme, width.width)));\n return result;\n};\nvar widthStringStyle = function widthStringStyle(width, theme) {\n return css([\"width:\", \";\"], getSize(theme, width));\n};\nexport var widthStyle = function widthStyle(width, theme) {\n return typeof width === 'object' ? widthObjectStyle(width, theme) : widthStringStyle(width, theme);\n};\nvar heightObjectStyle = function heightObjectStyle(height, theme) {\n var result = [];\n if (height.max) result.push(css([\"max-height:\", \";\"], getSize(theme, height.max)));\n if (height.min) result.push(css([\"min-height:\", \";\"], getSize(theme, height.min)));\n // backwards compatibile\n if (height.width) result.push(css([\"height:\", \";\"], getSize(theme, height.height)));\n if (height.height) result.push(css([\"height:\", \";\"], getSize(theme, height.height)));\n return result;\n};\nvar heightStringStyle = function heightStringStyle(height, theme) {\n return css([\"height:\", \";\"], getSize(theme, height));\n};\nexport var heightStyle = function heightStyle(height, theme) {\n return typeof height === 'object' ? heightObjectStyle(height, theme) : heightStringStyle(height, theme);\n};","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nexport var isObject = function isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n};\nexport var deepFreeze = function deepFreeze(obj) {\n Object.keys(obj).forEach(function (key) {\n return key && isObject(obj[key]) && Object.freeze(obj[key]);\n });\n return Object.freeze(obj);\n};\nexport var deepMerge = function deepMerge(target) {\n for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n sources[_key - 1] = arguments[_key];\n }\n if (!sources.length) {\n return target;\n }\n // making sure to not change target (immutable)\n var output = _extends({}, target);\n sources.forEach(function (source) {\n if (isObject(source)) {\n Object.keys(source).forEach(function (key) {\n if (isObject(source[key])) {\n if (!output[key]) {\n output[key] = _extends({}, source[key]);\n } else {\n output[key] = deepMerge(output[key], source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n }\n });\n return output;\n};\nexport var removeUndefined = function removeUndefined(obj) {\n var result = {};\n Object.keys(obj).forEach(function (key) {\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n });\n return result;\n};","var _excluded = [\"data\", \"page\", \"step\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { useMemo, useState } from 'react';\nexport var normalizeShow = function normalizeShow(showProp, step) {\n var page;\n // by default, show refers to the index of an item,\n // but if using pagination, show can take the form of { page: # },\n // where page refers to the page # to show\n if (typeof showProp === 'number') page = Math.ceil((showProp + 1) / step);else if (typeof showProp === 'object' && 'page' in showProp) page = showProp.page;\n return page;\n};\nexport var usePagination = function usePagination(_ref) {\n var data = _ref.data,\n page = _ref.page,\n step = _ref.step,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var totalPages = data ? Math.ceil(data.length / step) : 0;\n var _useState = useState(Math.min(page, totalPages) || 1),\n activePage = _useState[0],\n setActivePage = _useState[1];\n\n // ensure activePage is never lower than 1 to ensure that itemsBeginIndex\n // and itemsEndIndex aren't negative\n if (activePage > totalPages && (data == null ? void 0 : data.length) > 0) setActivePage(Math.max(totalPages, 1));\n var itemsBeginIndex = step * (activePage - 1);\n var itemsEndIndex = itemsBeginIndex + step;\n var currentItems = useMemo(function () {\n if (Array.isArray(data)) return data.slice(itemsBeginIndex, itemsEndIndex);\n return [];\n }, [data, itemsBeginIndex, itemsEndIndex]);\n var paginationProps = _extends({\n numberItems: data && data.length,\n onChange: function onChange(event) {\n return setActivePage(event.page);\n },\n page: activePage,\n step: step\n }, rest);\n return [currentItems, paginationProps];\n};","import React from 'react';\nexport var PortalContext = /*#__PURE__*/React.createContext([]);","import { useImperativeHandle, useRef } from 'react';\nexport var useForwardedRef = function useForwardedRef(ref) {\n var innerRef = useRef(null);\n useImperativeHandle(ref, function () {\n return innerRef.current;\n }, [innerRef]);\n return innerRef;\n};","import { useEffect, useState } from 'react';\nexport var useKeyboard = function useKeyboard() {\n var _useState = useState(),\n usingKeyboard = _useState[0],\n setUsingKeyboard = _useState[1];\n useEffect(function () {\n var onMouseDown = function onMouseDown() {\n return setUsingKeyboard(false);\n };\n var onKeyDown = function onKeyDown() {\n return setUsingKeyboard(true);\n };\n document.addEventListener('mousedown', onMouseDown);\n document.addEventListener('keydown', onKeyDown);\n return function () {\n document.removeEventListener('mousedown', onMouseDown);\n document.removeEventListener('keydown', onKeyDown);\n };\n }, []);\n return usingKeyboard;\n};\nexport default useKeyboard;","export * from './animation';\nexport * from './mixins';\nexport * from './background';\nexport * from './border';\nexport * from './colors';\nexport * from './dates';\nexport * from './DOM';\nexport * from './graphics';\nexport * from './icon';\nexport * from './styles';\nexport * from './object';\nexport * from './pagination';\nexport * from './PortalContext';\nexport * from './refs';\nexport * from './responsive';\nexport * from './use-keyboard';","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { Actions } from 'grommet-icons/icons/Actions';\nimport { AssistListening } from 'grommet-icons/icons/AssistListening';\nimport { CircleInformation } from 'grommet-icons/icons/CircleInformation';\nimport { ClosedCaption } from 'grommet-icons/icons/ClosedCaption';\nimport { Expand } from 'grommet-icons/icons/Expand';\nimport { FormClose } from 'grommet-icons/icons/FormClose';\nimport { FormDown } from 'grommet-icons/icons/FormDown';\nimport { FormNext } from 'grommet-icons/icons/FormNext';\nimport { FormPrevious } from 'grommet-icons/icons/FormPrevious';\nimport { FormUp } from 'grommet-icons/icons/FormUp';\nimport { Next } from 'grommet-icons/icons/Next';\nimport { Pause } from 'grommet-icons/icons/Pause';\nimport { Play } from 'grommet-icons/icons/Play';\nimport { FormPin } from 'grommet-icons/icons/FormPin';\nimport { Previous } from 'grommet-icons/icons/Previous';\nimport { StatusCriticalSmall } from 'grommet-icons/icons/StatusCriticalSmall';\nimport { StatusGoodSmall } from 'grommet-icons/icons/StatusGoodSmall';\nimport { StatusWarningSmall } from 'grommet-icons/icons/StatusWarningSmall';\nimport { StatusUnknownSmall } from 'grommet-icons/icons/StatusUnknownSmall';\nimport { Subtract } from 'grommet-icons/icons/Subtract';\nimport { Volume } from 'grommet-icons/icons/Volume';\nimport { VolumeLow } from 'grommet-icons/icons/VolumeLow';\nimport { base as iconBase } from 'grommet-icons/themes/base';\nimport { deepFreeze, deepMerge } from '../utils/object';\nimport { parseMetricToNum } from '../utils/mixins';\nvar brandColor = '#7D4CDB';\nvar accentColors = ['#6FFFB0', '#FD6FFF', '#81FCED', '#FFCA58'];\nvar neutralColors = ['#00873D', '#3D138D', '#00739D', '#A2423D'];\nvar statusColors = {\n critical: '#FF4040',\n error: '#B30000',\n warning: '#FFAA15',\n ok: '#00C781',\n unknown: '#CCCCCC',\n disabled: '#CCCCCC'\n};\nvar darkColors = ['#333333', '#555555', '#777777', '#999999', '#999999', '#999999'];\nvar lightColors = ['#F8F8F8', '#F2F2F2', '#EDEDED', '#DADADA', '#DADADA', '#DADADA'];\nvar focusColor = accentColors[0];\nvar colors = {\n active: 'rgba(221, 221, 221, 0.5)',\n 'background-back': {\n dark: '#33333308',\n light: '#EDEDED'\n },\n 'background-front': {\n dark: '#444444',\n light: '#FFFFFF'\n },\n 'background-contrast': {\n light: '#33333310',\n dark: '#FFFFFF18'\n },\n 'active-background': 'background-contrast',\n 'active-text': 'text-strong',\n black: '#000000',\n border: {\n dark: 'rgba(255, 255, 255, 0.33)',\n light: 'rgba(0, 0, 0, 0.33)'\n },\n brand: brandColor,\n control: {\n dark: 'accent-1',\n light: 'brand'\n },\n focus: focusColor,\n 'graph-0': 'accent-1',\n 'graph-1': 'neutral-1',\n 'graph-2': 'neutral-2',\n 'graph-3': 'neutral-3',\n 'graph-4': 'neutral-4',\n placeholder: '#AAAAAA',\n selected: 'brand',\n text: {\n dark: '#f8f8f8',\n light: '#444444'\n },\n 'text-strong': {\n dark: '#FFFFFF',\n light: '#000000'\n },\n 'text-weak': {\n dark: '#CCCCCC',\n light: '#555555'\n },\n 'text-xweak': {\n dark: '#BBBBBB',\n light: '#666666'\n },\n icon: {\n dark: '#f8f8f8',\n light: '#666666'\n },\n 'selected-background': 'brand',\n 'selected-text': 'text-strong',\n white: '#FFFFFF'\n};\nvar colorArray = function colorArray(array, prefix) {\n return array.forEach(function (color, index) {\n colors[prefix + \"-\" + (index + 1)] = color;\n });\n};\ncolorArray(accentColors, 'accent');\ncolorArray(darkColors, 'dark');\ncolorArray(lightColors, 'light');\ncolorArray(neutralColors, 'neutral');\nObject.keys(statusColors).forEach(function (color) {\n colors[\"status-\" + color] = statusColors[color];\n});\nexport var generate = function generate(baseSpacing, scale) {\n if (baseSpacing === void 0) {\n baseSpacing = 24;\n }\n if (scale === void 0) {\n scale = 6;\n }\n // 24\n var baseFontSize = baseSpacing * 0.75; // 18\n var fontScale = baseSpacing / scale; // 4\n\n var fontSizing = function fontSizing(factor) {\n return {\n size: baseFontSize + factor * fontScale + \"px\",\n height: baseSpacing + factor * fontScale + \"px\",\n // maxWidth chosen to be ~50 characters wide\n // see: https://ux.stackexchange.com/a/34125\n maxWidth: baseSpacing * (baseFontSize + factor * fontScale) + \"px\"\n };\n };\n var borderWidth = 2;\n var controlBorderWidth = 1;\n var result = deepMerge(iconBase, {\n global: {\n active: {\n background: {\n color: 'active',\n opacity: 'medium'\n },\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n animation: {\n duration: '1s',\n jiggle: {\n duration: '0.1s'\n }\n },\n // backgrounds: undefined,\n borderSize: {\n xsmall: '1px',\n small: '2px',\n medium: baseSpacing / 6 + \"px\",\n // 4\n large: baseSpacing / 2 + \"px\",\n // 12\n xlarge: baseSpacing + \"px\" // 24\n },\n\n breakpoints: {\n small: {\n value: baseSpacing * 32,\n // 768\n borderSize: {\n xsmall: '1px',\n small: '2px',\n medium: baseSpacing / 6 + \"px\",\n // 4\n large: baseSpacing / 4 + \"px\",\n // 6\n xlarge: baseSpacing / 2 + \"px\" // 12\n },\n\n edgeSize: {\n none: '0px',\n hair: '1px',\n // for Chart\n xxsmall: '2px',\n xsmall: baseSpacing / 8 + \"px\",\n // 3\n small: baseSpacing / 4 + \"px\",\n // 6\n medium: baseSpacing / 2 + \"px\",\n // 12\n large: baseSpacing + \"px\",\n // 24\n xlarge: baseSpacing * 2 + \"px\" // 48\n },\n\n size: {\n xxsmall: baseSpacing + \"px\",\n // 24\n xsmall: baseSpacing * 2 + \"px\",\n // 48\n small: baseSpacing * 4 + \"px\",\n // 96\n medium: baseSpacing * 8 + \"px\",\n // 192\n large: baseSpacing * 16 + \"px\",\n // 384\n xlarge: baseSpacing * 32 + \"px\",\n // 768\n full: '100%'\n }\n },\n medium: {\n value: baseSpacing * 64 // 1536\n },\n\n large: {} // anything above 'medium'\n },\n\n // Breakpoints used at Server Side Rendering for the initial rendering\n // These values correspond to the theme breakpoints\n deviceBreakpoints: {\n phone: 'small',\n tablet: 'medium',\n computer: 'large'\n },\n colors: colors,\n control: {\n border: {\n width: controlBorderWidth + \"px\",\n radius: '4px',\n color: 'border'\n },\n disabled: {\n opacity: 0.3\n }\n },\n // The time to wait after the user stopped typing, measured in ms.\n // A half second (500ms) debounce can be a helpful starting point.\n // You want to give the user time to fill out a field, but capture\n // their attention before they move on past it. 2 second (2000ms)\n // might be too long depending on how fast people type, and 200ms\n // would be an eye blink\n debounceDelay: 500,\n drop: {\n // intelligentMargin: undefined,\n background: {\n dark: 'black',\n light: 'white'\n },\n border: {\n radius: '0px'\n },\n // margin: undefined\n shadowSize: 'small',\n // shadowSize is deprecated, use 'elevation'\n zIndex: '20'\n },\n edgeSize: {\n none: '0px',\n hair: '1px',\n // for Chart\n xxsmall: baseSpacing / 8 + \"px\",\n // 3\n xsmall: baseSpacing / 4 + \"px\",\n // 6\n small: baseSpacing / 2 + \"px\",\n // 12\n medium: baseSpacing + \"px\",\n // 24\n large: baseSpacing * 2 + \"px\",\n // 48\n xlarge: baseSpacing * 4 + \"px\",\n // 96\n responsiveBreakpoint: 'small'\n },\n elevation: {\n light: {\n none: 'none',\n xsmall: '0px 1px 2px rgba(0, 0, 0, 0.20)',\n small: '0px 2px 4px rgba(0, 0, 0, 0.20)',\n medium: '0px 4px 8px rgba(0, 0, 0, 0.20)',\n large: '0px 8px 16px rgba(0, 0, 0, 0.20)',\n xlarge: '0px 12px 24px rgba(0, 0, 0, 0.20)'\n },\n dark: {\n none: 'none',\n xsmall: '0px 2px 2px rgba(255, 255, 255, 0.40)',\n small: '0px 4px 4px rgba(255, 255, 255, 0.40)',\n medium: '0px 6px 8px rgba(255, 255, 255, 0.40)',\n large: '0px 8px 16px rgba(255, 255, 255, 0.40)',\n xlarge: '0px 12px 24px rgba(255, 255, 255, 0.40)'\n }\n },\n focus: {\n // shadow or outline are required for accessibility\n border: {\n // remove to only have shadow\n color: 'focus'\n },\n // outline: { color: undefined, size: undefined },\n shadow: {\n color: 'focus',\n size: '2px'\n }\n },\n font: _extends({}, fontSizing(0)),\n hover: {\n background: {\n color: 'active',\n opacity: 'medium'\n },\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n input: {\n padding: {\n horizontal: parseMetricToNum(baseSpacing / 2 + \"px\") - parseMetricToNum(controlBorderWidth + \"px\") + \"px\",\n vertical: parseMetricToNum(baseSpacing / 2 + \"px\") - parseMetricToNum(controlBorderWidth + \"px\") + \"px\"\n },\n font: {\n // size: undefined,\n // height: undefined,\n weight: 600\n }\n // deprecate in v3\n // weight: undefined,\n },\n\n opacity: {\n strong: 0.8,\n medium: 0.4,\n weak: 0.1\n },\n selected: {\n background: 'selected',\n color: 'white'\n },\n spacing: baseSpacing + \"px\",\n size: {\n xxsmall: baseSpacing * 2 + \"px\",\n // 48\n xsmall: baseSpacing * 4 + \"px\",\n // 96\n small: baseSpacing * 8 + \"px\",\n // 192\n medium: baseSpacing * 16 + \"px\",\n // 384\n large: baseSpacing * 32 + \"px\",\n // 768\n xlarge: baseSpacing * 48 + \"px\",\n // 1152\n xxlarge: baseSpacing * 64 + \"px\",\n // 1536\n full: '100%'\n }\n },\n // icon: {\n // extennd: undefined,\n // matchSize: undefined,\n // size: undefined,\n // },\n accordion: {\n panel: {\n // border: {\n // side: 'bottom',\n // color: 'border',\n // },\n },\n border: {\n side: 'bottom',\n color: 'border'\n },\n heading: {\n level: '4' // level ranges from 1-6\n // margin: undefined\n },\n\n hover: {\n // background: undefined,\n color: {\n dark: 'light-4',\n light: 'dark-3'\n },\n // deprecated\n heading: {\n color: {\n dark: 'light-4',\n light: 'dark-3'\n }\n }\n },\n icons: {\n collapse: FormUp,\n expand: FormDown\n // color: { dark: undefined, light: undefined },\n }\n },\n\n anchor: {\n textDecoration: 'none',\n fontWeight: 600,\n color: {\n dark: 'accent-1',\n light: 'brand'\n },\n gap: 'small',\n hover: {\n textDecoration: 'underline'\n // fontWeight: undefined,\n // extend: undefined,\n }\n // size: {\n // medium: {\n // color: undefined,\n // fontWeight: undefined,\n // textDecoration: undefined,\n // },\n // },\n // extend: undefined,\n },\n\n avatar: {\n // extend: undefined,\n size: {\n xsmall: baseSpacing * 0.75 + \"px\",\n // 18px\n small: baseSpacing + \"px\",\n // 24px\n medium: baseSpacing * 2 + \"px\",\n // default 48px\n large: baseSpacing * 3 + \"px\",\n // 72px\n xlarge: baseSpacing * 4 + \"px\",\n // 96px\n '2xl': baseSpacing * 5 + \"px\",\n // 120px\n '3xl': baseSpacing * 6 + \"px\",\n // 144px\n '4xl': baseSpacing * 7 + \"px\",\n // 168px\n '5xl': baseSpacing * 8 + \"px\" // 192px\n },\n\n text: {\n size: {\n xsmall: 'small',\n // 14px\n small: 'medium',\n // 18px\n medium: 'large',\n // 22px\n large: 'xlarge',\n // 26px\n xlarge: 'xxlarge',\n // 34px\n '2xl': '3xl',\n // 42px\n '3xl': '4xl',\n // 54px\n '4xl': '5xl',\n // 70px\n '5xl': '6xl' // 90px\n }\n // fontWeight: undefined,\n // extend: undefined\n }\n },\n\n box: {\n responsiveBreakpoint: 'small' // when we switch rows to columns\n // extend: undefined,\n },\n\n button: {\n badge: {\n // align: undefined,,\n container: {\n background: 'brand'\n // pad: undefined,\n // extend: undefined,\n },\n\n size: {\n medium: baseSpacing + \"px\" // 24px\n },\n\n text: {\n size: {\n medium: 'small' // 14px\n }\n }\n },\n\n gap: 'small',\n size: {\n small: {\n border: {\n radius: baseSpacing * 0.75 + \"px\"\n },\n pad: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n // 4px\n horizontal: baseSpacing - borderWidth * 2 + \"px\" // 20px,\n }\n // iconOnly: {\n // pad: undefined,\n // },\n },\n\n medium: {\n border: {\n radius: baseSpacing * 0.75 + \"px\" // 18px\n },\n\n pad: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n // 4px\n horizontal: baseSpacing - borderWidth + \"px\" // 22px\n }\n // iconOnly: {\n // pad: undefined,\n // },\n },\n\n large: {\n border: {\n radius: baseSpacing + \"px\" // 24px\n },\n\n pad: {\n vertical: baseSpacing / 4 + borderWidth + \"px\",\n // 8px\n horizontal: baseSpacing + borderWidth * 4 + \"px\" // 32px,\n }\n // iconOnly: {\n // pad: undefined,\n // },\n }\n },\n\n border: {\n // color: { dark: undefined, light: undefined }\n width: borderWidth + \"px\",\n radius: baseSpacing * 0.75 + \"px\"\n },\n // color: { dark: undefined, light: undefined }\n // default: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // primary: {\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // secondary: {\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // option: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n active: {\n background: 'active-background',\n // border: undefined,\n color: 'active-text'\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n },\n\n disabled: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n opacity: 0.3\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n },\n\n // hover: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n // },\n padding: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n horizontal: baseSpacing - borderWidth + \"px\"\n },\n transition: {\n timing: 'ease-in-out',\n duration: 0.1,\n properties: ['color', 'background-color', 'border-color', 'box-shadow']\n },\n skeleton: {\n width: {\n min: '100px'\n }\n }\n },\n calendar: {\n // daySize must align with global.size\n small: {\n // title: {},\n fontSize: baseFontSize - fontScale + \"px\",\n lineHeight: 1.375,\n daySize: baseSpacing * 8 / 7 + \"px\",\n slideDuration: '0.2s'\n },\n medium: {\n // title: {},\n fontSize: baseFontSize + \"px\",\n lineHeight: 1.45,\n daySize: baseSpacing * 16 / 7 + \"px\",\n slideDuration: '0.5s'\n },\n large: {\n // title: {},\n fontSize: baseFontSize + 3 * fontScale + \"px\",\n lineHeight: 1.11,\n daySize: baseSpacing * 32 / 7 + \"px\",\n slideDuration: '0.8s'\n },\n icons: {\n previous: Previous,\n next: Next,\n small: {\n previous: FormPrevious,\n next: FormNext\n }\n },\n heading: {\n level: '4'\n } // level ranges from 1-6\n },\n\n card: {\n container: {\n round: 'small',\n elevation: 'small'\n // extend: undefined,\n },\n\n // hover: {\n // container: {\n // elevation: undefined,\n // },\n // },\n header: {},\n body: {},\n footer: {}\n },\n cards: {\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n }\n },\n\n carousel: {\n icons: {\n current: Subtract,\n next: Next,\n previous: Previous\n // color: { dark: undefined, light: undefined },\n },\n\n animation: {\n duration: 1000\n },\n disabled: {\n icons: {\n // color: { dark: undefined, light: undefined },\n }\n }\n },\n chart: {\n color: 'graph-0'\n // extend: undefined,\n },\n\n checkBox: {\n border: {\n color: {\n dark: 'rgba(255, 255, 255, 0.5)',\n light: 'rgba(0, 0, 0, 0.15)'\n },\n width: '2px'\n },\n check: {\n // extend: undefined,\n radius: '4px',\n thickness: '4px'\n },\n label: {\n align: 'center'\n },\n // color: { dark: undefined, light: undefined },\n // extend: undefined,\n // gap: undefined\n hover: {\n border: {\n color: {\n dark: 'white',\n light: 'black'\n }\n }\n // background: undefined,\n // extend: undefined,\n },\n\n icon: {\n // size: undefined,\n // extend: undefined,\n },\n icons: {\n // checked: undefined,\n // indeterminate: undefined,\n },\n // pad: undefined,\n size: baseSpacing + \"px\",\n toggle: {\n // background: undefined\n color: {\n dark: '#d9d9d9',\n light: '#d9d9d9'\n },\n knob: {\n // extend: undefined,\n },\n radius: baseSpacing + \"px\",\n size: baseSpacing * 2 + \"px\"\n // extend: undefined,\n }\n },\n\n checkBoxGroup: {\n // container: {\n // // any box props\n // extend: undefined,\n // },\n },\n clock: {\n analog: {\n // extend: undefined,\n hour: {\n color: {\n dark: 'light-2',\n light: 'dark-3'\n },\n width: baseSpacing / 3 + \"px\",\n size: baseSpacing + \"px\",\n shape: 'round'\n },\n minute: {\n color: {\n dark: 'light-4',\n light: 'dark-3'\n },\n width: baseSpacing / 6 + \"px\",\n size: Math.round(baseSpacing / 2) + \"px\",\n shape: 'round'\n },\n second: {\n color: {\n dark: 'accent-1',\n light: 'accent-1'\n },\n width: baseSpacing / 8 + \"px\",\n size: Math.round(baseSpacing / 2.666) + \"px\",\n shape: 'round'\n },\n size: {\n xsmall: baseSpacing * 2 + \"px\",\n small: baseSpacing * 3 + \"px\",\n medium: baseSpacing * 4 + \"px\",\n large: baseSpacing * 6 + \"px\",\n xlarge: baseSpacing * 9 + \"px\",\n xxlarge: baseSpacing * 12 + \"px\",\n huge: baseSpacing * 12 + \"px\" // kept for backwards compatibility\n }\n },\n\n digital: {\n text: {\n xsmall: {\n size: baseFontSize - 2 * fontScale + \"px\",\n height: 1.5\n },\n small: {\n size: baseFontSize - fontScale + \"px\",\n height: 1.43\n },\n medium: {\n size: baseFontSize + \"px\",\n height: 1.375\n },\n large: {\n size: baseFontSize + fontScale + \"px\",\n height: 1.167\n },\n xlarge: {\n size: baseFontSize + 2 * fontScale + \"px\",\n height: 1.1875\n },\n xxlarge: {\n size: baseFontSize + 4 * fontScale + \"px\",\n height: 1.125\n }\n }\n }\n },\n collapsible: {\n minSpeed: 200,\n baseline: 500\n },\n dateInput: {\n container: {\n round: 'xxsmall'\n }\n // icon: {\n // size: undefined,\n // },\n },\n\n dataTable: {\n // body: {\n // extend: undefined,\n // },\n pinned: {\n // body: {\n // background: undefined,\n // extend: undefined,\n // },\n header: {\n background: {\n opacity: 'strong'\n }\n // extend: undefined,\n },\n\n footer: {\n background: {\n opacity: 'strong'\n }\n // extend: undefined,\n }\n },\n\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n },\n\n groupHeader: {\n background: {\n dark: 'dark-2',\n light: 'light-2'\n },\n border: {\n side: 'bottom',\n size: 'xsmall'\n },\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n }\n },\n groupEnd: {\n border: {\n side: 'bottom',\n size: 'xsmall'\n }\n },\n header: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // extend: undefined,\n // font: {\n // weight: undefined,\n // size: undefined,\n // },\n gap: 'small',\n // hover: {\n // background: undefined,\n // },\n // pad: undefined,\n units: {\n color: 'text-xweak',\n margin: {\n left: 'xsmall'\n },\n alignSelf: 'end'\n }\n },\n icons: {\n ascending: FormDown,\n contract: FormUp,\n descending: FormUp,\n expand: FormDown\n // sortable: undefined,\n },\n\n primary: {\n weight: 'bold'\n },\n resize: {\n border: {\n color: 'border',\n side: 'end'\n }\n // hover: {\n // border: {\n // color: undefined,\n // side: undefined,\n // size: undefined,\n // },\n // },\n }\n },\n\n diagram: {\n // extend: undefined,\n line: {\n color: 'graph-0'\n }\n },\n // drop: {\n // extend: undefined,\n // maxHeight: undefined,\n // },\n fileInput: {\n // background: {},\n border: {\n // color: undefined,\n side: 'all',\n size: 'small',\n style: 'dashed'\n },\n dragOver: {\n border: {\n color: 'control'\n }\n // extend: undefined,\n },\n\n hover: {\n border: {\n color: 'brand'\n }\n // extend: undefined,\n },\n\n icons: {\n remove: FormClose\n },\n // pad: {},\n label: {\n margin: 'small'\n // extend: undefined,\n },\n\n message: {\n margin: 'small'\n // extend: undefined,\n }\n // extend: undefined,\n },\n\n formField: {\n border: {\n color: 'border',\n error: {\n color: {\n dark: 'white',\n light: 'status-critical'\n }\n },\n position: 'inner',\n side: 'bottom'\n },\n // checkBox: {\n // pad: undefined,\n // },\n content: {\n // margin: undefined,\n pad: 'small'\n },\n disabled: {\n background: {\n color: 'status-disabled',\n opacity: 'medium'\n }\n // border: {\n // color: undefined,\n // },\n // label: {\n // color: undefined,\n // },\n },\n\n // focus: {\n // background: {\n // color: undefined,\n // },\n // border: {\n // color: undefined,\n // },\n // },\n error: {\n color: 'status-critical',\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // background: undefined,\n // container: {}, // any Box props\n // icon: undefined,\n },\n\n // extend: undefined,\n help: {\n color: 'dark-3',\n margin: {\n start: 'small'\n }\n },\n info: {\n color: 'text-xweak',\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // container: {}, // any Box props\n // icon: undefined,\n },\n\n label: {\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // requiredIndicator: undefined,\n },\n\n margin: {\n bottom: 'small'\n },\n // round: undefined,\n survey: {\n label: {\n margin: {\n bottom: 'xsmall'\n },\n size: 'medium',\n weight: 400\n }\n }\n },\n grommet: {\n // extend: undefined\n },\n header: {\n sticky: {\n zIndex: '20'\n }\n },\n heading: {\n // color: undefined,\n font: {\n // family: undefined\n },\n level: {\n 1: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(4)),\n medium: _extends({}, fontSizing(8)),\n large: _extends({}, fontSizing(16)),\n xlarge: _extends({}, fontSizing(24))\n },\n 2: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(2)),\n medium: _extends({}, fontSizing(4)),\n large: _extends({}, fontSizing(8)),\n xlarge: _extends({}, fontSizing(12))\n },\n 3: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(1)),\n medium: _extends({}, fontSizing(2)),\n large: _extends({}, fontSizing(4)),\n xlarge: _extends({}, fontSizing(6))\n },\n 4: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(0)),\n medium: _extends({}, fontSizing(0)),\n large: _extends({}, fontSizing(0)),\n xlarge: _extends({}, fontSizing(0))\n },\n 5: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(-0.5)),\n medium: _extends({}, fontSizing(-0.5)),\n large: _extends({}, fontSizing(-0.5)),\n xlarge: _extends({}, fontSizing(-0.5))\n },\n 6: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(-1)),\n large: _extends({}, fontSizing(-1)),\n xlarge: _extends({}, fontSizing(-1))\n }\n },\n responsiveBreakpoint: 'small',\n // when we scale the font size down\n weight: 600,\n skeleton: {\n width: {\n min: '150px',\n max: '200px'\n }\n }\n },\n layer: {\n background: {\n dark: 'black',\n light: 'white'\n },\n border: {\n radius: '4px'\n // intelligentRounding: undefined,\n },\n\n container: {\n // elevation: undefined,\n zIndex: '20'\n },\n // extend: undefined,\n overlay: {\n background: 'rgba(0, 0, 0, 0.5)'\n // backdropFilter: undefined,\n },\n\n responsiveBreakpoint: 'small',\n // when Layer takes over the full screen\n zIndex: '20'\n },\n list: {\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n },\n\n item: {\n // background: undefined,\n border: 'horizontal',\n disabled: {\n color: 'status-disabled',\n cursor: 'default'\n },\n pinned: {\n background: 'background-contrast',\n icon: {\n size: 'medium',\n pad: 'small'\n }\n },\n pad: {\n horizontal: 'medium',\n vertical: 'small'\n }\n // extend: undefined,\n },\n\n icons: {\n down: FormDown,\n up: FormUp,\n pin: FormPin\n }\n // extend: undefined,\n },\n\n maskedInput: {\n // container: {\n // extend: undefined,\n // },\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n menu: {\n // background: undefined,\n // item: undefined,\n // extend: undefined,\n drop: {\n align: {\n top: 'top',\n left: 'left'\n }\n // any drop props\n },\n\n group: {\n container: {\n pad: {\n vertical: 'xsmall'\n }\n },\n separator: {\n color: 'border',\n size: 'xsmall',\n pad: {\n horizontal: 'small'\n }\n }\n },\n icons: {\n down: FormDown\n // up: undefined,\n // color: { dark: undefined, light: undefined },\n }\n },\n\n meter: {\n color: 'graph-0'\n // colors: [] || colors: ['graph-0', 'graph-1', 'graph-2', 'graph-3'],\n // extend: undefined,\n },\n\n nameValueList: {\n gap: {\n column: 'large',\n row: 'small'\n },\n pair: {\n column: {\n gap: {\n column: 'large',\n row: 'medium'\n }\n }\n },\n name: {\n width: 'small'\n },\n value: {\n width: 'medium'\n }\n },\n nameValuePair: {\n column: {\n gap: 'xxsmall'\n },\n name: {\n // any text props\n color: 'text',\n weight: 'bold'\n },\n value: {\n // any text props\n color: 'text'\n }\n },\n notification: {\n actions: {\n // any anchor props\n },\n direction: 'column',\n container: {\n // any box props\n round: 'xsmall',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n background: {\n color: 'background-front'\n }\n },\n global: {\n direction: 'row',\n container: {\n // any box props\n round: 'none',\n pad: {\n horizontal: 'large',\n vertical: 'xsmall'\n }\n }\n },\n toast: {\n // direction: undefined,\n container: {\n // any box props\n elevation: 'medium',\n width: 'medium'\n },\n layer: {\n position: 'top',\n margin: 'medium'\n },\n time: 8000\n },\n iconContainer: {\n // any box props\n pad: {\n right: 'small'\n },\n flex: false\n },\n textContainer: {\n // any box props\n gap: 'medium'\n },\n title: {\n // any text props\n weight: 'bold'\n },\n message: {\n // any text props\n margin: 'none'\n },\n close: {\n icon: FormClose\n },\n critical: {\n icon: StatusCriticalSmall,\n background: {\n color: 'status-critical',\n opacity: 'weak'\n },\n color: 'status-critical',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n warning: {\n icon: StatusWarningSmall,\n background: {\n color: 'status-warning',\n opacity: 'weak'\n },\n color: 'status-warning',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n normal: {\n icon: StatusGoodSmall,\n background: {\n color: 'status-ok',\n opacity: 'weak'\n },\n color: 'status-ok',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n info: {\n icon: CircleInformation,\n background: 'background-contrast',\n color: 'text-strong',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n unknown: {\n icon: StatusUnknownSmall,\n background: {\n color: 'status-unknown',\n opacity: 'weak'\n },\n color: 'status-unknown',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n // deprecate \"undefined\" in v3\n // and if undefined, no icon\n undefined: {\n icon: StatusUnknownSmall,\n // background: undefined,\n color: 'status-unknown'\n // global: {},\n // toast: {},\n }\n },\n\n page: {\n wide: {\n alignSelf: 'center',\n width: {\n min: 'medium',\n max: 'xxlarge'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n },\n narrow: {\n alignSelf: 'center',\n width: {\n min: 'medium',\n max: 'large'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n },\n full: {\n alignSelf: 'start',\n width: {\n min: 'medium',\n max: '100%'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n }\n },\n pageHeader: {\n actions: {\n // any box props\n align: 'end'\n },\n pad: {\n top: 'large',\n bottom: 'medium'\n },\n parent: {\n // any box props\n align: 'start'\n },\n responsive: {\n actions: {\n // any box props\n align: 'start',\n pad: {\n top: 'small'\n }\n },\n areas: [['parent'], ['title'], ['subtitle'], ['actions']],\n breakpoints: ['small'],\n columns: ['auto'],\n rows: ['auto']\n // gap: undefined,\n },\n\n subtitle: {\n // any paragraph props\n margin: 'none'\n },\n title: {\n // any heading props\n margin: 'none',\n fill: true\n },\n size: {\n small: {\n pad: {\n top: 'medium',\n bottom: 'small'\n },\n subtitle: {\n size: 'small'\n },\n title: {\n size: 'small'\n }\n },\n // medium: {\n // // pad: undefined,\n // // subtitle: {},\n // // title: {},\n // },\n large: {\n pad: {\n top: 'xlarge',\n bottom: 'large'\n },\n subtitle: {\n size: 'large'\n },\n title: {\n size: 'large'\n }\n }\n },\n small: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['small', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'large'\n }\n },\n medium: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['medium', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'medium'\n }\n },\n large: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['medium', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'large'\n }\n }\n },\n pagination: {\n button: {\n active: {\n background: {\n color: 'active-background'\n }\n },\n color: 'text-strong',\n hover: {\n background: {\n color: 'background-contrast'\n },\n color: undefined\n },\n size: {\n small: {\n border: {\n radius: baseSpacing / 8 + \"px\",\n // 3\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(-1)),\n height: baseSpacing * 1.25 + \"px\",\n width: baseSpacing * 1.25 + \"px\"\n },\n medium: {\n border: {\n radius: baseSpacing / 6 + \"px\",\n // 4\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(0)),\n height: baseSpacing * 1.5 + \"px\",\n width: baseSpacing * 1.5 + \"px\"\n },\n large: {\n border: {\n radius: baseSpacing / 4 + \"px\",\n // 6\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(1)),\n height: baseSpacing * 2 + \"px\",\n width: baseSpacing * 2 + \"px\"\n }\n }\n },\n // container: {\n // // any box props,\n // extend: undefined,\n // },\n controls: {\n align: 'center',\n direction: 'row',\n gap: 'xxsmall',\n margin: 'none',\n pad: 'none'\n },\n icons: {\n // color: undefined,\n next: Next,\n previous: Previous\n }\n },\n paragraph: {\n font: {\n // family: undefined\n },\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(0)),\n large: _extends({}, fontSizing(1)),\n xlarge: _extends({}, fontSizing(2)),\n xxlarge: _extends({}, fontSizing(4))\n },\n thumbsRating: {\n // dislike: {\n // color: undefined,\n // },\n // like: {\n // color: undefined,\n // },\n },\n spinner: {\n container: {\n animation: 'rotateRight',\n color: 'brand',\n pad: 'small',\n round: 'full',\n size: 'small'\n },\n // icon: undefined\n size: {\n xsmall: baseSpacing * 0.75 + \"px\",\n small: baseSpacing + \"px\",\n // default 24\n medium: baseSpacing * 2 + \"px\",\n large: baseSpacing * 3 + \"px\",\n xlarge: baseSpacing * 4 + \"px\"\n }\n },\n radioButton: {\n border: {\n color: {\n dark: 'rgba(255, 255, 255, 0.5)',\n light: 'rgba(0, 0, 0, 0.15)'\n },\n width: '2px'\n },\n check: {\n radius: '100%'\n // background: {\n // color: undefined,\n // },\n // color: { dark: undefined, light: undefined },\n // extend: undefined,\n },\n\n // color: undefined,\n hover: {\n // background: {\n // color: undefined,\n // },\n border: {\n color: {\n dark: 'white',\n light: 'black'\n }\n }\n },\n icon: {\n // size: undefined,\n // extend: undefined,\n },\n icons: {\n // circle: undefined,\n },\n gap: 'small',\n size: baseSpacing + \"px\",\n font: {\n // weight: undefined,\n },\n container: {\n // extend: undefined\n }\n },\n radioButtonGroup: {\n // container: {}, // any box props\n },\n rangeInput: {\n disabled: {\n opacity: 0.3\n // thumb: {\n // color: undefined,\n // },\n // track: {\n // color: undefined,\n // },\n },\n\n // extend: undefined\n track: {\n height: '4px',\n color: 'border'\n // opacity: undefined,\n // lower: {\n // color: 'undefined',\n // opacity: undefined,\n // },\n // upper: {\n // color: undefined,\n // opacity: undefined,\n // },\n // extend: undefined\n },\n\n thumb: {\n // color: { dark: undefined, light: undefined },\n // extend: undefined\n }\n },\n rangeSelector: {\n background: {\n invert: {\n color: 'light-4'\n }\n }\n // edge: {\n // type: undefined,\n // },\n },\n\n select: {\n // background: undefined,\n clear: {\n container: {\n pad: 'small',\n background: 'background-contrast'\n },\n // any box props\n text: {\n color: 'text-weak'\n } // any text props\n },\n\n container: {\n // extend: undefined,\n },\n control: {\n // extend: undefined,\n // open: undefined,\n },\n // emptySearchMessage: {\n // container: {}, // any box props\n // text: {}, // any text props\n // },\n icons: {\n // color: { dark: undefined, light: undefined },\n margin: {\n horizontal: 'small'\n },\n down: FormDown\n // up: undefined\n },\n\n options: {\n container: {\n align: 'start',\n pad: 'small'\n },\n text: {\n margin: 'none'\n }\n },\n // searchInput: undefined,\n step: 20\n },\n selectMultiple: {\n maxInline: 5\n },\n skeleton: {\n border: false,\n colors: {\n dark: ['background', 'background-front'],\n light: ['background', 'background-back']\n }\n },\n skipLinks: {\n position: 'top',\n container: {\n elevation: 'large',\n round: 'small',\n pad: 'medium'\n },\n label: {\n margin: {\n bottom: 'medium'\n },\n size: 'medium'\n }\n },\n starRating: {\n // color: undefined,\n },\n tab: {\n active: {\n color: 'text'\n // background: undefined,\n },\n\n // background: undefined,\n border: {\n side: 'bottom',\n size: 'small',\n color: {\n dark: 'accent-1',\n light: 'brand'\n },\n active: {\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n disabled: {\n // color: undefined,\n },\n hover: {\n color: {\n dark: 'white',\n light: 'black'\n }\n // extend: undefined,\n }\n },\n\n color: 'control',\n // disabled: {\n // color: undefined,\n // },\n // extend: undefined,\n hover: {\n // background: undefined,\n // extend: undefined,\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n margin: {\n vertical: 'xxsmall',\n horizontal: 'small'\n },\n pad: {\n bottom: 'xsmall'\n }\n },\n tabs: {\n // background: undefined,\n // extend: undefined,\n // gap: undefined,\n header: {\n // alignSelf: undefined,\n // background: undefined,\n // border: {\n // side: undefined,\n // size: undefined,\n // style: undefined,\n // color: undefined,\n // },\n // extend: undefined,\n },\n panel: {\n // extend: undefined,\n },\n step: {\n small: 1,\n medium: 3,\n large: 3\n }\n },\n table: {\n header: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n border: 'bottom'\n // verticalAlign: undefined,\n // background: undefined,\n // extend: undefined,\n },\n\n body: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n }\n // background: undefined,\n // border: undefined,\n // extend: undefined,\n },\n\n // row: {\n // hover: {\n // background: undefined,\n // color: undefined,\n // },\n // },\n footer: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n border: 'top'\n // verticalAlign: undefined,\n // background: undefined,\n // extend: undefined,\n }\n },\n\n tag: {\n // background: undefined,\n border: true,\n round: 'large',\n // name: undefined,\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n remove: {\n margin: {\n right: 'xsmall'\n }\n },\n separator: ' : ',\n size: {\n xsmall: {\n pad: {\n horizontal: baseSpacing / 3 + \"px\",\n vertical: 'xxsmall'\n },\n icon: {\n size: baseSpacing * 0.75 + \"px\"\n }\n },\n small: {\n pad: {\n horizontal: baseSpacing * 0.4 + \"px\",\n vertical: 'xxsmall'\n },\n icon: {\n size: baseSpacing * 0.75 + \"px\"\n }\n },\n large: {\n pad: {\n horizontal: baseSpacing / 3 * 2 + \"px\",\n vertical: \"xsmall\"\n },\n icon: {\n size: baseSpacing * 1.25 + \"px\"\n }\n },\n xlarge: {\n pad: {\n horizontal: baseSpacing * 0.75 + \"px\",\n vertical: 'xsmall'\n },\n icon: {\n size: baseSpacing * 1.5 + \"px\"\n }\n }\n },\n value: {\n weight: 600\n }\n },\n text: {\n font: {\n // family: undefined\n },\n xsmall: _extends({}, fontSizing(-1.5)),\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(0)),\n // 18px\n large: _extends({}, fontSizing(1)),\n // 22px\n xlarge: _extends({}, fontSizing(2)),\n xxlarge: _extends({}, fontSizing(4)),\n '2xl': _extends({}, fontSizing(4)),\n '3xl': _extends({}, fontSizing(6)),\n '4xl': _extends({}, fontSizing(9)),\n '5xl': _extends({}, fontSizing(13)),\n '6xl': _extends({}, fontSizing(18)),\n skeleton: {\n width: {\n width: '100px',\n min: '100px'\n },\n margin: {\n vertical: 'xsmall'\n },\n colors: {\n dark: ['border', 'border'],\n light: ['background-front', 'background-back']\n }\n }\n },\n textArea: {\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n textInput: {\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n tip: {\n content: {\n // any Box props\n background: 'background-contrast',\n elevation: 'small',\n margin: 'xsmall',\n pad: {\n vertical: 'xsmall',\n horizontal: 'small'\n },\n round: 'small'\n },\n drop: {\n // any props for the drop\n align: {\n top: 'bottom'\n },\n // most common use case is Header with Buttons\n background: 'none',\n elevation: 'none',\n margin: 'none'\n }\n },\n video: {\n captions: {\n background: 'rgba(0, 0, 0, 0.7)'\n },\n // controls: { background: undefined },\n icons: {\n closedCaption: ClosedCaption,\n configure: Actions,\n fullScreen: Expand,\n pause: Pause,\n play: Play,\n reduceVolume: VolumeLow,\n volume: Volume,\n description: AssistListening\n // color: { dark: undefined, light: undefined },\n },\n\n scrubber: {\n color: 'light-4',\n interval: 10\n // track: { color: undefined }\n }\n },\n\n worldMap: {\n color: 'light-3',\n continent: {\n active: '8px',\n base: '6px'\n },\n hover: {\n color: 'light-4'\n },\n place: {\n active: '20px',\n base: '8px'\n }\n }\n });\n return deepFreeze(result);\n};\nexport var base = generate(24);","import { deepMerge } from './utils';\nimport { base } from './themes/base';\nexport var defaultProps = {\n theme: base\n};\nexport var extendDefaultTheme = function extendDefaultTheme(theme) {\n defaultProps.theme = deepMerge(base, theme);\n};","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n target: PropTypes.oneOf(['component', 'document']),\n onBackspace: PropTypes.func,\n onComma: PropTypes.func,\n onDown: PropTypes.func,\n onEnter: PropTypes.func,\n onEsc: PropTypes.func,\n onKeyDown: PropTypes.func,\n onLeft: PropTypes.func,\n onRight: PropTypes.func,\n onShift: PropTypes.func,\n onSpace: PropTypes.func,\n onTab: PropTypes.func,\n onUp: PropTypes.func\n };\n}\nexport var KeyboardPropTypes = PropType;","var _excluded = [\"capture\", \"target\", \"children\", \"onKeyDown\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { Children, cloneElement, useCallback, useEffect } from 'react';\nimport { KeyboardPropTypes } from './propTypes';\nvar KEYS = {\n 8: 'onBackspace',\n 9: 'onTab',\n 13: 'onEnter',\n 27: 'onEsc',\n 32: 'onSpace',\n 37: 'onLeft',\n 38: 'onUp',\n 39: 'onRight',\n 40: 'onDown',\n 188: 'onComma',\n 16: 'onShift'\n};\nvar Keyboard = function Keyboard(_ref) {\n var capture = _ref.capture,\n target = _ref.target,\n children = _ref.children,\n onKeyDown = _ref.onKeyDown,\n restProps = _objectWithoutPropertiesLoose(_ref, _excluded);\n var onKeyDownHandler = useCallback(function (event) {\n var key = event.keyCode ? event.keyCode : event.which;\n var callbackName = KEYS[key];\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n if (callbackName && restProps[callbackName]) {\n restProps[callbackName].apply(restProps, [event].concat(rest));\n }\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }, [onKeyDown, restProps]);\n useEffect(function () {\n if (target === 'document') {\n document.addEventListener('keydown', onKeyDownHandler, capture);\n }\n return function () {\n if (target === 'document') {\n document.removeEventListener('keydown', onKeyDownHandler, capture);\n }\n };\n }, [capture, onKeyDownHandler, target]);\n return target === 'document' ? children : /*#__PURE__*/cloneElement(Children.only(children), {\n onKeyDown: onKeyDownHandler\n });\n};\nKeyboard.propTypes = KeyboardPropTypes;\nexport { Keyboard };","var _FLEX_MAP;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport styled, { css } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { alignContentStyle, alignStyle, backgroundStyle, borderStyle, breakpointStyle, edgeStyle, fillStyle, focusStyle, genericStyles, getBreakpointStyle, getHoverIndicatorStyle, heightStyle, overflowStyle, parseMetricToNum, responsiveBorderStyle, widthStyle } from '../../utils';\nimport { roundStyle } from '../../utils/styles';\nimport { animationBounds, animationObjectStyle } from '../../utils/animation';\nvar BASIS_MAP = {\n auto: 'auto',\n full: '100%',\n '1/2': '50%',\n '1/4': '25%',\n '2/4': '50%',\n '3/4': '75%',\n '1/3': '33.33%',\n '2/3': '66.66%'\n};\nvar basisStyle = css([\"flex-basis:\", \";\"], function (props) {\n return BASIS_MAP[props.basis] || props.theme.global.size[props.basis] || props.basis;\n});\n\n// min-width and min-height needed because of this\n// https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\n// we assume we are in the context of a Box going the other direction\n// TODO: revisit this\nvar directionStyle = function directionStyle(direction, theme) {\n var styles = [css([\"min-width:0;min-height:0;flex-direction:\", \";\"], direction === 'row-responsive' ? 'row' : direction)];\n if (direction === 'row-responsive' && theme.box.responsiveBreakpoint) {\n var breakpoint = getBreakpointStyle(theme, theme.box.responsiveBreakpoint);\n if (breakpoint) {\n styles.push(breakpointStyle(breakpoint, \"\\n flex-direction: column;\\n flex-basis: auto;\\n justify-content: flex-start;\\n align-items: stretch;\\n \"));\n }\n }\n return styles;\n};\nvar elevationStyle = function elevationStyle(elevation) {\n return css([\"box-shadow:\", \";\"], function (props) {\n return props.theme.global.elevation[props.theme.dark ? 'dark' : 'light'][elevation];\n });\n};\nvar FLEX_MAP = (_FLEX_MAP = {}, _FLEX_MAP[true] = '1 1', _FLEX_MAP[false] = '0 0', _FLEX_MAP.grow = '1 0', _FLEX_MAP.shrink = '0 1', _FLEX_MAP);\nvar flexGrowShrinkProp = function flexGrowShrinkProp(flex) {\n if (typeof flex === 'boolean' || typeof flex === 'string') {\n return FLEX_MAP[flex];\n }\n return (flex.grow ? flex.grow : 0) + \" \" + (flex.shrink ? flex.shrink : 0);\n};\nvar flexStyle = css([\"flex:\", \";\"], function (props) {\n return \"\" + flexGrowShrinkProp(props.flex) + (props.flex !== true && !props.basis ? ' auto' : '');\n});\nvar JUSTIFY_MAP = {\n around: 'space-around',\n between: 'space-between',\n center: 'center',\n end: 'flex-end',\n evenly: 'space-evenly',\n start: 'flex-start'\n};\nvar justifyStyle = css([\"justify-content:\", \";\"], function (props) {\n return JUSTIFY_MAP[props.justify];\n});\nvar WRAP_MAP = {\n \"true\": 'wrap',\n reverse: 'wrap-reverse'\n};\nvar wrapStyle = css([\"flex-wrap:\", \";\"], function (props) {\n return WRAP_MAP[props.wrapProp];\n});\nvar animationItemStyle = function animationItemStyle(item, theme) {\n if (typeof item === 'string') {\n return animationObjectStyle({\n type: item\n }, theme);\n }\n if (Array.isArray(item)) {\n return item.reduce(function (style, a, index) {\n return css([\"\", \"\", \" \", \"\"], style, index > 0 ? ',' : '', animationItemStyle(a, theme));\n }, '');\n }\n if (typeof item === 'object') {\n return animationObjectStyle(item, theme);\n }\n return '';\n};\nvar animationAncilaries = function animationAncilaries(animation) {\n if (animation.type === 'flipIn' || animation.type === 'flipOut') {\n return 'perspective: 1000px; transform-style: preserve-3d;';\n }\n return '';\n};\nvar animationObjectInitialStyle = function animationObjectInitialStyle(animation) {\n var bounds = animationBounds(animation.type, animation.size);\n if (bounds) {\n return bounds[0] + \" \" + animationAncilaries(animation);\n }\n return '';\n};\nvar animationInitialStyle = function animationInitialStyle(item) {\n if (typeof item === 'string') {\n return animationObjectInitialStyle({\n type: item\n });\n }\n if (Array.isArray(item)) {\n return item.map(function (a) {\n return typeof a === 'string' ? animationObjectInitialStyle({\n type: a\n }) : animationObjectInitialStyle(a);\n }).join('');\n }\n if (typeof item === 'object') {\n return animationObjectInitialStyle(item);\n }\n return '';\n};\nvar animationStyle = css([\"\", \";\"], function (props) {\n return css([\"\", \" animation:\", \";\"], animationInitialStyle(props.animation), animationItemStyle(props.animation, props.theme));\n});\nvar interactiveStyle = css([\"cursor:pointer;&:hover{\", \" \", \"}\"], function (props) {\n var _props$kindProp;\n return ((_props$kindProp = props.kindProp) == null ? void 0 : _props$kindProp.hover) && getHoverIndicatorStyle(props.kindProp.hover, props.theme);\n}, function (props) {\n return props.hoverIndicator && getHoverIndicatorStyle(props.hoverIndicator, props.theme);\n});\nvar gapStyle = function gapStyle(directionProp, gap, responsive, wrap, theme) {\n var metric = theme.global.edgeSize[gap] || gap;\n var breakpoint = getBreakpointStyle(theme, theme.box.responsiveBreakpoint);\n var responsiveMetric = responsive && breakpoint && breakpoint.edgeSize[gap];\n var styles = [];\n if (directionProp === 'column' || directionProp === 'column-reverse') {\n styles.push(\"row-gap: \" + metric + \";\");\n if (responsiveMetric) {\n styles.push(breakpointStyle(breakpoint, \"row-gap: \" + responsiveMetric + \";\"));\n }\n } else {\n styles.push(\"column-gap: \" + metric + \";\");\n if (wrap) styles.push(\"row-gap: \" + metric + \";\");\n if (responsiveMetric) {\n if (directionProp === 'row' || directionProp === 'row-reverse') {\n styles.push(breakpointStyle(breakpoint, \"column-gap: \" + responsiveMetric + \";\"));\n } else if (directionProp === 'row-responsive') {\n styles.push(breakpointStyle(breakpoint, \"\\n row-gap: \" + responsiveMetric + \";\\n \"));\n }\n }\n }\n return styles;\n};\n\n// NOTE: basis must be after flex! Otherwise, flex overrides basis\nvar StyledBox = styled.div.withConfig({\n displayName: \"StyledBox\",\n componentId: \"sc-13pk1d4-0\"\n})([\"display:flex;box-sizing:border-box;\", \";\", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], function (props) {\n return !props.basis && 'max-width: 100%;';\n}, genericStyles, function (props) {\n return props.align && alignStyle;\n}, function (props) {\n return props.alignContent && alignContentStyle;\n}, function (props) {\n return props.background && backgroundStyle(props.background, props.theme);\n}, function (props) {\n return props.border && borderStyle(props.border, props.responsive, props.theme);\n}, function (props) {\n return props.directionProp && directionStyle(props.directionProp, props.theme);\n}, function (props) {\n return props.heightProp && heightStyle(props.heightProp, props.theme);\n}, function (props) {\n return props.widthProp && widthStyle(props.widthProp, props.theme);\n}, function (props) {\n return props.flex !== undefined && flexStyle;\n}, function (props) {\n return props.basis && basisStyle;\n}, function (props) {\n return props.fillProp && fillStyle(props.fillProp);\n}, function (props) {\n return props.justify && justifyStyle;\n}, function (props) {\n return props.pad && edgeStyle('padding', props.pad, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return props.round && roundStyle(props.round, props.responsive, props.theme);\n}, function (props) {\n return props.wrapProp && wrapStyle;\n}, function (props) {\n return props.overflowProp && overflowStyle(props.overflowProp);\n}, function (props) {\n return props.elevationProp && elevationStyle(props.elevationProp);\n}, function (props) {\n return props.gap && gapStyle(props.directionProp, props.gap, props.responsive, props.wrapProp, props.theme);\n}, function (props) {\n return props.animation && animationStyle;\n}, function (props) {\n return props.onClick && interactiveStyle;\n}, function (props) {\n return props.onClick && props.focus && props.focusIndicator !== false && focusStyle();\n}, function (props) {\n return props.theme.box && props.theme.box.extend;\n}, function (props) {\n return props.kindProp && props.kindProp.extend;\n});\nStyledBox.defaultProps = {};\nObject.setPrototypeOf(StyledBox.defaultProps, defaultProps);\nvar gapGapStyle = function gapGapStyle(directionProp, gap, responsive, border, theme) {\n var metric = theme.global.edgeSize[gap] || gap;\n var breakpoint = getBreakpointStyle(theme, theme.box.responsiveBreakpoint);\n var responsiveMetric = responsive && breakpoint && breakpoint.edgeSize[gap];\n var styles = [];\n if (directionProp === 'column' || directionProp === 'column-reverse') {\n styles.push(\"height: \" + metric + \";\");\n if (responsiveMetric) {\n styles.push(breakpointStyle(breakpoint, \"height: \" + responsiveMetric + \";\"));\n }\n } else {\n styles.push(\"width: \" + metric + \";\");\n if (responsiveMetric) {\n if (directionProp === 'row' || directionProp === 'row-reverse') {\n styles.push(breakpointStyle(breakpoint, \"width: \" + responsiveMetric + \";\"));\n } else if (directionProp === 'row-responsive') {\n styles.push(breakpointStyle(breakpoint, \"\\n width: auto;\\n height: \" + responsiveMetric + \";\\n \"));\n }\n }\n }\n if (border === 'between' || border && border.side === 'between') {\n var borderSize = border.size || 'xsmall';\n var borderMetric = theme.global.borderSize[borderSize] || borderSize;\n var borderOffset = parseMetricToNum(metric) / 2 - parseMetricToNum(borderMetric) / 2 + \"px\";\n var responsiveBorderMetric = responsive && breakpoint && (breakpoint.borderSize[borderSize] || borderSize);\n var responsiveBorderOffset = responsiveBorderMetric && parseMetricToNum(responsiveMetric || metric) / 2 - parseMetricToNum(responsiveBorderMetric) / 2 + \"px\";\n if (directionProp === 'column' || directionProp === 'column-reverse') {\n var adjustedBorder = typeof border === 'string' ? 'top' : _extends({}, border, {\n side: 'top'\n });\n styles.push(css([\"position:relative;&:after{content:'';position:absolute;width:100%;top:\", \";\", \"}\"], borderOffset, borderStyle(adjustedBorder, responsive, theme)));\n if (responsiveBorderOffset) {\n styles.push(breakpointStyle(breakpoint, \"\\n &:after {\\n content: '';\\n top: \" + responsiveBorderOffset + \";\\n }\"));\n }\n } else {\n var _adjustedBorder = typeof border === 'string' ? 'left' : _extends({}, border, {\n side: 'left'\n });\n styles.push(css([\"position:relative;&:after{content:'';position:absolute;height:100%;left:\", \";\", \"}\"], borderOffset, borderStyle(_adjustedBorder, directionProp !== 'row-responsive' && responsive, theme)));\n if (responsiveBorderOffset) {\n if (directionProp === 'row' || directionProp === 'row-reverse') {\n styles.push(breakpointStyle(breakpoint, \"\\n &:after {\\n content: '';\\n left: \" + responsiveBorderOffset + \";\\n }\"));\n } else if (directionProp === 'row-responsive') {\n var adjustedBorder2 = typeof border === 'string' ? 'top' : _extends({}, border, {\n side: 'top'\n });\n styles.push(breakpointStyle(breakpoint, \"\\n &:after {\\n content: '';\\n height: auto;\\n left: unset;\\n width: 100%;\\n top: \" + responsiveBorderOffset + \";\\n border-left: none;\\n \" + responsiveBorderStyle(adjustedBorder2, theme) + \"\\n }\"));\n }\n }\n }\n }\n return styles;\n};\nvar StyledBoxGap = styled.div.withConfig({\n displayName: \"StyledBox__StyledBoxGap\",\n componentId: \"sc-13pk1d4-1\"\n})([\"flex:0 0 auto;align-self:stretch;\", \";\"], function (props) {\n return props.gap && gapGapStyle(props.directionProp, props.gap, props.responsive, props.border, props.theme);\n});\nStyledBoxGap.defaultProps = {};\nObject.setPrototypeOf(StyledBoxGap.defaultProps, defaultProps);\nexport { StyledBox, StyledBoxGap };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { animationPropType, backgroundDoc, elevationPropType, genericProps, heightPropType, hoverIndicatorPropType, padPropType, roundPropType, skeletonPropType, widthPropType } from '../../utils/general-prop-types';\nvar OVERFLOW_VALUES = ['auto', 'hidden', 'scroll', 'visible'];\nvar BORDER_SHAPE = PropTypes.shape({\n color: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n })]),\n side: PropTypes.oneOf(['top', 'left', 'bottom', 'right', 'start', 'end', 'horizontal', 'vertical', 'all', 'between']),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n style: PropTypes.oneOf(['solid', 'dashed', 'dotted', 'double', 'groove', 'ridge', 'inset', 'outset', 'hidden'])\n});\n\n// if you update values here, make sure to update in Drop/doc too.\nvar overflowPropType = PropTypes.oneOfType([PropTypes.oneOf(OVERFLOW_VALUES), PropTypes.shape({\n horizontal: PropTypes.oneOf(OVERFLOW_VALUES),\n vertical: PropTypes.oneOf(OVERFLOW_VALUES)\n}), PropTypes.string]);\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n align: PropTypes.oneOfType([PropTypes.oneOf(['baseline', 'center', 'end', 'start', 'stretch']), PropTypes.string]),\n alignContent: PropTypes.oneOfType([PropTypes.oneOf(['around', 'baseline', 'between', 'center', 'evenly', 'end', 'start', 'stretch']), PropTypes.string]),\n animation: animationPropType,\n background: backgroundDoc,\n basis: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', 'full', '1/2', '1/3', '2/3', '1/4', '2/4', '3/4', 'auto']), PropTypes.string]),\n border: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['top', 'left', 'bottom', 'right', 'start', 'end', 'horizontal', 'vertical', 'all', 'between']), BORDER_SHAPE, PropTypes.arrayOf(BORDER_SHAPE)]),\n direction: PropTypes.oneOf(['row', 'column', 'row-responsive', 'row-reverse', 'column-reverse']),\n elevation: elevationPropType,\n flex: PropTypes.oneOfType([PropTypes.oneOf(['grow', 'shrink']), PropTypes.bool, PropTypes.shape({\n grow: PropTypes.number,\n shrink: PropTypes.number\n })]),\n fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),\n focusIndicator: PropTypes.bool,\n gap: PropTypes.oneOfType([PropTypes.oneOf(['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n height: heightPropType,\n hoverIndicator: hoverIndicatorPropType,\n justify: PropTypes.oneOf(['around', 'between', 'center', 'end', 'evenly', 'start', 'stretch']),\n onClick: PropTypes.func,\n overflow: overflowPropType,\n pad: padPropType,\n responsive: PropTypes.bool,\n round: roundPropType,\n skeleton: skeletonPropType,\n tag: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.elementType]),\n width: widthPropType,\n wrap: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['reverse'])])\n });\n}\nexport var BoxPropTypes = PropType;","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps, heightPropType, padPropType, roundPropType, skeletonColorsPropType, widthPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]),\n colors: skeletonColorsPropType,\n height: heightPropType,\n pad: padPropType,\n round: roundPropType,\n width: widthPropType\n });\n}\nexport var SkeletonPropTypes = PropType;","import React, { useContext } from 'react';\nexport var SkeletonContext = /*#__PURE__*/React.createContext();\nexport var useSkeleton = function useSkeleton() {\n return useContext(SkeletonContext);\n};","import styled from 'styled-components';\nimport { backgroundStyle, edgeStyle, genericStyles, heightStyle, roundStyle, widthStyle } from '../../utils';\n\n// Styling a div directly rather than just using\n// a Box since Box itself will react to a SkeletonContext\n// and we don't want that here.\nexport var StyledSkeleton = styled.div.withConfig({\n displayName: \"StyledSkeleton\",\n componentId: \"sc-1omqm6u-0\"\n})([\"display:flex;box-sizing:border-box;\", \" \", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return props.background && backgroundStyle(props.background, props.theme);\n}, function (props) {\n var _props$theme$text;\n return heightStyle(props.heightProp || ((_props$theme$text = props.theme.text) == null || (_props$theme$text = _props$theme$text.medium) == null ? void 0 : _props$theme$text.height), props.theme);\n}, function (props) {\n return widthStyle(props.widthProp || '100%', props.theme);\n}, function (props) {\n return props.pad && edgeStyle('padding', props.pad, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return props.round && roundStyle(props.round, props.responsive, props.theme);\n});","var _excluded = [\"as\", \"colors\", \"width\", \"height\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { SkeletonPropTypes } from './propTypes';\nimport { useSkeleton } from './SkeletonContext';\nimport { StyledSkeleton } from './StyledSkeleton';\nvar Skeleton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _theme$skeleton;\n var as = _ref.as,\n colorsProp = _ref.colors,\n widthProp = _ref.width,\n heightProp = _ref.height,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var skeleton = useSkeleton();\n var depth = (skeleton == null ? void 0 : skeleton.depth) || 0;\n var colors = colorsProp || (theme == null || (_theme$skeleton = theme.skeleton) == null ? void 0 : _theme$skeleton.colors);\n var themeColors = colors[theme.dark ? 'dark' : 'light'];\n var background = themeColors[(depth + 1) % themeColors.length];\n return /*#__PURE__*/React.createElement(StyledSkeleton, _extends({\n ref: ref,\n as: as,\n background: background,\n widthProp: widthProp,\n heightProp: heightProp\n }, rest));\n});\nSkeleton.displayName = 'Skeleton';\nSkeleton.propTypes = SkeletonPropTypes;\nexport { Skeleton };","export { Skeleton } from './Skeleton';\nexport * from './SkeletonContext';","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.func\n };\n}\nexport var AnnounceContextPropTypes = PropType;","import React from 'react';\nimport { AnnounceContextPropTypes } from './propTypes';\nvar createAnnouncer = function createAnnouncer() {\n var announcer = document.createElement('div');\n announcer.id = 'grommet-announcer';\n announcer.style.left = '-100%';\n announcer.style.right = '100%';\n announcer.style.position = 'fixed';\n announcer.style['z-index'] = '-1';\n document.body.insertBefore(announcer, document.body.firstChild);\n return announcer;\n};\nexport var AnnounceContext = /*#__PURE__*/React.createContext(function (message, mode, timeout) {\n if (mode === void 0) {\n mode = 'polite';\n }\n if (timeout === void 0) {\n timeout = 500;\n }\n // we only create a new container if we don't have one already\n // we create a separate node so that grommet does not set aria-hidden to it\n var announcer = document.body.querySelector(\"#grommet-announcer[aria-live]\") || createAnnouncer();\n announcer.setAttribute('aria-live', 'off');\n announcer.innerHTML = message;\n announcer.setAttribute('aria-live', mode);\n setTimeout(function () {\n announcer.innerHTML = '';\n }, timeout);\n});\nAnnounceContext.propTypes = AnnounceContextPropTypes;","import React from 'react';\nexport var OptionsContext = /*#__PURE__*/React.createContext({});","var _excluded = [\"a11yTitle\", \"background\", \"border\", \"children\", \"cssGap\", \"direction\", \"elevation\", \"fill\", \"gap\", \"kind\", \"onBlur\", \"onClick\", \"onFocus\", \"overflow\", \"responsive\", \"tag\", \"as\", \"wrap\", \"width\", \"height\", \"tabIndex\", \"skeleton\"],\n _excluded2 = [\"colors\", \"size\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { Children, forwardRef, useContext, useEffect, useMemo, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { backgroundIsDark } from '../../utils';\nimport { Keyboard } from '../Keyboard';\nimport { StyledBox, StyledBoxGap } from './StyledBox';\nimport { BoxPropTypes } from './propTypes';\nimport { SkeletonContext, useSkeleton } from '../Skeleton';\nimport { AnnounceContext } from '../../contexts/AnnounceContext';\nimport { OptionsContext } from '../../contexts/OptionsContext';\nvar Box = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n backgroundProp = _ref.background,\n border = _ref.border,\n children = _ref.children,\n cssGap = _ref.cssGap,\n _ref$direction = _ref.direction,\n direction = _ref$direction === void 0 ? 'column' : _ref$direction,\n elevation = _ref.elevation,\n fill = _ref.fill,\n gap = _ref.gap,\n kind = _ref.kind,\n _onBlur = _ref.onBlur,\n onClick = _ref.onClick,\n _onFocus = _ref.onFocus,\n overflow = _ref.overflow,\n _ref$responsive = _ref.responsive,\n responsive = _ref$responsive === void 0 ? true : _ref$responsive,\n tag = _ref.tag,\n as = _ref.as,\n wrap = _ref.wrap,\n width = _ref.width,\n height = _ref.height,\n tabIndex = _ref.tabIndex,\n skeletonProp = _ref.skeleton,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n // boxOptions was created to preserve backwards compatibility but\n // should not be supported in v3\n var _useContext = useContext(OptionsContext),\n boxOptions = _useContext.box;\n var skeleton = useSkeleton();\n var background = backgroundProp;\n var announce = useContext(AnnounceContext);\n useEffect(function () {\n var _skeletonProp$message;\n if (skeletonProp != null && (_skeletonProp$message = skeletonProp.message) != null && _skeletonProp$message.start) announce(skeletonProp.message.start);else if (typeof (skeletonProp == null ? void 0 : skeletonProp.message) === 'string') announce(skeletonProp.message);\n return function () {\n var _skeletonProp$message2;\n return (skeletonProp == null || (_skeletonProp$message2 = skeletonProp.message) == null ? void 0 : _skeletonProp$message2.end) && announce(skeletonProp.message.end);\n };\n }, [announce, skeletonProp]);\n var focusable = useMemo(function () {\n return onClick && !(tabIndex < 0);\n }, [onClick, tabIndex]);\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n var clickProps = useMemo(function () {\n if (focusable) {\n return {\n onClick: onClick,\n onFocus: function onFocus(event) {\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n }\n };\n }\n var result = {};\n if (_onBlur) result.onBlur = _onBlur;\n if (onClick) result.onClick = onClick;\n if (_onFocus) result.onFocus = _onFocus;\n return result;\n }, [focusable, onClick, _onFocus, _onBlur]);\n var adjustedTabIndex = useMemo(function () {\n if (tabIndex !== undefined) return tabIndex;\n if (focusable) return 0;\n return undefined;\n }, [focusable, tabIndex]);\n if ((border === 'between' || border && border.side === 'between' || Array.isArray(border) && border.find(function (b) {\n return b.side === 'between';\n })) && !gap) {\n console.warn('Box must have a gap to use border between');\n }\n var contents = children;\n if (gap && gap !== 'none' && (!(boxOptions != null && boxOptions.cssGap || cssGap) ||\n // need this approach to show border between\n border === 'between' || (border == null ? void 0 : border.side) === 'between' || Array.isArray(border) && border.find(function (b) {\n return b.side === 'between';\n }))) {\n // if border is an array, we need to extract the border between object\n var styledBoxGapBorder = Array.isArray(border) ? border.find(function (b) {\n return b.side === 'between';\n }) : border;\n var boxAs = !as && tag ? tag : as;\n contents = [];\n var firstIndex;\n Children.forEach(children, function (child, index) {\n if (child) {\n if (firstIndex === undefined) {\n firstIndex = index;\n } else {\n contents.push( /*#__PURE__*/React.createElement(StyledBoxGap\n // eslint-disable-next-line react/no-array-index-key\n , {\n key: \"gap-\" + index,\n as: boxAs === 'span' ? boxAs : 'div',\n gap: gap,\n directionProp: direction,\n responsive: responsive,\n border: styledBoxGapBorder\n }));\n }\n }\n contents.push(child);\n });\n }\n var nextSkeleton = useMemo(function () {\n // Decide if we need to add a new SkeletonContext. We need one if:\n // 1. skeleton info was set in a property OR\n // 2. there already is a SkeletonContext but this box has a\n // background or border. This means the box probably is more\n // distinguishable from the area around it.\n // We keep track of a depth so we know how to alternate backgrounds.\n if (skeletonProp || (background || border) && skeleton) {\n var depth = skeleton ? skeleton.depth + 1 : 0;\n return _extends({}, skeleton, {\n depth: depth\n }, typeof skeletonProp === 'object' ? skeletonProp : {});\n }\n return undefined;\n }, [background, border, skeleton, skeletonProp]);\n var skeletonProps = {};\n if (nextSkeleton) {\n var _theme$skeleton = theme.skeleton,\n skeletonThemeColors = _theme$skeleton.colors,\n skeletonThemeSize = _theme$skeleton.size,\n skeletonThemeProps = _objectWithoutPropertiesLoose(_theme$skeleton, _excluded2);\n var skeletonColors = nextSkeleton.colors ? nextSkeleton.colors[theme.dark ? 'dark' : 'light'] : skeletonThemeColors == null ? void 0 : skeletonThemeColors[theme.dark ? 'dark' : 'light'];\n skeletonProps = _extends({}, skeletonThemeProps);\n background = skeletonColors[nextSkeleton.depth % skeletonColors.length];\n if (skeletonProp != null && skeletonProp.animation) {\n skeletonProps.animation = skeletonProp.animation;\n }\n contents = /*#__PURE__*/React.createElement(SkeletonContext.Provider, {\n value: nextSkeleton\n }, contents);\n }\n\n // construct a new theme object in case we have a background that wants\n // to change the background color context\n var nextTheme = useMemo(function () {\n var result;\n if (background || theme.darkChanged) {\n var dark = backgroundIsDark(background, theme);\n var darkChanged = dark !== undefined && dark !== theme.dark;\n if (darkChanged || theme.darkChanged) {\n result = _extends({}, theme);\n result.dark = dark === undefined ? theme.dark : dark;\n result.background = background;\n } else if (background) {\n // This allows DataTable to intelligently set the background\n // of a pinned header or footer.\n result = _extends({}, theme);\n result.background = background;\n }\n }\n return result || theme;\n }, [background, theme]);\n var content = /*#__PURE__*/React.createElement(StyledBox, _extends({\n as: !as && tag ? tag : as,\n \"aria-label\": a11yTitle,\n background: background,\n border: border,\n ref: ref,\n directionProp: direction,\n elevationProp: elevation,\n fillProp: fill,\n focus: focus,\n gap: ((boxOptions == null ? void 0 : boxOptions.cssGap) || cssGap) && gap && gap !== 'none' && border !== 'between' && (border == null ? void 0 : border.side) !== 'between' && (!Array.isArray(border) || !border.find(function (b) {\n return b.side === 'between';\n })) && gap,\n kindProp: kind,\n overflowProp: overflow,\n wrapProp: wrap,\n widthProp: width,\n heightProp: height,\n responsive: responsive,\n tabIndex: adjustedTabIndex\n }, clickProps, rest, skeletonProps), /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: nextTheme\n }, contents));\n if (onClick) {\n content = /*#__PURE__*/React.createElement(Keyboard, {\n onEnter: onClick\n }, content);\n }\n return content;\n});\nBox.displayName = 'Box';\nBox.propTypes = BoxPropTypes;\nexport { Box };","import { createContext } from 'react';\nexport var AccordionContext = /*#__PURE__*/createContext({});","var _excluded = [\"activeIndex\", \"animate\", \"children\", \"level\", \"multiple\", \"onActive\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { Children, forwardRef, useCallback, useState } from 'react';\nimport { AccordionPropTypes } from './propTypes';\nimport { Box } from '../Box';\nimport { AccordionContext } from './AccordionContext';\nvar activeAsArray = function activeAsArray(active) {\n return typeof active === 'number' ? [active] : active;\n};\nvar Accordion = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var activeIndex = _ref.activeIndex,\n _ref$animate = _ref.animate,\n animate = _ref$animate === void 0 ? true : _ref$animate,\n children = _ref.children,\n level = _ref.level,\n multiple = _ref.multiple,\n onActive = _ref.onActive,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useState = useState([]),\n activeIndexes = _useState[0],\n setActiveIndexes = _useState[1];\n var _useState2 = useState(),\n stateActiveIndex = _useState2[0],\n setStateActiveIndex = _useState2[1];\n\n // Derived state from props\n // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n var derivedActiveIndexes = activeAsArray(activeIndex) || [];\n if ((typeof activeIndex !== 'undefined' || activeIndex !== stateActiveIndex) && derivedActiveIndexes.join() !== activeIndexes.join()) {\n setActiveIndexes(derivedActiveIndexes);\n setStateActiveIndex(activeIndex);\n }\n var getAccordionContext = useCallback(function (index) {\n var _onPanelChange = function onPanelChange(nextIndex) {\n var nextActiveIndexes = [].concat(activeIndexes || []);\n var nextActiveIndex = nextActiveIndexes.indexOf(nextIndex);\n if (nextActiveIndex > -1) {\n nextActiveIndexes.splice(nextActiveIndex, 1);\n } else if (multiple) {\n nextActiveIndexes.push(nextIndex);\n } else {\n nextActiveIndexes = [nextIndex];\n }\n setActiveIndexes(nextActiveIndexes);\n if (onActive) {\n onActive(nextActiveIndexes);\n }\n };\n return {\n active: activeIndexes.indexOf(index) > -1,\n animate: animate,\n level: level,\n onPanelChange: function onPanelChange() {\n return _onPanelChange(index);\n }\n };\n }, [activeIndexes, animate, level, multiple, onActive]);\n return /*#__PURE__*/React.createElement(Box, _extends({\n ref: ref\n }, rest), Children.toArray(children).filter(function (child) {\n return child;\n }).map(function (child, index) {\n return /*#__PURE__*/React.createElement(AccordionContext.Provider, {\n // eslint-disable-next-line react/no-array-index-key\n key: index,\n value: getAccordionContext(index)\n }, child);\n }));\n});\nAccordion.propTypes = AccordionPropTypes;\nexport { Accordion };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { backgroundPropType, genericProps, colorPropType, hoverIndicatorPropType, padPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.node]),\n active: PropTypes.bool,\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.elementType]),\n badge: PropTypes.oneOfType([PropTypes.bool, PropTypes.element, PropTypes.number, PropTypes.shape({\n background: backgroundPropType,\n max: PropTypes.number,\n value: PropTypes.oneOfType([PropTypes.bool, PropTypes.number])\n })]),\n busy: PropTypes.bool,\n color: colorPropType,\n disabled: PropTypes.bool,\n fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),\n focusIndicator: PropTypes.bool,\n gap: PropTypes.oneOfType([PropTypes.oneOf(['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n hoverIndicator: hoverIndicatorPropType,\n href: PropTypes.string,\n icon: PropTypes.element,\n justify: PropTypes.oneOf(['around', 'between', 'center', 'end', 'evenly', 'start', 'stretch']),\n label: PropTypes.node,\n messages: PropTypes.shape({\n busy: PropTypes.string,\n success: PropTypes.string\n }),\n onClick: PropTypes.func,\n pad: padPropType,\n plain: PropTypes.bool,\n primary: PropTypes.bool,\n reverse: PropTypes.bool,\n secondary: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n success: PropTypes.bool,\n target: PropTypes.oneOfType([PropTypes.oneOf(['_self', '_blank', '_parent', '_top']), PropTypes.string]),\n tip: PropTypes.oneOfType([PropTypes.shape({\n content: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),\n dropProps: PropTypes.shape({}),\n plain: PropTypes.bool\n }), PropTypes.string]),\n type: PropTypes.oneOf(['button', 'reset', 'submit'])\n });\n}\nexport var ButtonPropTypes = PropType;","import React from 'react';\nimport defaultMessages from '../../languages/default.json';\n\n// options:\n// id: message id\n// messages: (optional) an object of message overrides\n// values: (optional) currently unused but in the future\n// will be an object with substitution values for\n// positional variables in the message text.\n// defaultMessage: (optional) default message to use if\n// the message isn't found elsewhere.\nvar _format = function format(options, messages) {\n var _options$id;\n // Message id's are hierarchical. For the component-specific\n // message objects passed as options.messages, just use the last\n // component in the id for backwards compatibility.\n //\n // For overall messages passed to grommet, use the hierarchical\n // id. For that messages object, the messages are in an object\n // hierarchy by component, similar to how the theme works.\n //\n // Applications that typically keep their messages in flat\n // objects with a single key string per message can override\n // this format function to get the grommet messages from\n // their bundles that way and don't need to pass the messages\n // themselves in this property, just the format function.\n var idParts = ((_options$id = options.id) == null ? void 0 : _options$id.split('.')) || [];\n // eslint-disable-next-line no-unsafe-optional-chaining\n var baseId = idParts[(idParts == null ? void 0 : idParts.length) - 1];\n var messageObj = messages;\n idParts.forEach(function (idPart) {\n if (typeof messageObj === 'object') {\n messageObj = messageObj[idPart];\n }\n });\n var message = (options.messages ? options.messages[baseId] : undefined) || messageObj || options.defaultMessage;\n var values = options.values;\n var newMessage = message;\n var tokens = message == null ? void 0 : message.match(/\\{(.+?)\\}/g);\n tokens == null ? void 0 : tokens.forEach(function (token) {\n var names = token.substr(1, token.length - 2);\n var value = values[names];\n newMessage = newMessage.replace(token, value);\n });\n return values ? newMessage : message;\n};\nexport { _format as format };\nvar defaultValue = {\n messages: defaultMessages,\n format: function format(options) {\n return _format(options, defaultMessages);\n }\n};\nexport var MessageContext = /*#__PURE__*/React.createContext(defaultValue);","import React from 'react';\nexport var ContainerTargetContext = /*#__PURE__*/React.createContext(typeof document === 'object' ? document.body : undefined);","import React from 'react';\n\n// When toggling aria-hidden values, we only want to affect elements\n// in the DOM that come from Grommet, so we track those elements in this\n// context value. See FocusedContainer.js\nexport var RootsContext = /*#__PURE__*/React.createContext([]);","var _excluded = [\"hidden\", \"restrictScroll\", \"children\", \"trapFocus\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useEffect, useRef, useState } from 'react';\nimport { makeNodeFocusable, makeNodeUnfocusable } from '../utils';\nimport { RootsContext } from '../contexts/RootsContext';\nexport var FocusedContainer = function FocusedContainer(_ref) {\n var _ref$hidden = _ref.hidden,\n hidden = _ref$hidden === void 0 ? false : _ref$hidden,\n _ref$restrictScroll = _ref.restrictScroll,\n restrictScroll = _ref$restrictScroll === void 0 ? false : _ref$restrictScroll,\n children = _ref.children,\n trapFocus = _ref.trapFocus,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useState = useState(''),\n bodyOverflowStyle = _useState[0],\n setBodyOverflowStyle = _useState[1];\n var ref = useRef(null);\n var roots = useContext(RootsContext);\n var _useState2 = useState(roots),\n nextRoots = _useState2[0],\n setNextRoots = _useState2[1];\n useEffect(function () {\n // make sure value of null is not added to array\n if (ref.current) setNextRoots([].concat(roots, [ref.current]));\n }, [roots]);\n useEffect(function () {\n if (bodyOverflowStyle !== 'hidden' && !hidden && restrictScroll && trapFocus) {\n setBodyOverflowStyle(document.body.style.overflow);\n document.body.style.overflow = 'hidden';\n }\n return function () {\n if (bodyOverflowStyle !== 'hidden' && !hidden && restrictScroll && trapFocus) {\n document.body.style.overflow = bodyOverflowStyle;\n }\n };\n }, [bodyOverflowStyle, hidden, trapFocus, restrictScroll]);\n useEffect(function () {\n var timer = setTimeout(function () {\n if (!hidden && trapFocus && roots && roots[0]) {\n roots.forEach(makeNodeUnfocusable);\n }\n }, 0);\n return function () {\n // remove trap and restore ability to focus on the last root only\n if (roots && roots[0]) makeNodeFocusable(roots[roots.length - 1]);\n clearTimeout(timer);\n };\n }, [hidden, roots, trapFocus]);\n return /*#__PURE__*/React.createElement(RootsContext.Provider, {\n value: nextRoots\n }, /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref,\n \"aria-hidden\": hidden\n }, rest), children));\n};","import styled, { keyframes } from 'styled-components';\nimport { baseStyle, edgeStyle, roundStyle } from '../../utils/styles';\nimport { backgroundStyle } from '../../utils/background';\nimport { defaultProps } from '../../default-props';\nfunction getTransformOriginStyle(align) {\n var vertical = 'top';\n if (align.bottom) {\n vertical = 'bottom';\n }\n var horizontal = 'left';\n if (align.right) {\n horizontal = 'right';\n }\n return vertical + \" \" + horizontal;\n}\nvar dropKeyFrames = keyframes([\"0%{opacity:0.5;transform:scale(0.8);}100%{opacity:1;transform:scale(1);}\"]);\n\n// The desired margin may be adjusted depending on drops alignment\nvar marginStyle = function marginStyle(theme, align, data, responsive, marginProp) {\n var margin = theme.global.edgeSize[data] || data;\n var adjustedMargin = {};\n // if user provides CSS string such as '50px 12px', apply that always\n var customCSS = typeof margin === 'string' && margin.split(' ').length > 1;\n if (theme.global.drop.intelligentMargin === true && !customCSS && typeof margin === 'string') {\n if (align.top === 'bottom') adjustedMargin.top = margin;else if (align.bottom === 'top') adjustedMargin.bottom = margin;\n if (align.right === 'left') adjustedMargin.left = \"-\" + margin;else if (align.left === 'right') adjustedMargin.left = margin;\n if (!Object.keys(adjustedMargin)) adjustedMargin = 'none';\n } else {\n return edgeStyle('margin', marginProp || theme.global.drop.margin, responsive, theme.global.edgeSize.responsiveBreakpoint, theme);\n }\n return edgeStyle('margin', adjustedMargin, responsive, theme.global.edgeSize.responsiveBreakpoint, theme);\n};\nvar StyledDrop = styled.div.withConfig({\n displayName: \"StyledDrop\",\n componentId: \"sc-16s5rx8-0\"\n})([\"\", \" \", \" position:fixed;z-index:\", \";outline:none;\", \" \", \" opacity:0;transform-origin:\", \";animation:\", \" 0.1s forwards;animation-delay:0.01s;@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){display:flex;align-items:stretch;}\", \"\"], baseStyle, function (props) {\n return !props.plain && (props.round && roundStyle(props.round, true, props.theme) || \"border-radius: \" + props.theme.global.drop.border.radius + \";\");\n}, function (props) {\n return props.theme.global.drop.zIndex;\n}, function (props) {\n return !props.plain && backgroundStyle(props.background || props.theme.global.drop.background, props.theme);\n}, function (props) {\n return !props.plain && (props.margin || props.theme.global.drop.margin) && props.theme.global && marginStyle(props.theme, props.alignProp, props.theme.global.drop.margin, props.responsive, props.margin);\n}, function (props) {\n return getTransformOriginStyle(props.alignProp);\n}, dropKeyFrames, function (props) {\n return props.theme.global.drop && props.theme.global.drop.extend;\n});\nStyledDrop.defaultProps = {};\nObject.setPrototypeOf(StyledDrop.defaultProps, defaultProps);\nexport { StyledDrop };","var _excluded = [\"a11yTitle\", \"aria-label\", \"align\", \"background\", \"onAlign\", \"children\", \"dropTarget\", \"elevation\", \"onClickOutside\", \"onEsc\", \"onKeyDown\", \"overflow\", \"plain\", \"responsive\", \"restrictFocus\", \"stretch\", \"trapFocus\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useEffect, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { ContainerTargetContext } from '../../contexts/ContainerTargetContext';\nimport { FocusedContainer } from '../FocusedContainer';\nimport { backgroundIsDark, findScrollParents, parseMetricToNum, PortalContext, useForwardedRef } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Keyboard } from '../Keyboard';\nimport { StyledDrop } from './StyledDrop';\n\n// using react synthetic event to be able to stop propagation that\n// would otherwise close the layer on ESC.\nvar preventLayerClose = function preventLayerClose(event) {\n var key = event.keyCode ? event.keyCode : event.which;\n if (key === 27) {\n event.stopPropagation();\n }\n};\nvar defaultAlign = {\n top: 'top',\n left: 'left'\n};\nvar DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n _ref$align = _ref.align,\n align = _ref$align === void 0 ? defaultAlign : _ref$align,\n background = _ref.background,\n onAlign = _ref.onAlign,\n children = _ref.children,\n dropTarget = _ref.dropTarget,\n elevation = _ref.elevation,\n onClickOutside = _ref.onClickOutside,\n onEsc = _ref.onEsc,\n onKeyDown = _ref.onKeyDown,\n _ref$overflow = _ref.overflow,\n overflow = _ref$overflow === void 0 ? 'auto' : _ref$overflow,\n plain = _ref.plain,\n _ref$responsive = _ref.responsive,\n responsive = _ref$responsive === void 0 ? true : _ref$responsive,\n restrictFocus = _ref.restrictFocus,\n _ref$stretch = _ref.stretch,\n stretch = _ref$stretch === void 0 ? 'width' : _ref$stretch,\n trapFocus = _ref.trapFocus,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var containerTarget = useContext(ContainerTargetContext);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var portalContext = useContext(PortalContext);\n var portalId = useMemo(function () {\n return portalContext.length;\n }, [portalContext]);\n var nextPortalContext = useMemo(function () {\n return [].concat(portalContext, [portalId]);\n }, [portalContext, portalId]);\n var dropRef = useForwardedRef(ref);\n useEffect(function () {\n var onClickDocument = function onClickDocument(event) {\n // determine which portal id the target is in, if any\n var clickedPortalId = null;\n var node = event.composed && event.composedPath()[0] || event.target;\n while (clickedPortalId === null && node && node !== document && !(node instanceof ShadowRoot)) {\n var attr = node.getAttribute('data-g-portal-id');\n if (attr !== null) clickedPortalId = parseInt(attr, 10);\n node = node.parentNode;\n }\n if (clickedPortalId === null || portalContext.indexOf(clickedPortalId) !== -1) {\n onClickOutside(event);\n }\n };\n if (onClickOutside) {\n document.addEventListener('mousedown', onClickDocument);\n }\n return function () {\n if (onClickOutside) {\n document.removeEventListener('mousedown', onClickDocument);\n }\n };\n }, [onClickOutside, containerTarget, portalContext]);\n useEffect(function () {\n var notifyAlign = function notifyAlign() {\n var _dropRef$current;\n var styleCurrent = dropRef == null || (_dropRef$current = dropRef.current) == null ? void 0 : _dropRef$current.style;\n var alignControl = (styleCurrent == null ? void 0 : styleCurrent.top) !== '' ? 'top' : 'bottom';\n onAlign(alignControl);\n };\n\n // We try to preserve the maxHeight as changing it causes any scroll\n // position to be lost. We set the maxHeight on mount and if the window\n // is resized.\n var place = function place(preserveHeight) {\n var windowWidth = window.innerWidth;\n var windowHeight = window.innerHeight;\n var target = (dropTarget == null ? void 0 : dropTarget.current) || dropTarget;\n var container = dropRef.current;\n if (container && target) {\n // clear prior styling\n container.style.left = '';\n container.style.top = '';\n container.style.bottom = '';\n container.style.width = '';\n if (!preserveHeight) {\n container.style.maxHeight = '';\n }\n // get bounds\n var targetRect = target.getBoundingClientRect();\n var containerRect = container.getBoundingClientRect();\n // determine width\n var width;\n if (stretch) {\n width = Math.min(stretch === 'align' ? Math.min(targetRect.width, containerRect.width) : Math.max(targetRect.width, containerRect.width), windowWidth);\n } else {\n width = Math.min(containerRect.width, windowWidth);\n }\n // set left position\n var left;\n if (align.left) {\n if (align.left === 'left') {\n left = targetRect.left;\n } else if (align.left === 'right') {\n left = targetRect.left + targetRect.width;\n }\n } else if (align.right) {\n if (align.right === 'left') {\n left = targetRect.left - width;\n } else if (align.right === 'right') {\n left = targetRect.left + targetRect.width - width;\n }\n } else {\n left = targetRect.left + targetRect.width / 2 - width / 2;\n }\n if (left + width > windowWidth) {\n left -= left + width - windowWidth;\n } else if (left < 0) {\n left = 0;\n }\n // set top or bottom position\n var top;\n var bottom;\n var maxHeight = containerRect.height;\n\n /* If responsive is true and the Drop doesn't have enough room \n to be fully visible and there is more room in the other \n direction, change the Drop to display above/below. If there is \n less room in the other direction leave the Drop in its current \n position. */\n if (responsive && (align.top === 'top' && targetRect.top < 0 || align.bottom === 'top' && targetRect.top - containerRect.height <= 0 && targetRect.bottom + containerRect.height < windowHeight)) {\n top = targetRect.bottom;\n maxHeight = top;\n } else if (responsive && (align.bottom === 'bottom' && targetRect.bottom > windowHeight || align.top === 'bottom' && targetRect.bottom + containerRect.height >= windowHeight && targetRect.top - containerRect.height > 0)) {\n bottom = targetRect.top;\n maxHeight = bottom;\n } else if (align.top === 'top') {\n top = targetRect.top;\n maxHeight = windowHeight - top;\n } else if (align.top === 'bottom') {\n top = targetRect.bottom;\n maxHeight = windowHeight - top;\n } else if (align.bottom === 'top') {\n bottom = targetRect.top;\n maxHeight = bottom;\n } else if (align.bottom === 'bottom') {\n bottom = targetRect.bottom;\n maxHeight = bottom;\n } else {\n top = targetRect.top + targetRect.height / 2 - containerRect.height / 2;\n }\n container.style.left = left + \"px\";\n if (stretch) {\n // offset width by 0.1 to avoid a bug in ie11 that\n // unnecessarily wraps the text if width is the same\n // NOTE: turned off for now\n container.style.width = width + 0.1 + \"px\";\n }\n // the (position:absolute + scrollTop)\n // is presenting issues with desktop scroll flickering\n if (top !== '') {\n container.style.top = top + \"px\";\n }\n if (bottom !== '') {\n container.style.bottom = windowHeight - bottom + \"px\";\n }\n if (!preserveHeight) {\n if (theme.drop && theme.drop.maxHeight) {\n maxHeight = Math.min(maxHeight, parseMetricToNum(theme.drop.maxHeight));\n }\n container.style.maxHeight = maxHeight + \"px\";\n }\n }\n if (onAlign) notifyAlign();\n };\n var scrollParents;\n var addScrollListeners = function addScrollListeners() {\n scrollParents = findScrollParents((dropTarget == null ? void 0 : dropTarget.current) || dropTarget);\n scrollParents.forEach(function (scrollParent) {\n return scrollParent.addEventListener('scroll', place);\n });\n };\n var removeScrollListeners = function removeScrollListeners() {\n scrollParents.forEach(function (scrollParent) {\n return scrollParent.removeEventListener('scroll', place);\n });\n scrollParents = [];\n };\n var onResize = function onResize() {\n removeScrollListeners();\n addScrollListeners();\n place(false);\n };\n addScrollListeners();\n window.addEventListener('resize', onResize);\n place(false);\n return function () {\n removeScrollListeners();\n window.removeEventListener('resize', onResize);\n };\n }, [align, containerTarget, onAlign, dropTarget, portalContext, portalId, responsive, restrictFocus, stretch, theme.drop, dropRef]);\n useEffect(function () {\n if (restrictFocus) {\n dropRef.current.focus();\n }\n }, [dropRef, restrictFocus]);\n var content = /*#__PURE__*/React.createElement(StyledDrop, _extends({\n \"aria-label\": a11yTitle || ariaLabel,\n ref: dropRef,\n as: Box,\n background: background,\n plain: plain,\n elevation: !plain ? elevation || theme.global.drop.elevation || theme.global.drop.shadowSize ||\n // backward compatibility\n 'small' : undefined,\n tabIndex: \"-1\",\n alignProp: align,\n overflow: overflow,\n \"data-g-portal-id\": portalId\n }, rest), children);\n var themeContextValue = useMemo(function () {\n var dark;\n if (background || theme.global.drop.background) {\n dark = backgroundIsDark(background || theme.global.drop.background, theme);\n }\n return _extends({}, theme, {\n dark: dark\n });\n }, [background, theme]);\n var dark = themeContextValue.dark;\n if (dark !== undefined && dark !== theme.dark) {\n content = /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: themeContextValue\n }, content);\n }\n return /*#__PURE__*/React.createElement(PortalContext.Provider, {\n value: nextPortalContext\n }, /*#__PURE__*/React.createElement(FocusedContainer, {\n onKeyDown: onEsc && preventLayerClose,\n trapFocus: trapFocus\n }, /*#__PURE__*/React.createElement(Keyboard\n // should capture keyboard event before other elements,\n // such as Layer\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n , {\n capture: true,\n onEsc: onEsc ? function (event) {\n event.stopPropagation();\n onEsc(event);\n } : undefined,\n onKeyDown: onKeyDown,\n target: \"document\"\n }, content)));\n});\nexport { DropContainer };","import PropTypes from 'prop-types';\nimport { backgroundDoc, roundPropType, marginProp, OVERFLOW_VALUES } from '../../utils/general-prop-types';\n\n// if you update values here, make sure to update in Box too.\nvar dropOverflowPropTypes = PropTypes.oneOfType([PropTypes.oneOf(OVERFLOW_VALUES), PropTypes.shape({\n horizontal: PropTypes.oneOf(OVERFLOW_VALUES),\n vertical: PropTypes.oneOf(OVERFLOW_VALUES)\n}), PropTypes.string]);\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n align: PropTypes.shape({\n top: PropTypes.oneOf(['top', 'bottom']),\n bottom: PropTypes.oneOf(['top', 'bottom']),\n right: PropTypes.oneOf(['left', 'right']),\n left: PropTypes.oneOf(['left', 'right'])\n }),\n background: backgroundDoc,\n elevation: PropTypes.oneOfType([PropTypes.oneOf(['none', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n inline: PropTypes.bool,\n margin: marginProp,\n onClickOutside: PropTypes.func,\n onEsc: PropTypes.func,\n overflow: dropOverflowPropTypes,\n plain: PropTypes.bool,\n responsive: PropTypes.bool,\n restrictFocus: PropTypes.bool,\n round: roundPropType,\n stretch: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['align'])]),\n target: PropTypes.object.isRequired,\n trapFocus: PropTypes.bool\n };\n}\nexport var DropPropTypes = PropType;","var _excluded = [\"inline\", \"restrictFocus\", \"target\", \"trapFocus\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useEffect, useState, useContext, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { getNewContainer, setFocusWithoutScroll } from '../../utils';\nimport { DropContainer } from './DropContainer';\nimport { ContainerTargetContext } from '../../contexts/ContainerTargetContext';\nimport { DropPropTypes } from './propTypes';\nvar Drop = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var inline = _ref.inline,\n restrictFocus = _ref.restrictFocus,\n dropTarget = _ref.target,\n _ref$trapFocus = _ref.trapFocus,\n trapFocus = _ref$trapFocus === void 0 ? true : _ref$trapFocus,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(),\n originalFocusedElement = _useState[0],\n setOriginalFocusedElement = _useState[1];\n useEffect(function () {\n return setOriginalFocusedElement(document.activeElement);\n }, []);\n var _useState2 = useState(),\n dropContainer = _useState2[0],\n setDropContainer = _useState2[1];\n var containerTarget = useContext(ContainerTargetContext);\n var containerChildNodesLength = useRef(null);\n useEffect(function () {\n // we need this condition to prevent getNewContainer to run multiple times\n // in the event that the component gets created, destroyed, and recreated.\n // see https://reactjs.org/docs/strict-mode.html#ensuring-reusable-state\n if (!(containerChildNodesLength != null && containerChildNodesLength.current)) {\n containerChildNodesLength.current = containerTarget.childNodes.length;\n setDropContainer(!inline ? getNewContainer(containerTarget) : undefined);\n }\n }, [containerTarget, inline]);\n\n // just a few things to clean up when the Drop is unmounted\n useEffect(function () {\n return function () {\n if (restrictFocus && originalFocusedElement) {\n if (originalFocusedElement.focus) {\n setFocusWithoutScroll(originalFocusedElement);\n } else if (originalFocusedElement.parentNode && originalFocusedElement.parentNode.focus) {\n // required for IE11 and Edge\n setFocusWithoutScroll(originalFocusedElement.parentNode);\n }\n }\n if (dropContainer) {\n containerTarget.removeChild(dropContainer);\n }\n };\n }, [containerTarget, dropContainer, originalFocusedElement, restrictFocus]);\n var content = /*#__PURE__*/React.createElement(DropContainer, _extends({\n ref: ref,\n dir: theme && theme.dir,\n dropTarget: dropTarget,\n restrictFocus: restrictFocus,\n trapFocus: trapFocus\n }, rest));\n if (inline) return content;\n if (dropContainer) return /*#__PURE__*/createPortal(content, dropContainer);\n return null;\n});\nDrop.displayName = 'Drop';\nDrop.propTypes = DropPropTypes;\nexport { Drop };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n content: PropTypes.node,\n dropProps: PropTypes.object,\n plain: PropTypes.bool\n };\n}\nexport var TipPropTypes = PropType;","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { Children, cloneElement, forwardRef, useContext, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Drop } from '../Drop';\nimport { useForwardedRef, useKeyboard } from '../../utils';\nimport { TipPropTypes } from './propTypes';\nvar Tip = /*#__PURE__*/forwardRef(function (_ref, tipRef) {\n var children = _ref.children,\n content = _ref.content,\n dropProps = _ref.dropProps,\n plain = _ref.plain;\n var theme = useContext(ThemeContext);\n var _useState = useState(false),\n over = _useState[0],\n setOver = _useState[1];\n var usingKeyboard = useKeyboard();\n var componentRef = useForwardedRef(tipRef);\n\n // Three use case for children\n // 1. Tip has a single child + it is a React Element => Great!\n // 2. Tip has a single child + not React Element =>\n // span will wrap the child so we can use ref and events.\n // 3. Tip has more than one child => Abort, display Children.only error\n var child = Children.count(children) <= 1 && ! /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.createElement(\"span\", null, children) || Children.only(children);\n var clonedChild = /*#__PURE__*/cloneElement(child, {\n onMouseEnter: function onMouseEnter(event) {\n var _child$props;\n setOver(true);\n if ((_child$props = child.props) != null && _child$props.onMouseEnter) child.props.onMouseEnter(event);\n },\n onMouseLeave: function onMouseLeave(event) {\n var _child$props2;\n setOver(false);\n if ((_child$props2 = child.props) != null && _child$props2.onMouseLeave) child.props.onMouseLeave(event);\n },\n onFocus: function onFocus(event) {\n var _child$props3;\n if (usingKeyboard) setOver(true);\n if ((_child$props3 = child.props) != null && _child$props3.onFocus) child.props.onFocus(event);\n },\n onBlur: function onBlur(event) {\n var _child$props4;\n if (usingKeyboard) setOver(false);\n if ((_child$props4 = child.props) != null && _child$props4.onBlur) child.props.onBlur(event);\n },\n key: 'tip-child',\n ref: function ref(node) {\n // https://github.com/facebook/react/issues/8873#issuecomment-287873307\n if (typeof componentRef === 'function') {\n componentRef(node);\n } else if (componentRef) {\n // eslint-disable-next-line no-param-reassign\n componentRef.current = node;\n }\n // Call the original ref, if any\n var callerRef = child.ref;\n if (typeof callerRef === 'function') {\n callerRef(node);\n } else if (callerRef) {\n callerRef.current = node;\n }\n }\n });\n return [clonedChild, over && /*#__PURE__*/React.createElement(Drop, _extends({\n target: componentRef.current,\n trapFocus: false,\n key: \"tip-drop\"\n }, theme.tip.drop, dropProps), plain ? content : /*#__PURE__*/React.createElement(Box, theme.tip.content, content))];\n});\nTip.displayName = 'Tip';\nTip.propTypes = TipPropTypes;\nexport { Tip };","/* eslint-disable no-restricted-imports */\nimport { useLayoutEffect as vanillaUseLayoutEffect, useEffect } from 'react';\n\n/**\n * A substitute for React's useLayoutEffect, which does not generate warnings on\n * SSR. It is named useLayoutEffect so that all eslint rules applying to the\n * original useLayoutEffect would also apply to it.\n * This solution was suggested by Alex Reardon.\n * @see https://medium.com/@alexandereardon/uselayouteffect-and-ssr-192986cdcf7a\n * @see https://github.com/grommet/grommet/issues/4765\n */\nexport var useLayoutEffect = typeof window !== 'undefined' ? vanillaUseLayoutEffect : useEffect;\nexport default useLayoutEffect;","import styled, { css } from 'styled-components';\nimport { genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar fillStyle = css([\"\", \" \", \" flex-grow:1;display:flex;\"], function (props) {\n return props.fillContainer === true || props.fillContainer === 'horizontal' ? \"\\n width: 100%;\\n max-width: none;\\n \" : '';\n}, function (props) {\n return props.fillContainer === true || props.fillContainer === 'vertical' ? 'height: 100%;' : '';\n});\nvar StyledStack = styled.div.withConfig({\n displayName: \"StyledStack\",\n componentId: \"sc-ajspsk-0\"\n})([\"position:relative;\", \" \", \" \", \"\"], genericStyles, function (props) {\n return props.fillContainer && fillStyle;\n}, function (props) {\n return props.theme.stack && props.theme.stack.extend;\n});\nStyledStack.defaultProps = {};\nObject.setPrototypeOf(StyledStack.defaultProps, defaultProps);\nvar styleMap = {\n fill: \"\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n \",\n center: \"\\n top: 50%;\\n left: 50%;\\n transform: translate(-50%, -50%);\\n \",\n left: \"\\n top: 50%;\\n left: 0;\\n transform: translateY(-50%);\\n \",\n right: \"\\n top: 50%;\\n right: 0;\\n transform: translateY(-50%);\\n \",\n top: \"\\n top: 0;\\n left: 50%;\\n transform: translateX(-50%);\\n \",\n bottom: \"\\n bottom: 0;\\n left: 50%;\\n transform: translateX(-50%);\\n \",\n 'top-left': \"\\n top: 0;\\n left: 0;\\n \",\n 'bottom-left': \"\\n bottom: 0;\\n left: 0;\\n \",\n 'top-right': \"\\n top: 0;\\n right: 0;\\n \",\n 'bottom-right': \"\\n bottom: 0;\\n right: 0;\\n \"\n};\nvar StyledStackLayer = styled.div.withConfig({\n displayName: \"StyledStack__StyledStackLayer\",\n componentId: \"sc-ajspsk-1\"\n})([\"position:\", \";\", \" \", \" \", \" \", \"\"], function (props) {\n return props.guiding ? 'relative' : 'absolute';\n}, function (props) {\n return props.guiding && 'display: block;';\n}, function (props) {\n return !props.guiding && styleMap[props.anchor || 'fill'] + \";\";\n}, function (props) {\n return props.fillContainer && \"\\n width: 100%;\\n height: 100%;\\n \";\n}, function (props) {\n return !props.interactive && \"pointer-events: none;\";\n});\nStyledStackLayer.defaultProps = {};\nObject.setPrototypeOf(StyledStackLayer.defaultProps, defaultProps);\nexport { StyledStack, StyledStackLayer };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n anchor: PropTypes.oneOf(['center', 'left', 'right', 'top', 'bottom', 'top-left', 'bottom-left', 'top-right', 'bottom-right']),\n fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),\n guidingChild: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['first', 'last'])]),\n interactiveChild: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['first', 'last'])])\n });\n}\nexport var StackPropTypes = PropType;","var _excluded = [\"anchor\", \"children\", \"fill\", \"guidingChild\", \"interactiveChild\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { Children, forwardRef } from 'react';\nimport { StyledStack, StyledStackLayer } from './StyledStack';\nimport { StackPropTypes } from './propTypes';\nvar buildStyledChildren = function buildStyledChildren(_ref) {\n var anchor = _ref.anchor,\n fill = _ref.fill,\n guidingIndex = _ref.guidingIndex,\n interactiveChild = _ref.interactiveChild,\n interactiveIndex = _ref.interactiveIndex;\n return function (child, index) {\n var interactive = interactiveChild === undefined || interactiveIndex === index;\n var isGuidingIndex = index === guidingIndex;\n var props = isGuidingIndex ? {\n guiding: true,\n fillContainer: fill\n } : {\n anchor: anchor\n };\n return /*#__PURE__*/React.createElement(StyledStackLayer, _extends({\n key: index,\n interactive: interactive\n }, props), child);\n };\n};\nvar Stack = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var anchor = _ref2.anchor,\n children = _ref2.children,\n fill = _ref2.fill,\n guidingChild = _ref2.guidingChild,\n interactiveChild = _ref2.interactiveChild,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n var prunedChildren = Children.toArray(children).filter(function (c) {\n return c;\n });\n var toChildIndex = function toChildIndex(child) {\n var index = child;\n if (index === 'first' || !index) index = 0;else if (index === 'last') index = prunedChildren.length - 1;\n return index;\n };\n var guidingIndex = toChildIndex(guidingChild);\n var interactiveIndex = interactiveChild && toChildIndex(interactiveChild);\n var styledChildren = prunedChildren.map(buildStyledChildren({\n anchor: anchor,\n fill: fill,\n guidingIndex: guidingIndex,\n interactiveChild: interactiveChild,\n interactiveIndex: interactiveIndex\n }));\n return /*#__PURE__*/React.createElement(StyledStack, _extends({\n ref: ref,\n fillContainer: fill\n }, rest), styledChildren);\n});\nStack.displayName = 'Stack';\nStack.propTypes = StackPropTypes;\nexport { Stack };","import styled, { css } from 'styled-components';\nimport { genericStyles, normalizeColor, textAlignStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar sizeStyle = function sizeStyle(props) {\n var size = props.size || 'medium';\n var data = props.theme.text[size];\n if (data) {\n return css([\"font-size:\", \";line-height:\", \";\"], data.size, data.height);\n }\n return css([\"font-size:\", \";line-height:normal;\"], size);\n};\nvar truncateStyle = \"\\n white-space: nowrap;\\n max-width: 100%;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n\";\nvar colorStyle = css([\"color:\", \";\"], function (props) {\n return normalizeColor(props.colorProp, props.theme);\n});\nvar weightStyle = css([\"font-weight:\", \";\"], function (props) {\n return props.weight;\n});\nvar wordBreakStyle = css([\"word-break:\", \";\"], function (props) {\n return props.wordBreak;\n});\nvar fontFamily = css([\"font-family:\", \";\"], function (props) {\n return props.theme.text.font.family;\n});\nvar StyledText = styled('span').withConfig({\n shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {\n return defaultValidatorFn(prop) && prop !== 'size';\n }\n}).withConfig({\n displayName: \"StyledText\",\n componentId: \"sc-1sadyjn-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return sizeStyle(props);\n}, function (props) {\n return props.textAlign && textAlignStyle;\n}, function (props) {\n return props.truncate && truncateStyle;\n}, function (props) {\n return props.colorProp && colorStyle;\n}, function (props) {\n return props.weight && weightStyle;\n}, function (props) {\n return props.wordBreak && wordBreakStyle;\n}, function (props) {\n return props.theme.text.font && props.theme.text.font.family && fontFamily;\n}, function (props) {\n return props.theme.text && props.theme.text.extend;\n});\nStyledText.defaultProps = {};\nObject.setPrototypeOf(StyledText.defaultProps, defaultProps);\nexport { StyledText };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { colorPropType, genericProps, MARGIN_SIZES, skeletonPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n color: colorPropType,\n margin: PropTypes.oneOfType([PropTypes.oneOf(['none'].concat(MARGIN_SIZES)), PropTypes.shape({\n bottom: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n end: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n left: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n right: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n start: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n top: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n vertical: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string])\n }), PropTypes.string]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', '2xl', '3xl', '4xl', '5xl', '6xl']), PropTypes.string]),\n skeleton: skeletonPropType,\n tag: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.element]),\n textAlign: PropTypes.oneOf(['start', 'center', 'end', 'justify']),\n tip: PropTypes.oneOfType([PropTypes.shape({\n content: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),\n dropProps: PropTypes.shape({}),\n plain: PropTypes.bool\n }), PropTypes.string]),\n truncate: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['tip'])]),\n weight: PropTypes.oneOfType([PropTypes.oneOf(['normal', 'bold', 'bolder', 'lighter']), PropTypes.number]),\n wordBreak: PropTypes.oneOf(['normal', 'break-all', 'keep-all', 'break-word'])\n });\n}\nexport var TextPropTypes = PropType;","var _excluded = [\"as\", \"size\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Skeleton } from '../Skeleton';\nvar TextSkeleton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var as = _ref.as,\n sizeProp = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var size = sizeProp || 'medium';\n var data = theme.text[size];\n var height = data ? data.size : sizeProp;\n return /*#__PURE__*/React.createElement(Skeleton, _extends({\n ref: ref,\n as: as,\n height: height\n }, theme.text.skeleton, rest));\n});\nTextSkeleton.displayName = 'TextSkeleton';\nexport { TextSkeleton };","import React from 'react';\nexport var TextContext = /*#__PURE__*/React.createContext({});","var _excluded = [\"children\", \"color\", \"tag\", \"as\", \"tip\", \"a11yTitle\", \"truncate\", \"size\", \"skeleton\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useMemo, useState } from 'react';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { StyledText } from './StyledText';\nimport { Tip } from '../Tip';\nimport { useForwardedRef } from '../../utils';\nimport { TextPropTypes } from './propTypes';\nimport { useSkeleton } from '../Skeleton';\nimport { TextSkeleton } from './TextSkeleton';\nimport { TextContext } from './TextContext';\nvar Text = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n color = _ref.color,\n tag = _ref.tag,\n as = _ref.as,\n tipProp = _ref.tip,\n _ref$a11yTitle = _ref.a11yTitle,\n a11yTitle = _ref$a11yTitle === void 0 ? typeof tipProp === 'string' && tipProp || (tipProp == null ? void 0 : tipProp.content) || undefined : _ref$a11yTitle,\n truncate = _ref.truncate,\n size = _ref.size,\n skeletonProp = _ref.skeleton,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var textRef = useForwardedRef(ref);\n var _useState = useState(false),\n textTruncated = _useState[0],\n setTextTruncated = _useState[1];\n var textContextValue = useMemo(function () {\n return {\n size: size\n };\n }, [size]);\n var skeleton = useSkeleton();\n useLayoutEffect(function () {\n var updateTip = function updateTip() {\n setTextTruncated(false);\n if (truncate === 'tip' && textRef.current && textRef.current.scrollWidth > textRef.current.offsetWidth) {\n setTextTruncated(true);\n }\n };\n window.addEventListener('resize', updateTip);\n window.addEventListener('pagechange', updateTip);\n updateTip();\n return function () {\n window.removeEventListener('resize', updateTip);\n window.removeEventListener('pagechange', updateTip);\n };\n }, [textRef, truncate]);\n if (skeleton) {\n return /*#__PURE__*/React.createElement(TextSkeleton, _extends({\n ref: ref,\n as: as,\n size: size\n }, skeletonProp, rest));\n }\n var styledTextResult = /*#__PURE__*/React.createElement(StyledText, _extends({\n as: !as && tag ? tag : as,\n colorProp: color,\n \"aria-label\": a11yTitle,\n truncate: truncate,\n size: size\n }, rest, {\n ref: textRef\n }), children !== undefined ? /*#__PURE__*/React.createElement(TextContext.Provider, {\n value: textContextValue\n }, children) : undefined);\n if (tipProp || textTruncated) {\n // place the text content in a tip if truncate === 'tip'\n // and the text has been truncated\n if (textTruncated) {\n return /*#__PURE__*/React.createElement(Tip, _extends({\n content: children\n }, tipProp), styledTextResult);\n }\n // place the text content in a tip if truncate !== 'tip'\n // it displays even if the text has not truncated\n if (truncate !== 'tip') {\n return /*#__PURE__*/React.createElement(Tip, tipProp, styledTextResult);\n }\n }\n return styledTextResult;\n});\nText.displayName = 'Text';\nText.defaultProps = {\n level: 1\n};\nText.propTypes = TextPropTypes;\nexport { Text };","import React, { useContext, useRef } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { parseMetricToNum } from '../../utils';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { Box } from '../Box';\nimport { Stack } from '../Stack';\nimport { Text } from '../Text';\nvar StyledBadgeContainer = styled(Box).withConfig({\n displayName: \"Badge__StyledBadgeContainer\",\n componentId: \"sc-1es4ws1-0\"\n})([\"\", \"\"], function (props) {\n return props.theme.button.badge.container.extend;\n});\nexport var Badge = function Badge(_ref) {\n var children = _ref.children,\n content = _ref.content;\n var theme = useContext(ThemeContext);\n var containerRef = useRef();\n var contentRef = useRef();\n var stackRef = useRef();\n var defaultBadgeDimension = typeof content === 'boolean' || content && content.value && typeof content.value === 'boolean' ? // empty badge should be smaller. this value was chosen as a default\n // after experimenting with various values\n parseMetricToNum(theme.button.badge.size.medium) / 2 + \"px\" : theme.button.badge.size.medium;\n\n // scale badge to fit its contents, leaving space horizontally\n // that is proportional to vertical space\n useLayoutEffect(function () {\n // when window resizes and hits a responsive breakpoint, width of the badge\n // can change (because pad is responsive, etc.). we want to recalculate\n // width since badge offset is reliant on its dimensions.\n var onResize = function onResize() {\n if (containerRef != null && containerRef.current) {\n containerRef.current.style.minHeight = '';\n containerRef.current.style.minWidth = '';\n if (contentRef != null && contentRef.current) {\n if (typeof content === 'number' || typeof content === 'object' && content.value) {\n containerRef.current.style.minHeight = defaultBadgeDimension;\n containerRef.current.style.minWidth = defaultBadgeDimension;\n var _contentRef$current$g = contentRef.current.getBoundingClientRect(),\n contentHeight = _contentRef$current$g.height,\n contentWidth = _contentRef$current$g.width;\n\n // only adjust the width if contentHeight > 0\n // jest returns 0 for all getBoundingClientRect values,\n // so this ensures snapshots are closer to correct values\n if (contentHeight) {\n // height of content includes extra space around font from\n // line-height. account for this extra space with 2.5 multiplier\n // to add proportional horizontal space\n var height = defaultBadgeDimension;\n var width = defaultBadgeDimension;\n var verticalSpace = (parseMetricToNum(height) - contentHeight) * 2.5;\n containerRef.current.style.minHeight = height;\n containerRef.current.style.minWidth = Math.max(parseMetricToNum(width), Math.ceil(contentWidth + verticalSpace)) + \"px\";\n }\n } else {\n // caller has provided custom JSX\n containerRef.current.style.minHeight = contentRef.current.getBoundingClientRect().width;\n containerRef.current.style.minWidth = contentRef.current.getBoundingClientRect().height;\n }\n } else {\n containerRef.current.style.minHeight = defaultBadgeDimension;\n containerRef.current.style.minWidth = defaultBadgeDimension;\n }\n }\n };\n window.addEventListener('resize', onResize);\n onResize();\n return function () {\n window.removeEventListener('resize', onResize);\n };\n }, [content, defaultBadgeDimension]);\n\n // offset the badge so it overlaps content\n useLayoutEffect(function () {\n if (stackRef != null && stackRef.current) {\n // when badge has content, offset should be 50%.\n // when badge is empty, offset by a smaller amount to keep the badge\n // closer to the content. this value was chosen as a reasonable default\n // after testing with various grommet icons.\n var offset = typeof content === 'boolean' || content && content.value === true ? '25%' : '50%';\n\n // second child of Stack is the div that receives absolute positioning\n // and contains our badge content\n stackRef.current.children[1].style.top = 0;\n stackRef.current.children[1].style.right = 0;\n // eslint-disable-next-line max-len\n stackRef.current.children[1].style.transform = \"translate(\" + offset + \", -\" + offset + \")\";\n stackRef.current.children[1].style.transformOrigin = '100% 0%';\n }\n }, [content]);\n var value;\n if (typeof content === 'number') value = content;else if (typeof content === 'object') value = content.value;\n var badge;\n if (typeof value === 'number' || typeof value === 'boolean' || typeof content === 'boolean') {\n if (typeof value === 'number') {\n var max = content.max || 9;\n badge = /*#__PURE__*/React.createElement(Text, {\n color: \"text-strong\",\n size: theme.button.badge.text.size.medium,\n weight: \"normal\",\n ref: contentRef\n }, value > max ? max + \"+\" : value);\n }\n badge = /*#__PURE__*/React.createElement(StyledBadgeContainer, {\n ref: containerRef,\n align: \"center\",\n background: content.background || theme.button.badge.container.background,\n flex: false,\n justify: \"center\",\n round: true,\n pad: !(typeof value === 'boolean' || typeof content === 'boolean') ? theme.button.badge.container.pad : undefined\n }, badge);\n // caller has provided their own JSX and we will just render that\n } else badge = /*#__PURE__*/React.createElement(Box, {\n ref: contentRef\n }, content);\n return /*#__PURE__*/React.createElement(Stack, {\n ref: stackRef,\n anchor: \"top-right\"\n }, children, badge);\n};","import styled, { css } from 'styled-components';\nimport { activeStyle, backgroundStyle, disabledStyle, edgeStyle, focusStyle, unfocusStyle, genericStyles, getHoverIndicatorStyle, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar radiusStyle = function radiusStyle(props) {\n // border.radius shouldn't impact an only-icon rendering.\n var isIconOnly = props.hasIcon && !props.hasLabel;\n var size = props.sizeProp;\n if (!isIconOnly && size && props.theme.button.size && props.theme.button.size[size]) {\n return props.theme.button.size[size].border.radius;\n }\n return props.theme.button.border.radius;\n};\nvar fontStyle = function fontStyle(props) {\n var size = props.sizeProp || 'medium';\n var data = props.theme.text[size];\n return css([\"font-size:\", \";line-height:\", \";\"], data.size, data.height);\n};\nvar padStyle = function padStyle(props) {\n var size = props.sizeProp;\n if (size && props.theme.button.size && props.theme.button.size[size]) {\n return css([\"\", \" \", \"\"], props.theme.button.size[size].pad.vertical, props.theme.button.size[size].pad.horizontal);\n }\n return css([\"\", \" \", \"\"], props.theme.button.padding.vertical, props.theme.button.padding.horizontal);\n};\nvar basicStyle = function basicStyle(props) {\n return css([\"border:\", \" solid \", \";border-radius:\", \";color:\", \";padding:\", \";\", \"\"], props.theme.button.border.width, normalizeColor(props.colorValue || props.theme.button.border.color || 'control', props.theme), radiusStyle(props), normalizeColor(props.theme.button.color || 'text', props.theme), padStyle(props), fontStyle(props));\n};\nvar primaryStyle = function primaryStyle(props) {\n return css([\"\", \" border-radius:\", \";\", \"\"], backgroundStyle(normalizeColor(props.colorValue || props.theme.button.primary && props.theme.button.primary.color || 'control', props.theme), props.theme, props.theme.button.color), radiusStyle(props), props.theme.button.primary && props.theme.button.primary.extend);\n};\nfunction getHoverColor(props) {\n if (props.colorValue) {\n return normalizeColor(props.colorValue, props.theme);\n }\n if (props.active && props.primary && props.theme.button.primary && props.theme.button.primary.active && props.theme.button.primary.active.border && props.theme.button.primary.active.border.color) {\n return normalizeColor(props.theme.button.primary.active.border.color, props.theme);\n }\n return normalizeColor(props.theme.button.border.color || 'control', props.theme);\n}\nvar hoverStyle = css([\"&:hover{\", \" \", \";}\"], function (props) {\n return props.hoverIndicator && getHoverIndicatorStyle(props.hoverIndicator, props.theme);\n}, function (props) {\n return !props.plain && css([\"box-shadow:0px 0px 0px 2px \", \";\"], getHoverColor(props));\n});\nvar fillStyle = function fillStyle(fillContainer) {\n if (fillContainer === 'horizontal') {\n return 'width: 100%;';\n }\n if (fillContainer === 'vertical') {\n return 'height: 100%;';\n }\n if (fillContainer) {\n return \"\\n width: 100%;\\n height: 100%;\\n max-width: none;\\n flex: 1 0 auto;\\n \";\n }\n return undefined;\n};\nvar plainStyle = function plainStyle(props) {\n return css([\"color:\", \";outline:none;border:none;padding:0;text-align:inherit;\"], normalizeColor(props.colorValue || 'inherit', props.theme));\n};\nvar activeButtonStyle = function activeButtonStyle(props) {\n return css([\"\", \" \", \" \", \"\"], activeStyle, props.primary && props.theme.button.primary && props.theme.button.primary.active && props.theme.button.primary.active.border && props.theme.button.primary.active.border.color && \"border: \" + props.theme.button.border.width + \" solid\\n \" + normalizeColor(props.theme.button.primary.active.border.color, props.theme) + \";\\n \", props.primary && props.theme.button.primary && props.theme.button.primary.active && props.theme.button.primary.active.extend);\n};\nvar disabledButtonStyle = function disabledButtonStyle(props) {\n return css([\"\", \" \", \" \", \" \", \"\"], disabledStyle(props.theme.button.disabled.opacity), !props.plain && props.theme.button.disabled.border && props.theme.button.disabled.border.color && \"border: \" + props.theme.button.border.width + \" solid\\n \" + normalizeColor(props.theme.button.disabled.border.color, props.theme) + \";\", props.theme.button.disabled.color && (\n // if primary button, apply disabled color to background. otherwise,\n // apply disabled color to the label\n props.primary ? backgroundStyle(normalizeColor(props.theme.button.disabled.color, props.theme), props.theme, props.theme.button.color) : \"color: \" + normalizeColor(props.theme.button.disabled.color, props.theme) + \";\"), props.theme.button.disabled && props.theme.button.disabled.extend);\n};\n\n// Deprecate props.theme.button.disabled.opacity in V3\nvar StyledButton = styled.button.withConfig({\n displayName: \"StyledButton\",\n componentId: \"sc-323bzc-0\"\n})([\"display:inline-block;box-sizing:border-box;cursor:pointer;font:inherit;text-decoration:none;margin:0;background:transparent;overflow:visible;text-transform:none;\", \" \", \" \", \" \", \" \", \" \", \" \", \" &:focus{\", \"}&:focus:not(:focus-visible){\", \"}\", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return props.plain && plainStyle(props);\n}, function (props) {\n return !props.plain && basicStyle(props);\n}, function (props) {\n return props.primary && primaryStyle(props);\n}, function (props) {\n return !props.disabled && !props.selected && !props.focus && !props.busy && !props.success && hoverStyle;\n}, function (props) {\n return !props.disabled && props.active && activeButtonStyle(props);\n}, function (props) {\n return props.disabled && props.theme.button && props.theme.button.disabled && disabledButtonStyle(props);\n}, function (props) {\n return (!props.plain || props.focusIndicator) && focusStyle();\n}, unfocusStyle(), function (props) {\n return !props.plain && props.theme.button.transition && \"\\n transition-property: \" + props.theme.button.transition.properties.join(',') + \";\\n transition-duration: \" + props.theme.button.transition.duration + \"s;\\n transition-timing-function: \" + props.theme.button.transition.timing + \";\\n \";\n}, function (props) {\n return props.fillContainer && fillStyle(props.fillContainer);\n}, function (props) {\n return props.hasIcon && !props.hasLabel && \"\\n line-height: 0;\\n \";\n}, function (props) {\n return props.pad === true && props.hasIcon && !props.hasLabel && \"\\n padding: \" + props.theme.global.edgeSize.small + \";\\n \";\n}, function (props) {\n return !props.plain && props.pad && edgeStyle('padding', props.pad, false, undefined, props.theme);\n}, function (props) {\n return props.theme.button && props.theme.button.extend;\n}, function (props) {\n return (props.busy || props.success) && \"\\n cursor: default;\\n \";\n});\nStyledButton.defaultProps = {};\nObject.setPrototypeOf(StyledButton.defaultProps, defaultProps);\nexport { StyledButton };","import styled, { css } from 'styled-components';\nimport { activeStyle, disabledStyle, edgeStyle, focusStyle, unfocusStyle, genericStyles, kindPartStyles, parseMetricToNum } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar radiusStyle = function radiusStyle(props) {\n var size = props.sizeProp;\n // caller has specified a themeObj to use for styling\n // relevant for cases like pagination which looks to theme.pagination.button\n var themeObj = typeof props.kind === 'object' ? props.kind : props.theme.button;\n if (size && themeObj.size && themeObj.size[size]) return css([\"border-radius:\", \";\"], themeObj.size[size].border.radius);\n if (themeObj.border && themeObj.border.radius) return css([\"border-radius:\", \";\"], themeObj.border.radius);\n return '';\n};\nvar fontStyle = function fontStyle(props) {\n var size = props.sizeProp || 'medium';\n var data = props.theme.text[size];\n return css([\"font-size:\", \";line-height:\", \";\"], data.size, props.hasIcon && !props.hasLabel ? 0 : data.height);\n};\nvar padFromTheme = function padFromTheme(size, theme, themeObj, kind, iconOnly) {\n var _themeObj$size, _themeObj$size3;\n if (size === void 0) {\n size = 'medium';\n }\n if (size && iconOnly && themeObj != null && (_themeObj$size = themeObj.size) != null && (_themeObj$size = _themeObj$size[size]) != null && (_themeObj$size = _themeObj$size.iconOnly) != null && _themeObj$size.pad) {\n var _themeObj$size2;\n var pad = themeObj == null || (_themeObj$size2 = themeObj.size) == null || (_themeObj$size2 = _themeObj$size2[size]) == null || (_themeObj$size2 = _themeObj$size2.iconOnly) == null ? void 0 : _themeObj$size2.pad;\n return {\n vertical: typeof pad === 'string' ? pad : pad.vertical,\n horizontal: typeof pad === 'string' ? pad : pad.horizontal\n };\n }\n if (size && themeObj != null && (_themeObj$size3 = themeObj.size) != null && (_themeObj$size3 = _themeObj$size3[size]) != null && (_themeObj$size3 = _themeObj$size3[kind]) != null && _themeObj$size3.pad) {\n return themeObj.size[size][kind].pad;\n }\n if (size && themeObj.size && themeObj.size[size] && themeObj.size[size].pad) {\n return {\n vertical: themeObj.size[size].pad.vertical,\n horizontal: themeObj.size[size].pad.horizontal\n };\n }\n if (theme.button.padding) {\n return {\n vertical: theme.global.edgeSize[theme.button.padding.vertical] || theme.button.padding.vertical,\n horizontal: theme.global.edgeSize[theme.button.padding.horizontal] || theme.button.padding.horizontal\n };\n }\n return undefined;\n};\nvar padStyle = function padStyle(_ref) {\n var hasIcon = _ref.hasIcon,\n hasLabel = _ref.hasLabel,\n size = _ref.sizeProp,\n theme = _ref.theme,\n kind = _ref.kind;\n // caller has specified a themeObj to use for styling\n // relevant for cases like pagination which looks to theme.pagination.button\n var themeObj = typeof kind === 'object' ? kind : theme.button;\n var iconOnly = hasIcon && !hasLabel;\n var pad = padFromTheme(size, theme, themeObj, kind, iconOnly);\n return pad ? css([\"padding:\", \" \", \";\"], pad.vertical, pad.horizontal) : '';\n};\nvar basicStyle = function basicStyle(props) {\n return css([\"border:none;\", \";\", \" \", \" \", \"\"], radiusStyle(props), padStyle(props), fontStyle(props), props.icon && \"\\n > svg {\\n display: flex;\\n align-self: center;\\n vertical-align: middle;\\n }\\n \");\n};\nvar getPath = function getPath(theme, path) {\n var obj;\n if (path) {\n obj = theme;\n var parts = path.split('.');\n while (obj && parts.length) obj = obj[parts.shift()];\n }\n return obj;\n};\nvar adjustPadStyle = function adjustPadStyle(pad, width) {\n var offset = parseMetricToNum(width);\n return css([\"padding:\", \"px \", \"px;\"], Math.max(parseMetricToNum(pad.vertical) - offset, 0), Math.max(parseMetricToNum(pad.horizontal) - offset, 0));\n};\n\n// build up CSS from basic to specific based on the supplied sub-object paths\nvar kindStyle = function kindStyle(_ref2) {\n var busy = _ref2.busy,\n colorValue = _ref2.colorValue,\n hasIcon = _ref2.hasIcon,\n hasLabel = _ref2.hasLabel,\n kind = _ref2.kind,\n size = _ref2.sizeProp,\n success = _ref2.success,\n themePaths = _ref2.themePaths,\n theme = _ref2.theme;\n var styles = [];\n\n // caller has specified a themeObj to use for styling\n // relevant for cases like pagination which looks to theme.pagination.button\n var themeObj = typeof kind === 'object' ? kind : theme.button;\n var iconOnly = hasIcon && !hasLabel;\n var pad = padFromTheme(size, theme, themeObj, kind, iconOnly);\n themePaths.base.forEach(function (themePath) {\n var obj = getPath(themeObj, themePath);\n if (obj) {\n styles.push(kindPartStyles(obj, theme, colorValue));\n if (obj.border && obj.border.width && pad && !obj.padding) {\n // Adjust padding from the button.size or just top button.padding\n // to deal with the kind's border width. But don't override any\n // padding in the kind itself for backward compatibility\n styles.push(adjustPadStyle(pad, obj.border.width));\n }\n }\n });\n\n // do the styling from the root of the object if caller passes one\n if (!themePaths.base.length && typeof kind === 'object') {\n var obj = kind;\n if (obj) {\n styles.push(kindPartStyles(obj, theme, colorValue));\n if (obj.border && obj.border.width && pad && !obj.padding) {\n // Adjust padding from the button.size or just top button.padding\n // to deal with the kind's border width. But don't override any\n // padding in the kind itself for backward compatibility\n styles.push(adjustPadStyle(pad, obj.border.width));\n }\n }\n }\n themePaths.hover.forEach(function (themePath) {\n var obj = getPath(themeObj, themePath);\n if (obj) {\n var partStyles = kindPartStyles(obj, theme);\n var adjPadStyles = '';\n if (obj.border && obj.border.width && pad && !obj.padding) {\n // Adjust padding from the button.size or just top button.padding\n // to deal with the hover's border width. But don't override any\n // padding in the hover or hover.kind itself for backward compatibility\n adjPadStyles = adjustPadStyle(pad, obj.border.width);\n }\n if (partStyles.length > 0 && !busy && !success) {\n styles.push(css([\"&:hover{\", \" \", \"}\"], partStyles, adjPadStyles));\n }\n }\n });\n return styles;\n};\nvar hoverIndicatorStyle = function hoverIndicatorStyle(_ref3) {\n var hoverIndicator = _ref3.hoverIndicator,\n theme = _ref3.theme;\n var themishObj = {};\n if (hoverIndicator === true || hoverIndicator === 'background') themishObj.background = theme.global.hover.background;else if (hoverIndicator.color || hoverIndicator.background) {\n if (hoverIndicator.background) themishObj.background = hoverIndicator.background;\n if (hoverIndicator.color) themishObj.color = hoverIndicator.color;\n } else themishObj.background = hoverIndicator;\n var styles = kindPartStyles(themishObj, theme);\n if (styles.length > 0) return css([\"&:hover{\", \"}\"], styles);\n return '';\n};\nvar fillStyle = function fillStyle(fillContainer) {\n if (fillContainer === 'horizontal') {\n return 'width: 100%;';\n }\n if (fillContainer === 'vertical') {\n return 'height: 100%;';\n }\n if (fillContainer) {\n return \"\\n width: 100%;\\n height: 100%;\\n max-width: none;\\n flex: 1 0 auto;\\n \";\n }\n return undefined;\n};\nvar plainStyle = function plainStyle(props) {\n return css([\"outline:none;border:none;padding:0;text-align:inherit;color:inherit;\", \" \", \"\"], props.icon && \"\\n > svg {\\n display: flex;\\n align-self: center;\\n vertical-align: middle;\\n }\\n \", props.hasIcon && !props.hasLabel && \"line-height: 0;\");\n};\nvar StyledButtonKind = styled.button.withConfig({\n // don't let kind attribute leak to DOM\n // https://styled-components.com/docs/api#shouldforwardprop\n shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {\n return !['kind'].includes(prop) && defaultValidatorFn(prop);\n }\n}).withConfig({\n displayName: \"StyledButtonKind\",\n componentId: \"sc-1vhfpnt-0\"\n})([\"display:inline-block;box-sizing:border-box;cursor:pointer;font:inherit;text-decoration:none;margin:0;background:transparent;overflow:visible;text-transform:none;\", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" &:focus{\", \"}&:focus:not(:focus-visible){\", \"}\", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return props.plain && plainStyle(props);\n}, function (props) {\n return !props.disabled && props.active && activeStyle;\n}, function (props) {\n return !props.plain && basicStyle(props);\n}, function (props) {\n return !props.plain && kindStyle(props);\n}, function (props) {\n return !props.plain && props.pad && edgeStyle('padding', props.pad, false, undefined, props.theme);\n}, function (props) {\n return !props.plain && props.align && \"\\n text-align: \" + props.align + \";\\n \";\n}, function (props) {\n return !props.disabled && props.hoverIndicator && !props.busy && !props.success && hoverIndicatorStyle(props);\n}, function (props) {\n return props.disabled && disabledStyle(props.theme.button.disabled.opacity);\n}, function (props) {\n return (!props.plain || props.focusIndicator) && focusStyle();\n}, unfocusStyle(), function (props) {\n return !props.plain && props.theme.button.transition && \"\\n transition-property: \" + props.theme.button.transition.properties.join(',') + \";\\n transition-duration: \" + props.theme.button.transition.duration + \"s;\\n transition-timing-function: \" + props.theme.button.transition.timing + \";\\n \";\n}, function (props) {\n return props.fillContainer && fillStyle(props.fillContainer);\n}, function (props) {\n return props.theme.button && props.theme.button.extend;\n}, function (props) {\n return (props.busy || props.success) && \"\\n cursor: default;\\n \";\n});\nStyledButtonKind.defaultProps = {};\nObject.setPrototypeOf(StyledButtonKind.defaultProps, defaultProps);\nexport { StyledButtonKind };","import React, { useCallback, useContext, useEffect, useRef } from 'react';\nexport var AnalyticsContext = /*#__PURE__*/React.createContext(function () {});\nexport var useAnalytics = function useAnalytics() {\n return useContext(AnalyticsContext);\n};\nexport var AnalyticsProvider = function AnalyticsProvider(_ref) {\n var onAnalytics = _ref.onAnalytics,\n children = _ref.children;\n var lastUrlRef = useRef();\n var sendAnalytics = useCallback(function (data) {\n return onAnalytics && onAnalytics(data);\n }, [onAnalytics]);\n useEffect(function () {\n var observer;\n if (onAnalytics) {\n observer = new window.MutationObserver(function () {\n var _window;\n var url = (_window = window) == null || (_window = _window.location) == null ? void 0 : _window.href;\n var previousUrl = lastUrlRef.current;\n if (url !== previousUrl) {\n lastUrlRef.current = url;\n sendAnalytics({\n type: 'pageView',\n url: url,\n previousUrl: previousUrl\n });\n }\n });\n observer.observe(document, {\n subtree: true,\n childList: true\n });\n }\n return function () {\n var _observer;\n return (_observer = observer) == null ? void 0 : _observer.disconnect();\n };\n }, [sendAnalytics, onAnalytics]);\n return /*#__PURE__*/React.createElement(AnalyticsContext.Provider, {\n value: sendAnalytics\n }, children);\n};","import React from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { Checkmark } from 'grommet-icons/icons/Checkmark';\nimport { Box } from '../Box';\nvar bounceDelay = keyframes([\"0%,80%,100%{transform:scale(0.4);}40%{transform:scale(0.8);}\"]);\nvar bounceDelayRule = css([\"animation:\", \" 1.4s infinite ease-in-out both;\"], bounceDelay);\nvar Dot = styled(Box).withConfig({\n displayName: \"BusyAnimation__Dot\",\n componentId: \"sc-feuivs-0\"\n})([\"background-color:currentColor;width:8px;height:8px;border-radius:100%;display:inline-block;\", \" \", \"\"], bounceDelayRule, function (props) {\n return props.delay && \"animation-delay: \" + props.delay + \";\";\n});\nexport var EllipsisAnimation = function EllipsisAnimation() {\n return /*#__PURE__*/React.createElement(Box, {\n style: {\n position: 'absolute'\n },\n fill: true,\n alignContent: \"center\",\n justify: \"center\"\n }, /*#__PURE__*/React.createElement(Box, {\n alignSelf: \"center\",\n direction: \"row\",\n gap: \"small\"\n }, /*#__PURE__*/React.createElement(Dot, {\n delay: \"-0.32s\"\n }), /*#__PURE__*/React.createElement(Dot, {\n delay: \"-0.16s\"\n }), /*#__PURE__*/React.createElement(Dot, null)));\n};\nvar grow = keyframes([\"0%{opacity:0;transform:scale(.3);}20%{opacity:1;transform:scale(1.15);}30%{transform:scale(.9);}45%{transform:scale(1.05);}55%{transform:scale(1);}100%{transform:scale(1);}\"]);\nexport var GrowCheckmark = styled(Checkmark).withConfig({\n displayName: \"BusyAnimation__GrowCheckmark\",\n componentId: \"sc-feuivs-1\"\n})([\"position:absolute;align-self:center;animation:\", \" 0.9s ease-in-out;\"], grow);\nexport var StyledBusyContents = styled.div.withConfig({\n displayName: \"BusyAnimation__StyledBusyContents\",\n componentId: \"sc-feuivs-2\"\n})([\"opacity:\", \";}\"], function (props) {\n return props.animating ? 0 : 1;\n});","var _excluded = [\"active\", \"align\", \"aria-label\", \"badge\", \"busy\", \"color\", \"children\", \"disabled\", \"icon\", \"focusIndicator\", \"gap\", \"fill\", \"href\", \"justify\", \"kind\", \"label\", \"messages\", \"onBlur\", \"onClick\", \"onFocus\", \"onMouseOut\", \"onMouseOver\", \"pad\", \"plain\", \"primary\", \"reverse\", \"secondary\", \"selected\", \"size\", \"success\", \"tip\", \"type\", \"a11yTitle\", \"as\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { cloneElement, Children, forwardRef, useContext, useMemo, useState, useCallback, useEffect } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { backgroundAndTextColors, colorIsDark, findButtonParent, useSizedIcon, normalizeBackground, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { ButtonPropTypes } from './propTypes';\nimport { AnnounceContext } from '../../contexts/AnnounceContext';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { Box } from '../Box';\nimport { Tip } from '../Tip';\nimport { Badge } from './Badge';\nimport { StyledButton } from './StyledButton';\nimport { StyledButtonKind } from './StyledButtonKind';\nimport { useAnalytics } from '../../contexts/AnalyticsContext';\nimport { Skeleton, useSkeleton } from '../Skeleton';\nimport { EllipsisAnimation, GrowCheckmark, StyledBusyContents } from './BusyAnimation';\nvar RelativeBox = styled(Box).withConfig({\n displayName: \"Button__RelativeBox\",\n componentId: \"sc-zuqsuw-0\"\n})([\"position:relative;\"]);\n\n// We have two Styled* components to separate\n// the newer default|primary|secondary approach,\n// which we use the term \"kind\" to refer to,\n// from the previous approach. Hopefully, when we get to grommet v3,\n// we can drop the old way and just use kind.\n//\n// In the kind approach, we rely on the basic structure of the theme\n// being repeated. For example: button.default, button.active,\n// button.active.default all refer to a similar object containing\n// { background, border, color, padding }.\n// This allows us to use the same code to evaluate color and generate CSS.\n// We just need to build up CSS, since selectors override previous ones.\n// See StyledButtonKind.kindStyles() for this.\n// And we build down to determine icon color, once we have a color from\n// the latest applicable state, we can stop. See Button.getIconColor() for this.\n// backgroundAndTextColor() is used in both cases to ensure we are determining\n// color in the same way, so the icon and label align.\n\n// only when default is in the theme\n// Used to get the color for the icon to match what StyledButtonKind\n// and backgroundStyle() will do for the label.\n// The paths are ordered from basic to specific. Go through them\n// specific to base until we find one that has a color and use that.\nvar getIconColor = function getIconColor(paths, theme, colorProp, kind) {\n if (paths === void 0) {\n paths = [];\n }\n var result = [];\n var index = paths.length - 1;\n // caller has specified a themeObj to use for styling\n // relevant for cases like pagination which looks to theme.pagination.button\n if (typeof kind === 'object') index = 0;\n // stop when we have a color or no more paths\n while (index >= 0 && !result[1]) {\n var baseObj = typeof kind === 'object' && kind || theme.button;\n var obj = baseObj;\n // find sub-object under the button theme that corresponds with this path\n // for example: 'active.primary'\n if (paths[index]) {\n var parts = paths[index].split('.');\n while (obj && parts.length) obj = obj[parts.shift()];\n }\n if (obj) {\n var _obj;\n // use passed in color for background if the theme has a background color\n var background = colorProp && obj.background && obj.background.color ? colorProp : obj.background;\n\n // if theme object explicitly sets the color to undefined, pass false\n // to indicate that the theme doesn't want any text color\n var objColor = obj.color || (Object.prototype.hasOwnProperty.call(obj, 'color') && obj.color === undefined ? false : undefined);\n var color = void 0;\n if ((_obj = obj) != null && (_obj = _obj.icon) != null && (_obj = _obj.props) != null && _obj.color) color = obj.icon.props.color;\n // if no icon defined for this state, see if there is an icon\n // with color defined at one higher level\n else if (paths[index + 1]) {\n var _obj2;\n var _parts = paths[index + 1].split('.');\n while (baseObj && _parts.length) obj = baseObj[_parts.shift()];\n if ((_obj2 = obj) != null && (_obj2 = _obj2.icon) != null && (_obj2 = _obj2.props) != null && _obj2.color) color = obj.icon.props.color;\n }\n // use passed in color for text if the theme doesn't have\n // background or border color\n if (!color) color = colorProp && (!obj.background || !obj.background.color) && (!obj.border || !obj.border.color) ? colorProp : objColor;\n result = backgroundAndTextColors(background, color, theme);\n }\n index -= 1;\n }\n return result[1] || undefined;\n};\n\n// get the icon for the current button state\nvar getKindIcon = function getKindIcon(paths, theme, kind) {\n if (paths === void 0) {\n paths = [];\n }\n var result;\n var index = paths.length - 1;\n // caller has specified a themeObj to use for styling\n // relevant for cases like pagination which looks to theme.pagination.button\n if (typeof kind === 'object') index = 0;\n // stop when we have a color or no more paths\n while (index >= 0 && !result) {\n var _obj3;\n var obj = typeof kind === 'object' && kind || theme.button;\n // find sub-object under the button theme that corresponds with this path\n // for example: 'active.primary'\n if (paths[index]) {\n var parts = paths[index].split('.');\n while (obj && parts.length) obj = obj[parts.shift()];\n }\n if ((_obj3 = obj) != null && _obj3.icon) result = obj.icon;\n index -= 1;\n }\n return result || undefined;\n};\nvar getPropertyColor = function getPropertyColor(property, paths, theme, kind, primary) {\n if (paths === void 0) {\n paths = [];\n }\n var result;\n if (kind) {\n var obj = typeof kind === 'object' && kind || theme.button;\n // index 0 is default state\n if (paths[0]) {\n var parts = paths[0].split('.');\n while (obj && parts.length) obj = obj[parts.shift()];\n }\n if (obj) {\n result = obj[property] || obj[property] && obj[property].color;\n }\n } else if (primary && theme && theme.button && theme.button.primary) {\n result = theme.button.primary[property] || theme.button.primary[property] && theme.button.primary[property].color;\n } else {\n result = theme && theme.button && theme.button[property] || theme && theme.button && theme.button[property] && theme.button[property].color;\n }\n return result;\n};\nvar Button = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _theme$button$kind, _theme$button2;\n var active = _ref.active,\n _ref$align = _ref.align,\n align = _ref$align === void 0 ? 'center' : _ref$align,\n ariaLabel = _ref['aria-label'],\n badgeProp = _ref.badge,\n busy = _ref.busy,\n color = _ref.color,\n children = _ref.children,\n disabled = _ref.disabled,\n icon = _ref.icon,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n gap = _ref.gap,\n fill = _ref.fill,\n href = _ref.href,\n justify = _ref.justify,\n kindArg = _ref.kind,\n label = _ref.label,\n messages = _ref.messages,\n _onBlur = _ref.onBlur,\n onClickProp = _ref.onClick,\n _onFocus = _ref.onFocus,\n onMouseOut = _ref.onMouseOut,\n onMouseOver = _ref.onMouseOver,\n pad = _ref.pad,\n plain = _ref.plain,\n primary = _ref.primary,\n reverseProp = _ref.reverse,\n secondary = _ref.secondary,\n selected = _ref.selected,\n sizeProp = _ref.size,\n success = _ref.success,\n tip = _ref.tip,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'button' : _ref$type,\n _ref$a11yTitle = _ref.a11yTitle,\n a11yTitle = _ref$a11yTitle === void 0 ? typeof tip === 'string' ? tip : undefined : _ref$a11yTitle,\n as = _ref.as,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n var _useState2 = useState(false),\n hover = _useState2[0],\n setHover = _useState2[1];\n var announce = useContext(AnnounceContext);\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n if (busy && success) {\n console.warn('Button cannot have both busy and success set to true.');\n }\n useEffect(function () {\n if (busy) announce(format({\n id: 'button.busy',\n messages: messages\n }));else if (success) announce(format({\n id: 'button.success',\n messages: messages\n }));\n }, [announce, busy, format, messages, success]);\n if ((icon || label) && children) {\n console.warn('Button should not have children if icon or label is provided');\n }\n var skeleton = useSkeleton();\n var sendAnalytics = useAnalytics();\n var onClick = useCallback(function (event) {\n sendAnalytics({\n type: 'buttonClick',\n element: findButtonParent(event.target),\n event: event,\n href: href,\n label: typeof label === 'string' ? label : undefined\n });\n if (onClickProp) onClickProp(event);\n }, [onClickProp, sendAnalytics, href, label]);\n\n // kindArg is object if we are referencing a theme object\n // outside of theme.button\n var kindObj = useMemo(function () {\n return typeof kindArg === 'object';\n }, [kindArg]);\n\n // if the theme has button.default, what kind of Button is this\n var kind = useMemo(function () {\n if (theme.button[\"default\"] || kindObj) {\n if (kindArg) return kindArg;\n if (primary) return 'primary';\n if (secondary) return 'secondary';\n return 'default';\n }\n return undefined; // pre-default, no kind\n }, [kindArg, kindObj, primary, secondary, theme]);\n\n // for backwards compatibility, no-kind button theme did not\n // default to size \"medium\" on buttons with no size prop\n var size = sizeProp || kind && 'medium' || undefined;\n // When we have a kind and are not plain, themePaths stores the relative\n // paths within the theme for the current kind and state of the button.\n // These paths are used with getIconColor() above and kindStyle() within\n // StyledButtonKind.\n var themePaths = useMemo(function () {\n if (!kind || plain) return undefined;\n var result = {\n base: [],\n hover: []\n };\n if (!kindObj) result.base.push(kind);\n if (selected) {\n result.base.push('selected');\n if (!kindObj) result.base.push(\"selected.\" + kind);\n }\n if (disabled) {\n result.base.push('disabled');\n if (!kindObj) result.base.push(\"disabled.\" + kind);\n } else {\n if (active) {\n result.base.push('active');\n if (!kindObj) result.base.push(\"active.\" + kind);\n }\n result.hover.push('hover');\n if (!kindObj) result.hover.push(\"hover.\" + kind);\n if (active) {\n result.hover.push(\"hover.active\");\n if (!kindObj) {\n result.hover.push(\"hover.active.\" + kind);\n }\n }\n }\n return result;\n }, [active, disabled, kind, kindObj, plain, selected]);\n\n // only used when theme does not have button.default\n var isDarkBackground = function isDarkBackground() {\n var backgroundColor = normalizeBackground(normalizeColor(color || theme.button.primary && theme.button.primary.color || theme.global.colors.control || 'brand', theme), theme);\n return colorIsDark(backgroundColor, theme);\n };\n var onMouseOverButton = function onMouseOverButton(event) {\n setHover(true);\n if (onMouseOver) {\n onMouseOver(event);\n }\n };\n var onMouseOutButton = function onMouseOutButton(event) {\n setHover(false);\n if (onMouseOut) {\n onMouseOut(event);\n }\n };\n var kindIcon = hover && getKindIcon(themePaths == null ? void 0 : themePaths.hover, theme, kind) || getKindIcon(themePaths == null ? void 0 : themePaths.base, theme, kind);\n var buttonIcon = icon || kindIcon;\n // only change color if user did not specify the color themselves...\n if (icon && !icon.props.color) {\n if (kind) {\n if (!plain) {\n // match what the label will use\n var iconColor = hover && getIconColor(themePaths.hover, theme) || getIconColor(themePaths.base, theme, color, kind);\n if (iconColor) buttonIcon = /*#__PURE__*/cloneElement(icon, {\n color: iconColor\n });\n }\n } else if (primary) {\n buttonIcon = /*#__PURE__*/cloneElement(icon, {\n color: theme.global.colors.text[isDarkBackground() ? 'dark' : 'light']\n });\n }\n } else if (kindIcon && !plain) {\n var _iconColor = hover && getIconColor(themePaths.hover, theme) || getIconColor(themePaths.base, theme, color, kind);\n if (_iconColor) buttonIcon = /*#__PURE__*/cloneElement(kindIcon, {\n color: _iconColor\n });\n }\n buttonIcon = useSizedIcon(buttonIcon, size, theme);\n if (skeleton) {\n var _theme$text, _theme$button$size;\n return /*#__PURE__*/React.createElement(Skeleton, _extends({\n ref: ref,\n height: ((_theme$text = theme.text[size || 'medium']) == null ? void 0 : _theme$text.height) || size,\n a11yTitle: a11yTitle\n }, rest, (_theme$button$size = theme.button.size) == null ? void 0 : _theme$button$size[size || 'medium'], theme.button.skeleton));\n }\n var reverse = reverseProp != null ? reverseProp : (_theme$button$kind = theme.button[kind]) == null ? void 0 : _theme$button$kind.reverse;\n var domTag = !as && href ? 'a' : as;\n var first = reverse ? label : buttonIcon;\n var second = reverse ? buttonIcon : label;\n var contents;\n if (first && second) {\n var _theme$button;\n contents = /*#__PURE__*/React.createElement(Box, {\n direction: ((_theme$button = theme.button) == null || (_theme$button = _theme$button[kind]) == null ? void 0 : _theme$button.direction) || 'row',\n align: \"center\",\n justify: justify || (align === 'center' ? 'center' : 'between'),\n gap: gap || theme.button.gap,\n responsive: false\n }, first, second);\n } else if (typeof children === 'function') {\n contents = children({\n disabled: disabled,\n hover: hover,\n focus: focus\n });\n } else {\n contents = first || second || children;\n }\n var background = getPropertyColor('background', themePaths && themePaths.base, theme, kind, primary);\n var border = getPropertyColor('border', themePaths && themePaths.base, theme, kind, primary);\n // set the badge relative to the button content\n // when the button doesn't have background or border\n // (!kind && icon && !label) is necessary because for old button logic,\n // if button has icon but not label, it will be considered \"plain\",\n // so no border or background will be applied\n var innerBadge = ((_theme$button2 = theme.button) == null || (_theme$button2 = _theme$button2.badge) == null ? void 0 : _theme$button2.align) !== 'container' && (!background && !border || !kind && icon && !label);\n if (badgeProp && innerBadge) {\n contents = /*#__PURE__*/React.createElement(Badge, {\n content: badgeProp\n }, contents);\n }\n if (busy || success) {\n // match what the label will use\n var animationColor;\n if (kind) {\n if (!plain) {\n animationColor = hover && getIconColor(themePaths.hover, theme) || getIconColor(themePaths.base, theme, color, kind);\n }\n } else if (primary) {\n animationColor = theme.global.colors.text[isDarkBackground() ? 'dark' : 'light'];\n }\n contents =\n /*#__PURE__*/\n // position relative is necessary to have the animation\n // display over the button content\n React.createElement(RelativeBox, {\n flex: false\n }, busy && /*#__PURE__*/React.createElement(EllipsisAnimation, null), success && /*#__PURE__*/React.createElement(Box, {\n style: {\n position: 'absolute'\n },\n fill: true,\n alignContent: \"center\",\n justify: \"center\"\n }, /*#__PURE__*/React.createElement(GrowCheckmark, {\n color: animationColor,\n \"aria-hidden\": true\n })), /*#__PURE__*/React.createElement(StyledBusyContents, {\n animating: busy || success\n }, contents));\n }\n var styledButtonResult;\n if (kind) {\n styledButtonResult = /*#__PURE__*/React.createElement(StyledButtonKind, _extends({}, rest, {\n as: domTag,\n ref: ref,\n active: active,\n align: align,\n \"aria-label\": ariaLabel || a11yTitle,\n busy: busy,\n badge: badgeProp,\n colorValue: color,\n disabled: disabled,\n hasIcon: !!icon,\n gap: gap,\n hasLabel: !!label,\n icon: icon,\n fillContainer: fill,\n focus: focus,\n focusIndicator: focusIndicator,\n href: href,\n kind: kind,\n themePaths: themePaths,\n onClick: !busy && !success ? onClick : undefined,\n onFocus: function onFocus(event) {\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n },\n onMouseOver: onMouseOverButton,\n onMouseOut: onMouseOutButton,\n pad: pad,\n plain: plain || Children.count(children) > 0,\n primary: primary,\n sizeProp: size,\n success: success,\n type: !href ? type : undefined\n }), contents);\n } else {\n styledButtonResult = /*#__PURE__*/React.createElement(StyledButton, _extends({}, rest, {\n as: domTag,\n ref: ref,\n \"aria-label\": ariaLabel || a11yTitle,\n busy: busy,\n colorValue: color,\n active: active,\n selected: selected,\n disabled: disabled,\n hasIcon: !!icon,\n gap: gap,\n hasLabel: !!label,\n fillContainer: fill,\n focus: focus,\n focusIndicator: focusIndicator,\n href: href,\n kind: kind,\n themePaths: themePaths,\n onClick: !busy && !success ? onClick : undefined,\n onFocus: function onFocus(event) {\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n },\n onMouseOver: onMouseOverButton,\n onMouseOut: onMouseOutButton,\n pad: pad || !plain,\n plain: typeof plain !== 'undefined' ? plain : Children.count(children) > 0 || icon && !label,\n primary: primary,\n sizeProp: size,\n success: success,\n type: !href ? type : undefined\n }), contents);\n }\n if (tip) {\n if (typeof tip === 'string') {\n styledButtonResult = /*#__PURE__*/React.createElement(Tip, {\n content: tip\n }, styledButtonResult);\n } else {\n styledButtonResult = /*#__PURE__*/React.createElement(Tip, tip, styledButtonResult);\n }\n }\n\n // if button has background or border, place badge relative\n // to outer edge of button\n if (badgeProp && !innerBadge) {\n styledButtonResult = /*#__PURE__*/React.createElement(Badge, {\n content: badgeProp\n }, styledButtonResult);\n }\n return styledButtonResult;\n});\nButton.displayName = 'Button';\nButton.propTypes = ButtonPropTypes;\nexport { Button };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n open: PropTypes.bool,\n direction: PropTypes.oneOf(['horizontal', 'vertical'])\n };\n}\nexport var CollapsiblePropTypes = PropType;","import React, { forwardRef, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { defaultProps } from '../../default-props';\nimport { useForwardedRef } from '../../utils';\nimport { Box } from '../Box';\nimport { CollapsiblePropTypes } from './propTypes';\nvar AnimatedBox = styled(Box).withConfig({\n displayName: \"Collapsible__AnimatedBox\",\n componentId: \"sc-15kniua-0\"\n})([\"\", \"\"], function (props) {\n return props.shouldOpen ? \"visibility: hidden;\\n position: absolute;\\n pointer-events: none;\" : // eslint-disable-next-line max-len\n \"transition: \" + (\"max-\" + props.dimension + \" \" + props.speedProp + \"ms, opacity \" + props.speedProp + \"ms\") + \";\\n opacity: \" + (props.open ? 1 : 0) + \";\\n overflow: \" + (props.animate || !props.open ? 'hidden' : 'visible') + \";\";\n});\nvar Collapsible = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n direction = _ref.direction,\n openArg = _ref.open;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(openArg),\n open = _useState[0],\n setOpen = _useState[1];\n var _useState2 = useState(false),\n animate = _useState2[0],\n setAnimate = _useState2[1];\n var _useState3 = useState(theme.collapsible.minSpeed),\n speed = _useState3[0],\n setSpeed = _useState3[1];\n var dimension = useMemo(function () {\n return direction === 'horizontal' ? 'width' : 'height';\n }, [direction]);\n var containerRef = useForwardedRef(ref);\n var sizeRef = useRef(0);\n var shouldOpen = !open && openArg;\n var shouldClose = open && !openArg;\n\n // when the caller changes openArg, trigger animation\n useEffect(function () {\n if (openArg !== open) {\n setAnimate(true);\n setOpen(openArg);\n }\n }, [open, openArg]);\n\n // prepare to open or close\n useLayoutEffect(function () {\n var container = containerRef.current;\n\n // skip this if animation is in progress\n if (!animate && shouldOpen) {\n var parentPrevPosition = container.parentNode.style.position;\n container.parentNode.style.position = 'relative';\n var _container$getBoundin = container.getBoundingClientRect(),\n size = _container$getBoundin[dimension];\n container.parentNode.style.position = parentPrevPosition;\n sizeRef.current = size;\n }\n if (shouldOpen) {\n container.style[\"max-\" + dimension] = 0;\n } else if (shouldClose) {\n var _container$getBoundin2 = container.getBoundingClientRect(),\n _size = _container$getBoundin2[dimension];\n container.style[\"max-\" + dimension] = _size + \"px\";\n }\n }, [shouldOpen, shouldClose, containerRef, dimension, animate]);\n useEffect(function () {\n if (shouldOpen || shouldClose) {\n var container = containerRef.current;\n var _theme$collapsible = theme.collapsible,\n minSpeed = _theme$collapsible.minSpeed,\n baseline = _theme$collapsible.baseline;\n var nextSpeed = Math.max(sizeRef.current / baseline * minSpeed, minSpeed);\n setSpeed(nextSpeed);\n requestAnimationFrame(function () {\n requestAnimationFrame(function () {\n // Change the max to where we want to end up, the transition will\n // animate to get there. We do this in an animation frame to\n // give our starter setting a chance to fully render.\n container.style[\"max-\" + dimension] = shouldOpen ? sizeRef.current + \"px\" : 0;\n });\n });\n }\n }, [shouldOpen, shouldClose, containerRef, dimension, theme]);\n useEffect(function () {\n if (animate) {\n var container = containerRef.current;\n var timer = setTimeout(function () {\n setAnimate(false);\n container.removeAttribute('style');\n }, speed);\n return function () {\n return clearTimeout(timer);\n };\n }\n return undefined;\n // we need open here to cancel the timer and restart it\n }, [animate, containerRef, speed, open]);\n return /*#__PURE__*/React.createElement(AnimatedBox, {\n \"aria-hidden\": !open,\n ref: containerRef,\n open: open,\n animate: animate,\n dimension: dimension,\n speedProp: speed\n // an intermediate state that will render invisible element\n // we need to do this because we can't use scrollHeight/scrollWidth\n // to get size while overflow is hidden.\n // skipped if animation is in progress\n ,\n shouldOpen: !animate && shouldOpen\n }, shouldOpen || open || animate ? children : null);\n});\nCollapsible.displayName = 'Collapsible';\nCollapsible.propTypes = CollapsiblePropTypes;\nexport { Collapsible };","import styled, { css } from 'styled-components';\nimport { breakpointStyle, genericStyles, normalizeColor, textAlignStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar sizeStyle = function sizeStyle(props) {\n // size is a combination of the level and size properties\n var size = props.size || 'medium';\n var headingTheme = props.theme.heading;\n var levelStyle = headingTheme.level[props.level];\n if (levelStyle) {\n var data = levelStyle[size];\n var styles = [css([\"font-size:\", \";line-height:\", \";max-width:\", \";font-weight:\", \";overflow-wrap:\", \";\"], data ? data.size : size, data ? data.height : 'normal', props.fillProp && 'none' || data && data.maxWidth || levelStyle.medium.maxWidth, props.weight || levelStyle.font.weight || headingTheme.weight, props.overflowWrap)];\n if (props.responsive && headingTheme.responsiveBreakpoint) {\n var breakpoint = props.theme.global.breakpoints[headingTheme.responsiveBreakpoint];\n if (breakpoint) {\n var responsiveData = headingTheme.level[props.level + 1] ? headingTheme.level[props.level + 1][size] : headingTheme.level[props.level][size];\n if (responsiveData) {\n styles.push(breakpointStyle(breakpoint, \"\\n font-size: \" + responsiveData.size + \";\\n line-height: \" + responsiveData.height + \";\\n max-width: \" + (props.fillProp && 'none' || responsiveData.maxWidth) + \";\\n \"));\n }\n }\n }\n return styles;\n }\n console.warn(\"Heading level \" + props.level + \" is not defined in your theme.\");\n return '';\n};\nvar fontFamily = function fontFamily(props) {\n var _ref = props.theme.heading.level[props.level] || {},\n font = _ref.font;\n if (font && font.family) {\n return css([\"font-family:\", \";\"], font.family);\n }\n return props.theme.heading.font ? css([\"font-family:\", \";\"], props.theme.heading.font.family) : '';\n};\nvar truncateStyle = \"\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n\";\nvar colorStyle = css([\"color:\", \";\"], function (props) {\n return normalizeColor(props.colorProp || props.theme.heading.color, props.theme);\n});\nvar StyledHeading = styled.h1.withConfig({\n displayName: \"StyledHeading\",\n componentId: \"sc-1rdh4aw-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return fontFamily(props);\n}, function (props) {\n return sizeStyle(props);\n}, function (props) {\n return props.textAlign && textAlignStyle;\n}, function (props) {\n return props.truncate && truncateStyle;\n}, function (props) {\n return (props.colorProp || props.theme.heading.color) && colorStyle;\n}, function (props) {\n return props.theme.heading && props.theme.heading.extend;\n});\nStyledHeading.defaultProps = {};\nObject.setPrototypeOf(StyledHeading.defaultProps, defaultProps);\nexport { StyledHeading };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { colorPropType, genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n color: colorPropType,\n fill: PropTypes.bool,\n level: PropTypes.oneOf([1, 2, 3, 4, 5, 6, '1', '2', '3', '4', '5', '6']),\n overflowWrap: PropTypes.oneOfType([PropTypes.oneOf(['normal', 'break-word', 'anywhere']), PropTypes.string]),\n responsive: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n textAlign: PropTypes.oneOf(['start', 'center', 'end', 'justify']),\n truncate: PropTypes.bool,\n weight: PropTypes.oneOfType([PropTypes.oneOf(['normal', 'bold', 'lighter', 'bolder']), PropTypes.number, PropTypes.string])\n });\n}\nexport var HeadingPropTypes = PropType;","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Skeleton } from '../Skeleton';\nvar HeadingSkeleton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var as = _ref.as,\n level = _ref.level,\n size = _ref.size;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var levelStyle = theme.heading.level[level];\n var data = levelStyle == null ? void 0 : levelStyle[size || 'medium'];\n var height = data ? data.height : size;\n return /*#__PURE__*/React.createElement(Skeleton, _extends({\n as: as,\n ref: ref,\n height: height\n }, theme.heading.skeleton));\n});\nHeadingSkeleton.displayName = 'HeadingSkeleton';\nHeadingSkeleton.defaultProps = {\n level: 1\n};\nexport { HeadingSkeleton };","var _excluded = [\"children\", \"color\", \"fill\", \"level\", \"overflowWrap\", \"weight\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useState } from 'react';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { StyledHeading } from './StyledHeading';\nimport { HeadingPropTypes } from './propTypes';\nimport { useForwardedRef } from '../../utils';\nimport { useSkeleton } from '../Skeleton';\nimport { HeadingSkeleton } from './HeadingSkeleton';\nvar Heading = /*#__PURE__*/forwardRef(function (_ref, ref // munged to avoid styled-components putting it in the DOM\n) {\n var children = _ref.children,\n color = _ref.color,\n fill = _ref.fill,\n level = _ref.level,\n overflowWrapProp = _ref.overflowWrap,\n weight = _ref.weight,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var headingRef = useForwardedRef(ref);\n var _useState = useState(overflowWrapProp || 'break-word'),\n overflowWrap = _useState[0],\n setOverflowWrap = _useState[1];\n var skeleton = useSkeleton();\n\n // handle overflowWrap of heading\n useLayoutEffect(function () {\n var updateOverflowWrap = function updateOverflowWrap() {\n var wrap;\n if (!overflowWrapProp && headingRef.current) {\n wrap = headingRef.current.scrollWidth > headingRef.current.offsetWidth ? 'anywhere' : 'break-word';\n setOverflowWrap(wrap);\n }\n };\n window.addEventListener('resize', updateOverflowWrap);\n updateOverflowWrap();\n return function () {\n return window.removeEventListener('resize', updateOverflowWrap);\n };\n }, [headingRef, overflowWrapProp]);\n var content = children;\n if (skeleton) {\n content = /*#__PURE__*/React.createElement(HeadingSkeleton, _extends({\n level: level,\n fill: fill\n }, rest));\n }\n return (\n /*#__PURE__*/\n // enforce level to be a number\n React.createElement(StyledHeading, _extends({\n as: \"h\" + level,\n colorProp: color,\n fillProp: fill,\n level: +level,\n overflowWrap: overflowWrap,\n weight: weight\n }, rest, {\n ref: headingRef\n }), content)\n );\n});\nHeading.displayName = 'Heading';\nHeading.defaultProps = {\n level: 1,\n responsive: true\n};\nHeading.propTypes = HeadingPropTypes;\nexport { Heading };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n header: PropTypes.node\n };\n}\nexport var AccordionPanelPropTypes = PropType;","var _excluded = [\"children\", \"header\", \"label\", \"onClick\", \"onMouseOut\", \"onMouseOver\", \"onFocus\", \"onBlur\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useMemo, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { normalizeColor, parseMetricToNum } from '../../utils';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Collapsible } from '../Collapsible';\nimport { Heading } from '../Heading';\nimport { AccordionContext } from '../Accordion/AccordionContext';\nimport { AccordionPanelPropTypes } from './propTypes';\nvar AccordionPanel = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n header = _ref.header,\n label = _ref.label,\n onClick = _ref.onClick,\n _onMouseOut = _ref.onMouseOut,\n _onMouseOver = _ref.onMouseOver,\n _onFocus = _ref.onFocus,\n _onBlur = _ref.onBlur,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(AccordionContext),\n active = _useContext.active,\n animate = _useContext.animate,\n level = _useContext.level,\n onPanelChange = _useContext.onPanelChange;\n var _useState = useState(undefined),\n hover = _useState[0],\n setHover = _useState[1];\n var _useState2 = useState(),\n focus = _useState2[0],\n setFocus = _useState2[1];\n var iconColor = useMemo(function () {\n return normalizeColor(theme.accordion.icons.color || 'control', theme);\n }, [theme]);\n var AccordionIcon = useMemo(function () {\n return active ? theme.accordion.icons.collapse : theme.accordion.icons.expand;\n }, [active, theme.accordion.icons]);\n var defaultHoverColor = JSON.stringify({\n dark: 'light-4',\n light: 'dark-3'\n });\n\n // accordion.hover.color will be deprecated in v3.\n if (JSON.stringify(theme.accordion.hover.color) !== defaultHoverColor) console.warn(\"The theme style for accordion.hover.color is deprecated, \\n use accordion.hover.heading.color instead.\");\n\n // accordion.hover.heading.color will trump accordion.hover.color in case\n // the user sets its value to be any other value than the\n // default value (defaultHoverColor).\n // accordion.hover.color will be deprecated in v3.\n var headingColor = theme.accordion.hover && JSON.stringify(theme.accordion.hover.heading.color) !== defaultHoverColor ? theme.accordion.hover.heading.color : theme.accordion.hover.color;\n var contentBorder = theme.accordion.border;\n var panelBorder = theme.accordion.panel.border;\n var abutMargin;\n if (panelBorder)\n // abutMargin 'bottom' is set to overlap adjacent border panels\n abutMargin = {\n bottom: \"-\" + parseMetricToNum(\n // in case border.size defined as a t-shirt size\n // or in case border size is a custom size i.e. '5px'\n theme.global.borderSize[panelBorder.size] || panelBorder.size || theme.global.borderSize.xsmall // '-1px'\n ) + \"px\"\n };\n return /*#__PURE__*/React.createElement(Box, {\n ref: ref,\n flex: false,\n onClick: onClick,\n border: panelBorder,\n margin: abutMargin\n }, /*#__PURE__*/React.createElement(Button, {\n \"aria-expanded\": active,\n plain: theme.button[\"default\"] ? true : undefined,\n onClick: onPanelChange,\n hoverIndicator: theme.accordion.hover.background,\n onMouseOver: function onMouseOver(event) {\n setHover(headingColor);\n if (_onMouseOver) _onMouseOver(event);\n },\n onMouseOut: function onMouseOut(event) {\n setHover(undefined);\n if (_onMouseOut) _onMouseOut(event);\n },\n onFocus: function onFocus(event) {\n setHover(headingColor);\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setHover(undefined);\n setFocus(false);\n if (_onBlur) _onBlur(event);\n },\n style: focus ? {\n zIndex: 1\n } : undefined\n }, header || /*#__PURE__*/React.createElement(Box, _extends({\n align: \"center\",\n direction: \"row\",\n justify: \"between\"\n }, rest), typeof label === 'string' ? /*#__PURE__*/React.createElement(Box, {\n pad: {\n horizontal: 'xsmall'\n }\n }, /*#__PURE__*/React.createElement(Heading, {\n level: level || theme.accordion.heading && theme.accordion.heading.level || 4,\n margin: theme.accordion.heading && theme.accordion.heading.margin || undefined,\n color: hover\n }, label)) : label, AccordionIcon && /*#__PURE__*/React.createElement(Box, {\n pad: {\n horizontal: 'small'\n },\n width: {\n min: 'fit-content'\n }\n }, /*#__PURE__*/React.createElement(AccordionIcon, {\n color: iconColor\n })))), /*#__PURE__*/React.createElement(Box, {\n role: \"region\",\n border: contentBorder\n }, animate ? /*#__PURE__*/React.createElement(Collapsible, {\n open: active\n }, children) : active && children));\n});\nAccordionPanel.displayName = 'AccordionPanel';\nAccordionPanel.propTypes = AccordionPanelPropTypes;\nexport { AccordionPanel };","import styled, { css } from 'styled-components';\nimport { focusStyle, genericStyles, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar disabledStyle = \"\\n opacity: 0.3;\\n cursor: default;\\n text-decoration: none;\\n\";\nvar sizeStyle = function sizeStyle(props) {\n if (props.size) {\n var size = props.size || 'medium';\n var data = props.theme.text[size];\n return css([\"font-size:\", \";line-height:\", \";\"], data ? data.size : size, data ? data.height : 'normal');\n }\n return css([\"font-size:inherit;line-height:inherit;\"]);\n};\nvar StyledAnchor = styled.a.withConfig({\n // prevent custom props from bleeding into DOM\n // https://styled-components.com/docs/api#shouldforwardprop\n shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {\n return !['as', 'colorProp', 'focus', 'hasIcon', 'hasLabel', 'reverse'].includes(prop) && defaultValidatorFn(prop);\n }\n}).withConfig({\n displayName: \"StyledAnchor\",\n componentId: \"sc-1rp7lwl-0\"\n})([\"box-sizing:border-box;\", \" color:\", \";\", \" text-decoration:\", \";cursor:pointer;\", \" \", \" \", \" \", \" \", \" \", \"\"], function (props) {\n return sizeStyle(props);\n}, function (props) {\n var _props$theme$anchor;\n return normalizeColor(props.colorProp || ((_props$theme$anchor = props.theme.anchor) == null || (_props$theme$anchor = _props$theme$anchor.size) == null || (_props$theme$anchor = _props$theme$anchor[props.size]) == null ? void 0 : _props$theme$anchor.color) || props.theme.anchor.color, props.theme);\n}, function (props) {\n var _props$theme$anchor2, _props$theme$anchor3;\n return props.weight ? \"font-weight: \" + props.weight + \";\" : (((_props$theme$anchor2 = props.theme.anchor) == null || (_props$theme$anchor2 = _props$theme$anchor2.size) == null || (_props$theme$anchor2 = _props$theme$anchor2[props.size]) == null ? void 0 : _props$theme$anchor2.fontWeight) || props.theme.anchor.fontWeight) && \"font-weight: \" + (((_props$theme$anchor3 = props.theme.anchor) == null || (_props$theme$anchor3 = _props$theme$anchor3.size) == null || (_props$theme$anchor3 = _props$theme$anchor3[props.size]) == null ? void 0 : _props$theme$anchor3.fontWeight) || props.theme.anchor.fontWeight) + \";\";\n}, function (props) {\n var _props$theme$anchor4;\n return props.hasIcon ? 'none' : ((_props$theme$anchor4 = props.theme.anchor) == null || (_props$theme$anchor4 = _props$theme$anchor4.size) == null || (_props$theme$anchor4 = _props$theme$anchor4[props.size]) == null ? void 0 : _props$theme$anchor4.textDecoration) || props.theme.anchor.textDecoration;\n}, genericStyles, function (props) {\n return !props.disabled && props.theme.anchor.hover && css([\"&:hover{\", \" \", \" \", \"}\"], props.theme.anchor.hover.textDecoration && \"text-decoration: \" + props.theme.anchor.hover.textDecoration + \";\", props.theme.anchor.hover.fontWeight && \"font-weight: \" + props.theme.anchor.hover.fontWeight + \";\", props.theme.anchor.hover.extend);\n}, function (props) {\n return props.hasIcon && !props.hasLabel && \"\\n padding: \" + props.theme.global.edgeSize.small + \";\\n \";\n}, function (props) {\n return props.disabled && disabledStyle;\n}, function (props) {\n return props.focus && focusStyle();\n}, function (props) {\n return props.theme.anchor.extend;\n});\nStyledAnchor.defaultProps = {};\nObject.setPrototypeOf(StyledAnchor.defaultProps, defaultProps);\nexport { StyledAnchor };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { colorPropType, genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n a11yTitle: PropTypes.string,\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.elementType]),\n color: colorPropType,\n disabled: PropTypes.bool,\n gap: PropTypes.oneOfType([PropTypes.oneOf(['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n href: PropTypes.string,\n icon: PropTypes.element,\n label: PropTypes.node,\n onClick: PropTypes.func,\n reverse: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge']), PropTypes.string]),\n weight: PropTypes.oneOfType([PropTypes.oneOf(['normal', 'bold']), PropTypes.string, PropTypes.number])\n });\n}\nexport var AnchorPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"aria-label\", \"children\", \"color\", \"disabled\", \"gap\", \"href\", \"icon\", \"label\", \"onBlur\", \"onClick\", \"onFocus\", \"reverse\", \"size\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { cloneElement, forwardRef, useCallback, useContext, useEffect, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { findButtonParent, normalizeColor, useSizedIcon } from '../../utils';\nimport { Box } from '../Box';\nimport { StyledAnchor } from './StyledAnchor';\nimport { AnchorPropTypes } from './propTypes';\nimport { useAnalytics } from '../../contexts/AnalyticsContext';\nimport { TextContext } from '../Text/TextContext';\nvar Anchor = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n children = _ref.children,\n color = _ref.color,\n disabled = _ref.disabled,\n gap = _ref.gap,\n href = _ref.href,\n icon = _ref.icon,\n label = _ref.label,\n _onBlur = _ref.onBlur,\n onClickProp = _ref.onClick,\n _onFocus = _ref.onFocus,\n reverse = _ref.reverse,\n sizeProp = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n var _useContext = useContext(TextContext),\n size = _useContext.size;\n var sendAnalytics = useAnalytics();\n var onClick = useCallback(function (event) {\n sendAnalytics({\n type: 'anchorClick',\n element: findButtonParent(event.target),\n event: event,\n href: href,\n label: typeof label === 'string' ? label : undefined\n });\n if (onClickProp) onClickProp(event);\n }, [onClickProp, sendAnalytics, label, href]);\n useEffect(function () {\n if ((icon || label) && children) {\n console.warn('Anchor should not have children if icon or label is provided');\n }\n }, [children, icon, label]);\n var coloredIcon = icon;\n if (icon && !icon.props.color) {\n var _theme$anchor;\n coloredIcon = /*#__PURE__*/cloneElement(icon, {\n color: normalizeColor(color || ((_theme$anchor = theme.anchor) == null || (_theme$anchor = _theme$anchor.size) == null || (_theme$anchor = _theme$anchor[sizeProp || size]) == null ? void 0 : _theme$anchor.color) || theme.anchor.color, theme)\n });\n }\n var anchorIcon = useSizedIcon(coloredIcon, sizeProp || size, theme);\n var first = reverse ? label : anchorIcon;\n var second = reverse ? anchorIcon : label;\n return /*#__PURE__*/React.createElement(StyledAnchor, _extends({}, rest, {\n ref: ref,\n \"aria-label\": ariaLabel || a11yTitle,\n colorProp: color,\n disabled: disabled,\n hasIcon: !!icon,\n focus: focus,\n hasLabel: label,\n reverse: reverse,\n href: !disabled ? href : undefined,\n onClick: !disabled ? onClick : undefined,\n onFocus: function onFocus(event) {\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n },\n size: sizeProp || size\n }), first && second ? /*#__PURE__*/React.createElement(Box, {\n as: \"span\",\n direction: \"row\",\n align: \"center\",\n gap: gap || theme.anchor.gap,\n responsive: false,\n style: {\n display: 'inline-flex'\n }\n }, first, second) : first || second || children);\n});\nAnchor.displayName = 'Anchor';\nAnchor.propTypes = AnchorPropTypes;\nexport { Anchor };","import styled, { css } from 'styled-components';\nimport { fillStyle, genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar FIT_MAP = {\n cover: 'cover',\n contain: 'contain'\n};\nvar fitStyle = css([\"flex:1 1;overflow:hidden;object-fit:\", \";\"], function (props) {\n return FIT_MAP[props.fit];\n});\nvar StyledImage = styled.img.withConfig({\n displayName: \"StyledImage\",\n componentId: \"sc-ey4zx9-0\"\n})([\"\", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return props.fit && fitStyle;\n}, function (props) {\n return props.fillProp && fillStyle(props.fillProp);\n}, function (props) {\n return props.theme.image && props.theme.image.extend;\n}, function (props) {\n return props.opacityProp && \"opacity: \" + (props.opacityProp === true ? props.theme.global.opacity.medium : props.theme.global.opacity[props.opacityProp] || props.opacityProp) + \";\\n \";\n});\nStyledImage.defaultProps = {};\nObject.setPrototypeOf(StyledImage.defaultProps, defaultProps);\nexport { StyledImage };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),\n fit: PropTypes.oneOf(['cover', 'contain']),\n fallback: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.oneOf(['weak', 'medium', 'strong']), PropTypes.string, PropTypes.bool])\n });\n}\nexport var ImagePropTypes = PropType;","var _excluded = [\"a11yTitle\", \"fallback\", \"onError\", \"onLoad\", \"opacity\", \"fill\", \"src\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useState } from 'react';\nimport { StyledImage } from './StyledImage';\nimport { ImagePropTypes } from './propTypes';\nvar Image = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n fallback = _ref.fallback,\n onError = _ref.onError,\n onLoad = _ref.onLoad,\n opacity = _ref.opacity,\n fill = _ref.fill,\n src = _ref.src,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useState = useState(false),\n isFallbackInUse = _useState[0],\n setFallbackInUse = _useState[1];\n var handleError = function handleError(event) {\n if (onError) onError(event);\n if (!isFallbackInUse && fallback && fallback !== '') {\n // eslint-disable-next-line no-param-reassign\n event.target.src = fallback;\n setFallbackInUse(true);\n }\n };\n var handleOnLoad = function handleOnLoad(event) {\n if (onLoad) onLoad(event);\n setFallbackInUse(false);\n };\n var extraProps = {\n onError: (onError || fallback) && handleError,\n onLoad: handleOnLoad\n };\n return /*#__PURE__*/React.createElement(StyledImage, _extends({\n \"aria-label\": a11yTitle\n }, rest, extraProps, {\n ref: ref,\n opacityProp: opacity,\n fillProp: fill,\n src: src === undefined ? '' : src\n }));\n});\nImage.displayName = 'Image';\nImage.propTypes = ImagePropTypes;\nexport { Image };","import styled from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nvar StyledAvatarText = styled(Text).withConfig({\n displayName: \"StyledAvatar__StyledAvatarText\",\n componentId: \"sc-1suyamb-0\"\n})([\"\", \" \", \"\"], function (props) {\n return props.theme.avatar && props.theme.avatar.text && props.theme.avatar.text.fontWeight && \"font-weight: \" + props.theme.avatar.text.fontWeight + \";\";\n}, function (props) {\n return props.theme.avatar.text && props.theme.avatar.text.extend;\n});\nStyledAvatarText.defaultProps = {};\nObject.setPrototypeOf(StyledAvatarText.defaultProps, defaultProps);\nvar StyledAvatar = styled(Box).withConfig({\n displayName: \"StyledAvatar\",\n componentId: \"sc-1suyamb-1\"\n})([\"\", \"\"], function (props) {\n return props.theme.avatar && props.theme.avatar.extend;\n});\nStyledAvatar.defaultProps = {};\nObject.setPrototypeOf(StyledAvatar.defaultProps, defaultProps);\nexport { StyledAvatar, StyledAvatarText };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', '2xl', '3xl', '4xl', '5xl']), PropTypes.string]),\n src: PropTypes.string\n };\n}\nexport var AvatarPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"aria-label\", \"align\", \"children\", \"height\", \"justify\", \"round\", \"size\", \"src\", \"width\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Image } from '../Image';\nimport { defaultProps } from '../../default-props';\nimport { StyledAvatar, StyledAvatarText } from './StyledAvatar';\nimport { AvatarPropTypes } from './propTypes';\nvar Avatar = function Avatar(_ref) {\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n _ref$align = _ref.align,\n align = _ref$align === void 0 ? 'center' : _ref$align,\n children = _ref.children,\n height = _ref.height,\n _ref$justify = _ref.justify,\n justify = _ref$justify === void 0 ? 'center' : _ref$justify,\n _ref$round = _ref.round,\n round = _ref$round === void 0 ? 'full' : _ref$round,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 'medium' : _ref$size,\n src = _ref.src,\n width = _ref.width,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var avatarSize = theme.avatar.size[size] || size;\n var avatarTextSize = theme.avatar.text.size[size] || 'large';\n var avatarProps = useMemo(function () {\n return {\n align: align,\n height: avatarSize,\n justify: justify,\n overflow: 'hidden',\n round: round,\n width: avatarSize\n };\n }, [align, avatarSize, justify, round]);\n var AvatarChildren = useCallback(function () {\n return /*#__PURE__*/React.createElement(StyledAvatar, _extends({}, avatarProps, rest), children);\n }, [avatarProps, children, rest]);\n if (height || width) {\n console.warn('Avatar should use `size` instead of `height` or `width` props');\n }\n var content;\n if (typeof children === 'string') {\n content = /*#__PURE__*/React.createElement(StyledAvatarText, {\n alignSelf: \"center\",\n size: avatarTextSize\n }, children);\n } else if (typeof src === 'string') {\n content = /*#__PURE__*/React.createElement(Image, {\n role: \"presentation\",\n fit: \"contain\",\n src: src\n });\n }\n if (typeof children === 'string' || typeof src === 'string') {\n return /*#__PURE__*/React.createElement(StyledAvatar, _extends({\n role: typeof src === 'string' ? 'figure' : undefined,\n a11yTitle: a11yTitle || ariaLabel\n }, avatarProps, rest), content);\n }\n return /*#__PURE__*/React.createElement(AvatarChildren, null);\n};\nAvatar.propTypes = AvatarPropTypes;\nexport { Avatar };","var _excluded = [\"sticky\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useEffect } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { findScrollParent, useForwardedRef } from '../../utils';\nimport { Box } from '../Box';\nvar Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var _theme$header2;\n var sticky = _ref.sticky,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext);\n var headerRef = useForwardedRef(ref);\n useEffect(function () {\n var scrollTop = 0;\n var updateScrollDir = function updateScrollDir() {\n // target is its scroll parent\n var target = findScrollParent(headerRef.current);\n var header = headerRef.current;\n if (target && sticky === 'scrollup') {\n var nextScrollTop = target === document ? window.pageYOffset : target.scrollTop;\n if (scrollTop - nextScrollTop <= 0) {\n header.style.top = \"-\" + header.getBoundingClientRect().height + \"px\";\n header.style.zIndex = '';\n } else if (scrollTop - nextScrollTop > 0) {\n var _theme$header;\n // ensure that header moves with the target\n header.style.position = 'sticky';\n header.style.top = '0px';\n header.style.zIndex = \"\" + ((_theme$header = theme.header) == null || (_theme$header = _theme$header.sticky) == null ? void 0 : _theme$header.zIndex);\n header.style.transition = 'top 0.6s';\n }\n scrollTop = nextScrollTop;\n }\n };\n if (sticky === 'scrollup') {\n updateScrollDir();\n window.addEventListener('resize', updateScrollDir);\n window.addEventListener('scroll', updateScrollDir, true);\n }\n return function () {\n if (sticky === 'scrollup') {\n window.removeEventListener('resize', updateScrollDir);\n window.removeEventListener('scroll', updateScrollDir, true);\n }\n };\n }, [headerRef, sticky, (_theme$header2 = theme.header) == null || (_theme$header2 = _theme$header2.sticky) == null ? void 0 : _theme$header2.zIndex]);\n return /*#__PURE__*/React.createElement(Box, _extends({\n align: \"center\",\n as: \"header\",\n direction: \"row\",\n flex: false,\n justify: \"between\",\n gap: \"medium\",\n ref: headerRef\n }, rest));\n});\nHeader.displayName = 'Header';\nexport { Header };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n activeDate: PropTypes.oneOf(['start', 'end']),\n animate: PropTypes.bool,\n bounds: PropTypes.arrayOf(PropTypes.string),\n children: PropTypes.func,\n date: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]))]),\n dates: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)])),\n disabled: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)])),\n daysOfWeek: PropTypes.bool,\n fill: PropTypes.bool,\n firstDayOfWeek: PropTypes.oneOf([0, 1]),\n header: PropTypes.func,\n locale: PropTypes.string,\n messages: PropTypes.shape({\n previous: PropTypes.string,\n next: PropTypes.string\n }),\n onReference: PropTypes.func,\n onSelect: PropTypes.func,\n range: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['array'])]),\n reference: PropTypes.string,\n showAdjacentDays: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['trim'])]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string])\n });\n}\nexport var CalendarPropTypes = PropType;","import styled, { css, keyframes } from 'styled-components';\nimport { backgroundStyle, focusStyle, genericStyles, kindPartStyles, parseMetricToNum } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar sizeStyle = function sizeStyle(props) {\n var data = props.theme.calendar[props.sizeProp];\n var width = props.fillContainer ? '100%' : props.theme.global.size[props.sizeProp];\n return css([\"font-size:\", \";line-height:\", \";width:\", \";\", \"\"], data.fontSize, data.lineHeight, width, function (p) {\n return p.fillContainer && 'height: 100%;';\n });\n};\nvar StyledCalendar = styled.div.withConfig({\n displayName: \"StyledCalendar\",\n componentId: \"sc-1y4xhmp-0\"\n})([\"\", \" \", \" \", \"\"], genericStyles, function (props) {\n return sizeStyle(props);\n}, function (props) {\n return props.theme.calendar && props.theme.calendar.extend;\n});\nStyledCalendar.defaultProps = {};\nObject.setPrototypeOf(StyledCalendar.defaultProps, defaultProps);\nvar weeksContainerSizeStyle = function weeksContainerSizeStyle(props) {\n var height = props.fillContainer ? '100%' : parseMetricToNum(props.theme.calendar[props.sizeProp].daySize) * 6 + \"px\";\n return \"\\n height: \" + height + \";\\n\\n \";\n};\nvar StyledWeeksContainer = styled.div.withConfig({\n displayName: \"StyledCalendar__StyledWeeksContainer\",\n componentId: \"sc-1y4xhmp-1\"\n})([\"overflow:hidden;\", \" \", \";\"], function (props) {\n return weeksContainerSizeStyle(props);\n}, function (props) {\n return props.focus && !props.plain && focusStyle();\n});\nStyledWeeksContainer.defaultProps = {};\nObject.setPrototypeOf(StyledWeeksContainer.defaultProps, defaultProps);\nvar slideStyle = function slideStyle(props) {\n var _props$slide = props.slide,\n direction = _props$slide.direction,\n weeks = _props$slide.weeks,\n sizeProp = props.sizeProp,\n theme = props.theme;\n var _theme$calendar$sizeP = theme.calendar[sizeProp],\n daySize = _theme$calendar$sizeP.daySize,\n slideDuration = _theme$calendar$sizeP.slideDuration;\n var amount = parseMetricToNum(daySize) * weeks;\n var translateYFrom = direction === 'down' ? \"-\" + amount + \"px\" : '0';\n var translateYTo = direction === 'up' ? \"-\" + amount + \"px\" : '0';\n var slideTransition = css([\"0%{transform:translateY(\", \");}100%{transform:translateY(\", \");}\"], translateYFrom, translateYTo);\n return css([\"animation:\", \" \", \" forwards;\"], keyframes([\"\", \"\"], slideTransition), slideDuration);\n};\nvar weeksSizeStyle = function weeksSizeStyle() {\n return css([\"display:flex;flex-direction:column;height:100%;\"]);\n};\nvar StyledWeeks = styled.div.withConfig({\n displayName: \"StyledCalendar__StyledWeeks\",\n componentId: \"sc-1y4xhmp-2\"\n})([\"position:relative;\", \" \", \";\"], function (props) {\n return props.fillContainer && weeksSizeStyle();\n}, function (props) {\n return props.slide && slideStyle(props);\n});\nStyledWeeks.defaultProps = {};\nObject.setPrototypeOf(StyledWeeks.defaultProps, defaultProps);\nvar StyledWeek = styled.div.withConfig({\n displayName: \"StyledCalendar__StyledWeek\",\n componentId: \"sc-1y4xhmp-3\"\n})([\"display:flex;justify-content:space-between;\", \"\"], function (props) {\n return props.fillContainer && 'flex: 1;';\n});\nStyledWeek.defaultProps = {};\nObject.setPrototypeOf(StyledWeek.defaultProps, defaultProps);\n\n// The width of 14.3% is derived from dividing 100/7. We want the\n// widths of 7 days to equally fill 100% of the row.\nvar StyledDayContainer = styled.div.withConfig({\n displayName: \"StyledCalendar__StyledDayContainer\",\n componentId: \"sc-1y4xhmp-4\"\n})([\"flex:0 1 auto;\", \"\"], function (props) {\n return props.fillContainer && 'width: 14.3%;';\n});\nStyledDayContainer.defaultProps = {};\nObject.setPrototypeOf(StyledDayContainer.defaultProps, defaultProps);\nvar daySizeStyle = function daySizeStyle(props) {\n var data = props.theme.calendar[props.sizeProp];\n return css([\"width:\", \";height:\", \";\"], props.fillContainer ? '100%' : data.daySize, props.fillContainer ? '100%' : data.daySize);\n};\nvar StyledDay = styled.div.withConfig({\n displayName: \"StyledCalendar__StyledDay\",\n componentId: \"sc-1y4xhmp-5\"\n})([\"display:flex;justify-content:center;align-items:center;\", \" \", \" \", \" \", \" \", \" \", \"\"], function (props) {\n return daySizeStyle(props);\n}, function (props) {\n return props.isSelected && backgroundStyle('control', props.theme) || props.inRange && backgroundStyle({\n color: 'control',\n opacity: 'weak'\n }, props.theme);\n}, function (props) {\n return props.otherMonth && 'opacity: 0.5;';\n}, function (props) {\n return props.isSelected && 'font-weight: bold;';\n}, function (props) {\n return (\n // when theme uses kind Buttons, since we use children for Button,\n // we have to special case how we handle disabled days here\n props.disabledProp && props.theme.button[\"default\"] && kindPartStyles(props.theme.button.disabled, props.theme)\n );\n}, function (props) {\n return props.theme.calendar && props.theme.calendar.day && props.theme.calendar.day.extend;\n});\nStyledDay.defaultProps = {};\nObject.setPrototypeOf(StyledDay.defaultProps, defaultProps);\nexport { StyledCalendar, StyledWeeksContainer, StyledWeeks, StyledWeek, StyledDayContainer, StyledDay };","// Utility functions for the Calendar.\n// Just what's needed to avoid having to include a dependency like momentjs.\n\nvar DAY_MILLISECONDS = 24 * 60 * 60 * 1000;\nexport var addDays = function addDays(date, days) {\n var result = new Date(date.getTime() + DAY_MILLISECONDS * days);\n // Deal with crossing the daylight savings time boundary,\n // where adding a day's worth when the time is midnight results in\n // being a day off.\n var hourDelta = result.getHours() - date.getHours();\n // At this point, hourDelta is typically 0 (normal day),\n // +23 (November daylight saving), or -23 (March Daylight saving)\n // depending on which side of the switch we are on.\n // Convert so that hourDelta is either +1 or -1.\n if (hourDelta === 23) {\n hourDelta -= 24;\n } else if (hourDelta === -23) {\n hourDelta += 24;\n }\n result.setHours(result.getHours() - hourDelta);\n return result;\n};\nexport var subtractDays = function subtractDays(date, days) {\n return addDays(date, -days);\n};\nexport var addMonths = function addMonths(date, months) {\n var result = new Date(date);\n var years = Math.floor((date.getMonth() + months) / 12);\n result.setFullYear(date.getFullYear() + years);\n var targetMonth = (date.getMonth() + months) % 12;\n result.setMonth(targetMonth < 0 ? 12 + targetMonth : targetMonth);\n return result;\n};\nexport var subtractMonths = function subtractMonths(date, months) {\n return addMonths(date, -months);\n};\nexport var startOfMonth = function startOfMonth(date) {\n var result = new Date(date);\n result.setDate(1);\n return result;\n};\nexport var endOfMonth = function endOfMonth(date) {\n var result = addMonths(date, 1);\n result.setDate(0);\n return result;\n};\nexport var sameDay = function sameDay(date1, date2) {\n return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();\n};\nexport var sameDayOrAfter = function sameDayOrAfter(date1, date2) {\n return date1.getFullYear() > date2.getFullYear() || date1.getFullYear() === date2.getFullYear() && (date1.getMonth() > date2.getMonth() || date1.getMonth() === date2.getMonth() && date1.getDate() >= date2.getDate());\n};\nexport var sameDayOrBefore = function sameDayOrBefore(date1, date2) {\n return date1.getFullYear() < date2.getFullYear() || date1.getFullYear() === date2.getFullYear() && (date1.getMonth() < date2.getMonth() || date1.getMonth() === date2.getMonth() && date1.getDate() <= date2.getDate());\n};\nexport var daysApart = function daysApart(date1, date2) {\n return Math.floor((date1.getTime() - date2.getTime()) / DAY_MILLISECONDS);\n};\n\n// betweenDates takes an array of two elements and checks if the\n// supplied date lies between them, inclusive.\n// returns 2 if exact match to one end, 1 if between, undefined otherwise\nexport var betweenDates = function betweenDates(date, dates) {\n var result;\n if (dates) {\n var _ref = Array.isArray(dates) ? dates.map(function (d) {\n return d ? new Date(d) : undefined;\n }) : [dates, undefined],\n from = _ref[0],\n to = _ref[1];\n if (from && sameDay(date, from) || to && sameDay(date, to)) {\n result = 2;\n } else if (from && sameDayOrAfter(date, from) && to && sameDayOrBefore(date, to)) {\n result = 1;\n }\n } else {\n result = 1;\n }\n return result;\n};\n\n// withinDates takes an array of string dates or 2 element arrays and\n// checks whether the supplied date matches any string or is between\n// any dates in arrays.\n// returns 2 if exact match, 1 if between, undefined otherwise\nexport var withinDates = function withinDates(date, dates) {\n var result;\n if (dates) {\n if (Array.isArray(dates)) {\n dates.some(function (d) {\n if (d instanceof Date) {\n if (sameDay(date, d)) {\n result = 2;\n }\n } else {\n result = betweenDates(date, d);\n }\n return result;\n });\n } else if (sameDay(date, dates)) {\n result = 2;\n }\n }\n return result;\n};\nexport var handleOffset = function handleOffset(date) {\n var normalizedDate = new Date(date);\n var offset = normalizedDate.getTimezoneOffset();\n var hour = normalizedDate.getHours();\n // add back offset\n normalizedDate.setHours(hour, offset < 0 ? -offset : offset);\n return normalizedDate;\n};","var _excluded = [\"activeDate\", \"animate\", \"bounds\", \"children\", \"date\", \"dates\", \"daysOfWeek\", \"disabled\", \"initialFocus\", \"fill\", \"firstDayOfWeek\", \"header\", \"locale\", \"messages\", \"onReference\", \"onSelect\", \"range\", \"reference\", \"showAdjacentDays\", \"size\", \"timestamp\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { AnnounceContext } from '../../contexts/AnnounceContext';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Header } from '../Header';\nimport { Heading } from '../Heading';\nimport { Keyboard } from '../Keyboard';\nimport { Text } from '../Text';\nimport { CalendarPropTypes } from './propTypes';\nimport { StyledCalendar, StyledDay, StyledDayContainer, StyledWeek, StyledWeeks, StyledWeeksContainer } from './StyledCalendar';\nimport { addDays, addMonths, betweenDates, daysApart, endOfMonth, handleOffset, sameDayOrAfter, sameDayOrBefore, startOfMonth, subtractDays, subtractMonths, withinDates } from './utils';\nimport { setHoursWithOffset } from '../../utils/dates';\nvar headingPadMap = {\n small: 'xsmall',\n medium: 'small',\n large: 'medium'\n};\nvar getLocaleString = function getLocaleString(value, locale) {\n return value == null ? void 0 : value.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n year: 'numeric'\n });\n};\nvar currentlySelectedString = function currentlySelectedString(value, locale) {\n var selected;\n if (value instanceof Date) {\n selected = \"Currently selected \" + getLocaleString(value, locale) + \";\";\n } else if (value != null && value.length) {\n selected = \"Currently selected \" + value.map(function (item) {\n var dates;\n if (!Array.isArray(item)) {\n dates = \"\" + getLocaleString(item, locale);\n } else {\n var start = item[0] !== undefined ? getLocaleString(item[0], locale) : 'none';\n var end = item[1] !== undefined ? getLocaleString(item[1], locale) : 'none';\n dates = start + \" through \" + end;\n }\n return dates;\n });\n } else {\n selected = 'No date selected';\n }\n return selected;\n};\n\n// calendar value may be a single date, multiple dates, a range of dates\n// supplied as ISOstrings.\nvar normalizeInput = function normalizeInput(dateValue) {\n var result;\n if (dateValue instanceof Date) {\n result = dateValue;\n }\n // date may be an empty string ''\n else if (typeof dateValue === 'string' && dateValue.length) {\n result = setHoursWithOffset(dateValue);\n } else if (Array.isArray(dateValue)) {\n result = dateValue.map(function (d) {\n return normalizeInput(d);\n });\n }\n return result;\n};\nvar normalizeOutput = function normalizeOutput(dateValue, outputFormat) {\n var result;\n var normalize = function normalize(value) {\n var normalizedValue = value.toISOString();\n if (normalizedValue && outputFormat === 'no timezone') {\n var _handleOffset$toISOSt = handleOffset(normalizedValue).toISOString().split('T');\n normalizedValue = _handleOffset$toISOSt[0];\n }\n return normalizedValue;\n };\n if (dateValue instanceof Date) {\n result = normalize(dateValue);\n } else if (typeof dateValue === 'undefined') {\n result = undefined;\n } else {\n result = dateValue.map(function (d) {\n return normalizeOutput(d, outputFormat);\n });\n }\n return result;\n};\n\n// format value to [[]] for internal functions\nvar normalizeRange = function normalizeRange(value, activeDate) {\n var range = value;\n if (range instanceof Date) range = activeDate === 'start' ? [[undefined, range]] : [[range, undefined]];else if (Array.isArray(range) && !Array.isArray(range[0])) range = [range];\n return range;\n};\nvar getReference = function getReference(reference, value) {\n var nextReference;\n if (value) {\n if (Array.isArray(value)) {\n if (value[0] instanceof Date) {\n nextReference = value[0];\n } else if (Array.isArray(value[0])) {\n nextReference = value[0][0] ? value[0][0] : value[0][1];\n } else {\n nextReference = new Date();\n nextReference.setHours(0, 0, 0, 0);\n }\n } else nextReference = value;\n } else if (reference) {\n nextReference = reference;\n } else {\n nextReference = new Date();\n nextReference.setHours(0, 0, 0, 0);\n }\n return nextReference;\n};\nvar buildDisplayBounds = function buildDisplayBounds(reference, firstDayOfWeek) {\n var start = new Date(reference);\n start.setDate(1); // first of month\n\n // In case Sunday is the first day of the month, and the user asked for Monday\n // to be the first day of the week, then we need to include Sunday and six\n // days prior.\n start = start.getDay() === 0 && firstDayOfWeek === 1 ? start = subtractDays(start, 6) :\n // beginning of week\n start = subtractDays(start, start.getDay() - firstDayOfWeek);\n var end = addDays(start, 7 * 5 + 7); // 5 weeks to end of week\n return [start, end];\n};\nvar disabledCalendarPreviousMonthButton = function disabledCalendarPreviousMonthButton(date, reference, bounds) {\n if (!bounds) return false;\n var lastBound = new Date(bounds[1]);\n return !sameDayOrBefore(lastBound, reference) && !betweenDates(date, bounds);\n};\nvar disabledCalendarNextMonthButton = function disabledCalendarNextMonthButton(date, reference, bounds) {\n if (!bounds) return false;\n var firstBound = new Date(bounds[0]);\n return !sameDayOrAfter(firstBound, reference) && !betweenDates(date, bounds);\n};\nexport var getOutputFormat = function getOutputFormat(dates) {\n if (typeof dates === 'string' && (dates == null ? void 0 : dates.indexOf('T')) === -1) {\n return 'no timezone';\n }\n if (Array.isArray(dates)) {\n return getOutputFormat(dates[0]);\n }\n return 'date timezone';\n};\nvar millisecondsPerYear = 31557600000;\nvar CalendarDayButton = function CalendarDayButton(props) {\n return /*#__PURE__*/React.createElement(Button, _extends({\n tabIndex: -1,\n plain: true\n }, props));\n};\nvar CalendarDay = function CalendarDay(_ref) {\n var children = _ref.children,\n fill = _ref.fill,\n size = _ref.size,\n isInRange = _ref.isInRange,\n isSelected = _ref.isSelected,\n otherMonth = _ref.otherMonth,\n _ref$buttonProps = _ref.buttonProps,\n buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps;\n return /*#__PURE__*/React.createElement(StyledDayContainer, {\n role: \"gridcell\",\n sizeProp: size,\n fillContainer: fill\n }, /*#__PURE__*/React.createElement(CalendarDayButton, _extends({\n fill: fill\n }, buttonProps), /*#__PURE__*/React.createElement(StyledDay, {\n disabledProp: buttonProps.disabled,\n inRange: isInRange,\n otherMonth: otherMonth,\n isSelected: isSelected,\n sizeProp: size,\n fillContainer: fill\n }, children)));\n};\nvar CalendarCustomDay = function CalendarCustomDay(_ref2) {\n var children = _ref2.children,\n fill = _ref2.fill,\n size = _ref2.size,\n buttonProps = _ref2.buttonProps;\n if (!buttonProps) {\n return /*#__PURE__*/React.createElement(StyledDayContainer, {\n role: \"gridcell\",\n sizeProp: size,\n fillContainer: fill\n }, children);\n }\n return /*#__PURE__*/React.createElement(StyledDayContainer, {\n role: \"gridcell\",\n sizeProp: size,\n fillContainer: fill\n }, /*#__PURE__*/React.createElement(CalendarDayButton, _extends({\n fill: fill\n }, buttonProps), children));\n};\nvar Calendar = /*#__PURE__*/forwardRef(function (_ref3, ref) {\n var activeDateProp = _ref3.activeDate,\n _ref3$animate = _ref3.animate,\n animate = _ref3$animate === void 0 ? true : _ref3$animate,\n boundsProp = _ref3.bounds,\n children = _ref3.children,\n dateProp = _ref3.date,\n datesProp = _ref3.dates,\n daysOfWeek = _ref3.daysOfWeek,\n disabled = _ref3.disabled,\n initialFocus = _ref3.initialFocus,\n fill = _ref3.fill,\n _ref3$firstDayOfWeek = _ref3.firstDayOfWeek,\n firstDayOfWeek = _ref3$firstDayOfWeek === void 0 ? 0 : _ref3$firstDayOfWeek,\n header = _ref3.header,\n _ref3$locale = _ref3.locale,\n locale = _ref3$locale === void 0 ? 'en-US' : _ref3$locale,\n messages = _ref3.messages,\n onReference = _ref3.onReference,\n onSelect = _ref3.onSelect,\n range = _ref3.range,\n referenceProp = _ref3.reference,\n _ref3$showAdjacentDay = _ref3.showAdjacentDays,\n showAdjacentDays = _ref3$showAdjacentDay === void 0 ? true : _ref3$showAdjacentDay,\n _ref3$size = _ref3.size,\n size = _ref3$size === void 0 ? 'medium' : _ref3$size,\n timestampProp = _ref3.timestamp,\n rest = _objectWithoutPropertiesLoose(_ref3, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var announce = useContext(AnnounceContext);\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n\n // when mousedown, we don't want to let Calendar set\n // active date to firstInMonth\n var _useState = useState(false),\n mouseDown = _useState[0],\n setMouseDown = _useState[1];\n var onMouseDown = function onMouseDown() {\n return setMouseDown(true);\n };\n var onMouseUp = function onMouseUp() {\n return setMouseDown(false);\n };\n useEffect(function () {\n document.addEventListener('mousedown', onMouseDown);\n document.addEventListener('mouseup', onMouseUp);\n return function () {\n document.removeEventListener('mousedown', onMouseDown);\n document.removeEventListener('mouseup', onMouseUp);\n };\n }, []);\n\n // set activeDate when caller changes it, allows us to change\n // it internally too\n var _useState2 = useState(dateProp && typeof dateProp === 'string' && range ? 'end' : 'start'),\n activeDate = _useState2[0],\n setActiveDate = _useState2[1];\n useEffect(function () {\n if (activeDateProp) setActiveDate(activeDateProp);\n }, [activeDateProp]);\n var _useState3 = useState(normalizeInput(dateProp || datesProp)),\n value = _useState3[0],\n setValue = _useState3[1];\n useEffect(function () {\n var val = dateProp || datesProp;\n setValue(normalizeInput(val));\n }, [dateProp, datesProp]);\n var _useState4 = useState(getReference(normalizeInput(referenceProp), value)),\n reference = _useState4[0],\n setReference = _useState4[1];\n useEffect(function () {\n if (value) {\n setReference(getReference(normalizeInput(referenceProp), value));\n }\n }, [referenceProp, value]);\n var _useState5 = useState(getOutputFormat(dateProp || datesProp)),\n outputFormat = _useState5[0],\n setOutputFormat = _useState5[1];\n useEffect(function () {\n setOutputFormat(getOutputFormat(dateProp || datesProp));\n }, [dateProp, datesProp]);\n\n // normalize bounds\n var _useState6 = useState(boundsProp),\n bounds = _useState6[0],\n setBounds = _useState6[1];\n useEffect(function () {\n if (boundsProp) setBounds(boundsProp);else setBounds(undefined);\n }, [boundsProp]);\n\n // calculate the bounds we display based on the reference\n var _useState7 = useState(buildDisplayBounds(reference, firstDayOfWeek)),\n displayBounds = _useState7[0],\n setDisplayBounds = _useState7[1];\n var _useState8 = useState(),\n targetDisplayBounds = _useState8[0],\n setTargetDisplayBounds = _useState8[1];\n var _useState9 = useState(),\n slide = _useState9[0],\n setSlide = _useState9[1];\n var _useState10 = useState(),\n animating = _useState10[0],\n setAnimating = _useState10[1];\n\n // When the reference changes, we need to update the displayBounds.\n // This is easy when we aren't animating. If we are animating,\n // we temporarily increase the displayBounds to be the union of the old\n // and new ones and set slide to drive the animation. We keep track\n // of where we are heading via targetDisplayBounds. When the animation\n // finishes, we prune displayBounds down to where we are headed and\n // clear the slide and targetDisplayBounds.\n useEffect(function () {\n var nextDisplayBounds = buildDisplayBounds(reference, firstDayOfWeek);\n\n // Checks if the difference between the current and next DisplayBounds is\n // greater than a year. If that's the case, calendar should update without\n // animation.\n if (nextDisplayBounds[0].getTime() !== displayBounds[0].getTime() && nextDisplayBounds[1].getTime() !== displayBounds[1].getTime()) {\n var diffBoundsAboveYear = false;\n if (nextDisplayBounds[0].getTime() < displayBounds[0].getTime()) {\n if (displayBounds[0].getTime() - nextDisplayBounds[0].getTime() > millisecondsPerYear) {\n diffBoundsAboveYear = true;\n }\n } else if (nextDisplayBounds[1].getTime() > displayBounds[1].getTime()) {\n if (nextDisplayBounds[1].getTime() - displayBounds[1].getTime() > millisecondsPerYear) {\n diffBoundsAboveYear = true;\n }\n }\n if (!animate || diffBoundsAboveYear) {\n setDisplayBounds(nextDisplayBounds);\n } else {\n setTargetDisplayBounds(nextDisplayBounds);\n }\n }\n }, [animate, firstDayOfWeek, reference, displayBounds]);\n useEffect(function () {\n // if the reference timezone has changed (e.g., controlled component),\n // both ends of the displayBounds should inherit that new timestamp\n if (targetDisplayBounds) {\n if (targetDisplayBounds[0].getTime() < displayBounds[0].getTime() || targetDisplayBounds[1].getTime() > displayBounds[1].getTime()) {\n setDisplayBounds([targetDisplayBounds[0], targetDisplayBounds[1]]);\n }\n if (targetDisplayBounds[0].getTime() < displayBounds[0].getTime()) {\n // only animate if the duration is within a year\n if (displayBounds[0].getTime() - targetDisplayBounds[0].getTime() < millisecondsPerYear && daysApart(displayBounds[0], targetDisplayBounds[0])) {\n setSlide({\n direction: 'down',\n weeks: daysApart(displayBounds[0], targetDisplayBounds[0]) / 7\n });\n setAnimating(true);\n }\n } else if (targetDisplayBounds[1].getTime() > displayBounds[1].getTime()) {\n if (targetDisplayBounds[1].getTime() - displayBounds[1].getTime() < millisecondsPerYear && daysApart(targetDisplayBounds[1], displayBounds[1])) {\n setSlide({\n direction: 'up',\n weeks: daysApart(targetDisplayBounds[1], displayBounds[1]) / 7\n });\n setAnimating(true);\n }\n }\n return undefined;\n }\n setSlide(undefined);\n return undefined;\n }, [animating, displayBounds, targetDisplayBounds]);\n\n // Last step in updating the displayBounds. Allows for pruning\n // displayBounds and cleaning up states to occur after animation.\n useEffect(function () {\n if (animating && targetDisplayBounds) {\n // Wait for animation to finish before cleaning up.\n var timer = setTimeout(function () {\n setDisplayBounds(targetDisplayBounds);\n setTargetDisplayBounds(undefined);\n setSlide(undefined);\n setAnimating(false);\n }, 400 // Empirically determined.\n );\n\n return function () {\n return clearTimeout(timer);\n };\n }\n return undefined;\n }, [animating, targetDisplayBounds]);\n\n // We have to deal with reference being the end of a month with more\n // days than the month we are changing to. So, we always set reference\n // to the first of the month before changing the month.\n var previousMonth = useMemo(function () {\n return endOfMonth(subtractMonths(startOfMonth(reference), 1));\n }, [reference]);\n var nextMonth = useMemo(function () {\n return startOfMonth(addMonths(startOfMonth(reference), 1));\n }, [reference]);\n var daysRef = useRef();\n var _useState11 = useState(),\n focus = _useState11[0],\n setFocus = _useState11[1];\n var _useState12 = useState(),\n active = _useState12[0],\n setActive = _useState12[1];\n useEffect(function () {\n if (initialFocus === 'days') daysRef.current.focus();\n }, [initialFocus]);\n var handleReference = useCallback(function (nextReference) {\n setReference(nextReference);\n if (onReference) onReference(nextReference.toISOString());\n }, [onReference]);\n var changeReference = useCallback(function (nextReference) {\n if (betweenDates(nextReference, bounds)) handleReference(nextReference);\n }, [handleReference, bounds]);\n var changeCalendarMonth = function changeCalendarMonth(messageId, newMonth) {\n handleReference(newMonth);\n announce(format({\n id: messageId,\n messages: messages,\n values: {\n date: newMonth.toLocaleDateString(locale, {\n month: 'long',\n year: 'numeric'\n })\n }\n }));\n };\n var handleRange = useCallback(function (selectedDate) {\n var _priorRange$, _priorRange$2;\n var result;\n var priorRange = normalizeRange(value, activeDate);\n // deselect when date clicked was the start/end of the range\n if (selectedDate.getTime() === (priorRange == null || (_priorRange$ = priorRange[0]) == null || (_priorRange$ = _priorRange$[0]) == null ? void 0 : _priorRange$.getTime())) {\n result = [[undefined, priorRange[0][1]]];\n setActiveDate('start');\n } else if (selectedDate.getTime() === (priorRange == null || (_priorRange$2 = priorRange[0]) == null || (_priorRange$2 = _priorRange$2[1]) == null ? void 0 : _priorRange$2.getTime())) {\n result = [[priorRange[0][0], undefined]];\n setActiveDate('end');\n }\n // selecting start date\n else if (activeDate === 'start') {\n if (!priorRange) {\n result = [[selectedDate, undefined]];\n } else if (!priorRange[0][1]) {\n result = [[selectedDate, priorRange[0][1]]];\n } else if (selectedDate.getTime() < priorRange[0][1].getTime()) {\n result = [[selectedDate, priorRange[0][1]]];\n } else if (selectedDate.getTime() > priorRange[0][1].getTime()) {\n result = [[selectedDate, undefined]];\n }\n setActiveDate('end');\n }\n // selecting end date\n else if (!priorRange) {\n result = [[undefined, selectedDate]];\n setActiveDate('start');\n } else if (selectedDate.getTime() < priorRange[0][0].getTime()) {\n result = [[selectedDate, undefined]];\n setActiveDate('end');\n } else if (selectedDate.getTime() > priorRange[0][0].getTime()) {\n result = [[priorRange[0][0], selectedDate]];\n setActiveDate('start');\n }\n\n // If no dates selected, always return undefined; else format\n // result according to specified range value.\n if (result[0].includes(undefined)) {\n if (range === 'array') {\n result = !result[0][0] && !result[0][1] ? undefined : result;\n } else {\n result = result[0].find(function (d) {\n return d !== undefined;\n });\n }\n }\n setValue(result);\n return result;\n }, [activeDate, value, range]);\n var selectDate = useCallback(function (selectedDate) {\n var nextValue;\n if (range || Array.isArray(value == null ? void 0 : value[0])) {\n nextValue = handleRange(selectedDate);\n } else {\n nextValue = selectedDate;\n }\n if (onSelect) {\n nextValue = normalizeOutput(nextValue, outputFormat);\n onSelect(nextValue);\n }\n }, [handleRange, onSelect, outputFormat, range, value]);\n var _onClick = function onClick(selectedDate) {\n selectDate(selectedDate);\n announce(\"Selected \" + getLocaleString(selectedDate, locale), 'assertive');\n // Chrome moves the focus indicator to this button. Set\n // the focus to the grid of days instead.\n daysRef.current.focus();\n setActive(selectedDate);\n };\n var renderCalendarHeader = function renderCalendarHeader() {\n var _theme$calendar$size;\n var PreviousIcon = size === 'small' ? theme.calendar.icons.small.previous : theme.calendar.icons.previous;\n var NextIcon = size === 'small' ? theme.calendar.icons.small.next : theme.calendar.icons.next;\n var monthAndYear = reference.toLocaleDateString(locale, {\n month: 'long',\n year: 'numeric'\n });\n return /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n justify: \"between\",\n align: \"center\"\n }, /*#__PURE__*/React.createElement(Header, {\n flex: true,\n pad: {\n horizontal: headingPadMap[size] || 'small'\n }\n }, (_theme$calendar$size = theme.calendar[size]) != null && _theme$calendar$size.title ? /*#__PURE__*/React.createElement(Text, theme.calendar[size].title, monthAndYear) :\n /*#__PURE__*/\n // theme.calendar.heading.level should be removed in v3 of grommet\n // theme.calendar[size].title should be used instead\n React.createElement(Heading, {\n level: size === 'small' ? theme.calendar.heading && theme.calendar.heading.level || 4 : (theme.calendar.heading && theme.calendar.heading.level || 4) - 1,\n size: size,\n margin: \"none\",\n overflowWrap: \"normal\"\n }, monthAndYear)), /*#__PURE__*/React.createElement(Box, {\n flex: false,\n direction: \"row\",\n align: \"center\"\n }, /*#__PURE__*/React.createElement(Button, {\n a11yTitle: format({\n id: 'calendar.previous',\n messages: messages,\n values: {\n date: previousMonth.toLocaleDateString(locale, {\n month: 'long',\n year: 'numeric'\n })\n }\n }),\n icon: /*#__PURE__*/React.createElement(PreviousIcon, {\n size: size !== 'small' ? size : undefined\n }),\n disabled: disabledCalendarPreviousMonthButton(previousMonth, reference, bounds),\n onClick: function onClick() {\n return changeCalendarMonth('calendar.previousMove', previousMonth);\n }\n }), /*#__PURE__*/React.createElement(Button, {\n a11yTitle: format({\n id: 'calendar.next',\n messages: messages,\n values: {\n date: nextMonth.toLocaleDateString(locale, {\n month: 'long',\n year: 'numeric'\n })\n }\n }),\n icon: /*#__PURE__*/React.createElement(NextIcon, {\n size: size !== 'small' ? size : undefined\n }),\n disabled: disabledCalendarNextMonthButton(nextMonth, reference, bounds),\n onClick: function onClick() {\n return changeCalendarMonth('calendar.nextMove', nextMonth);\n }\n })));\n };\n var renderDaysOfWeek = function renderDaysOfWeek() {\n var day = new Date(displayBounds[0]);\n var days = [];\n while (days.length < 7) {\n days.push( /*#__PURE__*/React.createElement(StyledDayContainer, {\n role: \"gridcell\",\n key: days.length,\n sizeProp: size,\n fillContainer: fill\n }, /*#__PURE__*/React.createElement(StyledDay, {\n otherMonth: true,\n sizeProp: size,\n fillContainer: fill\n }, day.toLocaleDateString(locale, {\n weekday: 'narrow'\n }))));\n day = addDays(day, 1);\n }\n return /*#__PURE__*/React.createElement(StyledWeek, {\n role: \"row\"\n }, days);\n };\n var weeks = [];\n var day = new Date(displayBounds[0]);\n var days;\n var firstDayInMonth;\n var blankWeek = false;\n var _loop = function _loop() {\n if (day.getDay() === firstDayOfWeek) {\n if (days) {\n weeks.push( /*#__PURE__*/React.createElement(StyledWeek, {\n role: \"row\",\n key: day.getTime(),\n fillContainer: fill\n }, days));\n }\n days = [];\n }\n var otherMonth = day.getMonth() !== reference.getMonth();\n if (!showAdjacentDays && otherMonth) {\n days.push( /*#__PURE__*/React.createElement(StyledDayContainer, {\n key: day.getTime(),\n sizeProp: size,\n fillContainer: fill\n }, /*#__PURE__*/React.createElement(StyledDay, {\n sizeProp: size,\n fillContainer: fill\n })));\n if (weeks.length === 5 &&\n /* If the length days array is less than the current getDate()\n we know that all days in the array are from the next month. */\n days.length < day.getDate()) {\n blankWeek = true;\n }\n } else if (\n /* Do not show adjacent days in 6th row if all days\n fall in the next month */\n showAdjacentDays === 'trim' && otherMonth && weeks.length === 5 &&\n /* If the length days array is less than the current getDate()\n we know that all days in the array are from the next month. */\n days.length < day.getDate()) {\n blankWeek = true;\n days.push( /*#__PURE__*/React.createElement(StyledDayContainer, {\n key: day.getTime(),\n sizeProp: size,\n fillContainer: fill\n }, /*#__PURE__*/React.createElement(StyledDay, {\n sizeProp: size,\n fillContainer: fill\n })));\n } else {\n var dateObject = day;\n // this.dayRefs[dateObject] = React.createRef();\n var selected = false;\n var inRange = false;\n var selectedState = withinDates(day, range ? normalizeRange(value, activeDate) : value);\n if (selectedState === 2) {\n selected = true;\n } else if (selectedState === 1) {\n inRange = true;\n }\n var dayDisabled = withinDates(day, normalizeInput(disabled)) || bounds && !betweenDates(day, normalizeInput(bounds));\n if (!firstDayInMonth && !dayDisabled && day.getMonth() === reference.getMonth()) {\n firstDayInMonth = dateObject;\n }\n if (!children) {\n days.push( /*#__PURE__*/React.createElement(CalendarDay, {\n key: day.getTime(),\n buttonProps: {\n a11yTitle: day.toDateString(),\n active: active && active.getTime() === day.getTime(),\n disabled: dayDisabled && !!dayDisabled,\n onClick: function onClick() {\n return _onClick(dateObject);\n },\n onMouseOver: function onMouseOver() {\n return setActive(dateObject);\n },\n onMouseOut: function onMouseOut() {\n return setActive(undefined);\n }\n },\n isInRange: inRange,\n isSelected: selected,\n otherMonth: day.getMonth() !== reference.getMonth(),\n size: size,\n fill: fill\n }, day.getDate()));\n } else {\n days.push( /*#__PURE__*/React.createElement(CalendarCustomDay, {\n key: day.getTime(),\n buttonProps: onSelect ? {\n a11yTitle: day.toDateString(),\n active: active && active.getTime() === day.getTime(),\n disabled: dayDisabled && !!dayDisabled,\n onClick: function onClick() {\n return _onClick(dateObject);\n },\n onMouseOver: function onMouseOver() {\n return setActive(dateObject);\n },\n onMouseOut: function onMouseOut() {\n return setActive(undefined);\n }\n } : null,\n size: size,\n fill: fill\n }, children({\n date: day,\n day: day.getDate(),\n isInRange: inRange,\n isSelected: selected\n })));\n }\n }\n day = addDays(day, 1);\n };\n while (day.getTime() < displayBounds[1].getTime()) {\n _loop();\n }\n weeks.push( /*#__PURE__*/React.createElement(StyledWeek\n // if a week contains only blank days, for screen reader accessibility\n // we don't want to set role=\"row\"\n , {\n role: !blankWeek ? 'row' : undefined,\n key: day.getTime(),\n fillContainer: fill\n }, days));\n return /*#__PURE__*/React.createElement(StyledCalendar, _extends({\n ref: ref,\n sizeProp: size,\n fillContainer: fill\n }, rest), /*#__PURE__*/React.createElement(Box, {\n fill: fill\n }, header ? header({\n date: reference,\n locale: locale,\n onPreviousMonth: function onPreviousMonth() {\n changeReference(previousMonth);\n announce(format({\n id: 'calendar.previous',\n messages: messages,\n values: {\n date: previousMonth.toLocaleDateString(locale, {\n month: 'long',\n year: 'numeric'\n })\n }\n }));\n },\n onNextMonth: function onNextMonth() {\n changeReference(nextMonth);\n announce(format({\n id: 'calendar.next',\n messages: messages,\n values: {\n date: nextMonth.toLocaleDateString(locale, {\n month: 'long',\n year: 'numeric'\n })\n }\n }));\n },\n previousInBound: betweenDates(previousMonth, bounds),\n nextInBound: betweenDates(nextMonth, bounds)\n }) : renderCalendarHeader(previousMonth, nextMonth), daysOfWeek && renderDaysOfWeek(), /*#__PURE__*/React.createElement(Keyboard, {\n onEnter: function onEnter() {\n return active !== undefined ? _onClick(active) : undefined;\n },\n onUp: function onUp(event) {\n event.preventDefault();\n event.stopPropagation(); // so the page doesn't scroll\n setActive(addDays(active, -7));\n if (!betweenDates(addDays(active, -7), displayBounds)) {\n changeReference(addDays(active, -7));\n }\n },\n onDown: function onDown(event) {\n event.preventDefault();\n event.stopPropagation(); // so the page doesn't scroll\n setActive(addDays(active, 7));\n if (!betweenDates(addDays(active, 7), displayBounds)) {\n changeReference(active);\n }\n },\n onLeft: function onLeft() {\n setActive(addDays(active, -1));\n if (!betweenDates(addDays(active, -1), displayBounds)) {\n changeReference(active);\n }\n },\n onRight: function onRight() {\n setActive(addDays(active, 1));\n if (!betweenDates(addDays(active, 2), displayBounds)) {\n changeReference(active);\n }\n }\n }, /*#__PURE__*/React.createElement(StyledWeeksContainer, {\n tabIndex: 0,\n role: \"grid\",\n \"aria-label\": reference.toLocaleDateString(locale, {\n month: 'long',\n year: 'numeric'\n }) + \"; \" + currentlySelectedString(value, locale),\n ref: daysRef,\n sizeProp: size,\n fillContainer: fill,\n focus: focus,\n onFocus: function onFocus() {\n setFocus(true);\n // caller focused onto Calendar via keyboard\n if (!mouseDown) {\n setActive(new Date(firstDayInMonth));\n }\n },\n onBlur: function onBlur() {\n setFocus(false);\n setActive(undefined);\n }\n }, /*#__PURE__*/React.createElement(StyledWeeks, {\n slide: slide,\n sizeProp: size,\n fillContainer: fill\n }, weeks)))));\n});\nCalendar.displayName = 'Calendar';\nCalendar.propTypes = CalendarPropTypes;\nexport { Calendar };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nvar Card = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _theme$card$hover;\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var theme = useContext(ThemeContext) || defaultProps.theme;\n return /*#__PURE__*/React.createElement(Box, _extends({\n overflow: \"hidden\",\n kind: _extends({\n hover: (_theme$card$hover = theme.card.hover) == null ? void 0 : _theme$card$hover.container\n }, theme.card.container),\n ref: ref\n }, theme.card.container, rest));\n});\nCard.displayName = 'Card';\nexport { Card };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nvar CardBody = function CardBody(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var theme = useContext(ThemeContext) || defaultProps.theme;\n return /*#__PURE__*/React.createElement(Box, _extends({\n flex: true\n }, theme.card.body, rest));\n};\nexport { CardBody };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from 'react';\nimport { Box } from '../Box';\nvar Footer = function Footer(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/React.createElement(Box, _extends({\n as: \"footer\",\n align: \"center\",\n direction: \"row\",\n flex: false,\n gap: \"medium\",\n justify: \"between\"\n }, rest));\n};\nexport { Footer };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Footer } from '../Footer';\n\n// Needs to have a CardBody or a flex container when Card uses a fixed height.\nvar CardFooter = function CardFooter(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var theme = useContext(ThemeContext) || defaultProps.theme;\n return /*#__PURE__*/React.createElement(Footer, _extends({}, theme.card.footer, rest));\n};\nexport { CardFooter };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Header } from '../Header';\nvar CardHeader = function CardHeader(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var theme = useContext(ThemeContext) || defaultProps.theme;\n return /*#__PURE__*/React.createElement(Header, _extends({}, theme.card.header, rest));\n};\nexport { CardHeader };","import React from 'react';\nexport var DataContext = /*#__PURE__*/React.createContext({\n data: [],\n addToolbarKey: function addToolbarKey() {}\n});","import styled, { css } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { alignContentStyle, alignStyle, borderStyle, edgeStyle, genericStyles, heightStyle, widthStyle } from '../../utils';\nvar fillStyle = function fillStyle(fill) {\n if (!fill) {\n return fill;\n }\n if (fill === 'horizontal') {\n return 'width: 100%;';\n }\n if (fill === 'vertical') {\n return 'height: 100%;';\n }\n return \"\\n width: 100%;\\n height: 100%;\\n \";\n};\nvar JUSTIFY_MAP = {\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nvar justifyStyle = css([\"justify-items:\", \";\"], function (props) {\n return JUSTIFY_MAP[props.justify];\n});\nvar JUSTIFY_CONTENT_MAP = {\n around: 'space-around',\n between: 'space-between',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nvar justifyContentStyle = css([\"justify-content:\", \";\"], function (props) {\n return JUSTIFY_CONTENT_MAP[props.justifyContent];\n});\nvar gapSizes = function gapSizes(props) {\n var result = [];\n if (typeof props.gap === 'string') {\n var size = props.theme.global.edgeSize[props.gap] || props.gap;\n result[0] = size;\n result[1] = size;\n } else if (props.gap) {\n if (props.gap.row) result[0] = props.theme.global.edgeSize[props.gap.row] || props.gap.row;\n if (props.gap.column) result[1] = props.theme.global.edgeSize[props.gap.column] || props.gap.column;\n }\n return result;\n};\nvar gapStyle = function gapStyle(props) {\n var sizes = gapSizes(props);\n if (sizes[0] !== undefined && sizes[1] !== undefined) {\n return \"grid-gap: \" + sizes[0] + \" \" + sizes[1] + \";\";\n }\n if (sizes[0] !== undefined) {\n return \"grid-row-gap: \" + sizes[0] + \";\";\n }\n if (sizes[1] !== undefined) {\n return \"grid-column-gap: \" + sizes[1] + \";\";\n }\n return '';\n};\nvar SIZE_MAP = {\n flex: '1fr',\n full: '100%',\n '1/2': '50%',\n '1/4': '25%',\n '2/4': '50%',\n '3/4': '75%',\n '1/3': '33.33%',\n '2/3': '66.66%'\n};\nvar normalizeSize = function normalizeSize(size, props) {\n return SIZE_MAP[size] || props.theme.global.size[size] || size;\n};\nvar getRepeatCount = function getRepeatCount(count) {\n return typeof count === 'number' ? count : \"auto-\" + (count || 'fit');\n};\nvar getRepeatSize = function getRepeatSize(size, props) {\n if (size === 'flex') return '1fr';\n var gaps = gapSizes(props);\n var min;\n var max;\n var minFill;\n if (Array.isArray(size)) {\n var _size$ = size[0],\n minSize = _size$ === void 0 ? 'auto' : _size$,\n _size$2 = size[1],\n maxSize = _size$2 === void 0 ? 'auto' : _size$2;\n min = normalizeSize(minSize, props);\n if (min.search(/px/) !== -1) minFill = true;\n max = normalizeSize(maxSize, props);\n if (gaps[1] !== undefined) {\n // account for the column gap when using fractional sizes, e.g. 1/3\n if (minSize.indexOf('/') !== -1) min = \"calc(\" + min + \" - (\" + gaps[1] + \" * (1 - \" + minSize + \")))\";\n if (maxSize.indexOf('/') !== -1) max = \"calc(\" + max + \" - (\" + gaps[1] + \" * (1 - \" + maxSize + \")))\";\n }\n } else {\n min = normalizeSize(size, props);\n if (min.search(/px/) !== -1) minFill = true;\n max = '1fr';\n if (gaps[1] !== undefined) {\n // account for column gap with fractional sizes, e.g. 1/3\n if (size.indexOf('/') !== -1) min = \"calc(\" + min + \" - (\" + gaps[1] + \" * (1 - \" + size + \")))\";\n }\n }\n if (minFill) {\n // ensure we never go beyond the container width,\n // for mobile/narrow situations\n min = \"min(\" + min + \", 100%)\";\n }\n return \"minmax(\" + min + \", \" + max + \")\";\n};\nvar columnsStyle = function columnsStyle(props) {\n if (Array.isArray(props.columns)) {\n return css([\"grid-template-columns:\", \";\"], props.columns.map(function (s) {\n if (Array.isArray(s)) {\n return \"minmax(\" + normalizeSize(s[0], props) + \", \" + normalizeSize(s[1], props) + \")\";\n }\n return normalizeSize(s, props);\n }).join(' '));\n }\n if (typeof props.columns === 'object') {\n return css([\"grid-template-columns:repeat( \", \",\", \" );\"], getRepeatCount(props.columns.count), getRepeatSize(props.columns.size, props));\n }\n return css([\"grid-template-columns:repeat( auto-fill,\", \" );\"], getRepeatSize(props.columns, props));\n};\nvar rowsStyle = function rowsStyle(props) {\n if (Array.isArray(props.rowsProp)) {\n return css([\"grid-template-rows:\", \";\"], props.rowsProp.map(function (s) {\n if (Array.isArray(s)) {\n return \"minmax(\" + normalizeSize(s[0], props) + \", \" + normalizeSize(s[1], props) + \")\";\n }\n return normalizeSize(s, props);\n }).join(' '));\n }\n return css([\"grid-auto-rows:\", \";\"], props.theme.global.size[props.rowsProp]);\n};\nvar areasStyle = function areasStyle(props) {\n // translate areas objects into grid-template-areas syntax\n if (!Array.isArray(props.rowsProp) || !Array.isArray(props.columns)) {\n console.warn('Grid `areas` requires `rows` and `columns` to be arrays.');\n }\n if (Array.isArray(props.areas) && props.areas.every(function (area) {\n return Array.isArray(area);\n })) {\n return \"grid-template-areas: \" + props.areas.map(function (area) {\n return \"\\\"\" + area.join(' ') + \"\\\"\";\n }).join(' ') + \";\";\n }\n var cells = props.rowsProp.map(function () {\n return props.columns.map(function () {\n return '.';\n });\n });\n props.areas.forEach(function (area) {\n for (var row = area.start[1]; row <= area.end[1]; row += 1) {\n for (var column = area.start[0]; column <= area.end[0]; column += 1) {\n cells[row][column] = area.name;\n }\n }\n });\n return \"grid-template-areas: \" + cells.map(function (r) {\n return \"\\\"\" + r.join(' ') + \"\\\"\";\n }).join(' ') + \";\";\n};\nvar StyledGrid = styled.div.attrs(function (props) {\n return {\n 'aria-label': props.a11yTitleProp\n };\n}).withConfig({\n displayName: \"StyledGrid\",\n componentId: \"sc-1wofa1l-0\"\n})([\"display:grid;box-sizing:border-box;\", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return props.border && borderStyle(props.border, props.responsive, props.theme);\n}, function (props) {\n return fillStyle(props.fillContainer);\n}, function (props) {\n return props.align && alignStyle;\n}, function (props) {\n return props.alignContent && alignContentStyle;\n}, function (props) {\n return props.areas && areasStyle(props);\n}, function (props) {\n return props.columns && columnsStyle(props);\n}, function (props) {\n return props.gap && gapStyle(props);\n}, function (props) {\n return props.justify && justifyStyle;\n}, function (props) {\n return props.justifyContent && justifyContentStyle;\n}, function (props) {\n return props.pad && edgeStyle('padding', props.pad, props.responsive, props.theme.global.edgeSize.responsiveBreakpoint, props.theme);\n}, function (props) {\n return props.rowsProp && rowsStyle(props);\n}, function (props) {\n return props.heightProp && heightStyle(props.heightProp, props.theme);\n}, function (props) {\n return props.widthProp && widthStyle(props.widthProp, props.theme);\n}, function (props) {\n return props.theme.grid && props.theme.grid.extend;\n});\nStyledGrid.defaultProps = {};\nObject.setPrototypeOf(StyledGrid.defaultProps, defaultProps);\nexport { StyledGrid };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { alignPropType, genericProps, heightPropType, padPropType, widthPropType } from '../../utils/general-prop-types';\nvar fixedSizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'];\nvar sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge', 'full', '1/2', '1/3', '2/3', '1/4', '2/4', '3/4', 'flex', 'auto'];\nvar edgeSizes = ['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'none'];\nvar BORDER_SHAPE = PropTypes.shape({\n color: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n })]),\n side: PropTypes.oneOf(['top', 'left', 'bottom', 'right', 'start', 'end', 'horizontal', 'vertical', 'all', 'between']),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n style: PropTypes.oneOf(['solid', 'dashed', 'dotted', 'double', 'groove', 'ridge', 'inset', 'outset', 'hidden'])\n});\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n align: alignPropType,\n alignContent: PropTypes.oneOfType([PropTypes.oneOf(['around', 'baseline', 'between', 'center', 'evenly', 'end', 'start', 'stretch']), PropTypes.string]),\n areas: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({\n name: PropTypes.string,\n start: PropTypes.arrayOf(PropTypes.number),\n end: PropTypes.arrayOf(PropTypes.number)\n })), PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string))]),\n border: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['top', 'left', 'bottom', 'right', 'start', 'end', 'horizontal', 'vertical', 'all']), BORDER_SHAPE, PropTypes.arrayOf(BORDER_SHAPE)]),\n columns: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(sizes), PropTypes.string])), PropTypes.oneOf(sizes), PropTypes.string])), PropTypes.oneOf(sizes), PropTypes.shape({\n count: PropTypes.oneOfType([PropTypes.oneOf(['fit', 'fill']), PropTypes.number]),\n size: PropTypes.oneOfType([PropTypes.oneOf(sizes), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(sizes), PropTypes.string])), PropTypes.string])\n }), PropTypes.string]),\n fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),\n gap: PropTypes.oneOfType([PropTypes.oneOf(edgeSizes), PropTypes.shape({\n row: PropTypes.oneOfType([PropTypes.oneOf(edgeSizes), PropTypes.string]),\n column: PropTypes.oneOfType([PropTypes.oneOf(edgeSizes), PropTypes.string])\n }), PropTypes.string]),\n height: heightPropType,\n justify: PropTypes.oneOf(['start', 'center', 'end', 'stretch']),\n justifyContent: PropTypes.oneOf(['start', 'center', 'end', 'between', 'around', 'stretch']),\n pad: padPropType,\n responsive: PropTypes.bool,\n rows: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(sizes), PropTypes.string])), PropTypes.oneOf(sizes), PropTypes.string])), PropTypes.oneOf(fixedSizes), PropTypes.string]),\n tag: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n width: widthPropType\n });\n}\nexport var GridPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"aria-label\", \"border\", \"fill\", \"height\", \"responsive\", \"rows\", \"tag\", \"as\", \"width\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef } from 'react';\nimport { StyledGrid } from './StyledGrid';\nimport { GridPropTypes } from './propTypes';\nvar Grid = /*#__PURE__*/forwardRef(function (props, ref) {\n var a11yTitle = props.a11yTitle,\n ariaLabel = props['aria-label'],\n border = props.border,\n fill = props.fill,\n height = props.height,\n _props$responsive = props.responsive,\n responsive = _props$responsive === void 0 ? true : _props$responsive,\n rows = props.rows,\n tag = props.tag,\n as = props.as,\n width = props.width,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n return /*#__PURE__*/React.createElement(StyledGrid, _extends({\n ref: ref,\n a11yTitleProp: ariaLabel || a11yTitle,\n as: !as && tag ? tag : as,\n border: border,\n fillContainer: fill,\n heightProp: height,\n responsive: responsive,\n rowsProp: rows,\n widthProp: width\n }, rest));\n});\nGrid.displayName = 'Grid';\nGrid.propTypes = GridPropTypes;\n\n// Defualting to true to support existing code that relies on\n// grid.available to create a fallback option\nGrid.available = true;\nexport { Grid };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.func,\n items: PropTypes.arrayOf(PropTypes.any),\n onMore: PropTypes.func,\n renderMarker: PropTypes.func,\n replace: PropTypes.bool,\n show: PropTypes.number,\n step: PropTypes.number\n };\n}\nexport var InfiniteScrollPropTypes = PropType;","import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { findScrollParent, findScrollParents, isNodeAfterScroll, isNodeBeforeScroll } from '../../utils';\nimport { Box } from '../Box';\nimport { InfiniteScrollPropTypes } from './propTypes';\nvar calculateLastPageBound = function calculateLastPageBound(show, step) {\n return show ? Math.floor((show + step) / step) - 1 : 0;\n};\nvar InfiniteScroll = function InfiniteScroll(_ref) {\n var children = _ref.children,\n _ref$items = _ref.items,\n items = _ref$items === void 0 ? [] : _ref$items,\n onMore = _ref.onMore,\n renderMarker = _ref.renderMarker,\n replace = _ref.replace,\n show = _ref.show,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 50 : _ref$step;\n // item index to be made visible initially\n var _useState = useState(),\n scrollShow = _useState[0],\n setScrollShow = _useState[1];\n\n // the last page we have items for\n var lastPage = useMemo(function () {\n return Math.max(0, Math.ceil(items.length / step) - 1);\n }, [items.length, step]);\n\n // the pages we are rendering\n var _useState2 = useState([0, calculateLastPageBound(show, step)]),\n renderPageBounds = _useState2[0],\n setRenderPageBounds = _useState2[1];\n\n // the heights of the pages, approximated after we render the first page\n // and then updated for pages that have rendered\n var _useState3 = useState([]),\n pageHeights = _useState3[0],\n setPageHeights = _useState3[1];\n\n // what we're waiting for onMore to give us\n var _useState4 = useState(0),\n pendingLength = _useState4[0],\n setPendingLength = _useState4[1];\n var aboveMarkerRef = useRef(); // only when replacing\n var belowMarkerRef = useRef();\n\n // scroll and resize handling\n useEffect(function () {\n var scrollParents;\n var evaluate = function evaluate() {\n if (!scrollParents) return;\n var scrollParent = scrollParents[0];\n\n // Determine the scroll position of the scroll container\n var top;\n var height;\n if (scrollParent === document) {\n top = document.documentElement.scrollTop || document.body.scrollTop;\n height = window.innerHeight;\n } else {\n top = scrollParent.scrollTop;\n var rect = scrollParent.getBoundingClientRect();\n height = rect.height;\n }\n var offset = height / 4; // so we pre-load when the user scrolls slowly\n\n // Use the pageHeights to determine what pages we should render based\n // on the current scroll window.\n var nextBeginPage = 0;\n var index = 0;\n var pagesHeight = pageHeights[index] || 0;\n while (pageHeights[index + 1] && pagesHeight < top - offset) {\n index += 1;\n nextBeginPage += 1;\n pagesHeight += pageHeights[index];\n }\n var nextEndPage = nextBeginPage;\n while (pageHeights[index] !== undefined && pagesHeight < top + height + offset) {\n index += 1;\n nextEndPage += 1;\n // when we haven't rendered the nextEndPage and we aren't replacing,\n // we might not have a height for it yet\n pagesHeight += pageHeights[index] || 0;\n }\n if (!replace) {\n // when not replacing, never shrink bounds\n nextBeginPage = 0;\n nextEndPage = Math.max(renderPageBounds[1], nextEndPage);\n }\n if (show) {\n // ensure we try to render any show page\n var showPage = calculateLastPageBound(show, step);\n nextBeginPage = Math.min(showPage, nextBeginPage);\n nextEndPage = Math.max(showPage, nextEndPage);\n }\n if (nextBeginPage !== renderPageBounds[0] || nextEndPage !== renderPageBounds[1]) {\n setRenderPageBounds([nextBeginPage, nextEndPage]);\n }\n };\n var timer;\n var debounce = function debounce() {\n clearTimeout(timer);\n timer = setTimeout(evaluate, 10);\n };\n\n // might not be there yet or might have already rendered everything\n if (belowMarkerRef.current) {\n scrollParents = findScrollParents(belowMarkerRef.current);\n scrollParents.forEach(function (sp) {\n return sp.addEventListener('scroll', debounce);\n });\n }\n window.addEventListener('resize', debounce);\n evaluate();\n return function () {\n if (scrollParents) {\n scrollParents.forEach(function (sp) {\n return sp.removeEventListener('scroll', debounce);\n });\n }\n window.removeEventListener('resize', debounce);\n clearTimeout(timer);\n };\n }, [pageHeights, renderPageBounds, replace, show, step]);\n\n // check if we need to ask for more\n useEffect(function () {\n if (onMore && renderPageBounds[1] === lastPage && items.length >= pendingLength && items.length > 0) {\n // remember we've asked for more, so we don't keep asking if it takes\n // a while\n setPendingLength(items.length + 1);\n onMore();\n }\n }, [items.length, lastPage, onMore, pendingLength, renderPageBounds, step]);\n useEffect(function () {\n if (items.length === 0 && lastPage === 0 && pendingLength !== 0) {\n setPageHeights([]);\n setPendingLength(0);\n setRenderPageBounds([0, calculateLastPageBound(show, step)]);\n }\n }, [lastPage, pendingLength, show, step, items.length]);\n\n // scroll to any 'show'\n useLayoutEffect(function () {\n // ride out any animation delays, 100ms empirically measured\n var timer = setTimeout(function () {\n if (show && belowMarkerRef.current && show !== scrollShow) {\n // calculate show index based on beginPage\n var showIndex = show - renderPageBounds[0] * step + (renderPageBounds[0] ? 1 : 0);\n var showNode = belowMarkerRef.current.parentNode.children.item(showIndex);\n if (showNode) {\n var scrollParent = findScrollParent(showNode);\n if (isNodeBeforeScroll(showNode, scrollParent)) {\n showNode.scrollIntoView(true);\n } else if (isNodeAfterScroll(showNode, scrollParent)) {\n showNode.scrollIntoView(false);\n }\n // clean up after having shown\n setScrollShow(show);\n }\n }\n }, 100);\n return function () {\n return clearTimeout(timer);\n };\n // Omitting scrollShow as a dependency due to concern that setScrollShow\n // is being called within the timer. If left included, re-renders and other\n // dependency values could change in an unpredictable manner during timer\n // and potentially result in an infinite loop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [renderPageBounds, show, step]);\n\n // calculate and keep track of page heights\n useLayoutEffect(function () {\n // if don't have a belowMarker, we must have rendered everything already\n if (!belowMarkerRef.current) return;\n\n // calculate page heights for rendered pages\n var rendered = belowMarkerRef.current.parentNode.children;\n // ensure we've rendered the state we have\n // above? + items in rendered pages + below === rendered DOM elements length\n if ((aboveMarkerRef.current ? 1 : 0) + (renderPageBounds[1] - renderPageBounds[0] + 1) * step + 1 === rendered.length) {\n var nextPageHeights;\n\n // step through each page\n var i = renderPageBounds[0];\n var lastBottom;\n while (i <= renderPageBounds[1]) {\n var topIndex = (aboveMarkerRef.current ? 1 : 0) + (i - renderPageBounds[0]) * step;\n var bottomIndex = Math.min(topIndex + step - 1, rendered.length - 1);\n // we use lastBottom for top to ensure grid layouts work\n var top = lastBottom !== undefined ? lastBottom : rendered.item(topIndex).getBoundingClientRect().top;\n var _rendered$item$getBou = rendered.item(bottomIndex).getBoundingClientRect(),\n bottom = _rendered$item$getBou.bottom;\n var height = bottom - top;\n if (bottom && (!pageHeights || pageHeights[i] !== height)) {\n if (!nextPageHeights) nextPageHeights = [].concat(pageHeights || []);\n nextPageHeights[i] = height;\n }\n lastBottom = bottom;\n i += 1;\n }\n\n // estimate page heights for pages we haven't rendered yet\n while (replace && i <= lastPage) {\n if (!pageHeights[i] && pageHeights[i] !== pageHeights[0]) {\n if (!nextPageHeights) nextPageHeights = [].concat(pageHeights || []);\n // set to first page height\n var _nextPageHeights = nextPageHeights;\n nextPageHeights[i] = _nextPageHeights[0];\n }\n i += 1;\n }\n if (nextPageHeights) setPageHeights(nextPageHeights);\n }\n }, [lastPage, pageHeights, renderPageBounds, replace, step]);\n\n // calculate the height above the first rendered page using the pageHeights\n var aboveHeight = useMemo(function () {\n if (!replace) return 0;\n var height = 0;\n var i = 0;\n while (i < renderPageBounds[0]) {\n height += pageHeights[i] || 0;\n i += 1;\n }\n return height;\n }, [pageHeights, renderPageBounds, replace]);\n\n // calculate the height below the last rendered page using the pageHeights\n var belowHeight = useMemo(function () {\n if (!replace) return 0;\n var height = 0;\n var i = renderPageBounds[1] + 1;\n while (i <= lastPage) {\n height += pageHeights[i] || 0;\n i += 1;\n }\n return height;\n }, [lastPage, pageHeights, renderPageBounds, replace]);\n var firstIndex = renderPageBounds[0] * step;\n var lastIndex = Math.min((renderPageBounds[1] + 1) * step, items.length) - 1;\n var result = [];\n if (aboveHeight) {\n var marker = /*#__PURE__*/React.createElement(Box, {\n key: \"above\",\n ref: aboveMarkerRef,\n flex: false,\n height: aboveHeight + \"px\"\n });\n if (renderMarker) {\n // need to give it a key\n marker = /*#__PURE__*/React.cloneElement(renderMarker(marker), {\n key: 'above'\n });\n }\n result.push(marker);\n }\n items.slice(firstIndex, lastIndex + 1).forEach(function (item, index) {\n var itemsIndex = firstIndex + index;\n var child = children(item, itemsIndex);\n result.push(child);\n });\n if (replace || renderPageBounds[1] < lastPage || onMore) {\n var _marker = /*#__PURE__*/React.createElement(Box, {\n key: \"below\",\n ref: !renderMarker && belowMarkerRef || undefined,\n flex: false,\n height: (belowHeight || 0) + \"px\"\n });\n if (renderMarker) {\n // need to give it a key\n var renderedMarker = renderMarker(_marker);\n _marker = /*#__PURE__*/React.cloneElement(renderedMarker, {\n key: 'below',\n // We need to make sure our belowMarkerRef is tied to a component\n // that has the same parent as the items being rendered. This is so\n // we can use belowMarkerRef.current.parentNode.children to\n // get a reference to the items in the DOM for calculating pageHeights.\n //\n // Since the caller might have included a ref in what their\n // renderMarker returns, we have to take care of both refs.\n // https://github.com/facebook/react/issues/8873#issuecomment-489579878\n ref: function ref(node) {\n // Keep your own reference\n belowMarkerRef.current = node;\n // Call the original ref, if any\n var ref = renderedMarker.ref;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref !== null) {\n ref.current = node;\n }\n }\n });\n }\n result.push(_marker);\n }\n return result;\n};\nInfiniteScroll.propTypes = InfiniteScrollPropTypes;\nexport { InfiniteScroll };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from 'react';\nimport { Box } from '../Box';\nvar Nav = function Nav(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/React.createElement(Box, _extends({\n as: \"nav\",\n flex: false,\n gap: \"medium\"\n }, rest));\n};\nexport { Nav };","import styled from 'styled-components';\nimport { Button } from '../Button';\nimport { Text } from '../Text';\nvar sizeStyle = function sizeStyle(props) {\n var style = props.theme.pagination.button && props.theme.pagination.button.size && props.theme.pagination.button.size[props.size || 'medium'];\n return style ? {\n content: {\n fontSize: style.font && style.font.size,\n // fix for safari, apply line-height 0 on next/previous\n // icon-only buttons\n lineHeight: style.font && props.hasLabel ? style.font.height : 0\n },\n container: {\n height: style.height,\n minWidth: style.width\n }\n } : '';\n};\nexport var StyledPaginationButton = styled(Button).withConfig({\n displayName: \"StyledPageControl__StyledPaginationButton\",\n componentId: \"sc-1vlfaez-0\"\n})([\"> svg{margin:0 auto;}\", \";\"], function (props) {\n return sizeStyle(props).content;\n});\nexport var StyledContainer = styled.div.withConfig({\n displayName: \"StyledPageControl__StyledContainer\",\n componentId: \"sc-1vlfaez-1\"\n})([\"display:flex;align-items:center;justify-content:center;max-width:100%;\", \";\", \";\"], function (props) {\n return sizeStyle(props).container;\n}, function (props) {\n return props.theme.pagination.control && props.theme.pagination.control.extend;\n});\nexport var StyledSeparator = styled(Text).withConfig({\n displayName: \"StyledPageControl__StyledSeparator\",\n componentId: \"sc-1vlfaez-2\"\n})([\"font-weight:bold;\", \";\", \";\"], function (props) {\n return \"font-size: \" + (sizeStyle(props).content && sizeStyle(props).content.fontSize);\n}, function (props) {\n return \"line-height: \" + (sizeStyle(props).content && sizeStyle(props).content.lineHeight);\n});","var _excluded = [\"control\", \"separator\", \"size\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { StyledContainer, StyledPaginationButton, StyledSeparator } from './StyledPageControl';\nexport var PageControl = function PageControl(_ref) {\n var control = _ref.control,\n separator = _ref.separator,\n sizeProp = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext);\n var size = sizeProp || 'medium';\n return /*#__PURE__*/React.createElement(StyledContainer, {\n as: \"li\",\n size: size\n }, separator ? /*#__PURE__*/React.createElement(StyledSeparator, {\n size: size\n }, \"\\u2026\") : /*#__PURE__*/React.createElement(StyledPaginationButton, _extends({\n a11yTitle: \"Go to page \" + control,\n fill: true,\n kind: theme.pagination.button,\n label: control,\n size: size\n }, rest)));\n};","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n numberEdgePages: PropTypes.number,\n numberItems: PropTypes.number,\n numberMiddlePages: PropTypes.number,\n onChange: PropTypes.func,\n page: PropTypes.number,\n size: PropTypes.oneOf(['small', 'medium', 'large']),\n step: PropTypes.number\n });\n}\nexport var PaginationPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"aria-label\", \"numberItems\", \"numberEdgePages\", \"numberMiddlePages\", \"onChange\", \"page\", \"size\", \"step\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useEffect, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { DataContext } from '../../contexts/DataContext';\nimport { Box } from '../Box';\nimport { Nav } from '../Nav';\nimport { PageControl } from './PageControl';\nimport { PaginationPropTypes } from './propTypes';\nvar StyledPaginationContainer = styled(Box).withConfig({\n displayName: \"Pagination__StyledPaginationContainer\",\n componentId: \"sc-rnlw6m-0\"\n})([\"\", \"\"], function (props) {\n return props.theme.pagination.container && props.theme.pagination.container.extend;\n});\nvar getPageIndices = function getPageIndices(begin, end) {\n var indices = [];\n for (var i = begin; i <= end; i += 1) {\n indices.push(i);\n }\n return indices;\n};\nvar Pagination = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref2;\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n numberItems = _ref.numberItems,\n _ref$numberEdgePages = _ref.numberEdgePages,\n numberEdgePages = _ref$numberEdgePages === void 0 ? 1 : _ref$numberEdgePages,\n _ref$numberMiddlePage = _ref.numberMiddlePages,\n numberMiddlePagesProp = _ref$numberMiddlePage === void 0 ? 3 : _ref$numberMiddlePage,\n onChange = _ref.onChange,\n pageProp = _ref.page,\n size = _ref.size,\n stepProp = _ref.step,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(DataContext),\n onView = _useContext.onView,\n filteredTotal = _useContext.filteredTotal,\n view = _useContext.view;\n var step = stepProp || (view == null ? void 0 : view.step) || 10;\n var total = (_ref2 = numberItems != null ? numberItems : filteredTotal) != null ? _ref2 : 0;\n var page = pageProp || (view == null ? void 0 : view.page) || 1;\n\n /* Calculate total number pages */\n var totalPages = Math.ceil(total / step);\n var _useState = useState(Math.min(page, totalPages) || 1),\n activePage = _useState[0],\n setActivePage = _useState[1];\n useEffect(function () {\n setActivePage(page);\n var pageEvent = new Event('pagechange');\n window.dispatchEvent(pageEvent);\n }, [page]);\n useEffect(function () {\n // if we are getting the step or page from outside the view,\n // update the Data's view in case it needs to filter.\n if (onView && ((view == null ? void 0 : view.step) !== step || (view == null ? void 0 : view.page) !== page)) onView(_extends({}, view, {\n page: page,\n step: step\n }));\n }, [onView, page, step, view]);\n\n /* Define page indices to display */\n var beginPages = getPageIndices(1, Math.min(numberEdgePages, totalPages));\n var endPages = getPageIndices(Math.max(totalPages - numberEdgePages + 1, numberEdgePages + 1), totalPages);\n var numberMiddlePages;\n if (numberMiddlePagesProp < 1) {\n numberMiddlePages = 1;\n console.warn( // eslint-disable-next-line max-len\n \"Property \\\"numberMiddlePages\\\" should not be < 1. One middle page button will be shown. Set \\\"numberMiddlePages\\\" >= 1 to remove this warning.\");\n } else numberMiddlePages = numberMiddlePagesProp;\n var startingMiddlePages;\n // odd\n if (numberMiddlePages % 2) startingMiddlePages = Math.min(activePage - Math.floor(numberMiddlePages / 2), totalPages - numberEdgePages - numberMiddlePages);\n // even, cannot split equally around active page\n // let extra page appear on middlePagesEnd instead\n else startingMiddlePages = Math.min(activePage - Math.floor(numberMiddlePages / 2) + 1, totalPages - numberEdgePages - numberMiddlePages);\n var middlePagesBegin = Math.max(startingMiddlePages, numberEdgePages + 2);\n var middlePagesEnd = Math.min(Math.max(activePage + Math.floor(numberMiddlePages / 2), numberEdgePages + numberMiddlePages + 1), endPages.length > 0 ? endPages[0] - 2 : totalPages - 1);\n var middlePages = getPageIndices(middlePagesBegin, middlePagesEnd);\n var beginFlex = [];\n if (middlePagesBegin > numberEdgePages + 2) beginFlex = ['more-prev'];else if (numberEdgePages + 1 < totalPages - numberEdgePages) beginFlex = [numberEdgePages + 1];\n var endFlex = [];\n if (middlePagesEnd < totalPages - numberEdgePages - 1) endFlex = ['more-next'];else if (totalPages - numberEdgePages > numberEdgePages) endFlex = [totalPages - numberEdgePages];\n var getItemIndices = function getItemIndices(nextPage) {\n var startIndex = step * (nextPage - 1);\n var endIndex = startIndex + step;\n return {\n startIndex: startIndex,\n endIndex: endIndex\n };\n };\n var handleClick = function handleClick(event, nextPage) {\n setActivePage(nextPage);\n if (onView) onView(_extends({}, view, {\n page: nextPage\n }));\n if (onChange) {\n event.persist();\n var adjustedEvent = event;\n adjustedEvent.page = nextPage;\n\n // for controlled use cases, provide user with info on\n // what range of indices should be displayed given the active page\n var _getItemIndices = getItemIndices(nextPage),\n startIndex = _getItemIndices.startIndex,\n endIndex = _getItemIndices.endIndex;\n adjustedEvent.startIndex = startIndex;\n adjustedEvent.endIndex = endIndex;\n onChange(adjustedEvent);\n }\n };\n var NextIcon = theme.pagination.icons.next;\n var PreviousIcon = theme.pagination.icons.previous;\n var iconColor = theme.pagination.icons.color;\n var navProps = {\n next: {\n // https://a11y-style-guide.com/style-guide/section-navigation.html#kssref-navigation-pagination\n 'aria-disabled': activePage === totalPages ? 'true' : undefined,\n disabled: activePage === totalPages || !total,\n icon: /*#__PURE__*/React.createElement(NextIcon, {\n color: iconColor\n }),\n onClick: function onClick(event) {\n var nextPage = activePage + 1;\n handleClick(event, nextPage);\n },\n label: undefined\n },\n previous: {\n 'aria-disabled': activePage === 1 ? 'true' : undefined,\n disabled: activePage === 1 || !total,\n icon: /*#__PURE__*/React.createElement(PreviousIcon, {\n color: iconColor\n }),\n onClick: function onClick(event) {\n var previousPage = activePage - 1;\n handleClick(event, previousPage);\n },\n label: undefined\n }\n };\n var controls = ['previous'].concat(beginPages, beginFlex, middlePages, endFlex, endPages, ['next']);\n\n /* Set props for each page index. Each page index should display a\n * clickable index, control, or placeholder (e.g. ellipsis) indicating\n * more pages are available.\n */\n controls = controls.map(function (control) {\n return _extends({\n active: control === activePage,\n a11yTitle: typeof control === 'number' ? \"Go to page \" + control : \"Go to \" + control + \" page\",\n // https://a11y-style-guide.com/style-guide/section-navigation.html#kssref-navigation-pagination\n // https://www.w3.org/TR/wai-aria-1.1/#aria-current\n 'aria-current': control === activePage ? 'page' : undefined,\n control: control,\n onClick: function onClick(event) {\n handleClick(event, control);\n },\n separator: control === 'more-prev' || control === 'more-next'\n }, navProps[control]);\n });\n return /*#__PURE__*/React.createElement(StyledPaginationContainer, _extends({\n flex: false\n }, theme.pagination.container, rest), /*#__PURE__*/React.createElement(Nav, {\n a11yTitle: ariaLabel || a11yTitle || 'Pagination Navigation',\n ref: ref\n }, /*#__PURE__*/React.createElement(Box, _extends({\n as: \"ul\"\n }, theme.pagination.controls), controls.map(function (control, index) {\n return (\n /*#__PURE__*/\n /* Using index as key (as opposed to a unique id) seems to\n * help React prioritize rendering the updated controls as\n * desired. Whereas, using a unique id resulted in rendering\n * the active control with an undesired lag. */\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(PageControl, _extends({\n key: index,\n size: size\n }, control))\n );\n }))));\n});\nPagination.displayName = 'Pagination';\nPagination.propTypes = PaginationPropTypes;\nexport { Pagination };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n as: PropTypes.string,\n data: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.shape({})])),\n children: PropTypes.func,\n onMore: PropTypes.func,\n paginate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n show: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n page: PropTypes.number\n })]),\n step: PropTypes.number\n });\n}\nexport var CardsPropTypes = PropType;","var _excluded = [\"as\", \"children\", \"data\", \"margin\", \"onMore\", \"pad\", \"paginate\", \"show\", \"size\", \"step\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { Fragment, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { DataContext } from '../../contexts/DataContext';\nimport { Box } from '../Box';\nimport { Card } from '../Card';\nimport { CardBody } from '../CardBody';\nimport { Grid } from '../Grid';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { Pagination } from '../Pagination';\nimport { normalizeShow, usePagination } from '../../utils';\nimport { CardsPropTypes } from './propTypes';\nvar emptyData = [];\nvar Cards = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n as = _ref$as === void 0 ? 'ul' : _ref$as,\n children = _ref.children,\n dataProp = _ref.data,\n margin = _ref.margin,\n onMore = _ref.onMore,\n pad = _ref.pad,\n paginate = _ref.paginate,\n showProp = _ref.show,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 'small' : _ref$size,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? paginate ? 50 : undefined : _ref$step,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext);\n var _useContext = useContext(DataContext),\n contextData = _useContext.data;\n var data = dataProp || contextData || emptyData;\n var _usePagination = usePagination(_extends({\n data: data,\n page: normalizeShow(showProp, step),\n step: step\n }, paginate)),\n items = _usePagination[0],\n paginationProps = _usePagination[1];\n var Container = paginate ? Box : Fragment;\n var containerProps = paginate ? _extends({}, theme.cards.container, {\n pad: pad,\n margin: margin\n }) : undefined;\n return /*#__PURE__*/React.createElement(Container, containerProps, /*#__PURE__*/React.createElement(Grid, _extends({\n ref: ref,\n as: as,\n columns: size,\n gap: \"medium\",\n margin: !paginate && margin || 'none',\n pad: !paginate && pad || 'none'\n }, rest), /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: !paginate ? data : items,\n onMore: onMore,\n show: !paginate ? showProp : undefined,\n step: step,\n renderMarker: function renderMarker(marker) {\n return /*#__PURE__*/React.createElement(Box, {\n as: \"li\",\n flex: false\n }, marker);\n }\n }, function (item, index) {\n var _ref2, _ref3;\n return children ? children(item, index) : /*#__PURE__*/React.createElement(Card, {\n key: index.toString(),\n as: as === 'ul' ? 'li' : undefined\n }, /*#__PURE__*/React.createElement(CardBody, null, (_ref2 = (_ref3 = typeof item === 'string' && item) != null ? _ref3 : typeof item === 'object' && Object.values(item)[0]) != null ? _ref2 : index));\n })), paginate && data.length > step && items && items.length ? /*#__PURE__*/React.createElement(Pagination, _extends({\n alignSelf: \"end\"\n }, paginationProps)) : null);\n});\nCards.displayName = 'Cards';\nCards.propTypes = CardsPropTypes;\nexport { Cards };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.func\n };\n}\nexport var ResponsiveContextPropTypes = PropType;","import React from 'react';\nimport { ResponsiveContextPropTypes } from './propTypes';\nexport var ResponsiveContext = /*#__PURE__*/React.createContext(undefined);\nResponsiveContext.propTypes = ResponsiveContextPropTypes;","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n value: PropTypes.shape({})\n };\n}\nexport var ThemeContextPropTypes = PropType;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeContext } from 'styled-components';\nimport { deepMerge } from '../../utils';\nimport { ThemeContextPropTypes } from './propTypes';\nThemeContext.Extend = function (_ref) {\n var children = _ref.children,\n value = _ref.value;\n return /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, function (theme) {\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: deepMerge(theme, value)\n }, children);\n });\n};\nThemeContext.Extend.propTypes = {\n children: PropTypes.node.isRequired,\n value: PropTypes.shape({}).isRequired\n};\nThemeContext.propTypes = ThemeContextPropTypes;\nexport { ThemeContext };","export * from './AnalyticsContext';\nexport * from './AnnounceContext';\nexport * from './ContainerTargetContext';\nexport * from './DataContext';\nexport * from './ResponsiveContext';\nexport * from './RootsContext';\nexport * from './ThemeContext';","import styled, { css, keyframes } from 'styled-components';\nimport { Box } from '../Box';\nvar StyledCarouselContainer = styled(Box).withConfig({\n displayName: \"StyledCarousel__StyledCarouselContainer\",\n componentId: \"sc-c2hjel-0\"\n})([\"position:relative;overflow:hidden;\"]);\nvar animationKeyframes = {\n // Slide Right = Previous or Backward\n slideRightPrevious: keyframes([\"0%{transform:translateX(0%)}100%{transform:translateX(100%)}\"]),\n slideRightCurrent: keyframes([\"0%{transform:translateX(-100%)}100%{transform:translateX(0%)}\"]),\n // Slide Left = Next or Forward\n slideLeftPrevious: keyframes([\"0%{transform:translateX(0%)}100%{transform:translateX(-100%)}\"]),\n slideLeftCurrent: keyframes([\"0%{transform:translateX(100%)}100%{transform:translateX(0%)}\"])\n};\nvar StyledCarouselChild = styled(Box).withConfig({\n displayName: \"StyledCarousel__StyledCarouselChild\",\n componentId: \"sc-c2hjel-1\"\n})([\"visibility:\", \";position:\", \";width:100%;height:100%;overflow:hidden;\", \";animation-fill-mode:both;\"], function (props) {\n return props.visibilityProp;\n}, function (props) {\n return props.positionProp;\n}, function (props) {\n return props.animationType ? css([\"animation:\", \" \", \"s ease-in-out;\"], animationKeyframes[props.animationType], props.animationDuration / 1000) : \"\";\n});\nvar StyledControl = styled(Box).withConfig({\n displayName: \"StyledCarousel__StyledControl\",\n componentId: \"sc-c2hjel-2\"\n})([\"position:absolute;z-index:1;\", \" align-items:center;justify-content:center;\"], function (props) {\n return props.offsetProp + \": 0;\";\n});\nexport { StyledCarouselContainer, StyledCarouselChild, StyledControl };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps, widthPropType, heightPropType } from '../../utils/general-prop-types';\nvar CarouselPropType;\nif (process.env.NODE_ENV !== 'production') {\n CarouselPropType = _extends({}, genericProps, {\n activeChild: PropTypes.number,\n initialChild: PropTypes.number,\n fill: PropTypes.bool,\n wrap: PropTypes.bool,\n controls: PropTypes.oneOfType([PropTypes.oneOf(['arrows', 'selectors']), PropTypes.bool]),\n onChild: PropTypes.func,\n width: widthPropType,\n height: heightPropType,\n play: PropTypes.number\n });\n}\nexport var CarouselPropTypes = CarouselPropType;\nvar CarouselChildPropType;\nif (process.env.NODE_ENV !== 'production') {\n CarouselChildPropType = {\n animationDuration: PropTypes.number.isRequired,\n fill: PropTypes.bool,\n index: PropTypes.number.isRequired,\n activeIndex: PropTypes.number.isRequired,\n priorActiveIndex: PropTypes.number,\n direction: PropTypes.oneOf(['left', 'right'])\n };\n}\nexport var CarouselChildPropTypes = CarouselChildPropType;","import React, { useState, useEffect } from 'react';\nimport { CarouselChildPropTypes } from './propTypes';\nimport { StyledCarouselChild } from './StyledCarousel';\nimport { Box } from '../Box';\nvar CarouselChild = function CarouselChild(_ref) {\n var animationDuration = _ref.animationDuration,\n fill = _ref.fill,\n index = _ref.index,\n activeIndex = _ref.activeIndex,\n priorActiveIndex = _ref.priorActiveIndex,\n direction = _ref.direction,\n children = _ref.children;\n var _useState = useState(undefined),\n animation = _useState[0],\n setAnimation = _useState[1];\n var _useState2 = useState(index === activeIndex ? 'visible' : 'hidden'),\n visibility = _useState2[0],\n setVisibility = _useState2[1];\n useEffect(function () {\n var timer;\n if (index === activeIndex) {\n if (priorActiveIndex !== undefined) {\n /**\n * This check will only be false onMount of the component. It ensures\n * the initial active slide of the Carousel renders with no animation.\n */\n setAnimation(direction === 'left' ? 'slideLeftCurrent' : 'slideRightCurrent');\n }\n setVisibility('visible');\n } else if (index === priorActiveIndex) {\n setAnimation(direction === 'left' ? 'slideLeftPrevious' : 'slideRightPrevious');\n timer = setTimeout(function () {\n return setVisibility('hidden');\n }, animationDuration);\n }\n return function () {\n return clearTimeout(timer);\n };\n }, [activeIndex, priorActiveIndex, index, direction, animationDuration]);\n var position = index === 0 ? 'relative' : 'absolute';\n return /*#__PURE__*/React.createElement(StyledCarouselChild, {\n fill: fill,\n visibilityProp: visibility,\n positionProp: position,\n animationType: animation,\n animationDuration: animationDuration\n }, /*#__PURE__*/React.createElement(Box, {\n fill: fill\n }, children));\n};\nCarouselChild.propTypes = CarouselChildPropTypes;\nCarouselChild.defaultProps = {\n fill: false,\n play: undefined,\n priorActiveIndex: undefined\n};\nexport { CarouselChild };","var _excluded = [\"activeChild\", \"initialChild\", \"onChild\", \"play\", \"children\", \"controls\", \"height\", \"fill\", \"width\", \"onFocus\", \"onBlur\", \"wrap\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { Children, useCallback, useContext, useEffect, useMemo, useState, useRef } from 'react';\nimport { normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { ThemeContext } from '../../contexts';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Keyboard } from '../Keyboard';\nimport { StyledCarouselContainer, StyledControl } from './StyledCarousel';\nimport { CarouselChild } from './CarouselChild';\nimport { CarouselPropTypes } from './propTypes';\nvar Carousel = function Carousel(_ref) {\n var activeChild = _ref.activeChild,\n initialChild = _ref.initialChild,\n onChild = _ref.onChild,\n play = _ref.play,\n children = _ref.children,\n controls = _ref.controls,\n height = _ref.height,\n fill = _ref.fill,\n width = _ref.width,\n onFocus = _ref.onFocus,\n onBlur = _ref.onBlur,\n wrap = _ref.wrap,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var timerRef = useRef();\n var animationDuration = useMemo(function () {\n return play && play < theme.carousel.animation.duration ? play : theme.carousel.animation.duration;\n }, [play, theme.carousel.animation.duration]);\n var _useState = useState({\n activeIndex: activeChild !== undefined ? activeChild : initialChild\n }),\n indexes = _useState[0],\n setIndexes = _useState[1];\n var _useState2 = useState(activeChild),\n activeChildState = _useState2[0],\n setActiveChildState = _useState2[1];\n var _useState3 = useState(),\n direction = _useState3[0],\n setDirection = _useState3[1];\n var _useState4 = useState(false),\n inTransition = _useState4[0],\n setInTransition = _useState4[1];\n var activeIndex = indexes.activeIndex,\n priorActiveIndex = indexes.priorActiveIndex;\n var lastIndex = Children.count(children) - 1;\n var onChildChange = useCallback(function (index) {\n if (onChild) {\n onChild(index);\n }\n }, [onChild]);\n var onRight = useCallback(function () {\n if (inTransition) return;\n clearInterval(timerRef.current);\n var nextActiveIndex = activeIndex < lastIndex ? activeIndex + 1 : 0;\n setIndexes({\n activeIndex: nextActiveIndex,\n priorActiveIndex: activeIndex\n });\n setInTransition(true);\n setDirection('left');\n onChildChange(nextActiveIndex);\n }, [activeIndex, inTransition, lastIndex, onChildChange]);\n var onLeft = useCallback(function () {\n if (inTransition) return;\n clearInterval(timerRef.current);\n var nextActiveIndex = activeIndex === 0 ? lastIndex : activeIndex - 1;\n setIndexes({\n activeIndex: nextActiveIndex,\n priorActiveIndex: activeIndex\n });\n setInTransition(true);\n setDirection('right');\n onChildChange(nextActiveIndex);\n }, [activeIndex, inTransition, lastIndex, onChildChange]);\n var onSelect = useCallback(function (index) {\n return function () {\n if (!inTransition && activeIndex !== index) {\n clearInterval(timerRef.current);\n setIndexes({\n activeIndex: index,\n priorActiveIndex: activeIndex\n });\n setInTransition(true);\n setDirection(index > activeIndex ? 'left' : 'right');\n onChildChange(index);\n }\n };\n }, [activeIndex, inTransition, onChildChange]);\n var onControlledNavigation = useCallback(function () {\n if (inTransition || activeChild === activeChildState || activeChild === activeIndex || activeChild === undefined || activeChild < 0 || activeChild > lastIndex) return;\n setDirection(activeChild > activeIndex ? 'left' : 'right');\n setInTransition(true);\n setIndexes({\n activeIndex: activeChild,\n priorActiveIndex: activeIndex\n });\n setActiveChildState(activeChild);\n onChildChange(activeChild);\n }, [activeChild, activeChildState, activeIndex, inTransition, lastIndex, onChildChange]);\n\n /**\n * Delays the transitions between Carousel slides. This is needed to\n * avoid users \"spamming\" the controls which results in jarring animations\n * and a bad user experience.\n */\n useEffect(function () {\n var transitionTimer;\n if (inTransition) {\n transitionTimer = setTimeout(function () {\n setInTransition(false);\n }, animationDuration);\n }\n return function () {\n return clearTimeout(transitionTimer);\n };\n }, [inTransition, setInTransition, animationDuration]);\n\n // Handles auto-playing Carousel slides\n useEffect(function () {\n // stop playing if wrap is explicitly false and we're at the end\n if (play && (wrap !== false || activeIndex < lastIndex)) {\n var timer = setInterval(function () {\n var nextActiveIndex = activeIndex < lastIndex ? activeIndex + 1 : 0;\n setIndexes({\n activeIndex: nextActiveIndex,\n priorActiveIndex: activeIndex\n });\n setInTransition(true);\n setDirection('left');\n onChildChange(nextActiveIndex);\n }, play);\n timerRef.current = timer;\n return function () {\n clearTimeout(timer);\n };\n }\n return function () {};\n }, [activeIndex, play, children, lastIndex, onChildChange, wrap]);\n\n // Allow Carousel slides to be controlled outside the component\n useEffect(function () {\n onControlledNavigation(activeIndex, activeChild, activeChildState, inTransition);\n }, [onControlledNavigation, activeIndex, activeChild, activeChildState, inTransition]);\n var showArrows = controls && controls !== 'selectors';\n var showSelectors = controls && controls !== 'arrows';\n var CurrentIcon = theme.carousel.icons.current;\n var iconColor = normalizeColor(theme.carousel.icons.color || 'control', theme);\n var selectors = [];\n var wrappedChildren = Children.map(children, function (child, index) {\n selectors.push( /*#__PURE__*/React.createElement(Button, {\n a11yTitle: format({\n id: 'carousel.jump',\n values: {\n slide: index + 1\n }\n })\n // eslint-disable-next-line react/no-array-index-key\n ,\n key: index,\n icon: /*#__PURE__*/React.createElement(CurrentIcon, {\n color: activeIndex === index ? iconColor : undefined\n }),\n onClick: onSelect(index)\n }));\n return /*#__PURE__*/React.createElement(CarouselChild, {\n animationDuration: animationDuration,\n fill: fill || !!height || !!width,\n index: index,\n activeIndex: activeIndex,\n priorActiveIndex: priorActiveIndex,\n direction: direction\n }, child);\n });\n var NextIcon = theme.carousel.icons.next;\n var PreviousIcon = theme.carousel.icons.previous;\n var nextIconDisabled = !wrap && activeIndex >= lastIndex;\n var previousIconDisabled = !wrap && activeIndex <= 0;\n return /*#__PURE__*/React.createElement(Keyboard, {\n onLeft: onLeft,\n onRight: onRight\n }, /*#__PURE__*/React.createElement(StyledCarouselContainer, _extends({\n fill: fill,\n height: height,\n width: width\n }, rest), showArrows && /*#__PURE__*/React.createElement(StyledControl, {\n offsetProp: \"left\",\n fill: \"vertical\"\n }, /*#__PURE__*/React.createElement(Button, {\n fill: \"vertical\",\n icon: /*#__PURE__*/React.createElement(PreviousIcon, {\n color: normalizeColor(previousIconDisabled ? theme.carousel.disabled.icons.color : theme.carousel.icons.color, theme)\n }),\n a11yTitle: format({\n id: 'carousel.previous',\n values: {\n slide: activeIndex\n }\n }),\n plain: true,\n disabled: previousIconDisabled,\n onClick: onLeft,\n hoverIndicator: true\n })), wrappedChildren, showSelectors && /*#__PURE__*/React.createElement(StyledControl, {\n offsetProp: \"bottom\",\n fill: \"horizontal\"\n }, /*#__PURE__*/React.createElement(Box, {\n justify: \"end\",\n fill: !showArrows && 'horizontal'\n }, /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n justify: \"center\"\n }, selectors))), showArrows && /*#__PURE__*/React.createElement(StyledControl, {\n offsetProp: \"right\",\n fill: \"vertical\"\n }, /*#__PURE__*/React.createElement(Button, {\n fill: \"vertical\",\n icon: /*#__PURE__*/React.createElement(NextIcon, {\n color: normalizeColor(nextIconDisabled ? theme.carousel.disabled.icons.color : theme.carousel.icons.color, theme)\n }),\n a11yTitle: format({\n id: 'carousel.next',\n values: {\n slide: activeIndex + 2\n }\n }),\n plain: true,\n disabled: nextIconDisabled,\n onClick: onRight,\n hoverIndicator: true\n }))));\n};\nCarousel.defaultProps = {\n initialChild: 0,\n controls: true\n};\nObject.setPrototypeOf(Carousel.defaultProps, defaultProps);\nCarousel.displayName = 'Carousel';\nCarousel.propTypes = CarouselPropTypes;\nexport { Carousel };","import React, { useState } from 'react';\n\n// When not a descendant of a Form, FormContext still provides a basic\n// useFormInput. It doesn't do anything for components like TextInput.\n// But, it does store the value for components like CheckBox or Select\n// where the grommet component needs to know the value in order to\n// render custom visuals.\nvar useFormInput = function useFormInput(_ref) {\n var valueProp = _ref.value,\n initialValue = _ref.initialValue;\n var _useState = useState(valueProp !== undefined ? valueProp : initialValue),\n value = _useState[0],\n setValue = _useState[1];\n\n // Returns an array [value and function to set the value]\n return [valueProp !== undefined ? valueProp : value, function (nextValue) {\n if (initialValue !== undefined) setValue(nextValue);\n }];\n};\nvar useFormField = function useFormField(_ref2) {\n var error = _ref2.error,\n info = _ref2.info,\n disabled = _ref2.disabled;\n return {\n error: error,\n info: info,\n disabled: disabled\n };\n};\nexport var FormContext = /*#__PURE__*/React.createContext({\n useFormField: useFormField,\n useFormInput: useFormInput,\n noForm: true\n});","import PropTypes from 'prop-types';\nimport { padPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n a11yTitle: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n fill: PropTypes.bool,\n id: PropTypes.string,\n label: PropTypes.node,\n name: PropTypes.string,\n onChange: PropTypes.func,\n pad: padPropType,\n reverse: PropTypes.bool,\n toggle: PropTypes.bool,\n indeterminate: PropTypes.bool\n };\n}\nexport var CheckBoxPropTypes = PropType;","import styled, { css } from 'styled-components';\nimport { edgeStyle, focusStyle, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\n\n// Note: since `fillStyle` is only used in one place, `justify-content` was\n// added to it to simplify its logic. If this is ever reused somewhere else,\n// consider the need of separating those once again.\nvar fillStyle = function fillStyle() {\n return \"\\n width: auto;\\n height: 100%;\\n max-width: none;\\n flex: 1 0 auto;\\n justify-content: space-between;\\n \";\n};\nvar disabledStyle = \"\\n opacity: 0.5;\\n cursor: default;\\n\";\nvar hoverStyle = css([\":hover input:not([disabled]) + div,:hover input:not([disabled]) + span{border-color:\", \";\", \"}:hover{background-color:\", \";}\"], function (props) {\n var _props$theme$checkBox;\n return normalizeColor((_props$theme$checkBox = props.theme.checkBox.hover) == null || (_props$theme$checkBox = _props$theme$checkBox.border) == null ? void 0 : _props$theme$checkBox.color, props.theme);\n}, function (props) {\n var _props$theme$checkBox2;\n return (_props$theme$checkBox2 = props.theme.checkBox.hover) == null ? void 0 : _props$theme$checkBox2.extend;\n}, function (props) {\n var _props$theme$checkBox3;\n return normalizeColor(!props.disabled && ((_props$theme$checkBox3 = props.theme.checkBox.hover) == null || (_props$theme$checkBox3 = _props$theme$checkBox3.background) == null ? void 0 : _props$theme$checkBox3.color), props.theme);\n});\nvar StyledCheckBoxIcon = styled.svg.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxIcon\",\n componentId: \"sc-1dbk5ju-0\"\n})([\"box-sizing:border-box;stroke-width:\", \";stroke:\", \";width:\", \";height:\", \";\", \";\"], function (props) {\n return props.theme.checkBox.check.thickness;\n}, function (props) {\n return normalizeColor(props.theme.checkBox.color || 'control', props.theme);\n}, function (props) {\n return props.theme.checkBox.icon.size || props.theme.checkBox.size;\n}, function (props) {\n return props.theme.checkBox.icon.size || props.theme.checkBox.size;\n}, function (props) {\n return props.theme.checkBox.icon.extend;\n});\nStyledCheckBoxIcon.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxIcon.defaultProps, defaultProps);\nvar StyledCheckBoxContainer = styled.label.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxContainer\",\n componentId: \"sc-1dbk5ju-1\"\n})([\"display:flex;flex-direction:row;align-items:\", \";user-select:none;\", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], function (props) {\n return typeof props.label === 'string' ? props.theme.checkBox.label.align : undefined;\n}, function (props) {\n return props.fillProp ? fillStyle() : 'width: fit-content;';\n}, function (props) {\n return (props.pad || props.theme.checkBox.pad) && edgeStyle('padding', props.pad || props.theme.checkBox.pad, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return props.disabled && disabledStyle;\n}, function (props) {\n return !props.disabled && 'cursor: pointer;';\n}, hoverStyle, function (props) {\n var _props$theme$checkBox4, _props$theme$checkBox5;\n return props.focus && !props.focusIndicator && \"\\n input:not([disabled]) + div,\\n input:not([disabled]) + span {\\n border-color: \" + normalizeColor((_props$theme$checkBox4 = props.theme.checkBox.hover) == null || (_props$theme$checkBox4 = _props$theme$checkBox4.border) == null ? void 0 : _props$theme$checkBox4.color, props.theme) + \";\\n }\\n\\n background-color: \" + normalizeColor(!props.disabled && ((_props$theme$checkBox5 = props.theme.checkBox.hover) == null || (_props$theme$checkBox5 = _props$theme$checkBox5.background) == null ? void 0 : _props$theme$checkBox5.color), props.theme) + \";\";\n}, function (props) {\n return props.theme.checkBox.extend;\n});\nStyledCheckBoxContainer.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxContainer.defaultProps, defaultProps);\nvar StyledCheckBoxInput = styled.input.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxInput\",\n componentId: \"sc-1dbk5ju-2\"\n})([\"opacity:0;-moz-appearance:none;width:0;height:0;margin:0;\", \":checked + span > span{\", \":calc( \", \" - \", \" );background:\", \";}\"], function (props) {\n return !props.disabled && 'cursor: pointer;';\n}, function (props) {\n return !props.theme.dir ? 'left' : 'right';\n}, function (props) {\n return props.theme.checkBox.toggle.size;\n}, function (props) {\n return props.theme.checkBox.size;\n}, function (props) {\n return normalizeColor(props.theme.checkBox.color || 'control', props.theme);\n});\nStyledCheckBoxInput.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxInput.defaultProps, defaultProps);\nvar StyledCheckBoxBox = styled.div.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxBox\",\n componentId: \"sc-1dbk5ju-3\"\n})([\"\", \";\", \";\"], function (props) {\n return props.focus && props.focusIndicator && focusStyle();\n}, function (props) {\n return props.theme.checkBox.check.extend;\n});\nStyledCheckBoxBox.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxBox.defaultProps, defaultProps);\nvar StyledCheckBoxToggle = styled.span.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxToggle\",\n componentId: \"sc-1dbk5ju-4\"\n})([\"box-sizing:border-box;vertical-align:middle;display:inline-block;width:\", \";height:\", \";border:\", \" solid;border-color:\", \";border-radius:\", \";background-color:\", \";\", \";\", \";\"], function (props) {\n return props.theme.checkBox.toggle.size;\n}, function (props) {\n return props.theme.checkBox.size;\n}, function (props) {\n return props.theme.checkBox.border.width;\n}, function (props) {\n return normalizeColor(props.theme.checkBox.border.color, props.theme);\n}, function (props) {\n return props.theme.checkBox.toggle.radius;\n}, function (props) {\n return props.theme.checkBox.toggle.background ? normalizeColor(props.theme.checkBox.toggle.background, props.theme) : 'transparent';\n}, function (props) {\n return props.focus && props.focusIndicator && focusStyle();\n}, function (props) {\n return props.theme.checkBox.toggle.extend;\n});\nStyledCheckBoxToggle.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxToggle.defaultProps, defaultProps);\nvar StyledCheckBoxKnob = styled.span.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxKnob\",\n componentId: \"sc-1dbk5ju-5\"\n})([\"box-sizing:border-box;position:relative;display:inherit;top:-\", \";\", \":-\", \";transition:all 0.3s;width:\", \";height:\", \";background:\", \";border-radius:\", \";\", \";\"], function (props) {\n return props.theme.checkBox.border.width;\n}, function (props) {\n return !props.theme.dir ? 'left' : 'right';\n}, function (props) {\n return props.theme.checkBox.border.width;\n}, function (props) {\n return props.theme.checkBox.size;\n}, function (props) {\n return props.theme.checkBox.size;\n}, function (props) {\n return normalizeColor(props.theme.checkBox.toggle.color, props.theme);\n}, function (props) {\n return props.theme.checkBox.toggle.radius;\n}, function (props) {\n return props.theme.checkBox.toggle.knob.extend;\n});\nStyledCheckBoxKnob.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxKnob.defaultProps, defaultProps);\nvar StyledCheckBox = styled.div.withConfig({\n displayName: \"StyledCheckBox\",\n componentId: \"sc-1dbk5ju-6\"\n})([\"flex-shrink:0;\"]);\nStyledCheckBox.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBox.defaultProps, defaultProps);\nexport { StyledCheckBoxIcon, StyledCheckBoxContainer, StyledCheckBoxInput, StyledCheckBoxBox, StyledCheckBoxToggle, StyledCheckBoxKnob, StyledCheckBox };","var _excluded = [\"a11yTitle\", \"aria-label\", \"checked\", \"children\", \"defaultChecked\", \"disabled\", \"fill\", \"focus\", \"focusIndicator\", \"id\", \"label\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"onMouseEnter\", \"onMouseLeave\", \"onMouseOut\", \"onMouseOver\", \"pad\", \"reverse\", \"toggle\", \"indeterminate\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useEffect, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { removeUndefined } from '../../utils/object';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { FormContext } from '../Form/FormContext';\nimport { CheckBoxPropTypes } from './propTypes';\nimport { StyledCheckBox, StyledCheckBoxBox, StyledCheckBoxIcon, StyledCheckBoxContainer, StyledCheckBoxInput, StyledCheckBoxToggle, StyledCheckBoxKnob } from './StyledCheckBox';\nimport { normalizeColor } from '../../utils';\nvar stopLabelClick = function stopLabelClick(event) {\n // prevents clicking on the label trigging the event twice\n // https://stackoverflow.com/questions/24501497/why-the-onclick-element-will-trigger-twice-for-label-element\n if (event.target.type !== 'checkbox') {\n event.stopPropagation();\n }\n};\nvar CheckBox = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref2;\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n checkedProp = _ref.checked,\n children = _ref.children,\n _ref$defaultChecked = _ref.defaultChecked,\n defaultChecked = _ref$defaultChecked === void 0 ? false : _ref$defaultChecked,\n disabled = _ref.disabled,\n fill = _ref.fill,\n focusProp = _ref.focus,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n id = _ref.id,\n label = _ref.label,\n name = _ref.name,\n _onBlur = _ref.onBlur,\n _onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n _onMouseEnter = _ref.onMouseEnter,\n _onMouseLeave = _ref.onMouseLeave,\n _onMouseOut = _ref.onMouseOut,\n _onMouseOver = _ref.onMouseOver,\n pad = _ref.pad,\n reverse = _ref.reverse,\n toggle = _ref.toggle,\n indeterminate = _ref.indeterminate,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var formContext = useContext(FormContext);\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: checkedProp,\n initialValue: defaultChecked\n }),\n checked = _formContext$useFormI[0],\n setChecked = _formContext$useFormI[1];\n var _useState = useState(focusProp),\n focus = _useState[0],\n setFocus = _useState[1];\n useEffect(function () {\n // don't allow checkbox to have focus when disabled\n if (disabled && focusProp) setFocus(false);else setFocus(focusProp);\n }, [disabled, focusProp]);\n useEffect(function () {\n if (checkedProp && indeterminate) {\n console.warn('Checkbox cannot be \"checked\" and \"indeterminate\" at the same time.');\n }\n if (toggle && indeterminate) {\n console.warn('Checkbox of type toggle does not have \"indeterminate\" state.');\n }\n }, [checkedProp, toggle, indeterminate]);\n var themeableProps = {\n checked: checked,\n disabled: disabled,\n focus: focus,\n // when contained in a FormField, focusIndicator = false,\n // so that the FormField has focus style. However, we still\n // need to visually indicate when a CheckBox is active.\n // If focus = true but focusIndicator = false,\n // we will apply the hover treament.\n focusIndicator: focusIndicator,\n reverse: reverse,\n toggle: toggle,\n indeterminate: indeterminate\n };\n var hidden;\n if (disabled && checked) {\n hidden = /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: \"true\"\n });\n }\n var _theme$checkBox$icons = theme.checkBox.icons,\n CheckedIcon = _theme$checkBox$icons.checked,\n IndeterminateIcon = _theme$checkBox$icons.indeterminate;\n var borderColor = normalizeColor(theme.checkBox.border.color, theme);\n if (checked) {\n borderColor = normalizeColor(theme.checkBox.color || 'control', theme);\n }\n var visual = toggle ? /*#__PURE__*/React.createElement(StyledCheckBoxToggle, themeableProps, /*#__PURE__*/React.createElement(StyledCheckBoxKnob, themeableProps)) : /*#__PURE__*/React.createElement(StyledCheckBoxBox, _extends({\n as: Box,\n align: \"center\",\n justify: \"center\",\n width: theme.checkBox.size,\n height: theme.checkBox.size,\n border: {\n size: theme.checkBox.border.width,\n color: borderColor\n },\n round: theme.checkBox.check.radius\n }, themeableProps), !indeterminate && checked && (CheckedIcon ? /*#__PURE__*/React.createElement(CheckedIcon, {\n theme: theme,\n as: StyledCheckBoxIcon\n }) : /*#__PURE__*/React.createElement(StyledCheckBoxIcon, _extends({\n theme: theme,\n viewBox: \"0 0 24 24\",\n preserveAspectRatio: \"xMidYMid meet\"\n }, themeableProps), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"none\",\n d: \"M6,11.3 L10.3,16 L18,6.2\"\n }))), !checked && indeterminate && (IndeterminateIcon ? /*#__PURE__*/React.createElement(IndeterminateIcon, {\n theme: theme,\n as: StyledCheckBoxIcon\n }) : /*#__PURE__*/React.createElement(StyledCheckBoxIcon, _extends({\n theme: theme,\n viewBox: \"0 0 24 24\",\n preserveAspectRatio: \"xMidYMid meet\"\n }, themeableProps), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"none\",\n d: \"M6,12 L18,12\"\n }))));\n var side = !reverse !== !theme.dir ? 'left' : 'right';\n var checkBoxNode = /*#__PURE__*/React.createElement(StyledCheckBox, _extends({\n as: Box,\n align: \"center\",\n justify: \"center\",\n margin: label && (_ref2 = {}, _ref2[side] = theme.checkBox.gap || 'small', _ref2)\n }, themeableProps), /*#__PURE__*/React.createElement(StyledCheckBoxInput, _extends({\n \"aria-label\": ariaLabel || a11yTitle\n }, rest, {\n ref: ref,\n type: \"checkbox\"\n }, removeUndefined({\n id: id,\n name: name,\n checked: checked,\n disabled: disabled\n }), themeableProps, {\n onFocus: function onFocus(event) {\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n },\n onChange: function onChange(event) {\n setChecked(event.target.checked);\n if (_onChange) _onChange(event);\n }\n })), children ? children({\n checked: checked,\n indeterminate: indeterminate\n }) : visual, hidden);\n var normalizedLabel = typeof label === 'string' ? /*#__PURE__*/React.createElement(\"span\", null, label) : label;\n var first = reverse ? normalizedLabel : checkBoxNode;\n var second = reverse ? checkBoxNode : normalizedLabel;\n return /*#__PURE__*/React.createElement(StyledCheckBoxContainer, _extends({\n fillProp: fill,\n reverse: reverse\n }, removeUndefined({\n htmlFor: id,\n disabled: disabled\n }), {\n checked: checked,\n label: label,\n onClick: stopLabelClick,\n pad: pad,\n onMouseEnter: function onMouseEnter(event) {\n return _onMouseEnter == null ? void 0 : _onMouseEnter(event);\n },\n onMouseOver: function onMouseOver(event) {\n return _onMouseOver == null ? void 0 : _onMouseOver(event);\n },\n onMouseLeave: function onMouseLeave(event) {\n return _onMouseLeave == null ? void 0 : _onMouseLeave(event);\n },\n onMouseOut: function onMouseOut(event) {\n return _onMouseOut == null ? void 0 : _onMouseOut(event);\n }\n }, themeableProps), first, second);\n});\nCheckBox.displayName = 'CheckBox';\nCheckBox.propTypes = CheckBoxPropTypes;\nexport { CheckBox };","import styled from 'styled-components';\nimport { Box } from '../Box';\nimport { defaultProps } from '../../default-props';\nvar StyledCheckBoxGroup = styled(Box).withConfig({\n displayName: \"StyledCheckBoxGroup\",\n componentId: \"sc-2nhc5d-0\"\n})([\"\", \"\"], function (props) {\n return props.theme.checkBoxGroup && props.theme.checkBoxGroup.container && props.theme.checkBoxGroup.container.extend;\n});\nStyledCheckBoxGroup.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxGroup.defaultProps, defaultProps);\nexport { StyledCheckBoxGroup };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n value: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),\n defaultValue: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n disabled: PropTypes.bool,\n labelKey: PropTypes.string,\n name: PropTypes.string,\n onChange: PropTypes.func,\n options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.shape({}))]),\n valueKey: PropTypes.string\n };\n}\nexport var CheckBoxGroupPropTypes = PropType;","var _excluded = [\"children\", \"defaultValue\", \"value\", \"disabled\", \"focusIndicator\", \"gap\", \"labelKey\", \"valueKey\", \"onChange\", \"options\", \"name\"],\n _excluded2 = [\"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { CheckBox } from '../CheckBox';\nimport { FormContext } from '../Form/FormContext';\nimport { StyledCheckBoxGroup } from './StyledCheckBoxGroup';\nimport { CheckBoxGroupPropTypes } from './propTypes';\nvar CheckBoxGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n defaultValue = _ref.defaultValue,\n valueProp = _ref.value,\n disabledProp = _ref.disabled,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n gap = _ref.gap,\n labelKey = _ref.labelKey,\n valueKey = _ref.valueKey,\n onChange = _ref.onChange,\n optionsProp = _ref.options,\n name = _ref.name,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var formContext = useContext(FormContext);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n // In case option is a string, normalize it to be an object\n var options = optionsProp.map(function (option) {\n return typeof option === 'string' ? {\n disabled: disabledProp,\n value: option,\n label: option\n } : option;\n });\n\n // 'value' is an array of checked valueKeys\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp,\n initialValue: defaultValue || []\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n\n // Logic is necessary to maintain a proper data structure for Form logic\n var onCheckBoxChange = function onCheckBoxChange(event, optionValue, option) {\n // deep copy of value\n var nextValue = JSON.parse(JSON.stringify(value)) || [];\n var optionIndex = nextValue.indexOf(optionValue);\n // If the value option isn't in the array, add it.\n // Otherwise, remove it.\n if (optionIndex < 0) nextValue.push(optionValue);else nextValue.splice(optionIndex, 1);\n setValue(nextValue);\n // Similar functionality to Select onChange()\n if (onChange) {\n event.persist(); // extract from React synthetic event pool\n var adjustedEvent = event;\n adjustedEvent.value = nextValue;\n adjustedEvent.option = option;\n onChange(adjustedEvent);\n }\n };\n return /*#__PURE__*/React.createElement(StyledCheckBoxGroup, _extends({\n ref: ref,\n role: \"group\"\n }, theme.checkBoxGroup.container, {\n gap: gap || (theme.checkBoxGroup.container && theme.checkBoxGroup.container.gap ? theme.checkBoxGroup.container.gap : 'small') // consistent with RadioButtonGroup default\n }, rest), options.map(function (option, index) {\n var optionValue = option.value;\n var label = labelKey ? option[labelKey] : option.label;\n var valueOption = valueKey ? option[valueKey] : optionValue;\n var checked = value.indexOf(valueOption) >= 0;\n var disabled = disabledProp || option.disabled;\n var key = label + \"-\" + valueOption;\n if (option.checked) console.warn( // eslint-disable-next-line max-len\n \"'checked' prop of an individual CheckBox shouldn't be used in a CheckBoxGroup component. Use the CheckBoxGroup 'value' prop instead.\");\n // value shouldn't propagate the input field and the onChange option\n var omit = option.value,\n optionRest = _objectWithoutPropertiesLoose(option, _excluded2);\n var optionProps = _extends({}, optionRest, {\n label: label,\n disabled: disabled\n });\n return /*#__PURE__*/React.createElement(CheckBox, _extends({\n key: key\n }, optionProps, {\n disabled: disabled,\n checked: checked\n // when contained in a FormField, focusIndicator = false,\n // so that the FormField has focus style. However, we still\n // need to visually indicate when a CheckBox is active.\n // In CheckBox, if focus = true but focusIndicator = false,\n // we will apply the hover treament.\n ,\n focusIndicator: focusIndicator,\n label: label,\n onChange: function onChange(event) {\n return onCheckBoxChange(event, valueOption, optionProps);\n }\n }), children ? function (state) {\n return children(options[index], state);\n } : null);\n }));\n});\nCheckBoxGroup.displayName = 'CheckBoxGroup';\nCheckBoxGroup.propTypes = CheckBoxGroupPropTypes;\nexport { CheckBoxGroup };","import styled, { css, keyframes } from 'styled-components';\nimport { genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar animateStyle = function animateStyle(_ref) {\n var theme = _ref.theme,\n typeProp = _ref.typeProp;\n var animateBounds;\n if (typeProp === 'line')\n // 200% allows the line to be squiggly\n animateBounds = ['stroke-dashoffset: 200%;', 'stroke-dashoffset: 0%;'];else if (typeProp === 'point') animateBounds = ['opacity: 0;', 'opacity: 1;'];else animateBounds = ['transform: scaleY(0);', 'transform: scaleY(1);'];\n return css([\"\", \" animation:\", \" \", \" forwards;\", \"\"], typeProp === 'line' && 'stroke-dasharray: 200%;', keyframes([\"from{\", \"}to{\", \"}\"], animateBounds[0], animateBounds[1]), theme.global.animation.duration, (typeProp === 'bar' || typeProp === 'area') && 'transform-origin: center bottom 0;');\n};\nvar StyledChart = styled.svg.withConfig({\n displayName: \"StyledChart\",\n componentId: \"sc-1nae0gf-0\"\n})([\"display:block;max-width:100%;overflow:visible;\", \" \", \" \", \";\"], genericStyles, function (props) {\n return props.animate && animateStyle(props);\n}, function (props) {\n return props.theme.chart && props.theme.chart.extend;\n});\nStyledChart.defaultProps = {};\nObject.setPrototypeOf(StyledChart.defaultProps, defaultProps);\nexport { StyledChart };","export var normalizeValues = function normalizeValues(values) {\n return (values || []).map(function (value, index) {\n if (value === undefined) return {\n value: [index, undefined]\n };\n if (Array.isArray(value)) return {\n value: value\n };\n if (typeof value === 'object') return value;\n return {\n value: [index, value]\n };\n });\n};\nexport var calcMinMax = function calcMinMax(values, direction) {\n var _ref, _ref2, _ref3, _ref4;\n if (values === void 0) {\n values = [];\n }\n // We default to 0 minimum as that's typically what's wanted.\n // If callers want a narrower band, they can pass bounds explicitly.\n var min0 = (_ref = direction && 0) != null ? _ref : undefined;\n var max0 = (_ref2 = direction && 1) != null ? _ref2 : undefined;\n var min1 = (_ref3 = direction && 0) != null ? _ref3 : undefined;\n var max1 = (_ref4 = direction && 1) != null ? _ref4 : undefined;\n values.forEach(function (value) {\n var _value$value = value.value,\n val0 = _value$value[0],\n val1 = _value$value[1],\n val2 = _value$value[2];\n if (val0 !== undefined) {\n min0 = min0 === undefined ? val0 : Math.min(min0, val0);\n max0 = max0 === undefined ? val0 : Math.max(max0, val0);\n }\n if (val1 !== undefined) {\n min1 = min1 === undefined ? val1 : Math.min(min1, val1);\n max1 = max1 === undefined ? val1 : Math.max(max1, val1);\n }\n if (val2 !== undefined) {\n min1 = min1 === undefined ? val2 : Math.min(min1, val2);\n max1 = max1 === undefined ? val2 : Math.max(max1, val2);\n }\n });\n\n // when max === min, offset them so we can show something\n if (max0 === min0) {\n if (max0 > 0) min0 = max0 - 1;else max0 = min0 + 1;\n }\n if (max1 === min1) {\n if (max1 > 0) min1 = max1 - 1;else max1 = min1 + 1;\n }\n return direction === 'horizontal' ? {\n x: {\n min: min1,\n max: max1\n },\n y: {\n min: min0,\n max: max0\n }\n } : {\n x: {\n min: min0,\n max: max0\n },\n y: {\n min: min1,\n max: max1\n }\n };\n};\nexport var normalizeBounds = function normalizeBounds(boundsProp, values, direction) {\n var result;\n if (Array.isArray(boundsProp)) result = {\n x: {\n min: boundsProp[0][0],\n max: boundsProp[0][1]\n },\n y: {\n min: boundsProp[1][0],\n max: boundsProp[1][1]\n }\n };else if (typeof boundsProp === 'object') result = boundsProp;else result = calcMinMax(values, direction);\n return result;\n};\nexport var areNormalizedValuesEquals = function areNormalizedValuesEquals(valuesX, valuesY) {\n console.warn(\"This function will be removed in the upcoming releases.\\nPlease get in touch with us if you have concerns.\");\n if (!valuesX || !valuesY) return false;\n if (valuesX.length !== valuesY.length) return false;\n if (valuesX.length === 0) return true;\n if (!valuesX[0].value || !valuesY[0].value) return false;\n return valuesX.every(function (_, i) {\n return valuesX[i].value.every(function (value, index) {\n return value === valuesY[i].value[index];\n });\n });\n};\nexport var areNormalizedBoundsEquals = function areNormalizedBoundsEquals(boundsX, boundsY) {\n console.warn(\"This function will be removed in the upcoming releases.\\nPlease get in touch with us if you have concerns.\");\n if (!boundsX || !boundsY) return false;\n if (boundsX.length !== boundsY.length || !(boundsX.length > 0)) return false;\n return boundsX.every(function (_, i) {\n return boundsX[i].every(function (value, index) {\n return value === boundsY[i][index];\n });\n });\n};","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { colorPropType, genericProps, padPropType, patternPropType, pointPropType } from '../../utils/general-prop-types';\nvar thicknessType = PropTypes.oneOfType([PropTypes.oneOf(['hair', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'none']), PropTypes.string, PropTypes.number]);\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n animate: PropTypes.bool,\n bounds: PropTypes.oneOfType([PropTypes.shape({\n x: PropTypes.shape({\n min: PropTypes.number,\n max: PropTypes.number\n }),\n y: PropTypes.shape({\n min: PropTypes.number,\n max: PropTypes.number\n })\n }), PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))]),\n color: PropTypes.oneOfType([colorPropType, PropTypes.shape({\n color: colorPropType,\n // deprecated, use top level 'opacity'\n opacity: PropTypes.oneOfType([PropTypes.oneOf(['weak', 'medium', 'strong']), PropTypes.bool])\n }), PropTypes.arrayOf(PropTypes.shape({\n color: colorPropType,\n value: PropTypes.number\n }))]),\n id: PropTypes.string,\n dash: PropTypes.bool,\n direction: PropTypes.oneOf(['horizontal', 'vertical']),\n gap: PropTypes.oneOfType([PropTypes.oneOf(['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n onClick: PropTypes.func,\n onHover: PropTypes.func,\n opacity: PropTypes.oneOfType([PropTypes.oneOf(['weak', 'medium', 'strong']), PropTypes.bool]),\n overflow: PropTypes.bool,\n pad: padPropType,\n pattern: patternPropType,\n point: pointPropType,\n round: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'fill', 'full']), PropTypes.shape({\n height: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'fill', 'full']), PropTypes.string]),\n width: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'fill', 'full', 'auto']), PropTypes.string])\n }), PropTypes.string]),\n thickness: thicknessType,\n type: PropTypes.oneOf(['bar', 'line', 'area', 'point']),\n values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number), PropTypes.shape({\n color: colorPropType,\n label: PropTypes.string,\n // for accessibility of bars and points\n onClick: PropTypes.func,\n onHover: PropTypes.func,\n opacity: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),\n thickness: thicknessType,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)])\n })]))\n });\n}\nexport var ChartPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"bounds\", \"color\", \"dash\", \"direction\", \"gap\", \"id\", \"onClick\", \"onHover\", \"opacity\", \"overflow\", \"pad\", \"pattern\", \"point\", \"round\", \"size\", \"thickness\", \"type\", \"values\"],\n _excluded2 = [\"color\", \"label\", \"onHover\", \"opacity\", \"thickness\", \"value\"],\n _excluded3 = [\"color\", \"label\", \"onHover\", \"opacity\", \"thickness\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useEffect, useMemo, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { defaultProps } from '../../default-props';\nimport { normalizeColor, parseMetricToNum, useForwardedRef } from '../../utils';\nimport { StyledChart } from './StyledChart';\nimport { normalizeBounds, normalizeValues } from './utils';\nimport { ChartPropTypes } from './propTypes';\nvar gradientMaskColor = '#ffffff';\n\n// use constants so re-renders don't re-trigger effects\nvar defaultSize = {\n height: 'small',\n width: 'medium'\n};\nvar defaultValues = [];\nvar Chart = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n boundsProp = _ref.bounds,\n color = _ref.color,\n dash = _ref.dash,\n _ref$direction = _ref.direction,\n direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,\n gap = _ref.gap,\n id = _ref.id,\n onClick = _ref.onClick,\n onHover = _ref.onHover,\n opacityProp = _ref.opacity,\n _ref$overflow = _ref.overflow,\n overflow = _ref$overflow === void 0 ? false : _ref$overflow,\n pad = _ref.pad,\n pattern = _ref.pattern,\n point = _ref.point,\n round = _ref.round,\n sizeProp = _ref.size,\n _ref$thickness = _ref.thickness,\n thickness = _ref$thickness === void 0 ? 'medium' : _ref$thickness,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'bar' : _ref$type,\n _ref$values = _ref.values,\n valuesProp = _ref$values === void 0 ? defaultValues : _ref$values,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var containerRef = useForwardedRef(ref);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var values = useMemo(function () {\n return normalizeValues(valuesProp);\n }, [valuesProp]);\n var horizontal = useMemo(function () {\n return direction === 'horizontal';\n }, [direction]);\n\n // bounds is { x: { min, max }, y: { min, max } }\n var bounds = useMemo(function () {\n return normalizeBounds(boundsProp, values, direction);\n }, [direction, boundsProp, values]);\n var strokeWidth = useMemo(function () {\n return parseMetricToNum(theme.global.edgeSize[thickness] || thickness);\n }, [theme.global.edgeSize, thickness]);\n\n // inset is { top, left, bottom, right }\n var inset = useMemo(function () {\n var result = {\n top: 0,\n left: 0,\n bottom: 0,\n right: 0\n };\n if (pad) {\n if (pad.horizontal) {\n var padSize = parseMetricToNum(theme.global.edgeSize[pad.horizontal] || pad.horizontal);\n result.left = padSize;\n result.right = padSize;\n }\n if (pad.vertical) {\n var _padSize = parseMetricToNum(theme.global.edgeSize[pad.vertical] || pad.vertical);\n result.top = _padSize;\n result.bottom = _padSize;\n }\n if (pad.start) {\n result.left = parseMetricToNum(theme.global.edgeSize[pad.start] || pad.start);\n }\n if (pad.end) {\n result.right = parseMetricToNum(theme.global.edgeSize[pad.end] || pad.end);\n }\n if (typeof pad === 'string') {\n var _padSize2 = parseMetricToNum(theme.global.edgeSize[pad]);\n result.top = _padSize2;\n result.left = _padSize2;\n result.bottom = _padSize2;\n result.right = _padSize2;\n }\n }\n return result;\n }, [pad, theme.global.edgeSize]);\n var strokeDasharray = useMemo(function () {\n if (dash) {\n if (round) return strokeWidth + \" \" + strokeWidth * 1.5;\n return strokeWidth * 2 + \" \" + strokeWidth / 2;\n }\n return undefined;\n }, [dash, round, strokeWidth]);\n\n // potentially dynamic sizing\n\n var _useState = useState([0, 0]),\n containerSize = _useState[0],\n setContainerSize = _useState[1];\n var needContainerSize = useMemo(function () {\n return sizeProp && (sizeProp === 'full' || sizeProp === 'fill' || sizeProp.height === 'full' || sizeProp.height === 'fill' || sizeProp.width === 'full' || sizeProp.width === 'fill');\n }, [sizeProp]);\n\n // size is { width, height }\n var size = useMemo(function () {\n var gapWidth = gap ? parseMetricToNum(theme.global.edgeSize[gap] || gap) : strokeWidth;\n\n // autoSize is how wide or tall we'd pefer based on the number of values\n var autoSize = strokeWidth * values.length + (values.length - 1) * gapWidth;\n var sizeWidth = typeof sizeProp === 'string' ? sizeProp : (sizeProp == null ? void 0 : sizeProp.width) || horizontal && defaultSize.height || defaultSize.width;\n var width;\n if (sizeWidth === 'full' || sizeWidth === 'fill') {\n width = containerSize[0];\n } else if (sizeWidth === 'auto') {\n width = autoSize;\n } else {\n width = parseMetricToNum(theme.global.size[sizeWidth] || sizeWidth);\n }\n var sizeHeight = typeof sizeProp === 'string' ? sizeProp : (sizeProp == null ? void 0 : sizeProp.height) || horizontal && defaultSize.width || defaultSize.height;\n var height;\n if (sizeHeight === 'full' || sizeHeight === 'fill') {\n height = containerSize[1];\n } else if (sizeHeight === 'auto') {\n height = autoSize;\n } else {\n height = parseMetricToNum(theme.global.size[sizeHeight] || sizeHeight);\n }\n return {\n width: width,\n height: height\n };\n }, [containerSize, gap, horizontal, sizeProp, strokeWidth, theme.global.edgeSize, theme.global.size, values]);\n\n // scale is { x, y }\n var scale = useMemo(function () {\n return {\n x: (size.width - (inset.left + inset.right)) / (bounds.x.max - bounds.x.min),\n y: (size.height - (inset.top + inset.bottom)) / (bounds.y.max - bounds.y.min)\n };\n }, [bounds, inset, size]);\n var viewBoxBounds = useMemo(function () {\n if (overflow) {\n return [0, 0, size.width, size.height];\n }\n return [-(strokeWidth / 2), -(strokeWidth / 2), size.width + strokeWidth, size.height + strokeWidth];\n }, [overflow, size, strokeWidth]);\n\n // set container size when we get ref or when size changes\n useLayoutEffect(function () {\n if (containerRef.current && needContainerSize) {\n var containerNode = containerRef.current;\n if (containerNode) {\n var parentNode = containerNode.parentNode;\n if (parentNode) {\n var rect = parentNode.getBoundingClientRect();\n if (rect.width !== containerSize[0] || rect.height !== containerSize[1]) {\n setContainerSize([rect.width, rect.height]);\n }\n }\n }\n }\n }, [containerRef, containerSize, needContainerSize]);\n\n // container size, if needed\n useEffect(function () {\n var onResize = function onResize() {\n var parentNode = containerRef.current.parentNode;\n var rect = parentNode.getBoundingClientRect();\n setContainerSize([rect.width, rect.height]);\n };\n if (needContainerSize) {\n window.addEventListener('resize', onResize);\n return function () {\n return window.removeEventListener('resize', onResize);\n };\n }\n return undefined;\n }, [containerRef, needContainerSize]);\n\n // rendering helpers, to make rendering code easier to understand\n\n var valueCoords = function valueCoords(x, y) {\n return horizontal ? [y, x] : [x, y];\n };\n\n // Converts values to drawing coordinates.\n // Takes into account the bounds, any inset, and the scale.\n var valueToCoordinate = function valueToCoordinate(xValue, yValue) {\n var y = (yValue - bounds.y.min) * scale.y + inset.top;\n return [(xValue - bounds.x.min) * scale.x + inset.left,\n // horizontal grows y top down, vertical grows y bottom up\n horizontal ? y : size.height - y];\n };\n var useGradient = color && Array.isArray(color);\n var patternId;\n function getOpacity(valueOpacity) {\n return valueOpacity && theme.global.opacity[valueOpacity] || (\n // eslint-disable-next-line no-nested-ternary\n valueOpacity === true ? theme.global.opacity.medium : valueOpacity === false ? undefined : valueOpacity);\n }\n var renderBars = function renderBars() {\n return (values || []).filter(function (_ref2) {\n var value = _ref2.value;\n return value[1] !== undefined;\n }).map(function (valueArg, index) {\n var valueColor = valueArg.color,\n label = valueArg.label,\n valueOnHover = valueArg.onHover,\n valueOpacity = valueArg.opacity,\n valueThickness = valueArg.thickness,\n value = valueArg.value,\n valueRest = _objectWithoutPropertiesLoose(valueArg, _excluded2);\n var key = \"p-\" + index;\n // Math.min/max are to handle negative values\n var _valueCoords = valueCoords(value[0], value.length === 2 ? Math.min(Math.max(0, horizontal ? bounds.x.min : bounds.y.min), value[1]) : Math.min(value[1], value[2])),\n startX = _valueCoords[0],\n startY = _valueCoords[1];\n var _valueCoords2 = valueCoords(value[0], value.length === 2 ? Math.max(Math.min(0, horizontal ? bounds.x.max : bounds.y.max), value[1]) : Math.max(value[1], value[2])),\n endX = _valueCoords2[0],\n endY = _valueCoords2[1];\n var d = \"M \" + valueToCoordinate(startX, startY).join(',') + (\" L \" + valueToCoordinate(endX, endY).join(','));\n var hoverProps;\n if (valueOnHover) {\n hoverProps = {\n onMouseOver: function onMouseOver() {\n return valueOnHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return valueOnHover(false);\n }\n };\n }\n var clickProps;\n if (onClick) {\n clickProps = {\n onClick: onClick\n };\n }\n return /*#__PURE__*/React.createElement(\"g\", {\n key: key,\n fill: \"none\",\n stroke: valueColor ? normalizeColor(valueColor, theme) : undefined,\n strokeWidth: valueThickness ? parseMetricToNum(theme.global.edgeSize[valueThickness] || valueThickness) : undefined,\n opacity: getOpacity(valueOpacity)\n }, /*#__PURE__*/React.createElement(\"title\", null, label), /*#__PURE__*/React.createElement(\"path\", _extends({\n d: d\n }, hoverProps, clickProps, valueRest, {\n strokeDasharray: strokeDasharray\n })));\n });\n };\n var renderLine = function renderLine() {\n var d = '';\n var d2 = '';\n (values || []).filter(function (_ref3) {\n var value = _ref3.value;\n return value[1] !== undefined;\n }).forEach(function (_ref4) {\n var value = _ref4.value;\n var _valueCoords3 = valueCoords(value[0], value[1]),\n x = _valueCoords3[0],\n y = _valueCoords3[1];\n d += (d ? ' L' : 'M') + \" \" + valueToCoordinate(x, y).join(',');\n if (value[2] !== undefined) {\n var _valueCoords4 = valueCoords(value[0], value[2]),\n x2 = _valueCoords4[0],\n y2 = _valueCoords4[1];\n d2 += (d2 ? ' L' : 'M') + \" \" + valueToCoordinate(x2, y2).join(',');\n }\n });\n var hoverProps;\n if (onHover) {\n hoverProps = {\n onMouseOver: function onMouseOver() {\n return onHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return onHover(false);\n }\n };\n }\n var clickProps;\n if (onClick) {\n clickProps = {\n onClick: onClick\n };\n }\n return /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\"\n }, /*#__PURE__*/React.createElement(\"path\", _extends({\n d: d\n }, hoverProps, clickProps, {\n strokeDasharray: strokeDasharray\n })), d2 && /*#__PURE__*/React.createElement(\"path\", _extends({\n d: d2\n }, hoverProps, clickProps, {\n strokeDasharray: strokeDasharray\n })));\n };\n var renderArea = function renderArea() {\n var d = '';\n (values || []).filter(function (_ref5) {\n var value = _ref5.value;\n return value[1] !== undefined;\n }).forEach(function (_ref6, index) {\n var value = _ref6.value;\n var _valueCoords5 = valueCoords(value[0],\n // when a range, second value is on top\n value[value.length === 2 ? 1 : 2]),\n x = _valueCoords5[0],\n y = _valueCoords5[1];\n d += (!index ? 'M' : ' L') + \" \" + valueToCoordinate(x, y).join(',');\n });\n (values || []).filter(function (_ref7) {\n var value = _ref7.value;\n return value[1] !== undefined;\n }).reverse().forEach(function (_ref8) {\n var value = _ref8.value;\n var _valueCoords6 = valueCoords(value[0],\n // Math.max() is to account for value[1] being negative\n value.length === 2 ? Math.max(0, horizontal ? bounds.x.min : bounds.y.min) : value[1]),\n x = _valueCoords6[0],\n y = _valueCoords6[1];\n d += \" L \" + valueToCoordinate(x, y).join(',');\n });\n if (d.length > 0) {\n d += ' Z';\n }\n var hoverProps;\n if (onHover) {\n hoverProps = {\n onMouseOver: function onMouseOver() {\n return onHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return onHover(false);\n }\n };\n }\n var clickProps;\n if (onClick) {\n clickProps = {\n onClick: onClick\n };\n }\n patternId = pattern && pattern + \"-\" + id + \"-pattern\";\n return /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", _extends({\n d: d,\n fill: patternId ? \"url(#\" + patternId + \")\" : undefined\n }, hoverProps, clickProps)));\n };\n var renderPoints = function renderPoints() {\n return (values || []).filter(function (_ref9) {\n var value = _ref9.value;\n return value[1] !== undefined;\n }).map(function (valueArg, index) {\n var valueColor = valueArg.color,\n label = valueArg.label,\n valueOnHover = valueArg.onHover,\n valueOpacity = valueArg.opacity,\n valueThickness = valueArg.thickness,\n value = valueArg.value,\n valueRest = _objectWithoutPropertiesLoose(valueArg, _excluded3);\n var key = \"p-\" + index;\n var hoverProps;\n if (valueOnHover) {\n hoverProps = {\n onMouseOver: function onMouseOver() {\n return valueOnHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return valueOnHover(false);\n }\n };\n }\n var clickProps;\n if (onClick) {\n clickProps = {\n onClick: onClick\n };\n }\n var width = valueThickness ? parseMetricToNum(theme.global.edgeSize[valueThickness] || valueThickness) : strokeWidth;\n var renderPoint = function renderPoint(valueX, valueY) {\n var props = _extends({}, hoverProps, clickProps, valueRest);\n var _valueCoords7 = valueCoords(valueX, valueY),\n x = _valueCoords7[0],\n y = _valueCoords7[1];\n var _valueToCoordinate = valueToCoordinate(x, y),\n cx = _valueToCoordinate[0],\n cy = _valueToCoordinate[1];\n var off = width / 2;\n if (point === 'circle' || !point && round) return /*#__PURE__*/React.createElement(\"circle\", _extends({\n cx: cx,\n cy: cy,\n r: off\n }, props));\n var d;\n if (point === 'diamond') d = \"M \" + cx + \" \" + (cy - off) + \" L \" + (cx + off) + \" \" + cy + \" L \" + cx + \" \" + (cy + off) + \" L \" + (cx - off) + \" \" + cy + \" Z\";else if (point === 'star') {\n var off1 = off / 3;\n var off2 = off1 * 2;\n d = \"M \" + cx + \" \" + (cy - off) + \" L \" + (cx - off2) + \" \" + (cy + off) + \" L \" + (cx + off) + \" \" + (cy - off1) + \" L \" + (cx - off) + \" \" + (cy - off1) + \" L \" + (cx + off2) + \" \" + (cy + off) + \" Z\";\n } else if (point === 'triangle') d = \"M \" + cx + \" \" + (cy - off) + \" L \" + (cx + off) + \" \" + (cy + off) + \" L \" + (cx - off) + \" \" + (cy + off) + \" Z\";else if (point === 'triangleDown') d = \"M \" + (cx - off) + \" \" + (cy - off) + \" L \" + (cx + off) + \" \" + (cy - off) + \" L \" + cx + \" \" + (cy + off) + \" Z\";\n // square\n else d = \"M \" + (cx - off) + \" \" + (cy - off) + \" L \" + (cx + off) + \" \" + (cy - off) + \" L \" + (cx + off) + \" \" + (cy + off) + \" L \" + (cx - off) + \" \" + (cy + off) + \" Z\";\n return /*#__PURE__*/React.createElement(\"path\", {\n d: d\n });\n };\n return /*#__PURE__*/React.createElement(\"g\", {\n key: key,\n stroke: \"none\",\n fill: valueColor ? normalizeColor(valueColor, theme) : undefined,\n opacity: getOpacity(valueOpacity)\n }, /*#__PURE__*/React.createElement(\"title\", null, label), renderPoint(value[0], value[1]), value[2] !== undefined && renderPoint(value[0], value[2]));\n });\n };\n var contents;\n if (type === 'bar') {\n contents = renderBars();\n } else if (type === 'line') {\n contents = renderLine();\n } else if (type === 'area') {\n contents = renderArea();\n } else if (type === 'point') {\n contents = renderPoints();\n }\n var viewBox = viewBoxBounds.join(' ');\n var colorName;\n if (!useGradient) {\n if (color && color.color) colorName = color.color;else if (color) colorName = color;else if (theme.chart && theme.chart.color) colorName = theme.chart.color;\n }\n var opacity;\n if (opacityProp === true) {\n opacity = theme.global.opacity.medium;\n } else if (opacityProp) {\n opacity = theme.global.opacity[opacityProp] ? theme.global.opacity[opacityProp] : opacityProp;\n } else if (color && color.opacity) {\n opacity = theme.global.opacity[color.opacity] ? theme.global.opacity[color.opacity] : color.opacity;\n } else opacity = undefined;\n var stroke;\n if (type !== 'point') {\n if (useGradient) stroke = gradientMaskColor;else stroke = normalizeColor(colorName, theme);\n } else stroke = 'none';\n var fill;\n if (type === 'point' || type === 'area') {\n if (useGradient) fill = gradientMaskColor;else fill = normalizeColor(colorName, theme);\n } else fill = 'none';\n var drawing = /*#__PURE__*/React.createElement(\"g\", {\n stroke: stroke,\n strokeWidth: type !== 'point' && (type !== 'area' || !pattern) ? strokeWidth : undefined,\n fill: fill,\n strokeLinecap: round ? 'round' : 'butt',\n strokeLinejoin: round ? 'round' : 'miter',\n opacity: opacity\n }, contents);\n var defs = [];\n var gradientRect;\n if (useGradient && (horizontal && size.width || size.height)) {\n var uniqueGradientId = color.map(function (element) {\n return element.color;\n }).join('-');\n var gradientId = uniqueGradientId + \"-\" + id + \"-gradient\";\n var maskId = uniqueGradientId + \"-\" + id + \"-mask\";\n defs.push( /*#__PURE__*/React.createElement(\"linearGradient\", {\n key: \"gradientId\",\n id: gradientId,\n x1: 0,\n y1: 0,\n x2: horizontal ? 1 : 0,\n y2: horizontal ? 0 : 1\n }, color.slice(0).sort(function (c1, c2) {\n return horizontal ? c1.value - c2.value : c2.value - c1.value;\n }).map(function (_ref10) {\n var value = _ref10.value,\n gradientColor = _ref10.color;\n return /*#__PURE__*/React.createElement(\"stop\", {\n key: value,\n offset: horizontal ? (value - bounds.x.min) * scale.x / size.width : (size.height - (value - bounds.y.min) * scale.y) / size.height,\n stopColor: normalizeColor(gradientColor, theme)\n });\n })));\n defs.push( /*#__PURE__*/React.createElement(\"mask\", {\n key: \"mask\",\n id: maskId\n }, drawing));\n gradientRect = /*#__PURE__*/React.createElement(\"rect\", {\n x: viewBoxBounds[0],\n y: viewBoxBounds[1],\n width: viewBoxBounds[2],\n height: viewBoxBounds[3],\n fill: \"url(#\" + gradientId + \")\",\n mask: \"url(#\" + maskId + \")\"\n });\n } else if (patternId) {\n var content;\n var diagonal = pattern.match(/Diagonal/);\n var unit = diagonal ? strokeWidth * Math.sqrt(2) : strokeWidth;\n var half = unit / 2;\n var _double = unit * 2;\n var pColor = normalizeColor(colorName, theme);\n if (pattern === 'squares') {\n content = /*#__PURE__*/React.createElement(\"rect\", {\n x: half,\n y: half,\n width: unit,\n height: unit,\n fill: pColor\n });\n } else if (pattern === 'circles') {\n content = /*#__PURE__*/React.createElement(\"circle\", {\n cx: unit,\n cy: unit,\n r: half,\n fill: pColor\n });\n } else if (pattern === 'stripesHorizontal') {\n content = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M 0 \" + unit + \" L \" + _double + \" \" + unit,\n stroke: pColor,\n strokeWidth: strokeWidth\n });\n } else if (pattern === 'stripesVertical') {\n content = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M \" + unit + \" 0 L \" + unit + \" \" + _double,\n stroke: pColor,\n strokeWidth: strokeWidth\n });\n } else if (pattern === 'stripesDiagonalDown') {\n content = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M \" + half + \" \" + -half + \" L \" + (_double + half) + \" \" + (_double - half) + \"\\n M \" + -half + \" \" + half + \" L \" + (_double - half) + \" \" + (_double + half),\n stroke: pColor,\n strokeWidth: strokeWidth\n });\n } else if (pattern === 'stripesDiagonalUp') {\n content = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M \" + -half + \" \" + (_double - half) + \" L \" + (_double - half) + \" \" + -half + \"\\n M \" + half + \" \" + (_double + half) + \" L \" + (_double + half) + \" \" + half,\n stroke: pColor,\n strokeWidth: strokeWidth\n });\n }\n defs.push( /*#__PURE__*/React.createElement(\"pattern\", {\n key: patternId,\n id: patternId,\n width: _double,\n height: _double,\n patternUnits: \"userSpaceOnUse\"\n }, content));\n }\n return /*#__PURE__*/React.createElement(StyledChart, _extends({\n ref: containerRef,\n id: id,\n \"aria-label\": a11yTitle,\n viewBox: viewBox,\n preserveAspectRatio: \"none\",\n width: size === 'full' ? '100%' : size.width,\n height: size === 'full' ? '100%' : size.height,\n typeProp: type // prevent adding to DOM\n }, rest), defs.length && /*#__PURE__*/React.createElement(\"defs\", null, defs), useGradient ? gradientRect : drawing);\n});\nChart.displayName = 'Chart';\nChart.propTypes = ChartPropTypes;\nexport { Chart };","import { calcMinMax, normalizeValues } from './utils';\nvar thicknessPad = {\n xlarge: 'large',\n large: 'medium',\n medium: 'small',\n small: 'xsmall',\n xsmall: 'xxsmall'\n};\nexport var round = function round(value, decimals) {\n return Number(Math.round(value + \"e\" + decimals) + \"e-\" + decimals);\n};\n\n// Normalize coarseness to an object.\n// Backwards compatible has no coarseness for x-axis.\nvar normalizeCoarseness = function normalizeCoarseness(coarseness, direction) {\n var result;\n if (Array.isArray(coarseness)) result = {\n x: coarseness[0],\n y: coarseness[1]\n };else if (typeof coarseness === 'object') result = coarseness;else if (coarseness) result = {\n x: undefined,\n y: coarseness\n };else result = direction === 'horizontal' ? {\n x: 5,\n y: undefined\n } : {\n x: undefined,\n y: 5\n };\n return result;\n};\nvar normalizeSteps = function normalizeSteps(steps) {\n var result;\n if (Array.isArray(steps)) result = {\n x: steps[0],\n y: steps[1]\n };else if (typeof steps === 'object') result = steps;else result = {\n x: 1,\n y: 1\n };\n return result;\n};\nvar alignMax = function alignMax(value, interval) {\n if (value > 0) return value - value % interval + interval;\n if (value < 0) return value + value % interval;\n return value;\n};\nvar alignMin = function alignMin(value, interval) {\n if (value > 0) return value - value % interval;\n if (value < 0) return value - value % interval - interval;\n return value;\n};\nvar adjustToShowZero = function adjustToShowZero(minArg, maxArg, steps) {\n var min = minArg;\n var max = maxArg;\n if (min < 0 && max > 0 && Math.abs(min) !== Math.abs(max)) {\n // Adjust min and max when crossing 0 to ensure 0 will be shown on\n // the axis based on the number of steps.\n if (steps === 1) {\n var largest = Math.max(Math.abs(min), Math.abs(max));\n min = -largest;\n max = largest;\n } else {\n var stepInterval = (max - min) / steps;\n var minSteps = min / stepInterval;\n var maxSteps = max / stepInterval;\n if (Math.abs(minSteps) < Math.abs(maxSteps)) {\n // more above than below\n stepInterval = max / Math.floor(maxSteps);\n max = stepInterval * Math.floor(maxSteps);\n min = stepInterval * Math.floor(minSteps);\n } else {\n // more below than above\n stepInterval = Math.abs(min / Math.ceil(minSteps));\n min = stepInterval * Math.ceil(minSteps);\n max = stepInterval * Math.ceil(maxSteps);\n }\n }\n }\n return [min, max];\n};\nexport var calcBounds = function calcBounds(valuesArg, options) {\n if (options === void 0) {\n options = {};\n }\n // coarseness influences the rounding of the bounds, the smaller the\n // number, the more the bounds will be rounded. e.g. 111 -> 110 -> 100.\n var _normalizeCoarseness = normalizeCoarseness(options.coarseness, options.direction),\n coarseX = _normalizeCoarseness.x,\n coarseY = _normalizeCoarseness.y;\n\n // the number of steps is one less than the number of labels\n var _normalizeSteps = normalizeSteps(options.steps),\n stepsX = _normalizeSteps.x,\n stepsY = _normalizeSteps.y;\n var values = normalizeValues(valuesArg || []);\n var result;\n if (values.length) {\n // min and max values\n var _calcMinMax = calcMinMax(values, options.direction),\n _calcMinMax$x = _calcMinMax.x,\n minX = _calcMinMax$x.min,\n maxX = _calcMinMax$x.max,\n _calcMinMax$y = _calcMinMax.y,\n minY = _calcMinMax$y.min,\n maxY = _calcMinMax$y.max;\n\n // Calculate some reasonable bounds based on the max and min values.\n // This is so values like 87342.12 don't end up being displayed as the\n // graph axis labels.\n if (coarseX) {\n var deltaX = maxX - minX;\n var intervalX = Number.parseFloat((deltaX / coarseX).toPrecision(1));\n minX = alignMin(minX, intervalX);\n maxX = alignMax(maxX, intervalX);\n }\n if (coarseY) {\n var deltaY = maxY - minY;\n var intervalY = Number.parseFloat((deltaY / coarseY).toPrecision(1));\n minY = alignMin(minY, intervalY);\n maxY = alignMax(maxY, intervalY);\n }\n if (options.direction === 'horizontal') {\n var _adjustToShowZero = adjustToShowZero(minX, maxX, stepsX);\n minX = _adjustToShowZero[0];\n maxX = _adjustToShowZero[1];\n } else {\n var _adjustToShowZero2 = adjustToShowZero(minY, maxY, stepsY);\n minY = _adjustToShowZero2[0];\n maxY = _adjustToShowZero2[1];\n }\n\n // if options.direction is present, the results are delivered in { x, y }\n // object structure. If options.direction is not present, the results are\n // delivered in [x, y] array structure, for backwards compatibility\n result = options.direction ? {\n x: {\n min: minX,\n max: maxX\n },\n y: {\n min: minY,\n max: maxY\n }\n } : [[minX, maxX], [minY, maxY]];\n } else {\n result = options.direction ? {\n x: {},\n y: {}\n } : [[], []];\n }\n return result;\n};\n\n// if options.direction is present, the results are delivered in { x, y }\n// object structure. If options.direction is not present, the results are\n// delivered in [x, y] array structure, for backwards compatibility\nexport var calcs = function calcs(values, options) {\n if (values === void 0) {\n values = [];\n }\n if (options === void 0) {\n options = {};\n }\n var horizontal = options.direction === 'horizontal';\n\n // the number of steps is one less than the number of labels\n var _normalizeSteps2 = normalizeSteps(options.steps),\n stepsX = _normalizeSteps2.x,\n stepsY = _normalizeSteps2.y;\n\n // bounds is { x: { min, max }, y: { min, max } } when options.direction is\n // present and [[min, max], [min, max]] if not, for backwards compatibility\n var bounds = options.bounds || calcBounds(values, options);\n if (options.min !== undefined) {\n if (options.direction) {\n if (horizontal) bounds.x.min = options.min;else bounds.y.min = options.min;\n } else bounds[1][0] = options.min;\n }\n if (options.max !== undefined) {\n if (options.direction) {\n if (horizontal) bounds.y.max = options.max;else bounds.x.max = options.max;\n } else bounds[1][1] = options.max;\n }\n var _ref = options.direction ? bounds : {\n x: {\n min: bounds[0][0],\n max: bounds[0][1]\n },\n y: {\n min: bounds[1][0],\n max: bounds[1][1]\n }\n },\n _ref$x = _ref.x,\n minX = _ref$x.min,\n maxX = _ref$x.max,\n _ref$y = _ref.y,\n minY = _ref$y.min,\n maxY = _ref$y.max;\n var width = round(maxX - minX, 2);\n var height = round(maxY - minY, 2);\n var dimensions = options.direction ? {\n width: width,\n height: height\n } : [width, height];\n\n // Calculate x and y axis values across the specfied number of steps.\n var yAxis = [];\n var y = maxY;\n // To deal with javascript math limitations, round the step with 4 decimal\n // places and then push the values with 2 decimal places\n var yStepInterval = round(height / stepsY, 4);\n while (round(y, 2) >= minY) {\n yAxis.push(round(y, 2));\n y -= yStepInterval;\n }\n if (horizontal) yAxis.reverse();\n var xAxis = [];\n var x = minX;\n var xStepInterval = round(width / stepsX, 4);\n while (round(x, 2) <= maxX) {\n xAxis.push(round(x, 2));\n x += xStepInterval;\n }\n var _options = options,\n thickness = _options.thickness;\n if (!thickness) {\n // Set bar thickness based on number of values being rendered.\n // Someday, it would be better to include the actual rendered size.\n // These values were emirically determined, trying to balance visibility\n // and overlap across resolutions.\n if (values.length < 5) {\n thickness = 'xlarge';\n } else if (values.length < 11) {\n thickness = 'large';\n } else if (values.length < 21) {\n thickness = 'medium';\n } else if (values.length < 61) {\n thickness = 'small';\n } else if (values.length < 121) {\n thickness = 'xsmall';\n } else {\n thickness = 'hair';\n }\n }\n var pad = thicknessPad[thickness];\n return {\n axis: options.direction ? {\n x: xAxis,\n y: yAxis\n } : [xAxis, yAxis],\n bounds: bounds,\n dimensions: dimensions,\n pad: pad,\n thickness: thickness\n };\n};","export { Chart } from './Chart';\nexport { calcBounds, calcs, round } from './calcs';","import styled, { css, keyframes } from 'styled-components';\nimport { normalizeColor, genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar StyledHour = styled.line.withConfig({\n displayName: \"StyledClock__StyledHour\",\n componentId: \"sc-y4xw8s-0\"\n})([\"stroke-width:\", \";stroke:\", \";transition:stroke 1s ease-out;\"], function (props) {\n return props.theme.clock.analog.hour.width;\n}, function (props) {\n return normalizeColor(props.theme.clock.analog.hour.color, props.theme);\n});\nStyledHour.defaultProps = {};\nObject.setPrototypeOf(StyledHour.defaultProps, defaultProps);\nvar StyledMinute = styled.line.withConfig({\n displayName: \"StyledClock__StyledMinute\",\n componentId: \"sc-y4xw8s-1\"\n})([\"stroke-width:\", \";stroke:\", \";transition:stroke 1s ease-out;\"], function (props) {\n return props.theme.clock.analog.minute.width;\n}, function (props) {\n return normalizeColor(props.theme.clock.analog.minute.color, props.theme);\n});\nStyledMinute.defaultProps = {};\nObject.setPrototypeOf(StyledMinute.defaultProps, defaultProps);\nvar StyledSecond = styled.line.withConfig({\n displayName: \"StyledClock__StyledSecond\",\n componentId: \"sc-y4xw8s-2\"\n})([\"stroke-width:\", \";stroke:\", \";transition:stroke 1s ease-out;\"], function (props) {\n return props.theme.clock.analog.second.width;\n}, function (props) {\n return normalizeColor(props.theme.clock.analog.second.color, props.theme);\n});\nStyledSecond.defaultProps = {};\nObject.setPrototypeOf(StyledSecond.defaultProps, defaultProps);\nvar StyledAnalog = styled.svg.withConfig({\n displayName: \"StyledClock__StyledAnalog\",\n componentId: \"sc-y4xw8s-3\"\n})([\"width:\", \";height:\", \";\", \" \", \";\"], function (props) {\n return props.theme.clock.analog.size[props.size];\n}, function (props) {\n return props.theme.clock.analog.size[props.size];\n}, genericStyles, function (props) {\n return props.theme.clock.analog && props.theme.clock.analog.extend;\n});\nStyledAnalog.defaultProps = {};\nObject.setPrototypeOf(StyledAnalog.defaultProps, defaultProps);\nvar sizeStyle = function sizeStyle(props) {\n // size is a combination of the size and height properties\n var size = props.size || 'medium';\n var data = props.theme.clock.digital.text[size] || {};\n return css([\"font-size:\", \";line-height:\", \";\"], data.size || props.theme.clock.digital.text.medium.size, data.height || props.theme.clock.digital.text.medium.height);\n};\nvar StyledDigitalDigit = styled.div.withConfig({\n displayName: \"StyledClock__StyledDigitalDigit\",\n componentId: \"sc-y4xw8s-4\"\n})([\"position:relative;width:0.8em;text-align:center;overflow:hidden;\", \";\"], function (props) {\n return sizeStyle(props);\n});\nStyledDigitalDigit.defaultProps = {};\nObject.setPrototypeOf(StyledDigitalDigit.defaultProps, defaultProps);\nvar previousUp = keyframes([\"0%{transform:translateY(0);}100%{transform:translateY(-100%);}\"]);\nvar previousDown = keyframes([\"0%{transform:translateY(0);}100%{transform:translateY(100%);}\"]);\nvar StyledDigitalPrevious = styled.div.withConfig({\n displayName: \"StyledClock__StyledDigitalPrevious\",\n componentId: \"sc-y4xw8s-5\"\n})([\"position:absolute;top:0;left:0;width:0.8em;text-align:center;animation:\", \" 0.5s forwards;\"], function (props) {\n return props.direction === 'down' ? previousDown : previousUp;\n});\nStyledDigitalPrevious.defaultProps = {};\nObject.setPrototypeOf(StyledDigitalPrevious.defaultProps, defaultProps);\nvar nextUp = keyframes([\"0%{transform:translateY(100%);}100%{transform:translateY(0);}\"]);\nvar nextDown = keyframes([\"0%{transform:translateY(-100%);}100%{transform:translateY(0);}\"]);\nvar StyledDigitalNext = styled.div.withConfig({\n displayName: \"StyledClock__StyledDigitalNext\",\n componentId: \"sc-y4xw8s-6\"\n})([\"position:absolute;top:0;left:0;width:0.8em;text-align:center;animation:\", \" 0.5s forwards;\"], function (props) {\n return props.direction === 'down' ? nextDown : nextUp;\n});\nStyledDigitalNext.defaultProps = {};\nObject.setPrototypeOf(StyledDigitalNext.defaultProps, defaultProps);\nexport { StyledHour, StyledMinute, StyledSecond, StyledAnalog, StyledDigitalDigit, StyledDigitalPrevious, StyledDigitalNext };","var _excluded = [\"elements\", \"precision\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { parseMetricToNum } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { StyledAnalog, StyledHour, StyledMinute, StyledSecond } from './StyledClock';\n\n// this will serve both minutes and hours (360 / 6)\nvar ANGLE_UNIT = 6;\n// 360 / 12\nvar HOUR_ANGLE_UNIT = 30;\nvar getClockDimensions = function getClockDimensions(theme) {\n return {\n size: parseMetricToNum(theme.clock.analog.size.medium),\n secondSize: parseMetricToNum(theme.clock.analog.second.size),\n minuteSize: parseMetricToNum(theme.clock.analog.minute.size),\n hourSize: parseMetricToNum(theme.clock.analog.hour.size)\n };\n};\nvar getClockState = function getClockState(_ref) {\n var hours = _ref.hours,\n minutes = _ref.minutes,\n seconds = _ref.seconds;\n var hour12 = hours > 12 ? hours - 12 : hours;\n var minuteAngle = minutes * ANGLE_UNIT;\n return {\n // offset hour angle by half of the minute angle so that it gets closer\n // to the next hour\n hourAngle: hour12 * HOUR_ANGLE_UNIT + minutes / 2,\n minuteAngle: minuteAngle,\n secondAngle: seconds * ANGLE_UNIT\n };\n};\nvar Analog = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var elements = _ref2.elements,\n precision = _ref2.precision,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useMemo = useMemo(function () {\n return getClockState(elements);\n }, [elements]),\n hourAngle = _useMemo.hourAngle,\n minuteAngle = _useMemo.minuteAngle,\n secondAngle = _useMemo.secondAngle;\n var _useMemo2 = useMemo(function () {\n return getClockDimensions(theme);\n }, [theme]),\n size = _useMemo2.size,\n secondSize = _useMemo2.secondSize,\n minuteSize = _useMemo2.minuteSize,\n hourSize = _useMemo2.hourSize;\n var halfSize = size / 2;\n var secondHand;\n if (precision === 'seconds') {\n secondHand = /*#__PURE__*/React.createElement(StyledSecond, {\n x1: halfSize,\n y1: halfSize,\n x2: halfSize,\n y2: secondSize,\n stroke: \"#000000\",\n strokeLinecap: theme.clock.analog.second.shape,\n style: {\n transform: \"rotate(\" + secondAngle + \"deg)\",\n transformOrigin: halfSize + \"px \" + halfSize + \"px\"\n }\n });\n }\n var minuteHand;\n if (precision === 'seconds' || precision === 'minutes') {\n minuteHand = /*#__PURE__*/React.createElement(StyledMinute, {\n x1: halfSize,\n y1: halfSize,\n x2: halfSize,\n y2: minuteSize,\n stroke: \"#000000\",\n strokeLinecap: theme.clock.analog.minute.shape,\n style: {\n transform: \"rotate(\" + minuteAngle + \"deg)\",\n transformOrigin: halfSize + \"px \" + halfSize + \"px\"\n }\n });\n }\n return /*#__PURE__*/React.createElement(StyledAnalog, _extends({\n ref: ref,\n version: \"1.1\",\n width: size,\n height: size,\n preserveAspectRatio: \"xMidYMid meet\",\n viewBox: \"0 0 \" + size + \" \" + size\n }, rest), secondHand, minuteHand, /*#__PURE__*/React.createElement(StyledHour, {\n x1: halfSize,\n y1: halfSize,\n x2: halfSize,\n y2: hourSize,\n stroke: \"#000000\",\n strokeLinecap: theme.clock.analog.hour.shape,\n style: {\n transform: \"rotate(\" + hourAngle + \"deg)\",\n transformOrigin: halfSize + \"px \" + halfSize + \"px\"\n }\n }));\n});\nAnalog.displayName = 'Analog';\nexport { Analog };","var _excluded = [\"elements\", \"precision\", \"run\", \"size\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useEffect, useState } from 'react';\nimport { Box } from '../Box';\nimport { StyledDigitalDigit, StyledDigitalNext, StyledDigitalPrevious } from './StyledClock';\nvar Digit = function Digit(_ref) {\n var number = _ref.number,\n run = _ref.run,\n size = _ref.size;\n var _useState = useState(number),\n previous = _useState[0],\n setPrevious = _useState[1];\n var _useState2 = useState(),\n changing = _useState2[0],\n setChanging = _useState2[1];\n useEffect(function () {\n if (number !== previous) {\n setChanging(true);\n var timer = setTimeout(function () {\n setPrevious(number);\n setChanging(false);\n }, 900);\n return function () {\n return clearTimeout(timer);\n };\n }\n return undefined;\n }, [number, previous]);\n if (changing) {\n var direction = run === 'backward' ? 'down' : 'up';\n return /*#__PURE__*/React.createElement(StyledDigitalDigit, {\n size: size\n }, /*#__PURE__*/React.createElement(StyledDigitalPrevious, {\n direction: direction\n }, Math.floor(previous)), /*#__PURE__*/React.createElement(StyledDigitalNext, {\n direction: direction\n }, Math.floor(number)));\n }\n return /*#__PURE__*/React.createElement(StyledDigitalDigit, {\n size: size\n }, Math.floor(number));\n};\nvar Element = function Element(_ref2) {\n var number = _ref2.number,\n run = _ref2.run,\n sep = _ref2.sep,\n size = _ref2.size;\n var tens = Math.floor(number / 10);\n var ones = number % 10;\n var result = [/*#__PURE__*/React.createElement(Digit, {\n key: \"tens\",\n run: run,\n size: size,\n number: tens\n }), /*#__PURE__*/React.createElement(Digit, {\n key: \"ones\",\n run: run,\n size: size,\n number: ones\n })];\n if (sep) {\n result.unshift( /*#__PURE__*/React.createElement(StyledDigitalDigit, {\n key: \"sep\",\n size: size\n }, \":\"));\n }\n return result;\n};\nexport var Digital = /*#__PURE__*/forwardRef(function (props, ref) {\n var elements = props.elements,\n precision = props.precision,\n run = props.run,\n size = props.size,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var seconds;\n if (precision === 'seconds') {\n seconds = /*#__PURE__*/React.createElement(Element, {\n number: elements.seconds,\n run: run,\n size: size,\n sep: true\n });\n }\n var minutes;\n if (precision === 'minutes' || precision === 'seconds') {\n minutes = /*#__PURE__*/React.createElement(Element, {\n number: elements.minutes,\n run: run,\n size: size,\n sep: true\n });\n }\n return /*#__PURE__*/React.createElement(Box, _extends({\n ref: ref,\n direction: \"row\"\n }, rest), /*#__PURE__*/React.createElement(Element, {\n number: elements.hours12 || elements.hours,\n run: run,\n size: size\n }), minutes, seconds);\n});","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n hourLimit: PropTypes.oneOf([12, 24, '12', '24']),\n onChange: PropTypes.func,\n precision: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n run: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['backward', 'forward'])]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge']), PropTypes.string]),\n time: PropTypes.string,\n type: PropTypes.oneOf(['analog', 'digital'])\n });\n}\nexport var ClockPropTypes = PropType;","var _excluded = [\"hourLimit\", \"onChange\", \"precision\", \"run\", \"size\", \"time\", \"type\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useEffect, useState } from 'react';\nimport { Analog } from './Analog';\nimport { Digital } from './Digital';\nimport { ClockPropTypes } from './propTypes';\nvar TIME_REGEXP = /T([0-9]{2}):([0-9]{2})(?::([0-9.,]{2,}))?/;\nvar DURATION_REGEXP = /^(-|\\+)?P.*T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?$/;\nvar parseTime = function parseTime(time, hourLimit) {\n var result = {};\n if (time) {\n var match = DURATION_REGEXP.exec(time);\n if (match) {\n result.hours = parseFloat(match[2]) || 0;\n if (hourLimit === 12) {\n result.hours12 = result.hours > 12 ? result.hours - 12 : result.hours;\n }\n result.minutes = parseFloat(match[3]) || 0;\n result.seconds = parseFloat(match[4]) || 0;\n result.duration = true;\n } else {\n match = TIME_REGEXP.exec(time);\n if (match) {\n result.hours = parseFloat(match[1]);\n if (hourLimit === 12) {\n result.hours12 = result.hours > 12 ? result.hours - 12 : result.hours;\n }\n result.minutes = parseFloat(match[2]) || 0;\n result.seconds = parseFloat(match[3]) || 0;\n } else {\n console.error(\"Grommet Clock cannot parse '\" + time + \"'\");\n }\n }\n } else {\n var date = new Date();\n result.hours = date.getHours();\n result.minutes = date.getMinutes();\n result.seconds = date.getSeconds();\n }\n return result;\n};\nvar Clock = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref$hourLimit = _ref.hourLimit,\n hourLimit = _ref$hourLimit === void 0 ? 24 : _ref$hourLimit,\n onChange = _ref.onChange,\n _ref$precision = _ref.precision,\n precision = _ref$precision === void 0 ? 'seconds' : _ref$precision,\n _ref$run = _ref.run,\n run = _ref$run === void 0 ? 'forward' : _ref$run,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 'medium' : _ref$size,\n time = _ref.time,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'analog' : _ref$type,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useState = useState(parseTime(time, hourLimit)),\n elements = _useState[0],\n setElements = _useState[1];\n useEffect(function () {\n return setElements(parseTime(time, hourLimit));\n }, [hourLimit, time]);\n useEffect(function () {\n var atDurationEnd = run === 'backward' && elements.duration && !elements.hours && !elements.minutes && !elements.seconds;\n if (run && !atDurationEnd) {\n // set the interval time based on the precision\n var interval = 1000;\n var increment = 'seconds';\n if (precision !== 'seconds' && elements.seconds === 0) {\n interval *= 60;\n increment = 'minutes';\n if (precision !== 'minutes' && elements.minutes === 0) {\n interval *= 60;\n increment = 'hours';\n }\n }\n var timer = setInterval(function () {\n var nextElements = _extends({}, elements);\n // adjust time based on precision\n if (increment === 'seconds') {\n if (run === 'backward') {\n nextElements.seconds -= 1;\n } else {\n nextElements.seconds += 1;\n }\n } else if (increment === 'minutes') {\n if (run === 'backward') {\n nextElements.minutes -= 1;\n } else {\n nextElements.minutes += 1;\n }\n } else if (increment === 'hours') {\n if (run === 'backward') {\n nextElements.hours -= 1;\n } else {\n nextElements.hours += 1;\n }\n }\n\n // deal with overflows\n if (nextElements.seconds >= 60) {\n nextElements.minutes += Math.floor(nextElements.seconds / 60);\n nextElements.seconds = 0;\n } else if (nextElements.seconds < 0) {\n nextElements.minutes += Math.floor(nextElements.seconds / 60);\n nextElements.seconds = 59;\n }\n if (nextElements.minutes >= 60) {\n nextElements.hours += Math.floor(nextElements.minutes / 60);\n nextElements.minutes = 0;\n } else if (nextElements.minutes < 0) {\n nextElements.hours += Math.floor(nextElements.minutes / 60);\n nextElements.minutes = 59;\n }\n if (nextElements.hours >= 24 || nextElements.hours < 0) {\n nextElements.hours = 0;\n }\n if (hourLimit === 12) {\n nextElements.hours12 = nextElements.hours > 12 ? nextElements.hours - 12 : nextElements.hours;\n }\n setElements(nextElements);\n if (onChange) {\n var e = nextElements;\n if (e.duration) {\n onChange(\"P\" + e.hours + \"H\" + e.minutes + \"M\" + e.seconds + \"S\");\n } else {\n onChange(\"T\" + e.hours + \":\" + e.minutes + \":\" + e.seconds);\n }\n }\n }, interval);\n return function () {\n return clearInterval(timer);\n };\n }\n return undefined;\n }, [elements, hourLimit, onChange, precision, run]);\n var content;\n if (type === 'analog') {\n content = /*#__PURE__*/React.createElement(Analog, _extends({\n ref: ref,\n elements: elements,\n precision: precision,\n size: size\n }, rest));\n } else if (type === 'digital') {\n content = /*#__PURE__*/React.createElement(Digital, _extends({\n ref: ref,\n elements: elements,\n precision: precision,\n run: run,\n size: size\n }, rest));\n }\n return content;\n});\nClock.displayName = 'Clock';\nClock.propTypes = ClockPropTypes;\nexport { Clock };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n errors: PropTypes.shape({}),\n infos: PropTypes.shape({}),\n kind: PropTypes.string,\n messages: PropTypes.shape({\n invalid: PropTypes.string,\n required: PropTypes.string\n }),\n onChange: PropTypes.func,\n onSubmit: PropTypes.func,\n onReset: PropTypes.func,\n onValidate: PropTypes.func,\n validate: PropTypes.oneOf(['blur', 'submit', 'change']),\n value: PropTypes.shape({})\n };\n}\nexport var FormPropTypes = PropType;","var _excluded = [\"children\", \"errors\", \"infos\", \"messages\", \"kind\", \"onChange\", \"onReset\", \"onSubmit\", \"onValidate\", \"validate\", \"value\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { useAnalytics } from '../../contexts';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { useForwardedRef } from '../../utils';\nimport { FormContext } from './FormContext';\nimport { FormPropTypes } from './propTypes';\nvar defaultValue = {};\nvar defaultTouched = {};\nvar defaultValidationResults = {\n errors: {},\n infos: {}\n};\nvar stringToArray = function stringToArray(string) {\n var match = string == null ? void 0 : string.match(/^(.+)\\[([0-9]+)\\]\\.(.*)$/);\n if (match) {\n var arrayName = match[1],\n indexOfArray = match[2],\n arrayObjName = match[3];\n return {\n indexOfArray: indexOfArray,\n arrayName: arrayName,\n arrayObjName: arrayObjName\n };\n }\n return undefined;\n};\nvar getValueAt = function getValueAt(valueObject, pathArg) {\n if (valueObject === undefined) return undefined;\n var path = Array.isArray(pathArg) ? pathArg : pathArg.split('.');\n if (path.length === 1) return valueObject[path];\n return getValueAt(valueObject[path.shift()], path);\n};\nvar setValueAt = function setValueAt(valueObject, pathArg, value) {\n var object = valueObject;\n var path = Array.isArray(pathArg) ? pathArg : pathArg.split('.');\n if (path.length === 1) object[path] = value;else {\n var key = path.shift();\n if (!object[key]) object[key] = {};\n setValueAt(object[key], path, value);\n }\n};\nvar getFieldValue = function getFieldValue(name, value) {\n var isArrayField = stringToArray(name);\n if (isArrayField) {\n var _value$arrayName;\n var indexOfArray = isArrayField.indexOfArray,\n arrayName = isArrayField.arrayName,\n arrayObjName = isArrayField.arrayObjName;\n var obj = (_value$arrayName = value[arrayName]) == null ? void 0 : _value$arrayName[indexOfArray];\n return arrayObjName ? obj == null ? void 0 : obj[arrayObjName] : obj;\n }\n return getValueAt(value, name);\n};\nvar setFieldValue = function setFieldValue(name, componentValue, prevValue) {\n var nextValue = _extends({}, prevValue);\n var isArrayField = stringToArray(name);\n if (isArrayField) {\n var indexOfArray = isArrayField.indexOfArray,\n arrayName = isArrayField.arrayName,\n arrayObjName = isArrayField.arrayObjName;\n if (!nextValue[arrayName]) nextValue[arrayName] = [];\n if (arrayObjName) {\n var _nextValue$arrayName$;\n if (!nextValue[arrayName][indexOfArray]) nextValue[arrayName][indexOfArray] = (_nextValue$arrayName$ = {}, _nextValue$arrayName$[arrayObjName] = componentValue, _nextValue$arrayName$);\n nextValue[arrayName][indexOfArray][arrayObjName] = componentValue;\n } else nextValue[arrayName][indexOfArray] = componentValue;\n } else {\n setValueAt(nextValue, name, componentValue);\n }\n return nextValue;\n};\n\n// Apply validation rule to field value and send correct messaging.\nvar validate = function validate(rule, fieldValue, formValue, format, messages) {\n var result;\n if (typeof rule === 'function') {\n result = rule(fieldValue, formValue);\n } else if (rule.regexp) {\n if (!rule.regexp.test(fieldValue)) {\n result = rule.message || format({\n id: 'form.invalid',\n messages: messages\n });\n if (rule.status) {\n result = {\n message: result,\n status: rule.status\n };\n }\n }\n }\n return result;\n};\n\n// Validates particular key in formValue\nvar validateName = function validateName(validationRules, required) {\n return function (name, formValue, format, messages) {\n var fieldValue = getFieldValue(name, formValue);\n var validationResult;\n if (required && (\n // false is for CheckBox\n fieldValue === undefined || fieldValue === '' || fieldValue === false || Array.isArray(fieldValue) && !fieldValue.length)) {\n validationResult = format({\n id: 'form.required',\n messages: messages\n });\n } else if (validationRules) {\n if (Array.isArray(validationRules)) {\n validationRules.some(function (rule) {\n validationResult = validate(rule, fieldValue, formValue, format, messages);\n return !!validationResult;\n });\n } else {\n validationResult = validate(validationRules, fieldValue, formValue, format, messages);\n }\n }\n return validationResult;\n };\n};\n\n// Validates all keys in formValue\nvar validateForm = function validateForm(validationRules, formValue, format, messages, omitValid) {\n var nextErrors = {};\n var nextInfos = {};\n validationRules.forEach(function (_ref) {\n var name = _ref[0],\n _ref$ = _ref[1],\n field = _ref$.field,\n input = _ref$.input,\n validateOn = _ref$.validateOn;\n if (!omitValid) {\n nextErrors[name] = undefined;\n nextInfos[name] = undefined;\n }\n if (!validateOn) return;\n var result;\n if (input) {\n // input() a validation function supplied through useFormInput()\n result = input(name, formValue, format, messages);\n }\n if (field && !result) {\n // field() a validation function supplied through useFormField()\n result = field(name, formValue, format, messages);\n }\n // typeof error === 'object' is implied for both cases of error with\n // a status message and for an error object that is a react node\n if (typeof result === 'object') {\n if (result.status === 'info') {\n nextInfos[name] = result.message;\n } else {\n nextErrors[name] = result.message || result; // could be a node\n }\n } else if (typeof result === 'string') {\n nextErrors[name] = result;\n }\n });\n return [nextErrors, nextInfos];\n};\nvar isInstantValidate = function isInstantValidate(validateOn) {\n return ['blur', 'change'].includes(validateOn);\n};\nvar Form = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var children = _ref2.children,\n _ref2$errors = _ref2.errors,\n errorsProp = _ref2$errors === void 0 ? defaultValidationResults.errors : _ref2$errors,\n _ref2$infos = _ref2.infos,\n infosProp = _ref2$infos === void 0 ? defaultValidationResults.infos : _ref2$infos,\n messages = _ref2.messages,\n kind = _ref2.kind,\n onChange = _ref2.onChange,\n _onReset = _ref2.onReset,\n _onSubmit = _ref2.onSubmit,\n onValidate = _ref2.onValidate,\n _ref2$validate = _ref2.validate,\n validateOnProp = _ref2$validate === void 0 ? 'submit' : _ref2$validate,\n valueProp = _ref2.value,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n var formRef = useForwardedRef(ref);\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var _useState = useState(valueProp || defaultValue),\n valueState = _useState[0],\n setValueState = _useState[1];\n var value = useMemo(function () {\n return valueProp || valueState;\n }, [valueProp, valueState]);\n var _useState2 = useState(defaultTouched),\n touched = _useState2[0],\n setTouched = _useState2[1];\n var _useState3 = useState(validateOnProp),\n validateOn = _useState3[0],\n setValidateOn = _useState3[1];\n var _useState4 = useState({\n errors: errorsProp,\n infos: infosProp\n }),\n validationResults = _useState4[0],\n setValidationResults = _useState4[1];\n // maintain a copy of validationResults in a ref for useEffects\n // which can't depend on validationResults directly without\n // causing infinite renders.\n var validationResultsRef = useRef({});\n // Simulated onMount state. Consider Form to be mounted once it has\n // accounted for values originating from controlled inputs (available\n // at second rendering).\n var _useState5 = useState('unmounted'),\n mounted = _useState5[0],\n setMounted = _useState5[1];\n useEffect(function () {\n if (!mounted) setMounted('mounting');else if (mounted === 'mounting') setMounted('mounted');\n }, [mounted]);\n // `pendingValidation` is the name of the FormField awaiting validation.\n var _useState6 = useState(undefined),\n pendingValidation = _useState6[0],\n setPendingValidation = _useState6[1];\n var validationRulesRef = useRef({});\n var requiredFields = useRef([]);\n var analyticsRef = useRef({\n start: new Date(),\n errors: {}\n });\n var sendAnalytics = useAnalytics();\n var buildValid = useCallback(function (nextErrors) {\n var valid = false;\n valid = requiredFields.current.filter(function (n) {\n return Object.keys(validationRulesRef.current).includes(n);\n }).every(function (field) {\n return value[field] && (value[field] !== '' || value[field] !== false);\n });\n if (Object.keys(nextErrors).length > 0) valid = false;\n return valid;\n }, [value]);\n\n // Only keep validation results for current form fields. In the case of a\n // dynamic form, a field possessing an error may have been removed from the\n // form; need to clean up any previous related validation results.\n var filterRemovedFields = function filterRemovedFields(prevValidations) {\n var nextValidations = prevValidations;\n return Object.keys(nextValidations).filter(function (n) {\n return !validationRulesRef.current[n] || nextValidations[n] === undefined;\n }).forEach(function (n) {\n return delete nextValidations[n];\n });\n };\n var updateAnalytics = function updateAnalytics() {\n var _validationResultsRef;\n var errorFields = Object.keys((_validationResultsRef = validationResultsRef.current) == null ? void 0 : _validationResultsRef.errors);\n var errorCounts = analyticsRef.current.errors;\n if (errorFields.length > 0) {\n errorFields.forEach(function (key) {\n errorCounts[key] = (errorCounts[key] || 0) + 1;\n });\n }\n };\n var applyValidationRules = useCallback(function (validationRules) {\n var _validateForm = validateForm(validationRules, value, format, messages),\n validatedErrors = _validateForm[0],\n validatedInfos = _validateForm[1];\n setValidationResults(function (prevValidationResults) {\n // Keep any previous errors and infos for untouched keys,\n // these may have come from a Submit.\n var nextErrors = _extends({}, prevValidationResults.errors, validatedErrors);\n var nextInfos = _extends({}, prevValidationResults.infos, validatedInfos);\n // Remove previous errors and infos for keys no longer in the\n // form, these may have been fields removed from a dynamic form.\n filterRemovedFields(nextErrors);\n filterRemovedFields(nextInfos);\n var nextValidationResults = {\n errors: nextErrors,\n infos: nextInfos\n };\n if (onValidate) onValidate(_extends({}, nextValidationResults, {\n valid: buildValid(nextErrors)\n }));\n validationResultsRef.current = nextValidationResults;\n updateAnalytics();\n return nextValidationResults;\n });\n }, [buildValid, format, messages, onValidate, value]);\n\n // Validate all fields holding values onMount if set to\n // validate when blur or change.\n useEffect(function () {\n var validationRules = Object.entries(validationRulesRef.current);\n // Use simulated onMount state to account for values provided by\n // controlled inputs.\n if (mounted !== 'mounted' && (isInstantValidate(validateOn) || validationRules.some(function (_ref3) {\n var v = _ref3[1];\n return isInstantValidate(v.validateOn);\n })) && Object.keys(value).length > 0 && Object.keys(touched).length === 0) {\n applyValidationRules(validationRules.filter(function (_ref4) {\n var n = _ref4[0],\n v = _ref4[1];\n return getFieldValue(n, value) && v.validateOn;\n })\n // Exlude empty arrays which may be initial values in\n // an input such as DateInput.\n .filter(function (_ref5) {\n var n = _ref5[0];\n return !(Array.isArray(getFieldValue(n, value)) && getFieldValue(n, value).length === 0);\n }));\n }\n }, [applyValidationRules, mounted, touched, validateOn, value]);\n\n // Run validation against fields with pendingValidations from onBlur\n // and/or onChange.\n useEffect(function () {\n var validationRules = Object.entries(validationRulesRef.current);\n var timer = setTimeout(function () {\n if (pendingValidation && (isInstantValidate(validateOn) || validationRules.some(function (_ref6) {\n var v = _ref6[1];\n return isInstantValidate(v.validateOn);\n }))) {\n applyValidationRules(validationRules.filter(function (_ref7) {\n var n = _ref7[0],\n v = _ref7[1];\n return (touched[n] || pendingValidation.includes(n)) && v.validateOn;\n }));\n setPendingValidation(undefined);\n }\n // Complete any potential click events before running onBlur validation.\n // Otherwise, click events like reset, etc. may not be registered. For a\n // detailed scenario/discussion, see: https://github.com/grommet/grommet/issues/4863\n // Values empirically tested; 120 was selected because it is the largest\n // Chrome: 100, Safari: 120, Firefox: 80\n }, 120);\n return function () {\n return clearTimeout(timer);\n };\n }, [applyValidationRules, pendingValidation, touched, validateOn]);\n\n // Re-run validation rules for all fields with prior errors.\n // if validate=blur this helps re-validate if there are errors\n // as the user fixes them (basically act like validate=change for that)\n useEffect(function () {\n var _validationResultsRef2;\n var validationRules = Object.entries(validationRulesRef.current);\n if ((_validationResultsRef2 = validationResultsRef.current) != null && _validationResultsRef2.errors && Object.keys(validationResultsRef.current.errors).length > 0) {\n applyValidationRules(validationRules.filter(function (_ref8) {\n var n = _ref8[0];\n return touched[n] && validationResultsRef.current.errors[n];\n }));\n }\n }, [applyValidationRules, touched]);\n useEffect(function () {\n var element = formRef.current;\n analyticsRef.current = {\n start: new Date(),\n errors: {}\n };\n sendAnalytics({\n type: 'formOpen',\n element: element\n });\n return function () {\n if (!analyticsRef.current.submitted) {\n sendAnalytics({\n type: 'formClose',\n element: element,\n errors: analyticsRef.current.errors,\n elapsed: new Date().getTime() - analyticsRef.current.start.getTime()\n });\n }\n };\n }, [sendAnalytics, formRef]);\n\n // There are three basic patterns of handling form input value state:\n //\n // 1 - form controlled\n //\n // In this model, the caller sets `value` and `onChange` properties\n // on the Form component to supply the values used by the input fields.\n // In useFormContext(), componentValue would be undefined and formValue\n // is be set to whatever the form state has. Whenever the form state\n // changes, we update the contextValue so the input component will use\n // that. When the input component changes, we will call update() to\n // update the form state.\n //\n // 2 - input controlled\n //\n // In this model, the caller sets `value` and `onChange` properties\n // on the input components, like TextInput, to supply the value for it.\n // In useFormContext(), componentValue is this value and we ensure to\n // update the form state, via update(), and set the contextValue from\n // the componentValue. When the input component changes, we will\n // call update() to update the form state.\n //\n // 3 - uncontrolled\n //\n // In this model, the caller doesn't set a `value` or `onChange` property\n // at either the form or input component levels.\n // In useFormContext(), componentValue is undefined and valueProp is\n // undefined and nothing much happens here. That is, unless the\n // calling component needs to know the state in order to work, such\n // as CheckBox or Select. In this case, those components supply\n // an initialValue, which will trigger updating the contextValue so\n // they can have access to it.\n //\n var formContextValue = useMemo(function () {\n var useFormInput = function useFormInput(_ref9) {\n var name = _ref9.name,\n componentValue = _ref9.value,\n initialValue = _ref9.initialValue,\n validateArg = _ref9.validate;\n var _useState7 = useState(initialValue),\n inputValue = _useState7[0],\n setInputValue = _useState7[1];\n var formValue = name ? getFieldValue(name, value) : undefined;\n // for dynamic forms, we need to track when an input has been added to\n // the form value. if the input is unmounted, we will delete its\n // key/value from the form value.\n var keyCreated = useRef(false);\n\n // This effect is for pattern #2, where the controlled input\n // component is driving the value via componentValue.\n useEffect(function () {\n if (name &&\n // we have somewhere to put this\n componentValue !== undefined &&\n // input driving\n componentValue !== formValue // don't already have it\n ) {\n setValueState(function (prevValue) {\n return setFieldValue(name, componentValue, prevValue);\n });\n // don't onChange on programmatic changes\n }\n }, [componentValue, formValue, name]);\n\n // on unmount, if the form is uncontrolled, remove the key/value\n // from the form value\n useEffect(function () {\n return function () {\n if (keyCreated.current) {\n keyCreated.current = false;\n setValueState(function (prevValue) {\n var nextValue = _extends({}, prevValue);\n var isArrayField = stringToArray(name);\n if (isArrayField) {\n var arrayName = isArrayField.arrayName;\n delete nextValue[arrayName];\n } else {\n delete nextValue[name];\n }\n return nextValue;\n });\n }\n };\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [] // only run onmount and unmount\n );\n\n // Create validation rules for fields\n useEffect(function () {\n if (validateArg) {\n if (!validationRulesRef.current[name]) {\n validationRulesRef.current[name] = {};\n }\n validationRulesRef.current[name].input = validateName(validateArg);\n return function () {\n return delete validationRulesRef.current[name].input;\n };\n }\n return undefined;\n }, [validateArg, name]);\n var useValue;\n if (componentValue !== undefined)\n // input component drives, pattern #2\n useValue = componentValue;else if (valueProp && name && formValue !== undefined)\n // form drives, pattern #1\n useValue = formValue;else if (formValue === undefined && name)\n // form has reset, so reset input value as well\n useValue = initialValue;else useValue = inputValue;\n return [useValue, function (nextComponentValue) {\n if (name) {\n // we have somewhere to put this\n var nextTouched = _extends({}, touched);\n nextTouched[name] = true;\n if (!touched[name]) {\n // don't update if not needed\n setTouched(nextTouched);\n }\n\n // if nextValue doesn't have a key for name, this must be\n // uncontrolled form. we will flag this field was added so\n // we know to remove its value from the form if it is dynamically\n // removed\n if (!(name in value)) keyCreated.current = true;\n var nextValue = setFieldValue(name, nextComponentValue, value);\n setValueState(nextValue);\n if (onChange) onChange(nextValue, {\n touched: nextTouched\n });\n }\n if (initialValue !== undefined) setInputValue(nextComponentValue);\n }];\n };\n var useFormField = function useFormField(_ref10) {\n var errorArg = _ref10.error,\n infoArg = _ref10.info,\n name = _ref10.name,\n required = _ref10.required,\n disabled = _ref10.disabled,\n validateArg = _ref10.validate,\n validateOnArg = _ref10.validateOn;\n var error = disabled ? undefined : errorArg || validationResults.errors[name];\n var info = infoArg || validationResults.infos[name];\n useEffect(function () {\n setValidateOn(function (prevValues) {\n var _extends2;\n if (typeof prevValues === 'string') {\n var _ref11;\n return _ref11 = {}, _ref11[name] = validateOnArg || validateOnProp, _ref11;\n }\n return _extends({}, prevValues, (_extends2 = {}, _extends2[name] = validateOnArg || validateOnProp, _extends2));\n });\n }, [validateOnArg, name]);\n\n // Create validation rules for field\n useEffect(function () {\n var index = requiredFields.current.indexOf(name);\n if (required) {\n if (index === -1) requiredFields.current.push(name);\n } else if (index !== -1) requiredFields.current.splice(index, 1);\n if (validateArg || required) {\n if (!validationRulesRef.current[name]) {\n validationRulesRef.current[name] = {};\n }\n validationRulesRef.current[name].field = validateName(validateArg, required);\n\n // priority is given to validateOn prop on formField, if it is\n // undefined, then we will use the validate prop value of Form.\n // The reason we don't want to add validateOn = \"submit\" here is\n // because we don't want to trigger validation of \"submit\" field\n // when the user is typing in the instant (blur, change)\n // validation fields.\n if (validateOnArg && validateOnArg !== 'submit') {\n validationRulesRef.current[name].validateOn = validateOnArg;\n } else if (!validateOnArg && validateOnProp !== 'submit') {\n validationRulesRef.current[name].validateOn = validateOnProp;\n }\n return function () {\n delete validationRulesRef.current[name].field;\n delete validationRulesRef.current[name].validateOn;\n var requiredFieldIndex = requiredFields.current.indexOf(name);\n if (requiredFieldIndex !== -1) {\n requiredFields.current.splice(requiredFieldIndex, 1);\n }\n };\n }\n return undefined;\n }, [error, name, required, validateArg, disabled, validateOnArg]);\n return {\n error: error,\n info: info,\n inForm: true,\n onBlur: validateOnArg === 'blur' || validateOn[name] === 'blur' ? function () {\n return setPendingValidation(pendingValidation ? [].concat(pendingValidation, [name]) : [name]);\n } : undefined,\n onChange: validateOnArg === 'change' || validateOn[name] === 'change' ? function () {\n return setPendingValidation(pendingValidation ? [].concat(pendingValidation, [name]) : [name]);\n } : undefined\n };\n };\n return {\n useFormField: useFormField,\n useFormInput: useFormInput,\n kind: kind\n };\n }, [onChange, kind, pendingValidation, touched, validateOn, validationResults.errors, validationResults.infos, value, valueProp, validateOnProp]);\n return /*#__PURE__*/React.createElement(\"form\", _extends({\n ref: formRef\n }, rest, {\n onReset: function onReset(event) {\n sendAnalytics({\n type: 'formReset',\n element: formRef.current,\n data: event,\n errors: analyticsRef.current.errors,\n elapsed: new Date().getTime() - analyticsRef.current.start.getTime()\n });\n setPendingValidation(undefined);\n if (!valueProp) {\n setValueState(defaultValue);\n if (onChange) onChange(defaultValue, {\n touched: defaultTouched\n });\n }\n setTouched(defaultTouched);\n setValidationResults(defaultValidationResults);\n analyticsRef.current = {\n start: new Date(),\n errors: {}\n };\n if (_onReset) {\n event.persist(); // extract from React's synthetic event pool\n var adjustedEvent = event;\n adjustedEvent.value = defaultValue;\n _onReset(adjustedEvent);\n }\n },\n onSubmit: function onSubmit(event) {\n // Don't submit the form via browser form action. We don't want it\n // if the validation fails. And, we assume a javascript action handler\n // otherwise.\n event.preventDefault();\n setPendingValidation(undefined);\n // adding validateOn: \"submit\" prop to the undefined validateOn fields\n // as we want to trigger \"submit\" validation once form is submitted\n var newValidationRulesRef = Object.keys(validationRulesRef.current).reduce(function (acc, key) {\n acc[key] = validationRulesRef.current[key];\n if (!acc[key].validateOn) {\n acc[key] = _extends({}, validationRulesRef.current[key], {\n validateOn: 'submit'\n });\n }\n return acc;\n }, {});\n var _validateForm2 = validateForm(Object.entries(newValidationRulesRef), value, format, messages, true),\n nextErrors = _validateForm2[0],\n nextInfos = _validateForm2[1];\n setValidationResults(function () {\n var nextValidationResults = {\n errors: nextErrors,\n infos: nextInfos,\n // Show form's validity when clicking on Submit\n valid: buildValid(nextErrors)\n };\n if (onValidate) onValidate(nextValidationResults);\n validationResultsRef.current = nextValidationResults;\n updateAnalytics();\n return nextValidationResults;\n });\n if (Object.keys(nextErrors).length === 0 && _onSubmit) {\n event.persist(); // extract from React's synthetic event pool\n var adjustedEvent = event;\n adjustedEvent.value = value;\n adjustedEvent.touched = touched;\n _onSubmit(adjustedEvent);\n sendAnalytics({\n type: 'formSubmit',\n element: formRef.current,\n data: adjustedEvent,\n errors: analyticsRef.current.errors,\n elapsed: new Date().getTime() - analyticsRef.current.start.getTime()\n });\n analyticsRef.current.errors = {};\n analyticsRef.current.submitted = true;\n }\n }\n }), /*#__PURE__*/React.createElement(FormContext.Provider, {\n value: formContextValue\n }, children));\n});\nForm.displayName = 'Form';\nForm.propTypes = FormPropTypes;\nexport { Form };","export { Form } from './Form';\nexport { FormContext } from './FormContext';","var _excluded = [\"children\", \"footer\", \"onDone\", \"onTouched\", \"pad\", \"updateOn\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useCallback, useContext, useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Footer } from '../Footer';\nimport { Form } from '../Form';\nimport { DataContext } from '../../contexts/DataContext';\nimport { MessageContext } from '../../contexts/MessageContext';\nvar HideableButton = styled(Button).withConfig({\n displayName: \"DataForm__HideableButton\",\n componentId: \"sc-v64e1r-0\"\n})([\"\", \"\"], function (props) {\n return props.disabled && \"\\n opacity: 0;\";\n});\nvar MaxForm = styled(Form).withConfig({\n displayName: \"DataForm__MaxForm\",\n componentId: \"sc-v64e1r-1\"\n})([\"max-width:100%;\", \"\"], function (props) {\n return props.fill && 'max-height: 100%;';\n});\nvar hideButtonProps = {\n 'aria-hidden': true,\n disabled: true,\n tabIndex: -1\n};\n\n// We convert the view structure to something more flat to work better\n// with the Form inputs. These keys are how we flatten the Form value object\n// from the view object.\nexport var formSearchKey = '_search';\nexport var formSortKey = '_sort';\nexport var formRangeKey = '_range';\nexport var formStepKey = '_step';\nexport var formPageKey = '_page';\nexport var formColumnsKey = '_columns';\nexport var formGroupByKey = '_groupBy';\nexport var formViewNameKey = '_view';\nvar viewFormKeyMap = {\n search: formSearchKey,\n sort: formSortKey,\n step: formStepKey,\n page: formPageKey,\n columns: formColumnsKey,\n groupBy: formGroupByKey,\n view: formViewNameKey\n};\n\n// flatten nested objects.\n// For example: { a: { b: v, c: z } } -> { 'a.b': v, 'a.c': z }\nvar flatten = function flatten(formValue, options) {\n var result = JSON.parse(JSON.stringify(formValue));\n Object.keys(result).forEach(function (i) {\n // We check the type of the i using\n // typeof() function and recursively\n // call the function again\n // ignore _range situations\n if (typeof result[i] === 'object' && !Array.isArray(result[i]) && (options != null && options.full || !result[i][formRangeKey])) {\n var temp = flatten(result[i]);\n Object.keys(temp).forEach(function (j) {\n // Store temp in result\n // ignore empty arrays\n if (!Array.isArray(temp[j]) || Array.isArray(temp[j]) && temp[j].length) result[i + \".\" + j] = temp[j];\n });\n delete result[i];\n }\n });\n return result;\n};\n\n// unflatten nested objects. For example: { 'a.b': v } -> { a: { b: v } }\nvar unflatten = function unflatten(formValue) {\n var result = JSON.parse(JSON.stringify(formValue));\n var specialKeys = Object.values(viewFormKeyMap);\n Object.keys(result).filter(function (k) {\n return !specialKeys.includes(k);\n }).forEach(function (k) {\n var parts = k.split('.');\n var val = result[k];\n delete result[k];\n var parent = result;\n while (parts.length > 1) {\n var sub = parts.shift();\n if (!parent[sub]) parent[sub] = {};\n parent = parent[sub];\n }\n parent[parts.shift()] = val;\n });\n return result;\n};\n\n// converts from the external view format to the internal Form value format\nvar viewToFormValue = function viewToFormValue(view) {\n var result = _extends({}, (view == null ? void 0 : view.properties) || {});\n // convert { min: , max: } range to [min, max] for RangeSelector\n Object.keys(result).forEach(function (key) {\n var _result$key, _result$key2;\n if (typeof ((_result$key = result[key]) == null ? void 0 : _result$key.min) === 'number' || typeof ((_result$key2 = result[key]) == null ? void 0 : _result$key2.max) === 'number') {\n var _result$key3;\n result[key] = (_result$key3 = {}, _result$key3[formRangeKey] = [result[key].min, result[key].max], _result$key3);\n }\n });\n\n // convert formal view keys to their form '_' prefixed counterparts\n Object.keys(viewFormKeyMap).forEach(function (key) {\n if (view != null && view[key]) result[viewFormKeyMap[key]] = view[key];\n });\n // always have some blank search text\n if (!result[formSearchKey]) result[formSearchKey] = '';\n if (view != null && view.sort) result[formSortKey] = view.sort;\n if (view != null && view.name) result[formViewNameKey] = view.name;\n if (view != null && view.columns) result[formColumnsKey] = view.columns;\n if (view != null && view.groupBy) result[formGroupByKey] = view.groupBy;\n return unflatten(result);\n};\n\n// converts from the internal Form value format to the external view format\nvar formValueToView = function formValueToView(value, views) {\n var result = {};\n\n // if the user chose a view, use that\n if (value[formViewNameKey]) result = JSON.parse(JSON.stringify(views.find(function (v) {\n return v.name === value[formViewNameKey];\n })));\n var valueCopy = _extends({}, value);\n Object.keys(viewFormKeyMap).forEach(function (key) {\n if (valueCopy[viewFormKeyMap[key]]) {\n result[key] = valueCopy[viewFormKeyMap[key]];\n }\n delete valueCopy[viewFormKeyMap[key]];\n });\n\n // flatten any nested objects\n var flatValue = flatten(valueCopy);\n result.properties = _extends({}, result.properties || {}, flatValue);\n\n // convert any ranges\n Object.keys(result.properties).forEach(function (key) {\n if (result.properties[key][formRangeKey]) {\n result.properties[key] = {\n min: result.properties[key][formRangeKey][0],\n max: result.properties[key][formRangeKey][1]\n };\n }\n });\n return result;\n};\n\n// remove any empty arrays of property values by deleting the key for\n// that property in the view properties\nvar clearEmpty = function clearEmpty(formValue) {\n var value = formValue;\n Object.keys(value).forEach(function (k) {\n if (Array.isArray(value[k]) && value[k].length === 0) delete value[k];\n });\n return value;\n};\n\n// if paging, when anything other than the page changes, reset the page to 1\nvar resetPage = function resetPage(nextFormValue, prevFormValue) {\n if (prevFormValue[formPageKey] && prevFormValue[formPageKey] > 1)\n // eslint-disable-next-line no-param-reassign\n nextFormValue[formPageKey] = 1;\n};\nvar transformTouched = function transformTouched(touched, value) {\n var result = {};\n Object.keys(touched).forEach(function (key) {\n // special case _range fields\n var parts = key.split('.');\n if (parts[1] === formRangeKey) result[key] = value[parts[0]];else result[key] = flatten(value, {\n full: true\n })[key];\n });\n return result;\n};\n\n// function shared by onSubmit and onChange to coordinate view\n// name changes\nvar normalizeValue = function normalizeValue(nextValue, prevValue, views) {\n if (nextValue[formViewNameKey] && nextValue[formViewNameKey] !== prevValue[formViewNameKey]) {\n // view name changed, reset view contents from named view\n return viewToFormValue(views.find(function (v) {\n return v.name === nextValue[formViewNameKey];\n }));\n }\n // something else changed\n\n // clear empty properties\n var result = clearEmpty(nextValue);\n\n // if we have a view and something related to it changed, clear the view\n if (result[formViewNameKey]) {\n var view = views.find(function (v) {\n return v.name === result[formViewNameKey];\n });\n var viewValue = viewToFormValue(view);\n clearEmpty(viewValue);\n if (Object.keys(viewValue).some(function (k) {\n return (\n // allow mismatch between empty and set strings\n viewValue[k] && result[k] && JSON.stringify(result[k]) !== JSON.stringify(viewValue[k])\n );\n })) {\n delete result[formViewNameKey];\n }\n }\n return result;\n};\nexport var DataForm = function DataForm(_ref) {\n var children = _ref.children,\n footer = _ref.footer,\n onDone = _ref.onDone,\n onTouched = _ref.onTouched,\n pad = _ref.pad,\n updateOnProp = _ref.updateOn,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(DataContext),\n messages = _useContext.messages,\n onView = _useContext.onView,\n updateOnData = _useContext.updateOn,\n view = _useContext.view,\n views = _useContext.views;\n var updateOn = updateOnProp != null ? updateOnProp : updateOnData;\n var _useContext2 = useContext(MessageContext),\n format = _useContext2.format;\n var _useState = useState(viewToFormValue(view)),\n formValue = _useState[0],\n setFormValue = _useState[1];\n var _useState2 = useState(),\n changed = _useState2[0],\n setChanged = _useState2[1];\n var onSubmit = useCallback(function (_ref2) {\n var value = _ref2.value,\n touched = _ref2.touched;\n var nextValue = normalizeValue(value, formValue, views);\n resetPage(nextValue, formValue);\n setFormValue(nextValue);\n setChanged(false);\n if (onTouched) onTouched(transformTouched(touched, nextValue));\n onView(formValueToView(nextValue, views));\n if (onDone) onDone();\n }, [formValue, onDone, onTouched, onView, views]);\n var onChange = useCallback(function (value, _ref3) {\n var touched = _ref3.touched;\n var nextValue = normalizeValue(value, formValue, views);\n resetPage(nextValue, formValue);\n setFormValue(nextValue);\n setChanged(true);\n if (updateOn === 'change') {\n if (onTouched) onTouched(transformTouched(touched, nextValue));\n onView(formValueToView(nextValue, views));\n }\n }, [formValue, onTouched, onView, updateOn, views]);\n var onReset = useCallback(function () {\n setFormValue(viewToFormValue(view));\n setChanged(false);\n }, [view]);\n useEffect(function () {\n return setFormValue(viewToFormValue(view));\n }, [view]);\n var content = children;\n if (footer !== false && updateOn === 'submit' || pad) {\n content = /*#__PURE__*/React.createElement(Box, {\n fill: \"vertical\"\n }, /*#__PURE__*/React.createElement(Box, {\n flex: true,\n overflow: \"auto\",\n pad: {\n horizontal: pad,\n top: pad\n }\n }, /*#__PURE__*/React.createElement(Box, {\n flex: false\n }, content)), footer !== false && updateOn === 'submit' && /*#__PURE__*/React.createElement(Footer, {\n flex: false,\n margin: {\n top: 'small'\n },\n pad: {\n horizontal: pad,\n bottom: pad\n },\n gap: \"small\"\n }, /*#__PURE__*/React.createElement(Button, {\n label: format({\n id: 'dataForm.submit',\n messages: messages == null ? void 0 : messages.dataForm\n }),\n type: \"submit\",\n primary: true\n }), /*#__PURE__*/React.createElement(HideableButton, _extends({\n label: format({\n id: 'dataForm.reset',\n messages: messages == null ? void 0 : messages.dataForm\n }),\n type: \"reset\",\n onClick: onReset\n }, !changed ? hideButtonProps : {}))));\n }\n return /*#__PURE__*/React.createElement(MaxForm, _extends({}, rest, {\n value: formValue,\n onSubmit: updateOn === 'submit' ? onSubmit : undefined,\n onChange: onChange\n }), content);\n};","import styled, { css } from 'styled-components';\nimport { focusStyle, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar disabledStyle = \"\\n opacity: 0.5;\\n cursor: default;\\n\";\nvar StyledRadioButtonContainer = styled.label.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonContainer\",\n componentId: \"sc-g1f6ld-0\"\n})([\"display:flex;flex-direction:row;align-items:center;user-select:none;width:fit-content;\", \" \", \":hover input:not([disabled]) + div,:hover input:not([disabled]) + span{border-color:\", \";}:hover{background-color:\", \";}\", \" \", \";\"], function (props) {\n return props.disabled && disabledStyle;\n}, function (props) {\n return !props.disabled && 'cursor: pointer;';\n}, function (props) {\n return normalizeColor(props.theme.radioButton.hover.border.color, props.theme);\n}, function (props) {\n return normalizeColor(!props.disabled && props.theme.radioButton.hover && props.theme.radioButton.hover.background && props.theme.radioButton.hover.background.color, props.theme);\n}, function (props) {\n return props.focus && !props.focusIndicator && \"\\n input:not([disabled]) + div,\\n input:not([disabled]) + span {\\n border-color: \" + normalizeColor(props.theme.radioButton.hover.border.color, props.theme) + \";\\n }\\n background-color: \" + normalizeColor(!props.disabled && props.theme.radioButton.hover && props.theme.radioButton.hover.background && props.theme.radioButton.hover.background.color, props.theme) + \";\\n \";\n}, function (props) {\n return props.theme.radioButton.container.extend;\n});\nStyledRadioButtonContainer.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonContainer.defaultProps, defaultProps);\nvar StyledRadioButtonInput = styled.input.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonInput\",\n componentId: \"sc-g1f6ld-1\"\n})([\"opacity:0;-moz-appearance:none;width:0;height:0;margin:0;\", \";\"], function (props) {\n return !props.disabled && 'cursor: pointer;';\n});\nStyledRadioButtonInput.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonInput.defaultProps, defaultProps);\nvar StyledRadioButtonLabel = styled.span.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonLabel\",\n componentId: \"sc-g1f6ld-2\"\n})([\"\", \"\"], function (props) {\n return props.theme.radioButton.font.weight && css([\"font-weight:\", \";\"], props.theme.radioButton.font.weight);\n});\nStyledRadioButtonLabel.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonLabel.defaultProps, defaultProps);\nvar StyledRadioButtonIcon = styled.svg.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonIcon\",\n componentId: \"sc-g1f6ld-3\"\n})([\"box-sizing:border-box;width:\", \";height:\", \";fill:\", \";\", \";\"], function (props) {\n return props.theme.radioButton.icon.size || props.theme.radioButton.size;\n}, function (props) {\n return props.theme.radioButton.icon.size || props.theme.radioButton.size;\n}, function (props) {\n return normalizeColor(props.theme.radioButton.check.color || 'control', props.theme);\n}, function (props) {\n return props.theme.radioButton.icon.extend;\n});\nStyledRadioButtonIcon.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonIcon.defaultProps, defaultProps);\nvar StyledRadioButtonBox = styled.div.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonBox\",\n componentId: \"sc-g1f6ld-4\"\n})([\"background-color:\", \";\", \";\", \";\"], function (props) {\n var _props$theme$radioBut;\n return normalizeColor((_props$theme$radioBut = props.theme.radioButton.check.background) == null ? void 0 : _props$theme$radioBut.color, props.theme);\n}, function (props) {\n return props.focus && focusStyle();\n}, function (props) {\n return props.theme.radioButton.check.extend;\n});\nStyledRadioButtonBox.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonBox.defaultProps, defaultProps);\nvar StyledRadioButton = styled.div.withConfig({\n displayName: \"StyledRadioButton\",\n componentId: \"sc-g1f6ld-5\"\n})([\"\", \";\"], function (props) {\n return props.theme.radioButton && props.theme.radioButton.extend;\n});\nStyledRadioButton.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButton.defaultProps, defaultProps);\nexport { StyledRadioButtonContainer, StyledRadioButtonInput, StyledRadioButtonLabel, StyledRadioButtonIcon, StyledRadioButtonBox, StyledRadioButton };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n a11yTitle: PropTypes.string,\n checked: PropTypes.bool,\n children: PropTypes.func,\n disabled: PropTypes.bool,\n id: PropTypes.string,\n label: PropTypes.node,\n name: PropTypes.string.isRequired,\n onChange: PropTypes.func\n };\n}\nexport var RadioButtonPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"checked\", \"children\", \"disabled\", \"focus\", \"focusIndicator\", \"id\", \"label\", \"name\", \"onChange\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { defaultProps } from '../../default-props';\nimport { normalizeColor, removeUndefined } from '../../utils';\nimport { StyledRadioButton, StyledRadioButtonContainer, StyledRadioButtonIcon, StyledRadioButtonInput, StyledRadioButtonLabel, StyledRadioButtonBox } from './StyledRadioButton';\nimport { RadioButtonPropTypes } from './propTypes';\nvar RadioButton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n checked = _ref.checked,\n children = _ref.children,\n disabled = _ref.disabled,\n focus = _ref.focus,\n focusIndicator = _ref.focusIndicator,\n id = _ref.id,\n label = _ref.label,\n name = _ref.name,\n onChange = _ref.onChange,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(),\n hover = _useState[0],\n setHover = _useState[1];\n var normalizedLabel = typeof label === 'string' ? /*#__PURE__*/React.createElement(StyledRadioButtonLabel, null, label) : label;\n var Icon = theme.radioButton.icons.circle;\n var borderColor = normalizeColor(theme.radioButton.border.color, theme);\n if (checked) {\n borderColor = normalizeColor(theme.radioButton.color || 'control', theme);\n }\n return /*#__PURE__*/React.createElement(StyledRadioButtonContainer, _extends({}, removeUndefined({\n htmlFor: id,\n disabled: disabled\n }), {\n onClick: function onClick(event) {\n // prevents clicking on the label trigging the event twice\n // https://stackoverflow.com/questions/24501497/why-the-onclick-element-will-trigger-twice-for-label-element\n if (event.target.type !== 'radio') {\n event.stopPropagation();\n }\n },\n focus: focus,\n focusIndicator: focusIndicator,\n onMouseEnter: function onMouseEnter() {\n return setHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return setHover(false);\n }\n }), /*#__PURE__*/React.createElement(StyledRadioButton, {\n as: Box,\n flex: false,\n margin: label ? {\n right: theme.radioButton.gap || 'small'\n } : undefined\n }, /*#__PURE__*/React.createElement(StyledRadioButtonInput, _extends({\n \"aria-label\": a11yTitle\n }, rest, {\n ref: ref,\n type: \"radio\"\n }, removeUndefined({\n id: id,\n name: name,\n checked: checked,\n disabled: disabled,\n onChange: onChange\n }))), children ? children({\n checked: checked,\n focus: focus && focusIndicator,\n hover: hover\n }) : /*#__PURE__*/React.createElement(StyledRadioButtonBox, {\n focus: focus && focusIndicator,\n as: Box,\n align: \"center\",\n justify: \"center\",\n width: theme.radioButton.size,\n height: theme.radioButton.size,\n border: {\n size: theme.radioButton.border.width,\n color: borderColor\n },\n round: theme.radioButton.check.radius\n }, checked && (Icon ? /*#__PURE__*/React.createElement(Icon, {\n theme: theme,\n as: StyledRadioButtonIcon\n }) : /*#__PURE__*/React.createElement(StyledRadioButtonIcon, {\n viewBox: \"0 0 24 24\",\n preserveAspectRatio: \"xMidYMid meet\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 12,\n cy: 12,\n r: 6\n }))))), normalizedLabel);\n});\nRadioButton.displayName = 'RadioButton';\nRadioButton.propTypes = RadioButtonPropTypes;\nexport { RadioButton };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.func,\n disabled: PropTypes.bool,\n name: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number), PropTypes.arrayOf(PropTypes.bool), PropTypes.arrayOf(PropTypes.shape({\n disabled: PropTypes.bool,\n id: PropTypes.string,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).isRequired\n }))]).isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool, PropTypes.object])\n };\n}\nexport var RadioButtonGroupPropTypes = PropType;","var _excluded = [\"children\", \"defaultValue\", \"disabled\", \"focusIndicator\", \"name\", \"onChange\", \"options\", \"value\", \"gap\"],\n _excluded2 = [\"disabled\", \"id\", \"label\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useEffect, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { FormContext } from '../Form/FormContext';\nimport { defaultProps } from '../../default-props';\nimport { Keyboard } from '../Keyboard';\nimport { Box } from '../Box';\nimport { RadioButton } from '../RadioButton';\nimport { RadioButtonGroupPropTypes } from './propTypes';\nvar RadioButtonGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n defaultValue = _ref.defaultValue,\n disabled = _ref.disabled,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n name = _ref.name,\n onChange = _ref.onChange,\n optionsProp = _ref.options,\n valueProp = _ref.value,\n gap = _ref.gap,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var formContext = useContext(FormContext);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n // normalize options to always use an object\n var options = optionsProp.map(function (o) {\n return typeof o !== 'object' ? {\n disabled: disabled,\n id: rest.id ? rest.id + \"-\" + o : \"\" + o,\n // force string\n label: typeof o !== 'string' ? JSON.stringify(o) : o,\n value: o\n } : _extends({\n disabled: disabled\n }, o);\n });\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp,\n initialValue: defaultValue != null ? defaultValue : ''\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n\n // track if focus is on one of the radio buttons\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n var optionRefs = useRef([]);\n var valueIndex = React.useMemo(function () {\n var result;\n options.some(function (option, index) {\n if (option.value === value) {\n result = index;\n return true;\n }\n return false;\n });\n return result;\n }, [options, value]);\n useEffect(function () {\n // if tab comes back to RadioButtonGroup when there still is no selection,\n // we want focus to be on the first RadioButton\n if (focus && !valueIndex) {\n optionRefs.current[0].focus();\n }\n }, [focus, valueIndex]);\n var onNext = function onNext() {\n if (valueIndex !== undefined && valueIndex < options.length - 1) {\n var nextIndex = valueIndex + 1;\n // ensure change event occurs\n optionRefs.current[nextIndex].click();\n }\n };\n var onPrevious = function onPrevious() {\n if (valueIndex > 0) {\n var nextIndex = valueIndex - 1;\n // ensure change event occurs\n optionRefs.current[nextIndex].click();\n }\n };\n var onFocus = function onFocus() {\n // Delay just a wee bit so Chrome doesn't missing turning the button on.\n // Chrome behaves differently in that focus is given to radio buttons\n // when the user selects one, unlike Safari and Firefox.\n setTimeout(function () {\n setFocus(true);\n }, 1);\n };\n var onRadioButtonChange = function onRadioButtonChange(event, optionValue) {\n setValue(optionValue);\n if (onChange) {\n event.persist(); // extract from React synthetic event pool\n // event.target.value gives value as a string which needs to be\n // manually typecasted according to the type of original option value.\n // return the original option value attached with the event.\n var adjustedEvent = event;\n adjustedEvent.value = optionValue;\n onChange(adjustedEvent);\n }\n };\n var onBlur = function onBlur() {\n return setFocus(false);\n };\n return /*#__PURE__*/React.createElement(Keyboard, {\n target: \"document\",\n onUp: focus ? onPrevious : undefined,\n onDown: focus ? onNext : undefined,\n onLeft: focus ? onPrevious : undefined,\n onRight: focus ? onNext : undefined\n }, /*#__PURE__*/React.createElement(Box, _extends({\n ref: ref,\n role: \"radiogroup\"\n }, theme.radioButtonGroup.container, {\n gap: gap || (theme.radioButtonGroup.container && theme.radioButtonGroup.container.gap ? theme.radioButtonGroup.container.gap : 'small')\n }, rest), options.map(function (_ref2, index) {\n var optionDisabled = _ref2.disabled,\n id = _ref2.id,\n label = _ref2.label,\n optionValue = _ref2.value,\n optionRest = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n // if focus is within the RadioButtonGroup, determine\n // which radio button should be the active one\n var focusable = optionValue === value || value === undefined && !index ||\n // when nothing has been selected, show focus\n // on the first radiobutton\n value === '' && index === 0;\n if (optionRest.checked) {\n console.warn( // eslint-disable-next-line max-len\n \"'checked' prop of an individual RadioButton shouldn't be used in a RadioButtonGroup component. Use the RadioButtonGroup 'value' prop instead.\");\n }\n return /*#__PURE__*/React.createElement(RadioButton, _extends({\n ref: function ref(aRef) {\n optionRefs.current[index] = aRef;\n },\n key: optionValue,\n name: name,\n label: !children ? label : undefined,\n disabled: optionDisabled,\n checked: optionValue === value,\n focus: focus && focusable\n // when contained in a FormField, focusIndicator = false,\n // so that the FormField has focus style. However, we still\n // need to visually indicate when a RadioButton is active.\n // In RadioButton, if focus = true but focusIndicator = false,\n // we will apply the hover treament.\n ,\n focusIndicator: focusIndicator,\n id: id,\n value: optionValue,\n onFocus: onFocus,\n onBlur: onBlur,\n onChange: function onChange(event) {\n return onRadioButtonChange(event, optionValue);\n },\n tabIndex: focusable ? '0' : '-1' // necessary for Firefox\n }, optionRest), children ? function (state) {\n return children(optionsProp[index], state);\n } : null);\n })));\n});\nRadioButtonGroup.displayName = 'RadioButtonGroup';\nRadioButtonGroup.propTypes = RadioButtonGroupPropTypes;\nexport { RadioButtonGroup };","import styled, { css } from 'styled-components';\nimport { disabledStyle, getInputPadBySide, inputStyle, parseMetricToNum, plainInputStyle, textAlignStyle, widthStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { inputPadForIcon } from '../../utils/styles';\nvar getPlainStyle = function getPlainStyle(plain) {\n if (plain === 'full') {\n return css([\"\", \" padding:0;\"], plainInputStyle);\n }\n return plain && plainInputStyle;\n};\nvar StyledTextInput = styled.input.withConfig({\n displayName: \"StyledTextInput\",\n componentId: \"sc-1x30a0s-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \" \", \";\"], inputStyle, function (props) {\n return getPlainStyle(props.plain);\n}, function (props) {\n return props.icon && inputPadForIcon;\n}, function (props) {\n return props.disabled && disabledStyle(props.theme.textInput.disabled && props.theme.textInput.disabled.opacity);\n}, function (props) {\n return props.textAlign && textAlignStyle;\n}, function (props) {\n return props.widthProp && widthStyle(props.widthProp, props.theme);\n}, function (props) {\n return props.theme.textInput && props.theme.textInput.extend;\n});\nStyledTextInput.defaultProps = {};\nObject.setPrototypeOf(StyledTextInput.defaultProps, defaultProps);\nvar StyledTextInputContainer = styled.div.withConfig({\n displayName: \"StyledTextInput__StyledTextInputContainer\",\n componentId: \"sc-1x30a0s-1\"\n})([\"position:relative;width:100%;\", \";\"], function (props) {\n return props.theme.textInput && props.theme.textInput.container && props.theme.textInput.container.extend;\n});\nStyledTextInputContainer.defaultProps = {};\nObject.setPrototypeOf(StyledTextInputContainer.defaultProps, defaultProps);\nvar StyledPlaceholder = styled.div.withConfig({\n displayName: \"StyledTextInput__StyledPlaceholder\",\n componentId: \"sc-1x30a0s-2\"\n})([\"position:absolute;left:\", \"px;top:50%;transform:translateY(-50%);display:flex;justify-content:center;pointer-events:none;\", \";\"], function (props) {\n return parseMetricToNum(getInputPadBySide(props, 'left')) - parseMetricToNum(props.theme.global.control.border.width);\n}, function (props) {\n return props.theme.textInput && props.theme.textInput.placeholder && props.theme.textInput.placeholder.extend;\n});\nStyledPlaceholder.defaultProps = {};\nObject.setPrototypeOf(StyledPlaceholder.defaultProps, defaultProps);\nvar StyledIcon = styled.div.withConfig({\n displayName: \"StyledTextInput__StyledIcon\",\n componentId: \"sc-1x30a0s-3\"\n})([\"position:absolute;display:flex;justify:center;top:50%;transform:translateY(-50%);pointer-events:none;\", \"\"], function (props) {\n return props.reverse ? \"right: \" + getInputPadBySide(props, 'right') + \";\" : \"left: \" + getInputPadBySide(props, 'left') + \";\";\n});\nvar StyledSuggestions = styled.ol.withConfig({\n displayName: \"StyledTextInput__StyledSuggestions\",\n componentId: \"sc-1x30a0s-4\"\n})([\"border-top-left-radius:0;border-top-right-radius:0;margin:0;padding:0;list-style-type:none;\", \";\"], function (props) {\n return props.theme.textInput && props.theme.textInput.suggestions && props.theme.textInput.suggestions.extend;\n});\nStyledSuggestions.defaultProps = {};\nObject.setPrototypeOf(StyledSuggestions.defaultProps, defaultProps);\nexport { StyledTextInput, StyledTextInputContainer, StyledPlaceholder, StyledIcon, StyledSuggestions };","import PropTypes from 'prop-types';\nimport { widthPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n a11yTitle: PropTypes.string,\n defaultSuggestion: PropTypes.number,\n dropAlign: PropTypes.shape({\n top: PropTypes.oneOf(['top', 'bottom']),\n bottom: PropTypes.oneOf(['top', 'bottom']),\n right: PropTypes.oneOf(['left', 'right']),\n left: PropTypes.oneOf(['left', 'right'])\n }),\n dropHeight: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n dropTarget: PropTypes.object,\n dropProps: PropTypes.object,\n icon: PropTypes.element,\n id: PropTypes.string,\n focusIndicator: PropTypes.bool,\n messages: PropTypes.shape({\n enterSelect: PropTypes.string,\n suggestionsCount: PropTypes.string,\n suggestionsExist: PropTypes.string,\n suggestionIsOpen: PropTypes.string\n }),\n name: PropTypes.string,\n onChange: PropTypes.func,\n onSelect: PropTypes.func,\n onSuggestionSelect: PropTypes.func,\n onSuggestionsOpen: PropTypes.func,\n onSuggestionsClose: PropTypes.func,\n placeholder: PropTypes.node,\n plain: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['full'])]),\n reverse: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', '2xl', '3xl', '4xl', '5xl', '6xl']), PropTypes.string]),\n suggestions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({\n label: PropTypes.node,\n // eslint-disable-next-line\n value: PropTypes.any // this is intentional any\n }), PropTypes.string])),\n textAlign: PropTypes.oneOf(['start', 'center', 'end']),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n width: widthPropType\n };\n}\nexport var TextInputPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"defaultSuggestion\", \"defaultValue\", \"dropAlign\", \"dropHeight\", \"dropTarget\", \"dropProps\", \"focusIndicator\", \"icon\", \"id\", \"messages\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"onKeyDown\", \"onSelect\", \"onSuggestionSelect\", \"onSuggestionsClose\", \"onSuggestionsOpen\", \"placeholder\", \"plain\", \"readOnly\", \"reverse\", \"suggestions\", \"textAlign\", \"value\", \"width\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Drop } from '../Drop';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { Keyboard } from '../Keyboard';\nimport { FormContext } from '../Form/FormContext';\nimport { AnnounceContext } from '../../contexts';\nimport { isNodeAfterScroll, isNodeBeforeScroll, sizeStyle, useForwardedRef, useSizedIcon } from '../../utils';\nimport { StyledTextInput, StyledTextInputContainer, StyledPlaceholder, StyledIcon, StyledSuggestions } from './StyledTextInput';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { TextInputPropTypes } from './propTypes';\nvar renderLabel = function renderLabel(suggestion) {\n if (suggestion && typeof suggestion === 'object') {\n return suggestion.label || suggestion.value;\n }\n return suggestion;\n};\nvar stringLabel = function stringLabel(suggestion) {\n if (suggestion && typeof suggestion === 'object') {\n if (suggestion.label && typeof suggestion.label === 'string') {\n return suggestion.label;\n }\n return suggestion.value;\n }\n return suggestion;\n};\nvar ContainerBox = styled(Box).withConfig({\n displayName: \"TextInput__ContainerBox\",\n componentId: \"sc-1ai0c08-0\"\n})([\"\", \";@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){width:100%;}\"], function (props) {\n return props.dropHeight ? sizeStyle('max-height', props.dropHeight, props.theme) : 'max-height: inherit;';\n});\nvar defaultDropAlign = {\n top: 'bottom',\n left: 'left'\n};\nvar TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _inputRef$current;\n var a11yTitle = _ref.a11yTitle,\n defaultSuggestion = _ref.defaultSuggestion,\n defaultValue = _ref.defaultValue,\n _ref$dropAlign = _ref.dropAlign,\n dropAlign = _ref$dropAlign === void 0 ? defaultDropAlign : _ref$dropAlign,\n dropHeight = _ref.dropHeight,\n dropTarget = _ref.dropTarget,\n dropProps = _ref.dropProps,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n icon = _ref.icon,\n id = _ref.id,\n messages = _ref.messages,\n name = _ref.name,\n _onBlur = _ref.onBlur,\n onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n onKeyDown = _ref.onKeyDown,\n onSelect = _ref.onSelect,\n onSuggestionSelect = _ref.onSuggestionSelect,\n onSuggestionsClose = _ref.onSuggestionsClose,\n onSuggestionsOpen = _ref.onSuggestionsOpen,\n placeholder = _ref.placeholder,\n plain = _ref.plain,\n readOnly = _ref.readOnly,\n reverse = _ref.reverse,\n suggestions = _ref.suggestions,\n textAlign = _ref.textAlign,\n valueProp = _ref.value,\n widthProp = _ref.width,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var announce = useContext(AnnounceContext);\n var formContext = useContext(FormContext);\n var inputRef = useForwardedRef(ref);\n var dropRef = useRef();\n var suggestionsRef = useRef();\n // if this is a readOnly property, don't set a name with the form context\n // this allows Select to control the form context for the name.\n var _formContext$useFormI = formContext.useFormInput({\n name: readOnly ? undefined : name,\n value: valueProp\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n var _useState2 = useState(false),\n showDrop = _useState2[0],\n setShowDrop = _useState2[1];\n var handleSuggestionSelect = useMemo(function () {\n return onSelect && !onSuggestionSelect ? onSelect : onSuggestionSelect;\n }, [onSelect, onSuggestionSelect]);\n var handleTextSelect = useMemo(function () {\n return onSelect && onSuggestionSelect ? onSelect : undefined;\n }, [onSelect, onSuggestionSelect]);\n var _useState3 = useState(),\n suggestionsAtClose = _useState3[0],\n setSuggestionsAtClose = _useState3[1];\n var openDrop = useCallback(function () {\n setShowDrop(true);\n announce(format({\n id: 'textInput.suggestionIsOpen',\n messages: messages\n }));\n announce(suggestions.length + \" \" + format({\n id: 'textInput.suggestionsCount',\n messages: messages\n }));\n if (onSuggestionsOpen) onSuggestionsOpen();\n }, [announce, messages, format, onSuggestionsOpen, suggestions]);\n var closeDrop = useCallback(function () {\n setSuggestionsAtClose(suggestions); // must be before closing drop\n setShowDrop(false);\n if (onSuggestionsClose) onSuggestionsClose();\n }, [onSuggestionsClose, suggestions]);\n var clickOutside = useCallback(function (event) {\n if (event.target !== inputRef.current) closeDrop();\n }, [inputRef, closeDrop]);\n\n // Handle scenarios where we have focus, the drop isn't showing,\n // and the suggestions change. We don't want to open the drop if\n // the drop has been closed by onEsc and the suggestions haven't\n // changed. So, we remember the suggestions we are showing when\n // the drop was closed and only re-open it when the suggestions\n // subsequently change.\n useEffect(function () {\n if (focus && !showDrop && suggestions && suggestions.length && (!suggestionsAtClose || suggestionsAtClose.length !== suggestions.length)) {\n openDrop();\n }\n }, [focus, openDrop, showDrop, suggestions, suggestionsAtClose]);\n\n // if we have no suggestions, close drop if it's open\n useEffect(function () {\n if (showDrop && (!suggestions || !suggestions.length)) {\n closeDrop();\n }\n }, [closeDrop, showDrop, suggestions]);\n var valueSuggestionIndex = useMemo(function () {\n return suggestions ? suggestions.map(function (suggestion) {\n return typeof suggestion === 'object' ? suggestion.value : suggestion;\n }).indexOf(value) : -1;\n }, [suggestions, value]);\n\n // choose the best suggestion, either the explicit default or the one\n // that matches the current value\n var resetSuggestionIndex = useMemo(function () {\n if (valueSuggestionIndex === -1 && typeof defaultSuggestion === 'number') {\n return defaultSuggestion;\n }\n return valueSuggestionIndex;\n }, [defaultSuggestion, valueSuggestionIndex]);\n\n // activeSuggestionIndex unifies mouse and keyboard interaction of\n // the suggestions\n var _useState4 = useState(resetSuggestionIndex),\n activeSuggestionIndex = _useState4[0],\n setActiveSuggestionIndex = _useState4[1];\n\n // Only update active suggestion index when the mouse actually moves,\n // not when suggestions are moving under the mouse.\n var _useState5 = useState(),\n mouseMovedSinceLastKey = _useState5[0],\n setMouseMovedSinceLastKey = _useState5[1];\n\n // set activeSuggestionIndex when value changes\n useEffect(function () {\n return setActiveSuggestionIndex(valueSuggestionIndex);\n }, [valueSuggestionIndex]);\n\n // reset activeSuggestionIndex when the drop is closed\n useEffect(function () {\n if (!showDrop) setActiveSuggestionIndex(resetSuggestionIndex);\n }, [resetSuggestionIndex, showDrop]);\n\n // announce active suggestion\n useEffect(function () {\n if (activeSuggestionIndex >= 0) {\n var label = stringLabel(suggestions[activeSuggestionIndex]);\n announce(label + \" \" + format({\n id: 'textInput.enterSelect',\n messages: messages\n }));\n }\n }, [activeSuggestionIndex, announce, messages, format, suggestions]);\n\n // make sure activeSuggestion is visible in scroll\n useEffect(function () {\n var timer = setTimeout(function () {\n var list = suggestionsRef.current;\n if (showDrop && activeSuggestionIndex !== -1 && list) {\n var container = list.parentNode;\n var item = list.children[activeSuggestionIndex];\n if (container.scrollTo) {\n if (isNodeAfterScroll(item, container)) container.scrollTo(0, item.offsetTop - (container.getBoundingClientRect().height - item.getBoundingClientRect().height));else if (isNodeBeforeScroll(item, container)) container.scrollTo(0, item.offsetTop);\n }\n }\n }, 50); // delay to allow Drop to animate in\n return function () {\n return clearTimeout(timer);\n };\n }, [activeSuggestionIndex, showDrop]);\n var setValueFromSuggestion = function setValueFromSuggestion(event, suggestion) {\n // if we stole the focus in the drop, perhaps by interacting with\n // a suggestion button or the scrollbar, give it back\n inputRef.current.focus();\n inputRef.current.value = suggestion; // needed for uncontrolled cases\n closeDrop();\n if (handleSuggestionSelect) {\n if (event.persist) event.persist();\n var adjustedEvent = event;\n adjustedEvent.suggestion = suggestion;\n handleSuggestionSelect(adjustedEvent);\n }\n setValue(suggestion);\n };\n var onNextSuggestion = useCallback(function (event) {\n event.preventDefault();\n var nextActiveIndex = Math.min(activeSuggestionIndex + 1, suggestions.length - 1);\n setActiveSuggestionIndex(nextActiveIndex);\n setMouseMovedSinceLastKey(false);\n }, [activeSuggestionIndex, suggestions]);\n var onPreviousSuggestion = useCallback(function (event) {\n event.preventDefault();\n var nextActiveIndex = Math.max(activeSuggestionIndex - 1, 0);\n setActiveSuggestionIndex(nextActiveIndex);\n setMouseMovedSinceLastKey(false);\n }, [activeSuggestionIndex]);\n\n // account for input value in both controlled and uncontrolled scenarios\n var hasValue = value || ((_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.value);\n var showStyledPlaceholder = useMemo(function () {\n return placeholder && typeof placeholder !== 'string' && !hasValue;\n }, [hasValue, placeholder]);\n var drop;\n var extraProps = {\n onSelect: handleTextSelect\n };\n if (showDrop) {\n drop = /*#__PURE__*/React.createElement(Drop, _extends({\n ref: dropRef,\n id: id ? \"text-input-drop__\" + id : undefined,\n align: dropAlign,\n responsive: false,\n target: dropTarget || inputRef.current,\n onClickOutside: clickOutside,\n onEsc: closeDrop\n }, dropProps), /*#__PURE__*/React.createElement(ContainerBox, {\n id: id ? \"listbox__\" + id : undefined,\n role: \"listbox\",\n overflow: \"auto\",\n dropHeight: dropHeight,\n onMouseMove: function onMouseMove() {\n return setMouseMovedSinceLastKey(true);\n }\n }, /*#__PURE__*/React.createElement(StyledSuggestions, {\n ref: suggestionsRef\n }, /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: suggestions,\n step: theme.select.step,\n show: activeSuggestionIndex !== -1 ? activeSuggestionIndex : undefined\n }, function (suggestion, index, itemRef) {\n var active = activeSuggestionIndex === index;\n var selected = suggestion === value;\n // Determine whether the label is done as a child or\n // as an option Button kind property.\n var renderedLabel = renderLabel(suggestion);\n var child;\n if (typeof renderedLabel !== 'string')\n // must be an element rendered by suggestions.label\n child = renderedLabel;else if (!theme.button.option)\n // don't have theme support, need to layout here\n child = /*#__PURE__*/React.createElement(Box, {\n align: \"start\",\n pad: \"small\"\n }, renderedLabel);\n // if we have a child, turn on plain\n\n return /*#__PURE__*/React.createElement(\"li\", {\n key: stringLabel(suggestion) + \"-\" + index,\n ref: itemRef\n }, /*#__PURE__*/React.createElement(Button, {\n id: id ? \"listbox-option-\" + index + \"__\" + id : undefined,\n role: \"option\",\n \"aria-selected\": selected ? 'true' : 'false',\n active: active,\n fill: \"horizontal\",\n plain: !child ? undefined : true,\n align: \"start\",\n kind: !child ? 'option' : undefined,\n label: !child ? renderedLabel : undefined,\n onClick: function onClick(event) {\n return setValueFromSuggestion(event, suggestion);\n },\n onMouseMove: mouseMovedSinceLastKey && activeSuggestionIndex !== index ? function () {\n return setActiveSuggestionIndex(index);\n } : undefined\n }, child));\n }))));\n }\n var keyboardProps = {\n onKeyDown: onKeyDown\n };\n if (showDrop) {\n keyboardProps.onEnter = function (event) {\n // prevent submitting forms via Enter when the drop is open\n event.preventDefault();\n if (activeSuggestionIndex >= 0) setValueFromSuggestion(event, suggestions[activeSuggestionIndex]);else closeDrop();\n };\n if (activeSuggestionIndex > 0) keyboardProps.onUp = onPreviousSuggestion;\n if (activeSuggestionIndex < suggestions.length - 1) keyboardProps.onDown = onNextSuggestion;\n keyboardProps.onTab = closeDrop;\n } else if (suggestions && suggestions.length > 0) {\n keyboardProps.onDown = openDrop;\n }\n\n /*\n If the text input has a list of suggestions, add the WAI-ARIA 1.2\n combobox role and states.\n */\n var comboboxProps = {};\n var activeOptionID;\n if (id && (suggestions == null ? void 0 : suggestions.length) > -1) {\n if (showDrop && activeSuggestionIndex > -1) {\n activeOptionID = \"listbox-option-\" + activeSuggestionIndex + \"__\" + id;\n }\n comboboxProps = {\n 'aria-activedescendant': activeOptionID,\n 'aria-autocomplete': 'list',\n 'aria-expanded': showDrop ? 'true' : 'false',\n 'aria-controls': showDrop ? \"listbox__\" + id : undefined,\n role: 'combobox'\n };\n }\n // For the Keyboard target below, if we have focus,\n // either on the input element or within the drop,\n // then we set the target to the document,\n // otherwise we only listen to onDown on the input element itself,\n // primarily for tests.\n\n var textInputIcon = useSizedIcon(icon, rest.size, theme);\n return /*#__PURE__*/React.createElement(StyledTextInputContainer, {\n plain: plain\n }, showStyledPlaceholder && /*#__PURE__*/React.createElement(StyledPlaceholder, null, placeholder), textInputIcon && /*#__PURE__*/React.createElement(StyledIcon, {\n reverse: reverse,\n theme: theme\n }, textInputIcon), /*#__PURE__*/React.createElement(Keyboard, _extends({\n target: focus ? 'document' : undefined\n }, keyboardProps), /*#__PURE__*/React.createElement(StyledTextInput, _extends({\n \"aria-label\": a11yTitle,\n ref: inputRef,\n id: id,\n name: name,\n autoComplete: \"off\",\n plain: plain,\n placeholder: typeof placeholder === 'string' ? placeholder : undefined,\n icon: icon,\n reverse: reverse,\n focus: focus,\n focusIndicator: focusIndicator,\n textAlign: textAlign,\n widthProp: widthProp\n }, rest, extraProps, comboboxProps, {\n defaultValue: renderLabel(defaultValue),\n value: renderLabel(value),\n readOnly: readOnly,\n onFocus: function onFocus(event) {\n // Don't do anything if we are acting like we already have\n // focus. This can happen when this input loses focus temporarily\n // to our drop, see onBlur() handler below.\n if (!focus) {\n setFocus(true);\n if (suggestions && suggestions.length > 0) {\n announce(format({\n id: 'textInput.suggestionsExist',\n messages: messages\n }));\n openDrop();\n }\n if (_onFocus) _onFocus(event);\n }\n },\n onBlur: function onBlur(event) {\n // Only treat it as a blur if the element receiving focus\n // isn't in our drop. The relatedTarget will be our drop\n // when the user clicks on a suggestion or interacts with the\n // scrollbar in the drop.\n if (!event.relatedTarget || event.relatedTarget !== dropRef.current) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n }\n },\n onChange: readOnly ? undefined : function (event) {\n // when TextInput is not contained in a Form, no re-render\n // will come from this onChange and remove the placeholder\n // so we need to update state to ensure the styled\n // placeholder only appears when there is no value\n if (suggestions && focus && !showDrop) {\n openDrop();\n }\n setValue(event.target.value);\n setActiveSuggestionIndex(resetSuggestionIndex);\n if (onChange) onChange(event);\n }\n }))), drop);\n});\nTextInput.displayName = 'TextInput';\nTextInput.propTypes = TextInputPropTypes;\nexport { TextInput };","import PropTypes from 'prop-types';\nimport { marginProp } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n a11yTitle: PropTypes.string,\n component: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n contentProps: PropTypes.object,\n disabled: PropTypes.bool,\n error: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n help: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n htmlFor: PropTypes.string,\n info: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n name: PropTypes.string,\n margin: marginProp,\n pad: PropTypes.bool,\n required: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n indicator: PropTypes.bool\n })]),\n validate: PropTypes.oneOfType([PropTypes.shape({\n regexp: PropTypes.instanceOf(RegExp),\n // regular expression\n message: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n status: PropTypes.oneOf(['error', 'info'])\n }), PropTypes.func, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({\n regexp: PropTypes.instanceOf(RegExp),\n // regular expression\n message: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n status: PropTypes.oneOf(['error', 'info'])\n }), PropTypes.func]))]),\n validateOn: PropTypes.oneOf(['blur', 'submit', 'change'])\n };\n}\nexport var FormFieldPropTypes = PropType;","var _excluded = [\"error\", \"info\", \"message\", \"type\"],\n _excluded2 = [\"component\", \"disabled\", \"invalid\", \"name\", \"onChange\"],\n _excluded3 = [\"children\", \"className\", \"component\", \"contentProps\", \"disabled\", \"error\", \"help\", \"htmlFor\", \"info\", \"label\", \"margin\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"pad\", \"required\", \"style\", \"validate\", \"validateOn\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { Children, cloneElement, forwardRef, useContext, useState, useEffect } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { containsFocus, shouldKeepFocus, withinDropPortal, PortalContext } from '../../utils';\nimport { focusStyle } from '../../utils/styles';\nimport { parseMetricToNum } from '../../utils/mixins';\nimport { useForwardedRef } from '../../utils/refs';\nimport { Box } from '../Box';\nimport { CheckBox } from '../CheckBox';\nimport { CheckBoxGroup } from '../CheckBoxGroup';\nimport { RadioButtonGroup } from '../RadioButtonGroup';\nimport { Text } from '../Text';\nimport { TextInput } from '../TextInput';\nimport { FormContext } from '../Form/FormContext';\nimport { FormFieldPropTypes } from './propTypes';\nvar grommetInputNames = ['CheckBox', 'CheckBoxGroup', 'TextInput', 'Select', 'MaskedInput', 'SelectMultiple', 'TextArea', 'DateInput', 'FileInput', 'RadioButtonGroup', 'RangeInput', 'RangeSelector', 'StarRating', 'ThumbsRating'];\nvar grommetInputPadNames = ['CheckBox', 'CheckBoxGroup', 'RadioButtonGroup', 'RangeInput', 'RangeSelector'];\nvar isGrommetInput = function isGrommetInput(comp) {\n return comp && (grommetInputNames.indexOf(comp.displayName) !== -1 || grommetInputPadNames.indexOf(comp.displayName) !== -1);\n};\nvar FormFieldBox = styled(Box).withConfig({\n displayName: \"FormField__FormFieldBox\",\n componentId: \"sc-m9hood-0\"\n})([\"\", \" \", \"\"], function (props) {\n return props.focus && focusStyle({\n justBorder: true\n });\n}, function (props) {\n return props.theme.formField && props.theme.formField.extend;\n});\nvar FormFieldContentBox = styled(Box).withConfig({\n displayName: \"FormField__FormFieldContentBox\",\n componentId: \"sc-m9hood-1\"\n})([\"\", \"\"], function (props) {\n return props.focus && focusStyle({\n justBorder: true\n });\n});\nvar StyledMessageContainer = styled(Box).withConfig({\n displayName: \"FormField__StyledMessageContainer\",\n componentId: \"sc-m9hood-2\"\n})([\"\", \"\"], function (props) {\n return props.messageType && props.theme.formField[props.messageType].container && props.theme.formField[props.messageType].container.extend;\n});\nvar RequiredText = styled(Text).withConfig({\n displayName: \"FormField__RequiredText\",\n componentId: \"sc-m9hood-3\"\n})([\"color:inherit;font-weight:inherit;line-height:inherit;\"]);\nvar ScreenReaderOnly = styled(Text).withConfig({\n displayName: \"FormField__ScreenReaderOnly\",\n componentId: \"sc-m9hood-4\"\n})([\"position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;\"]);\nvar Message = function Message(_ref) {\n var error = _ref.error,\n info = _ref.info,\n message = _ref.message,\n type = _ref.type,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n if (message) {\n var icon;\n var containerProps;\n if (type) {\n icon = theme.formField[type] && theme.formField[type].icon;\n containerProps = theme.formField[type] && theme.formField[type].container;\n }\n var messageContent;\n if (typeof message === 'string') messageContent = /*#__PURE__*/React.createElement(Text, rest, message);else messageContent = /*#__PURE__*/React.createElement(Box, rest, message);\n return icon || containerProps ? /*#__PURE__*/React.createElement(StyledMessageContainer, _extends({\n direction: \"row\",\n messageType: type\n }, containerProps), icon && /*#__PURE__*/React.createElement(Box, {\n flex: false\n }, icon), messageContent) : messageContent;\n }\n return null;\n};\nvar Input = function Input(_ref2) {\n var component = _ref2.component,\n disabled = _ref2.disabled,\n invalid = _ref2.invalid,\n name = _ref2.name,\n _onChange = _ref2.onChange,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n var formContext = useContext(FormContext);\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: rest.value\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n var InputComponent = component || TextInput;\n // Grommet input components already check for FormContext\n // and, using their `name`, end up calling the useFormInput.setValue()\n // already. For custom components, we expect they will call\n // this onChange() and we'll call setValue() here, primarily\n // for backwards compatibility.\n var extraProps = isGrommetInput(InputComponent) ? {\n focusIndicator: false,\n onChange: _onChange,\n plain: true\n } : {\n value: value,\n onChange: function onChange(event) {\n setValue(event.value !== undefined ? event.value : event.target.value);\n if (_onChange) _onChange(event);\n }\n };\n return /*#__PURE__*/React.createElement(InputComponent, _extends({\n name: name,\n disabled: disabled,\n \"aria-invalid\": invalid || undefined\n }, rest, extraProps));\n};\nvar useDebounce = function useDebounce() {\n var _useState = useState(),\n func = _useState[0],\n setFunc = _useState[1];\n var theme = useContext(ThemeContext) || defaultProps.theme;\n useEffect(function () {\n var timer;\n if (func) timer = setTimeout(function () {\n return func();\n }, theme.global.debounceDelay);\n return function () {\n return clearTimeout(timer);\n };\n }, [func, theme.global.debounceDelay]);\n return setFunc;\n};\nvar FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {\n var children = _ref3.children,\n className = _ref3.className,\n component = _ref3.component,\n contentProps = _ref3.contentProps,\n disabled = _ref3.disabled,\n errorProp = _ref3.error,\n help = _ref3.help,\n htmlFor = _ref3.htmlFor,\n infoProp = _ref3.info,\n label = _ref3.label,\n margin = _ref3.margin,\n name = _ref3.name,\n _onBlur = _ref3.onBlur,\n onChange = _ref3.onChange,\n _onFocus = _ref3.onFocus,\n pad = _ref3.pad,\n required = _ref3.required,\n style = _ref3.style,\n validate = _ref3.validate,\n validateOn = _ref3.validateOn,\n rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var formContext = useContext(FormContext);\n var _formContext$useFormF = formContext.useFormField({\n disabled: disabled,\n error: errorProp,\n info: infoProp,\n name: name,\n required: required,\n validate: validate,\n validateOn: validateOn\n }),\n error = _formContext$useFormF.error,\n info = _formContext$useFormF.info,\n inForm = _formContext$useFormF.inForm,\n contextOnBlur = _formContext$useFormF.onBlur,\n contextOnChange = _formContext$useFormF.onChange;\n var formKind = formContext.kind;\n var _useState2 = useState(),\n focus = _useState2[0],\n setFocus = _useState2[1];\n var formFieldRef = useForwardedRef(ref);\n var formFieldTheme = theme.formField;\n var themeBorder = formFieldTheme.border;\n var debounce = useDebounce();\n var portalContext = useContext(PortalContext);\n\n // This is here for backwards compatibility. In case the child is a grommet\n // input component, set plain and focusIndicator props, if they aren't\n // already set.\n var wantContentPad = component && (component === CheckBox || component === CheckBoxGroup || component === RadioButtonGroup);\n var contents = themeBorder && children && Children.map(children, function (child) {\n if (child && child.type && grommetInputPadNames.indexOf(child.type.displayName) !== -1) {\n wantContentPad = true;\n }\n if (child && child.type && grommetInputNames.indexOf(child.type.displayName) !== -1 && child.props.plain === undefined && child.props.focusIndicator === undefined) {\n var _formFieldTheme$check;\n return /*#__PURE__*/cloneElement(child, {\n plain: true,\n focusIndicator: false,\n pad: 'CheckBox'.indexOf(child.type.displayName) !== -1 ? formFieldTheme == null || (_formFieldTheme$check = formFieldTheme.checkBox) == null ? void 0 : _formFieldTheme$check.pad : undefined\n });\n }\n return child;\n }) || children;\n\n // put rest on container, unless we use internal Input\n var containerRest = rest;\n if (inForm) {\n if (!contents) containerRest = {};\n contents = contents || /*#__PURE__*/React.createElement(Input, _extends({\n component: component,\n disabled: disabled,\n invalid: !!error,\n name: name,\n label: component === CheckBox ? label : undefined\n }, rest));\n }\n var themeContentProps = _extends({}, formFieldTheme.content);\n if (!pad && !wantContentPad) {\n themeContentProps.pad = undefined;\n }\n if (themeBorder && themeBorder.position === 'inner') {\n if (error && formFieldTheme.error) {\n themeContentProps.background = formFieldTheme.error.background;\n } else if (disabled && formFieldTheme.disabled) {\n themeContentProps.background = formFieldTheme.disabled.background;\n }\n }\n\n // fileinput handle\n // use fileinput plain use formfield to drive the border\n var isFileInputComponent;\n if (children && Children.forEach(children, function (child) {\n if (child && child.type && 'FileInput'.indexOf(child.type.displayName) !== -1) isFileInputComponent = true;\n })) ;\n if (component && component.displayName === 'FileInput' && !isFileInputComponent) {\n isFileInputComponent = true;\n }\n if (!themeBorder) {\n contents = /*#__PURE__*/React.createElement(Box, _extends({}, themeContentProps, contentProps), contents);\n }\n var borderColor;\n if (disabled && formFieldTheme.disabled.border && formFieldTheme.disabled.border.color) {\n borderColor = formFieldTheme.disabled.border.color;\n } else if (\n // backward compatibility check\n error && themeBorder && themeBorder.error.color || error && formFieldTheme.error && formFieldTheme.error.border) {\n if (themeBorder.error.color && formFieldTheme.error.border === undefined) {\n borderColor = themeBorder.error.color || 'status-critical';\n } else if (formFieldTheme.error.border && formFieldTheme.error.border.color) {\n borderColor = formFieldTheme.error.border.color || 'status-critical';\n }\n } else if (focus && formFieldTheme.focus && formFieldTheme.focus.border && formFieldTheme.focus.border.color) {\n borderColor = formFieldTheme.focus.border.color;\n } else {\n borderColor = themeBorder && themeBorder.color || 'border';\n }\n var labelStyle;\n if (formKind) {\n labelStyle = _extends({}, formFieldTheme[formKind].label);\n } else labelStyle = _extends({}, formFieldTheme.label);\n if (disabled) {\n labelStyle.color = formFieldTheme.disabled && formFieldTheme.disabled.label ? formFieldTheme.disabled.label.color : labelStyle.color;\n }\n var abut;\n var abutMargin;\n var outerStyle = style;\n\n // If fileinput is wrapped in a formfield we want to use\n // the border style from the fileInput.theme. We also do not\n // want the foocus around the formfield since the the focus\n // is on the anchor/button inside fileinput\n\n if (themeBorder) {\n var innerProps = themeBorder.position === 'inner' ? {\n border: _extends({}, themeBorder, {\n size: isFileInputComponent ? theme.fileInput.border.size : undefined,\n style: isFileInputComponent ? theme.fileInput.border.style : undefined,\n side: isFileInputComponent ? theme.fileInput.border.side : themeBorder.side || 'bottom',\n color: borderColor\n }),\n round: formFieldTheme.round,\n focus: isFileInputComponent ? undefined : focus\n } : {};\n contents = /*#__PURE__*/React.createElement(FormFieldContentBox, _extends({}, themeContentProps, innerProps, contentProps), contents);\n var mergedMargin = margin || formFieldTheme.margin;\n abut = themeBorder.position === 'outer' && (themeBorder.side === 'all' || themeBorder.side === 'horizontal' || !themeBorder.side) && !(mergedMargin && (typeof mergedMargin === 'string' && mergedMargin !== 'none' || mergedMargin.bottom && mergedMargin.bottom !== 'none' || mergedMargin.horizontal && mergedMargin.horizontal !== 'none'));\n if (abut) {\n // marginBottom is set to overlap adjacent fields\n abutMargin = {\n bottom: '-1px'\n };\n if (margin) {\n abutMargin = margin;\n } else if (themeBorder.size) {\n // if the user defines a margin,\n // then the default margin below will be overridden\n abutMargin = {\n bottom: \"-\" + parseMetricToNum(theme.global.borderSize[themeBorder.size] || themeBorder.size) + \"px\"\n };\n }\n outerStyle = _extends({\n position: focus ? 'relative' : undefined,\n zIndex: focus ? 10 : undefined\n }, style);\n }\n }\n var outerBackground;\n if (themeBorder && themeBorder.position === 'outer') {\n if (error && formFieldTheme.error && formFieldTheme.error.background) {\n outerBackground = formFieldTheme.error.background;\n } else if (focus && formFieldTheme.focus && formFieldTheme.focus.background && formFieldTheme.focus.background.color) {\n outerBackground = formFieldTheme.focus.background.color;\n } else if (disabled && formFieldTheme.disabled && formFieldTheme.disabled.background) {\n outerBackground = formFieldTheme.disabled.background;\n }\n }\n var outerProps = themeBorder && themeBorder.position === 'outer' ? {\n border: _extends({}, themeBorder, {\n color: borderColor\n }),\n round: formFieldTheme.round,\n focus: focus\n } : {};\n var requiredIndicator = theme.formField.label.requiredIndicator;\n if (requiredIndicator === true)\n // accessibility resource: https://www.deque.com/blog/anatomy-of-accessible-forms-required-form-fields/\n // this approach allows the required indicator to be hidden visually,\n // but present for assistive tech.\n // using aria-hidden so screen does not read out \"star\" and\n // just reads out \"required\"\n requiredIndicator = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RequiredText, {\n \"aria-hidden\": \"true\"\n }, \"*\"), /*#__PURE__*/React.createElement(ScreenReaderOnly, null, \"required\"));\n var showRequiredIndicator = required && requiredIndicator;\n if (typeof required === 'object' && required.indicator === false) showRequiredIndicator = false;\n return /*#__PURE__*/React.createElement(FormFieldBox, _extends({\n ref: formFieldRef,\n className: className,\n background: outerBackground,\n margin: abut ? abutMargin : margin || _extends({}, formFieldTheme.margin)\n }, outerProps, {\n style: outerStyle,\n onFocus: function onFocus(event) {\n var _formFieldRef$current;\n var root = (_formFieldRef$current = formFieldRef.current) == null ? void 0 : _formFieldRef$current.getRootNode();\n if (root) {\n setFocus(containsFocus(formFieldRef.current) && shouldKeepFocus(root));\n }\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n\n // if input has a drop and focus is within drop\n // prevent onBlur validation from running until\n // focus is no longer within the drop or input\n if (contextOnBlur && !formFieldRef.current.contains(event.relatedTarget) && !withinDropPortal(event.relatedTarget, portalContext)) {\n contextOnBlur(event);\n }\n if (_onBlur) _onBlur(event);\n },\n onChange: contextOnChange || onChange ? function (event) {\n event.persist();\n if (onChange) onChange(event);\n if (contextOnChange) debounce(function () {\n return function () {\n return contextOnChange(event);\n };\n });\n } : undefined\n }, containerRest), label && component !== CheckBox || help ? /*#__PURE__*/React.createElement(React.Fragment, null, label && component !== CheckBox && /*#__PURE__*/React.createElement(Text, _extends({\n as: \"label\",\n htmlFor: htmlFor\n }, labelStyle), label, showRequiredIndicator ? requiredIndicator : undefined), /*#__PURE__*/React.createElement(Message, _extends({\n message: help\n }, formFieldTheme.help))) : undefined, contents, /*#__PURE__*/React.createElement(Message, _extends({\n type: \"error\",\n message: error\n }, formFieldTheme.error)), /*#__PURE__*/React.createElement(Message, _extends({\n type: \"info\",\n message: info\n }, formFieldTheme.info)));\n});\nFormField.displayName = 'FormField';\nFormField.propTypes = FormFieldPropTypes;\nexport { FormField };","var _excluded = [\"color\", \"direction\", \"edge\", \"onDecrease\", \"onIncrease\", \"thickness\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Keyboard } from '../Keyboard';\nimport { focusStyle, normalizeColor, parseMetricToNum } from '../../utils';\nvar DIRECTION_PROPS = {\n horizontal: {\n cursor: 'col-resize',\n fill: 'vertical'\n },\n vertical: {\n cursor: 'row-resize',\n fill: 'horizontal'\n }\n};\nvar StyledBox = styled(Box).withConfig({\n displayName: \"EdgeControl__StyledBox\",\n componentId: \"sc-1xo2yt9-0\"\n})([\"\", \"\"], function (props) {\n return props.focus && focusStyle();\n});\nvar EdgeControl = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var color = _ref.color,\n direction = _ref.direction,\n edge = _ref.edge,\n onDecrease = _ref.onDecrease,\n onIncrease = _ref.onIncrease,\n thickness = _ref.thickness,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext);\n var _useState = useState(false),\n focus = _useState[0],\n setFocus = _useState[1];\n var _DIRECTION_PROPS$dire = DIRECTION_PROPS[direction],\n cursor = _DIRECTION_PROPS$dire.cursor,\n fill = _DIRECTION_PROPS$dire.fill;\n var size = parseMetricToNum(theme.global.spacing) / 2;\n var keyboardProps = direction === 'vertical' ? {\n onUp: onDecrease,\n onDown: onIncrease\n } : {\n onLeft: onDecrease,\n onRight: onIncrease\n };\n var boxDirection = direction === 'vertical' ? 'row' : 'column';\n var type = theme.rangeSelector && theme.rangeSelector.edge && theme.rangeSelector.edge.type || 'disc';\n var node;\n var backgroundColor = normalizeColor(color || 'control', theme);\n if (type === 'bar') {\n node = /*#__PURE__*/React.createElement(StyledBox, {\n flex: !thickness,\n justifySelf: \"stretch\",\n width: direction === 'vertical' ? thickness : size + \"px\",\n height: direction === 'vertical' ? size + \"px\" : thickness,\n background: backgroundColor,\n focus: focus\n });\n } else if (type === 'disc') {\n node = /*#__PURE__*/React.createElement(StyledBox, {\n width: size + \"px\",\n height: size + \"px\",\n round: \"full\",\n background: backgroundColor,\n focus: focus\n });\n } else {\n node = type;\n }\n return /*#__PURE__*/React.createElement(Keyboard, keyboardProps, /*#__PURE__*/React.createElement(Box, {\n direction: boxDirection,\n style: {\n flex: '0 0 1px'\n },\n overflow: \"visible\",\n align: \"center\",\n justify: \"center\",\n alignSelf: \"stretch\"\n }, /*#__PURE__*/React.createElement(Box, _extends({\n ref: ref,\n direction: boxDirection,\n justify: \"center\",\n align: \"center\",\n basis: \"full\",\n fill: fill,\n style: {\n cursor: cursor,\n outline: 'none',\n minWidth: size,\n minHeight: size,\n zIndex: 1\n },\n tabIndex: 0,\n onFocus: function onFocus() {\n return setFocus(true);\n },\n onBlur: function onBlur() {\n return setFocus(false);\n }\n }, rest), node)));\n});\nEdgeControl.displayName = 'EdgeControl';\nEdgeControl.defaultProps = {};\nObject.setPrototypeOf(EdgeControl.defaultProps, defaultProps);\nexport { EdgeControl };","import PropTypes from 'prop-types';\nimport { colorPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n color: colorPropType,\n defaultValues: PropTypes.arrayOf(PropTypes.number),\n direction: PropTypes.oneOf(['horizontal', 'vertical']),\n invert: PropTypes.bool,\n label: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n max: PropTypes.number,\n messages: PropTypes.shape({\n lower: PropTypes.string,\n upper: PropTypes.string\n }),\n min: PropTypes.number,\n onChange: PropTypes.func,\n opacity: PropTypes.oneOfType([PropTypes.oneOf(['weak', 'medium', 'strong']), PropTypes.string, PropTypes.bool]),\n round: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'full']), PropTypes.string]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'full']), PropTypes.string]),\n step: PropTypes.number,\n values: PropTypes.arrayOf(PropTypes.number)\n };\n}\nexport var RangeSelectorPropTypes = PropType;","var _excluded = [\"color\", \"defaultValues\", \"direction\", \"invert\", \"label\", \"max\", \"messages\", \"min\", \"name\", \"onChange\", \"opacity\", \"round\", \"size\", \"step\", \"values\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { Box } from '../Box';\nimport { EdgeControl } from './EdgeControl';\nimport { FormContext } from '../Form/FormContext';\nimport { Text } from '../Text';\nimport { parseMetricToNum } from '../../utils';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { RangeSelectorPropTypes } from './propTypes';\nvar Container = styled(Box).withConfig({\n displayName: \"RangeSelector__Container\",\n componentId: \"sc-siof5p-0\"\n})([\"user-select:none;\"]);\nvar RangeSelector = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var color = _ref.color,\n _ref$defaultValues = _ref.defaultValues,\n defaultValues = _ref$defaultValues === void 0 ? [] : _ref$defaultValues,\n _ref$direction = _ref.direction,\n direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction,\n invert = _ref.invert,\n label = _ref.label,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 100 : _ref$max,\n messages = _ref.messages,\n _ref$min = _ref.min,\n min = _ref$min === void 0 ? 0 : _ref$min,\n name = _ref.name,\n onChange = _ref.onChange,\n _ref$opacity = _ref.opacity,\n opacity = _ref$opacity === void 0 ? 'medium' : _ref$opacity,\n round = _ref.round,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 'medium' : _ref$size,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 1 : _ref$step,\n valuesProp = _ref.values,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var formContext = useContext(FormContext);\n var _useState = useState(),\n changing = _useState[0],\n setChanging = _useState[1];\n var _useState2 = useState(),\n lastChange = _useState2[0],\n setLastChange = _useState2[1];\n var _useState3 = useState(),\n moveValue = _useState3[0],\n setMoveValue = _useState3[1];\n var containerRef = useRef();\n var maxRef = useRef();\n var minRef = useRef();\n var labelWidthRef = useRef(0);\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n // ensure values are within min/max\n value: valuesProp == null ? void 0 : valuesProp.map(function (n) {\n return Math.min(max, Math.max(min, n));\n }),\n initialValue: defaultValues\n }),\n values = _formContext$useFormI[0],\n setValues = _formContext$useFormI[1];\n var change = useCallback(function (nextValues) {\n setValues(nextValues);\n if (onChange) onChange(nextValues);\n }, [onChange, setValues]);\n var valueForMouseCoord = useCallback(function (event) {\n var rect = containerRef.current.getBoundingClientRect();\n var value;\n if (direction === 'vertical') {\n // there is no x and y in unit testing\n var y = event.clientY - (rect.top || 0); // test resilience\n var scaleY = rect.height / (max - min + 1) || 1; // test resilience\n value = Math.floor(y / scaleY) + min;\n } else {\n var x = event.clientX - (rect.left || 0); // test resilience\n var scaleX = rect.width / (max - min + 1) || 1; // test resilience\n value = Math.floor(x / scaleX) + min;\n }\n // align with closest step within [min, max]\n var result = Math.ceil(value / step) * step;\n if (result < min) {\n return min;\n }\n if (result > max) {\n return max;\n }\n return result;\n }, [direction, max, min, step]);\n var onMouseMove = useCallback(function (event) {\n var value = valueForMouseCoord(event);\n var nextValues;\n if (changing === 'lower' && value <= values[1] && value !== moveValue) {\n nextValues = [value, values[1]];\n } else if (changing === 'upper' && value >= values[0] && value !== moveValue) {\n nextValues = [values[0], value];\n } else if (changing === 'selection' && value !== moveValue) {\n if (value === max) {\n nextValues = [max - (values[1] - values[0]), max];\n } else if (value === min) {\n nextValues = [min, min + (values[1] - values[0])];\n } else {\n var delta = value - moveValue;\n if (values[0] + delta >= min && values[1] + delta <= max) {\n nextValues = [values[0] + delta, values[1] + delta];\n }\n }\n }\n if (nextValues) {\n setMoveValue(value);\n change(nextValues);\n }\n }, [values, change, changing, moveValue, max, min, setMoveValue, valueForMouseCoord]);\n useEffect(function () {\n var onMouseUp = function onMouseUp() {\n return setChanging(undefined);\n };\n if (changing) {\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('mouseup', onMouseUp);\n return function () {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('mouseup', onMouseUp);\n };\n }\n return undefined;\n }, [changing, onMouseMove]);\n var onClick = useCallback(function (event) {\n var value = valueForMouseCoord(event);\n if (value <= values[0] || value < values[1] && lastChange === 'lower') {\n setLastChange('lower');\n change([value, values[1]]);\n } else if (value >= values[1] || value > values[0] && lastChange === 'upper') {\n setLastChange('upper');\n change([values[0], value]);\n }\n }, [change, lastChange, valueForMouseCoord, values]);\n var onTouchMove = useCallback(function (event) {\n var touchEvent = event.changedTouches[0];\n onMouseMove(touchEvent);\n }, [onMouseMove]);\n\n // keep the text values size consistent\n useLayoutEffect(function () {\n if (maxRef.current && minRef.current) {\n maxRef.current.style.width = '';\n minRef.current.style.width = '';\n var width = Math.max(labelWidthRef.current, maxRef.current.getBoundingClientRect().width, minRef.current.getBoundingClientRect().width);\n maxRef.current.style.width = width + \"px\";\n minRef.current.style.width = width + \"px\";\n labelWidthRef.current = width;\n }\n });\n var lower = values[0],\n upper = values[1];\n // It needs to be true when vertical, due to how browsers manage height\n // const fill = direction === 'vertical' ? true : 'horizontal';\n var thickness = size === 'full' ? undefined : parseMetricToNum(theme.global.edgeSize[size] || size) + \"px\";\n var layoutProps = {\n fill: direction,\n round: round\n };\n if (direction === 'vertical') layoutProps.width = thickness;else layoutProps.height = thickness;\n if (size === 'full') layoutProps.alignSelf = 'stretch';\n var content = /*#__PURE__*/React.createElement(Container, _extends({\n ref: containerRef,\n direction: direction === 'vertical' ? 'column' : 'row',\n align: \"center\",\n fill: true\n }, label ? {} : rest, {\n tabIndex: \"-1\",\n onClick: onClick,\n onTouchMove: onTouchMove\n }), /*#__PURE__*/React.createElement(Box, _extends({\n style: {\n flex: lower - min + \" 0 0\"\n },\n background: invert ?\n // preserve existing dark, instead of using darknes\n // of this color\n {\n color: color || theme.rangeSelector.background.invert.color,\n opacity: opacity,\n dark: theme.dark\n } : undefined\n }, layoutProps)), /*#__PURE__*/React.createElement(EdgeControl, {\n a11yTitle: format({\n id: 'rangeSelector.lower',\n messages: messages\n }),\n role: \"slider\",\n \"aria-valuenow\": lower,\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n tabIndex: 0,\n ref: ref,\n color: color,\n direction: direction,\n thickness: thickness,\n edge: \"lower\",\n onMouseDown: function onMouseDown() {\n return setChanging('lower');\n },\n onTouchStart: function onTouchStart() {\n return setChanging('lower');\n },\n onDecrease: lower - step >= min ? function () {\n return change([lower - step, upper]);\n } : undefined,\n onIncrease: lower + step <= upper ? function () {\n return change([lower + step, upper]);\n } : undefined\n }), /*#__PURE__*/React.createElement(Box, _extends({\n style: {\n flex: upper - lower + 1 + \" 0 0\",\n cursor: direction === 'vertical' ? 'ns-resize' : 'ew-resize'\n },\n background: invert ? undefined :\n // preserve existing dark, instead of using darknes of\n // this color\n {\n color: color || 'control',\n opacity: opacity,\n dark: theme.dark\n }\n }, layoutProps, {\n onMouseDown: function onMouseDown(event) {\n var nextMoveValue = valueForMouseCoord(event);\n setChanging('selection');\n setMoveValue(nextMoveValue);\n }\n })), /*#__PURE__*/React.createElement(EdgeControl, {\n a11yTitle: format({\n id: 'rangeSelector.upper',\n messages: messages\n }),\n role: \"slider\",\n \"aria-valuenow\": upper,\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n tabIndex: 0,\n color: color,\n direction: direction,\n thickness: thickness,\n edge: \"upper\",\n onMouseDown: function onMouseDown() {\n return setChanging('upper');\n },\n onTouchStart: function onTouchStart() {\n return setChanging('upper');\n },\n onDecrease: upper - step >= lower ? function () {\n return change([lower, upper - step]);\n } : undefined,\n onIncrease: upper + step <= max ? function () {\n return change([lower, upper + step]);\n } : undefined\n }), /*#__PURE__*/React.createElement(Box, _extends({\n style: {\n flex: max - upper + \" 0 0\"\n },\n background: invert ?\n // preserve existing dark, instead of using darknes of this\n // color\n {\n color: color || theme.rangeSelector.background.invert.color,\n opacity: opacity,\n dark: theme.dark\n } : undefined\n }, layoutProps, {\n round: round\n })));\n if (label) {\n content = /*#__PURE__*/React.createElement(Box, _extends({\n direction: direction === 'vertical' ? 'column' : 'row',\n align: \"center\",\n fill: true\n }, rest), /*#__PURE__*/React.createElement(Text, {\n ref: minRef,\n textAlign: \"end\",\n size: \"small\",\n margin: {\n horizontal: 'small'\n }\n }, typeof label === 'function' ? label(lower) : lower), content, /*#__PURE__*/React.createElement(Text, {\n ref: maxRef,\n size: \"small\",\n margin: {\n horizontal: 'small'\n }\n }, typeof label === 'function' ? label(upper) : upper));\n }\n return content;\n});\nRangeSelector.displayName = 'RangeSelector';\nRangeSelector.propTypes = RangeSelectorPropTypes;\nexport { RangeSelector };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n disabled: PropTypes.bool,\n dropAlign: PropTypes.shape({\n top: PropTypes.oneOf(['top', 'bottom']),\n bottom: PropTypes.oneOf(['top', 'bottom']),\n right: PropTypes.oneOf(['left', 'right']),\n left: PropTypes.oneOf(['left', 'right'])\n }),\n dropContent: PropTypes.element.isRequired,\n dropTarget: PropTypes.object,\n dropProps: PropTypes.object,\n onClose: PropTypes.func,\n onOpen: PropTypes.func,\n open: PropTypes.bool\n });\n}\nexport var DropButtonPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"onAlign\", \"disabled\", \"dropAlign\", \"dropProps\", \"dropContent\", \"dropTarget\", \"id\", \"open\", \"onClick\", \"onClose\", \"onOpen\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { Button } from '../Button';\nimport { Drop } from '../Drop';\nimport { useForwardedRef } from '../../utils';\nimport { DropButtonPropTypes } from './propTypes';\nvar defaultDropAlign = {\n top: 'top',\n left: 'left'\n};\nvar DropButton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref$a11yTitle = _ref.a11yTitle,\n a11yTitle = _ref$a11yTitle === void 0 ? 'Open Drop' : _ref$a11yTitle,\n onAlign = _ref.onAlign,\n disabled = _ref.disabled,\n _ref$dropAlign = _ref.dropAlign,\n dropAlign = _ref$dropAlign === void 0 ? defaultDropAlign : _ref$dropAlign,\n dropProps = _ref.dropProps,\n dropContent = _ref.dropContent,\n dropTarget = _ref.dropTarget,\n id = _ref.id,\n open = _ref.open,\n onClick = _ref.onClick,\n onClose = _ref.onClose,\n onOpen = _ref.onOpen,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var buttonRef = useForwardedRef(ref);\n var _useState = useState(),\n show = _useState[0],\n setShow = _useState[1];\n useEffect(function () {\n if (open !== undefined && open !== show) {\n setShow(open);\n }\n }, [open, show]);\n var onDropClose = useCallback(function (event) {\n // if the user has clicked on our Button, don't do anything here,\n // handle that in onClickInternal() below.\n var node = event.composed && event.composedPath()[0] || event.target;\n while (node && node !== document && !(node instanceof ShadowRoot) && node !== buttonRef.current) {\n node = node.parentNode;\n }\n if (node !== buttonRef.current) {\n // don't change internal state if caller is driving\n if (open === undefined) setShow(false);\n if (onClose) onClose(event);\n }\n }, [buttonRef, onClose, open]);\n var onClickInternal = useCallback(function (event) {\n if (!show) {\n setShow(true);\n if (onOpen) onOpen(event);\n } else {\n setShow(false);\n if (onClose) onClose(event);\n }\n if (onClick) onClick(event);\n }, [onClick, onClose, onOpen, show]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, _extends({\n id: id,\n ref: buttonRef,\n a11yTitle: a11yTitle,\n disabled: disabled\n }, rest, {\n onClick: onClickInternal\n })), show && buttonRef.current && /*#__PURE__*/React.createElement(Drop, _extends({\n id: id ? id + \"__drop\" : undefined,\n onAlign: onAlign,\n restrictFocus: true,\n align: dropAlign,\n target: dropTarget || buttonRef,\n onClickOutside: onDropClose,\n onEsc: onDropClose\n }, dropProps), dropContent));\n});\nDropButton.displayName = 'DropButton';\nDropButton.propTypes = DropButtonPropTypes;\nexport { DropButton };","import styled from 'styled-components';\nimport { Button } from '../Button';\nimport { DropButton } from '../DropButton';\nimport { TextInput } from '../TextInput';\nimport { getHoverIndicatorStyle, selectedStyle, controlBorderStyle, sizeStyle } from '../../utils';\nexport var StyledContainer = styled.div.withConfig({\n displayName: \"StyledSelect__StyledContainer\",\n componentId: \"sc-znp66n-0\"\n})([\"@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){width:100%;}\", \";\", \";\"], function (props) {\n return props.dropHeight ? sizeStyle('max-height', props.dropHeight, props.theme) : 'max-height: inherit;';\n}, function (props) {\n return props.theme.select.container && props.theme.select.container.extend;\n});\n\n// position relative is so scroll can be managed correctly\nexport var OptionsContainer = styled.div.withConfig({\n displayName: \"StyledSelect__OptionsContainer\",\n componentId: \"sc-znp66n-1\"\n})([\"position:relative;scroll-behavior:smooth;overflow:auto;outline:none;\"]);\nexport var HiddenInput = styled.input.withConfig({\n displayName: \"StyledSelect__HiddenInput\",\n componentId: \"sc-znp66n-2\"\n})([\"display:none;\"]);\nexport var SelectOption = styled(Button).withConfig({\n displayName: \"StyledSelect__SelectOption\",\n componentId: \"sc-znp66n-3\"\n})([\"\", \" \", \" &:focus{\", \"}display:block;width:100%;\", \";\"], function (props) {\n return props.selected && props.textComponent && selectedStyle;\n}, function (props) {\n return props.active && getHoverIndicatorStyle(!props.children && !props.theme.select.options ? undefined : 'background', props.theme);\n}, function (props) {\n return props.active && getHoverIndicatorStyle(!props.children && !props.theme.select.options ? undefined : 'background', props.theme);\n}, function (props) {\n return props[\"aria-disabled\"] && \"cursor: default\";\n});\nexport var SelectTextInput = styled(TextInput).withConfig({\n displayName: \"StyledSelect__SelectTextInput\",\n componentId: \"sc-znp66n-4\"\n})([\"cursor:\", \";\"], function (props) {\n return props.defaultCursor ? 'default' : 'pointer';\n});\nexport var StyledSelectDropButton = styled(DropButton).withConfig({\n displayName: \"StyledSelect__StyledSelectDropButton\",\n componentId: \"sc-znp66n-5\"\n})([\"\", \";\", \";\", \";\"], function (props) {\n return !props.plainSelect && controlBorderStyle;\n}, function (props) {\n var _props$theme$select;\n return (_props$theme$select = props.theme.select) == null || (_props$theme$select = _props$theme$select.control) == null ? void 0 : _props$theme$select.extend;\n}, function (props) {\n var _props$theme$select2;\n return props.open && ((_props$theme$select2 = props.theme.select) == null || (_props$theme$select2 = _props$theme$select2.control) == null ? void 0 : _props$theme$select2.open);\n});","import { useCallback } from 'react';\nimport { normalizeColor } from '../../utils';\nexport var applyKey = function applyKey(option, key) {\n if (option === undefined || option === null) return undefined;\n if (typeof key === 'object') return applyKey(option, key.key);\n if (typeof key === 'function') return key(option);\n if (key !== undefined && typeof option === 'object') return option[key];\n if (typeof option === 'object' && Object.keys(option)) return option[Object.keys(option)[0]];\n return option;\n};\nexport var getOptionLabel = function getOptionLabel(index, options, labelKey) {\n return applyKey(options[index], labelKey);\n};\nexport var getOptionValue = function getOptionValue(index, options, valueKey) {\n return applyKey(options[index], valueKey);\n};\nexport var getOptionIndex = function getOptionIndex(options, i, valueKey) {\n if (options) {\n if (typeof i === 'object') return options.findIndex(function (x) {\n return applyKey(x, valueKey) === applyKey(i, valueKey);\n });\n return options.indexOf(i);\n }\n return undefined;\n};\nexport var arrayIncludes = function arrayIncludes(arr, i, valueKey) {\n if (arr) {\n if (typeof i === 'object') return arr.some(function (x) {\n return applyKey(x, valueKey) === applyKey(i, valueKey);\n });\n return arr.includes(i);\n }\n return undefined;\n};\nexport var useDisabled = function useDisabled(disabled, disabledKey, options, valueKey) {\n return useCallback(function (index) {\n var option = options[index];\n var result;\n if (disabledKey) {\n result = applyKey(option, disabledKey);\n } else if (Array.isArray(disabled)) {\n if (typeof disabled[0] === 'number') {\n result = disabled.indexOf(index) !== -1;\n } else {\n var optionVal = getOptionValue(index, options, valueKey);\n result = getOptionIndex(disabled, options[index], valueKey) !== -1 || getOptionIndex(disabled, optionVal, valueKey) !== -1;\n }\n }\n return result;\n }, [disabled, disabledKey, options, valueKey]);\n};\nexport var getNormalizedValue = function getNormalizedValue(value, valueKey) {\n if (Array.isArray(value)) return value.map(function (v) {\n return valueKey && valueKey.reduce ? v : applyKey(v, valueKey);\n });\n return valueKey && valueKey.reduce ? value : applyKey(value, valueKey);\n};\nexport var changeEvent = function changeEvent(inputRef, nextValue) {\n // Calling set value function directly on input because React library\n // overrides setter `event.target.value =` and loses original event\n // target fidelity.\n // https://stackoverflow.com/a/46012210\n var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;\n nativeInputValueSetter.call(inputRef.current, nextValue);\n var event = new Event('input', {\n bubbles: true\n });\n inputRef.current.dispatchEvent(event);\n};\nexport var getSelectIcon = function getSelectIcon(icon, theme, open) {\n var SelectIcon;\n switch (icon) {\n case false:\n break;\n case true:\n case undefined:\n SelectIcon = open && theme.select.icons.up ? theme.select.icons.up : theme.select.icons.down;\n break;\n default:\n SelectIcon = icon;\n }\n return SelectIcon;\n};\n\n// if labelKey is a function and valueLabel is not defined\n// we should use the labelKey function to display the\n// selected value\nexport var getDisplayLabelKey = function getDisplayLabelKey(labelKey, allOptions, optionIndexesInValue, selectValue) {\n var optionLabelKey = applyKey(allOptions[optionIndexesInValue[0]], labelKey);\n if (!selectValue && optionIndexesInValue.length === 1 && typeof optionLabelKey === 'object') return optionLabelKey;\n return undefined;\n};\nexport var getIconColor = function getIconColor(theme) {\n return normalizeColor(theme.select.icons.color || 'control', theme);\n};","import React, { useCallback, useEffect, useState } from 'react';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { CheckBox } from '../CheckBox';\nimport { SelectOption } from '../Select/StyledSelect';\nimport { applyKey, getOptionLabel, useDisabled, arrayIncludes, getOptionIndex } from '../Select/utils';\nvar SelectMultipleValue = function SelectMultipleValue(_ref) {\n var allOptions = _ref.allOptions,\n children = _ref.children,\n disabled = _ref.disabled,\n disabledKey = _ref.disabledKey,\n dropButtonRef = _ref.dropButtonRef,\n labelKey = _ref.labelKey,\n onRequestOpen = _ref.onRequestOpen,\n onSelectChange = _ref.onSelectChange,\n theme = _ref.theme,\n value = _ref.value,\n valueKey = _ref.valueKey;\n var _useState = useState(false),\n showA11yDiv = _useState[0],\n setShowA11yDiv = _useState[1];\n var isDisabled = useDisabled(disabled, disabledKey, allOptions, valueKey || labelKey);\n var visibleValue = useCallback(function (i) {\n var optionValue = valueKey && valueKey.reduce ? applyKey(i, valueKey) : i;\n var optionSelected = arrayIncludes(value, optionValue, valueKey || labelKey);\n var indexOptions = getOptionIndex(allOptions, i, valueKey || labelKey);\n var optionLabel = getOptionLabel(indexOptions, allOptions, labelKey || valueKey);\n var optionDisabled = isDisabled(indexOptions);\n var valueIndex = getOptionIndex(value, optionValue, valueKey || labelKey);\n if (valueIndex < theme.selectMultiple.maxInline) {\n var child;\n if (children) {\n child = children(i, indexOptions, allOptions, {\n active: false,\n disabled: optionDisabled,\n selected: true\n });\n }\n return /*#__PURE__*/React.createElement(SelectOption, {\n role: \"option\",\n a11yTitle: optionSelected ? optionLabel + \" selected\" : optionLabel + \" not selected\",\n \"aria-setsize\": value.length,\n \"aria-posinset\": valueIndex + 1,\n \"aria-selected\": optionSelected,\n \"aria-disabled\": optionDisabled,\n plain: true,\n hoverIndicator: !optionDisabled,\n fill: \"horizontal\",\n tabIndex: \"0\",\n onClick: function onClick(event) {\n if (!optionDisabled) {\n var intermediate = [].concat(value);\n if (arrayIncludes(intermediate, optionValue, valueKey || labelKey)) {\n onSelectChange(event, {\n option: optionValue,\n value: intermediate.filter(function (v) {\n return typeof v === 'object' ? applyKey(v, valueKey || labelKey) !== applyKey(optionValue, valueKey || labelKey) : v !== optionValue;\n })\n });\n if (valueIndex !== intermediate.length - 1) {\n setTimeout(function () {\n var nextFocus = document.getElementById(\"selected-\" + intermediate[valueIndex + 1]);\n if (nextFocus) nextFocus.focus();\n var result = intermediate[valueIndex + 1];\n setShowA11yDiv(\"Unselected \" + optionLabel + \". \\n Focus moved to \" + getOptionLabel(getOptionIndex(allOptions, result, valueKey || labelKey), allOptions, labelKey || valueKey));\n }, 200); // Timeout needed to allow screen reader\n // time to announce and next item to display on\n // screen. Based on testing, 200ms is enough time\n } else if (intermediate.length !== 1) {\n setTimeout(function () {\n var nextFocus = document.getElementById(\"selected-\" + intermediate[valueIndex - 1]);\n if (nextFocus) nextFocus.focus();\n var result = intermediate[valueIndex - 1];\n setShowA11yDiv(\"Unselected \" + optionLabel + \". Focus moved to \\n \" + getOptionLabel(getOptionIndex(allOptions, result, valueKey || labelKey), allOptions, labelKey || valueKey));\n }, 200); // Timeout needed to allow screen reader\n // time to announce and next item to display on\n // screen. Based on testing, 200ms is enough time\n } else if (dropButtonRef.current) dropButtonRef.current.focus();\n }\n }\n },\n key: optionLabel,\n id: \"selected-\" + optionValue\n }, child || /*#__PURE__*/React.createElement(CheckBox, {\n disabled: optionDisabled,\n label: /*#__PURE__*/React.createElement(Box, {\n alignSelf: \"center\",\n align: \"start\"\n }, optionLabel),\n key: optionLabel,\n pad: \"xsmall\",\n tabIndex: \"-1\",\n checked: optionSelected\n }));\n }\n return undefined;\n }, [valueKey, allOptions, children, dropButtonRef, isDisabled, labelKey, onSelectChange, value, theme.selectMultiple.maxInline]);\n\n // After announcing set showA11yDiv to undefined so it won't\n // be read out again\n useEffect(function () {\n if (showA11yDiv !== undefined) {\n setTimeout(function () {\n setShowA11yDiv(undefined);\n }, 1000);\n }\n }, [showA11yDiv]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {\n width: \"100%\",\n role: \"listbox\",\n \"aria-multiselectable\": true,\n a11yTitle: \"Selected Options\"\n }, value && allOptions.filter(function (i) {\n return arrayIncludes(value, valueKey && valueKey.reduce ? applyKey(i, valueKey) : i, valueKey || labelKey);\n })\n /* eslint-disable-next-line array-callback-return, \n consistent-return */.map(function (i) {\n return visibleValue(i);\n }), showA11yDiv && /*#__PURE__*/React.createElement(Box, {\n height: \"0px\",\n width: \"0px\",\n overflow: \"hidden\"\n // announce when an item is removed from selected options\n ,\n \"aria-live\": \"assertive\",\n role: \"alert\"\n }, showA11yDiv)), value && value.length > theme.selectMultiple.maxInline && /*#__PURE__*/React.createElement(Box, {\n pad: {\n horizontal: 'small',\n bottom: 'small',\n top: 'xsmall'\n },\n alignSelf: \"start\"\n }, /*#__PURE__*/React.createElement(Button, {\n onClick: onRequestOpen,\n size: \"small\",\n label: \"+ \" + (value.length - theme.selectMultiple.maxInline) + \" more\"\n })));\n};\nexport { SelectMultipleValue };","import React, { useCallback } from 'react';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Text } from '../Text';\nimport { applyKey, getOptionValue, useDisabled, arrayIncludes } from '../Select/utils';\nvar SelectionSummary = function SelectionSummary(_ref) {\n var allOptions = _ref.allOptions,\n clearRef = _ref.clearRef,\n disabled = _ref.disabled,\n disabledKey = _ref.disabledKey,\n isSelected = _ref.isSelected,\n labelKey = _ref.labelKey,\n limit = _ref.limit,\n onChange = _ref.onChange,\n onMore = _ref.onMore,\n options = _ref.options,\n search = _ref.search,\n setActiveIndex = _ref.setActiveIndex,\n showSelectedInline = _ref.showSelectedInline,\n value = _ref.value,\n valueKey = _ref.valueKey;\n var isDisabled = useDisabled(disabled, disabledKey, options, valueKey || labelKey);\n var selectedValuesDisabled = useCallback(function () {\n var disabledSelected = 0;\n if (value) {\n for (var i = 0; i < allOptions.length; i += 1) {\n if (arrayIncludes(value, getOptionValue(i, options, valueKey || labelKey), valueKey || labelKey) && isDisabled(i)) disabledSelected += 1;\n }\n if (value.length === disabledSelected) return true;\n }\n return false;\n }, [value, allOptions, options, valueKey, labelKey, isDisabled]);\n var selectedInSearch = useCallback(function () {\n return options == null ? void 0 : options.filter(function (option) {\n return arrayIncludes(value, option, valueKey || labelKey);\n });\n }, [options, value, valueKey, labelKey]);\n var showSelectAll = !!((value == null ? void 0 : value.length) === 0 || selectedValuesDisabled() || !value || selectedInSearch().length === 0);\n var summaryText = (value == null ? void 0 : value.length) === 0 || onMore || !value || search !== '' && search !== undefined ? ((value == null ? void 0 : value.length) || 0) + \" selected\" : ((value == null ? void 0 : value.length) || 0) + \" selected of \" + options.length;\n var summaryButtonClick = function summaryButtonClick(event) {\n if (onChange) {\n var nextSelected = options.filter(function (i, index) {\n return showSelectAll ? !isDisabled(index) || isSelected(index) : isDisabled(index) && isSelected(index);\n });\n if (search !== '' && search !== undefined && value) {\n if (showSelectAll) {\n nextSelected = nextSelected.concat(value);\n } else {\n value.forEach(function (item) {\n if (!arrayIncludes(options, item, valueKey || labelKey)) {\n nextSelected.push(item);\n }\n });\n }\n }\n var nextValue = nextSelected.map(function (i) {\n return valueKey && valueKey.reduce ? applyKey(i, valueKey) : i;\n });\n onChange(event, {\n option: options,\n value: nextValue,\n selected: nextSelected\n });\n }\n if (limit && !showSelectAll) setActiveIndex(0);\n };\n return /*#__PURE__*/React.createElement(Box, {\n pad: showSelectedInline ? {\n left: 'xsmall',\n vertical: 'xsmall'\n } : 'xsmall',\n direction: \"row\",\n justify: \"between\",\n gap: \"small\",\n fill: \"horizontal\",\n flex: showSelectedInline,\n align: \"center\",\n height: {\n min: 'xxsmall'\n }\n }, /*#__PURE__*/React.createElement(Text, {\n size: \"small\"\n }, summaryText), (options.length && (!limit || !(!value || (value == null ? void 0 : value.length) === 0 && selectedValuesDisabled()))) > 0 && (!onMore || onMore && (value == null ? void 0 : value.length) !== 0) && /*#__PURE__*/React.createElement(Button, {\n a11yTitle: showSelectAll ? \"Select all \" + options.length + \" options\" : (value == null ? void 0 : value.length) + \" options selected. Clear all?\",\n label: showSelectAll ? 'Select All' : 'Clear All',\n onClick: function onClick(event) {\n return summaryButtonClick(event);\n },\n onFocus: function onFocus() {\n return setActiveIndex(-1);\n },\n ref: clearRef\n }));\n};\nexport { SelectionSummary };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from 'react';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nexport var EmptySearchOption = function EmptySearchOption(_ref) {\n var _theme$select, _theme$select2, _theme$select3;\n var emptySearchMessage = _ref.emptySearchMessage,\n selectOptionsStyle = _ref.selectOptionsStyle,\n theme = _ref.theme;\n return /*#__PURE__*/React.createElement(Box, (theme == null || (_theme$select = theme.select) == null || (_theme$select = _theme$select.emptySearchMessage) == null ? void 0 : _theme$select.container) || selectOptionsStyle, /*#__PURE__*/React.createElement(Text, _extends({\n \"aria-live\": \"polite\",\n role: \"alert\"\n }, (theme == null || (_theme$select2 = theme.select) == null || (_theme$select2 = _theme$select2.emptySearchMessage) == null ? void 0 : _theme$select2.text) || ((_theme$select3 = theme.select) == null || (_theme$select3 = _theme$select3.options) == null ? void 0 : _theme$select3.text)), emptySearchMessage));\n};","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { setFocusWithoutScroll } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { CheckBox } from '../CheckBox';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { Keyboard } from '../Keyboard';\nimport { Text } from '../Text';\nimport { TextInput } from '../TextInput';\nimport { SelectionSummary } from './SelectionSummary';\nimport { StyledContainer, OptionsContainer, SelectOption } from '../Select/StyledSelect';\nimport { applyKey, getOptionLabel, getOptionValue, useDisabled, getOptionIndex, arrayIncludes } from '../Select/utils';\nimport { EmptySearchOption } from '../Select/EmptySearchOption';\nvar SelectMultipleContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _optionsRef$current;\n var allOptions = _ref.allOptions,\n _ref$children = _ref.children,\n children = _ref$children === void 0 ? null : _ref$children,\n disabledProp = _ref.disabled,\n disabledKey = _ref.disabledKey,\n dropHeight = _ref.dropHeight,\n _ref$emptySearchMessa = _ref.emptySearchMessage,\n emptySearchMessage = _ref$emptySearchMessa === void 0 ? 'No matches found' : _ref$emptySearchMessa,\n help = _ref.help,\n icon = _ref.icon,\n id = _ref.id,\n labelKey = _ref.labelKey,\n limit = _ref.limit,\n onChange = _ref.onChange,\n onClose = _ref.onClose,\n onKeyDown = _ref.onKeyDown,\n onMore = _ref.onMore,\n onSearch = _ref.onSearch,\n optionIndexesInValue = _ref.optionIndexesInValue,\n options = _ref.options,\n _ref$replace = _ref.replace,\n replace = _ref$replace === void 0 ? true : _ref$replace,\n searchPlaceholder = _ref.searchPlaceholder,\n search = _ref.search,\n setSearch = _ref.setSearch,\n usingKeyboard = _ref.usingKeyboard,\n _ref$value = _ref.value,\n value = _ref$value === void 0 ? [] : _ref$value,\n valueKey = _ref.valueKey,\n showSelectedInline = _ref.showSelectedInline;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(-1),\n activeIndex = _useState[0],\n setActiveIndex = _useState[1];\n var _useState2 = useState(usingKeyboard),\n keyboardNavigation = _useState2[0],\n setKeyboardNavigation = _useState2[1];\n var searchRef = useRef();\n var optionsRef = useRef();\n var _useState3 = useState(disabledProp),\n disabled = _useState3[0],\n setDisabled = _useState3[1];\n var activeRef = useRef();\n var _useState4 = useState(),\n showA11yLimit = _useState4[0],\n setShowA11yLimit = _useState4[1];\n var clearRef = useRef();\n var isDisabled = useDisabled(disabled, disabledKey, options, valueKey || labelKey);\n\n // for keyboard/screenreader, keep the active option in focus\n useEffect(function () {\n var _activeRef$current;\n if (activeIndex) (_activeRef$current = activeRef.current) == null ? void 0 : _activeRef$current.focus();\n }, [activeIndex]);\n\n // set initial focus\n useEffect(function () {\n // need to wait for Drop to be ready\n var timer = setTimeout(function () {\n var clearButton = clearRef.current;\n if (clearButton && clearButton.focus) {\n setFocusWithoutScroll(clearButton);\n } else if (searchRef && searchRef.current) {\n var searchInput = searchRef.current;\n if (searchInput && searchInput.focus) {\n setFocusWithoutScroll(searchInput);\n }\n } else if (activeRef.current) {\n setFocusWithoutScroll(activeRef.current);\n } else if (optionsRef.current) {\n setActiveIndex(0);\n }\n }, 100); // Drop should be open after 100ms\n return function () {\n return clearTimeout(timer);\n };\n }, []);\n useEffect(function () {\n var optionsNode = optionsRef.current;\n if (optionsNode != null && optionsNode.children) {\n var optionNode = optionsNode.children[activeIndex];\n if (optionNode) optionNode.focus();\n }\n }, [activeIndex]);\n var isSelected = useCallback(function (index) {\n var result;\n var optionVal = getOptionValue(index, options, valueKey || labelKey);\n if (value) {\n if (value.length === 0) {\n result = false;\n } else if (typeof value[0] !== 'object') {\n result = value.indexOf(optionVal) !== -1;\n } else if (valueKey) {\n result = value.some(function (valueItem) {\n var valueValue = typeof valueKey === 'function' ? valueKey(valueItem) : valueItem[valueKey];\n return valueValue === optionVal;\n });\n }\n }\n return result;\n }, [value, valueKey, options, labelKey]);\n var selectOption = useCallback(function (index) {\n return function (event) {\n if (onChange) {\n var nextOptionIndexesInValue = optionIndexesInValue.slice(0);\n var allOptionsIndex = getOptionIndex(allOptions, options[index], valueKey || labelKey);\n var valueIndex = optionIndexesInValue.indexOf(allOptionsIndex);\n if (valueIndex === -1 && (!limit || (value == null ? void 0 : value.length) < limit)) {\n nextOptionIndexesInValue.push(allOptionsIndex);\n } else {\n nextOptionIndexesInValue.splice(valueIndex, 1);\n }\n var nextValue = nextOptionIndexesInValue.map(function (i) {\n return valueKey && valueKey.reduce ? applyKey(allOptions[i], valueKey) : allOptions[i];\n });\n var nextSelected = nextOptionIndexesInValue;\n onChange(event, {\n option: options[index],\n value: nextValue,\n selected: nextSelected\n });\n }\n };\n }, [labelKey, limit, onChange, optionIndexesInValue, options, allOptions, valueKey, value]);\n var onNextOption = useCallback(function (event) {\n event.preventDefault();\n var nextActiveIndex = activeIndex + 1;\n if (nextActiveIndex !== (options == null ? void 0 : options.length)) {\n setActiveIndex(nextActiveIndex);\n setKeyboardNavigation(true);\n }\n }, [activeIndex, options]);\n var onPreviousOption = useCallback(function (event) {\n event.preventDefault();\n var nextActiveIndex = activeIndex - 1;\n if (nextActiveIndex === -1) {\n var searchInput = searchRef.current;\n if (searchInput && searchInput.focus) {\n setActiveIndex(nextActiveIndex);\n setFocusWithoutScroll(searchInput);\n }\n }\n if (nextActiveIndex >= 0) {\n setActiveIndex(nextActiveIndex);\n setKeyboardNavigation(true);\n }\n }, [activeIndex]);\n var onKeyDownOption = useCallback(function (event) {\n if (!onSearch) {\n var nextActiveIndex = options.findIndex(function (e) {\n var label;\n if (typeof e === 'object') {\n label = e.label || applyKey(e, labelKey);\n } else {\n label = e;\n }\n return typeof label === 'string' && label.charAt(0).toLowerCase() === event.key.toLowerCase();\n });\n if (nextActiveIndex >= 0) {\n event.preventDefault();\n setActiveIndex(nextActiveIndex);\n setKeyboardNavigation(true);\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n }, [onKeyDown, options, onSearch, labelKey]);\n var onActiveOption = useCallback(function (index) {\n return function () {\n if (!keyboardNavigation) setActiveIndex(index);\n };\n }, [keyboardNavigation]);\n var onSelectOption = useCallback(function (event) {\n if (!isDisabled(activeIndex) && activeIndex >= 0 && activeIndex < (options == null ? void 0 : options.length)) {\n event.preventDefault(); // prevent submitting forms\n selectOption(activeIndex)(event);\n }\n }, [activeIndex, selectOption, options, isDisabled]);\n var customSearchInput = theme.select.searchInput;\n var SelectTextInput = customSearchInput || TextInput;\n var selectOptionsStyle = theme.select.options ? _extends({}, theme.select.options.box, theme.select.options.container) : {};\n\n // handle when limit is reached\n useEffect(function () {\n var originallyDisabled = function originallyDisabled(index) {\n var option = allOptions[index];\n var result;\n if (disabledKey) {\n result = applyKey(option, disabledKey);\n } else if (Array.isArray(disabledProp)) {\n if (typeof disabledProp[0] === 'number') {\n result = disabledProp.indexOf(index) !== -1;\n } else {\n result = getOptionIndex(disabledProp, getOptionValue(index, options, valueKey || labelKey), valueKey || labelKey) !== -1;\n }\n }\n return result;\n };\n if (value && limit) {\n if (value.length === limit) {\n var newDisabled = [].concat(disabledProp);\n // disable everything that is not selected\n for (var i = 0; i < (options == null ? void 0 : options.length); i += 1) {\n if (!isSelected(i) && !originallyDisabled(i)) {\n newDisabled.push(options[i]);\n }\n }\n if (usingKeyboard) setShowA11yLimit('Selected. Maximum selection limit reached.');\n setDisabled(newDisabled);\n } else {\n if (usingKeyboard) setShowA11yLimit(undefined);\n setDisabled(disabledProp);\n }\n }\n }, [isSelected, value, limit, disabledProp, allOptions, disabledKey, labelKey, options, usingKeyboard, valueKey]);\n\n // reset showA11yLimit after announcement is read\n useEffect(function () {\n if (showA11yLimit !== undefined) {\n setTimeout(function () {\n setShowA11yLimit(undefined);\n }, 2000); // value chosen based on length of a11yLimit message\n }\n }, [showA11yLimit]);\n var summaryContent = /*#__PURE__*/React.createElement(SelectionSummary, {\n allOptions: allOptions,\n clearRef: clearRef,\n disabled: disabled,\n disabledKey: disabledKey,\n isSelected: isSelected,\n labelKey: labelKey,\n limit: limit,\n onChange: onChange,\n onMore: onMore,\n options: options,\n search: search,\n setActiveIndex: setActiveIndex,\n showSelectedInline: showSelectedInline,\n value: value,\n valueKey: valueKey\n });\n var helpContent;\n if (help) {\n if (typeof help === 'string') helpContent = /*#__PURE__*/React.createElement(Box, {\n flex: false,\n pad: \"xsmall\"\n }, /*#__PURE__*/React.createElement(Text, {\n size: \"small\"\n }, help));else helpContent = /*#__PURE__*/React.createElement(Box, {\n flex: false\n }, help);\n }\n if (showSelectedInline) summaryContent = /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n justify: \"between\",\n flex: false\n }, summaryContent, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Button, {\n fill: \"vertical\",\n onClick: onClose,\n a11yTitle: \"Close Select\"\n }, icon)));\n return /*#__PURE__*/React.createElement(Keyboard, {\n onEnter: onSelectOption,\n onSpace: onSelectOption,\n onUp: onPreviousOption,\n onDown: onNextOption,\n onKeyDown: onKeyDownOption,\n onEsc: onClose\n }, /*#__PURE__*/React.createElement(StyledContainer, {\n ref: ref,\n as: Box,\n id: id ? id + \"__select-drop\" : undefined,\n dropHeight: dropHeight,\n a11yTitle: \"Select dropdown\"\n }, summaryContent, onSearch && /*#__PURE__*/React.createElement(Box, {\n pad: !customSearchInput ? 'xsmall' : undefined,\n flex: false\n }, /*#__PURE__*/React.createElement(Keyboard, {\n onEnter: function onEnter(event) {\n onNextOption(event);\n }\n }, /*#__PURE__*/React.createElement(SelectTextInput, {\n a11yTitle: \"Search to filter options.\",\n focusIndicator: !customSearchInput,\n size: \"small\",\n ref: searchRef,\n type: \"search\",\n value: search || '',\n placeholder: searchPlaceholder,\n onChange: function onChange(event) {\n var nextSearch = event.target.value;\n setSearch(nextSearch);\n setActiveIndex(-1);\n onSearch(nextSearch);\n }\n }))), helpContent, (options == null ? void 0 : options.length) > 0 ? /*#__PURE__*/React.createElement(OptionsContainer, {\n role: \"listbox\",\n tabIndex: \"0\",\n ref: optionsRef,\n \"aria-multiselectable\": true,\n onMouseMove: function onMouseMove() {\n return setKeyboardNavigation(false);\n },\n \"aria-activedescendant\": optionsRef == null || (_optionsRef$current = optionsRef.current) == null ? void 0 : _optionsRef$current.children[activeIndex]\n }, /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: options,\n step: theme.select.step,\n onMore: onMore,\n replace: replace,\n show: activeIndex !== -1 ? activeIndex : undefined\n }, function (option, index, optionRef) {\n var optionDisabled = isDisabled(index);\n var optionSelected = value ? arrayIncludes(value, valueKey && valueKey.reduce ? applyKey(option, valueKey) : option, valueKey || labelKey) : false;\n var optionActive = activeIndex === index;\n var optionLabel = getOptionLabel(index, options, labelKey || valueKey);\n\n // Determine whether the label is done as a child or\n // as an option Button kind property.\n var child;\n var textComponent = false;\n if (children) {\n child = children(option, index, options, {\n active: optionActive,\n disabled: optionDisabled,\n selected: optionSelected\n });\n if (typeof child === 'string' || child.props && child.props.children && typeof child.props.children === 'string') textComponent = true;\n } else {\n child = /*#__PURE__*/React.createElement(CheckBox, {\n label: /*#__PURE__*/React.createElement(Box, {\n alignSelf: \"center\",\n width: \"100%\",\n align: \"start\"\n }, optionLabel),\n pad: \"xsmall\",\n tabIndex: \"-1\",\n checked: optionSelected,\n disabled: optionDisabled\n });\n }\n if (!children && search) {\n var searchText = search.toLowerCase();\n if (typeof optionLabel === 'string' && optionLabel.toLowerCase().indexOf(searchText) >= 0) {\n // code to bold search term in matching options\n var boldIndex = optionLabel.toLowerCase().indexOf(searchText);\n var childBeginning = optionLabel.substring(0, boldIndex);\n var childBold = optionLabel.substring(boldIndex, boldIndex + searchText.length);\n childBold = /*#__PURE__*/React.createElement(\"b\", null, childBold);\n var childEnd = optionLabel.substring(boldIndex + searchText.length);\n child = /*#__PURE__*/React.createElement(CheckBox, {\n label: /*#__PURE__*/React.createElement(Box, {\n alignSelf: \"center\",\n width: \"100%\",\n align: \"start\",\n direction: \"row\"\n }, /*#__PURE__*/React.createElement(Text, null, childBeginning, childBold, childEnd)),\n pad: \"xsmall\",\n tabIndex: \"-1\",\n checked: optionSelected,\n disabled: optionDisabled\n });\n }\n }\n\n // if we have a child, turn on plain, and hoverIndicator\n return /*#__PURE__*/React.createElement(SelectOption, {\n a11yTitle: optionSelected ? optionLabel + \" selected\" : optionLabel + \" not selected\"\n // eslint-disable-next-line react/no-array-index-key\n ,\n key: index\n // merge optionRef and activeRef\n ,\n ref: function ref(node) {\n // eslint-disable-next-line no-param-reassign\n if (optionRef) optionRef.current = node;\n if (optionActive) activeRef.current = node;\n },\n tabIndex: optionSelected ? '0' : '-1',\n role: \"option\",\n id: \"option\" + index,\n \"aria-setsize\": options.length,\n \"aria-posinset\": index + 1,\n \"aria-selected\": optionSelected,\n focusIndicator: false,\n \"aria-disabled\": optionDisabled || undefined,\n plain: !child ? undefined : true,\n align: \"start\",\n kind: !child ? 'option' : undefined,\n active: optionActive,\n selected: optionSelected,\n onMouseOver: !optionDisabled ? onActiveOption(index) : undefined,\n onClick: !optionDisabled ? selectOption(index) : undefined,\n onFocus: function onFocus() {\n return setActiveIndex(index);\n },\n textComponent: textComponent\n }, child);\n })) : /*#__PURE__*/React.createElement(EmptySearchOption, {\n emptySearchMessage: emptySearchMessage,\n selectOptionsStyle: selectOptionsStyle,\n theme: theme\n }), usingKeyboard && showA11yLimit && /*#__PURE__*/React.createElement(Box, {\n height: \"0px\",\n width: \"0px\",\n overflow: \"hidden\"\n // announce when we reach the limit of items\n // that can be selected\n ,\n \"aria-live\": \"assertive\",\n role: \"alert\"\n }, showA11yLimit)));\n});\nexport { SelectMultipleContainer };","var _excluded = [\"disabled\", \"id\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef } from 'react';\nimport { SelectTextInput } from './StyledSelect';\nexport var DefaultSelectTextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var disabled = _ref.disabled,\n id = _ref.id,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(SelectTextInput\n // When Select is disabled, we want to show a default cursor\n // but not have disabled styling come from TextInput\n // Disabled can be a bool or an array of options to disable.\n // We only want to disable the TextInput if the control\n // button should be disabled which occurs when disabled\n // equals true.\n , _extends({\n defaultCursor: disabled === true || undefined,\n focusIndicator: false,\n id: id ? id + \"__input\" : undefined,\n ref: ref\n }, rest, {\n tabIndex: \"-1\",\n type: \"text\",\n plain: true,\n readOnly: true\n }));\n});","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nexport var genericSelectProps = _extends({}, genericProps, {\n children: PropTypes.func,\n disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object]))]),\n disabledKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n dropAlign: PropTypes.shape({\n top: PropTypes.oneOf(['top', 'bottom']),\n bottom: PropTypes.oneOf(['top', 'bottom']),\n right: PropTypes.oneOf(['left', 'right']),\n left: PropTypes.oneOf(['left', 'right'])\n }),\n dropHeight: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n dropTarget: PropTypes.object,\n dropProps: PropTypes.object,\n emptySearchMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n focusIndicator: PropTypes.bool,\n icon: PropTypes.oneOfType([PropTypes.bool, PropTypes.func, PropTypes.node, PropTypes.elementType]),\n labelKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n messages: PropTypes.shape({\n multiple: PropTypes.string\n }),\n name: PropTypes.string,\n onChange: PropTypes.func,\n onClose: PropTypes.func,\n onOpen: PropTypes.func,\n onSearch: PropTypes.func,\n onMore: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool, PropTypes.element, PropTypes.object])).isRequired,\n open: PropTypes.bool,\n placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.node]),\n plain: PropTypes.bool,\n replace: PropTypes.bool,\n searchPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.node]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n valueLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n valueKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({\n key: PropTypes.string,\n reduce: PropTypes.bool\n })])\n});\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericSelectProps, {\n clear: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n position: PropTypes.oneOf(['top', 'bottom']),\n label: PropTypes.string\n })]),\n closeOnChange: PropTypes.bool,\n defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.number]))]),\n multiple: PropTypes.bool,\n selected: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.element,\n // deprecated, use valueLabel\n PropTypes.object, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.number]))])\n });\n}\nexport var SelectPropTypes = PropType;","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericSelectProps } from '../Select/propTypes';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericSelectProps, {\n defaultValue: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.number])),\n help: PropTypes.node,\n limit: PropTypes.number,\n value: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.number])),\n showSelectedInline: PropTypes.bool,\n sortSelectedOnClose: PropTypes.bool\n });\n}\nexport var SelectMultiplePropTypes = PropType;","var _excluded = [\"a11yTitle\", \"aria-label\", \"alignSelf\", \"children\", \"defaultValue\", \"disabled\", \"disabledKey\", \"dropAlign\", \"dropHeight\", \"dropProps\", \"dropTarget\", \"emptySearchMessage\", \"focusIndicator\", \"gridArea\", \"help\", \"id\", \"icon\", \"labelKey\", \"limit\", \"margin\", \"messages\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onClose\", \"onFocus\", \"onKeyDown\", \"onMore\", \"onOpen\", \"onSearch\", \"open\", \"options\", \"placeholder\", \"plain\", \"replace\", \"searchPlaceholder\", \"size\", \"sortSelectedOnClose\", \"value\", \"valueKey\", \"valueLabel\", \"showSelectedInline\", \"width\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, isValidElement, useCallback, useContext, useMemo, useState, useRef, useEffect } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { controlBorderStyle, useKeyboard, useForwardedRef } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { DropButton } from '../DropButton';\nimport { Keyboard } from '../Keyboard';\nimport { FormContext } from '../Form/FormContext';\nimport { SelectMultipleValue } from './SelectMultipleValue';\nimport { SelectMultipleContainer } from './SelectMultipleContainer';\nimport { HiddenInput, SelectTextInput, StyledSelectDropButton } from '../Select/StyledSelect';\nimport { applyKey, getNormalizedValue, changeEvent, getSelectIcon, getIconColor, getDisplayLabelKey, arrayIncludes } from '../Select/utils';\nimport { DefaultSelectTextInput } from '../Select/DefaultSelectTextInput';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { SelectMultiplePropTypes } from './propTypes';\nvar StyledSelectBox = styled(Box).withConfig({\n displayName: \"SelectMultiple__StyledSelectBox\",\n componentId: \"sc-18zwyth-0\"\n})([\"\", \";\", \";\", \";\"], function (props) {\n return !props.plainSelect && controlBorderStyle;\n}, function (props) {\n var _props$theme$select;\n return (_props$theme$select = props.theme.select) == null || (_props$theme$select = _props$theme$select.control) == null ? void 0 : _props$theme$select.extend;\n}, function (props) {\n var _props$theme$select$c;\n return props.open && ((_props$theme$select$c = props.theme.select.control) == null ? void 0 : _props$theme$select$c.open);\n});\nStyledSelectDropButton.defaultProps = {};\nObject.setPrototypeOf(StyledSelectDropButton.defaultProps, defaultProps);\nvar SelectMultiple = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n alignSelf = _ref.alignSelf,\n children = _ref.children,\n defaultValue = _ref.defaultValue,\n disabled = _ref.disabled,\n disabledKey = _ref.disabledKey,\n dropAlignProp = _ref.dropAlign,\n dropHeight = _ref.dropHeight,\n dropProps = _ref.dropProps,\n dropTarget = _ref.dropTarget,\n emptySearchMessage = _ref.emptySearchMessage,\n focusIndicator = _ref.focusIndicator,\n gridArea = _ref.gridArea,\n help = _ref.help,\n id = _ref.id,\n icon = _ref.icon,\n labelKey = _ref.labelKey,\n limit = _ref.limit,\n margin = _ref.margin,\n messages = _ref.messages,\n name = _ref.name,\n onBlur = _ref.onBlur,\n onChange = _ref.onChange,\n onClick = _ref.onClick,\n onClose = _ref.onClose,\n onFocus = _ref.onFocus,\n onKeyDown = _ref.onKeyDown,\n onMore = _ref.onMore,\n onOpen = _ref.onOpen,\n onSearch = _ref.onSearch,\n openProp = _ref.open,\n optionsProp = _ref.options,\n placeholder = _ref.placeholder,\n plain = _ref.plain,\n replace = _ref.replace,\n searchPlaceholder = _ref.searchPlaceholder,\n size = _ref.size,\n _ref$sortSelectedOnCl = _ref.sortSelectedOnClose,\n sortSelectedOnClose = _ref$sortSelectedOnCl === void 0 ? true : _ref$sortSelectedOnCl,\n valueProp = _ref.value,\n valueKey = _ref.valueKey,\n valueLabel = _ref.valueLabel,\n _ref$showSelectedInli = _ref.showSelectedInline,\n showSelectedInline = _ref$showSelectedInli === void 0 ? false : _ref$showSelectedInli,\n width = _ref.width,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var inputRef = useRef();\n var formContext = useContext(FormContext);\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var selectBoxRef = useRef();\n var dropButtonRef = useForwardedRef(ref);\n var usingKeyboard = useKeyboard();\n var dropAlign = useMemo(function () {\n return dropAlignProp || (showSelectedInline ? {\n top: 'top',\n right: 'right',\n left: 'left'\n } : {\n top: 'bottom',\n left: 'left'\n });\n }, [dropAlignProp, showSelectedInline]);\n\n // value is used for what we receive in valueProp and the basis for\n // what we send with onChange\n // When 'valueKey' sets 'reduce', the value(s) here should match\n // what the 'valueKey' would return for the corresponding\n // selected option object.\n // Otherwise, the value(s) should match the selected options.\n\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp,\n initialValue: defaultValue || ''\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n\n // normalizedValue is the value mapped with any valueKey applied\n // When the options array contains objects, this property indicates how\n // to retrieve the value of each option.\n // If a string is provided, it is used as the key to retrieve a\n // property of an option object.\n // If a function is provided, it is called with the option and should\n // return the value.\n // If reduce is true, this value will be used for the 'value'\n // delivered via 'onChange'.\n var normalizedValue = useMemo(function () {\n return getNormalizedValue(value, valueKey);\n }, [value, valueKey]);\n // search input value\n var _useState = useState(),\n search = _useState[0],\n setSearch = _useState[1];\n // All select option indices and values\n var _useState2 = useState(optionsProp),\n allOptions = _useState2[0],\n setAllOptions = _useState2[1];\n var _useState3 = useState(),\n orderedOptions = _useState3[0],\n setOrderedOptions = _useState3[1];\n // Track changes to options property, except when options are being\n // updated due to search activity. Allows option's initial index value\n // to be referenced when filtered by search.\n useEffect(function () {\n if (!search) setAllOptions(optionsProp);\n }, [optionsProp, search]);\n useEffect(function () {\n if (sortSelectedOnClose) setOrderedOptions(optionsProp);\n }, [optionsProp, sortSelectedOnClose]);\n\n // the option indexes present in the value\n var optionIndexesInValue = useMemo(function () {\n var result = [];\n allOptions.forEach(function (option, index) {\n if (normalizedValue != null && normalizedValue.some != null && normalizedValue.some(function (v) {\n return v === applyKey(option, valueKey);\n })) {\n result.push(index);\n }\n });\n return result;\n }, [allOptions, valueKey, normalizedValue]);\n var _useState4 = useState(openProp),\n open = _useState4[0],\n setOpen = _useState4[1];\n useEffect(function () {\n return setOpen(openProp);\n }, [openProp]);\n var onRequestOpen = useCallback(function () {\n if (open) return;\n setOpen(true);\n if (onOpen) onOpen();\n }, [onOpen, open]);\n\n // On drop close if sortSelectedOnClose is true, sort options so that\n // selected options appear first, followed by unselected options.\n useEffect(function () {\n if (sortSelectedOnClose && value && !open) {\n var selectedOptions = optionsProp.filter(function (option) {\n return arrayIncludes(value, valueKey && valueKey.reduce ? applyKey(option, valueKey) : option, valueKey || labelKey);\n });\n var unselectedOptions = optionsProp.filter(function (i) {\n return !arrayIncludes(selectedOptions, i, valueKey || labelKey);\n });\n var nextOrderedOptions = selectedOptions.concat(unselectedOptions);\n setOrderedOptions(nextOrderedOptions);\n }\n }, [labelKey, open, sortSelectedOnClose, optionsProp, value, valueKey]);\n var onRequestClose = useCallback(function () {\n setOpen(false);\n if (onClose) onClose();\n setSearch();\n }, [onClose]);\n var triggerChangeEvent = useCallback(function (nextValue) {\n return changeEvent(inputRef, nextValue);\n }, []);\n var onSelectChange = useCallback(function (event, _ref2) {\n var option = _ref2.option,\n nextValue = _ref2.value;\n // nextValue must not be of type object to set value directly on the\n // input. if it is an object, then the user has not provided necessary\n // props to reduce object option\n if (typeof nextValue !== 'object' && nextValue !== event.target.value && inputRef.current) {\n // select registers changing option as a click event or keydown.\n // when in a form, we need to programatically trigger a change\n // event in order for the change event to be registered upstream\n // necessary for change validation in form\n triggerChangeEvent(nextValue);\n }\n setValue(nextValue);\n if (onChange) {\n event.persist();\n var adjustedEvent;\n // support for native event used by Preact\n if (event instanceof Event) {\n adjustedEvent = new event.constructor(event.type, event);\n Object.defineProperties(adjustedEvent, {\n target: {\n value: inputRef.current\n },\n value: {\n value: nextValue\n },\n option: {\n value: option\n }\n });\n } else {\n adjustedEvent = event;\n adjustedEvent.target = inputRef.current;\n adjustedEvent.value = nextValue;\n adjustedEvent.option = option;\n }\n onChange(adjustedEvent);\n }\n }, [onChange, setValue, triggerChangeEvent]);\n var SelectIcon = getSelectIcon(icon, theme, open);\n\n // element to show, trumps inputValue\n var selectValue = useMemo(function () {\n var result;\n if (valueLabel) {\n result = value && valueLabel instanceof Function ? valueLabel(value) : valueLabel;\n } else if ((value == null ? void 0 : value.length) > 0 && showSelectedInline) {\n result = /*#__PURE__*/React.createElement(SelectMultipleValue, {\n allOptions: allOptions,\n disabled: disabled,\n disabledKey: disabledKey,\n dropButtonRef: dropButtonRef,\n labelKey: labelKey,\n onRequestOpen: onRequestOpen,\n onSelectChange: onSelectChange,\n theme: theme,\n value: value,\n valueKey: valueKey\n }, children);\n }\n return result;\n }, [valueKey, value, valueLabel, showSelectedInline, onRequestOpen, allOptions, children, labelKey, onSelectChange, disabled, disabledKey, dropButtonRef, theme]);\n var displayLabelKey = useMemo(function () {\n return getDisplayLabelKey(labelKey, allOptions, optionIndexesInValue, selectValue);\n }, [labelKey, allOptions, optionIndexesInValue, selectValue]);\n\n // text to show\n // When the options array contains objects, this property indicates how\n // to retrieve the value of each option.\n // If a string is provided, it is used as the key to retrieve a\n // property of an option object.\n // If a function is provided, it is called with the option and should\n // return the value.\n // If reduce is true, this value will be used for the 'value'\n // delivered via 'onChange'.\n var inputValue = useMemo(function () {\n if (!selectValue) {\n if (optionIndexesInValue.length === 0) return '';\n if (optionIndexesInValue.length === 1) return applyKey(allOptions[optionIndexesInValue[0]], labelKey);\n if (messages) return format({\n id: 'select.multiple',\n messages: messages\n });\n return optionIndexesInValue.length + \" selected\";\n }\n return undefined;\n }, [labelKey, messages, format, optionIndexesInValue, allOptions, selectValue]);\n var iconColor = getIconColor(theme);\n var displaySelectIcon = SelectIcon && /*#__PURE__*/React.createElement(Box, {\n alignSelf: \"center\",\n margin: theme.select.icons.margin,\n width: {\n min: 'auto'\n }\n }, /*#__PURE__*/isValidElement(SelectIcon) ? SelectIcon : /*#__PURE__*/React.createElement(SelectIcon, {\n color: iconColor,\n size: size\n }));\n var dropContent = /*#__PURE__*/React.createElement(SelectMultipleContainer, {\n allOptions: allOptions,\n disabled: disabled,\n disabledKey: disabledKey,\n dropHeight: dropHeight,\n emptySearchMessage: emptySearchMessage,\n help: help,\n icon: displaySelectIcon,\n id: id,\n labelKey: labelKey,\n limit: limit,\n onChange: onSelectChange,\n onClose: onRequestClose,\n onKeyDown: onKeyDown,\n onMore: onMore,\n onSearch: onSearch,\n options: orderedOptions || optionsProp,\n optionIndexesInValue: optionIndexesInValue,\n replace: replace,\n searchPlaceholder: searchPlaceholder,\n search: search,\n setSearch: setSearch,\n usingKeyboard: usingKeyboard,\n value: value,\n valueKey: valueKey,\n showSelectedInline: showSelectedInline\n }, children);\n var dropButtonProps = {\n ref: dropButtonRef,\n a11yTitle: (ariaLabel || a11yTitle || placeholder || 'Open Drop') + \". \" + ((value == null ? void 0 : value.length) || 0) + \" selected.\",\n 'aria-expanded': Boolean(open),\n 'aria-haspopup': 'listbox',\n id: id,\n disabled: disabled === true || undefined,\n open: open,\n focusIndicator: focusIndicator,\n onFocus: onFocus,\n onBlur: onBlur,\n gridArea: gridArea,\n margin: margin,\n onOpen: onRequestOpen,\n onClose: onRequestClose,\n onClick: onClick,\n plainSelect: plain,\n plain: plain,\n // Button should be plain\n dropProps: dropProps,\n dropContent: dropContent,\n theme: theme\n };\n return /*#__PURE__*/React.createElement(Keyboard, {\n onDown: onRequestOpen,\n onUp: onRequestOpen\n }, showSelectedInline ? /*#__PURE__*/React.createElement(StyledSelectBox, {\n disabled: disabled === true || undefined,\n alignSelf: alignSelf,\n direction: \"row\",\n alignContent: \"start\",\n background: theme.select.background,\n ref: selectBoxRef,\n flex: false,\n plainSelect: plain,\n width: width\n }, /*#__PURE__*/React.createElement(Box, {\n width: \"100%\"\n }, /*#__PURE__*/React.createElement(DropButton, _extends({\n fill: \"horizontal\",\n alignSelf: \"start\"\n }, dropButtonProps, {\n dropAlign: dropAlign,\n dropTarget: dropTarget || selectBoxRef.current\n }), selectValue || displayLabelKey ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {\n direction: \"row\"\n }, /*#__PURE__*/React.createElement(SelectTextInput, _extends({\n a11yTitle: ariaLabel || a11yTitle,\n defaultCursor: disabled === true || undefined,\n focusIndicator: false,\n id: id ? id + \"__input\" : undefined,\n name: name,\n width: \"100%\"\n }, rest, {\n tabIndex: \"-1\",\n type: \"text\",\n placeholder:\n // eslint-disable-next-line no-nested-ternary\n !value || (value == null ? void 0 : value.length) === 0 ? placeholder || selectValue || displayLabelKey : onMore ? ((value == null ? void 0 : value.length) || '0') + \" selected\" : ((value == null ? void 0 : value.length) || '0') + \" selected of \" + allOptions.length,\n plain: true,\n readOnly: true,\n value: \"\",\n theme: theme\n })), displaySelectIcon), /*#__PURE__*/React.createElement(HiddenInput, {\n type: \"text\",\n name: name,\n id: id ? id + \"__input\" : undefined,\n value: inputValue,\n ref: inputRef,\n readOnly: true\n })) : /*#__PURE__*/React.createElement(Box, {\n direction: \"row\"\n }, /*#__PURE__*/React.createElement(DefaultSelectTextInput, _extends({\n a11yTitle: ariaLabel || a11yTitle,\n disabled: disabled,\n id: id,\n name: name,\n ref: inputRef,\n placeholder: placeholder || 'Select',\n value: inputValue,\n size: size,\n theme: theme\n }, rest)), displaySelectIcon)), !open && (value == null ? void 0 : value.length) > 0 && (selectValue || displayLabelKey))) : /*#__PURE__*/React.createElement(Box, {\n width: width\n }, /*#__PURE__*/React.createElement(StyledSelectDropButton, _extends({}, dropButtonProps, {\n dropAlign: dropAlign,\n dropTarget: dropTarget,\n alignSelf: alignSelf,\n tabIndex: \"0\"\n }), /*#__PURE__*/React.createElement(Box, {\n align: \"center\",\n direction: \"row\",\n justify: \"between\",\n background: theme.select.background\n }, /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n flex: true,\n basis: \"auto\"\n }, selectValue || displayLabelKey ? /*#__PURE__*/React.createElement(React.Fragment, null, selectValue || displayLabelKey, /*#__PURE__*/React.createElement(HiddenInput, {\n type: \"text\",\n name: name,\n id: id ? id + \"__input\" : undefined,\n value: inputValue,\n ref: inputRef,\n readOnly: true\n })) : /*#__PURE__*/React.createElement(DefaultSelectTextInput, _extends({\n a11yTitle: ariaLabel || a11yTitle,\n disabled: disabled,\n id: id,\n name: name,\n ref: inputRef,\n placeholder: placeholder,\n value: inputValue,\n size: size,\n theme: theme\n }, rest))), displaySelectIcon))));\n});\nSelectMultiple.defaultProps = _extends({}, defaultProps);\nSelectMultiple.displayName = 'SelectMultiple';\nSelectMultiple.propTypes = SelectMultiplePropTypes;\nexport { SelectMultiple };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n options: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool])\n })])),\n property: PropTypes.string\n };\n}\nexport var DataFilterPropTypes = PropType;","var _excluded = [\"children\", \"options\", \"property\", \"range\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useMemo, useState } from 'react';\nimport { DataContext } from '../../contexts/DataContext';\nimport { DataForm } from '../Data/DataForm';\nimport { FormContext } from '../Form/FormContext';\nimport { FormField } from '../FormField';\nimport { CheckBoxGroup } from '../CheckBoxGroup';\nimport { RangeSelector } from '../RangeSelector';\nimport { SelectMultiple } from '../SelectMultiple';\nimport { DataFilterPropTypes } from './propTypes';\n\n// empirical constants for when we change inputs\nvar maxCheckBoxGroupOptions = 4;\nvar minSelectSearchOptions = 10;\nvar getValueAt = function getValueAt(valueObject, pathArg) {\n if (valueObject === undefined) return undefined;\n var path = Array.isArray(pathArg) ? pathArg : pathArg.split('.');\n if (path.length === 1) return valueObject[path];\n return getValueAt(valueObject[path.shift()], path);\n};\nvar generateOptions = function generateOptions(data, property) {\n return Array.from(new Set(data.map(function (d) {\n return getValueAt(d, property);\n }))).filter(function (v) {\n return v !== undefined && v !== '';\n }).sort();\n};\nvar alignMax = function alignMax(value, interval) {\n if (value > 0) return value - value % interval + interval;\n if (value < 0) return value + value % interval;\n return value;\n};\nvar alignMin = function alignMin(value, interval) {\n if (value > 0) return value - value % interval;\n if (value < 0) return value - value % interval - interval;\n return value;\n};\nvar booleanOptions = [{\n label: 'true',\n value: true\n}, {\n label: 'false',\n value: false\n}];\nexport var DataFilter = function DataFilter(_ref) {\n var _properties$property3;\n var children = _ref.children,\n optionsProp = _ref.options,\n property = _ref.property,\n rangeProp = _ref.range,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(DataContext),\n data = _useContext.data,\n dataId = _useContext.id,\n properties = _useContext.properties,\n unfilteredData = _useContext.unfilteredData;\n var _useContext2 = useContext(FormContext),\n noForm = _useContext2.noForm;\n var _useState = useState(''),\n searchText = _useState[0],\n setSearchText = _useState[1];\n var _useMemo = useMemo(function () {\n var _properties$property, _properties$property2;\n if (children) return [undefined, undefined]; // caller driving\n\n var optionsIn = optionsProp || (properties == null || (_properties$property = properties[property]) == null ? void 0 : _properties$property.options);\n var rangeIn = rangeProp || (properties == null || (_properties$property2 = properties[property]) == null ? void 0 : _properties$property2.range);\n if (optionsIn) return [optionsIn, undefined];\n if (rangeIn) return [undefined, [rangeIn.min, rangeIn.max]];\n\n // generate options from all values for property\n var uniqueValues = generateOptions(unfilteredData || data, property);\n // if less than two values, nothing to filter\n if (uniqueValues.length < 2) return [undefined, undefined];\n // if any values aren't numeric, treat as options\n if (uniqueValues.some(function (v) {\n return v !== undefined && typeof v !== 'number';\n })) return [uniqueValues, undefined];\n // all values are numeric, treat as range\n // normalize to make it friendler, so [1.3, 4.895] becomes [1, 5]\n var delta = uniqueValues[uniqueValues.length - 1] - uniqueValues[0];\n var interval = Number.parseFloat((delta / 3).toPrecision(1));\n var min = alignMin(uniqueValues[0], interval);\n var max = alignMax(uniqueValues[uniqueValues.length - 1], interval);\n return [undefined, [min, max]];\n }, [children, data, optionsProp, properties, property, rangeProp, unfilteredData]),\n options = _useMemo[0],\n range = _useMemo[1];\n var searchedOptions = useMemo(function () {\n if (!searchText) return options;\n // The line below escapes regular expression special characters:\n // [ \\ ^ $ . | ? * + ( )\n var escapedText = searchText.replace(/[-\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n // Create the regular expression with modified value which\n // handles escaping special characters. Without escaping special\n // characters, errors will appear in the console\n var exp = new RegExp(escapedText, 'i');\n return options.filter(function (o) {\n return typeof o === 'string' ? exp.test(o) : exp.test(o.label);\n });\n }, [options, searchText]);\n var id = dataId + \"-\" + property;\n var content = children;\n if (!content) {\n if (range) {\n content = /*#__PURE__*/React.createElement(RangeSelector, {\n id: id,\n name: property + \"._range\",\n defaultValues: range,\n label: true,\n min: range[0],\n max: range[1],\n step: (range[1] - range[0]) / 20,\n size: \"full\",\n round: \"small\"\n });\n } else if (options) {\n if (options.length === 2 && options[1] === true && options[0] === false) {\n // special case boolean properties\n content = /*#__PURE__*/React.createElement(CheckBoxGroup, {\n id: id,\n name: property,\n options: booleanOptions\n });\n } else if (options.length <= maxCheckBoxGroupOptions) {\n content = /*#__PURE__*/React.createElement(CheckBoxGroup, {\n id: id,\n name: property,\n options: options\n });\n } else {\n content = /*#__PURE__*/React.createElement(SelectMultiple, {\n id: id,\n name: property,\n showSelectedInline: true,\n options: searchedOptions,\n onSearch: options.length >= minSelectSearchOptions ? setSearchText : undefined,\n onClose: function onClose() {\n return setSearchText('');\n }\n });\n }\n }\n }\n if (!content) return null;\n if (noForm)\n // likely in Toolbar\n content = /*#__PURE__*/React.createElement(DataForm, {\n footer: false,\n updateOn: \"change\"\n }, content);else content = /*#__PURE__*/React.createElement(FormField, _extends({\n htmlFor: id,\n name: property,\n label: (properties == null || (_properties$property3 = properties[property]) == null ? void 0 : _properties$property3.label) || property\n }, rest), content);\n return content;\n};\nDataFilter.propTypes = DataFilterPropTypes;","var _excluded = [\"clear\", \"onClear\", \"name\", \"theme\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { setFocusWithoutScroll, getHoverIndicatorStyle, containsFocus } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { Keyboard } from '../Keyboard';\nimport { Text } from '../Text';\nimport { TextInput } from '../TextInput';\nimport { StyledContainer, OptionsContainer, SelectOption } from './StyledSelect';\nimport { applyKey, useDisabled, getOptionLabel, getOptionValue } from './utils';\nimport { EmptySearchOption } from './EmptySearchOption';\n\n// ensure ClearButton receives visual indication of keyboard\nvar StyledButton = styled(Button).withConfig({\n displayName: \"SelectContainer__StyledButton\",\n componentId: \"sc-1wi0ul8-0\"\n})([\"&:focus{\", \"}\"], function (props) {\n return getHoverIndicatorStyle('background', props.theme);\n});\nvar ClearButton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var clear = _ref.clear,\n onClear = _ref.onClear,\n name = _ref.name,\n theme = _ref.theme,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var label = clear.label,\n position = clear.position;\n var align = position !== 'bottom' ? 'start' : 'center';\n var buttonLabel = label || \"Clear \" + (name || 'selection');\n return /*#__PURE__*/React.createElement(StyledButton, _extends({\n a11yTitle: buttonLabel + \". Or, press \" + (position === 'bottom' ? 'shift tab' : 'down arrow') + \" to move to select options\",\n fill: \"horizontal\",\n ref: ref,\n onClick: onClear,\n focusIndicator: false\n }, rest), /*#__PURE__*/React.createElement(Box, _extends({}, theme.select.clear.container, {\n align: align\n }), /*#__PURE__*/React.createElement(Text, theme.select.clear.text, buttonLabel)));\n});\nvar SelectContainer = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var clear = _ref2.clear,\n _ref2$children = _ref2.children,\n children = _ref2$children === void 0 ? null : _ref2$children,\n disabled = _ref2.disabled,\n disabledKey = _ref2.disabledKey,\n dropHeight = _ref2.dropHeight,\n _ref2$emptySearchMess = _ref2.emptySearchMessage,\n emptySearchMessage = _ref2$emptySearchMess === void 0 ? 'No matches found' : _ref2$emptySearchMess,\n id = _ref2.id,\n labelKey = _ref2.labelKey,\n multiple = _ref2.multiple,\n name = _ref2.name,\n onChange = _ref2.onChange,\n onKeyDown = _ref2.onKeyDown,\n onMore = _ref2.onMore,\n onSearch = _ref2.onSearch,\n optionIndexesInValue = _ref2.optionIndexesInValue,\n options = _ref2.options,\n allOptions = _ref2.allOptions,\n searchPlaceholder = _ref2.searchPlaceholder,\n search = _ref2.search,\n setSearch = _ref2.setSearch,\n selected = _ref2.selected,\n usingKeyboard = _ref2.usingKeyboard,\n _ref2$value = _ref2.value,\n value = _ref2$value === void 0 ? '' : _ref2$value,\n valueKey = _ref2.valueKey,\n _ref2$replace = _ref2.replace,\n replace = _ref2$replace === void 0 ? true : _ref2$replace;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var shouldShowClearButton = useCallback(function (position) {\n var hasValue = Boolean(multiple && value ? value.length : value);\n var showAtPosition = position === 'bottom' ? (clear == null ? void 0 : clear.position) === 'bottom' : (clear == null ? void 0 : clear.position) !== 'bottom';\n return clear && hasValue && showAtPosition;\n }, [clear, multiple, value]);\n var isDisabled = useDisabled(disabled, disabledKey, options, valueKey || labelKey);\n var _useState = useState(usingKeyboard && !shouldShowClearButton('top') ? 0 : -1),\n activeIndex = _useState[0],\n setActiveIndex = _useState[1];\n var _useState2 = useState(usingKeyboard),\n keyboardNavigation = _useState2[0],\n setKeyboardNavigation = _useState2[1];\n var searchRef = useRef();\n var optionsRef = useRef();\n var clearRef = useRef();\n var activeRef = useRef();\n\n // for keyboard/screenreader, keep the active option in focus\n useEffect(function () {\n var _activeRef$current;\n if (activeIndex >= 0) (_activeRef$current = activeRef.current) == null ? void 0 : _activeRef$current.focus();\n }, [activeIndex]);\n\n // set initial focus\n useEffect(function () {\n // need to wait for Drop to be ready\n var timer = setTimeout(function () {\n var optionsNode = optionsRef.current;\n var clearButton = clearRef.current;\n if (onSearch) {\n var searchInput = searchRef.current;\n if (searchInput && searchInput.focus) {\n setFocusWithoutScroll(searchInput);\n }\n } else if (clear && clearButton && clearButton.focus && clear.position !== 'bottom') {\n setFocusWithoutScroll(clearButton);\n } else if (usingKeyboard && activeRef.current) {\n setFocusWithoutScroll(activeRef.current);\n } else if (optionsNode) {\n setFocusWithoutScroll(optionsNode);\n }\n }, 100);\n return function () {\n return clearTimeout(timer);\n };\n }, [onSearch, usingKeyboard, clear]);\n var isSelected = useCallback(function (index) {\n var result;\n if (selected) {\n // deprecated in favor of value\n result = selected.indexOf(index) !== -1;\n } else {\n var optionVal = getOptionValue(index, options, valueKey);\n if (Array.isArray(value)) {\n if (value.length === 0) {\n result = false;\n } else if (typeof value[0] !== 'object') {\n result = value.indexOf(optionVal) !== -1;\n } else if (valueKey) {\n result = value.some(function (valueItem) {\n var valueValue = typeof valueKey === 'function' ? valueKey(valueItem) : valueItem[valueKey] || valueItem[valueKey.key];\n return valueValue === optionVal;\n });\n }\n } else if (valueKey && value !== null && typeof value === 'object') {\n var valueValue = typeof valueKey === 'function' ? valueKey(value) : value[valueKey];\n result = valueValue === optionVal;\n } else {\n result = value === optionVal;\n }\n }\n return result;\n }, [selected, value, valueKey, options]);\n var selectOption = useCallback(function (index) {\n return function (event) {\n if (onChange) {\n var nextValue;\n var nextSelected;\n if (multiple) {\n var nextOptionIndexesInValue = optionIndexesInValue.slice(0);\n var allOptionsIndex = allOptions.indexOf(options[index]);\n var valueIndex = optionIndexesInValue.indexOf(allOptionsIndex);\n if (valueIndex === -1) {\n nextOptionIndexesInValue.push(allOptionsIndex);\n } else {\n nextOptionIndexesInValue.splice(valueIndex, 1);\n }\n nextValue = nextOptionIndexesInValue.map(function (i) {\n return valueKey && valueKey.reduce ? applyKey(allOptions[i], valueKey) : allOptions[i];\n });\n nextSelected = nextOptionIndexesInValue;\n } else {\n nextValue = valueKey && valueKey.reduce ? applyKey(options[index], valueKey) : options[index];\n nextSelected = index;\n }\n onChange(event, {\n option: options[index],\n value: nextValue,\n selected: nextSelected\n });\n }\n };\n }, [multiple, onChange, optionIndexesInValue, options, allOptions, valueKey]);\n var onClear = useCallback(function (event) {\n onChange(event, {\n option: undefined,\n value: '',\n selected: ''\n });\n }, [onChange]);\n var onNextOption = useCallback(function (event) {\n event.preventDefault();\n var nextActiveIndex = activeIndex + 1;\n while (nextActiveIndex < options.length && isDisabled(nextActiveIndex)) {\n nextActiveIndex += 1;\n }\n if (nextActiveIndex !== options.length) {\n setActiveIndex(nextActiveIndex);\n setKeyboardNavigation(true);\n }\n }, [activeIndex, options, isDisabled]);\n var onPreviousOption = useCallback(function (event) {\n event.preventDefault();\n var nextActiveIndex = activeIndex - 1;\n if (nextActiveIndex === -1) {\n var searchInput = searchRef.current;\n var clearButton = clearRef.current;\n if (clearButton && clearButton.focus && shouldShowClearButton('top')) {\n setActiveIndex(nextActiveIndex);\n setFocusWithoutScroll(clearButton);\n } else if (searchInput && searchInput.focus) {\n setActiveIndex(nextActiveIndex);\n setFocusWithoutScroll(searchInput);\n }\n }\n while (nextActiveIndex >= 0 && isDisabled(nextActiveIndex)) {\n nextActiveIndex -= 1;\n }\n if (nextActiveIndex >= 0) {\n setActiveIndex(nextActiveIndex);\n setKeyboardNavigation(true);\n }\n }, [activeIndex, isDisabled, shouldShowClearButton]);\n var onKeyDownOption = useCallback(function (event) {\n if (!onSearch) {\n var nextActiveIndex = options.findIndex(function (e, index) {\n var label;\n if (typeof e === 'object') {\n label = e.label || applyKey(e, labelKey);\n } else {\n label = e;\n }\n return typeof label === 'string' && label.charAt(0).toLowerCase() === event.key.toLowerCase() && !isDisabled(index);\n });\n if (nextActiveIndex >= 0) {\n event.preventDefault();\n setActiveIndex(nextActiveIndex);\n setKeyboardNavigation(true);\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n }, [isDisabled, labelKey, onKeyDown, options, onSearch]);\n var onActiveOption = useCallback(function (index) {\n return function () {\n if (!keyboardNavigation) setActiveIndex(index);\n };\n }, [keyboardNavigation]);\n var onSelectOption = useCallback(function (event) {\n if ((shouldShowClearButton('bottom') || shouldShowClearButton('top')) && containsFocus(clearRef.current)) {\n onChange(event, {\n option: undefined,\n value: '',\n selected: ''\n });\n } else if (activeIndex >= 0 && activeIndex < options.length) {\n event.preventDefault(); // prevent submitting forms\n selectOption(activeIndex)(event);\n }\n }, [activeIndex, selectOption, options, onChange, shouldShowClearButton]);\n var customSearchInput = theme.select.searchInput;\n var SelectTextInput = customSearchInput || TextInput;\n var selectOptionsStyle = theme.select.options ? _extends({}, theme.select.options.box, theme.select.options.container) : {};\n return /*#__PURE__*/React.createElement(Keyboard, {\n onEnter: onSelectOption,\n onSpace: onSelectOption,\n onUp: onPreviousOption,\n onDown: onNextOption,\n onKeyDown: onKeyDownOption\n }, /*#__PURE__*/React.createElement(StyledContainer, {\n ref: ref,\n as: Box,\n id: id ? id + \"__select-drop\" : undefined,\n dropHeight: dropHeight\n }, onSearch && /*#__PURE__*/React.createElement(Box, {\n pad: !customSearchInput ? 'xsmall' : undefined,\n flex: false\n }, /*#__PURE__*/React.createElement(SelectTextInput, {\n focusIndicator: !customSearchInput,\n size: \"small\",\n ref: searchRef,\n type: \"search\",\n value: search || '',\n placeholder: searchPlaceholder,\n onChange: function onChange(event) {\n var nextSearch = event.target.value;\n setSearch(nextSearch);\n setActiveIndex(-1);\n onSearch(nextSearch);\n }\n })), shouldShowClearButton('top') && /*#__PURE__*/React.createElement(ClearButton, {\n ref: clearRef,\n clear: clear,\n name: name,\n onClear: onClear,\n onFocus: function onFocus() {\n return setActiveIndex(-1);\n },\n onMouseOver: function onMouseOver() {\n return setActiveIndex(-1);\n },\n theme: theme\n }), options.length > 0 ? /*#__PURE__*/React.createElement(OptionsContainer, {\n role: \"listbox\",\n tabIndex: \"-1\",\n ref: optionsRef,\n \"aria-multiselectable\": multiple,\n onMouseMove: function onMouseMove() {\n return setKeyboardNavigation(false);\n }\n }, /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: options,\n step: theme.select.step,\n onMore: onMore,\n replace: replace,\n show: activeIndex !== -1 ? activeIndex : undefined\n }, function (option, index, optionRef) {\n var optionDisabled = isDisabled(index);\n var optionSelected = isSelected(index);\n var optionActive = activeIndex === index;\n // Determine whether the label is done as a child or\n // as an option Button kind property.\n var child;\n var textComponent = false;\n if (children) {\n child = children(option, index, options, {\n active: optionActive,\n disabled: optionDisabled,\n selected: optionSelected\n });\n if (typeof child === 'string' || child.props && child.props.children && typeof child.props.children === 'string') textComponent = true;\n } else if (theme.select.options) {\n child = /*#__PURE__*/React.createElement(Box, selectOptionsStyle, /*#__PURE__*/React.createElement(Text, theme.select.options.text, getOptionLabel(index, options, labelKey)));\n textComponent = true;\n }\n\n // if we have a child, turn on plain, and hoverIndicator\n return /*#__PURE__*/React.createElement(SelectOption\n // eslint-disable-next-line react/no-array-index-key\n , {\n key: index\n // merge optionRef and activeRef\n ,\n ref: function ref(node) {\n // eslint-disable-next-line no-param-reassign\n if (optionRef) optionRef.current = node;\n if (optionActive) activeRef.current = node;\n },\n tabIndex: optionSelected ? '0' : '-1',\n role: \"option\",\n \"aria-setsize\": options.length,\n \"aria-posinset\": index + 1,\n \"aria-selected\": optionSelected,\n focusIndicator: false,\n \"aria-disabled\": optionDisabled || undefined,\n plain: !child ? undefined : true,\n align: \"start\",\n kind: !child ? 'option' : undefined,\n label: !child ? getOptionLabel(index, options, labelKey || valueKey) : undefined,\n disabled: optionDisabled || undefined,\n active: optionActive,\n selected: optionSelected\n // allow keyboard navigation to start from\n // selected option after tabbing to it\n ,\n onFocus: function onFocus() {\n return setActiveIndex(index);\n },\n onMouseOver: !optionDisabled ? onActiveOption(index) : undefined,\n onClick: !optionDisabled ? selectOption(index) : undefined,\n textComponent: textComponent\n }, child);\n })) : /*#__PURE__*/React.createElement(EmptySearchOption, {\n emptySearchMessage: emptySearchMessage,\n selectOptionsStyle: selectOptionsStyle,\n theme: theme\n }), shouldShowClearButton('bottom') && /*#__PURE__*/React.createElement(ClearButton, {\n ref: clearRef,\n clear: clear,\n name: name,\n onClear: onClear,\n onFocus: function onFocus() {\n return setActiveIndex(-1);\n },\n onMouseOver: function onMouseOver() {\n return setActiveIndex(-1);\n },\n theme: theme\n })));\n});\nexport { SelectContainer };","var _excluded = [\"a11yTitle\", \"aria-label\", \"alignSelf\", \"children\", \"clear\", \"closeOnChange\", \"defaultValue\", \"disabled\", \"disabledKey\", \"dropAlign\", \"dropHeight\", \"dropProps\", \"dropTarget\", \"emptySearchMessage\", \"focusIndicator\", \"gridArea\", \"id\", \"icon\", \"labelKey\", \"margin\", \"messages\", \"multiple\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onClose\", \"onFocus\", \"onKeyDown\", \"onMore\", \"onOpen\", \"onSearch\", \"open\", \"options\", \"placeholder\", \"plain\", \"replace\", \"searchPlaceholder\", \"selected\", \"size\", \"value\", \"valueKey\", \"valueLabel\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, isValidElement, useCallback, useContext, useMemo, useState, useRef, useEffect } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { useKeyboard } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Keyboard } from '../Keyboard';\nimport { FormContext } from '../Form/FormContext';\nimport { SelectContainer } from './SelectContainer';\nimport { HiddenInput, StyledSelectDropButton } from './StyledSelect';\nimport { applyKey, getNormalizedValue, changeEvent, getSelectIcon, getDisplayLabelKey, getIconColor } from './utils';\nimport { DefaultSelectTextInput } from './DefaultSelectTextInput';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { SelectPropTypes } from './propTypes';\nStyledSelectDropButton.defaultProps = {};\nObject.setPrototypeOf(StyledSelectDropButton.defaultProps, defaultProps);\nvar defaultDropAlign = {\n top: 'bottom',\n left: 'left'\n};\nvar Select = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n alignSelf = _ref.alignSelf,\n children = _ref.children,\n _ref$clear = _ref.clear,\n clear = _ref$clear === void 0 ? false : _ref$clear,\n _ref$closeOnChange = _ref.closeOnChange,\n closeOnChange = _ref$closeOnChange === void 0 ? true : _ref$closeOnChange,\n defaultValue = _ref.defaultValue,\n disabled = _ref.disabled,\n disabledKey = _ref.disabledKey,\n _ref$dropAlign = _ref.dropAlign,\n dropAlign = _ref$dropAlign === void 0 ? defaultDropAlign : _ref$dropAlign,\n dropHeight = _ref.dropHeight,\n dropProps = _ref.dropProps,\n dropTarget = _ref.dropTarget,\n emptySearchMessage = _ref.emptySearchMessage,\n focusIndicator = _ref.focusIndicator,\n gridArea = _ref.gridArea,\n id = _ref.id,\n icon = _ref.icon,\n labelKeyProp = _ref.labelKey,\n margin = _ref.margin,\n messages = _ref.messages,\n multiple = _ref.multiple,\n name = _ref.name,\n onBlur = _ref.onBlur,\n onChange = _ref.onChange,\n onClick = _ref.onClick,\n onClose = _ref.onClose,\n onFocus = _ref.onFocus,\n onKeyDown = _ref.onKeyDown,\n onMore = _ref.onMore,\n onOpen = _ref.onOpen,\n onSearch = _ref.onSearch,\n propOpen = _ref.open,\n optionsProp = _ref.options,\n placeholder = _ref.placeholder,\n plain = _ref.plain,\n replace = _ref.replace,\n searchPlaceholder = _ref.searchPlaceholder,\n selected = _ref.selected,\n size = _ref.size,\n valueProp = _ref.value,\n valueKeyProp = _ref.valueKey,\n valueLabel = _ref.valueLabel,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var inputRef = useRef();\n var formContext = useContext(FormContext);\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n // For greater resilience, use labelKey if valueKey isn't provided and\n // vice versa. https://github.com/grommet/grommet/pull/6299\n var valueKey = valueKeyProp || labelKeyProp;\n var labelKey = labelKeyProp || valueKeyProp;\n\n // Determine if the Select is opened with the keyboard. If so,\n // focus should be set on the first option when the drop opens\n // see set initial focus code in SelectContainer.js\n var usingKeyboard = useKeyboard();\n\n // value is used for what we receive in valueProp and the basis for\n // what we send with onChange\n // When 'valueKey' sets 'reduce', the value(s) here should match\n // what the 'valueKey' would return for the corresponding\n // selected option object.\n // Otherwise, the value(s) should match the selected options.\n\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp,\n initialValue: defaultValue || ''\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n\n // normalizedValue is the value mapped with any valueKey applied\n // When the options array contains objects, this property indicates how\n // to retrieve the value of each option.\n // If a string is provided, it is used as the key to retrieve a\n // property of an option object.\n // If a function is provided, it is called with the option and should\n // return the value.\n // If reduce is true, this value will be used for the 'value'\n // delivered via 'onChange'.\n var normalizedValue = useMemo(function () {\n return getNormalizedValue(value, valueKey);\n }, [value, valueKey]);\n // search input value\n var _useState = useState(),\n search = _useState[0],\n setSearch = _useState[1];\n // All select option indices and values\n var _useState2 = useState(optionsProp),\n allOptions = _useState2[0],\n setAllOptions = _useState2[1];\n // Track changes to options property, except when options are being\n // updated due to search activity. Allows option's initial index value\n // to be referenced when filtered by search.\n useEffect(function () {\n if (!search) setAllOptions(optionsProp);\n }, [optionsProp, search]);\n\n // the option indexes present in the value\n var optionIndexesInValue = useMemo(function () {\n var result = [];\n allOptions.forEach(function (option, index) {\n if (selected !== undefined) {\n if (Array.isArray(selected)) {\n if (selected.indexOf(index) !== -1) result.push(index);\n } else if (index === selected) {\n result.push(index);\n }\n } else if (Array.isArray(normalizedValue)) {\n if (normalizedValue.some(function (v) {\n return v === applyKey(option, valueKey);\n })) {\n result.push(index);\n }\n } else if (normalizedValue === applyKey(option, valueKey)) {\n result.push(index);\n }\n });\n return result;\n }, [allOptions, selected, valueKey, normalizedValue]);\n var _useState3 = useState(propOpen),\n open = _useState3[0],\n setOpen = _useState3[1];\n useEffect(function () {\n return setOpen(propOpen);\n }, [propOpen]);\n var onRequestOpen = useCallback(function () {\n if (open) return;\n setOpen(true);\n if (onOpen) onOpen();\n }, [onOpen, open]);\n var onRequestClose = useCallback(function () {\n setOpen(false);\n if (onClose) onClose();\n setSearch();\n }, [onClose]);\n var triggerChangeEvent = useCallback(function (nextValue) {\n return changeEvent(inputRef, nextValue);\n }, []);\n var onSelectChange = useCallback(function (event, _ref2) {\n var option = _ref2.option,\n nextValue = _ref2.value,\n nextSelected = _ref2.selected;\n if (closeOnChange) onRequestClose();\n // nextValue must not be of type object to set value directly on the\n // input. if it is an object, then the user has not provided necessary\n // props to reduce object option\n if ((typeof nextValue !== 'object' || multiple) && nextValue !== event.target.value && inputRef.current) {\n // select registers changing option as a click event or keydown.\n // when in a form, we need to programatically trigger a change\n // event in order for the change event to be registered upstream\n // necessary for change validation in form\n triggerChangeEvent(nextValue);\n }\n setValue(nextValue);\n if (onChange) {\n event.persist();\n var adjustedEvent;\n // support for native event used by Preact\n if (event instanceof Event) {\n adjustedEvent = new event.constructor(event.type, event);\n Object.defineProperties(adjustedEvent, {\n target: {\n value: inputRef.current\n },\n value: {\n value: nextValue\n },\n option: {\n value: option\n },\n selected: {\n value: nextSelected\n }\n });\n } else {\n adjustedEvent = event;\n adjustedEvent.target = inputRef.current;\n adjustedEvent.value = nextValue;\n adjustedEvent.option = option;\n adjustedEvent.selected = nextSelected;\n }\n onChange(adjustedEvent);\n }\n }, [closeOnChange, multiple, onChange, onRequestClose, setValue, triggerChangeEvent]);\n var SelectIcon = getSelectIcon(icon, theme, open);\n\n // element to show, trumps inputValue\n var selectValue = useMemo(function () {\n if (valueLabel instanceof Function) {\n if (value || value === 0 || value === false) return valueLabel(value);\n } else if (valueLabel) return valueLabel;else if ( /*#__PURE__*/React.isValidElement(value)) return value; // deprecated\n return undefined;\n }, [value, valueLabel]);\n var displayLabelKey = useMemo(function () {\n return getDisplayLabelKey(labelKey, allOptions, optionIndexesInValue, selectValue);\n }, [labelKey, allOptions, optionIndexesInValue, selectValue]);\n\n // text to show\n // When the options array contains objects, this property indicates how\n // to retrieve the value of each option.\n // If a string is provided, it is used as the key to retrieve a\n // property of an option object.\n // If a function is provided, it is called with the option and should\n // return the value.\n // If reduce is true, this value will be used for the 'value'\n // delivered via 'onChange'.\n var inputValue = useMemo(function () {\n if (!selectValue) {\n if (optionIndexesInValue.length === 0) return '';\n if (optionIndexesInValue.length === 1) return applyKey(allOptions[optionIndexesInValue[0]], labelKey);\n return format({\n id: 'select.multiple',\n messages: messages\n });\n }\n return undefined;\n }, [labelKey, messages, format, optionIndexesInValue, allOptions, selectValue]);\n var iconColor = getIconColor(theme);\n return /*#__PURE__*/React.createElement(Keyboard, {\n onDown: onRequestOpen,\n onUp: onRequestOpen\n }, /*#__PURE__*/React.createElement(StyledSelectDropButton, {\n ref: ref,\n a11yTitle: \"\" + (ariaLabel || a11yTitle || placeholder || 'Open Drop') + (value ? format({\n id: 'select.selected',\n messages: messages,\n values: {\n currentSelectedValue: value\n }\n }) : ''),\n \"aria-expanded\": Boolean(open),\n \"aria-haspopup\": \"listbox\",\n id: id,\n disabled: disabled === true || undefined,\n dropAlign: dropAlign,\n dropTarget: dropTarget,\n open: open,\n alignSelf: alignSelf,\n focusIndicator: focusIndicator,\n onFocus: onFocus,\n onBlur: onBlur,\n gridArea: gridArea,\n margin: margin,\n onOpen: onRequestOpen,\n onClose: onRequestClose,\n onClick: onClick,\n dropContent: /*#__PURE__*/React.createElement(SelectContainer, {\n clear: clear,\n disabled: disabled,\n disabledKey: disabledKey,\n dropHeight: dropHeight,\n emptySearchMessage: emptySearchMessage,\n id: id,\n labelKey: labelKey,\n multiple: multiple,\n name: name,\n onChange: onSelectChange,\n onKeyDown: onKeyDown,\n onMore: onMore,\n onSearch: onSearch,\n options: optionsProp,\n allOptions: allOptions,\n optionIndexesInValue: optionIndexesInValue,\n replace: replace,\n searchPlaceholder: searchPlaceholder,\n search: search,\n setSearch: setSearch,\n selected: selected,\n usingKeyboard: usingKeyboard,\n value: value,\n valueKey: valueKey\n }, children)\n // StyledDropButton needs to know if the border should be shown\n ,\n plainSelect: plain,\n plain: true // Button should be plain\n ,\n dropProps: dropProps,\n theme: theme\n }, /*#__PURE__*/React.createElement(Box, {\n align: \"center\",\n direction: \"row\",\n justify: \"between\",\n background: theme.select.background\n }, /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n flex: true,\n basis: \"auto\"\n }, selectValue || displayLabelKey ? /*#__PURE__*/React.createElement(React.Fragment, null, selectValue || displayLabelKey, /*#__PURE__*/React.createElement(HiddenInput, {\n type: \"text\",\n name: name,\n id: id ? id + \"__input\" : undefined,\n value: inputValue,\n ref: inputRef,\n readOnly: true\n })) : /*#__PURE__*/React.createElement(DefaultSelectTextInput, _extends({\n a11yTitle: (ariaLabel || a11yTitle) && \"\" + (ariaLabel || a11yTitle) + (value && typeof value === 'string' ? \", \" + value : ''),\n disabled: disabled,\n id: id,\n name: name,\n ref: inputRef,\n placeholder: placeholder,\n value: inputValue,\n size: size,\n theme: theme\n }, rest))), SelectIcon && /*#__PURE__*/React.createElement(Box, {\n margin: theme.select.icons.margin,\n flex: false,\n style: {\n minWidth: 'auto'\n }\n }, /*#__PURE__*/isValidElement(SelectIcon) ? SelectIcon : /*#__PURE__*/React.createElement(SelectIcon, {\n color: iconColor,\n size: size\n })))));\n});\nSelect.defaultProps = _extends({}, defaultProps);\nSelect.displayName = 'Select';\nSelect.propTypes = SelectPropTypes;\nexport { Select };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n drop: PropTypes.bool\n };\n}\nexport var DataSortPropTypes = PropType;","var _excluded = [\"drop\", \"options\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useMemo, useState } from 'react';\nimport { Descend } from 'grommet-icons/icons/Descend';\nimport { DataContext } from '../../contexts/DataContext';\nimport { Box } from '../Box';\nimport { DataForm } from '../Data/DataForm';\nimport { DropButton } from '../DropButton';\nimport { FormContext } from '../Form/FormContext';\nimport { FormField } from '../FormField';\nimport { RadioButtonGroup } from '../RadioButtonGroup';\nimport { Select } from '../Select';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { DataSortPropTypes } from './propTypes';\nvar dropProps = {\n align: {\n top: 'bottom',\n left: 'left'\n }\n};\nvar Content = function Content(_ref) {\n var optionsArg = _ref.options;\n var _useContext = useContext(DataContext),\n data = _useContext.data,\n dataId = _useContext.id,\n messages = _useContext.messages,\n properties = _useContext.properties;\n var _useContext2 = useContext(MessageContext),\n format = _useContext2.format;\n var options = useMemo(function () {\n return optionsArg || properties && Object.keys(properties).sort() || data.length > 0 && Object.keys(data[0]).sort() || data;\n }, [data, optionsArg, properties]);\n var directionOptions = [{\n label: format({\n id: 'dataSort.ascending',\n messages: messages == null ? void 0 : messages.dataSort\n }),\n value: 'asc'\n }, {\n label: format({\n id: 'dataSort.descending',\n messages: messages == null ? void 0 : messages.dataSort\n }),\n value: 'desc'\n }];\n var sortPropertyId = dataId + \"--sort-property\";\n var sortDirectionId = dataId + \"--sort-direction\";\n return [/*#__PURE__*/React.createElement(FormField, {\n key: \"by\",\n htmlFor: sortPropertyId,\n label: format({\n id: 'dataSort.by',\n messages: messages == null ? void 0 : messages.dataSort\n })\n }, /*#__PURE__*/React.createElement(Select, {\n id: sortPropertyId,\n name: \"_sort.property\",\n options: options\n })), /*#__PURE__*/React.createElement(FormField, {\n key: \"dir\",\n htmlFor: sortDirectionId,\n label: format({\n id: 'dataSort.direction',\n messages: messages == null ? void 0 : messages.dataSort\n })\n }, /*#__PURE__*/React.createElement(RadioButtonGroup, {\n id: sortDirectionId,\n name: \"_sort.direction\",\n options: directionOptions\n }))];\n};\nexport var DataSort = function DataSort(_ref2) {\n var drop = _ref2.drop,\n options = _ref2.options,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n var _useContext3 = useContext(DataContext),\n dataId = _useContext3.id,\n messages = _useContext3.messages;\n var _useContext4 = useContext(FormContext),\n noForm = _useContext4.noForm;\n var _useContext5 = useContext(MessageContext),\n format = _useContext5.format;\n var _useState = useState(),\n showContent = _useState[0],\n setShowContent = _useState[1];\n var content = /*#__PURE__*/React.createElement(Content, {\n options: options\n });\n if (noForm) content = /*#__PURE__*/React.createElement(DataForm, {\n footer: false\n }, content);\n if (!drop) return content;\n var control = /*#__PURE__*/React.createElement(DropButton, _extends({\n id: dataId + \"--sort-control\",\n \"aria-label\": format({\n id: 'dataSort.open',\n messages: messages == null ? void 0 : messages.dataSort\n }),\n kind: \"toolbar\",\n icon: /*#__PURE__*/React.createElement(Descend, null),\n dropProps: dropProps,\n dropContent: /*#__PURE__*/React.createElement(Box, {\n pad: \"small\"\n }, content),\n open: showContent,\n onOpen: function onOpen() {\n return setShowContent(undefined);\n },\n onClose: function onClose() {\n return setShowContent(undefined);\n }\n }, rest));\n return control;\n};\nDataSort.propTypes = DataSortPropTypes;","import styled, { css, keyframes } from 'styled-components';\nimport { baseStyle, backgroundStyle, breakpointStyle, parseMetricToNum } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar hiddenPositionStyle = css([\"left:-100%;right:100%;z-index:-1;position:fixed;\"]);\nvar desktopLayerStyle = \"\\n position: fixed;\\n top: 0px;\\n left: 0px;\\n right: 0px;\\n bottom: 0px;\\n\";\nvar responsiveLayerStyle = \"\\n position: fixed;\\n width: 100%;\\n height: 100%;\\n min-height: 100vh;\\n\";\nvar StyledLayer = styled.div.withConfig({\n displayName: \"StyledLayer\",\n componentId: \"sc-rmtehz-0\"\n})([\"\", \" background:transparent;position:relative;z-index:\", \";pointer-events:none;outline:none;\", \" \", \";\"], baseStyle, function (props) {\n return props.theme.layer.zIndex;\n}, function (props) {\n if (props.position === 'hidden') {\n return hiddenPositionStyle;\n }\n var styles = [];\n styles.push(desktopLayerStyle);\n if (props.responsive && props.theme.layer.responsiveBreakpoint && !props.layerTarget) {\n var breakpoint = props.theme.global.breakpoints[props.theme.layer.responsiveBreakpoint];\n styles.push(breakpointStyle(breakpoint, responsiveLayerStyle));\n }\n return styles;\n}, function (props) {\n return props.theme.layer && props.theme.layer.extend;\n});\nStyledLayer.defaultProps = {};\nObject.setPrototypeOf(StyledLayer.defaultProps, defaultProps);\nvar StyledOverlay = styled.div.withConfig({\n displayName: \"StyledLayer__StyledOverlay\",\n componentId: \"sc-rmtehz-1\"\n})([\"position:absolute;\", \" top:0px;left:0px;right:0px;bottom:0px;\", \" \", \" pointer-events:all;will-change:transform;\"], function (props) {\n if (props.responsive && props.theme.layer.responsiveBreakpoint) {\n var breakpoint = props.theme.global.breakpoints[props.theme.layer.responsiveBreakpoint];\n return breakpointStyle(breakpoint, 'position: relative;');\n }\n return '';\n}, function (props) {\n return props.theme.layer.overlay.backdropFilter && \"backdrop-filter: \" + props.theme.layer.overlay.backdropFilter + \";\";\n}, function (props) {\n return !props.plain && props.theme.layer.overlay.background && backgroundStyle(props.theme.layer.overlay.background, props.theme);\n});\nvar getMargin = function getMargin(margin, theme, position) {\n var axis = position.indexOf('top') !== -1 || position.indexOf('bottom') !== -1 ? 'vertical' : 'horizontal';\n var marginValue = margin[position] || margin[axis] || margin;\n var marginApplied = theme.global.edgeSize[marginValue] || marginValue;\n var marginInTheme = !!theme.global.edgeSize[marginValue];\n return !marginInTheme && typeof marginValue !== 'string' ? 0 : parseMetricToNum(marginApplied);\n};\nvar getBounds = function getBounds(bounds, margin, theme, position) {\n if (position === void 0) {\n position = undefined;\n }\n if (position) {\n return bounds[position] + getMargin(margin, theme, position);\n }\n return {\n bottom: bounds.bottom + getMargin(margin, theme, 'bottom'),\n // 'bottom-left': getMargin(margin, theme, 'bottom-left'),\n // 'bottom-right': getMargin(margin, theme, 'bottom-right'),\n end: bounds.right + getMargin(margin, theme, 'end'),\n left: bounds.left + getMargin(margin, theme, 'left'),\n right: bounds.right + getMargin(margin, theme, 'right'),\n start: bounds.left + getMargin(margin, theme, 'start'),\n top: bounds.top + getMargin(margin, theme, 'top')\n // 'top-right': getMargin(margin, theme, 'top-right'),\n // 'top-left': getMargin(margin, theme, 'top-left'),\n };\n};\n\nvar KEYFRAMES = {\n center: {\n vertical: keyframes([\"0%{transform:translateX(-50%) scale(0.8);}100%{transform:translateX(-50%) scale(1);}\"]),\n horizontal: keyframes([\"0%{transform:translateY(-50%) scale(0.8);}100%{transform:translateY(-50) scale(1);}\"]),\n \"true\": keyframes([\"0%{transform:scale(0.8);}100%{transform:scale(1);}\"]),\n \"false\": keyframes([\"0%{transform:translate(-50%,-50%) scale(0.8);}100%{transform:translate(-50%,-50%) scale(1);}\"])\n },\n top: {\n vertical: keyframes([\"0%{transform:translate(-50%,-100%);}100%{transform:translate(-50%,0);}\"]),\n horizontal: keyframes([\"0%{transform:translateY(-100%);}100%{transform:translateY(0);}\"]),\n \"true\": keyframes([\"0%{transform:translateY(-100%);}100%{transform:translateY(0);}\"]),\n \"false\": keyframes([\"0%{transform:translate(-50%,-100%);}100%{transform:translate(-50%,0);}\"])\n },\n bottom: {\n vertical: keyframes([\"0%{transform:translate(-50%,100%);}100%{transform:translate(-50%,0);}\"]),\n horizontal: keyframes([\"0%{transform:translateY(100%);}100%{transform:translateY(0);}\"]),\n \"true\": keyframes([\"0%{transform:translateY(100%);}100%{transform:translateY(0);}\"]),\n \"false\": keyframes([\"0%{transform:translate(-50%,100%);}100%{transform:translate(-50%,0);}\"])\n },\n left: {\n vertical: keyframes([\"0%{transform:translateX(-100%);}100%{transform:translateX(0);}\"]),\n horizontal: keyframes([\"0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}\"]),\n \"true\": keyframes([\"0%{transform:translateX(-100%);}100%{transform:translateX(0);}\"]),\n \"false\": keyframes([\"0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}\"])\n },\n right: {\n vertical: keyframes([\"0%{transform:translateX(100%);}100%{transform:translateX(0);}\"]),\n horizontal: keyframes([\"0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}\"]),\n \"true\": keyframes([\"0%{transform:translateX(100%);}100%{transform:translateX(0);}\"]),\n \"false\": keyframes([\"0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}\"])\n },\n start: {\n vertical: keyframes([\"0%{transform:translateX(-100%);}100%{transform:translateX(0);}\"]),\n horizontal: keyframes([\"0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}\"]),\n \"true\": keyframes([\"0%{transform:translateX(-100%);}100%{transform:translateX(0);}\"]),\n \"false\": keyframes([\"0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}\"])\n },\n end: {\n vertical: keyframes([\"0%{transform:translateX(100%);}100%{transform:translateX(0);}\"]),\n horizontal: keyframes([\"0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}\"]),\n \"true\": keyframes([\"0%{transform:translateX(100%);}100%{transform:translateX(0);}\"]),\n \"false\": keyframes([\"0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}\"])\n }\n};\nvar animationDuration = 200;\nvar getAnimationStyle = function getAnimationStyle(props, position, full) {\n var animation = props.animation !== undefined ? props.animation : props.animate;\n if (animation === undefined) animation = 'slide';\n var keys;\n if (animation === 'slide' || animation === true) {\n keys = KEYFRAMES[position][full];\n } else if (animation === 'fadeIn') {\n keys = keyframes([\"0%{opacity:0}100%{opacity:1}\"]);\n }\n return keys ? css([\"animation:\", \" \", \"s ease-in-out forwards;\"], keys, animationDuration / 1000.0) : '';\n};\n\n// POSITIONS combines 'position', 'full', and 'margin' properties, since\n// they are all interdependent.\n// Basically, non-full axes combine 50% position with -50% translation.\n// full axes pin to the window edges offset by any margin.\n// The keyframe animations are included as they are done via translations\n// as well so they must take into account the non-animated positioning.\nvar POSITIONS = {\n center: {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:50%;transform:translateX(-50%);\", \"\"], bounds.top, bounds.bottom, function (props) {\n return getAnimationStyle(props, 'center', 'vertical');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;top:50%;transform:translateY(-50%);\", \"\"], bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'center', 'horizontal');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;\", \"\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'center', 'true');\n });\n },\n \"false\": function _false() {\n return css([\"top:50%;left:50%;transform:translate(-50%,-50%);\", \"\"], function (props) {\n return getAnimationStyle(props, 'center', 'false');\n });\n }\n },\n top: {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:50%;transform:translate(-50%,0%);\", \"\"], bounds.top, bounds.bottom, function (props) {\n return getAnimationStyle(props, 'top', 'vertical');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;top:\", \"px;transform:translateY(0);\", \"\"], bounds.left, bounds.right, bounds.top, function (props) {\n return getAnimationStyle(props, 'top', 'horizontal');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;transform:translateY(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"top:\", \"px;left:50%;transform:translate(-50%,0);\", \"\"], bounds.top, function (props) {\n return getAnimationStyle(props, 'top', 'false');\n });\n }\n },\n bottom: {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:50%;transform:translate(-50%,0);\", \"\"], bounds.top, bounds.bottom, function (props) {\n return getAnimationStyle(props, 'bottom', 'vertical');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;bottom:\", \"px;transform:translateY(0);\", \"\"], bounds.left, bounds.top, bounds.bottom, function (props) {\n return getAnimationStyle(props, 'bottom', 'horizontal');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;transform:translateY(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"bottom:\", \"px;left:50%;transform:translate(-50%,0);\", \"\"], bounds.bottom, function (props) {\n return getAnimationStyle(props, 'bottom', 'false');\n });\n }\n },\n left: {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, function (props) {\n return getAnimationStyle(props, 'left', 'vertical');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;top:50%;transform:translate(0,-50%);\", \"\"], bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'left', 'horizontal');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'left', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"left:\", \"px;top:50%;transform:translate(0,-50%);\", \"\"], bounds.left, function (props) {\n return getAnimationStyle(props, 'left', 'false');\n });\n }\n },\n right: {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;right:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.right, function (props) {\n return getAnimationStyle(props, 'right', 'vertical');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;top:50%;transform:translate(0,-50%);\", \"\"], bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'right', 'horizontal');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'right', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"right:\", \"px;top:50%;transform:translate(0,-50%);\", \"\"], bounds.right, function (props) {\n return getAnimationStyle(props, 'right', 'false');\n });\n }\n },\n start: {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;inset-inline-start:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.start, function (props) {\n return getAnimationStyle(props, 'start', 'vertical');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"inset-inline-start:\", \"px;inset-inline-end:\", \"px;top:50%;transform:translate(0,-50%);\", \"\"], bounds.start, bounds.end, function (props) {\n return getAnimationStyle(props, 'start', 'horizontal');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;inset-inline-start:\", \"px;inset-inline-end:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.start, bounds.end, function (props) {\n return getAnimationStyle(props, 'start', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"inset-inline-start:\", \"px;top:50%;transform:translate(0,-50%);\", \"\"], bounds.start, function (props) {\n return getAnimationStyle(props, 'start', 'false');\n });\n }\n },\n end: {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;inset-inline-end:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.end, function (props) {\n return getAnimationStyle(props, 'end', 'vertical');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"inset-inline-start:\", \"px;inset-inline-end:\", \"px;top:50%;transform:translate(0,-50%);\", \"\"], bounds.start, bounds.end, function (props) {\n return getAnimationStyle(props, 'end', 'horizontal');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;inset-inline-start:\", \"px;inset-inline-end:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.start, bounds.end, function (props) {\n return getAnimationStyle(props, 'end', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"inset-inline-end:\", \"px;top:50%;transform:translate(0,-50%);\", \"\"], bounds.end, function (props) {\n return getAnimationStyle(props, 'end', 'false');\n });\n }\n },\n 'top-right': {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;right:\", \"px;transform:translateX(0);\", \";\"], bounds.top, bounds.bottom, bounds.right, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;top:0;transform:translateX(0);\", \";\"], bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;transform:translateX(0);\", \";\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"top:\", \"px;right:\", \"px;transform:translateY(0);\", \";\"], bounds.top, bounds.right, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n }\n },\n 'top-left': {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;top:0;transform:translateX(0);\", \"\"], bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"top:\", \"px;left:\", \"px;transform:translateY(0);\", \"\"], bounds.top, bounds.left, function (props) {\n return getAnimationStyle(props, 'top', 'true');\n });\n }\n },\n 'bottom-right': {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;right:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.right, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;bottom:\", \"px;transform:translateY(0);\", \"\"], bounds.left, bounds.right, bounds.bottom, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"bottom:\", \"px;right:\", \"px;transform:translateY(0);\", \"\"], bounds.bottom, bounds.right, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n }\n },\n 'bottom-left': {\n vertical: function vertical(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n },\n horizontal: function horizontal(bounds) {\n return css([\"left:\", \"px;right:\", \"px;bottom:\", \"px;transform:translateY(0);\", \"\"], bounds.left, bounds.right, bounds.bottom, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n },\n \"true\": function _true(bounds) {\n return css([\"top:\", \"px;bottom:\", \"px;left:\", \"px;right:\", \"px;transform:translateX(0);\", \"\"], bounds.top, bounds.bottom, bounds.left, bounds.right, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n },\n \"false\": function _false(bounds) {\n return css([\"bottom:\", \"px;left:\", \"px;transform:translateY(0);\", \"\"], bounds.bottom, bounds.left, function (props) {\n return getAnimationStyle(props, 'bottom', 'true');\n });\n }\n }\n};\nvar roundStyle = function roundStyle(data, theme, position, margin) {\n var styles = [];\n var size = data === true ? 'medium' : data;\n var round = theme.global.edgeSize[size] || size;\n // if user provides CSS string such as '50px 12px', apply that always\n var customCSS = round.split(' ').length > 1;\n if (margin === 'none' && !customCSS && theme.layer.border.intelligentRounding === true) {\n if (position === 'bottom') {\n styles.push(css([\"border-radius:\", \" \", \" 0 0;\"], round, round));\n } else if (position === 'bottom-left') {\n styles.push(css([\"border-radius:0 \", \" 0 0;\"], round));\n } else if (position === 'bottom-right') {\n styles.push(css([\"border-radius:\", \" 0 0 0;\"], round));\n } else if (position === 'end') {\n // only works on Firefox, what should be fallback?\n styles.push(css([\"border-start-start-radius:\", \";border-end-start-radius:\", \";\"], round, round));\n } else if (position === 'left') {\n styles.push(css([\"border-radius:0 \", \" \", \" 0;\"], round, round));\n } else if (position === 'right') {\n styles.push(css([\"border-radius:\", \" 0 0 \", \";\"], round, round));\n } else if (position === 'start') {\n // only works on Firefox, what should be fallback?\n styles.push(css([\"border-end-end-radius:\", \";border-start-end-radius:\", \";\"], round, round));\n } else if (position === 'top') {\n styles.push(css([\"border-radius:0 0 \", \" \", \";\"], round, round));\n } else if (position === 'top-left') {\n styles.push(css([\"border-radius:0 0 \", \" 0;\"], round));\n } else if (position === 'top-right') {\n styles.push(css([\"border-radius:0 0 0 \", \";\"], round));\n } else {\n // position is center, apply uniform border-radius\n styles.push(css([\"border-radius:\", \";\"], round));\n }\n } else {\n // if there's a margin apply uniform border-radius, or if user has supplied\n // a complex CSS string such as \"50px 20px\" apply this\n styles.push(css([\"border-radius:\", \";\"], round));\n }\n return styles;\n};\nvar bounds = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n};\nvar desktopContainerStyle = css([\"\", \" max-height:\", \";max-width:\", \";\", \";\", \";\"], function (props) {\n if (!props.modal && props.position === 'hidden') {\n return hiddenPositionStyle;\n }\n return css([\"position:\", \";\"], props.modal || props.layerTarget ? 'absolute' : 'fixed');\n}, function (props) {\n return \"calc(100% - \" + getBounds(bounds, props.margin, props.theme, 'top') + \"px - \" + getBounds(bounds, props.margin, props.theme, 'bottom') + \"px)\";\n}, function (props) {\n return \"calc(100% - \" + getBounds(bounds, props.margin, props.theme, 'left') + \"px - \" + getBounds(bounds, props.margin, props.theme, 'right') + \"px)\";\n}, function (props) {\n return props.plain || props.full && props.margin === 'none' ? \"border-radius: 0;\" : roundStyle(props.theme.layer.border.radius, props.theme, props.position, props.margin);\n}, function (props) {\n return props.position !== 'hidden' && POSITIONS[props.position][props.full](getBounds(bounds, props.margin, props.theme), bounds) || '';\n});\nvar responsiveContainerStyle = function responsiveContainerStyle(props) {\n return css([\"position:relative;max-height:none;max-width:none;border-radius:0;height:\", \";width:\", \";\"], !props.layerTarget ? '100vh' : '100%', !props.layerTarget ? '100vw' : '100%');\n};\nvar elevationStyle = css([\"box-shadow:\", \";\"], function (props) {\n return props.theme.global.elevation[props.theme.dark ? 'dark' : 'light'][props.theme.layer.container.elevation];\n});\nvar StyledContainer = styled.div.withConfig({\n // don't let elevation leak to DOM\n // https://styled-components.com/docs/api#shouldforwardprop\n shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {\n return !['elevation'].includes(prop) && defaultValidatorFn(prop);\n }\n}).withConfig({\n displayName: \"StyledLayer__StyledContainer\",\n componentId: \"sc-rmtehz-2\"\n})([\"\", \" display:flex;flex-direction:column;min-height:\", \";\", \" outline:none;pointer-events:all;z-index:\", \";\", \" \", \" \", \";\", \";\"], function (props) {\n return !props.modal ? baseStyle : '';\n}, function (props) {\n return props.theme.global.size.xxsmall;\n}, function (props) {\n return !props.plain && (props.background || props.theme.layer.background) && backgroundStyle(props.background || props.theme.layer.background, props.theme);\n}, function (props) {\n return props.theme.layer.container.zIndex;\n}, function (props) {\n return !props.plain && props.theme.layer.container.elevation && elevationStyle;\n}, desktopContainerStyle, function (props) {\n if (props.responsive && props.theme.layer.responsiveBreakpoint) {\n var breakpoint = props.theme.global.breakpoints[props.theme.layer.responsiveBreakpoint];\n if (breakpoint) {\n return breakpointStyle(breakpoint, responsiveContainerStyle);\n }\n }\n return '';\n}, function (props) {\n return props.theme.layer.container && props.theme.layer.container.extend;\n});\nStyledContainer.defaultProps = {};\nObject.setPrototypeOf(StyledContainer.defaultProps, defaultProps);\nexport { animationDuration, StyledLayer, StyledOverlay, StyledContainer };","var _excluded = [\"background\", \"children\", \"full\", \"id\", \"margin\", \"modal\", \"onClickOutside\", \"onEsc\", \"plain\", \"position\", \"responsive\", \"target\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useEffect, useMemo, useRef } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { FocusedContainer } from '../FocusedContainer';\nimport { Keyboard } from '../Keyboard';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { OptionsContext } from '../../contexts/OptionsContext';\nimport { ContainerTargetContext } from '../../contexts/ContainerTargetContext';\nimport { useAnalytics } from '../../contexts/AnalyticsContext';\nimport { backgroundIsDark, findVisibleParent, PortalContext } from '../../utils';\nimport { StyledLayer, StyledContainer, StyledOverlay } from './StyledLayer';\nvar HiddenAnchor = styled.a.withConfig({\n displayName: \"LayerContainer__HiddenAnchor\",\n componentId: \"sc-1srj14c-0\"\n})([\"width:0;height:0;overflow:hidden;position:absolute;\"]);\nvar LayerContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var background = _ref.background,\n children = _ref.children,\n _ref$full = _ref.full,\n full = _ref$full === void 0 ? false : _ref$full,\n id = _ref.id,\n _ref$margin = _ref.margin,\n margin = _ref$margin === void 0 ? 'none' : _ref$margin,\n _ref$modal = _ref.modal,\n modal = _ref$modal === void 0 ? true : _ref$modal,\n onClickOutside = _ref.onClickOutside,\n onEsc = _ref.onEsc,\n plain = _ref.plain,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? 'center' : _ref$position,\n _ref$responsive = _ref.responsive,\n responsive = _ref$responsive === void 0 ? true : _ref$responsive,\n layerTarget = _ref.target,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var containerTarget = useContext(ContainerTargetContext);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var size = useContext(ResponsiveContext);\n // layerOptions was created to preserve backwards compatibility but\n // should not be supported in v3\n var _useContext = useContext(OptionsContext),\n layerOptions = _useContext.layer;\n var anchorRef = useRef();\n var containerRef = useRef();\n var layerRef = useRef();\n var portalContext = useContext(PortalContext);\n var portalId = useMemo(function () {\n return portalContext.length;\n }, [portalContext]);\n var nextPortalContext = useMemo(function () {\n return [].concat(portalContext, [portalId]);\n }, [portalContext, portalId]);\n var sendAnalytics = useAnalytics();\n useEffect(function () {\n var start = new Date();\n var element = layerRef.current;\n var isHidden = position === 'hidden';\n if (!isHidden) {\n sendAnalytics({\n type: 'layerOpen',\n element: element\n });\n }\n return function () {\n if (!isHidden) {\n sendAnalytics({\n type: 'layerClose',\n element: element,\n elapsed: new Date().getTime() - start.getTime()\n });\n }\n };\n }, [sendAnalytics, layerRef, position]);\n useEffect(function () {\n if (position !== 'hidden') {\n var node = layerRef.current || containerRef.current || ref.current;\n if (node && node.scrollIntoView) node.scrollIntoView();\n // Once layer is open we make sure it has focus so that you\n // can start tabbing inside the layer. If the caller put focus\n // on an element already, we honor that. Otherwise, we put\n // the focus in the hidden anchor.\n var element = document.activeElement;\n while (element) {\n if (element === containerRef.current) {\n // already have focus inside the container\n break;\n }\n element = element.parentElement;\n }\n if (modal && !element && anchorRef.current) {\n anchorRef.current.focus();\n }\n }\n }, [modal, position, ref]);\n useEffect(function () {\n if (position !== 'hidden') {\n var node = layerRef.current || containerRef.current || ref.current;\n if (node && node.scrollIntoView) node.scrollIntoView();\n }\n }, [position, ref]);\n useEffect(function () {\n var onClickDocument = function onClickDocument(event) {\n // determine which portal id the target is in, if any\n var clickedPortalId = null;\n var node = event.composed && event.composedPath()[0] || event.target;\n while (clickedPortalId === null && node && node !== document && !(node instanceof ShadowRoot)) {\n // check if user click occurred within the layer\n var attr = node.getAttribute('data-g-portal-id');\n if (attr !== null && attr !== '') clickedPortalId = parseInt(attr, 10);\n // loop upward through parents to see if clicked element is a child\n // of the Layer. if so, click was inside Layer\n else node = node.parentNode;\n }\n if ((clickedPortalId === null || portalContext.indexOf(clickedPortalId) !== -1) && node !== null) {\n // if the click occurred outside of the Layer portal, call\n // the user's onClickOutside function\n onClickOutside(event);\n }\n };\n\n // if user provides an onClickOutside function, listen for mousedown event\n if (onClickOutside) {\n document.addEventListener('mousedown', onClickDocument);\n }\n if (layerTarget) {\n var updateBounds = function updateBounds() {\n var windowWidth = window.innerWidth;\n var windowHeight = window.innerHeight;\n var target = findVisibleParent(layerTarget);\n\n // affects StyledLayer\n var layer = layerRef.current;\n if (layer && target) {\n // clear prior styling\n layer.style.left = '';\n layer.style.top = '';\n layer.style.bottom = '';\n layer.style.width = '';\n\n // get bounds\n var targetRect = target.getBoundingClientRect();\n var layerRect = layer.getBoundingClientRect();\n\n // ensure that layer moves with the target\n layer.style.left = targetRect.left + \"px\";\n layer.style.right = windowWidth - targetRect.right + \"px\";\n layer.style.top = targetRect.top + \"px\";\n layer.style.bottom = windowHeight - targetRect.bottom + \"px\";\n layer.style.maxHeight = targetRect.height;\n layer.style.maxWidth = Math.min(layerRect.width, windowWidth);\n }\n };\n updateBounds();\n window.addEventListener('resize', updateBounds);\n window.addEventListener('scroll', updateBounds, true);\n return function () {\n window.removeEventListener('resize', updateBounds);\n window.removeEventListener('scroll', updateBounds, true);\n if (onClickOutside) {\n document.removeEventListener('mousedown', onClickDocument);\n }\n };\n }\n return function () {\n if (onClickOutside) {\n document.removeEventListener('mousedown', onClickDocument);\n }\n };\n }, [containerTarget, layerTarget, onClickOutside, portalContext, portalId]);\n var content = /*#__PURE__*/React.createElement(StyledContainer, _extends({\n ref: ref || containerRef,\n background: background,\n elevation: theme.layer.container.elevation\n // layerOptions was created to preserve backwards compatibility but\n // should not be supported in v3. In v3, this should always be\n // ${id}__container\n ,\n id: layerOptions && layerOptions.singleId ? id + \"__container\" : id,\n full: full,\n margin: margin,\n modal: modal\n }, rest, {\n position: position,\n plain: plain,\n responsive: responsive,\n layerTarget: layerTarget,\n dir: theme.dir\n // portalId is used to determine if click occurred inside\n // or outside of the layer\n ,\n \"data-g-portal-id\": portalId\n }), /*#__PURE__*/React.createElement(HiddenAnchor, {\n ref: anchorRef,\n tabIndex: \"-1\",\n \"aria-hidden\": \"true\"\n }), children);\n content = /*#__PURE__*/React.createElement(StyledLayer, {\n ref: layerRef,\n id: id,\n plain: plain,\n position: position,\n responsive: responsive,\n layerTarget: layerTarget,\n tabIndex: \"-1\",\n dir: theme.dir\n }, modal && /*#__PURE__*/React.createElement(StyledOverlay, {\n plain: plain,\n responsive: responsive,\n onMouseDown: onClickOutside\n }), content);\n if (onEsc) {\n content = /*#__PURE__*/React.createElement(Keyboard, {\n onEsc: onEsc ? function (event) {\n // prevent further capturing or bubbling of event to other\n // child or parent elements\n event.stopPropagation();\n onEsc(event);\n } : undefined,\n target: modal === false ? 'document' : undefined\n }, content);\n }\n var themeContextValue = useMemo(function () {\n var dark = backgroundIsDark(theme.layer.background, theme);\n return _extends({}, theme, {\n dark: dark\n });\n }, [theme]);\n if (theme.layer.background) {\n var dark = themeContextValue.dark;\n if (dark !== undefined && dark !== theme.dark) {\n content = /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: themeContextValue\n }, content);\n }\n }\n content = /*#__PURE__*/React.createElement(PortalContext.Provider, {\n value: nextPortalContext\n }, content);\n var hitResponsiveBreakpoint = responsive && size === theme.layer.responsiveBreakpoint;\n // if layer is responsive and we've hit the breakpoint,\n // the layer will be filling the viewport, so we want to\n // restrict the scroll to the layer and not allow the\n // body to scroll\n if (modal || hitResponsiveBreakpoint) {\n content = /*#__PURE__*/React.createElement(FocusedContainer, {\n hidden: position === 'hidden'\n // if layer has a target, do not restrict scroll.\n // restricting scroll could inhibit the user's\n // ability to scroll the page while the layer is open.\n ,\n restrictScroll: !layerTarget && (modal || hitResponsiveBreakpoint) ? true : undefined,\n trapFocus: true\n }, content);\n }\n return content;\n});\nexport { LayerContainer };","import PropTypes from 'prop-types';\nimport { backgroundDoc } from '../../utils/general-prop-types';\nvar PAD_SIZES = ['xxsmall', 'xsmall', 'small', 'medium', 'large'];\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n animate: PropTypes.bool,\n animation: PropTypes.oneOfType([PropTypes.oneOf(['slide', 'fadeIn', 'none']), PropTypes.bool]),\n background: backgroundDoc,\n full: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['vertical', 'horizontal'])]),\n margin: PropTypes.oneOfType([PropTypes.oneOf(['none'].concat(PAD_SIZES)), PropTypes.shape({\n bottom: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n end: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n left: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n right: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n start: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n top: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n vertical: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string])\n }), PropTypes.string]),\n modal: PropTypes.bool,\n onClickOutside: PropTypes.func,\n onEsc: PropTypes.func,\n plain: PropTypes.bool,\n position: PropTypes.oneOf(['bottom', 'bottom-left', 'bottom-right', 'center', 'end', 'hidden', 'left', 'right', 'start', 'top', 'top-left', 'top-right']),\n responsive: PropTypes.bool,\n target: PropTypes.object\n };\n}\nexport var LayerPropTypes = PropType;","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useContext, useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { getNewContainer } from '../../utils';\nimport { LayerContainer } from './LayerContainer';\nimport { animationDuration } from './StyledLayer';\nimport { ContainerTargetContext } from '../../contexts/ContainerTargetContext';\nimport { LayerPropTypes } from './propTypes';\nvar Layer = /*#__PURE__*/forwardRef(function (props, ref) {\n var animate = props.animate,\n animation = props.animation,\n targetChildPosition = props.targetChildPosition;\n var _useState = useState(),\n originalFocusedElement = _useState[0],\n setOriginalFocusedElement = _useState[1];\n useEffect(function () {\n return setOriginalFocusedElement(document.activeElement);\n }, []);\n var _useState2 = useState(),\n layerContainer = _useState2[0],\n setLayerContainer = _useState2[1];\n var containerTarget = useContext(ContainerTargetContext);\n useEffect(function () {\n return setLayerContainer(getNewContainer(containerTarget, targetChildPosition));\n }, [containerTarget, targetChildPosition]);\n\n // just a few things to clean up when the Layer is unmounted\n useLayoutEffect(function () {\n return function () {\n if (originalFocusedElement) {\n if (originalFocusedElement.focus) {\n // wait for the fixed positioning to come back to normal\n // see layer styling for reference\n setTimeout(function () {\n return originalFocusedElement.focus();\n }, 0);\n } else if (originalFocusedElement.parentNode && originalFocusedElement.parentNode.focus) {\n // required for IE11 and Edge\n originalFocusedElement.parentNode.focus();\n }\n }\n if (layerContainer) {\n var activeAnimation = animation !== undefined ? animation : animate;\n if (activeAnimation !== false) {\n // undefined uses 'slide' as the default\n // animate out and remove later\n var layerClone = layerContainer.cloneNode(true);\n layerClone.id = 'layerClone';\n containerTarget.appendChild(layerClone);\n var clonedContainer = layerClone.querySelector('[class*=\"StyledLayer__StyledContainer\"]');\n if (clonedContainer && clonedContainer.style) {\n clonedContainer.style.animationDirection = 'reverse';\n }\n setTimeout(function () {\n // we add the id and query here so the unit tests work\n var clone = containerTarget.getRootNode().getElementById('layerClone');\n if (clone) {\n if (containerTarget.contains(clone)) {\n containerTarget.removeChild(clone);\n }\n layerContainer.remove();\n }\n }, animationDuration);\n } else if (containerTarget.contains(layerContainer)) {\n containerTarget.removeChild(layerContainer);\n }\n }\n };\n }, [animate, animation, containerTarget, layerContainer, originalFocusedElement]);\n return layerContainer ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(LayerContainer, _extends({\n ref: ref\n }, props)), layerContainer) : null;\n});\nLayer.displayName = 'Layer';\nLayer.propTypes = LayerPropTypes;\nexport { Layer };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n drop: PropTypes.bool,\n heading: PropTypes.string,\n layer: PropTypes.bool\n };\n}\nexport var DataFiltersPropTypes = PropType;","var _excluded = [\"drop\", \"children\", \"heading\", \"layer\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { Children, useContext, useMemo, useState } from 'react';\nimport { Filter } from 'grommet-icons/icons/Filter';\nimport { FormClose } from 'grommet-icons/icons/FormClose';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { DataFilter } from '../DataFilter';\nimport { DataForm } from '../Data/DataForm';\nimport { DataSort } from '../DataSort';\nimport { DropButton } from '../DropButton';\nimport { Header } from '../Header';\nimport { Heading } from '../Heading';\nimport { Layer } from '../Layer';\nimport { DataContext } from '../../contexts/DataContext';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { DataFiltersPropTypes } from './propTypes';\nvar dropProps = {\n align: {\n top: 'bottom',\n right: 'right'\n }\n};\nvar layerProps = {\n full: 'vertical',\n position: 'right'\n};\nexport var DataFilters = function DataFilters(_ref) {\n var drop = _ref.drop,\n children = _ref.children,\n heading = _ref.heading,\n layer = _ref.layer,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(DataContext),\n clearFilters = _useContext.clearFilters,\n data = _useContext.data,\n dataId = _useContext.id,\n messages = _useContext.messages,\n properties = _useContext.properties,\n view = _useContext.view;\n var _useContext2 = useContext(MessageContext),\n format = _useContext2.format;\n var _useState = useState(),\n showContent = _useState[0],\n setShowContent = _useState[1];\n // touched is a map of form field name to its value, it only has fields that\n // were changed as part of the DataForm here. This is so we can track based\n // on what's inside DataFilters as opposed to trying to track from the view\n // object.\n var _useState2 = useState({}),\n touched = _useState2[0],\n setTouched = _useState2[1];\n var controlled = useMemo(function () {\n return drop || layer;\n }, [drop, layer]);\n // generate the badge value based on touched fields that have a value\n var badge = useMemo(function () {\n return controlled && Object.keys(touched).filter(function (k) {\n return touched[k];\n }).length || undefined;\n }, [controlled, touched]);\n var clearControl = badge && /*#__PURE__*/React.createElement(Box, {\n flex: false,\n margin: {\n start: 'small'\n }\n }, /*#__PURE__*/React.createElement(Button, {\n label: format({\n id: 'dataFilters.clear',\n messages: messages == null ? void 0 : messages.dataFilters\n }),\n onClick: function onClick() {\n setTouched({});\n clearFilters();\n }\n }));\n var content = children;\n if (Children.count(children) === 0) {\n var filtersFor;\n if (!properties && data && data.length)\n // build from a piece of data, ignore object values\n filtersFor = Object.keys(data[0]).filter(function (k) {\n return typeof data[0][k] !== 'object';\n });else if (Array.isArray(properties)) filtersFor = properties;else if (typeof properties === 'object') filtersFor = Object.keys(properties);else filtersFor = [];\n content = filtersFor.map(function (property) {\n return /*#__PURE__*/React.createElement(DataFilter, {\n key: property,\n property: property\n });\n });\n if (view != null && view.sort) {\n content.push( /*#__PURE__*/React.createElement(DataSort, {\n key: \"_sort\"\n }));\n }\n }\n content = /*#__PURE__*/React.createElement(DataForm, _extends({\n pad: controlled ? 'medium' : undefined,\n onDone: function onDone() {\n return setShowContent(false);\n },\n onTouched: controlled ? function (currentTouched) {\n return (\n // we merge this with our prior state to handle the case where the\n // user opens and closes the drop multiple times and we want to\n // track both new changes and prior changes.\n setTouched(function (prevTouched) {\n return _extends({}, prevTouched, currentTouched);\n })\n );\n } : undefined\n }, !controlled ? rest : {\n fill: 'vertical'\n }), layer && /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(Heading, {\n margin: \"none\",\n level: 2,\n size: \"small\"\n }, heading || format({\n id: 'dataFilters.heading',\n messages: messages == null ? void 0 : messages.dataFilters\n })), !controlled && clearControl, /*#__PURE__*/React.createElement(Button, {\n icon: /*#__PURE__*/React.createElement(FormClose, null),\n hoverIndicator: true,\n onClick: function onClick() {\n return setShowContent(undefined);\n }\n })), content);\n if (!controlled) return content;\n var tip = format({\n id: badge ? \"dataFilters.openSet.\" + (badge === 1 ? 'singular' : 'plural') : 'dataFilters.open',\n messages: messages == null ? void 0 : messages.dataFilters,\n values: {\n number: badge\n }\n });\n var control;\n if (drop) {\n control = /*#__PURE__*/React.createElement(DropButton, {\n id: dataId + \"--filters-control\",\n tip: tip,\n \"aria-label\": tip,\n kind: \"toolbar\",\n icon: /*#__PURE__*/React.createElement(Filter, null),\n hoverIndicator: true,\n dropProps: dropProps,\n dropContent: content,\n badge: badge,\n open: showContent,\n onOpen: function onOpen() {\n return setShowContent(undefined);\n },\n onClose: function onClose() {\n return setShowContent(undefined);\n }\n });\n } else if (layer) {\n control = /*#__PURE__*/React.createElement(Button, {\n id: dataId + \"--filters-control\",\n tip: tip,\n \"aria-label\": tip,\n kind: \"toolbar\",\n hoverIndicator: true,\n icon: /*#__PURE__*/React.createElement(Filter, null),\n badge: badge,\n onClick: function onClick() {\n return setShowContent(true);\n }\n });\n }\n return /*#__PURE__*/React.createElement(Box, _extends({\n flex: false,\n direction: \"row\"\n }, rest), control, clearControl, layer && showContent && /*#__PURE__*/React.createElement(Layer, _extends({\n id: dataId + \"--filters-layer\"\n }, typeof layer === 'object' ? layer : layerProps, {\n onClickOutside: function onClickOutside() {\n return setShowContent(undefined);\n },\n onEsc: function onEsc() {\n return setShowContent(undefined);\n }\n }), content));\n};\nDataFilters.propTypes = DataFiltersPropTypes;","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n drop: PropTypes.bool,\n responsive: PropTypes.bool\n };\n}\nexport var DataSearchPropTypes = PropType;","var _excluded = [\"drop\", \"id\", \"responsive\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useEffect, useState } from 'react';\nimport { Search } from 'grommet-icons/icons/Search';\nimport { Box } from '../Box';\nimport { DataContext } from '../../contexts/DataContext';\nimport { DataForm } from '../Data/DataForm';\nimport { DropButton } from '../DropButton';\nimport { FormContext } from '../Form/FormContext';\nimport { FormField } from '../FormField';\nimport { useSkeleton } from '../Skeleton';\nimport { TextInput } from '../TextInput';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { DataSearchPropTypes } from './propTypes';\nvar dropProps = {\n align: {\n top: 'bottom',\n left: 'left'\n }\n};\nexport var DataSearch = function DataSearch(_ref) {\n var drop = _ref.drop,\n idProp = _ref.id,\n responsive = _ref.responsive,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(DataContext),\n dataId = _useContext.id,\n messages = _useContext.messages,\n addToolbarKey = _useContext.addToolbarKey;\n var _useContext2 = useContext(FormContext),\n noForm = _useContext2.noForm;\n var _useContext3 = useContext(MessageContext),\n format = _useContext3.format;\n var size = useContext(ResponsiveContext);\n var skeleton = useSkeleton();\n var _useState = useState(),\n showContent = _useState[0],\n setShowContent = _useState[1];\n var id = idProp || dataId + \"--search\";\n useEffect(function () {\n if (noForm) addToolbarKey('_search');\n }, [addToolbarKey, noForm]);\n var content = skeleton ? null : /*#__PURE__*/React.createElement(TextInput, _extends({\n \"aria-label\": format({\n id: 'dataSearch.label',\n messages: messages == null ? void 0 : messages.dataSearch\n }),\n id: id,\n name: \"_search\",\n icon: /*#__PURE__*/React.createElement(Search, null),\n type: \"search\"\n }, rest));\n if (noForm)\n // likely in Toolbar\n content = /*#__PURE__*/React.createElement(DataForm, {\n footer: false,\n updateOn: \"change\"\n }, content);else content = /*#__PURE__*/React.createElement(FormField, {\n htmlFor: id,\n label: format({\n id: 'dataSearch.label',\n messages: messages == null ? void 0 : messages.dataSearch\n })\n }, content);\n if (!drop && (!responsive || size !== 'small' && size !== 'xsmall')) return content;\n var control = /*#__PURE__*/React.createElement(DropButton, _extends({\n id: dataId + \"--search-control\",\n \"aria-label\": format({\n id: 'dataSearch.open',\n messages: messages == null ? void 0 : messages.dataSort\n }),\n kind: \"toolbar\",\n icon: /*#__PURE__*/React.createElement(Search, null),\n dropProps: dropProps,\n dropContent: /*#__PURE__*/React.createElement(Box, {\n pad: \"small\"\n }, content),\n open: showContent,\n onOpen: function onOpen() {\n return setShowContent(undefined);\n },\n onClose: function onClose() {\n return setShowContent(undefined);\n }\n }, rest));\n return control;\n};\nDataSearch.propTypes = DataSearchPropTypes;","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n messages: PropTypes.shape({\n filteredTotal: PropTypes.number,\n total: PropTypes.number\n })\n };\n}\nexport var DataSummaryPropTypes = PropType;","var _excluded = [\"messages\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext } from 'react';\nimport { Text } from '../Text';\nimport { DataContext } from '../../contexts/DataContext';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { DataSummaryPropTypes } from './propTypes';\nexport var DataSummary = function DataSummary(_ref) {\n var messages = _ref.messages,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var _useContext2 = useContext(DataContext),\n filteredTotal = _useContext2.filteredTotal,\n dataMessages = _useContext2.messages,\n total = _useContext2.total;\n var messageId;\n if (total !== filteredTotal) {\n if (filteredTotal === 1) messageId = 'dataSummary.filteredSingle';else messageId = 'dataSummary.filtered';\n } else messageId = 'dataSummary.total';\n return /*#__PURE__*/React.createElement(Text, _extends({\n margin: {\n vertical: 'xsmall'\n }\n }, rest), format({\n id: messageId,\n messages: messages || (dataMessages == null ? void 0 : dataMessages.dataSummary),\n values: {\n filteredTotal: filteredTotal,\n total: total\n }\n }));\n};\nDataSummary.propTypes = DataSummaryPropTypes;","var PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {};\n}\nexport var DataViewPropTypes = PropType;","var _excluded = [\"id\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useEffect } from 'react';\nimport { DataForm } from '../Data/DataForm';\nimport { DataContext } from '../../contexts/DataContext';\nimport { FormContext } from '../Form/FormContext';\nimport { FormField } from '../FormField';\nimport { RadioButtonGroup } from '../RadioButtonGroup';\nimport { Select } from '../Select';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { DataViewPropTypes } from './propTypes';\nexport var DataView = function DataView(_ref) {\n var idProp = _ref.id,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(DataContext),\n dataId = _useContext.id,\n messages = _useContext.messages,\n view = _useContext.view,\n views = _useContext.views,\n addToolbarKey = _useContext.addToolbarKey;\n var _useContext2 = useContext(FormContext),\n noForm = _useContext2.noForm;\n var _useContext3 = useContext(MessageContext),\n format = _useContext3.format;\n var id = idProp || dataId + \"--view\";\n useEffect(function () {\n if (noForm) addToolbarKey('_view');\n }, [addToolbarKey, noForm]);\n if (!views) return null;\n var names = views.map(function (v) {\n return v.name;\n });\n var content;\n if (!noForm && names.length < 7) {\n content = /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({\n id: id,\n name: \"_view\",\n options: names,\n value: view == null ? void 0 : view.name\n }, rest));\n } else {\n content = /*#__PURE__*/React.createElement(Select, _extends({\n id: id,\n name: \"_view\",\n showSelectedInline: true,\n placeholder: noForm ? 'Select view' : undefined,\n options: names,\n value: view == null ? void 0 : view.name\n }, rest));\n }\n if (noForm)\n // likely in Toolbar\n content = /*#__PURE__*/React.createElement(DataForm, {\n footer: false,\n updateOn: \"change\"\n }, content);else content = /*#__PURE__*/React.createElement(FormField, {\n htmlFor: id,\n label: format({\n id: 'dataView.label',\n messages: messages == null ? void 0 : messages.dataView\n })\n }, content);\n return content;\n};\nDataView.propTypes = DataViewPropTypes;","var PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {};\n}\nexport var ToolbarPropTypes = PropType;","var _excluded = [\"children\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext } from 'react';\nimport { Box } from '../Box';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { ToolbarPropTypes } from './propTypes';\nvar defaultLayoutProps = {\n direction: 'row',\n align: 'start',\n gap: 'small'\n};\nvar smallLayoutProps = {\n direction: 'row',\n wrap: true,\n align: 'start',\n gap: 'small'\n};\nexport var Toolbar = function Toolbar(_ref) {\n var children = _ref.children,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var size = useContext(ResponsiveContext);\n var layoutProps = size === 'small' || size === 'xsmall' ? smallLayoutProps : defaultLayoutProps;\n return /*#__PURE__*/React.createElement(Box, _extends({\n flex: false,\n cssGap: true\n }, layoutProps, rest), children);\n};\nToolbar.propTypes = ToolbarPropTypes;\nToolbar.defaultProps = {};","import PropTypes from 'prop-types';\nvar viewType = PropTypes.shape({\n properties: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.shape({})]),\n search: PropTypes.string,\n sort: PropTypes.shape({\n direction: PropTypes.oneOf(['asc', 'desc']),\n property: PropTypes.string\n })\n});\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n data: PropTypes.arrayOf(PropTypes.shape({})),\n defaultView: viewType,\n onView: PropTypes.func,\n properties: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.shape({})]),\n toolbar: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['search', 'filters'])]),\n total: PropTypes.number,\n updateOn: PropTypes.oneOf(['change', 'submit']),\n view: PropTypes.oneOfType([PropTypes.string, viewType])\n };\n}\nexport var DataPropTypes = PropType;","// TODO: share with DataTable, List, Cards, etc.\nvar datumValue = function datumValue(datum, property) {\n if (!property) return undefined;\n var parts = property.split('.');\n if (parts.length === 1) return datum[property];\n if (!datum[parts[0]]) return undefined;\n return datumValue(datum[parts[0]], parts.slice(1).join('.'));\n};\n\n// This is where we filter the data internally, when the caller doesn't\n// provide an onView.\nexport var filter = function filter(data, view, properties) {\n var _view$sort, _view$sort2;\n // from https://stackoverflow.com/a/6300266/8513067\n var searchExp = view != null && view.search ? new RegExp(view.search.replace(/[#-.]|[[-^]|[?|{}]/g, '\\\\$&'), 'i') : undefined;\n var searchProperties;\n if (searchExp && properties) {\n // if we know where we want to search, look there\n searchProperties = Object.keys(properties).filter(function (k) {\n return properties[k].search;\n });\n // if none specified, look in all defined properties\n if (searchProperties.length === 0) searchProperties = Object.keys(properties);\n }\n var filteredData = data.filter(function (datum) {\n var matched = true;\n\n // check whether it matches any search\n if (searchExp) {\n var searchWith = function searchWith(property) {\n var value = datumValue(datum, property);\n if (value === undefined) return false;\n return searchExp.test(value);\n };\n if (searchProperties) matched = searchProperties.some(searchWith);else matched = Object.keys(datum).some(searchWith);\n }\n\n // check whether it matches any specific values\n if (matched && view != null && view.properties) {\n // if any properties don't match, overall not matched\n matched = !Object.keys(view.properties).some(function (property) {\n // returning true means it doesn't match the filter,\n var filterValue = view.properties[property];\n var value = datumValue(datum, property);\n\n // range case\n if (typeof (filterValue == null ? void 0 : filterValue.min) === 'number' || typeof (filterValue == null ? void 0 : filterValue.max) === 'number') return typeof value !== 'number' || value <= filterValue.min || value >= filterValue.max;\n\n // options case\n if (Array.isArray(filterValue)) {\n return !filterValue.some(function (f) {\n // f may be an object with form {label: __, value: __}\n var isObject = typeof f === 'object';\n // match f within data value array using .includes()\n if (Array.isArray(value)) {\n return isObject ? value.includes(f == null ? void 0 : f.value) : value.includes(f);\n }\n // match f with data value using ===\n return isObject ? (f == null ? void 0 : f.value) === value : f === value;\n });\n }\n\n // presence case\n if (typeof filterValue === 'boolean') return filterValue === !value;\n\n // not sure, keep it\n return false;\n });\n }\n return matched;\n });\n if (view != null && (_view$sort = view.sort) != null && _view$sort.property || view != null && (_view$sort2 = view.sort) != null && _view$sort2.direction) {\n var _view$sort3 = view.sort,\n property = _view$sort3.property,\n direction = _view$sort3.direction;\n var prop = property || filteredData.length && Object.keys(filteredData[0])[0];\n var sortDesc = direction === 'desc'; // default to asc\n var before = sortDesc ? -1 : 1;\n var after = sortDesc ? 1 : -1;\n filteredData.sort(function (d1, d2) {\n var d1Val = datumValue(d1, prop);\n var d2Val = datumValue(d2, prop);\n // sort strings via locale case insensitive\n if (typeof d1Val === 'string' && typeof d2Val === 'string' || typeof d1Val === 'string' && !d2Val || typeof d2Val === 'string' && !d1Val) {\n var sortResult = (d1Val || '').localeCompare(d2Val || '', undefined, {\n sensitivity: 'base'\n });\n return sortDesc ? -sortResult : sortResult;\n }\n // numbers are easier to sort\n if (d1Val > d2Val) return before;\n if (d1Val < d2Val) return after;\n return 0;\n });\n }\n var pagedData;\n if (view != null && view.step) {\n var _view$page;\n var start = view.step * (((_view$page = view == null ? void 0 : view.page) != null ? _view$page : 1) - 1);\n pagedData = filteredData.slice(start, start + view.step);\n }\n return {\n unfilteredData: data,\n data: pagedData || filteredData,\n total: data.length,\n filteredTotal: filteredData.length\n };\n};","var _excluded = [\"children\", \"data\", \"defaultView\", \"filteredTotal\", \"id\", \"messages\", \"onView\", \"properties\", \"toolbar\", \"total\", \"updateOn\", \"view\", \"views\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { Box } from '../Box';\nimport { DataFilters } from '../DataFilters';\nimport { DataSearch } from '../DataSearch';\nimport { DataSummary } from '../DataSummary';\nimport { DataView } from '../DataView';\nimport { Toolbar } from '../Toolbar';\nimport { DataContext } from '../../contexts/DataContext';\nimport { DataPropTypes } from './propTypes';\nimport { filter } from './filter';\nvar defaultDefaultView = {\n search: ''\n};\nvar normalizeView = function normalizeView(viewProp, views) {\n return typeof viewProp === 'string' && (views == null ? void 0 : views.find(function (v) {\n return v.name === viewProp;\n })) || typeof viewProp === 'object' && viewProp;\n};\nexport var Data = function Data(_ref) {\n var children = _ref.children,\n _ref$data = _ref.data,\n dataProp = _ref$data === void 0 ? [] : _ref$data,\n _ref$defaultView = _ref.defaultView,\n defaultView = _ref$defaultView === void 0 ? defaultDefaultView : _ref$defaultView,\n filteredTotal = _ref.filteredTotal,\n _ref$id = _ref.id,\n id = _ref$id === void 0 ? 'data' : _ref$id,\n messages = _ref.messages,\n onView = _ref.onView,\n properties = _ref.properties,\n toolbar = _ref.toolbar,\n total = _ref.total,\n _ref$updateOn = _ref.updateOn,\n updateOn = _ref$updateOn === void 0 ? 'submit' : _ref$updateOn,\n viewProp = _ref.view,\n views = _ref.views,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useState = useState(normalizeView(viewProp || defaultView, views)),\n view = _useState[0],\n setView = _useState[1];\n useEffect(function () {\n return setView(normalizeView(viewProp || defaultView, views));\n }, [defaultView, viewProp, views]);\n var _useState2 = useState([]),\n toolbarKeys = _useState2[0],\n setToolbarKeys = _useState2[1];\n var result = useMemo(function () {\n var _ref2;\n if (onView)\n // caller is filtering\n return {\n data: dataProp,\n total: total,\n filteredTotal: (_ref2 = filteredTotal != null ? filteredTotal : dataProp == null ? void 0 : dataProp.length) != null ? _ref2 : 0\n };\n return filter(dataProp, view, properties);\n }, [dataProp, filteredTotal, onView, properties, total, view]);\n\n // what we use for DataContext value\n var contextValue = useMemo(function () {\n var value = _extends({\n id: id,\n messages: messages,\n properties: properties,\n updateOn: updateOn,\n view: view,\n views: views\n }, result);\n value.clearFilters = function () {\n var nextView = defaultView;\n setView(nextView);\n if (onView) onView(nextView);\n };\n value.onView = function (nextView) {\n setView(nextView);\n if (onView) onView(nextView);\n };\n value.addToolbarKey = function (key) {\n setToolbarKeys(function (prevKeys) {\n if (prevKeys.includes(key)) return prevKeys;\n return [].concat(prevKeys, [key]);\n });\n };\n value.toolbarKeys = toolbarKeys;\n return value;\n }, [defaultView, id, messages, onView, properties, result, toolbarKeys, updateOn, view, views]);\n var toolbarContent;\n if (toolbar) {\n toolbarContent = [/*#__PURE__*/React.createElement(Toolbar, {\n key: \"toolbar\"\n }, (toolbar === true || toolbar === 'search') && /*#__PURE__*/React.createElement(DataSearch, null), (toolbar === true || toolbar === 'view') && /*#__PURE__*/React.createElement(DataView, null), (toolbar === true || toolbar === 'filters') && /*#__PURE__*/React.createElement(DataFilters, {\n drop: true\n })), /*#__PURE__*/React.createElement(DataSummary, {\n key: \"summary\"\n })];\n }\n return /*#__PURE__*/React.createElement(DataContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Box, _extends({\n id: id,\n flex: false\n }, rest), toolbarContent, children));\n};\nData.propTypes = DataPropTypes;","export { Data } from './Data';\nexport { DataForm, formColumnsKey, formRangeKey, formSearchKey, formSortKey } from './DataForm';","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { normalizeColor, parseMetricToNum } from '../../utils';\nvar Swatch = function Swatch(_ref) {\n var aspect = _ref.aspect,\n color = _ref.color,\n dash = _ref.dash,\n opacityProp = _ref.opacity,\n point = _ref.point,\n round = _ref.round,\n thickness = _ref.thickness,\n type = _ref.type;\n var theme = useContext(ThemeContext);\n var dim = parseInt(theme.global.spacing, 10) / 2;\n var half = dim / 2;\n var height = dim;\n var width = dim;\n var normalizedColor = color ? normalizeColor(color.color || color, theme) : undefined;\n var fill = normalizedColor;\n var stroke = 'none';\n var content;\n if (aspect === 'x') content = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M 0 \" + half + \" L \" + dim + \" \" + half,\n stroke: \"#000\"\n });else if (aspect === 'y') content = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M \" + half + \" 0 L \" + half + \" \" + dim,\n stroke: \"#000\"\n });else if (aspect === 'thickness') content = /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"#000\",\n fill: \"none\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: half,\n cy: half,\n r: half / 4\n }), /*#__PURE__*/React.createElement(\"circle\", {\n cx: half,\n cy: half,\n r: half - 1\n }));else if (aspect === 'color') content = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 0,\n y: 0,\n width: half,\n height: dim,\n fill: \"#000\",\n opacity: 0.4\n }), /*#__PURE__*/React.createElement(\"rect\", {\n x: half,\n y: 0,\n width: half,\n height: dim,\n fill: \"#000\",\n opacity: 0.8\n }));else if (point) {\n if (point === 'circle') content = /*#__PURE__*/React.createElement(\"circle\", {\n cx: half,\n cy: half,\n r: half\n });else {\n var d;\n if (point === 'diamond') d = \"M \" + half + \" 0 L \" + dim + \" \" + half + \" L \" + half + \" \" + dim + \" L 0 \" + half + \" Z\";else if (point === 'star') {\n var off1 = half / 3;\n var off2 = off1 * 2;\n d = \"M \" + half + \" 0 L \" + (half - off2) + \" \" + dim + \" L \" + dim + \" \" + (half - off1) + \" L 0 \" + (half - off1) + \" L \" + (half + off2) + \" \" + dim + \" Z\";\n } else if (point === 'triangle') d = \"M \" + half + \" 0 L \" + dim + \" \" + dim + \" L 0 \" + dim + \" Z\";else if (point === 'triangleDown') d = \"M 0 0 L \" + dim + \" 0 L \" + half + \" \" + dim + \" Z\";else if (point === 'square') d = \"M 0 0 L \" + dim + \" 0 L \" + dim + \" \" + dim + \" L 0 \" + dim + \" Z\";\n if (d) content = /*#__PURE__*/React.createElement(\"path\", {\n d: d\n });\n }\n } else if (type === 'area') {\n if (round) content = /*#__PURE__*/React.createElement(\"circle\", {\n cx: half,\n cy: half,\n r: half\n });else content = /*#__PURE__*/React.createElement(\"rect\", {\n x: 0,\n y: 0,\n width: width,\n height: height\n });\n } else {\n // draw a line oriented based on the type and then match style\n var strokeWidth = parseMetricToNum(theme.global.edgeSize[thickness]) || dim;\n var _d;\n if (type === 'line' || type === 'area') {\n width = Math.max(width, strokeWidth * 4);\n height = strokeWidth;\n _d = \"M 0 \" + height / 2 + \" L \" + width + \" \" + height / 2;\n } else {\n width = strokeWidth;\n _d = \"M \" + width / 2 + \" 0 L \" + width / 2 + \" \" + dim;\n }\n fill = 'none';\n stroke = normalizedColor;\n var strokeProps = {};\n if (round) strokeProps.strokeLinecap = 'round';\n if (dash) strokeProps.strokeDasharray = round ? strokeWidth + \" \" + strokeWidth * 1.5 : strokeWidth * 2 + \" \" + strokeWidth / 2;\n content = /*#__PURE__*/React.createElement(\"path\", _extends({\n d: _d,\n strokeWidth: strokeWidth\n }, strokeProps));\n }\n var opacity = theme.global.opacity[(color == null ? void 0 : color.opacity) || opacityProp] || undefined;\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: width,\n height: height,\n viewBox: \"0 0 \" + width + \" \" + height,\n fill: fill,\n opacity: opacity,\n stroke: stroke\n }, content);\n};\nexport { Swatch };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { Fragment, useCallback, useContext, useMemo, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Drop } from '../Drop';\nimport { Grid } from '../Grid';\nimport { Keyboard } from '../Keyboard';\nimport { Text } from '../Text';\nimport { focusStyle, parseMetricToNum, unfocusStyle } from '../../utils';\nimport { Swatch } from './Swatch';\nvar DetailControl = styled(Box).withConfig({\n displayName: \"Detail__DetailControl\",\n componentId: \"sc-huiwg9-0\"\n})([\"&:focus{\", \"}&:focus:not(:focus-visible){\", \"}\"], focusStyle(), unfocusStyle());\nvar Detail = function Detail(_ref) {\n var activeProperty = _ref.activeProperty,\n axis = _ref.axis,\n data = _ref.data,\n horizontalProp = _ref.horizontal,\n padProp = _ref.pad,\n series = _ref.series,\n seriesStyles = _ref.seriesStyles,\n renderValue = _ref.renderValue,\n thickness = _ref.thickness;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(),\n detailIndex = _useState[0],\n setDetailIndex = _useState[1];\n var activeIndex = useRef();\n var detailRefs = useMemo(function () {\n return [];\n }, []);\n var pad = useMemo(function () {\n // ensure the hit targets and center lines align with\n // the data/guide lines\n var horizontal = (padProp == null ? void 0 : padProp.horizontal) || typeof padProp === 'string' && padProp || 0;\n horizontal = theme.global.edgeSize[horizontal] || horizontal;\n horizontal = parseMetricToNum(horizontal);\n var vertical = (padProp == null ? void 0 : padProp.vertical) || typeof padProp === 'string' && padProp || 0;\n vertical = theme.global.edgeSize[vertical] || vertical;\n vertical = parseMetricToNum(vertical);\n return {\n horizontal: horizontal - parseMetricToNum(thickness) / 2 + \"px\",\n vertical: vertical + \"px\"\n };\n }, [padProp, theme.global.edgeSize, thickness]);\n var onMouseLeave = useCallback(function (event) {\n // Only remove detail if the mouse isn't over the active index.\n // This helps distinguish leaving the drop on the edge where it is\n // anchored.\n var rect = activeIndex.current.getBoundingClientRect();\n if (event.pageX < rect.left || event.pageX > rect.right || event.pageY < rect.top || event.pageY > rect.bottom) {\n activeIndex.current = undefined;\n setDetailIndex(undefined);\n }\n }, []);\n var dropAlign = useMemo(function () {\n var res;\n if (detailIndex > data.length / 2) {\n if (horizontalProp) res = {\n bottom: 'top'\n };else res = {\n right: 'left'\n };\n } else if (horizontalProp) res = {\n top: 'bottom'\n };else res = {\n left: 'right'\n };\n return res;\n }, [data.length, detailIndex, horizontalProp]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Keyboard, {\n onLeft: function onLeft() {\n if (detailIndex === undefined) setDetailIndex(data.length - 1);else if (detailIndex > 0) setDetailIndex(detailIndex - 1);\n },\n onRight: function onRight() {\n if (detailIndex === undefined) setDetailIndex(0);else if (detailIndex < data.length - 1) setDetailIndex(detailIndex + 1);\n }\n }, /*#__PURE__*/React.createElement(DetailControl, _extends({\n key: \"band\",\n tabIndex: 0,\n fill: true,\n justify: \"between\",\n responsive: false\n }, horizontalProp ? {\n direction: 'column'\n } : {\n direction: 'row',\n pad: pad\n }, {\n onFocus: function onFocus() {},\n onBlur: function onBlur() {\n return setDetailIndex(undefined);\n }\n }), data.map(function (_, i) {\n var ref = function ref(c) {\n detailRefs[i] = c;\n };\n return /*#__PURE__*/React.createElement(Box\n // eslint-disable-next-line react/no-array-index-key\n , _extends({\n key: i,\n responsive: false\n }, horizontalProp ? {\n justify: 'center',\n height: thickness\n } : {\n align: 'center',\n width: thickness\n }, {\n onMouseOver: function onMouseOver(event) {\n activeIndex.current = event.currentTarget;\n setDetailIndex(i);\n },\n onMouseLeave: onMouseLeave,\n onFocus: function onFocus() {},\n onBlur: function onBlur() {}\n }), /*#__PURE__*/React.createElement(Box\n // for horizontal, ref will be placed on child box so\n // drop is restricted to drop dimensions as opposed\n // to filling the chart width\n , _extends({}, horizontalProp ? {\n fill: 'horizontal'\n } : {\n ref: ref,\n fill: 'vertical'\n }, {\n border: detailIndex === i ? true : undefined\n }), horizontalProp ? /*#__PURE__*/React.createElement(Box, {\n alignSelf: \"center\",\n ref: ref\n }) : null));\n }))), detailIndex !== undefined && detailRefs[detailIndex] && /*#__PURE__*/React.createElement(Drop, {\n key: \"drop\",\n target: detailRefs[detailIndex],\n align: dropAlign,\n plain: true,\n onMouseLeave: onMouseLeave\n }, /*#__PURE__*/React.createElement(Box, {\n pad: \"small\",\n background: {\n color: 'background-back'\n }\n }, /*#__PURE__*/React.createElement(Grid, {\n columns: ['auto', 'auto', 'auto'],\n gap: \"xsmall\",\n align: \"center\"\n }, series.filter(function (_ref2) {\n var _data$detailIndex;\n var property = _ref2.property;\n return (!activeProperty || activeProperty === property) && (data == null || (_data$detailIndex = data[detailIndex]) == null ? void 0 : _data$detailIndex[property]) !== undefined || axis && axis.x && axis.x.property === property;\n }).map(function (serie) {\n var propertyStyle = seriesStyles[serie.property];\n var axisValue = horizontalProp ? data[detailIndex][serie.property] : detailIndex;\n return /*#__PURE__*/React.createElement(Fragment, {\n key: serie.property\n }, propertyStyle ? /*#__PURE__*/React.createElement(Swatch, propertyStyle) : /*#__PURE__*/React.createElement(\"span\", null), /*#__PURE__*/React.createElement(Text, {\n size: \"small\"\n }, serie.label || serie.property), /*#__PURE__*/React.createElement(Text, {\n size: \"small\",\n weight: \"bold\"\n }, renderValue(serie, axisValue)));\n })))));\n};\nexport { Detail };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useMemo } from 'react';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Text } from '../Text';\nimport { Swatch } from './Swatch';\nvar Legend = function Legend(_ref) {\n var activeProperty = _ref.activeProperty,\n seriesProp = _ref.series,\n seriesStyles = _ref.seriesStyles,\n setActiveProperty = _ref.setActiveProperty;\n var series = useMemo(function () {\n return seriesProp.filter(function (s) {\n return seriesStyles[s.property];\n });\n }, [seriesProp, seriesStyles]);\n var interactive = useMemo(\n // filter out properties that are used in point chart aspects\n function () {\n return series.filter(function (_ref2) {\n var property = _ref2.property;\n return !seriesStyles[property].aspect;\n }).length > 1;\n }, [series, seriesStyles]);\n return /*#__PURE__*/React.createElement(Box, {\n margin: {\n top: 'small'\n },\n direction: \"row\",\n wrap: true,\n gap: \"small\"\n }, series.map(function (_ref3) {\n var property = _ref3.property,\n label = _ref3.label;\n var isActive = property === activeProperty;\n var swatchProps = {};\n var textProps = {};\n if (activeProperty !== undefined) {\n if (!isActive) {\n // swatchProps.color = 'status-disabled';\n textProps.color = 'text-xweak';\n } else {\n textProps.color = 'text-strong';\n }\n }\n var content = /*#__PURE__*/React.createElement(Box, {\n key: property,\n direction: \"row\",\n align: \"center\",\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n gap: \"xsmall\"\n }, /*#__PURE__*/React.createElement(Swatch, _extends({}, seriesStyles[property], swatchProps)), /*#__PURE__*/React.createElement(Text, textProps, label || property));\n if (interactive) {\n content = /*#__PURE__*/React.createElement(Button, {\n key: property,\n active: isActive,\n onClick: function onClick() {\n return setActiveProperty(isActive ? undefined : property);\n },\n hoverIndicator: true\n }, content);\n }\n return content;\n }));\n};\nexport { Legend };","import { round } from '../Chart';\nexport var points = ['circle', 'diamond', 'square', 'star', 'triangle', 'triangleDown'];\nexport var heightYGranularity = {\n xxsmall: {\n fine: 2,\n medium: 2\n },\n xsmall: {\n fine: 3,\n medium: 2\n },\n small: {\n fine: 5,\n medium: 3\n },\n medium: {\n fine: 7,\n medium: 5\n },\n large: {\n fine: 9,\n medium: 5\n },\n xlarge: {\n fine: 11,\n medium: 5\n }\n};\nexport var halfPad = {\n xlarge: 'large',\n large: 'medium',\n medium: 'small',\n small: 'xsmall',\n xsmall: 'xxsmall'\n};\nexport var doublePad = {\n large: 'xlarge',\n medium: 'large',\n small: 'medium',\n xsmall: 'small',\n xxsmall: 'xsmall'\n};\nvar orderedSizes = ['xlarge', 'large', 'medium', 'small', 'xsmall', 'xxsmall', 'hair'];\nexport var showInUnits = function showInUnits(content, maxValue) {\n var divideBy;\n var unit;\n var newContent = content;\n if (maxValue > 10000000) {\n divideBy = 1000000;\n unit = 'M';\n } else if (maxValue > 10000) {\n divideBy = 1000;\n unit = 'K';\n }\n if (divideBy) newContent = round(newContent / divideBy, 0);\n if (unit) newContent = \"\" + newContent + unit;\n return newContent;\n};\nexport var largestSize = function largestSize(size1, size2) {\n if (size1 && !size2) return size1;\n if (size2 && !size1) return size2;\n if (orderedSizes.indexOf(size1) < orderedSizes.indexOf(size2)) return size1;\n return size2;\n};\nexport var createDateFormat = function createDateFormat(firstValue, lastValue, full) {\n var dateFormat;\n var startDate = new Date(firstValue);\n var endDate = new Date(lastValue);\n if (\n // check for valid dates, this is the fastest way\n !Number.isNaN(startDate.getTime()) && !Number.isNaN(endDate.getTime())) {\n var delta = Math.abs(endDate - startDate);\n var options;\n if (delta < 60000)\n // less than 1 minute\n options = full ? {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n day: undefined\n } : {\n second: '2-digit',\n day: undefined\n };else if (delta < 3600000)\n // less than 1 hour\n options = full ? {\n hour: 'numeric',\n minute: '2-digit',\n day: undefined\n } : {\n minute: '2-digit',\n day: undefined\n };else if (delta < 86400000)\n // less than 1 day\n options = {\n hour: 'numeric'\n };else if (delta < 2592000000)\n // less than 30 days\n options = {\n month: full ? 'short' : 'numeric',\n day: 'numeric'\n };else if (delta < 31557600000)\n // less than 1 year\n options = {\n month: full ? 'long' : 'short'\n };\n // 1 year or more\n else options = {\n year: 'numeric'\n };\n if (options) dateFormat = new Intl.DateTimeFormat(undefined, options).format;\n }\n return dateFormat;\n};\nexport var minimum = function minimum(value1, value2) {\n return value1 !== undefined ? Math.min(value1, value2) : value2;\n};\nexport var maximum = function maximum(value1, value2) {\n return value1 !== undefined ? Math.max(value1, value2) : value2;\n};","var _excluded = [\"values\", \"pad\", \"renderValue\", \"serie\", \"theme\", \"thickness\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useMemo } from 'react';\nimport { edgeToNum } from '../../utils';\nimport { Box } from '../Box';\nimport { showInUnits } from './utils';\nvar onlyHorizontalPad = function onlyHorizontalPad(pad) {\n var result;\n if (pad) {\n if (typeof pad === 'string') result = {\n horizontal: pad\n };else result = {\n horizontal: pad.horizontal,\n start: pad.start,\n end: pad.end,\n left: pad.left,\n right: pad.right\n };\n }\n return result;\n};\nvar XAxis = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var values = _ref.values,\n padProp = _ref.pad,\n renderValue = _ref.renderValue,\n serie = _ref.serie,\n theme = _ref.theme,\n thickness = _ref.thickness,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _ref2 = serie || {},\n render = _ref2.render,\n suffix = _ref2.suffix;\n\n // pad to the edge of the thickness, for when padding is more than half\n // the thickness\n var pad = useMemo(function () {\n return thickness && padProp && {\n start: edgeToNum(padProp.start || padProp.horizontal, theme) - edgeToNum(thickness, theme) / 2 + \"px\",\n end: edgeToNum(padProp.end || padProp.horizontal, theme) - edgeToNum(thickness, theme) / 2 + \"px\"\n } || onlyHorizontalPad(padProp);\n }, [padProp, theme, thickness]);\n\n // When there are only labels at the end of the axis and there isn't\n // much space for them, let them take as much space as they like\n // flowing in from the edges.\n // Otherwise, align their container to the\n // data/guide lines and then let their content overflow that.\n var labelContainerProps = useMemo(function () {\n // 24px was chosen empirically as 48px is enough to show some simple text\n var centered = values.length !== 2 || edgeToNum((padProp == null ? void 0 : padProp.start) || (padProp == null ? void 0 : padProp.horizontal), theme) >= 24;\n if (centered) return {\n basis: thickness || '1px',\n overflow: 'visible',\n align: 'center'\n };\n return {};\n }, [padProp, theme, thickness, values]);\n return /*#__PURE__*/React.createElement(Box, _extends({\n ref: ref,\n gridArea: \"xAxis\",\n direction: \"row\",\n justify: \"between\",\n pad: pad\n }, rest), values.map(function (axisValue, i) {\n var content = serie ? renderValue(serie, axisValue) : axisValue;\n if (content === axisValue && !render && !suffix) {\n var maxValue = Math.max.apply(Math, values.map(function (v) {\n return Math.abs(v);\n }));\n content = showInUnits(content, maxValue);\n }\n return (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(Box, _extends({\n key: i\n }, labelContainerProps), content)\n );\n }));\n});\nexport { XAxis };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useMemo } from 'react';\nimport { edgeToNum } from '../../utils';\nimport { Box } from '../Box';\nimport { showInUnits } from './utils';\nvar onlyVerticalPad = function onlyVerticalPad(pad) {\n var result;\n if (pad) {\n if (typeof pad === 'string') result = {\n vertical: pad\n };else result = {\n vertical: pad.vertical,\n top: pad.top,\n bottom: pad.bottom\n };\n }\n return result;\n};\nvar YAxis = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var values = _ref.values,\n padProp = _ref.pad,\n renderValue = _ref.renderValue,\n serie = _ref.serie,\n theme = _ref.theme,\n thickness = _ref.thickness;\n var _ref2 = serie || {},\n render = _ref2.render,\n suffix = _ref2.suffix;\n\n // pad to the edge of the thickness, for when padding is more than half\n // the thickness\n var pad = useMemo(function () {\n return padProp && thickness && {\n top: edgeToNum(padProp.top || padProp.vertical, theme) - edgeToNum(thickness, theme) / 2 + \"px\",\n bottom: edgeToNum(padProp.bottom || padProp.vertical, theme) - edgeToNum(thickness, theme) / 2 + \"px\"\n } || onlyVerticalPad(padProp);\n }, [padProp, theme, thickness]);\n\n // When there are only labels at the end of the axis and there isn't\n // much space for them, let them take as much space as they like\n // flowing in from the edges.\n // Otherwise, align their container to the\n // data/guide lines and then let their content overflow that.\n var labelContainerProps = useMemo(function () {\n // 24px was chosen empirically as 48px is enough to show some simple text\n var centered = values.length !== 2 || edgeToNum((padProp == null ? void 0 : padProp.start) || (padProp == null ? void 0 : padProp.horizontal), theme) >= 24;\n if (centered) return {\n basis: thickness || '1px',\n overflow: 'visible',\n justify: 'center'\n };\n return {};\n }, [padProp, theme, thickness, values]);\n return /*#__PURE__*/React.createElement(Box, {\n ref: ref,\n gridArea: \"yAxis\",\n justify: \"between\",\n flex: true,\n pad: pad\n }, values.map(function (axisValue, i) {\n var content = serie ? renderValue(serie, axisValue, true) : axisValue;\n if (content === axisValue && !render && !suffix) {\n var maxValue = Math.max.apply(Math, values.map(function (v) {\n return Math.abs(v);\n }));\n content = showInUnits(content, maxValue);\n }\n return /*#__PURE__*/React.createElement(Box\n // eslint-disable-next-line react/no-array-index-key\n , _extends({\n key: i,\n align: \"end\"\n }, labelContainerProps), content);\n }));\n});\nexport { YAxis };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef } from 'react';\nimport { Box } from '../Box';\nvar XGuide = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var guide = _ref.guide,\n padArg = _ref.pad,\n thickness = _ref.thickness;\n var pad = padArg;\n if (thickness) {\n // omit any horizontal pad so the guides cover the thickness that\n // is within the pad\n if (typeof padArg === 'object') pad = _extends({}, padArg, {\n top: 'none',\n bottom: 'none'\n });else if (typeof padArg === 'string') pad = {\n horizontal: padArg\n };\n }\n return /*#__PURE__*/React.createElement(Box, {\n ref: ref,\n fill: true,\n direction: \"row\",\n justify: \"between\",\n pad: pad,\n responsive: false\n }, Array.from({\n length: guide.x.count\n }).map(function (_, i) {\n return (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(Box, {\n key: i,\n border: \"left\"\n })\n );\n }));\n});\nexport { XGuide };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef } from 'react';\nimport { Box } from '../Box';\nvar YGuide = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var guide = _ref.guide,\n padArg = _ref.pad,\n thickness = _ref.thickness;\n var pad = padArg;\n if (thickness) {\n // omit any horizontal pad so the guides cover the thickness that\n // is within the pad\n if (typeof padArg === 'object') pad = _extends({}, padArg, {\n start: 'none',\n end: 'none'\n });else if (typeof padArg === 'string') pad = {\n vertical: padArg\n };\n }\n return /*#__PURE__*/React.createElement(Box, {\n ref: ref,\n fill: true,\n justify: \"between\",\n pad: pad,\n responsive: false\n }, Array.from({\n length: guide.y.count\n }).map(function (_, i) {\n return (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(Box, {\n key: i,\n border: \"top\"\n })\n );\n }));\n});\nexport { YGuide };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps, padPropType, pointPropType } from '../../utils/general-prop-types';\nvar colorType = PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.shape({\n color: PropTypes.string,\n value: PropTypes.number\n}))]);\nvar thicknessType = PropTypes.oneOfType([PropTypes.oneOf(['hair', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'none']), PropTypes.string]);\nvar chartType = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n property: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n property: PropTypes.string,\n color: colorType\n })])), PropTypes.shape({\n color: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n property: PropTypes.string,\n transform: PropTypes.func\n })]),\n thickness: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n property: PropTypes.string,\n transform: PropTypes.func\n })]),\n x: PropTypes.string,\n y: PropTypes.string\n })]),\n color: colorType,\n dash: PropTypes.bool,\n opacity: PropTypes.oneOfType([PropTypes.oneOf(['weak', 'medium', 'strong']), PropTypes.number, PropTypes.bool]),\n point: pointPropType,\n round: PropTypes.bool,\n thickness: thicknessType,\n type: PropTypes.oneOf(['bar', 'bars', 'line', 'area', 'areas', 'lines', 'point'])\n})]);\nvar seriesType = PropTypes.oneOfType([PropTypes.string,\n// property\nPropTypes.shape({\n label: PropTypes.oneOfType([PropTypes.string]),\n prefix: PropTypes.string,\n property: PropTypes.string,\n render: PropTypes.func,\n suffix: PropTypes.string\n})]);\nvar granularityType = PropTypes.oneOf(['coarse', 'medium', 'fine']);\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n axis: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n x: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.shape({\n property: PropTypes.string,\n granularity: granularityType\n })]),\n y: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.shape({\n property: PropTypes.string,\n granularity: granularityType\n })])\n })]),\n bounds: PropTypes.oneOfType([PropTypes.oneOf(['align']), PropTypes.shape({\n x: PropTypes.arrayOf(PropTypes.number),\n y: PropTypes.arrayOf(PropTypes.number)\n })]),\n chart: PropTypes.oneOfType([chartType, PropTypes.arrayOf(chartType)]),\n data: PropTypes.arrayOf(PropTypes.shape({})),\n detail: PropTypes.bool,\n direction: PropTypes.oneOf(['horizontal', 'vertical']),\n gap: PropTypes.oneOfType([PropTypes.oneOf(['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n guide: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n x: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n granularity: granularityType\n })]),\n y: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n granularity: granularityType\n })])\n })]),\n legend: PropTypes.bool,\n offset: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n gap: thicknessType\n })]),\n pad: padPropType,\n placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n series: PropTypes.oneOfType([seriesType, PropTypes.arrayOf(seriesType)]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'fill', 'full']), PropTypes.shape({\n height: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'fill']), PropTypes.string]),\n width: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'fill', 'auto']), PropTypes.string])\n })])\n });\n}\nexport var DataChartPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"axis\", \"bounds\", \"chart\", \"data\", \"detail\", \"direction\", \"gap\", \"guide\", \"legend\", \"offset\", \"placeholder\", \"pad\", \"series\", \"size\"],\n _excluded2 = [\"property\"],\n _excluded3 = [\"property\", \"type\", \"x\", \"y\"],\n _excluded4 = [\"property\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useMemo, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Chart, calcs, calcBounds } from '../Chart';\nimport { Grid } from '../Grid';\nimport { Stack } from '../Stack';\nimport { Text } from '../Text';\nimport { parseMetricToNum } from '../../utils';\nimport { Detail } from './Detail';\nimport { Legend } from './Legend';\nimport { XAxis } from './XAxis';\nimport { YAxis } from './YAxis';\nimport { XGuide } from './XGuide';\nimport { YGuide } from './YGuide';\nimport { createDateFormat, halfPad, heightYGranularity, largestSize, maximum, minimum, points } from './utils';\nimport { DataChartPropTypes } from './propTypes';\nvar stackedChartType = {\n areas: 'area',\n bars: 'bar',\n lines: 'line'\n};\n\n// DataChart takes a generic data array of objects plus as few properties\n// as possible, and creates a Stack of Charts with x and y axes, a legend,\n// and interactive detail.\n// Much of the code here-in involves the \"few properties\" aspect where we\n// normalize and automatically handle whatever the caller didn't specify.\n\nvar DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _boundsProp$x, _boundsProp$y;\n var a11yTitle = _ref.a11yTitle,\n _ref$axis = _ref.axis,\n axisProp = _ref$axis === void 0 ? true : _ref$axis,\n _ref$bounds = _ref.bounds,\n boundsProp = _ref$bounds === void 0 ? 'align' : _ref$bounds,\n chartProp = _ref.chart,\n _ref$data = _ref.data,\n data = _ref$data === void 0 ? [] : _ref$data,\n detail = _ref.detail,\n _ref$direction = _ref.direction,\n direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,\n _ref$gap = _ref.gap,\n gap = _ref$gap === void 0 ? 'small' : _ref$gap,\n guideProp = _ref.guide,\n legend = _ref.legend,\n offset = _ref.offset,\n placeholder = _ref.placeholder,\n padProp = _ref.pad,\n seriesProp = _ref.series,\n size = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n // legend interaction, if any\n var _useState = useState(),\n activeProperty = _useState[0],\n setActiveProperty = _useState[1];\n var horizontal = useMemo(function () {\n return direction === 'horizontal';\n }, [direction]);\n\n // normalize seriesProp to an array of objects, one per property\n var series = useMemo(function () {\n if (Array.isArray(seriesProp)) return seriesProp.filter(function (s) {\n return s.property || typeof s === 'string';\n }).map(function (s) {\n return typeof s === 'string' ? {\n property: s\n } : s;\n });\n if (typeof seriesProp === 'string') return [{\n property: seriesProp\n }];\n if (seriesProp) return [seriesProp];\n return [];\n }, [seriesProp]);\n var getPropertySeries = function getPropertySeries(prop) {\n return series.find(function (_ref2) {\n var property = _ref2.property;\n return prop === property;\n });\n };\n\n // Normalize chartProp to an array of objects.\n // Each chart has one or more properties associated with it.\n // A stacked bar or area chart has an array of properties.\n // A point chart can have x, y, thickness, and color each driven\n // by a separate property.\n var charts = useMemo(function () {\n if (!chartProp) {\n if (series.length === 1) return series.filter(function (s) {\n return s.property;\n }).map(function (s) {\n return {\n property: s.property\n };\n });\n // if we have more than one property, we'll use the first for\n // the x-axis and we'll plot the rest\n return series.slice(1).map(function (s) {\n return {\n property: s.property\n };\n });\n }\n if (Array.isArray(chartProp)) return chartProp.map(function (c) {\n return typeof c === 'string' ? {\n property: c\n } : c;\n }).filter(function (_ref3) {\n var property = _ref3.property;\n return property;\n });\n if (typeof chartProp === 'string') return [{\n property: chartProp\n }];\n if (chartProp) return [chartProp];\n return [];\n }, [chartProp, series]);\n\n // map the series property values into their own arrays\n var seriesValues = useMemo(function () {\n var result = {};\n series.forEach(function (_ref4) {\n var property = _ref4.property;\n result[property] = data.map(function (d) {\n return d[property];\n });\n });\n return result;\n }, [data, series]);\n\n // Setup the values property for each chart.\n // The index into 'charts' can be used to index into 'chartValues'.\n var chartValues = useMemo(function () {\n return charts.map(function (_ref5) {\n var opacity = _ref5.opacity,\n property = _ref5.property,\n type = _ref5.type;\n if (property) {\n if (Array.isArray(property)) {\n // A range chart or a stacked bar or area chart has multiple\n // properties.\n // In this case, this returns an array of values,\n // one per property.\n if (stackedChartType[type]) {\n // Further down, where we render, each property is rendered\n // using a separate Chart component and the values are stacked\n // such that they line up appropriately.\n var totals = [];\n return property.map(function (cp) {\n // handle object or string\n var aProperty = cp.property || cp;\n var values = seriesValues[aProperty];\n if (!values) return undefined; // property name isn't valid\n return values.map(function (v, i) {\n var base = totals[i] || 0;\n totals[i] = base + v;\n if (type === 'lines') return [i, base + v];\n return [i, base, base + v];\n });\n });\n }\n return data.map(function (_, index) {\n return [index].concat(property.map(function (p) {\n return seriesValues[p] ? seriesValues[p][index] : data[index][p];\n }));\n });\n }\n if (typeof property === 'object') {\n // When 'property' is an array, the keys of this array indicate\n // which property drives which part of the rendered Chart.\n var color = property.color,\n thickness = property.thickness,\n x = property.x,\n y = property.y,\n y2 = property.y2;\n return seriesValues[x].map(function (value, index) {\n var aValue = {\n value: [value]\n };\n aValue.value.push(seriesValues[y][index]);\n if (y2) aValue.value.push(seriesValues[y2][index]);\n if (thickness) {\n var t = seriesValues[thickness.property || thickness][index];\n aValue.thickness = thickness.transform ? thickness.transform(t) : t;\n }\n if (color) {\n var c = seriesValues[color.property || color][index];\n aValue.color = color.transform ? color.transform(c) : c;\n }\n if (opacity) aValue.opacity = opacity;\n return aValue;\n });\n }\n return seriesValues[property];\n }\n return undefined;\n });\n }, [charts, data, seriesValues]);\n\n // map granularities to work well with the number of data points we have\n var granularities = useMemo(function () {\n var medium;\n // determine a good medium granularity that will align well with the\n // length of the data\n var steps = data.length - 1;\n // special case property driven point charts\n if (charts[0] && typeof charts[0].property === 'object') medium = 3;else if (steps < 4) medium = data.length;else if (steps === 4) medium = 3;else if (steps % 4 === 0) medium = 5;else if (steps % 3 === 0) medium = 4;else if (steps % 2 === 0) medium = 3;else medium = 2;\n var granularity0 = {\n coarse: Math.min(data.length, 2),\n fine: data.length,\n medium: medium\n };\n var granularity1 = _extends({}, heightYGranularity[size && size.height || 'small'] || {\n fine: 5,\n medium: 3\n }, {\n coarse: 2\n });\n return horizontal ? {\n x: granularity1,\n y: granularity0\n } : {\n x: granularity0,\n y: granularity1\n };\n }, [charts, data.length, horizontal, size]);\n\n // normalize axis to objects, convert granularity to a number\n var axis = useMemo(function () {\n if (!axisProp) return undefined;\n var result = {};\n if (axisProp === true || axisProp.x === true) result.x = {};\n if (axisProp === true || axisProp.y === true) result.y = {};\n if (!result.x && axisProp.x) result.x = typeof axisProp.x === 'string' ? {\n property: axisProp.x\n } : _extends({}, axisProp.x);\n if (!result.y && axisProp.y) result.y = typeof axisProp.y === 'string' ? {\n property: axisProp.y\n } : _extends({}, axisProp.y);\n if (result.x) {\n if (!result.x.property) {\n // see if we have a point chart that has an x property\n if (horizontal) {\n if (charts[0]) result.x.property = charts[0].property.x || charts[0].property;\n } else if (data && data[0]) {\n if (data[0].date) result.x.property = 'date';else if (data[0].time) result.x.property = 'time';\n }\n }\n if (!result.x.granularity) result.x.granularity = 'coarse';\n }\n if (result.y) {\n if (!result.y.property) {\n // see if we have a point chart that has an y property\n if (horizontal) {\n if (data && data[0]) {\n if (data[0].date) result.y.property = 'date';else if (data[0].time) result.y.property = 'time';\n }\n } else if (charts[0]) result.y.property = charts[0].property.y || charts[0].property;\n }\n if (!result.y.granularity) result.y.granularity = 'coarse';\n }\n\n // calculate number of entries based on granularity\n if (result.x) {\n var _result$x$granularity = result.x.granularity,\n granularity = _result$x$granularity === void 0 ? 'coarse' : _result$x$granularity;\n result.x.count = granularities.x[granularity];\n }\n if (result.y) {\n var _result$y$granularity = result.y.granularity,\n _granularity = _result$y$granularity === void 0 ? 'coarse' : _result$y$granularity;\n result.y.count = granularities.y[_granularity];\n }\n return result;\n }, [axisProp, data, charts, granularities, horizontal]);\n\n // calculate axis, bounds, and thickness for each chart\n var chartProps = useMemo(function () {\n var steps = {};\n var coarseness = horizontal ? [5, undefined] : [undefined, 5];\n if (axis && axis.x) {\n var _axis$x$granularity = axis.x.granularity,\n granularity = _axis$x$granularity === void 0 ? 'coarse' : _axis$x$granularity;\n steps.x = granularities.x[granularity] - 1;\n } else steps.x = horizontal ? 1 : data.length - 1;\n if (axis && axis.y) {\n var _axis$y$granularity = axis.y.granularity,\n _granularity2 = _axis$y$granularity === void 0 ? 'coarse' : _axis$y$granularity;\n steps.y = granularities.y[_granularity2] - 1;\n } else steps.y = horizontal ? data.length - 1 : 1;\n var chartBounds = chartValues.map(function (_, index) {\n var type = charts[index].type;\n if (stackedChartType[type]) {\n var _chartValues$index;\n // merge values for bars, areas, and lines cases\n var mergedValues = ((_chartValues$index = chartValues[index]) == null || (_chartValues$index = _chartValues$index[0]) == null ? void 0 : _chartValues$index.slice(0)) || [];\n chartValues[index].slice(1) // skip first index as that is the x value\n .filter(function (values) {\n return values;\n }) // property name isn't valid\n .forEach(function (values) {\n mergedValues = mergedValues.map(function (__, i) {\n return type === 'lines' ? [i, Math.min(mergedValues[i][1], values[i][1]), Math.max(mergedValues[i][1], values[i][1])] : [i, Math.min(mergedValues[i][1], values[i][1]), Math.max(mergedValues[i][2], values[i][2])];\n });\n });\n return calcBounds(mergedValues, {\n coarseness: coarseness,\n direction: direction,\n steps: steps\n });\n }\n // if this is a data driven x chart, set coarseness for x\n return calcBounds(chartValues[index], {\n coarseness: charts[index].property.x ? {\n x: 5,\n y: 5\n } : coarseness,\n direction: direction,\n steps: steps\n });\n });\n if (boundsProp === 'align' && chartBounds.length) {\n var alignedBounds = {\n x: {},\n y: {}\n };\n chartBounds.forEach(function (bounds) {\n alignedBounds.x.min = minimum(alignedBounds.x.min, bounds.x.min);\n alignedBounds.x.max = maximum(alignedBounds.x.max, bounds.x.max);\n alignedBounds.y.min = minimum(alignedBounds.y.min, bounds.y.min);\n alignedBounds.y.max = maximum(alignedBounds.y.max, bounds.y.max);\n });\n chartBounds = chartBounds.map(function () {\n return alignedBounds;\n });\n }\n return chartValues.map(function (values, index) {\n var _charts$index = charts[index],\n thickness = _charts$index.thickness,\n type = _charts$index.type;\n var calcValues = stackedChartType[type] ? values[0] : values;\n return calcs(calcValues, {\n bounds: chartBounds[index],\n direction: direction,\n steps: steps,\n thickness: thickness\n });\n });\n }, [axis, boundsProp, charts, chartValues, data, direction, granularities, horizontal]);\n\n // normalize how we style data properties for use by Legend and Detail\n var seriesStyles = useMemo(function () {\n var result = {};\n // start from what we were explicitly given\n charts.forEach(function (chart, index) {\n var calcThickness = chartProps[index].thickness;\n if (typeof chart.property === 'object' && !Array.isArray(chart.property)) {\n // data driven point chart\n Object.keys(chart.property).forEach(function (aspect) {\n var prop = chart.property[aspect];\n if (!result[prop.property || prop]) result[prop.property || prop] = {\n aspect: aspect\n };\n });\n } else {\n var setPropertyStyle = function setPropertyStyle(_ref6) {\n var property = _ref6.property,\n styles = _objectWithoutPropertiesLoose(_ref6, _excluded2);\n // keep what we've got, use what is new\n result[property] = _extends({}, styles, result[property] || {});\n // unless the new style is has no opacity\n if (!styles.opacity) delete result[property].opacity;\n if (styles.type === 'point') result[property].point = false;\n if (calcThickness && !result[property].thickness) result[property].thickness = calcThickness;\n };\n if (Array.isArray(chart.property)) chart.property.forEach(function (prop) {\n if (typeof prop === 'string') setPropertyStyle(_extends({}, chart, {\n property: prop\n }));else if (typeof prop === 'object') setPropertyStyle(_extends({}, chart, prop));\n });else if (typeof chart === 'object') setPropertyStyle(chart);else if (typeof chart === 'string') setPropertyStyle({\n property: chart\n });\n }\n });\n\n // set color for any non-aspect properties we don't have one for yet\n var colorIndex = 0;\n var pointIndex = 0;\n Object.keys(result).forEach(function (key) {\n var seriesStyle = result[key];\n if (!seriesStyle.aspect && !seriesStyle.color) {\n seriesStyle.color = \"graph-\" + colorIndex;\n colorIndex += 1;\n }\n // set opacity if it isn't set and this isn't the active property\n if (activeProperty !== undefined && activeProperty !== key) {\n seriesStyle.opacity = 'medium';\n }\n if (seriesStyle.point === false) {\n seriesStyle.point = points[pointIndex];\n pointIndex += 1;\n }\n });\n return result;\n }, [activeProperty, charts, chartProps]);\n\n // normalize guide\n var guide = useMemo(function () {\n if (!guideProp) return undefined;\n var result;\n if (guideProp === true) {\n result = {\n x: {},\n y: {}\n };\n } else {\n result = {};\n if (guideProp.x) result.x = _extends({}, guideProp.x);\n if (guideProp.y) result.y = _extends({}, guideProp.y);\n }\n // set counts\n if (result.x) {\n // if no granularity and axis, align count with axis\n if (!result.x.granularity && axis && axis.x) result.x.count = axis.x.count;\n if (!result.x.count) result.x.count = granularities.x[result.x.granularity || 'coarse'];\n }\n if (result.y) {\n // if no granularity and axis, align count with axis\n if (!result.y.granularity && axis && axis.y) result.y.count = axis.y.count;\n if (!result.y.count) result.y.count = granularities.y[result.y.granularity || 'coarse'];\n }\n return result;\n }, [axis, granularities, guideProp]);\n\n // set the pad to half the thickness, based on the chart types\n // except when using offset, then add even more horizontal pad\n var pad = useMemo(function () {\n if (padProp !== undefined) return padProp;\n var pad0;\n var pad1;\n charts.forEach(function (_ref7, index) {\n var type = _ref7.type;\n var thickness = chartProps[index].thickness;\n pad0 = largestSize(pad0, halfPad[thickness]);\n if (type && type !== 'bar') pad1 = largestSize(pad1, halfPad[thickness]);\n });\n return horizontal ? {\n horizontal: pad1,\n vertical: pad0\n } : {\n horizontal: pad0,\n vertical: pad1\n };\n }, [chartProps, charts, horizontal, padProp]);\n\n // calculate the thickness in pixels of each chart\n var thicknesses = useMemo(function () {\n return offset ? charts.map(function (_, index) {\n var thickness = chartProps[index].thickness;\n return parseMetricToNum(theme.global.edgeSize[thickness] || thickness);\n }) : undefined;\n }, [charts, chartProps, offset, theme]);\n\n // normalize any offset gap\n var offsetGap = useMemo(function () {\n return (offset == null ? void 0 : offset.gap) && parseMetricToNum(theme.global.edgeSize[offset.gap] || offset.gap) || 0;\n }, [offset, theme]);\n\n // calculate the offset for each chart, which is a sum of the thicknesses\n // any offset gaps that preceded it\n var offsets = useMemo(function () {\n if (offset) {\n return thicknesses.map(function (t, i) {\n return thicknesses.slice(0, i).reduce(function (a, b) {\n return a + b + offsetGap;\n }, 0);\n });\n }\n return undefined;\n }, [offset, offsetGap, thicknesses]);\n\n // Calculate the total pad we should add to the end of each chart.\n // We do this to shrink the width of each chart so we can shift them\n // via `translate` and have them take up the right amount of width.\n var offsetPad = useMemo(function () {\n return offsets ? offsets[offsets.length - 1] + thicknesses[thicknesses.length - 1] + \"px\" : undefined;\n }, [offsets, thicknesses]);\n\n // The thickness of the segments. We need to convert to numbers\n // to be able to compare across charts where some might be using T-shirt\n // labels and others might be pixel values.\n var segmentThickness = useMemo(function () {\n var result = 0;\n charts.forEach(function (_, index) {\n var thickness = chartProps[index].thickness;\n result = Math.max(result, parseMetricToNum(theme.global.edgeSize[thickness] || thickness));\n });\n return result + \"px\";\n }, [charts, chartProps, theme]);\n var dateFormats = useMemo(function () {\n var result = {};\n var full = axis && axis.x && axis.x.granularity === 'coarse';\n series.forEach(function (_ref8) {\n var property = _ref8.property,\n render = _ref8.render;\n if (!render && data.length > 1 && typeof data[0][property] === 'string') {\n result[property] = createDateFormat(data[0][property], data[data.length - 1][property], full);\n }\n });\n return result;\n }, [axis, data, series]);\n var renderValue = function renderValue(serie, axisValue, y) {\n if (serie === void 0) {\n serie = {};\n }\n var _serie = serie,\n prefix = _serie.prefix,\n property = _serie.property,\n render = _serie.render,\n suffix = _serie.suffix;\n var value = axisValue;\n if (value !== undefined) {\n if (!property || !horizontal && y || horizontal && !y) {\n if (render) return render(value);\n } else {\n var datum = data[axisValue];\n value = datum[property];\n if (render) return render(value, datum, property);\n }\n if (property) {\n var dateFormat = dateFormats[property];\n if (dateFormat) return dateFormat(new Date(value));\n if (prefix) value = \"\" + prefix + value;\n if (suffix) value = \"\" + value + suffix;\n }\n }\n return value;\n };\n\n // TODO: revisit how x/y axis are hooked up to charts and series\n\n var xAxisElement = axis && axis.x && (chartProps.length || boundsProp != null && boundsProp.x) ? /*#__PURE__*/React.createElement(XAxis, {\n axis: axis,\n values: (boundsProp == null || (_boundsProp$x = boundsProp.x) == null ? void 0 : _boundsProp$x.slice(0)) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.x,\n pad: !horizontal && offsetPad ? _extends({}, pad, {\n end: offsetPad\n }) : pad,\n renderValue: renderValue,\n serie: axis.x.property && getPropertySeries(axis.x.property),\n style: offsetPad ? {\n transform: \"translate(\" + offsets[Math.floor(offsets.length / 2)] + \"px, 0px)\"\n } : {},\n thickness: horizontal ? undefined : segmentThickness,\n theme: theme\n }) : null;\n var yAxisElement = axis && axis.y && (chartProps.length || boundsProp != null && boundsProp.y) ? /*#__PURE__*/React.createElement(YAxis, {\n axis: axis,\n values: (boundsProp == null || (_boundsProp$y = boundsProp.y) == null ? void 0 : _boundsProp$y.slice(0).reverse()) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.y,\n pad: horizontal && offsetPad ? _extends({}, pad, {\n bottom: offsetPad\n }) : pad,\n renderValue: renderValue,\n serie: axis.y.property && getPropertySeries(axis.y.property),\n thickness: horizontal ? segmentThickness : undefined,\n theme: theme\n }) : null;\n var stackFill = useMemo(function () {\n if (size === 'fill' || size && size.width === 'fill' && size.height === 'fill') return true;\n if (size && size.width === 'fill') return 'horizontal';\n if (size && size.height === 'fill') return 'vertical';\n return undefined;\n }, [size]);\n var guidingChild = useMemo(function () {\n var result = 0;\n if (guide && guide.x) result += 1;\n if (guide && guide.y) result += 1;\n return result;\n }, [guide]);\n var stackElement = /*#__PURE__*/React.createElement(Stack, {\n gridArea: \"charts\",\n guidingChild: guidingChild,\n fill: stackFill\n }, guide && guide.x && /*#__PURE__*/React.createElement(XGuide, {\n guide: guide,\n pad: pad,\n thickness: horizontal\n }), guide && guide.y && /*#__PURE__*/React.createElement(YGuide, {\n guide: guide,\n pad: pad,\n thickness: !horizontal\n }), charts.map(function (_ref9, i) {\n var prop = _ref9.property,\n type = _ref9.type,\n x = _ref9.x,\n y = _ref9.y,\n chartRest = _objectWithoutPropertiesLoose(_ref9, _excluded3);\n // When we offset, we increase the padding on the end for all charts\n // by the same amount and we shift each successive chart to the\n // right by an offset for that chart. The last chart's right side\n // will end up aligning with where the charts would have been\n // had we not padded their ends.\n var chartPad = offsetPad ? _extends({}, pad, {\n end: offsetPad\n }) : pad;\n var offsetProps = offsetPad ? {\n style: {\n transform: \"translate(\" + offsets[i] + \"px, 0px)\"\n }\n } : {};\n if (stackedChartType[type]) {\n // reverse to ensure area Charts are stacked in the right order\n return prop.map(function (cProp, j) {\n var pProp = cProp.property || cProp;\n var _ref10 = typeof cProp === 'object' ? cProp : {},\n property = _ref10.property,\n propRest = _objectWithoutPropertiesLoose(_ref10, _excluded4);\n return /*#__PURE__*/React.createElement(Chart\n // eslint-disable-next-line react/no-array-index-key\n , _extends({\n key: j\n // when property name isn't valid, send empty array\n ,\n values: chartValues[i][j] || [],\n overflow: true,\n direction: direction\n }, seriesStyles[pProp], chartProps[i], chartRest, propRest, offsetProps, {\n type: stackedChartType[type] || type,\n size: size,\n pad: chartPad\n }));\n }).reverse();\n }\n return /*#__PURE__*/React.createElement(Chart\n // eslint-disable-next-line react/no-array-index-key\n , _extends({\n key: i,\n values: chartValues[i],\n overflow: true,\n direction: direction\n }, seriesStyles[prop], chartProps[i], chartRest, offsetProps, {\n type: type,\n size: size,\n pad: chartPad\n }));\n }), placeholder && (typeof placeholder === 'string' && /*#__PURE__*/React.createElement(Box, {\n fill: \"vertical\",\n align: \"center\",\n justify: \"center\",\n background: {\n color: 'background-front',\n opacity: 'strong'\n },\n margin: pad\n }, /*#__PURE__*/React.createElement(Text, {\n color: \"text-weak\"\n }, placeholder)) || placeholder), detail && /*#__PURE__*/React.createElement(Detail, {\n activeProperty: activeProperty,\n axis: axis,\n data: data,\n horizontal: horizontal,\n pad: pad,\n series: series,\n seriesStyles: seriesStyles,\n renderValue: renderValue,\n thickness: segmentThickness\n }));\n var legendElement = legend ? /*#__PURE__*/React.createElement(Legend, {\n series: series,\n seriesStyles: seriesStyles,\n activeProperty: activeProperty,\n setActiveProperty: setActiveProperty\n }) : null;\n var content = /*#__PURE__*/React.createElement(Grid, _extends({\n ref: ref,\n \"aria-label\": a11yTitle,\n fill: stackFill,\n columns: ['auto', stackFill === true || stackFill === 'horizontal' ? 'flex' : 'auto'],\n rows: [stackFill === true || stackFill === 'vertical' ? 'flex' : 'auto', 'auto'],\n areas: [{\n name: 'yAxis',\n start: [0, 0],\n end: [0, 0]\n }, {\n name: 'xAxis',\n start: [1, 1],\n end: [1, 1]\n }, {\n name: 'charts',\n start: [1, 0],\n end: [1, 0]\n }],\n gap: gap\n }, rest), xAxisElement, yAxisElement, stackElement);\n if (legendElement) {\n content = /*#__PURE__*/React.createElement(Box, {\n align: \"start\"\n }, content, legendElement);\n }\n return content;\n});\nDataChart.displayName = 'DataChart';\nDataChart.propTypes = DataChartPropTypes;\nexport { DataChart };","import React from 'react';\nexport var TableContext = /*#__PURE__*/React.createContext(undefined);","import styled, { css } from 'styled-components';\nimport { backgroundStyle, borderStyle, edgeStyle, genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar SIZE_MAP = {\n '1/2': '50%',\n '1/4': '25%',\n '2/4': '50%',\n '3/4': '75%',\n '1/3': '33.33%',\n '2/3': '66.66%'\n};\nvar sizeStyle = css([\"width:\", \";max-width:\", \";overflow:hidden;\"], function (props) {\n return props.size === 'auto' ?\n // setting width to a small value will allow\n // the cell to fit width of its content. this\n // is a commonly implemented CSS pattern to\n // allow an auto-width behavior on fixed table\n // layouts (which is what DataTable applies)\n // https://stackoverflow.com/questions/4757844/css-table-column-autowidth?noredirect=1&lq=1\n '1px' : SIZE_MAP[props.size] || props.theme.global.size[props.size] || props.size;\n}, function (props) {\n return props.size !== 'auto' ? SIZE_MAP[props.size] || props.theme.global.size[props.size] || props.size : undefined;\n});\nvar StyledTableCell = styled.td.withConfig({\n displayName: \"StyledTable__StyledTableCell\",\n componentId: \"sc-1m3u5g-0\"\n})([\"margin:0;padding:0;font-weight:inherit;text-align:inherit;\", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], function (props) {\n return props.size && sizeStyle;\n}, function (props) {\n return props.verticalAlign && \"vertical-align: \" + props.verticalAlign + \";\";\n}, function (props) {\n return props.align && \"text-align: \" + props.align + \";\";\n}, function (props) {\n return props.background && backgroundStyle(props.background, props.theme);\n}, function (props) {\n return props.border && borderStyle(props.border, props.responsive, props.theme);\n}, function (props) {\n return props.pad && edgeStyle('padding', props.pad, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return props.tableContextTheme && props.tableContextTheme.extend;\n});\nStyledTableCell.defaultProps = {};\nObject.setPrototypeOf(StyledTableCell.defaultProps, defaultProps);\nvar StyledTableDataCaption = styled.caption.withConfig({\n displayName: \"StyledTable__StyledTableDataCaption\",\n componentId: \"sc-1m3u5g-1\"\n})([\"margin-bottom:\", \";\"], function (props) {\n return props.theme.global.edgeSize.xxsmall;\n});\nStyledTableDataCaption.defaultProps = {};\nObject.setPrototypeOf(StyledTableDataCaption.defaultProps, defaultProps);\nvar StyledTableRow = styled.tr.withConfig({\n displayName: \"StyledTable__StyledTableRow\",\n componentId: \"sc-1m3u5g-2\"\n})([\"\"]);\nStyledTableRow.defaultProps = {};\nObject.setPrototypeOf(StyledTableRow.defaultProps, defaultProps);\nvar StyledTableBody = styled.tbody.withConfig({\n displayName: \"StyledTable__StyledTableBody\",\n componentId: \"sc-1m3u5g-3\"\n})([\"\"]);\nStyledTableBody.defaultProps = {};\nObject.setPrototypeOf(StyledTableBody.defaultProps, defaultProps);\nvar StyledTableHeader = styled.thead.withConfig({\n displayName: \"StyledTable__StyledTableHeader\",\n componentId: \"sc-1m3u5g-4\"\n})([\"\"]);\nStyledTableHeader.defaultProps = {};\nObject.setPrototypeOf(StyledTableHeader.defaultProps, defaultProps);\nvar StyledTableFooter = styled.tfoot.withConfig({\n displayName: \"StyledTable__StyledTableFooter\",\n componentId: \"sc-1m3u5g-5\"\n})([\"\"]);\nStyledTableFooter.defaultProps = {};\nObject.setPrototypeOf(StyledTableFooter.defaultProps, defaultProps);\nvar StyledTable = styled.table.withConfig({\n displayName: \"StyledTable\",\n componentId: \"sc-1m3u5g-6\"\n})([\"border-spacing:0;border-collapse:collapse;width:inherit;\", \" \", \";\"], genericStyles, function (props) {\n return props.theme.table && props.theme.table.extend;\n});\nStyledTable.defaultProps = {};\nObject.setPrototypeOf(StyledTable.defaultProps, defaultProps);\nexport { StyledTableCell, StyledTableDataCaption, StyledTableRow, StyledTableBody, StyledTableHeader, StyledTableFooter, StyledTable };","import PropTypes from 'prop-types';\nvar BORDER_SHAPE = PropTypes.shape({\n color: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n })]),\n side: PropTypes.oneOf(['top', 'left', 'bottom', 'right', 'start', 'end', 'horizontal', 'vertical', 'all', 'between']),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n style: PropTypes.oneOf(['solid', 'dashed', 'dotted', 'double', 'groove', 'ridge', 'inset', 'outset', 'hidden'])\n});\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n border: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['top', 'left', 'bottom', 'right', 'start', 'end', 'horizontal', 'vertical', 'all']), BORDER_SHAPE, PropTypes.arrayOf(BORDER_SHAPE)]),\n plain: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['noPad'])]),\n scope: PropTypes.oneOf(['col', 'row']),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', '1/2', '1/3', '2/3', '1/4', '2/4', '3/4']), PropTypes.string]),\n verticalAlign: PropTypes.oneOf(['top', 'middle', 'bottom']),\n align: PropTypes.oneOfType([PropTypes.oneOf(['left', 'right', 'center', 'justify', 'inherit', 'start', 'end']), PropTypes.string])\n };\n}\nexport var TableCellPropTypes = PropType;","var _excluded = [\"align\", \"aria-disabled\", \"background\", \"border\", \"children\", \"className\", \"colSpan\", \"onWidth\", \"pad\", \"plain\", \"rowSpan\", \"scope\", \"size\", \"verticalAlign\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useEffect, useMemo, useRef } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { defaultProps } from '../../default-props';\nimport { backgroundIsDark, useForwardedRef } from '../../utils';\nimport { Box } from '../Box';\nimport { TableContext } from '../Table/TableContext';\nimport { StyledTableCell } from '../Table/StyledTable';\nimport { TableCellPropTypes } from './propTypes';\nexport var verticalAlignToJustify = {\n middle: 'center',\n top: 'start',\n bottom: 'end'\n};\nvar TableCell = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var align = _ref.align,\n ariaDisabled = _ref['aria-disabled'],\n background = _ref.background,\n border = _ref.border,\n children = _ref.children,\n className = _ref.className,\n colSpan = _ref.colSpan,\n onWidth = _ref.onWidth,\n pad = _ref.pad,\n plain = _ref.plain,\n rowSpan = _ref.rowSpan,\n scope = _ref.scope,\n size = _ref.size,\n verticalAlign = _ref.verticalAlign,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var tableContext = useContext(TableContext);\n var cellRef = useForwardedRef(ref);\n var containerRef = useRef();\n useLayoutEffect(function () {\n if (onWidth) {\n var _cellRef$current$getB = cellRef.current.getBoundingClientRect(),\n width = _cellRef$current$getB.width;\n onWidth(width);\n }\n }, [cellRef, onWidth]);\n\n // if window resizes, recalculate cell height so that content\n // will continue to fill the height if the dimensions of the cell\n // have changed\n useEffect(function () {\n var updateHeight = function updateHeight() {\n if (plain === 'noPad') {\n var cell = cellRef.current;\n var container = containerRef.current;\n if (cell && container) {\n container.style.height = '';\n var cellRect = cell.getBoundingClientRect();\n\n // height must match cell height otherwise table will apply some\n // margin around the cell content\n container.style.height = Math.max(cellRect.height - (border || theme.table[tableContext].border ? theme.global.borderSize.xsmall.replace('px', '') : 0), 0) + \"px\";\n }\n }\n };\n window.addEventListener('resize', updateHeight);\n updateHeight();\n return function () {\n window.removeEventListener('resize', updateHeight);\n };\n }, [border, cellRef, plain, tableContext, theme.global.borderSize, theme.table]);\n var tableContextTheme;\n if (tableContext === 'header') {\n tableContextTheme = theme.table && theme.table.header;\n } else if (tableContext === 'footer') {\n tableContextTheme = theme.table && theme.table.footer;\n } else {\n tableContextTheme = theme.table && theme.table.body;\n }\n // merge tableContextTheme and rest\n var mergedProps = _extends({}, tableContextTheme, rest);\n Object.keys(mergedProps).forEach(function (key) {\n if (rest[key] === undefined) mergedProps[key] = tableContextTheme[key];\n });\n // split out background, border, pad, and aria-disabled\n var cellProps = {\n align: align || mergedProps.align || undefined,\n 'aria-disabled': ariaDisabled || undefined,\n background: background || mergedProps.background || undefined,\n border: border || mergedProps.border || undefined,\n pad: plain !== 'noPad' ? pad || mergedProps.pad || undefined : undefined,\n verticalAlign: verticalAlign || mergedProps.verticalAlign || undefined\n };\n delete mergedProps.align;\n delete mergedProps.ariaDisabled;\n delete mergedProps.background;\n delete mergedProps.border;\n delete mergedProps.pad;\n delete mergedProps.verticalAlign;\n var content = children;\n if (plain === 'noPad' && children) {\n // a Box with explicitly set height is necessary\n // for the child contents to be able to fill the\n // TableCell\n content = /*#__PURE__*/React.createElement(Box, {\n ref: containerRef,\n justify: verticalAlign ? verticalAlignToJustify[verticalAlign] : 'center'\n }, children);\n }\n\n // construct a new theme object in case we have a background that wants\n // to change the background color context\n var nextTheme = useMemo(function () {\n var result;\n if (cellProps.background || theme.darkChanged) {\n var dark = backgroundIsDark(cellProps.background, theme);\n var darkChanged = dark !== undefined && dark !== theme.dark;\n if (darkChanged || theme.darkChanged) {\n result = _extends({}, theme);\n result.dark = dark === undefined ? theme.dark : dark;\n result.background = cellProps.background;\n } else if (cellProps.background) {\n // This allows DataTable to intelligently set the background\n // of a pinned header or footer.\n result = _extends({}, theme);\n result.background = cellProps.background;\n }\n }\n return result || theme;\n }, [cellProps.background, theme]);\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: nextTheme\n }, /*#__PURE__*/React.createElement(StyledTableCell, _extends({\n ref: cellRef,\n as: scope ? 'th' : undefined,\n scope: scope,\n size: size,\n colSpan: colSpan,\n rowSpan: rowSpan,\n tableContext: tableContext,\n tableContextTheme: tableContextTheme\n }, plain === true ? mergedProps : {}, cellProps, {\n className: className\n }), plain || !Object.keys(mergedProps).length ? content : /*#__PURE__*/React.createElement(Box, _extends({}, mergedProps, {\n align: align,\n justify: verticalAlignToJustify[verticalAlign]\n }), children)));\n});\nTableCell.displayName = 'TableCell';\nTableCell.propTypes = TableCellPropTypes;\nexport { TableCell };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Stack } from '../Stack';\nvar InteractionBox = styled(Box).withConfig({\n displayName: \"Resizer__InteractionBox\",\n componentId: \"sc-8l808w-0\"\n})([\"cursor:col-resize;> *{opacity:0;}\", \" &:hover{> *{opacity:1;}}\"], function (props) {\n return props.active && '> * { opacity: 1; }';\n});\nvar Resizer = function Resizer(_ref) {\n var onResize = _ref.onResize,\n property = _ref.property;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(false),\n active = _useState[0],\n setActive = _useState[1];\n var _useState2 = useState(),\n start = _useState2[0],\n setStart = _useState2[1];\n var _useState3 = useState(),\n width = _useState3[0],\n setWidth = _useState3[1];\n var ref = useRef();\n var onMouseDown = useCallback(function (event) {\n if (ref.current) {\n var element = ref.current;\n // find TH parent\n while (element && element.nodeName !== 'TH') element = element.parentNode;\n var rect = element.getBoundingClientRect();\n setStart(event.clientX);\n setWidth(rect.width);\n setActive(true);\n }\n }, []);\n var onMouseMove = useCallback(function (event) {\n // We determined 12 empirically as being wide enough to hit but\n // not too wide to cause false hits.\n var nextWidth = Math.max(12, width + (event.clientX - start));\n onResize(property, nextWidth);\n }, [onResize, property, start, width]);\n var onMouseUp = useCallback(function () {\n setActive(false);\n setStart(undefined);\n setWidth(undefined);\n }, []);\n useEffect(function () {\n var remove = function remove() {\n document.removeEventListener('mouseup', onMouseUp);\n document.removeEventListener('mousemove', onMouseMove);\n };\n if (active) {\n document.addEventListener('mouseup', onMouseUp);\n document.addEventListener('mousemove', onMouseMove);\n return remove;\n }\n remove();\n return undefined;\n }, [active, onMouseMove, onMouseUp]);\n var border;\n if (theme.dataTable.resize.hover && theme.dataTable.resize.hover.border) {\n var _theme$dataTable$resi = theme.dataTable.resize.hover.border,\n color = _theme$dataTable$resi.color,\n _theme$dataTable$resi2 = _theme$dataTable$resi.side,\n side = _theme$dataTable$resi2 === void 0 ? 'end' : _theme$dataTable$resi2,\n size = _theme$dataTable$resi.size;\n border = {\n color: color,\n side: side,\n size: size\n };\n }\n return /*#__PURE__*/React.createElement(Stack, {\n anchor: \"right\"\n }, /*#__PURE__*/React.createElement(Box, _extends({\n flex: false,\n responsive: false,\n pad: {\n vertical: 'small'\n }\n }, theme.dataTable.resize)), /*#__PURE__*/React.createElement(InteractionBox, {\n active: active,\n flex: false,\n pad: {\n left: 'xsmall'\n },\n ref: ref,\n responsive: false,\n onMouseDown: onMouseDown,\n onMouseMove: start !== undefined ? onMouseMove : undefined,\n onMouseUp: start !== undefined ? onMouseUp : undefined\n }, /*#__PURE__*/React.createElement(Box, {\n pad: {\n vertical: 'small'\n },\n border: border\n })));\n};\nResizer.displayName = 'Resizer';\nResizer.defaultProps = {};\nObject.setPrototypeOf(Resizer.defaultProps, defaultProps);\nexport { Resizer };","import React, { useContext, useEffect, useRef } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { FormSearch } from 'grommet-icons/icons/FormSearch';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Keyboard } from '../Keyboard';\nimport { Text } from '../Text';\nimport { TextInput } from '../TextInput';\nimport { normalizeColor } from '../../utils';\nvar Searcher = function Searcher(_ref) {\n var filtering = _ref.filtering,\n filters = _ref.filters,\n onFilter = _ref.onFilter,\n onFiltering = _ref.onFiltering,\n property = _ref.property;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var inputRef = useRef();\n var needsFocus = filtering === property;\n useEffect(function () {\n if (inputRef && needsFocus) {\n inputRef.current.focus();\n }\n }, [needsFocus, inputRef]);\n return filtering === property ? /*#__PURE__*/React.createElement(Keyboard, {\n onEsc: function onEsc() {\n return onFiltering(undefined);\n }\n }, /*#__PURE__*/React.createElement(Box, {\n width: {\n min: 'xsmall'\n },\n flex: true,\n pad: {\n horizontal: 'small'\n }\n }, /*#__PURE__*/React.createElement(TextInput, {\n name: \"search-\" + property,\n a11yTitle: \"Search by \" + property,\n ref: inputRef,\n value: filters[property],\n onChange: function onChange(event) {\n return onFilter(property, event.target.value);\n },\n onBlur: function onBlur() {\n return onFiltering(undefined);\n }\n }))) : /*#__PURE__*/React.createElement(React.Fragment, null, filters[property] ? /*#__PURE__*/React.createElement(Box, {\n flex: false,\n pad: {\n horizontal: 'small'\n },\n direction: \"row\",\n align: \"center\"\n }, /*#__PURE__*/React.createElement(Text, null, filters[property])) : null, /*#__PURE__*/React.createElement(Button, {\n a11yTitle: \"Open search by \" + property,\n icon: /*#__PURE__*/React.createElement(FormSearch, {\n color: normalizeColor(filtering === property ? 'brand' : 'border', theme)\n }),\n hoverIndicator: true,\n onClick: function onClick() {\n return onFiltering(filtering === property ? undefined : property);\n }\n }));\n};\nSearcher.displayName = 'Searcher';\nSearcher.defaultProps = {};\nObject.setPrototypeOf(Searcher.defaultProps, defaultProps);\nexport { Searcher };","var _excluded = [\"context\", \"expanded\", \"onToggle\", \"pad\"],\n _excluded2 = [\"background\", \"border\", \"context\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Blank } from 'grommet-icons/icons/Blank';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { TableCell } from '../TableCell';\nimport { normalizeColor } from '../../utils';\n\n// ExpanderControl is separated from ExpanderCell to give TableCell a chance\n// to set the ThemeContext dark context.\nvar ExpanderControl = function ExpanderControl(_ref) {\n var context = _ref.context,\n expanded = _ref.expanded,\n onToggle = _ref.onToggle,\n pad = _ref.pad,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var content;\n if (onToggle) {\n var ExpandIcon = theme.dataTable.icons[expanded ? 'contract' : 'expand'];\n content = /*#__PURE__*/React.createElement(ExpandIcon, {\n color: normalizeColor('border', theme)\n });\n } else {\n content = /*#__PURE__*/React.createElement(Blank, null);\n }\n var normalizedThemeProps = _extends({}, theme.table[context], theme.dataTable[context]);\n delete normalizedThemeProps.background;\n delete normalizedThemeProps.border;\n delete normalizedThemeProps.pad;\n content = /*#__PURE__*/React.createElement(Box, _extends({}, normalizedThemeProps, rest, {\n align: \"center\",\n fill: true,\n pad: pad\n }), content);\n if (onToggle) {\n content = /*#__PURE__*/React.createElement(Button, {\n fill: true,\n a11yTitle: expanded ? 'collapse' : 'expand',\n hoverIndicator: true,\n onClick: onToggle,\n plain: true\n }, content);\n }\n return content;\n};\nvar ExpanderCell = function ExpanderCell(_ref2) {\n var background = _ref2.background,\n border = _ref2.border,\n context = _ref2.context,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n return /*#__PURE__*/React.createElement(TableCell, {\n background: background,\n border: border,\n size: \"xxsmall\",\n plain: \"noPad\",\n verticalAlign: context === 'groupEnd' ? 'bottom' : 'top'\n }, /*#__PURE__*/React.createElement(ExpanderControl, _extends({\n context: context\n }, rest)));\n};\nExpanderCell.displayName = 'ExpanderCell';\nExpanderCell.defaultProps = {};\nObject.setPrototypeOf(ExpanderCell.defaultProps, defaultProps);\nexport { ExpanderCell };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef } from 'react';\nimport { StyledTableRow } from '../Table/StyledTable';\nvar TableRow = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(StyledTableRow, _extends({\n ref: ref\n }, props));\n});\nTableRow.displayName = 'TableRow';\nexport { TableRow };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n caption: PropTypes.string\n });\n}\nexport var TablePropTypes = PropType;","var _excluded = [\"caption\", \"children\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef } from 'react';\nimport { StyledTable, StyledTableDataCaption } from './StyledTable';\nimport { TablePropTypes } from './propTypes';\nvar Table = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var caption = _ref.caption,\n children = _ref.children,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(StyledTable, _extends({\n ref: ref\n }, rest), caption ? /*#__PURE__*/React.createElement(StyledTableDataCaption, null, caption) : null, children);\n});\nTable.propTypes = TablePropTypes;\nexport { Table };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef } from 'react';\nimport { TableContext } from '../Table/TableContext';\nimport { StyledTableBody } from '../Table/StyledTable';\nvar TableBody = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(TableContext.Provider, {\n value: \"body\"\n }, /*#__PURE__*/React.createElement(StyledTableBody, _extends({\n ref: ref\n }, props)));\n});\nTableBody.displayName = 'TableBody';\nexport { TableBody };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef } from 'react';\nimport { TableContext } from '../Table/TableContext';\nimport { StyledTableHeader } from '../Table/StyledTable';\nvar TableHeader = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(TableContext.Provider, {\n value: \"header\"\n }, /*#__PURE__*/React.createElement(StyledTableHeader, _extends({\n ref: ref\n }, props)));\n});\nTableHeader.displayName = 'TableHeader';\nexport { TableHeader };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef } from 'react';\nimport { TableContext } from '../Table/TableContext';\nimport { StyledTableFooter } from '../Table/StyledTable';\nvar TableFooter = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(TableContext.Provider, {\n value: \"footer\"\n }, /*#__PURE__*/React.createElement(StyledTableFooter, _extends({\n ref: ref\n }, props)));\n});\nTableFooter.displayName = 'TableFooter';\nexport { TableFooter };","import styled, { css } from 'styled-components';\nimport { backgroundStyle, fillStyle, focusStyle, unfocusStyle, genericStyles, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { TableRow } from '../TableRow';\nimport { Table } from '../Table';\nimport { TableBody } from '../TableBody';\nimport { TableCell } from '../TableCell';\nimport { TableHeader } from '../TableHeader';\nimport { TableFooter } from '../TableFooter';\n\n// border-collapse: separate is needed so pinned header/footer borders work\nvar StyledDataTable = styled(Table).withConfig({\n displayName: \"StyledDataTable\",\n componentId: \"sc-xrlyjm-0\"\n})([\"position:relative;border-spacing:0;border-collapse:separate;\", \" \", \" \", \";\"], genericStyles, function (props) {\n return props.fillProp && fillStyle(props.fillProp);\n}, function (props) {\n return props.theme.dataTable && props.theme.dataTable.body && props.theme.dataTable.body.extend;\n});\nStyledDataTable.defaultProps = {};\nObject.setPrototypeOf(StyledDataTable.defaultProps, defaultProps);\n\n// when paginated, this wraps the data table and pagination component\nvar StyledContainer = styled(Box).withConfig({\n displayName: \"StyledDataTable__StyledContainer\",\n componentId: \"sc-xrlyjm-1\"\n})([\"\", \";\"], function (props) {\n return props.theme.dataTable && props.theme.dataTable.container && props.theme.dataTable.container.extend;\n});\nStyledContainer.defaultProps = {};\nObject.setPrototypeOf(StyledContainer.defaultProps, defaultProps);\nvar hoverStyle = css([\"\", \" color:\", \";\"], function (props) {\n return backgroundStyle(normalizeColor(props.theme.table && props.theme.table.row && props.theme.table.row.hover && props.theme.table.row.hover.background || props.theme.global.hover.background, props.theme), props.theme);\n}, function (props) {\n return normalizeColor(props.theme.table && props.theme.table.row && props.theme.table.row.hover && props.theme.table.row.hover.color || props.theme.global.hover.color, props.theme);\n});\nvar StyledDataTableRow = styled(TableRow).withConfig({\n displayName: \"StyledDataTable__StyledDataTableRow\",\n componentId: \"sc-xrlyjm-2\"\n})([\"\", \" \", \" \", \"\"], function (props) {\n return props.size && \"\\n display: table;\\n width: 100%;\\n table-layout: fixed;\\n \";\n}, function (props) {\n return props.onClick && \"\\n cursor: pointer;\\n \";\n}, function (props) {\n return props.active && hoverStyle;\n});\nStyledDataTableRow.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableRow.defaultProps, defaultProps);\n\n// focus styling other than outline doesn't work on \nvar StyledDataTableBody = styled(TableBody).withConfig({\n displayName: \"StyledDataTable__StyledDataTableBody\",\n componentId: \"sc-xrlyjm-3\"\n})([\"\", \" &:focus{\", \"}&:focus:not(:focus-visible){\", \"}\"], function (props) {\n return props.size && \"\\n display: block;\\n width: 100%;\\n max-height: \" + (props.theme.global.size[props.size] || props.size) + \";\\n overflow: auto;\\n \";\n}, focusStyle({\n skipSvgChildren: true,\n forceOutline: true\n}), unfocusStyle({\n skipSvgChildren: true,\n forceOutline: true\n}));\nStyledDataTableBody.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableBody.defaultProps, defaultProps);\nvar StyledDataTableHeader = styled(TableHeader).withConfig({\n displayName: \"StyledDataTable__StyledDataTableHeader\",\n componentId: \"sc-xrlyjm-4\"\n})([\"\", \"\"], function (props) {\n return props.size && \"\\n height: fit-content;\\n display: table;\\n width: calc(100% - \" + props.scrollOffset + \"px);\\n table-layout: fixed;\\n \";\n});\nStyledDataTableHeader.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableHeader.defaultProps, defaultProps);\nvar StyledDataTableFooter = styled(TableFooter).withConfig({\n displayName: \"StyledDataTable__StyledDataTableFooter\",\n componentId: \"sc-xrlyjm-5\"\n})([\"\", \" \", \"\"], function (props) {\n return props.size && \"\\n display: table;\\n width: calc(100% - \" + props.scrollOffset + \"px);\\n table-layout: fixed;\\n \";\n}, function (props) {\n return props.pin && \"\\n /* Safari needs the relative positioning of tfoot specified */\\n position: sticky;\\n bottom: 0;\\n z-index: 1;\\n \";\n});\nStyledDataTableFooter.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableFooter.defaultProps, defaultProps);\nvar StyledDataTableCell = styled(TableCell).withConfig({\n displayName: \"StyledDataTable__StyledDataTableCell\",\n componentId: \"sc-xrlyjm-6\"\n})([\"\", \";\", \" \", \"\"], function (props) {\n return props.context === 'header' && props.theme.dataTable && props.theme.dataTable.header && props.theme.dataTable.header.extend;\n}, function (props) {\n return props.pin && props.pin.length > 0 && \"position: sticky;\\n \" + props.pin.map(function (p) {\n return p + \": \" + (props.pinnedOffset && props.pinnedOffset[p] && props.pinnedOffset[p] + \"px\" || 0) + \";\";\n }).join(' ') + \"\\n z-index: \" + Object.keys(props.pin).length + \";\\n \";\n}, function (props) {\n return props.pin && props.pin.length > 0 && props.theme.dataTable.pinned && props.theme.dataTable.pinned[props.context] && props.theme.dataTable.pinned[props.context].extend ? props.theme.dataTable.pinned[props.context].extend : '';\n});\nStyledDataTableCell.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableCell.defaultProps, defaultProps);\nvar StyledPlaceholder = styled('caption').withConfig({\n displayName: \"StyledDataTable__StyledPlaceholder\",\n componentId: \"sc-xrlyjm-7\"\n})([\"position:absolute;\", \" \", \" left:0;right:0;\"], function (props) {\n return \"top: \" + (props.top || 0) + \"px;\";\n}, function (props) {\n return \"bottom: \" + (props.bottom || 0) + \"px;\";\n});\nexport { StyledContainer, StyledDataTable, StyledDataTableRow, StyledDataTableBody, StyledDataTableCell, StyledDataTableHeader, StyledDataTableFooter, StyledPlaceholder };","// This file contains helper functions for DataTable, to keep the component\n// files simpler.\n\nexport var set = function set(obj, path, value) {\n var parts = path;\n if (Object(obj) !== obj) return obj;\n if (!Array.isArray(path)) parts = path.toString().match(/[^.[\\]]+/g) || [];\n parts.slice(0, -1).reduce(function (acc, item, index) {\n if (Object(acc[item]) === acc[item]) {\n return acc[item];\n }\n acc[item] = Math.abs(parts[index + 1]) > 0 === +parts[index + 1] ? [] : {};\n return acc[item];\n }, obj)[parts[parts.length - 1]] = value;\n return obj;\n};\n\n// get the value for the property in the datum object\nexport var datumValue = function datumValue(datum, property) {\n if (!property || !datum) return undefined;\n var parts = property.split('.');\n if (parts.length === 1) return datum[property];\n if (!datum[parts[0]]) return undefined;\n return datumValue(datum[parts[0]], parts.slice(1).join('.'));\n};\n\n// get the primary property name\nexport var normalizePrimaryProperty = function normalizePrimaryProperty(columns, primaryKey) {\n var result;\n if (typeof primaryKey === 'string' || typeof primaryKey === 'boolean') {\n result = primaryKey;\n } else if (primaryKey === null) {\n console.warn('null is not a supported value for primaryKey. See supported values: https://v2.grommet.io/datatable#primaryKey');\n }\n if (result === undefined) {\n columns.forEach(function (column) {\n // remember the first key property\n if (column.primary && !result) {\n result = column.property;\n }\n });\n }\n if (result === undefined && columns.length > 0) {\n result = columns[0].property;\n }\n return result;\n};\n\n// initialize filters with empty strings\nexport var initializeFilters = function initializeFilters(columns) {\n var result = {};\n columns.forEach(function (column) {\n if (column.search) {\n result[column.property] = '';\n }\n });\n return result;\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping\nvar escapeRegExp = function escapeRegExp(input) {\n return input.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n};\n\n// filter data based on filters then sort\nexport var filterAndSortData = function filterAndSortData(data, filters, onSearch, sort) {\n var result = data;\n if (!onSearch) {\n var regexps = {};\n Object.keys(filters).filter(function (n) {\n return filters[n];\n }).forEach(function (n) {\n regexps[n] = new RegExp(escapeRegExp(filters[n]), 'i');\n });\n if (Object.keys(regexps).length > 0) {\n result = data.filter(function (datum) {\n return !Object.keys(regexps).some(function (property) {\n return !regexps[property].test(datumValue(datum, property));\n });\n });\n }\n }\n if (sort && !sort.external) {\n var property = sort.property,\n direction = sort.direction;\n result = result === data ? [].concat(data) : result; // don't sort caller's data\n var sortAsc = direction === 'asc';\n var before = sortAsc ? 1 : -1;\n var after = sortAsc ? -1 : 1;\n result.sort(function (d1, d2) {\n var d1Val = datumValue(d1, property);\n var d2Val = datumValue(d2, property);\n if (typeof d1Val === 'string' && typeof d2Val === 'string' || typeof d1Val === 'string' && !d2Val || typeof d2Val === 'string' && !d1Val) {\n var sortResult = (d1Val || '').localeCompare(d2Val || '', undefined, {\n sensitivity: 'base'\n });\n return sortAsc ? sortResult : -sortResult;\n }\n if (d1Val > d2Val) return before;\n if (d1Val < d2Val) return after;\n return 0;\n });\n }\n return result;\n};\n\n// aggregate reducers\nvar sumReducer = function sumReducer(accumulated, next) {\n return accumulated + next;\n};\nvar minReducer = function minReducer(accumulated, next) {\n return accumulated === undefined ? next : Math.min(accumulated, next);\n};\nvar maxReducer = function maxReducer(accumulated, next) {\n return accumulated === undefined ? next : Math.max(accumulated, next);\n};\nvar reducers = {\n max: maxReducer,\n min: minReducer,\n sum: sumReducer\n};\n\n// aggregate reducers init values\nvar reducersInitValues = {\n min: Number.MAX_VALUE,\n max: Number.MIN_VALUE,\n sum: 0\n};\n\n// aggregate a single column\nvar aggregateColumn = function aggregateColumn(column, data) {\n var value;\n if (column.aggregate === 'avg') {\n value = data.map(function (d) {\n return datumValue(d, column.property);\n }).reduce(sumReducer);\n value /= data.length;\n } else {\n value = data.map(function (d) {\n return datumValue(d, column.property);\n }).reduce(reducers[column.aggregate], reducersInitValues[column.aggregate]);\n }\n return value;\n};\n\n// aggregate all columns that can\nvar aggregate = function aggregate(columns, data) {\n var result = {};\n columns.forEach(function (column) {\n if (column.aggregate) {\n var value = aggregateColumn(column, data);\n result = set(result, column.property, value);\n }\n });\n return result;\n};\n\n// build the values for the footer cells\nexport var buildFooterValues = function buildFooterValues(columns, data) {\n var aggregateValues = aggregate(columns, data);\n var result = {};\n columns.forEach(function (column) {\n if (column.footer) {\n if (column.footer.aggregate) {\n var value = datumValue(aggregateValues, column.property);\n result = set(result, column.property, value);\n } else {\n result = set(result, column.property, column.footer);\n }\n }\n });\n return result;\n};\n\n// looks at the groupBy property of each data object and returns an\n// array with one item for each unique value of that property.\nexport var buildGroups = function buildGroups(columns, data, groupBy, primaryProperty) {\n var result;\n if (groupBy != null && groupBy.property || typeof groupBy === 'string') {\n result = [];\n var groupMap = {};\n data.forEach(function (datum) {\n var _groupBy$expandable;\n var key = datumValue(datum, primaryProperty);\n var isGroup = key && ((_groupBy$expandable = groupBy.expandable) == null ? void 0 : _groupBy$expandable.includes(key));\n var groupByProperty = groupBy.property ? groupBy.property : groupBy;\n var groupValue = isGroup ? key : datumValue(datum, groupByProperty);\n if (!groupMap[groupValue]) {\n var group = {\n data: [],\n datum: isGroup ? datum : {},\n key: groupValue\n };\n group.datum[groupByProperty] = groupValue;\n result.push(group);\n groupMap[groupValue] = group;\n }\n if (!isGroup) groupMap[groupValue].data.push(datum);\n });\n\n // include any aggregate column values across the data for each group\n // If expandable was specified we let the onUpdate callback do it since\n // we may not have access to all the data to aggregate it.\n if (!groupBy.expandable) {\n columns.forEach(function (column) {\n if (column.aggregate) {\n result.forEach(function (group) {\n var datum = group.datum;\n datum[column.property] = aggregateColumn(column, group.data);\n });\n }\n });\n }\n } else if (groupBy != null && groupBy.expandable) {\n result = groupBy.expandable.map(function (key) {\n return {\n data: [],\n datum: {},\n key: key\n };\n });\n }\n return result;\n};\n\n// build group expanded state, expanding any in groupBy.expand\nexport var buildGroupState = function buildGroupState(groups, groupBy) {\n var result = {};\n if (groups) {\n groups.forEach(function (_ref) {\n var key = _ref.key;\n if (key !== undefined) result[key] = {\n expanded: false\n };\n });\n }\n if (groupBy && groupBy.expand) {\n groupBy.expand.forEach(function (value) {\n result[value] = {\n expanded: true\n };\n });\n }\n return result;\n};\nexport var normalizeBackgroundColor = function normalizeBackgroundColor(theme) {\n var background = theme.background; // context background\n if (typeof background === 'string') return background;\n if (background.light && background.dark) return background;\n if (background.color) return background.color;\n return undefined;\n};\nexport var normalizeRowProp = function normalizeRowProp(name, rowProp, prop) {\n if (rowProp && rowProp[name]) return rowProp[name];\n return prop;\n};\nvar tableContextNames = ['header', 'body', 'footer'];\nvar cellPropertyNames = ['background', 'border', 'pad'];\n\n// Convert property specific cell props to context specific cell props.\n// For example, background={{ header: { background } }}\n// will become cellProps.header.background\nexport var normalizeCellProps = function normalizeCellProps(props, theme) {\n var result = {};\n tableContextNames.forEach(function (context) {\n result[context] = {\n pinned: {}\n };\n cellPropertyNames.forEach(function (propName) {\n var _props$propName, _theme$dataTable, _theme$table, _props$propName3, _props$propName5, _theme$dataTable2;\n var value = (props == null || (_props$propName = props[propName]) == null ? void 0 : _props$propName[context]) ||\n // if the propName is used without context, it applies to all contexts\n tableContextNames.every(function (n) {\n var _props$propName2;\n return !(props != null && (_props$propName2 = props[propName]) != null && _props$propName2[n]);\n }) && (props == null ? void 0 : props[propName]) || (theme == null || (_theme$dataTable = theme.dataTable) == null || (_theme$dataTable = _theme$dataTable[context]) == null ? void 0 : _theme$dataTable[propName]) || (theme == null || (_theme$table = theme.table) == null || (_theme$table = _theme$table[context]) == null ? void 0 : _theme$table[propName]);\n if (value !== undefined) result[context][propName] = value;\n\n // pinned case\n value = (props == null || (_props$propName3 = props[propName]) == null || (_props$propName3 = _props$propName3.pinned) == null ? void 0 : _props$propName3[context]) || context === 'body' && tableContextNames.every(function (n) {\n var _props$propName4;\n return !(props != null && (_props$propName4 = props[propName]) != null && (_props$propName4 = _props$propName4.pinned) != null && _props$propName4[n]);\n }) && (props == null || (_props$propName5 = props[propName]) == null ? void 0 : _props$propName5.pinned) || (theme == null || (_theme$dataTable2 = theme.dataTable) == null || (_theme$dataTable2 = _theme$dataTable2.pinned) == null || (_theme$dataTable2 = _theme$dataTable2[context]) == null ? void 0 : _theme$dataTable2[propName]);\n if (value !== undefined) {\n if (propName === 'background' && theme.background && value.opacity && !value.color)\n // theme context has an active background color but the\n // theme doesn't set an explicit color, repeat the context\n // background explicitly\n value.color = normalizeBackgroundColor(theme);\n if (context === 'body')\n // in case we have pinned columns, store the pinned stuff in\n // cellProps.body.pinned\n result[context].pinned[propName] = value;else if (props.pin === true || props.pin === context)\n // this context is pinned, use the pinned value directly\n result[context][propName] = value;\n }\n });\n });\n return result;\n};\nexport var normalizeRowCellProps = function normalizeRowCellProps(rowProps, cellProps, primaryKey, index) {\n var result = {\n pinned: {}\n };\n ['background', 'border', 'pad'].forEach(function (propName) {\n var _rowProps$primaryKey;\n var row = primaryKey && rowProps && (rowProps == null || (_rowProps$primaryKey = rowProps[primaryKey]) == null ? void 0 : _rowProps$primaryKey[propName]);\n var cell = cellProps[propName];\n var value = row && (Array.isArray(row) ? row[index % row.length] : row) || (Array.isArray(cell) ? cell[index % cell.length] : cell);\n if (value !== undefined) result[propName] = value;\n var rowPin = rowProps && rowProps.pinned && rowProps.pinned[propName];\n var cellPin = cellProps.pinned[propName];\n value = rowPin && (Array.isArray(rowPin) ? rowPin[index % rowPin.length] : rowPin) || (Array.isArray(cellPin) ? cellPin[index % cellPin.length] : cellPin);\n if (value !== undefined) result.pinned[propName] = value;\n });\n return result;\n};","var _excluded = [\"background\", \"border\", \"color\", \"font\", \"gap\", \"pad\", \"units\"],\n _excluded2 = [\"cellProps\", \"columns\", \"data\", \"disabled\", \"fill\", \"filtering\", \"filters\", \"groupBy\", \"groups\", \"groupState\", \"onFilter\", \"onFiltering\", \"onResize\", \"onSelect\", \"onSort\", \"onToggle\", \"onWidths\", \"pin\", \"pinnedOffset\", \"primaryProperty\", \"selected\", \"rowDetails\", \"sort\", \"widths\", \"verticalAlign\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n/* eslint-disable no-underscore-dangle */\nimport React, { forwardRef, useCallback, useContext, useEffect, useState } from 'react';\nimport styled, { css, ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { CheckBox } from '../CheckBox';\nimport { TableCell, verticalAlignToJustify } from '../TableCell/TableCell';\nimport { Text } from '../Text';\nimport { Resizer } from './Resizer';\nimport { Searcher } from './Searcher';\nimport { ExpanderCell } from './ExpanderCell';\nimport { StyledDataTableCell, StyledDataTableHeader, StyledDataTableRow } from './StyledDataTable';\nimport { datumValue } from './buildState';\nimport { kindPartStyles } from '../../utils/styles';\nimport { normalizeColor } from '../../utils/colors';\n\n// separate theme values into groupings depending on what\n// part of header cell they should style\nvar separateThemeProps = function separateThemeProps(theme) {\n var _theme$dataTable$head = theme.dataTable.header,\n background = _theme$dataTable$head.background,\n border = _theme$dataTable$head.border,\n color = _theme$dataTable$head.color,\n font = _theme$dataTable$head.font,\n gap = _theme$dataTable$head.gap,\n pad = _theme$dataTable$head.pad,\n units = _theme$dataTable$head.units,\n rest = _objectWithoutPropertiesLoose(_theme$dataTable$head, _excluded);\n var textProps = _extends({\n color: color\n }, font);\n var iconProps = {\n color: color\n };\n var layoutProps = _extends({}, rest);\n return [layoutProps, textProps, iconProps];\n};\n\n// build up CSS from basic to specific based on the supplied sub-object paths.\n// adapted from StyledButtonKind to only include parts relevant for DataTable\nvar buttonStyle = function buttonStyle(_ref) {\n var pad = _ref.pad,\n theme = _ref.theme,\n verticalAlign = _ref.verticalAlign;\n var styles = [];\n var _separateThemeProps = separateThemeProps(theme),\n layoutProps = _separateThemeProps[0],\n iconProps = _separateThemeProps[2];\n\n // if cell is sortable, we want pad to be applied\n // to the button instead of the cell\n if (pad) {\n styles.push(kindPartStyles({\n pad: pad\n }, theme));\n }\n if (layoutProps) {\n styles.push(kindPartStyles(layoutProps, theme));\n }\n if (layoutProps.hover) {\n // CSS for this sub-object in the theme\n var partStyles = kindPartStyles(layoutProps.hover, theme);\n if (partStyles.length > 0) styles.push(css([\"&:hover{\", \"}\"], partStyles));\n }\n if (iconProps.color) {\n styles.push(css([\"svg{stroke:\", \";fill:\", \";}\"], normalizeColor(iconProps.color, theme), normalizeColor(iconProps.color, theme)));\n }\n var align = 'center';\n if (verticalAlign === 'bottom') align = 'end';\n if (verticalAlign === 'top') align = 'start';\n if (verticalAlign) {\n styles.push(css([\"display:inline-flex;align-items:\", \";\"], align));\n }\n return styles;\n};\nvar StyledHeaderCellButton = styled(Button).withConfig({\n displayName: \"Header__StyledHeaderCellButton\",\n componentId: \"sc-1baku5q-0\"\n})([\"\", \"\"], function (props) {\n return buttonStyle(props);\n});\n\n// allow extend to spread onto Box that surrounds column label\nvar StyledContentBox = styled(Box).withConfig({\n displayName: \"Header__StyledContentBox\",\n componentId: \"sc-1baku5q-1\"\n})([\"\", \"\"], function (props) {\n return props.extend;\n});\nvar Header = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var cellProps = _ref2.cellProps,\n columns = _ref2.columns,\n data = _ref2.data,\n disabled = _ref2.disabled,\n fill = _ref2.fill,\n filtering = _ref2.filtering,\n filters = _ref2.filters,\n groupBy = _ref2.groupBy,\n groups = _ref2.groups,\n groupState = _ref2.groupState,\n onFilter = _ref2.onFilter,\n onFiltering = _ref2.onFiltering,\n onResize = _ref2.onResize,\n onSelect = _ref2.onSelect,\n onSort = _ref2.onSort,\n onToggle = _ref2.onToggle,\n onWidths = _ref2.onWidths,\n pinProp = _ref2.pin,\n pinnedOffset = _ref2.pinnedOffset,\n primaryProperty = _ref2.primaryProperty,\n selected = _ref2.selected,\n rowDetails = _ref2.rowDetails,\n sort = _ref2.sort,\n widths = _ref2.widths,\n verticalAlign = _ref2.verticalAlign,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _separateThemeProps2 = separateThemeProps(theme),\n layoutProps = _separateThemeProps2[0],\n textProps = _separateThemeProps2[1];\n var _useState = useState([]),\n cellWidths = _useState[0],\n setCellWidths = _useState[1];\n var updateWidths = useCallback(function (width) {\n return setCellWidths(function (values) {\n return [].concat(values, [width]);\n });\n }, []);\n useEffect(function () {\n if (onWidths && cellWidths.length !== 0) {\n onWidths(cellWidths);\n }\n }, [cellWidths, onWidths]);\n var pin = pinProp ? ['top'] : [];\n var selectPin = pinnedOffset != null && pinnedOffset._grommetDataTableSelect ? [].concat(pin, ['left']) : pin;\n var totalSelectedGroups = groupBy != null && groupBy.select ? Object.keys(groupBy.select).reduce(function (total, cur) {\n return cur && groupBy.select[cur] === 'all' ? total + 1 : total;\n }, 0) : 0;\n var totalSelected = ((selected == null ? void 0 : selected.length) || 0) + totalSelectedGroups;\n var onChangeSelection = useCallback(function () {\n var nextSelected;\n var nextGroupSelected = {};\n\n // Since some rows might be disabled but already selected, we need to\n // note which rows are enabled when determining how aggregate selection\n // works.\n var primaryValues = data.map(function (datum) {\n return datumValue(datum, primaryProperty);\n }) || [];\n // enabled includes what can be changed\n var enabled = disabled && primaryValues.filter(function (v) {\n return !disabled.includes(v);\n }) || primaryValues;\n // enabledSelected includes what can be changed and is currently selected\n var enabledSelected = selected && enabled.filter(function (v) {\n return selected.includes(v);\n }) || primaryValues;\n var allSelected = groupBy != null && groupBy.select ? groupBy.select[''] === 'all' : enabledSelected.length === enabled.length;\n if (allSelected) {\n // if any are disabled and selected, leave those, otherwise clear\n nextSelected = disabled ? primaryValues.filter(function (v) {\n return disabled.includes(v) && selected.includes(v);\n }) : [];\n nextGroupSelected[''] = 'none';\n } else {\n var _groupBy$expandable;\n // if some or none are selected, select all enabled plus all disabled\n // that are already selected\n nextSelected = disabled ? primaryValues.filter(function (v) {\n return !disabled.includes(v) || selected.includes(v);\n }) : primaryValues;\n nextGroupSelected[''] = 'all';\n groupBy == null || (_groupBy$expandable = groupBy.expandable) == null ? void 0 : _groupBy$expandable.forEach(function (key) {\n nextGroupSelected[key] = 'all';\n });\n }\n if (groupBy != null && groupBy.onSelect) {\n groupBy.onSelect(nextSelected, undefined, nextGroupSelected);\n } else onSelect(nextSelected);\n }, [data, disabled, groupBy, onSelect, primaryProperty, selected]);\n return /*#__PURE__*/React.createElement(StyledDataTableHeader, _extends({\n ref: ref,\n fillProp: fill\n }, rest), /*#__PURE__*/React.createElement(StyledDataTableRow, null, groups && /*#__PURE__*/React.createElement(ExpanderCell, {\n background: cellProps.background,\n border: cellProps.border,\n context: \"header\",\n expanded: Object.keys(groupState).filter(function (k) {\n return !groupState[k].expanded;\n }).length === 0,\n onToggle: onToggle,\n pad: cellProps.pad\n }), (selected || onSelect) && /*#__PURE__*/React.createElement(StyledDataTableCell, {\n background: cellProps.background,\n onWidth: updateWidths,\n plain: \"noPad\",\n size: \"auto\",\n context: \"header\",\n scope: \"col\",\n pin: selectPin,\n pinnedOffset: pinnedOffset == null ? void 0 : pinnedOffset._grommetDataTableSelect,\n verticalAlign: verticalAlign\n }, onSelect && /*#__PURE__*/React.createElement(CheckBox, {\n a11yTitle: totalSelected === data.length ? 'unselect all' : 'select all',\n checked: groupBy != null && groupBy.select ? groupBy.select[''] === 'all' : totalSelected > 0 && data.length > 0 && totalSelected === data.length,\n indeterminate: groupBy != null && groupBy.select ? groupBy.select[''] === 'some' : totalSelected > 0 && totalSelected < data.length,\n onChange: onChangeSelection,\n pad: cellProps.pad\n })), rowDetails && /*#__PURE__*/React.createElement(TableCell, {\n size: \"xxsmall\",\n plain: true,\n pad: \"none\"\n }), columns.map(function (_ref3) {\n var property = _ref3.property,\n header = _ref3.header,\n align = _ref3.align,\n columnPin = _ref3.pin,\n search = _ref3.search,\n sortable = _ref3.sortable,\n columnVerticalAlign = _ref3.verticalAlign,\n size = _ref3.size,\n units = _ref3.units;\n var content;\n var unitsContent = units ? /*#__PURE__*/React.createElement(Text, _extends({}, textProps, theme.dataTable.header.units), units) : undefined;\n if (typeof header === 'string') {\n content = /*#__PURE__*/React.createElement(Text, textProps, header);\n if (Object.keys(layoutProps).length && (sortable === false || !onSort)) {\n // apply rest of layout styling if cell is not sortable,\n // otherwise this styling will be applied by\n // StyledHeaderCellButton\n content = /*#__PURE__*/React.createElement(StyledContentBox, layoutProps, content);\n }\n } else content = header;\n if (unitsContent) {\n content = /*#__PURE__*/React.createElement(Box, {\n justify: align,\n direction: \"row\"\n }, content, unitsContent);\n }\n if (verticalAlign || columnVerticalAlign) {\n var vertical = verticalAlign || columnVerticalAlign;\n content = /*#__PURE__*/React.createElement(Box, {\n height: \"100%\",\n justify: verticalAlignToJustify[vertical]\n }, content);\n }\n if (onSort && sortable !== false) {\n var Icon;\n if (onSort && sortable !== false) {\n if (sort && sort.property === property) {\n Icon = theme.dataTable.icons[sort.direction !== 'asc' ? 'ascending' : 'descending'];\n } else if (theme.dataTable.icons.sortable) {\n Icon = theme.dataTable.icons.sortable;\n }\n }\n content = /*#__PURE__*/React.createElement(StyledHeaderCellButton, {\n plain: true,\n column: property,\n fill: \"vertical\",\n onClick: onSort(property),\n sort: sort,\n pad: cellProps.pad,\n sortable: true,\n verticalAlign: verticalAlign || columnVerticalAlign\n }, /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n gap: \"xsmall\",\n justify: align\n }, content, Icon && /*#__PURE__*/React.createElement(Icon, null)));\n }\n\n // content should fill any available space in cell\n // If `onResize` or `search` is true we need to explicitly set\n // fill because later if either of these props is true content\n // will be wrapped with an additional Box, preventing this Box\n // from automatically filling the vertical space.\n content = /*#__PURE__*/React.createElement(Box, {\n flex: \"grow\",\n fill: onResize || search ? 'vertical' : false,\n justify: !align && 'center' || align\n }, content);\n if (search || onResize) {\n var resizer = onResize ? /*#__PURE__*/React.createElement(Resizer, {\n property: property,\n onResize: onResize\n }) : null;\n var searcher = search && filters ? /*#__PURE__*/React.createElement(Searcher, {\n filtering: filtering,\n filters: filters,\n property: property,\n onFilter: onFilter,\n onFiltering: onFiltering\n }) : null;\n content = /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n justify: !align || align === 'start' ? 'between' : align,\n gap: theme.dataTable.header.gap,\n fill: \"vertical\",\n style: onResize ? {\n position: 'relative'\n } : undefined\n }, content, searcher && resizer ? /*#__PURE__*/React.createElement(Box, {\n flex: \"shrink\",\n direction: \"row\",\n align: \"center\",\n gap: theme.dataTable.header.gap\n }, searcher, resizer) : searcher || resizer);\n }\n var cellPin = [].concat(pin);\n if (columnPin) cellPin.push('left');\n return /*#__PURE__*/React.createElement(StyledDataTableCell, {\n key: property,\n align: align,\n context: \"header\",\n verticalAlign: verticalAlign || columnVerticalAlign,\n background: cellProps.background,\n border: cellProps.border,\n onWidth: updateWidths\n // if sortable, pad will be included in the button styling\n ,\n pad: sortable === false || !onSort ? cellProps.pad : 'none',\n pin: cellPin,\n plain: true,\n pinnedOffset: pinnedOffset && pinnedOffset[property],\n scope: \"col\",\n size: widths && widths[property] ? undefined : size,\n style: widths && widths[property] ? {\n width: widths[property]\n } : undefined\n }, content);\n })));\n});\nHeader.displayName = 'Header';\nHeader.defaultProps = {};\nObject.setPrototypeOf(Header.defaultProps, defaultProps);\nexport { Header };","var _excluded = [\"background\", \"border\", \"column\", \"datum\", \"pad\", \"pin\", \"pinnedOffset\", \"primaryProperty\", \"scope\", \"verticalAlign\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { isValidElement, memo, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Text } from '../Text';\nimport { StyledDataTableCell } from './StyledDataTable';\nimport { datumValue } from './buildState';\nimport { TableContext } from '../Table/TableContext';\nvar Cell = /*#__PURE__*/memo(function (_ref) {\n var background = _ref.background,\n border = _ref.border,\n _ref$column = _ref.column,\n align = _ref$column.align,\n columnPin = _ref$column.pin,\n plain = _ref$column.plain,\n footer = _ref$column.footer,\n property = _ref$column.property,\n render = _ref$column.render,\n columnVerticalAlign = _ref$column.verticalAlign,\n size = _ref$column.size,\n datum = _ref.datum,\n pad = _ref.pad,\n cellPin = _ref.pin,\n pinnedOffset = _ref.pinnedOffset,\n primaryProperty = _ref.primaryProperty,\n scope = _ref.scope,\n verticalAlign = _ref.verticalAlign,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var value = datumValue(datum, property);\n var context = useContext(TableContext);\n var renderContexts = context === 'body' || context === 'footer' && footer && footer.aggregate;\n var content;\n if (render && renderContexts) {\n content = render(datum);\n } else if (value !== undefined) {\n if (typeof value === 'string' || typeof value === 'number' || /*#__PURE__*/isValidElement(value)) content = value;\n }\n if (typeof content === 'string' || typeof content === 'number') {\n var textProps = property === primaryProperty ? theme.dataTable.primary : {};\n content = /*#__PURE__*/React.createElement(Text, textProps, content);\n }\n var pin = [];\n if (cellPin) pin.push.apply(pin, cellPin);\n if (columnPin) pin.push('left');\n return /*#__PURE__*/React.createElement(StyledDataTableCell, _extends({\n scope: scope\n }, theme.dataTable[context], {\n align: align,\n context: context,\n verticalAlign: verticalAlign || columnVerticalAlign,\n size: size,\n background: background,\n pinnedOffset: pinnedOffset,\n border: border,\n pad: pad,\n pin: pin,\n plain: plain ? 'noPad' : undefined\n }, rest), content);\n});\nCell.displayName = 'Cell';\nCell.defaultProps = {};\nObject.setPrototypeOf(Cell.defaultProps, defaultProps);\nexport { Cell };","var _excluded = [\"cellProps\", \"columns\", \"fill\", \"footerValues\", \"groups\", \"onSelect\", \"pin\", \"pinnedOffset\", \"primaryProperty\", \"selected\", \"verticalAlign\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef } from 'react';\nimport { defaultProps } from '../../default-props';\nimport { TableRow } from '../TableRow';\nimport { TableCell } from '../TableCell';\nimport { Cell } from './Cell';\nimport { StyledDataTableCell, StyledDataTableFooter } from './StyledDataTable';\nvar Footer = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var cellProps = _ref.cellProps,\n columns = _ref.columns,\n fill = _ref.fill,\n footerValues = _ref.footerValues,\n groups = _ref.groups,\n onSelect = _ref.onSelect,\n pinProp = _ref.pin,\n pinnedOffset = _ref.pinnedOffset,\n primaryProperty = _ref.primaryProperty,\n selected = _ref.selected,\n verticalAlign = _ref.verticalAlign,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var pin = pinProp ? ['bottom'] : [];\n return /*#__PURE__*/React.createElement(StyledDataTableFooter, _extends({\n ref: ref,\n fillProp: fill,\n pin: pinProp\n }, rest), /*#__PURE__*/React.createElement(TableRow, null, groups && /*#__PURE__*/React.createElement(TableCell, {\n plain: true,\n size: \"xxsmall\",\n pad: \"none\",\n verticalAlign: \"top\",\n background: cellProps.background,\n border: cellProps.border\n }), (selected || onSelect) && /*#__PURE__*/React.createElement(StyledDataTableCell, {\n background: cellProps.background,\n context: \"footer\",\n pin: pin,\n verticalAlign: verticalAlign\n }), columns.map(function (column) {\n var cellPin = [].concat(pin);\n if (column.pin) cellPin.push('left');\n return /*#__PURE__*/React.createElement(Cell, {\n key: column.property,\n background: column.pin && cellProps.pinned.background || cellProps.background,\n border: column.pin && cellProps.pinned.border || cellProps.border,\n context: \"footer\",\n column: column,\n datum: footerValues,\n pad: column.pin && cellProps.pinned.pad || cellProps.pad,\n pin: pin.length ? pin : undefined,\n pinnedOffset: pinnedOffset && pinnedOffset[column.property],\n primaryProperty: primaryProperty,\n verticalAlign: verticalAlign\n });\n })));\n});\nFooter.displayName = 'Footer';\nFooter.defaultProps = {};\nObject.setPrototypeOf(Footer.defaultProps, defaultProps);\nexport { Footer };","var _excluded = [\"cellProps\", \"columns\", \"data\", \"disabled\", \"onMore\", \"replace\", \"onClickRow\", \"onSelect\", \"pinnedOffset\", \"primaryProperty\", \"rowProps\", \"selected\", \"rowDetails\", \"show\", \"size\", \"step\", \"rowExpand\", \"setRowExpand\", \"verticalAlign\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n/* eslint-disable no-underscore-dangle */\nimport React, { forwardRef, memo, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { useKeyboard } from '../../utils';\nimport { CheckBox } from '../CheckBox';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { TableRow } from '../TableRow';\nimport { TableCell } from '../TableCell';\nimport { Keyboard } from '../Keyboard';\nimport { ExpanderCell } from './ExpanderCell';\nimport { Cell } from './Cell';\nimport { StyledDataTableBody, StyledDataTableRow } from './StyledDataTable';\nimport { datumValue, normalizeRowCellProps } from './buildState';\nimport { defaultProps } from '../../default-props';\nvar Row = /*#__PURE__*/memo(function (_ref) {\n var cellProps = _ref.cellProps,\n primaryValue = _ref.primaryValue,\n index = _ref.index,\n rowRef = _ref.rowRef,\n size = _ref.size,\n active = _ref.active,\n onClickRow = _ref.onClickRow,\n datum = _ref.datum,\n selected = _ref.selected,\n onSelect = _ref.onSelect,\n isDisabled = _ref.isDisabled,\n isSelected = _ref.isSelected,\n rowDetails = _ref.rowDetails,\n isRowExpanded = _ref.isRowExpanded,\n setActive = _ref.setActive,\n setRowExpand = _ref.setRowExpand,\n rowExpand = _ref.rowExpand,\n columns = _ref.columns,\n pinnedOffset = _ref.pinnedOffset,\n primaryProperty = _ref.primaryProperty,\n data = _ref.data,\n verticalAlign = _ref.verticalAlign;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledDataTableRow, {\n ref: rowRef,\n size: size,\n active: active,\n \"aria-disabled\": onClickRow && isDisabled || undefined,\n onClick: onClickRow ? function (event) {\n if (onClickRow && !isDisabled) {\n if (typeof onClickRow === 'function') {\n // extract from React's synthetic event pool\n event.persist();\n var adjustedEvent = event;\n adjustedEvent.datum = datum;\n adjustedEvent.index = index;\n onClickRow(adjustedEvent);\n } else if (onClickRow === 'select') {\n if (isSelected) {\n onSelect(selected.filter(function (s) {\n return s !== primaryValue;\n }), datum);\n } else onSelect([].concat(selected, [primaryValue]), datum);\n }\n }\n } : undefined,\n onMouseEnter: onClickRow && !isDisabled ? function () {\n return setActive(index);\n } : undefined,\n onMouseLeave: onClickRow ? function () {\n return setActive(undefined);\n } : undefined\n }, (selected || onSelect) && /*#__PURE__*/React.createElement(Cell, {\n background: (pinnedOffset == null ? void 0 : pinnedOffset._grommetDataTableSelect) && cellProps.pinned.background || cellProps.background,\n border: cellProps.pinned.border || cellProps.border,\n pinnedOffset: pinnedOffset == null ? void 0 : pinnedOffset._grommetDataTableSelect,\n \"aria-disabled\": isDisabled || !onSelect || undefined,\n column: {\n pin: Boolean(pinnedOffset == null ? void 0 : pinnedOffset._grommetDataTableSelect),\n plain: 'noPad',\n size: 'auto',\n render: function render() {\n return /*#__PURE__*/React.createElement(CheckBox, {\n tabIndex: onClickRow === 'select' ? -1 : undefined,\n a11yTitle: (isSelected ? 'unselect' : 'select') + \" \" + primaryValue,\n checked: isSelected,\n disabled: isDisabled || !onSelect,\n onChange: function onChange() {\n if (isSelected) {\n onSelect(selected.filter(function (s) {\n return s !== primaryValue;\n }), datum);\n } else onSelect([].concat(selected, [primaryValue]), datum);\n },\n pad: cellProps.pad\n });\n }\n },\n verticalAlign: verticalAlign\n }), rowDetails && /*#__PURE__*/React.createElement(ExpanderCell, {\n context: isRowExpanded ? 'groupHeader' : 'body',\n expanded: isRowExpanded,\n onToggle: function onToggle() {\n if (isRowExpanded) {\n setRowExpand(rowExpand.filter(function (s) {\n return s !== index;\n }));\n } else {\n setRowExpand([].concat(rowExpand, [index]));\n }\n },\n pad: cellProps.pad,\n verticalAlign: verticalAlign\n }), columns.map(function (column) {\n return /*#__PURE__*/React.createElement(Cell, {\n key: column.property,\n background: column.pin && cellProps.pinned.background || cellProps.background,\n border: column.pin && cellProps.pinned.border || cellProps.border,\n context: \"body\",\n column: column,\n datum: datum,\n pad: column.pin && cellProps.pinned.pad || cellProps.pad,\n pinnedOffset: pinnedOffset && pinnedOffset[column.property],\n primaryProperty: primaryProperty,\n scope: column.primary || column.property === primaryProperty ? 'row' : undefined,\n verticalAlign: verticalAlign\n });\n })), rowDetails && isRowExpanded && /*#__PURE__*/React.createElement(StyledDataTableRow, {\n key: index.toString() + \"_expand\"\n }, (selected || onSelect) && /*#__PURE__*/React.createElement(TableCell, null), /*#__PURE__*/React.createElement(TableCell, {\n colSpan: columns.length + 1\n }, rowDetails(data[index]))));\n});\nvar Body = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var _ref3;\n var cellPropsProp = _ref2.cellProps,\n columns = _ref2.columns,\n data = _ref2.data,\n disabled = _ref2.disabled,\n onMore = _ref2.onMore,\n replace = _ref2.replace,\n onClickRow = _ref2.onClickRow,\n onSelect = _ref2.onSelect,\n pinnedOffset = _ref2.pinnedOffset,\n primaryProperty = _ref2.primaryProperty,\n rowProps = _ref2.rowProps,\n selected = _ref2.selected,\n rowDetails = _ref2.rowDetails,\n show = _ref2.show,\n size = _ref2.size,\n step = _ref2.step,\n rowExpand = _ref2.rowExpand,\n setRowExpand = _ref2.setRowExpand,\n verticalAlign = _ref2.verticalAlign,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _React$useState = React.useState(),\n active = _React$useState[0],\n setActive = _React$useState[1];\n var _React$useState2 = React.useState(),\n lastActive = _React$useState2[0],\n setLastActive = _React$useState2[1];\n\n // Determine if using a keyboard to cover focus behavior\n var usingKeyboard = useKeyboard();\n var onFocusActive = (_ref3 = active != null ? active : lastActive) != null ? _ref3 : usingKeyboard ? 0 : undefined;\n var activePrimaryValue = active >= 0 ? datumValue(data[active], primaryProperty) : undefined;\n var selectRow = function selectRow() {\n if (activePrimaryValue !== undefined) {\n if (selected && selected.includes(activePrimaryValue)) {\n onSelect(selected.filter(function (s) {\n return s !== activePrimaryValue;\n }));\n } else onSelect([].concat(selected, [activePrimaryValue]));\n }\n };\n var clickableRow = onClickRow && active >= 0 && (!disabled || activePrimaryValue !== undefined && !disabled.includes(activePrimaryValue));\n return /*#__PURE__*/React.createElement(Keyboard, {\n onEnter: clickableRow ? function (event) {\n if (clickableRow) {\n if (typeof onClickRow === 'function') {\n event.persist();\n var adjustedEvent = event;\n adjustedEvent.datum = data[active];\n onClickRow(adjustedEvent);\n } else if (onClickRow === 'select') {\n selectRow();\n }\n }\n } : undefined\n // The WCAG recommendation for checkboxes is to select them with \"Space\"\n ,\n onSpace: function onSpace() {\n if (clickableRow) {\n if (onClickRow === 'select') {\n selectRow();\n }\n }\n },\n onUp: onClickRow && active ? function () {\n return setActive(active - 1);\n } : undefined,\n onDown: onClickRow && data.length && active < data.length - 1 ? function () {\n return setActive((active != null ? active : -1) + 1);\n } : undefined\n }, /*#__PURE__*/React.createElement(StyledDataTableBody, _extends({\n ref: ref,\n size: size,\n tabIndex: onClickRow ? 0 : undefined,\n onFocus: function onFocus() {\n return setActive(onFocusActive);\n },\n onBlur: function onBlur() {\n setLastActive(active);\n setActive(undefined);\n }\n }, rest), /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: data,\n onMore: onMore,\n replace: replace,\n renderMarker: function renderMarker(marker) {\n return /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableCell, null, marker));\n },\n show: show,\n step: step\n }, function (datum, index, rowRef) {\n var primaryValue = primaryProperty ? datumValue(datum, primaryProperty) : undefined;\n var isSelected = selected && selected.includes(primaryValue);\n var isDisabled = disabled && disabled.includes(primaryValue);\n var isRowExpanded = rowExpand && rowExpand.includes(index);\n var cellProps = normalizeRowCellProps(rowProps, cellPropsProp, primaryValue, index);\n return /*#__PURE__*/React.createElement(Row, {\n key: primaryValue != null ? primaryValue : index,\n setActive: setActive,\n rowRef: rowRef,\n cellProps: cellProps,\n primaryValue: primaryValue,\n isDisabled: isDisabled,\n isSelected: isSelected,\n isRowExpanded: isRowExpanded,\n index: index,\n size: size,\n active: active >= 0 ? active === index : undefined,\n onClickRow: onClickRow,\n datum: datum,\n selected: selected,\n onSelect: onSelect,\n rowDetails: rowDetails,\n setRowExpand: setRowExpand,\n rowExpand: rowExpand,\n columns: columns,\n primaryProperty: primaryProperty,\n rowProps: rowProps,\n data: data,\n theme: theme,\n pinnedOffset: pinnedOffset,\n verticalAlign: verticalAlign\n });\n })));\n});\nexport { Body };","var _excluded = [\"cellProps\", \"columns\", \"data\", \"disabled\", \"groupBy\", \"groups\", \"groupState\", \"pinnedOffset\", \"primaryProperty\", \"onMore\", \"onSelect\", \"onToggle\", \"onUpdate\", \"replace\", \"rowProps\", \"selected\", \"size\", \"step\", \"verticalAlign\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useMemo } from 'react';\nimport { Cell } from './Cell';\nimport { ExpanderCell } from './ExpanderCell';\nimport { StyledDataTableBody, StyledDataTableRow } from './StyledDataTable';\nimport { CheckBox } from '../CheckBox/CheckBox';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { TableRow } from '../TableRow';\nimport { TableCell } from '../TableCell';\nimport { datumValue, normalizeRowCellProps } from './buildState';\nexport var GroupedBody = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var cellPropsProp = _ref.cellProps,\n columns = _ref.columns,\n data = _ref.data,\n disabled = _ref.disabled,\n groupBy = _ref.groupBy,\n groups = _ref.groups,\n groupState = _ref.groupState,\n pinnedOffset = _ref.pinnedOffset,\n primaryProperty = _ref.primaryProperty,\n onMore = _ref.onMore,\n onSelect = _ref.onSelect,\n onToggle = _ref.onToggle,\n onUpdate = _ref.onUpdate,\n replace = _ref.replace,\n rowProps = _ref.rowProps,\n selected = _ref.selected,\n size = _ref.size,\n step = _ref.step,\n verticalAlign = _ref.verticalAlign,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var items = useMemo(function () {\n var nextItems = [];\n groups.forEach(function (group) {\n var _ref2 = groupState[group.key] || {\n expanded: true\n },\n expanded = _ref2.expanded;\n var memberCount = group.data.length;\n var groupSelected = [];\n var isGroupSelected = false;\n var groupDisabled = [];\n var isGroupDisabled = false;\n if (memberCount > 1 || onUpdate && group.key !== undefined) {\n // need a header\n var primaryKeys = group.data.map(function (datum) {\n return datum[primaryProperty];\n });\n groupSelected = primaryKeys && selected ? primaryKeys.filter(function (val) {\n return selected.includes(val);\n }) : [];\n isGroupSelected = groupBy.select ? groupBy.select[group.key] === 'all' : groupSelected.length === group.data.length && groupSelected.length > 0;\n var indeterminate = groupBy.select ? groupBy.select[group.key] === 'some' : groupSelected.length > 0 && groupSelected.length < group.data.length;\n groupDisabled = primaryKeys && disabled ? primaryKeys.filter(function (val) {\n return disabled.includes(val);\n }) : [];\n isGroupDisabled = groupBy.disable ? groupBy.disable[group.key] === 'all' : groupDisabled.length === group.data.length && groupDisabled.length > 0;\n nextItems.push({\n expanded: expanded,\n key: group.key,\n primaryValue: group.key,\n datum: group.datum,\n context: 'groupHeader',\n isDisabled: isGroupDisabled,\n isSelected: isGroupSelected,\n indeterminate: indeterminate,\n onChange: function onChange() {\n var nextSelected = isGroupSelected || indeterminate ? selected.filter(function (s) {\n return !groupSelected.includes(s);\n }) : [].concat(selected, primaryKeys);\n if (groupBy.onSelect) {\n groupBy.onSelect(nextSelected, group.datum, groupBy.select);\n } else {\n onSelect(nextSelected, group.datum);\n }\n }\n });\n }\n if (!onUpdate && memberCount === 1 || expanded) {\n // add the group members\n group.data.forEach(function (datum, index) {\n var primaryValue = primaryProperty ? datumValue(datum, primaryProperty) : undefined;\n var isSelected = selected == null ? void 0 : selected.includes(primaryValue);\n var isDisabled = disabled == null ? void 0 : disabled.includes(primaryValue);\n nextItems.push({\n key: datum[primaryProperty],\n primaryValue: primaryProperty ? datumValue(datum, primaryProperty) : undefined,\n datum: datum,\n context: memberCount > 1 && index === memberCount - 1 ? 'groupEnd' : 'body',\n isDisabled: isDisabled,\n isSelected: isSelected,\n onChange: function onChange() {\n var nextSelected = isSelected ? selected.filter(function (s) {\n return s !== primaryValue;\n }) : [].concat(selected, [primaryValue]);\n onSelect(nextSelected, datum);\n }\n });\n });\n }\n });\n return nextItems;\n }, [disabled, groups, groupBy, groupState, primaryProperty, selected, onSelect, onUpdate]);\n return /*#__PURE__*/React.createElement(StyledDataTableBody, _extends({\n ref: ref,\n size: size\n }, rest), /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: items,\n onMore: onMore,\n replace: replace,\n renderMarker: function renderMarker(marker) {\n return /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableCell, null, marker));\n },\n step: step\n }, function (row, index, rowRef) {\n var context = row.context,\n datum = row.datum,\n expanded = row.expanded,\n indeterminate = row.indeterminate,\n isDisabled = row.isDisabled,\n isSelected = row.isSelected,\n key = row.key,\n onChange = row.onChange,\n primaryValue = row.primaryValue;\n var cellProps = normalizeRowCellProps(rowProps, cellPropsProp, primaryValue, index);\n return /*#__PURE__*/React.createElement(StyledDataTableRow, {\n ref: rowRef,\n key: key,\n size: size\n }, /*#__PURE__*/React.createElement(ExpanderCell, {\n background: cellProps.background,\n border: cellProps.border,\n context: context,\n pad: cellProps.pad,\n onToggle: context === 'groupHeader' ? onToggle(key) : undefined,\n expanded: expanded,\n verticalAlign: verticalAlign\n }), (selected || onSelect) && /*#__PURE__*/React.createElement(TableCell, {\n background: cellProps.background,\n border: cellProps.pinned.border || cellProps.border,\n plain: \"noPad\",\n size: \"auto\",\n verticalAlign: verticalAlign,\n \"aria-disabled\": isDisabled || !onSelect || undefined\n }, /*#__PURE__*/React.createElement(CheckBox, {\n a11yTitle: (isSelected ? 'unselect' : 'select') + \" \" + (context === 'groupHeader' ? key : primaryValue),\n checked: isSelected,\n indeterminate: indeterminate,\n disabled: isDisabled || !onSelect,\n onChange: onChange,\n pad: cellProps.pad\n })), columns.map(function (column) {\n var scope;\n if (context === 'groupHeader') {\n scope = column.property === groupBy.property ? 'row' : undefined;\n } else {\n scope = column.primary ? 'row' : undefined;\n }\n return /*#__PURE__*/React.createElement(Cell, {\n key: column.property,\n background: cellProps.background,\n border: cellProps.border,\n context: context,\n column: column,\n datum: datum,\n pad: cellProps.pad,\n scope: scope,\n pinnedOffset: context === 'groupHeader' && pinnedOffset && pinnedOffset[column.property],\n verticalAlign: verticalAlign\n });\n }));\n }));\n});","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar sizes = ['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge'];\nvar sides = ['horizontal', 'vertical', 'top', 'bottom', 'left', 'right'];\nvar parts = ['header', 'body', 'footer'];\nvar verticalAlign = ['bottom', 'middle', 'top'];\nvar padShapeSides = {};\nsides.forEach(function (side) {\n padShapeSides[side] = PropTypes.oneOfType([PropTypes.oneOf(sizes), PropTypes.string]);\n});\nvar padShapeParts = {};\nparts.forEach(function (part) {\n padShapeParts[part] = {};\n sides.forEach(function (side) {\n padShapeParts[part][side] = PropTypes.oneOf(sizes);\n });\n});\nvar backgroundShape = {};\n[].concat(parts, ['pinned']).forEach(function (part) {\n backgroundShape[part] = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n }), PropTypes.arrayOf(PropTypes.string)]);\n});\nvar borderTypes = [PropTypes.bool, PropTypes.oneOf(sides), PropTypes.shape({\n color: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n })]),\n side: PropTypes.oneOf(sides),\n size: PropTypes.oneOfType([PropTypes.oneOf(sizes), PropTypes.string])\n})];\nvar borderShape = {};\nparts.forEach(function (part) {\n borderShape[part] = PropTypes.oneOfType(borderTypes);\n});\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n background: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.shape(backgroundShape)]),\n border: PropTypes.oneOfType([].concat(borderTypes, [PropTypes.shape(borderShape)])),\n columns: PropTypes.arrayOf(PropTypes.shape({\n align: PropTypes.oneOf(['center', 'start', 'end']),\n aggregate: PropTypes.oneOf(['avg', 'max', 'min', 'sum']),\n footer: PropTypes.oneOfType([PropTypes.node, PropTypes.shape({\n aggregate: PropTypes.bool\n })]),\n header: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.shape({\n aggregate: PropTypes.bool\n })]),\n pin: PropTypes.bool,\n plain: PropTypes.bool,\n primary: PropTypes.bool,\n property: PropTypes.string.isRequired,\n render: PropTypes.func,\n search: PropTypes.bool,\n sortable: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large', 'xlarge', '1/2', '1/4', '2/4', '3/4', '1/3', '2/3']), PropTypes.string]),\n units: PropTypes.string,\n verticalAlign: PropTypes.oneOf(['middle', 'top', 'bottom'])\n })),\n data: PropTypes.arrayOf(PropTypes.shape({})),\n disabled: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),\n groupBy: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n property: PropTypes.string,\n expand: PropTypes.arrayOf(PropTypes.string),\n expandable: PropTypes.arrayOf(PropTypes.string),\n select: PropTypes.objectOf(PropTypes.oneOf(['all', 'some', 'none'])),\n onExpand: PropTypes.func,\n onSelect: PropTypes.func\n })]),\n onClickRow: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOf(['select'])]),\n rowDetails: PropTypes.func,\n onMore: PropTypes.func,\n onSearch: PropTypes.func,\n onSelect: PropTypes.func,\n onSort: PropTypes.func,\n onUpdate: PropTypes.func,\n pad: PropTypes.oneOfType([PropTypes.oneOf(sizes), PropTypes.string, PropTypes.shape(padShapeSides), PropTypes.shape(padShapeParts)]),\n paginate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n pin: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['header', 'footer'])]),\n placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n primaryKey: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n replace: PropTypes.bool,\n resizeable: PropTypes.bool,\n rowProps: PropTypes.shape({}),\n select: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n show: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n page: PropTypes.number\n })]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n sort: PropTypes.shape({\n direction: PropTypes.oneOf(['asc', 'desc']),\n external: PropTypes.bool,\n property: PropTypes.string.isRequired\n }),\n sortable: PropTypes.bool,\n step: PropTypes.number,\n verticalAlign: PropTypes.oneOfType([PropTypes.oneOf(verticalAlign), PropTypes.shape({\n header: PropTypes.oneOf(verticalAlign),\n body: PropTypes.oneOf(verticalAlign),\n footer: PropTypes.oneOf(verticalAlign)\n })])\n });\n}\nexport var DataTablePropTypes = PropType;","import React, { forwardRef } from 'react';\nexport var PlaceholderBody = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref$columns = _ref.columns,\n columns = _ref$columns === void 0 ? [] : _ref$columns,\n onSelect = _ref.onSelect,\n children = _ref.children;\n var colSpan = Math.max(columns.length + (onSelect ? 1 : 0), 1);\n return /*#__PURE__*/React.createElement(\"tbody\", {\n ref: ref\n }, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: colSpan\n }, children)));\n});","var _excluded = [\"background\", \"border\", \"columns\", \"data\", \"disabled\", \"fill\", \"groupBy\", \"onClickRow\", \"onMore\", \"onSearch\", \"onSelect\", \"onSort\", \"onUpdate\", \"replace\", \"pad\", \"paginate\", \"pin\", \"placeholder\", \"primaryKey\", \"resizeable\", \"rowProps\", \"select\", \"show\", \"size\", \"sort\", \"sortable\", \"rowDetails\", \"step\", \"verticalAlign\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useCallback, useContext, useEffect, useMemo, useRef, useState, Fragment } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { DataContext } from '../../contexts/DataContext';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { Header } from './Header';\nimport { Footer } from './Footer';\nimport { Body } from './Body';\nimport { GroupedBody } from './GroupedBody';\nimport { Pagination } from '../Pagination';\nimport { buildFooterValues, buildGroups, buildGroupState, filterAndSortData, initializeFilters, normalizeCellProps, normalizePrimaryProperty } from './buildState';\nimport { normalizeShow, usePagination } from '../../utils';\nimport { StyledContainer, StyledDataTable, StyledPlaceholder } from './StyledDataTable';\nimport { DataTablePropTypes } from './propTypes';\nimport { PlaceholderBody } from './PlaceholderBody';\nvar emptyData = [];\nfunction useGroupState(groups, groupBy) {\n var _useState = useState(function () {\n return buildGroupState(groups, groupBy);\n }),\n groupState = _useState[0],\n setGroupState = _useState[1];\n var _useState2 = useState({\n groups: groups,\n groupBy: groupBy\n }),\n prevDeps = _useState2[0],\n setPrevDeps = _useState2[1];\n var prevGroups = prevDeps.groups,\n prevGroupBy = prevDeps.groupBy;\n if (groups !== prevGroups || groupBy !== prevGroupBy) {\n setPrevDeps({\n groups: groups,\n groupBy: groupBy\n });\n var nextGroupState = buildGroupState(groups, groupBy);\n setGroupState(nextGroupState);\n return [nextGroupState, setGroupState];\n }\n return [groupState, setGroupState];\n}\nvar DataTable = function DataTable(_ref) {\n var background = _ref.background,\n border = _ref.border,\n columnsProp = _ref.columns,\n dataProp = _ref.data,\n disabled = _ref.disabled,\n fill = _ref.fill,\n groupByProp = _ref.groupBy,\n onClickRow = _ref.onClickRow,\n onMore = _ref.onMore,\n onSearch = _ref.onSearch,\n onSelect = _ref.onSelect,\n onSortProp = _ref.onSort,\n onUpdate = _ref.onUpdate,\n replace = _ref.replace,\n pad = _ref.pad,\n paginate = _ref.paginate,\n pin = _ref.pin,\n placeholder = _ref.placeholder,\n primaryKey = _ref.primaryKey,\n resizeable = _ref.resizeable,\n rowProps = _ref.rowProps,\n select = _ref.select,\n showProp = _ref.show,\n size = _ref.size,\n sortProp = _ref.sort,\n sortable = _ref.sortable,\n rowDetails = _ref.rowDetails,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 50 : _ref$step,\n verticalAlign = _ref.verticalAlign,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(DataContext),\n view = _useContext.view,\n contextData = _useContext.data,\n properties = _useContext.properties,\n onView = _useContext.onView;\n var data = dataProp || contextData || emptyData;\n var columns = useMemo(function () {\n var result = [];\n if (columnsProp) result = columnsProp;else if (properties) result = Object.keys(properties).map(function (p) {\n return _extends({\n property: p\n }, properties[p]);\n });else if (data.length) result = Object.keys(data[0]).map(function (p) {\n return {\n property: p\n };\n });\n if (view != null && view.columns) result = result.filter(function (c) {\n return view.columns.includes(c.property);\n }).sort(function (c1, c2) {\n return view.columns.indexOf(c1.property) - view.columns.indexOf(c2.property);\n });\n return result;\n }, [columnsProp, data, properties, view]);\n\n // property name of the primary property\n var primaryProperty = useMemo(function () {\n return normalizePrimaryProperty(columns, primaryKey);\n }, [columns, primaryKey]);\n\n // whether or not we should show a footer\n var showFooter = useMemo(function () {\n return columns.filter(function (c) {\n return c.footer;\n }).length > 0;\n }, [columns]);\n\n // what column we are actively capturing filter input on\n var _useState3 = useState(),\n filtering = _useState3[0],\n setFiltering = _useState3[1];\n\n // the currently active filters\n var _useState4 = useState(initializeFilters(columns)),\n filters = _useState4[0],\n setFilters = _useState4[1];\n\n // which column we are sorting on, with direction\n var _useState5 = useState(sortProp || {}),\n sort = _useState5[0],\n setSort = _useState5[1];\n useEffect(function () {\n if (sortProp) setSort(sortProp);else if (view != null && view.sort) setSort(view.sort);\n }, [sortProp, view]);\n\n // what we are grouping on\n var groupBy = (view == null ? void 0 : view.groupBy) || groupByProp;\n\n // the data filtered and sorted, if needed\n // Note: onUpdate mode expects the data to be passed\n // in completely filtered and sorted already.\n var adjustedData = useMemo(function () {\n return onUpdate ? data : filterAndSortData(data, filters, onSearch, sort);\n }, [data, filters, onSearch, onUpdate, sort]);\n\n // the values to put in the footer cells\n var footerValues = useMemo(function () {\n return buildFooterValues(columns, adjustedData);\n }, [adjustedData, columns]);\n\n // cell styling properties: background, border, pad\n var cellProps = useMemo(function () {\n return normalizeCellProps({\n background: background,\n border: border,\n pad: pad,\n pin: pin\n }, theme);\n }, [background, border, pad, pin, theme]);\n\n // if groupBy, an array with one item per unique groupBy key value\n var groups = useMemo(function () {\n return buildGroups(columns, adjustedData, groupBy, primaryProperty);\n }, [adjustedData, columns, groupBy, primaryProperty]);\n\n // an object indicating which group values are expanded\n var _useGroupState = useGroupState(groups, groupBy),\n groupState = _useGroupState[0],\n setGroupState = _useGroupState[1];\n var _useState6 = useState(step),\n limit = _useState6[0],\n setLimit = _useState6[1];\n var _useState7 = useState(select || onSelect && [] || undefined),\n selected = _useState7[0],\n setSelected = _useState7[1];\n useEffect(function () {\n return setSelected(select || onSelect && [] || undefined);\n }, [onSelect, select]);\n var _useState8 = useState([]),\n rowExpand = _useState8[0],\n setRowExpand = _useState8[1];\n\n // any customized column widths\n var _useState9 = useState({}),\n widths = _useState9[0],\n setWidths = _useState9[1];\n\n // placeholder placement stuff\n var headerRef = useRef();\n var bodyRef = useRef();\n var footerRef = useRef();\n var _useState10 = useState(),\n headerHeight = _useState10[0],\n setHeaderHeight = _useState10[1];\n var _useState11 = useState(),\n footerHeight = _useState11[0],\n setFooterHeight = _useState11[1];\n\n // offset compensation when body overflows\n var _useState12 = useState(0),\n scrollOffset = _useState12[0],\n setScrollOffset = _useState12[1];\n\n // multiple pinned columns offset\n var _useState13 = useState(),\n pinnedOffset = _useState13[0],\n setPinnedOffset = _useState13[1];\n var onHeaderWidths = useCallback(function (columnWidths) {\n var hasSelectColumn = Boolean(select || onSelect);\n var pinnedProperties = columns.map(function (pinnedColumn) {\n return pinnedColumn.pin && pinnedColumn.property;\n }).filter(function (n) {\n return n;\n });\n if (hasSelectColumn && pinnedProperties.length > 0) {\n pinnedProperties = ['_grommetDataTableSelect'].concat(pinnedProperties);\n }\n var nextPinnedOffset = {};\n if (columnWidths !== []) {\n pinnedProperties.forEach(function (property, index) {\n var columnIndex = property === '_grommetDataTableSelect' ? 0 : columns.findIndex(function (column) {\n return column.property === property;\n }) + hasSelectColumn;\n if (columnWidths[columnIndex]) {\n nextPinnedOffset[property] = {\n width: columnWidths[columnIndex],\n left: index === 0 ? 0 : nextPinnedOffset[pinnedProperties[index - 1]].left + nextPinnedOffset[pinnedProperties[index - 1]].width\n };\n }\n });\n setPinnedOffset(nextPinnedOffset);\n }\n }, [columns, setPinnedOffset, select, onSelect]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(function () {\n var _bodyRef$current$pare;\n var nextScrollOffset = (((_bodyRef$current$pare = bodyRef.current.parentElement) == null ? void 0 : _bodyRef$current$pare.clientWidth) || 0) - bodyRef.current.clientWidth;\n if (nextScrollOffset !== scrollOffset) setScrollOffset(nextScrollOffset);\n });\n useLayoutEffect(function () {\n if (placeholder) {\n if (headerRef.current) {\n var nextHeaderHeight = headerRef.current.getBoundingClientRect().height;\n setHeaderHeight(nextHeaderHeight);\n } else setHeaderHeight(0);\n if (footerRef.current) {\n var nextFooterHeight = footerRef.current.getBoundingClientRect().height;\n setFooterHeight(nextFooterHeight);\n } else setFooterHeight(0);\n }\n }, [footerRef, headerRef, placeholder]);\n\n // remember that we are filtering on this property\n var onFiltering = function onFiltering(property) {\n return setFiltering(property);\n };\n\n // remember the search text we should filter this property by\n var onFilter = function onFilter(property, value) {\n var nextFilters = _extends({}, filters);\n nextFilters[property] = value;\n setFilters(nextFilters);\n // Let caller know about search, if interested\n if (onSearch) onSearch(nextFilters);\n };\n\n // toggle the sort direction on this property\n var onSort = function onSort(property) {\n return function () {\n var external = sort ? sort.external : false;\n var direction;\n if (!sort || property !== sort.property) direction = 'asc';else if (sort.direction === 'asc') direction = 'desc';else direction = 'asc';\n var nextSort = {\n property: property,\n direction: direction,\n external: external\n };\n setSort(nextSort);\n if (onView) {\n onView(_extends({}, view, {\n sort: {\n property: property,\n direction: direction\n }\n }));\n }\n if (onUpdate) {\n var opts = {\n count: limit,\n sort: nextSort\n };\n if (groups) {\n opts.expanded = Object.keys(groupState).filter(function (k) {\n return groupState[k].expanded;\n });\n }\n if (showProp) opts.show = showProp;\n onUpdate(opts);\n }\n if (onSortProp) onSortProp(nextSort);\n };\n };\n\n // toggle whether the group is expanded\n var onToggleGroup = function onToggleGroup(groupValue) {\n return function () {\n var nextGroupState = _extends({}, groupState);\n nextGroupState[groupValue] = _extends({}, nextGroupState[groupValue], {\n expanded: !nextGroupState[groupValue].expanded\n });\n setGroupState(nextGroupState);\n var expandedKeys = Object.keys(nextGroupState).filter(function (k) {\n return nextGroupState[k].expanded;\n });\n if (onUpdate) {\n var opts = {\n expanded: expandedKeys,\n count: limit\n };\n if (sort != null && sort.property) opts.sort = sort;\n if (showProp) opts.show = showProp;\n onUpdate(opts);\n }\n if (groupBy.onExpand) {\n groupBy.onExpand(expandedKeys);\n }\n };\n };\n\n // toggle whether all groups are expanded\n var onToggleGroups = function onToggleGroups() {\n var expanded = Object.keys(groupState).filter(function (k) {\n return !groupState[k].expanded;\n }).length === 0;\n var nextGroupState = {};\n Object.keys(groupState).forEach(function (k) {\n nextGroupState[k] = _extends({}, groupState[k], {\n expanded: !expanded\n });\n });\n setGroupState(nextGroupState);\n var expandedKeys = Object.keys(nextGroupState).filter(function (k) {\n return nextGroupState[k].expanded;\n });\n if (onUpdate) {\n var opts = {\n expanded: expandedKeys,\n count: limit\n };\n if (showProp) opts.show = showProp;\n if (sort != null && sort.property) opts.sort = sort;\n onUpdate(opts);\n }\n if (groupBy.onExpand) {\n groupBy.onExpand(expandedKeys);\n }\n };\n\n // remember the width this property's column should be\n var onResize = useCallback(function (property, width) {\n if (widths[property] !== width) {\n var nextWidths = _extends({}, widths);\n nextWidths[property] = width;\n setWidths(nextWidths);\n }\n }, [widths]);\n if (size && resizeable) {\n console.warn('DataTable cannot combine \"size\" and \"resizeble\".');\n }\n if (onUpdate && onMore) {\n console.warn('DataTable cannot combine \"onUpdate\" and \"onMore\".');\n }\n var _usePagination = usePagination(_extends({\n data: adjustedData,\n page: normalizeShow(showProp, step),\n step: step\n }, paginate)),\n items = _usePagination[0],\n paginationProps = _usePagination[1];\n var paginationStep = paginationProps.step;\n var Container = paginate ? StyledContainer : Fragment;\n var containterProps = paginate ? _extends({}, theme.dataTable.container, {\n fill: fill\n }) : undefined;\n\n // DataTable should overflow if paginating but pagination component\n // should remain in its location\n var OverflowContainer = paginate ? Box : Fragment;\n var overflowContainerProps = paginate ? {\n overflow: {\n horizontal: 'auto'\n }\n } : undefined;\n\n // necessary for Firefox, otherwise paginated DataTable will\n // not fill its container like it does by default on other\n // browsers like Chrome/Safari\n var paginatedDataTableProps = paginate && (fill === true || fill === 'horizontal') ? {\n style: {\n minWidth: '100%'\n }\n } : undefined;\n var placeholderContent = placeholder;\n if (placeholder && typeof placeholder === 'string') {\n placeholderContent = /*#__PURE__*/React.createElement(Box, {\n background: {\n color: 'background-front',\n opacity: 'strong'\n },\n align: \"center\",\n justify: \"center\",\n fill: \"vertical\"\n }, /*#__PURE__*/React.createElement(Text, null, placeholder));\n }\n var bodyContent = groups ? /*#__PURE__*/React.createElement(GroupedBody, {\n ref: bodyRef,\n cellProps: cellProps.body,\n columns: columns,\n disabled: disabled,\n groupBy: typeof groupBy === 'string' ? {\n property: groupBy\n } : groupBy,\n groups: groups,\n groupState: groupState,\n pinnedOffset: pinnedOffset,\n primaryProperty: primaryProperty,\n onMore: onUpdate ? function () {\n if (adjustedData.length === limit) {\n var opts = {\n expanded: Object.keys(groupState).filter(function (k) {\n return groupState[k].expanded;\n }),\n count: limit + paginationStep\n };\n if (sort != null && sort.property) opts.sort = sort;\n if (showProp) opts.show = showProp;\n onUpdate(opts);\n setLimit(function (prev) {\n return prev + paginationStep;\n });\n }\n } : onMore,\n onSelect: onSelect ? function (nextSelected, row) {\n setSelected(nextSelected);\n if (onSelect) onSelect(nextSelected, row);\n } : undefined,\n onToggle: onToggleGroup,\n onUpdate: onUpdate,\n replace: replace,\n rowProps: rowProps,\n selected: selected,\n size: size,\n step: paginationStep,\n verticalAlign: typeof verticalAlign === 'string' ? verticalAlign : verticalAlign == null ? void 0 : verticalAlign.body\n }) : /*#__PURE__*/React.createElement(Body, {\n ref: bodyRef,\n cellProps: cellProps.body,\n columns: columns,\n data: !paginate ? adjustedData : items,\n disabled: disabled,\n onMore: onUpdate ? function () {\n if (adjustedData.length === limit) {\n var opts = {\n count: limit + paginationStep\n };\n if (sort != null && sort.property) opts.sort = sort;\n if (showProp) opts.show = showProp;\n onUpdate(opts);\n setLimit(function (prev) {\n return prev + paginationStep;\n });\n }\n } : onMore,\n replace: replace,\n onClickRow: onClickRow,\n onSelect: onSelect ? function (nextSelected, row) {\n setSelected(nextSelected);\n if (onSelect) onSelect(nextSelected, row);\n } : undefined,\n pinnedCellProps: cellProps.pinned,\n pinnedOffset: pinnedOffset,\n primaryProperty: primaryProperty,\n rowProps: rowProps,\n selected: selected,\n show: !paginate ? showProp : undefined,\n size: size,\n step: paginationStep,\n rowDetails: rowDetails,\n rowExpand: rowExpand,\n setRowExpand: setRowExpand,\n verticalAlign: typeof verticalAlign === 'string' ? verticalAlign : verticalAlign == null ? void 0 : verticalAlign.body\n });\n return /*#__PURE__*/React.createElement(Container, containterProps, /*#__PURE__*/React.createElement(OverflowContainer, overflowContainerProps, /*#__PURE__*/React.createElement(StyledDataTable, _extends({\n fillProp: !paginate ? fill : undefined\n }, paginatedDataTableProps, rest), /*#__PURE__*/React.createElement(Header, {\n ref: headerRef,\n cellProps: cellProps.header,\n columns: columns,\n data: adjustedData,\n disabled: disabled,\n fill: fill,\n filtering: filtering,\n filters: filters,\n groupBy: groupBy,\n groups: groups,\n groupState: groupState,\n pin: pin === true || pin === 'header',\n pinnedOffset: pinnedOffset,\n selected: selected,\n size: size,\n sort: sort,\n widths: widths,\n onFiltering: onFiltering,\n onFilter: onFilter,\n onResize: resizeable ? onResize : undefined,\n onSelect: onSelect ? function (nextSelected) {\n setSelected(nextSelected);\n if (onSelect) onSelect(nextSelected);\n } : undefined,\n onSort: sortable || sortProp || onSortProp ? onSort : undefined,\n onToggle: onToggleGroups,\n onWidths: onHeaderWidths,\n primaryProperty: primaryProperty,\n scrollOffset: scrollOffset,\n rowDetails: rowDetails,\n verticalAlign: typeof verticalAlign === 'string' ? verticalAlign : verticalAlign == null ? void 0 : verticalAlign.header\n }), placeholder && (!items || items.length === 0) ? /*#__PURE__*/React.createElement(PlaceholderBody, {\n ref: bodyRef,\n columns: columns,\n onSelect: onSelect\n }, placeholderContent) : bodyContent, showFooter && /*#__PURE__*/React.createElement(Footer, {\n ref: footerRef,\n cellProps: cellProps.footer,\n columns: columns,\n fill: fill,\n footerValues: footerValues,\n groups: groups,\n onSelect: onSelect,\n pin: pin === true || pin === 'footer',\n pinnedOffset: pinnedOffset,\n primaryProperty: primaryProperty,\n scrollOffset: scrollOffset,\n selected: selected,\n size: size,\n verticalAlign: typeof verticalAlign === 'string' ? verticalAlign : verticalAlign == null ? void 0 : verticalAlign.footer\n }), placeholder && items && items.length > 0 && /*#__PURE__*/React.createElement(StyledPlaceholder, {\n top: headerHeight,\n bottom: footerHeight\n }, placeholderContent))), paginate && adjustedData.length > paginationStep && items && items.length ? /*#__PURE__*/React.createElement(Pagination, _extends({\n alignSelf: \"end\"\n }, paginationProps)) : null);\n};\nDataTable.propTypes = DataTablePropTypes;\nexport { DataTable };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps, padPropType } from '../../utils/general-prop-types';\nimport { BoxPropTypes } from '../Box/propTypes';\nvar sizes = ['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge'];\nvar sides = ['horizontal', 'vertical', 'top', 'bottom', 'left', 'right', 'start', 'end'];\nvar padShapeSides = {};\nsides.forEach(function (side) {\n padShapeSides[side] = PropTypes.oneOf(sizes);\n});\nvar borderTypes = [PropTypes.bool, PropTypes.oneOf(sides), PropTypes.shape({\n color: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n })]),\n side: PropTypes.oneOf(sides),\n size: PropTypes.oneOfType([PropTypes.oneOf(sizes), PropTypes.string])\n})];\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n action: PropTypes.func,\n as: PropTypes.string,\n background: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n border: PropTypes.oneOfType(borderTypes),\n data: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.shape({})])),\n children: PropTypes.func,\n defaultItemProps: PropTypes.shape(BoxPropTypes),\n disabled: PropTypes.arrayOf(PropTypes.string),\n itemKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n itemProps: PropTypes.shape({}),\n onActive: PropTypes.func,\n onClickItem: PropTypes.func,\n onMore: PropTypes.func,\n onOrder: PropTypes.func,\n pad: PropTypes.oneOfType([padPropType]),\n paginate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n pinned: PropTypes.arrayOf(PropTypes.string),\n primaryKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n secondaryKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n show: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n page: PropTypes.number\n })]),\n step: PropTypes.number\n });\n}\nexport var ListPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"aria-label\", \"action\", \"as\", \"background\", \"border\", \"children\", \"data\", \"defaultItemProps\", \"disabled\", \"focus\", \"itemKey\", \"itemProps\", \"onActive\", \"onClickItem\", \"onKeyDown\", \"onMore\", \"onOrder\", \"pad\", \"paginate\", \"pinned\", \"primaryKey\", \"secondaryKey\", \"show\", \"step\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { Fragment, useContext, useMemo, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { DataContext } from '../../contexts/DataContext';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { Keyboard } from '../Keyboard';\nimport { Pagination } from '../Pagination';\nimport { Text } from '../Text';\nimport { focusStyle, genericStyles, normalizeColor, normalizeShow, unfocusStyle, useForwardedRef, usePagination } from '../../utils';\nimport { useAnalytics } from '../../contexts/AnalyticsContext';\nimport { ListPropTypes } from './propTypes';\nvar emptyData = [];\nvar StyledList = styled.ul.withConfig({\n displayName: \"List__StyledList\",\n componentId: \"sc-130gdqg-0\"\n})([\"list-style:none;\", \" padding:0;\", \" &:focus{\", \"}\", \"}\", \"}\"], function (props) {\n return !props.margin && 'margin: 0;';\n}, genericStyles, function (props) {\n return props.tabIndex >= 0 && focusStyle({\n forceOutline: true,\n skipSvgChildren: true\n });\n}, function (props) {\n return props.itemFocus && focusStyle({\n forceOutline: true,\n skipSvgChildren: true\n });\n}, function (props) {\n return props.theme.list && props.theme.list.extend;\n});\nvar StyledItem = styled(Box).withConfig({\n displayName: \"List__StyledItem\",\n componentId: \"sc-130gdqg-1\"\n})([\"\", \" \", \" &:focus{\", \"}\", \" &:hover{\", \"}\", \"\"], function (props) {\n return props.onClick && !props.isDisabled && \"cursor: pointer;\";\n}, function (props) {\n return props.draggable && !props.isDisabled && \"cursor: move;\";\n}, unfocusStyle({\n forceOutline: true,\n skipSvgChildren: true\n}), function (props) {\n var _props$theme$list;\n var disabledStyle;\n if (props.isDisabled && (_props$theme$list = props.theme.list) != null && (_props$theme$list = _props$theme$list.item) != null && _props$theme$list.disabled) {\n var _props$theme$list$ite = props.theme.list.item.disabled,\n color = _props$theme$list$ite.color,\n cursor = _props$theme$list$ite.cursor;\n disabledStyle = {\n color: normalizeColor(color, props.theme),\n cursor: cursor\n };\n }\n return disabledStyle;\n}, function (props) {\n return props.isDisabled && \"background-color: unset;\";\n}, function (props) {\n return props.theme.list && props.theme.list.item && props.theme.list.item.extend;\n});\n\n// when paginated, this wraps the data table and pagination component\nvar StyledContainer = styled(Box).withConfig({\n displayName: \"List__StyledContainer\",\n componentId: \"sc-130gdqg-2\"\n})([\"\", \";\"], function (props) {\n return props.theme.list && props.theme.list.container && props.theme.list.container.extend;\n});\nvar getValue = function getValue(item, index, key) {\n if (typeof key === 'function') return key(item, index);\n if (typeof item === 'string') return item;\n if (key !== undefined) return item == null ? void 0 : item[key];\n return undefined;\n};\nvar reorder = function reorder(array, pinnedArray, source, target) {\n var result = array.slice(0);\n var tmp = result[source];\n if (source < target) for (var i = source; i < target; i += 1) result[i] = result[i + 1];else for (var _i = source; _i > target; _i -= 1) result[_i] = result[_i - 1];\n result[target] = tmp;\n\n // insert pinned items into their proper index within the orderable\n // data object to make the complete data set again\n if (pinnedArray.data.length > 0) {\n pinnedArray.data.forEach(function (pinnedItem, index) {\n result.splice(pinnedArray.indexes[index], 0, pinnedItem);\n });\n }\n return result;\n};\n\n// getItemId returns something appropriate to use as a unique DOM\n// id for an item in the list\nvar getItemId = function getItemId(item, index, itemKey, primaryKey) {\n var _getValue;\n // we do primaryKey first to be backward compatible, even though\n // itemKey is probably technically the better choice for a DOM id.\n if (primaryKey) return getValue(item, index, primaryKey);\n if (itemKey) return getValue(item, index, itemKey);\n return (_getValue = getValue(item, index)) != null ? _getValue : index; // do our best w/o *key properties\n};\n\nvar List = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n action = _ref.action,\n as = _ref.as,\n background = _ref.background,\n border = _ref.border,\n children = _ref.children,\n dataProp = _ref.data,\n defaultItemProps = _ref.defaultItemProps,\n disabledItems = _ref.disabled,\n focus = _ref.focus,\n defaultItemKey = _ref.itemKey,\n itemProps = _ref.itemProps,\n onActive = _ref.onActive,\n onClickItem = _ref.onClickItem,\n onKeyDown = _ref.onKeyDown,\n onMore = _ref.onMore,\n onOrder = _ref.onOrder,\n pad = _ref.pad,\n paginate = _ref.paginate,\n _ref$pinned = _ref.pinned,\n pinned = _ref$pinned === void 0 ? [] : _ref$pinned,\n primaryKey = _ref.primaryKey,\n secondaryKey = _ref.secondaryKey,\n showProp = _ref.show,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? paginate ? 50 : undefined : _ref$step,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var listRef = useForwardedRef(ref);\n var theme = useContext(ThemeContext);\n var _useContext = useContext(DataContext),\n contextData = _useContext.data;\n var data = dataProp || contextData || emptyData;\n\n // fixes issue where itemKey is undefined when only primaryKey is provided\n var itemKey = defaultItemKey || primaryKey || null;\n\n // active will be the index of the current 'active'\n // control in the list. If the onOrder property is defined\n // this will be the index of up or down control for ordering\n // items in the list. In this case the item index of that\n // control would be the active index / 2.\n // If onOrder is not defined but onClickItem is (e.g. the\n // List items are likely selectable), active will be the\n // index of the item which is currently active.\n var _useState = useState(),\n active = _useState[0],\n setActive = _useState[1];\n var _useState2 = useState(),\n lastActive = _useState2[0],\n setLastActive = _useState2[1];\n var updateActive = function updateActive(nextActive) {\n setActive(nextActive);\n // we occasionally call updateActive with undefined when it already is so,\n // no need to call onActive in that case\n if (onActive && onClickItem && nextActive !== active) onActive(nextActive);\n };\n var _useState3 = useState(),\n itemFocus = _useState3[0],\n setItemFocus = _useState3[1];\n var _useState4 = useState(),\n dragging = _useState4[0],\n setDragging = _useState4[1];\n var _useState5 = useState(),\n orderingData = _useState5[0],\n setOrderingData = _useState5[1];\n\n // store a reference to the pinned and the data that is orderable\n var _useMemo = useMemo(function () {\n var orderable = [];\n var pinnedData = [];\n var pinnedIndexes = [];\n var currentData = orderingData || data;\n if (pinned.length === 0) return [currentData, {\n data: pinnedData,\n indexes: pinnedIndexes\n }];\n currentData.forEach(function (item, index) {\n var key = getValue(item, index, itemKey);\n if (pinned.includes(key)) {\n pinnedData.push(item);\n pinnedIndexes.push(index);\n } else {\n orderable.push(item);\n }\n });\n return [orderable, {\n data: pinnedData,\n indexes: pinnedIndexes\n }];\n }, [data, orderingData, itemKey, pinned]),\n orderableData = _useMemo[0],\n pinnedInfo = _useMemo[1];\n var _usePagination = usePagination(_extends({\n data: data,\n page: normalizeShow(showProp, step),\n step: step\n }, paginate)),\n items = _usePagination[0],\n paginationProps = _usePagination[1];\n var Container = paginate ? StyledContainer : Fragment;\n var containterProps = paginate ? _extends({}, theme.list.container) : undefined;\n var draggingRef = useRef();\n var sendAnalytics = useAnalytics();\n var ariaProps = {\n role: onClickItem || onOrder ? 'listbox' : 'list'\n };\n if (active >= 0) {\n var activeId;\n // We have an item that is 'focused' within the list. This could\n // be the list item or one of the up/down ordering buttons.\n // We need to figure out an id of the thing that will be shown as active\n if (onOrder) {\n // figure out which arrow button will be the active one.\n var buttonId = active % 2 ? 'MoveDown' : 'MoveUp';\n var itemIndex = Math.trunc(active / 2);\n activeId = \"\" + getItemId(orderableData[itemIndex], itemIndex, itemKey, primaryKey) + buttonId;\n } else if (onClickItem) {\n // The whole list item is active. Figure out an id\n activeId = getItemId(orderableData[active], active, itemKey, primaryKey);\n }\n ariaProps['aria-activedescendant'] = activeId;\n }\n return /*#__PURE__*/React.createElement(Container, containterProps, /*#__PURE__*/React.createElement(Keyboard, {\n onEnter: (onClickItem || onOrder) && active >= 0 ? function (event) {\n if (onOrder) {\n var index = Math.trunc(active / 2);\n // Call onOrder with the re-ordered data.\n // Update the active control index so that the\n // active control will stay on the same item\n // even though it moved up or down.\n if (active % 2) {\n onOrder(reorder(orderableData, pinnedInfo, index, index + 1));\n updateActive(Math.min(active + 2, orderableData.length * 2 - 2));\n } else {\n onOrder(reorder(orderableData, pinnedInfo, index, index - 1));\n updateActive(Math.max(active - 2, 1));\n }\n } else if (disabledItems != null && disabledItems.includes(getValue(data[active], active, itemKey))) {\n event.preventDefault();\n } else if (onClickItem) {\n event.persist();\n var adjustedEvent = event;\n adjustedEvent.item = data[active];\n adjustedEvent.index = active;\n onClickItem(adjustedEvent);\n sendAnalytics({\n type: 'listItemClick',\n element: listRef.current,\n event: adjustedEvent,\n item: data[active],\n index: active\n });\n }\n } : undefined,\n onUp: (onClickItem || onOrder) && active ? function () {\n var min = onOrder ? 1 : 0;\n updateActive(Math.max(active - 1, min));\n } : undefined,\n onDown: (onClickItem || onOrder) && orderableData && orderableData.length ? function () {\n var min = onOrder ? 1 : 0;\n var max = onOrder ? orderableData.length * 2 - 2 : data.length - 1;\n updateActive(active >= min ? Math.min(active + 1, max) : min);\n } : undefined,\n onKeyDown: onKeyDown\n }, /*#__PURE__*/React.createElement(StyledList, _extends({\n \"aria-label\": ariaLabel || a11yTitle,\n ref: listRef,\n as: as || 'ul',\n itemFocus: itemFocus,\n tabIndex: onClickItem || onOrder ? 0 : undefined,\n onFocus: function onFocus() {\n return (\n // Fixes zero-th index showing undefined.\n // Checks for active variable to stop bug where activeStyle\n // gets applied to lastActive instead of the item the user\n // is currently clicking on\n !active && active !== 0 ? updateActive(lastActive) : updateActive(active)\n );\n },\n onBlur: function onBlur() {\n setLastActive(active);\n updateActive(undefined);\n }\n }, ariaProps, rest), /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: !paginate ? orderingData || data : items,\n onMore: onMore,\n show: !paginate ? showProp : undefined,\n step: step,\n renderMarker: function renderMarker(marker) {\n return /*#__PURE__*/React.createElement(Box, {\n as: \"li\",\n flex: false\n }, marker);\n }\n }, function (item, index) {\n var content;\n var boxProps = {};\n if (children) {\n content = children(item, index, onClickItem ? {\n active: active === index\n } : undefined);\n } else if (primaryKey) {\n var primary = getValue(item, index, primaryKey);\n content = typeof primary === 'string' || typeof primary === 'number' ? /*#__PURE__*/React.createElement(Text, {\n key: \"p\",\n weight: \"bold\"\n }, primary) : primary;\n if (secondaryKey) {\n var secondary = getValue(item, index, secondaryKey);\n content = [content, typeof secondary === 'string' || typeof secondary === 'number' ? /*#__PURE__*/React.createElement(Text, {\n key: \"s\"\n }, getValue(item, index, secondaryKey)) : secondary];\n boxProps = {\n direction: 'row',\n align: 'center',\n justify: 'between',\n gap: 'medium'\n };\n }\n } else if (typeof item === 'object') {\n content = item[Object.keys(item)[0]];\n } else {\n content = item;\n }\n var key = getValue(item, index, itemKey) || index;\n var orderableIndex = orderableData.findIndex(function (ordItem, ordIndex) {\n return getValue(ordItem, ordIndex, itemKey) === key;\n });\n var isDisabled;\n if (disabledItems) {\n if (typeof item === 'object' && !itemKey) {\n console.error( // eslint-disable-next-line max-len\n \"Warning: Missing prop itemKey. Prop disabled requires itemKey to be specified when data is of type 'object'.\");\n }\n isDisabled = disabledItems == null ? void 0 : disabledItems.includes(key);\n }\n var isPinned;\n if (pinned.length > 0) {\n if (typeof item === 'object' && !itemKey) {\n console.error( // eslint-disable-next-line max-len\n \"Warning: Missing prop itemKey. Prop pin requires itemKey to be specified when data is of type 'object'.\");\n }\n isPinned = pinned == null ? void 0 : pinned.includes(key);\n }\n if (action) {\n content = [/*#__PURE__*/React.createElement(Box, {\n align: \"start\",\n key: \"actionContainer\" + index\n }, content), action(item, index)];\n boxProps = {\n direction: 'row',\n align: secondaryKey ? 'start' : 'center',\n justify: 'between',\n gap: 'medium'\n };\n }\n var adjustedBackground = background || theme.list.item.background;\n if (!onOrder && active === index || dragging === index) {\n adjustedBackground = theme.global.hover.background;\n } else if (Array.isArray(adjustedBackground)) {\n adjustedBackground = adjustedBackground[index % adjustedBackground.length];\n } else if (isPinned) {\n adjustedBackground = theme.list.item.pinned.background;\n }\n var adjustedBorder = border !== undefined ? border : theme.list.item.border;\n if (adjustedBorder === 'horizontal' && index) {\n adjustedBorder = 'bottom';\n }\n var clickProps;\n if (onClickItem && !onOrder) {\n clickProps = {\n role: 'option',\n tabIndex: -1,\n active: active === index,\n onClick: function onClick(event) {\n // Only prevent event when disabled. We still want screen\n // readers to be aware that an option exists, but is in a\n // disabled state.\n if (isDisabled) {\n event.preventDefault();\n } else {\n // extract from React's synthetic event pool\n event.persist();\n var adjustedEvent = event;\n adjustedEvent.item = item;\n adjustedEvent.index = index;\n onClickItem(adjustedEvent);\n sendAnalytics({\n type: 'listItemClick',\n element: listRef.current,\n event: adjustedEvent,\n item: item,\n index: index\n });\n }\n },\n onMouseOver: function onMouseOver() {\n return updateActive(index);\n },\n onMouseOut: function onMouseOut() {\n return updateActive(undefined);\n },\n onFocus: function onFocus() {\n updateActive(index);\n setItemFocus(true);\n },\n onBlur: function onBlur() {\n updateActive(undefined);\n setItemFocus(false);\n }\n };\n }\n var orderProps;\n var orderControls;\n if (onOrder && !isPinned) {\n orderProps = {\n draggable: true,\n onDragStart: function onDragStart(event) {\n event.dataTransfer.setData('text/plain', '');\n // allowed per\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API#define_the_drag_effect\n // eslint-disable-next-line no-param-reassign\n event.dataTransfer.effectAllowed = 'move';\n setDragging(orderableIndex);\n updateActive(undefined);\n },\n onDragEnd: function onDragEnd() {\n setDragging(undefined);\n setOrderingData(undefined);\n },\n onDragOver: function onDragOver(event) {\n if (dragging !== undefined) {\n event.preventDefault();\n if (dragging !== orderableIndex) {\n // eslint-disable-next-line no-param-reassign\n event.dataTransfer.dropEffect = 'move';\n setOrderingData(reorder(orderableData, pinnedInfo, dragging, orderableIndex));\n setDragging(orderableIndex);\n }\n }\n },\n onDrop: function onDrop() {\n if (orderingData) {\n onOrder(orderingData);\n }\n },\n ref: dragging === orderableIndex ? draggingRef : undefined\n };\n var Up = theme.list.icons.up;\n var Down = theme.list.icons.down;\n orderControls = !isPinned && /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n justify: \"end\"\n }, /*#__PURE__*/React.createElement(Button, {\n id: key + \"MoveUp\",\n a11yTitle: orderableIndex + 1 + \" \" + key + \" move up\",\n icon: /*#__PURE__*/React.createElement(Up, null),\n hoverIndicator: true,\n focusIndicator: false,\n disabled: !orderableIndex,\n active: active === orderableIndex * 2,\n onClick: function onClick(event) {\n event.stopPropagation();\n onOrder(reorder(orderableData, pinnedInfo, orderableIndex, orderableIndex - 1));\n },\n tabIndex: -1,\n onMouseOver: function onMouseOver() {\n return updateActive(orderableIndex * 2);\n },\n onMouseOut: function onMouseOut() {\n return updateActive(undefined);\n },\n onFocus: function onFocus() {\n updateActive(orderableIndex * 2);\n setItemFocus(true);\n },\n onBlur: function onBlur() {\n updateActive(undefined);\n setItemFocus(false);\n }\n }), /*#__PURE__*/React.createElement(Button, {\n id: key + \"MoveDown\",\n a11yTitle: orderableIndex + 1 + \" \" + key + \" move down\",\n icon: /*#__PURE__*/React.createElement(Down, null),\n hoverIndicator: true,\n focusIndicator: false,\n disabled: orderableIndex >= orderableData.length - 1,\n active: active === orderableIndex * 2 + 1,\n onClick: function onClick(event) {\n event.stopPropagation();\n onOrder(reorder(orderableData, pinnedInfo, orderableIndex, orderableIndex + 1));\n },\n tabIndex: -1,\n onMouseOver: function onMouseOver() {\n return updateActive(orderableIndex * 2 + 1);\n },\n onMouseOut: function onMouseOut() {\n return updateActive(undefined);\n },\n onFocus: function onFocus() {\n updateActive(orderableIndex * 2 + 1);\n setItemFocus(true);\n },\n onBlur: function onBlur() {\n updateActive(undefined);\n setItemFocus(false);\n }\n }));\n\n // wrap the main content and use\n // the boxProps defined for the content\n content = /*#__PURE__*/React.createElement(Box, _extends({\n flex: true\n }, boxProps), content);\n\n // Adjust the boxProps to account for the order controls\n boxProps = {\n direction: 'row',\n align: defaultItemProps && defaultItemProps.align || 'center',\n gap: 'medium'\n };\n }\n var itemAriaProps;\n if (isDisabled) {\n itemAriaProps = {\n 'aria-disabled': true\n };\n if (onClickItem) {\n itemAriaProps = _extends({}, itemAriaProps, {\n 'aria-selected': false\n });\n }\n }\n var displayPinned;\n if (isPinned) {\n // Pinned icon and settings\n var Pin = theme.list.icons.pin;\n var pinSize = theme.list.item.pinned.icon.size;\n var pinPad = theme.list.item.pinned.icon.pad;\n boxProps = {\n direction: 'row',\n align: defaultItemProps && defaultItemProps.align || 'center',\n gap: 'medium'\n };\n displayPinned = /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n justify: \"end\",\n pad: pinPad\n }, /*#__PURE__*/React.createElement(Pin, {\n size: pinSize\n }));\n content = /*#__PURE__*/React.createElement(Box, {\n flex: true\n }, content);\n }\n if (itemProps && itemProps[index]) {\n boxProps = _extends({}, boxProps, itemProps[index]);\n }\n return /*#__PURE__*/React.createElement(StyledItem, _extends({\n key: key,\n tag: \"li\",\n background: adjustedBackground,\n border: adjustedBorder,\n isDisabled: isDisabled,\n flex: false,\n pad: pad || theme.list.item.pad\n }, defaultItemProps, boxProps, clickProps, orderProps, itemAriaProps), onOrder && /*#__PURE__*/React.createElement(Text, null, index + 1), content, displayPinned, orderControls);\n }))), paginate && data.length > step && items && items.length ? /*#__PURE__*/React.createElement(Pagination, _extends({\n alignSelf: \"end\"\n }, paginationProps)) : null);\n});\nList.displayName = 'List';\nList.propTypes = ListPropTypes;\nexport { List };","import React from 'react';\nexport var TabsContext = /*#__PURE__*/React.createContext({});","import styled, { css } from 'styled-components';\nimport { genericStyles, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar tabHoverStyle = css([\"&:hover{\", \" \", \" \", \";}&:focus{z-index:1;}\"], function (props) {\n return props.theme.tab.hover.background && css([\"background:\", \";\"], normalizeColor(props.theme.tab.hover.background, props.theme));\n}, function (props) {\n return props.theme.tab.hover.color && css([\"color:\", \";\"], normalizeColor(props.theme.tab.hover.color, props.theme));\n}, function (props) {\n return props.theme.tab.hover.extend;\n});\nvar StyledTab = styled.div.withConfig({\n displayName: \"StyledTab\",\n componentId: \"sc-1nnwnsb-0\"\n})([\"white-space:nowrap;\", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return !props.plain && !props.disabled && props.theme.tab.hover && tabHoverStyle;\n}, function (props) {\n return props.disabled && props.theme.tab.disabled;\n}, function (props) {\n return props.theme.tab.extend;\n});\nStyledTab.defaultProps = {};\nObject.setPrototypeOf(StyledTab.defaultProps, defaultProps);\nexport { StyledTab };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n disabled: PropTypes.bool,\n icon: PropTypes.element,\n plain: PropTypes.bool,\n reverse: PropTypes.bool,\n title: PropTypes.node\n };\n}\nexport var TabPropTypes = PropType;","var _excluded = [\"active\", \"disabled\", \"children\", \"icon\", \"plain\", \"title\", \"onBlur\", \"onFocus\", \"onMouseOver\", \"onMouseOut\", \"reverse\", \"onClick\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useEffect, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Text } from '../Text';\nimport { TabsContext } from '../Tabs/TabsContext';\nimport { normalizeColor, useForwardedRef } from '../../utils';\nimport { StyledTab } from './StyledTab';\nimport { TabPropTypes } from './propTypes';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nvar Tab = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var activeProp = _ref.active,\n disabled = _ref.disabled,\n children = _ref.children,\n icon = _ref.icon,\n plain = _ref.plain,\n title = _ref.title,\n _onBlur = _ref.onBlur,\n _onFocus = _ref.onFocus,\n onMouseOver = _ref.onMouseOver,\n onMouseOut = _ref.onMouseOut,\n reverse = _ref.reverse,\n onClick = _ref.onClick,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(TabsContext),\n active = _useContext.active,\n activeIndex = _useContext.activeIndex,\n index = _useContext.index,\n tabsContextRef = _useContext.ref,\n onActivate = _useContext.onActivate,\n setActiveContent = _useContext.setActiveContent,\n setActiveTitle = _useContext.setActiveTitle,\n setFocusIndex = _useContext.setFocusIndex;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(undefined),\n over = _useState[0],\n setOver = _useState[1];\n var normalizedTitle = title;\n var tabStyles = {};\n var tabRef = useForwardedRef(ref);\n useLayoutEffect(function () {\n if (tabRef.current && tabsContextRef) {\n tabsContextRef.current = tabRef.current;\n }\n });\n useEffect(function () {\n if (active) {\n setActiveContent(children);\n var activeTitle = typeof title === 'string' ? title : activeIndex + 1;\n setActiveTitle(activeTitle);\n }\n }, [active, activeIndex, children, setActiveContent, setActiveTitle, title]);\n var onMouseOverTab = function onMouseOverTab(event) {\n setOver(true);\n if (onMouseOver) {\n onMouseOver(event);\n }\n };\n var onMouseOutTab = function onMouseOutTab(event) {\n setOver(undefined);\n if (onMouseOut) {\n onMouseOut(event);\n }\n };\n if (!plain) {\n if (typeof title !== 'string') {\n normalizedTitle = title;\n } else if (active) {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, theme.tab.active, title);\n } else if (disabled && theme.tab.disabled) {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, theme.tab.disabled, title);\n } else {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, {\n color: over ? theme.tab.hover.color : theme.tab.color\n }, title);\n }\n }\n var onClickTab = function onClickTab(event) {\n if (event) {\n event.preventDefault();\n }\n onActivate();\n if (onClick) {\n onClick(event);\n }\n };\n if (active && disabled) {\n console.warn( // eslint-disable-next-line max-len\n \"Warning: Tab props 'active' and 'disabled' have both been set to TRUE on the same Tab resulting in an interesting Tab state. Is this your intent?\");\n }\n if (!plain) {\n if (typeof title !== 'string') {\n normalizedTitle = title;\n } else if (active) {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, theme.tab.active, title);\n } else if (disabled && theme.tab.disabled) {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, theme.tab.disabled, title);\n } else {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, {\n color: over ? theme.tab.hover.color : theme.tab.color\n }, title);\n }\n if (theme.tab.border) {\n var borderColor = theme.tab.border.color || theme.global.control.border.color;\n if (active) {\n borderColor = theme.tab.border.active.color || borderColor;\n } else if (disabled && theme.tab.border.disabled) {\n borderColor = theme.tab.border.disabled.color || borderColor;\n } else if (over) {\n borderColor = theme.tab.border.hover.color || borderColor;\n }\n borderColor = normalizeColor(borderColor, theme);\n tabStyles.border = {\n side: theme.tab.border.side,\n size: theme.tab.border.size,\n color: borderColor\n };\n }\n tabStyles.background = active ? theme.tab.active.background || theme.tab.background : theme.tab.background;\n tabStyles.pad = theme.tab.pad;\n tabStyles.margin = theme.tab.margin;\n }\n\n // needed to apply hover/active styles to the icon\n var renderIcon = function renderIcon(iconProp) {\n if (active) {\n return /*#__PURE__*/React.cloneElement(iconProp, _extends({}, theme.tab.active));\n }\n if (disabled) {\n return /*#__PURE__*/React.cloneElement(iconProp, _extends({}, theme.tab.disabled));\n }\n return /*#__PURE__*/React.cloneElement(iconProp, {\n color: over ? theme.tab.hover.color : theme.tab.color\n });\n };\n var normalizedIcon;\n if (icon) {\n normalizedIcon = renderIcon(icon);\n }\n var first = reverse ? normalizedTitle : normalizedIcon;\n var second = reverse ? normalizedIcon : normalizedTitle;\n var withIconStyles;\n if (first && second) {\n withIconStyles = {\n direction: 'row',\n align: 'center',\n justify: 'center',\n gap: 'small'\n };\n }\n return /*#__PURE__*/React.createElement(Button, _extends({\n ref: tabRef,\n plain: true,\n role: \"tab\",\n \"aria-selected\": active,\n \"aria-expanded\": active,\n disabled: disabled\n }, rest, {\n onClick: onClickTab,\n onMouseOver: onMouseOverTab,\n onMouseOut: onMouseOutTab,\n onFocus: function onFocus() {\n if (_onFocus) _onFocus();\n setFocusIndex(index);\n },\n onBlur: function onBlur() {\n if (_onBlur) _onBlur();\n setFocusIndex(-1);\n }\n }), /*#__PURE__*/React.createElement(StyledTab, _extends({\n as: Box,\n disabled: disabled,\n plain: plain\n }, withIconStyles, tabStyles), first, second));\n});\nTab.displayName = 'Tab';\nTab.defaultProps = {};\nObject.setPrototypeOf(Tab.defaultProps, defaultProps);\nTab.propTypes = TabPropTypes;\nexport { Tab };","var _FLEX_MAP;\nimport styled, { css } from 'styled-components';\nimport { genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar StyledTabsHeader = styled.div.withConfig({\n displayName: \"StyledTabs__StyledTabsHeader\",\n componentId: \"sc-a4fwxl-0\"\n})([\"\", \";\"], function (props) {\n return props.theme.tabs.header.extend;\n});\nStyledTabsHeader.defaultProps = {};\nObject.setPrototypeOf(StyledTabsHeader.defaultProps, defaultProps);\nvar FLEX_MAP = (_FLEX_MAP = {}, _FLEX_MAP[true] = '1 1', _FLEX_MAP[false] = '0 0', _FLEX_MAP.grow = '1 0', _FLEX_MAP.shrink = '0 1', _FLEX_MAP);\nvar flexStyle = css([\"flex:\", \";\"], function (props) {\n return \"\" + FLEX_MAP[props.flex] + (props.flex !== true ? ' auto' : '');\n});\nvar StyledTabPanel = styled.div.withConfig({\n displayName: \"StyledTabs__StyledTabPanel\",\n componentId: \"sc-a4fwxl-1\"\n})([\"min-height:0;\", \" \", \";\"], function (props) {\n return props.flex && flexStyle;\n}, function (props) {\n return props.theme.tabs.panel.extend;\n});\nStyledTabPanel.defaultProps = {};\nObject.setPrototypeOf(StyledTabPanel.defaultProps, defaultProps);\nvar StyledTabs = styled.div.withConfig({\n displayName: \"StyledTabs\",\n componentId: \"sc-a4fwxl-2\"\n})([\"\", \" \", \";\"], genericStyles, function (props) {\n return props.theme.tabs.extend;\n});\nStyledTabs.defaultProps = {};\nObject.setPrototypeOf(StyledTabs.defaultProps, defaultProps);\nexport { StyledTabsHeader, StyledTabPanel, StyledTabs };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n activeIndex: PropTypes.number,\n alignControls: PropTypes.oneOf(['start', 'center', 'end', 'stretch']),\n children: PropTypes.node.isRequired,\n flex: PropTypes.oneOfType([PropTypes.oneOf(['grow', 'shrink']), PropTypes.bool]),\n justify: PropTypes.oneOf(['start', 'center', 'end']),\n messages: PropTypes.shape({\n tabContents: PropTypes.string\n }),\n onActive: PropTypes.func\n });\n}\nexport var TabsPropTypes = PropType;","var _excluded = [\"alignControls\", \"children\", \"flex\", \"justify\", \"messages\", \"responsive\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useContext, useState, useEffect, useRef, useMemo } from 'react';\nimport { Previous } from 'grommet-icons/icons/Previous';\nimport { Next } from 'grommet-icons/icons/Next';\nimport { ThemeContext } from 'styled-components';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { TabsContext } from './TabsContext';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { StyledTabPanel, StyledTabs, StyledTabsHeader } from './StyledTabs';\nimport { normalizeColor } from '../../utils';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { TabsPropTypes } from './propTypes';\nimport { useAnalytics } from '../../contexts/AnalyticsContext/AnalyticsContext';\nvar Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _theme$tabs$header;\n var alignControls = _ref.alignControls,\n children = _ref.children,\n flex = _ref.flex,\n _ref$justify = _ref.justify,\n justify = _ref$justify === void 0 ? 'center' : _ref$justify,\n messages = _ref.messages,\n _ref$responsive = _ref.responsive,\n responsive = _ref$responsive === void 0 ? true : _ref$responsive,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var propsActiveIndex = rest.activeIndex,\n onActive = rest.onActive;\n var _useState = useState(rest.activeIndex || 0),\n activeIndex = _useState[0],\n setActiveIndex = _useState[1];\n var _useState2 = useState(),\n activeContent = _useState2[0],\n setActiveContent = _useState2[1];\n var _useState3 = useState(),\n activeTitle = _useState3[0],\n setActiveTitle = _useState3[1];\n var _useState4 = useState(),\n disableLeftArrow = _useState4[0],\n setDisableLeftArrow = _useState4[1];\n var _useState5 = useState(),\n disableRightArrow = _useState5[0],\n setDisableRightArrow = _useState5[1];\n var _useState6 = useState(),\n overflow = _useState6[0],\n setOverflow = _useState6[1];\n var _useState7 = useState(-1),\n focusIndex = _useState7[0],\n setFocusIndex = _useState7[1];\n var headerRef = useRef();\n var size = useContext(ResponsiveContext);\n var sendAnalytics = useAnalytics();\n if (activeIndex !== propsActiveIndex && propsActiveIndex !== undefined) {\n setActiveIndex(propsActiveIndex);\n }\n\n // Safari v15.5 has an issue with scrolling when overflow='hidden'\n // and scroll-behavior='smooth'. For now we are detecting if the browser\n // is safari to workaround this issue. The issue should be resolved soon\n // and we can remove this. https://github.com/WebKit/WebKit/pull/1387\n var isSafari = typeof window !== 'undefined' ? /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent) : true;\n\n /* eslint-disable no-param-reassign */\n delete rest.activeIndex;\n delete rest.onActive;\n /* eslint-enable no-param-reassign */\n\n var tabRefs = useMemo(function () {\n return React.Children.map(children, function () {\n return /*#__PURE__*/React.createRef();\n });\n }, [children]);\n\n // check if tab is in view\n var isVisible = useCallback(function (index) {\n if (tabRefs[index].current) {\n var _headerRef$current;\n var tabRect = tabRefs[index].current.getBoundingClientRect();\n var headerRect = (_headerRef$current = headerRef.current) == null ? void 0 : _headerRef$current.getBoundingClientRect();\n if (tabRect && headerRect) {\n // the -1 and +1 allow a little leniency when calculating if a tab\n // is in view. Without the -1 and +1 a tab could be fully in view\n // but isVisible will return false.\n return tabRect.left >= headerRect.left - 1 && tabRect.right <= headerRect.right + 1;\n }\n }\n return undefined;\n }, [headerRef, tabRefs]);\n var updateArrowState = useCallback(function () {\n setDisableLeftArrow(isVisible(0));\n setDisableRightArrow(isVisible(tabRefs.length - 1));\n }, [tabRefs, isVisible]);\n var scrollTo = useCallback(function (index, keyboard) {\n var tabRect = tabRefs[index].current.getBoundingClientRect();\n var headerRect = headerRef.current.getBoundingClientRect();\n var amountHidden = 0;\n if (tabRect.left >= headerRect.left && tabRect.left <= headerRect.right) {\n amountHidden = tabRect.width - (headerRect.right - tabRect.left);\n } else if (tabRect.right >= headerRect.left && tabRect.right <= headerRect.right) {\n amountHidden = tabRect.width - (tabRect.right - headerRect.left);\n amountHidden = 0 - amountHidden;\n } else if (tabRect.left >= headerRect.right) {\n amountHidden = tabRect.right - headerRect.right;\n } else if (tabRect.right <= headerRect.left) {\n amountHidden = headerRect.left - tabRect.left;\n amountHidden = 0 - amountHidden;\n }\n // We are adding or subtracting 2 from amountHidden to\n // ensure the focusIndicator is visible when navigating\n // by keyboard\n if (keyboard) {\n if (amountHidden < 0) amountHidden -= 2;\n if (amountHidden > 0) amountHidden += 2;\n }\n if (isSafari) {\n headerRef.current.scrollBy({\n left: amountHidden\n });\n } else {\n headerRef.current.scrollBy({\n left: amountHidden,\n behavior: 'smooth'\n });\n }\n\n // wait for scroll animation to finish\n // checks every 50 milliseconds for 1000 milliseconds\n // if the scroll animation has finished. Most scroll\n // animations will finish in 1000 milliseconds unless\n // the tab name is very long.\n if (isSafari) {\n updateArrowState();\n } else {\n var checkVisible = setInterval(function () {\n if (tabRefs[index].current && isVisible(index)) {\n updateArrowState();\n clearInterval(checkVisible);\n }\n }, 50);\n setTimeout(function () {\n updateArrowState();\n clearInterval(checkVisible);\n }, 1000);\n }\n }, [tabRefs, headerRef, isVisible, updateArrowState, isSafari]);\n var moveByArrowKey = function moveByArrowKey(direction) {\n var previous = direction === 'previous';\n var index = direction === 'previous' ? 0 : tabRefs.length - 1;\n var scrolledToIndex;\n var moveBy = theme.tabs.step[size] - 1 || 0;\n while (scrolledToIndex === undefined && (previous && index < tabRefs.length - 1 || !previous && index > 0)) {\n if (!isVisible(index) && (previous && isVisible(index + 1) || !previous && isVisible(index - 1))) {\n if (previous) {\n if (index - moveBy >= 0) {\n scrollTo(index - moveBy, false);\n scrolledToIndex = index - moveBy;\n } else {\n scrollTo(0, false);\n scrolledToIndex = 0;\n }\n } else if (index + moveBy < tabRefs.length) {\n scrollTo(index + moveBy, false);\n scrolledToIndex = index + moveBy;\n } else {\n scrollTo(tabRefs.length - 1, false);\n scrolledToIndex = tabRefs.length - 1;\n }\n }\n index = previous ? index + 1 : index - 1;\n }\n };\n useEffect(function () {\n var _tabRefs$activeIndex;\n // if the active tab isn't visible scroll to it\n if (overflow && tabRefs && (_tabRefs$activeIndex = tabRefs[activeIndex]) != null && _tabRefs$activeIndex.current && !isVisible(activeIndex)) scrollTo(activeIndex, true);\n }, [overflow, activeIndex, tabRefs, isVisible, scrollTo]);\n useEffect(function () {\n // scroll focus item into view if it is not already visible\n if (overflow && focusIndex !== -1 && !isVisible(focusIndex)) scrollTo(focusIndex, true);else if (overflow && focusIndex !== -1) {\n // If the browser scrolled the focused item into view and\n // the focusedTab is on the edge of the header container\n // scroll slightly further to show the focusIndicator\n var tabRect = tabRefs[focusIndex].current.getBoundingClientRect();\n var headerRect = headerRef.current.getBoundingClientRect();\n var amountHidden = 0;\n if (tabRect.left >= headerRect.left && tabRect.right <= headerRect.right && tabRect.right + 2 >= headerRect.right) amountHidden = 2;else if (tabRect.right <= headerRect.right && tabRect.left >= headerRect.left && tabRect.left - 2 <= headerRect.left) amountHidden = -2;\n headerRef.current.scrollBy({\n left: amountHidden\n });\n }\n }, [overflow, tabRefs, focusIndex, isVisible, scrollTo]);\n useLayoutEffect(function () {\n var onResize = function onResize() {\n // check if tabs are overflowing\n if (headerRef.current.scrollWidth > headerRef.current.offsetWidth) {\n setOverflow(true);\n } else setOverflow(false);\n updateArrowState();\n };\n onResize();\n window.addEventListener('resize', onResize);\n return function () {\n return window.removeEventListener('resize', onResize);\n };\n }, [tabRefs, disableLeftArrow, disableRightArrow, activeIndex, headerRef, overflow, updateArrowState]);\n var getTabsContext = useCallback(function (index) {\n var activateTab = function activateTab(nextIndex) {\n sendAnalytics({\n type: 'activateTab',\n element: tabRefs[nextIndex].current\n });\n if (propsActiveIndex === undefined) {\n setActiveIndex(nextIndex);\n }\n if (onActive) {\n onActive(nextIndex);\n }\n };\n return {\n activeIndex: activeIndex,\n active: activeIndex === index,\n index: index,\n ref: tabRefs[index],\n onActivate: function onActivate() {\n return activateTab(index);\n },\n setActiveContent: setActiveContent,\n setActiveTitle: setActiveTitle,\n setFocusIndex: setFocusIndex\n };\n }, [activeIndex, onActive, propsActiveIndex, sendAnalytics, tabRefs]);\n var tabs = React.Children.map(children, function (child, index) {\n return /*#__PURE__*/React.createElement(TabsContext.Provider, {\n value: getTabsContext(index)\n }, child ?\n /*#__PURE__*/\n // cloneElement is needed for backward compatibility with custom\n // styled components that rely on props.active. We should reassess\n // if it is still necessary in our next major release.\n React.cloneElement(child, {\n active: activeIndex === index\n }) : child);\n });\n var tabsHeaderStyles = {};\n if (theme.tabs.header && theme.tabs.header.border) {\n var borderColor = theme.tabs.header.border.color || theme.global.control.border.color;\n borderColor = normalizeColor(borderColor, theme);\n tabsHeaderStyles.border = {\n side: theme.tabs.header.border.side,\n size: theme.tabs.header.border.size,\n style: theme.tabs.header.border.style,\n color: borderColor\n };\n }\n var tabContentTitle = (activeTitle || '') + \" \" + format({\n id: 'tabs.tabContents',\n messages: messages\n });\n return /*#__PURE__*/React.createElement(StyledTabs, _extends({\n ref: ref,\n as: Box,\n flex: flex,\n responsive: responsive\n }, rest, {\n background: theme.tabs.background\n }), /*#__PURE__*/React.createElement(Box, _extends({\n alignSelf: alignControls || ((_theme$tabs$header = theme.tabs.header) == null ? void 0 : _theme$tabs$header.alignSelf),\n role: \"tablist\",\n flex: false,\n direction: overflow ? 'row' : 'column'\n }, tabsHeaderStyles), overflow && /*#__PURE__*/React.createElement(Button, {\n a11yTitle: \"Previous Tab\",\n disabled: disableLeftArrow\n // removed from tabIndex, button is redundant for keyboard users\n ,\n tabIndex: -1,\n onClick: function onClick() {\n return moveByArrowKey('previous');\n }\n }, /*#__PURE__*/React.createElement(Box, {\n pad: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n }, /*#__PURE__*/React.createElement(Previous, {\n color: disableLeftArrow ? theme.button.disabled.color : theme.global.colors.text\n }))), /*#__PURE__*/React.createElement(StyledTabsHeader, {\n ref: headerRef,\n as: Box,\n direction: \"row\",\n justify: overflow ? 'start' : justify,\n flex: !!overflow,\n wrap: false,\n overflow: overflow ? 'hidden' : 'visible',\n background: theme.tabs.header.background,\n gap: theme.tabs.gap,\n pad: overflow ? '2px' : undefined,\n margin: overflow ? '-2px' : undefined\n }, tabs), overflow && /*#__PURE__*/React.createElement(Button, {\n a11yTitle: \"Next Tab\",\n disabled: disableRightArrow\n // removed from tabIndex, button is redundant for keyboard users\n ,\n tabIndex: -1,\n onClick: function onClick() {\n return moveByArrowKey('next');\n }\n }, /*#__PURE__*/React.createElement(Box, {\n pad: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n }, /*#__PURE__*/React.createElement(Next, {\n color: disableRightArrow ? theme.button.disabled.color : theme.global.colors.text\n })))), /*#__PURE__*/React.createElement(StyledTabPanel, {\n flex: flex,\n \"aria-label\": tabContentTitle,\n role: \"tabpanel\"\n }, activeContent));\n});\nTabs.displayName = 'Tabs';\nTabs.propTypes = TabsPropTypes;\nexport { Tabs };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n drop: PropTypes.bool.isRequired,\n options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.shape({\n label: PropTypes.string,\n property: PropTypes.string\n }))]).isRequired\n };\n}\nexport var DataTableColumnsPropTypes = PropType;","var _excluded = [\"drop\", \"options\"],\n _excluded2 = [\"drop\", \"options\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\nimport { Search } from 'grommet-icons/icons/Search';\nimport { Splits } from 'grommet-icons/icons/Splits';\nimport { Box } from '../Box';\nimport { CheckBoxGroup } from '../CheckBoxGroup';\nimport { DataForm, formColumnsKey } from '../Data';\nimport { FormContext } from '../Form/FormContext';\nimport { DropButton } from '../DropButton';\nimport { List } from '../List';\nimport { Tab } from '../Tab';\nimport { Tabs } from '../Tabs';\nimport { TextInput } from '../TextInput';\nimport { DataContext } from '../../contexts/DataContext';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { DataTableColumnsPropTypes } from './propTypes';\nvar dropProps = {\n align: {\n top: 'bottom',\n left: 'left'\n }\n};\nvar tabsProps = {\n drop: {\n pad: 'small'\n },\n noDrop: {\n justify: 'start'\n }\n};\n\n// options can either be an array of property names or an array of objects.\n// The form value always uses an array of property names.\nvar optionsToValue = function optionsToValue(options) {\n return options.map(function (o) {\n return typeof o === 'object' && o.property || o;\n }) || [];\n};\nvar optionProperty = function optionProperty(option) {\n return typeof option === 'object' ? option.property : option;\n};\n\n// align the order in value to the order in options, as best we can\nvar alignOrder = function alignOrder(value, prevValue, options) {\n return value.sort(function (p1, p2) {\n // if both are in prevValue, preserve the order from that\n var i1 = prevValue.findIndex(function (n) {\n return n === p1;\n });\n var i2 = prevValue.findIndex(function (n) {\n return n === p2;\n });\n if (i1 !== -1 && i2 !== -1) return i1 - i2;\n i1 = options.findIndex(function (o) {\n return optionProperty(o) === p1;\n });\n i2 = options.findIndex(function (o) {\n return optionProperty(o) === p2;\n });\n return i1 - i2;\n });\n};\n\n// Content is a separate component since it might be getting its form context\n// from the DataForm rendered inside DataTableColumns.\nvar Content = function Content(_ref) {\n var drop = _ref.drop,\n options = _ref.options,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(DataContext),\n dataId = _useContext.id,\n messages = _useContext.messages;\n var _useContext2 = useContext(FormContext),\n useFormInput = _useContext2.useFormInput;\n var _useContext3 = useContext(MessageContext),\n format = _useContext3.format;\n\n // If the user searches for a particular option, render\n // the filtered list of options.\n var _useState = useState(''),\n search = _useState[0],\n setSearch = _useState[1];\n var _useState2 = useState(options),\n filteredOptions = _useState2[0],\n setFilteredOptions = _useState2[1];\n\n // Note whether options are objects so we can set up the *key properties\n // as needed when rendering.\n var objectOptions = useMemo(function () {\n return options && options.length && typeof options[0] === 'object';\n }, [options]);\n\n // 'value' is an array of property names\n var _useFormInput = useFormInput({\n name: formColumnsKey,\n initialValue: optionsToValue(options)\n }),\n value = _useFormInput[0],\n setValue = _useFormInput[1];\n\n // When the user searches, updated the filtered options based on the\n // search string.\n var onSearch = useCallback(function (nextSearch) {\n var nextFilteredOptions = options;\n if (nextSearch) {\n var lowerSearch = nextSearch.toLowerCase();\n nextFilteredOptions = options.filter(function (o) {\n var _ref2, _ref3, _o$label;\n return (_ref2 = (_ref3 = (_o$label = o.label) != null ? _o$label : o.property) != null ? _ref3 : o) == null ? void 0 : _ref2.toLowerCase().includes(lowerSearch);\n });\n }\n setSearch(nextSearch);\n setFilteredOptions(nextFilteredOptions);\n }, [options]);\n return /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Tabs, _extends({}, tabsProps[drop ? 'drop' : 'noDrop'], rest), /*#__PURE__*/React.createElement(Tab, {\n id: dataId + \"--select-columns-tab\",\n title: format({\n id: 'dataTableColumns.select',\n messages: messages == null ? void 0 : messages.dataTableColumns\n })\n }, /*#__PURE__*/React.createElement(Box, {\n pad: {\n vertical: 'small'\n },\n gap: \"xsmall\"\n }, /*#__PURE__*/React.createElement(TextInput, {\n type: \"search\",\n icon: /*#__PURE__*/React.createElement(Search, null),\n placeholder: \"Search\",\n value: search,\n onChange: function onChange(event) {\n return onSearch(event.target.value);\n }\n }), /*#__PURE__*/React.createElement(CheckBoxGroup, {\n id: dataId + \"--select-columns\",\n name: formColumnsKey,\n \"aria-labelledby\": dataId + \"--select-columns-tab\",\n options: filteredOptions,\n valueKey: objectOptions && 'property' || undefined,\n labelKey: objectOptions && 'label' || undefined,\n value: value,\n onChange: function onChange(_ref4) {\n var nextValue = _ref4.value;\n return setValue(alignOrder(nextValue, value, options));\n }\n }))), /*#__PURE__*/React.createElement(Tab, {\n id: dataId + \"--order-columns-tab\",\n title: format({\n id: 'dataTableColumns.order',\n messages: messages == null ? void 0 : messages.dataTableColumns\n })\n }, /*#__PURE__*/React.createElement(Box, {\n pad: {\n top: 'small'\n }\n }, /*#__PURE__*/React.createElement(List, {\n id: dataId + \"--order-columns\",\n \"aria-labelledby\": dataId + \"--order-columns-tab\"\n // List wants objects if possible to be able to use 'label'\n ,\n data: value.map(function (v) {\n return objectOptions && options.find(function (o) {\n return o.property === v;\n }) || v;\n }),\n onOrder: function onOrder(nextData) {\n return setValue(optionsToValue(nextData));\n },\n pad: \"none\",\n primaryKey: objectOptions && 'label' || undefined\n })))));\n};\nexport var DataTableColumns = function DataTableColumns(_ref5) {\n var drop = _ref5.drop,\n options = _ref5.options,\n rest = _objectWithoutPropertiesLoose(_ref5, _excluded2);\n var _useContext4 = useContext(DataContext),\n dataId = _useContext4.id,\n messages = _useContext4.messages;\n var _useContext5 = useContext(FormContext),\n noForm = _useContext5.noForm;\n var _useContext6 = useContext(MessageContext),\n format = _useContext6.format;\n var _useState3 = useState(),\n showContent = _useState3[0],\n setShowContent = _useState3[1];\n var tip = format({\n id: 'dataTableColumns.tip',\n messages: messages == null ? void 0 : messages.dataTableColumns\n });\n var content = /*#__PURE__*/React.createElement(Content, {\n drop: drop,\n options: options\n });\n if (noForm) content = /*#__PURE__*/React.createElement(DataForm, {\n footer: false,\n updateOn: \"change\"\n }, content);\n if (!drop) return content;\n var control = /*#__PURE__*/React.createElement(DropButton, _extends({\n id: dataId + \"--columns-control\",\n \"aria-label\": format({\n id: 'dataTableColumns.open',\n messages: messages == null ? void 0 : messages.dataTableColumns\n }),\n kind: \"toolbar\",\n icon: /*#__PURE__*/React.createElement(Splits, null),\n tip: tip,\n dropProps: dropProps,\n dropContent: content,\n open: showContent,\n onOpen: function onOpen() {\n return setShowContent(undefined);\n },\n onClose: function onClose() {\n return setShowContent(undefined);\n }\n }, rest));\n return control;\n};\nDataTableColumns.propTypes = DataTableColumnsPropTypes;","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.shape({\n label: PropTypes.string,\n property: PropTypes.string\n }))])\n };\n}\nexport var DataTableGroupByPropTypes = PropType;","var _excluded = [\"id\", \"options\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useEffect } from 'react';\nimport { DataForm } from '../Data/DataForm';\nimport { DataContext } from '../../contexts/DataContext';\nimport { FormContext } from '../Form/FormContext';\nimport { FormField } from '../FormField';\nimport { Select } from '../Select';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { DataTableGroupByPropTypes } from './propTypes';\nexport var DataTableGroupBy = function DataTableGroupBy(_ref) {\n var idProp = _ref.id,\n options = _ref.options,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(DataContext),\n dataId = _useContext.id,\n messages = _useContext.messages,\n view = _useContext.view,\n addToolbarKey = _useContext.addToolbarKey;\n var _useContext2 = useContext(FormContext),\n noForm = _useContext2.noForm;\n var _useContext3 = useContext(MessageContext),\n format = _useContext3.format;\n var id = idProp || dataId + \"--groupby\";\n useEffect(function () {\n if (noForm) addToolbarKey('_groupBy');\n }, [addToolbarKey, noForm]);\n if (!options) return null;\n var content = /*#__PURE__*/React.createElement(Select, _extends({\n id: id,\n name: \"_groupBy\",\n showSelectedInline: true,\n placeholder: noForm ? 'Group by' : undefined,\n options: options,\n labelKey: \"label\",\n clear: view != null && view.groupBy ? {\n position: 'top',\n label: format({\n id: 'dataTableGroupBy.clear',\n messages: messages == null ? void 0 : messages.dataTableGroupBy\n })\n } : undefined,\n value: view == null ? void 0 : view.groupBy\n }, rest));\n if (noForm)\n // likely in Toolbar\n content = /*#__PURE__*/React.createElement(DataForm, {\n footer: false,\n updateOn: \"change\"\n }, content);else content = /*#__PURE__*/React.createElement(FormField, {\n htmlFor: id,\n label: format({\n id: 'dataTableGroupBy.label',\n messages: messages == null ? void 0 : messages.dataTableGroupBy\n })\n }, content);\n return content;\n};\nDataTableGroupBy.propTypes = DataTableGroupByPropTypes;","import styled from 'styled-components';\nimport { disabledStyle, getInputPadBySide, inputStyle, plainInputStyle, textAlignStyle } from '../../utils';\nimport { inputPadForIcon } from '../../utils/styles';\nexport var StyledMaskedInput = styled.input.withConfig({\n displayName: \"StyledMaskedInput\",\n componentId: \"sc-99vkfa-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \";\"], inputStyle, function (props) {\n return props.plain && plainInputStyle;\n}, function (props) {\n return props.icon && inputPadForIcon;\n}, function (props) {\n return props.disabled && disabledStyle(props.theme.maskedInput.disabled && props.theme.maskedInput.disabled.opacity);\n}, function (props) {\n return props.textAlign && textAlignStyle;\n}, function (props) {\n return props.theme.maskedInput && props.theme.maskedInput.extend;\n});\nexport var StyledMaskedInputContainer = styled.div.withConfig({\n displayName: \"StyledMaskedInput__StyledMaskedInputContainer\",\n componentId: \"sc-99vkfa-1\"\n})([\"position:relative;width:100%;\", \";\"], function (props) {\n return props.theme.maskedInput && props.theme.maskedInput.container && props.theme.maskedInput.container.extend;\n});\nexport var StyledIcon = styled.div.withConfig({\n displayName: \"StyledMaskedInput__StyledIcon\",\n componentId: \"sc-99vkfa-2\"\n})([\"position:absolute;display:flex;justify:center;top:50%;transform:translateY(-50%);pointer-events:none;\", \"\"], function (props) {\n return props.reverse ? \"right: \" + getInputPadBySide(props, 'right') + \";\" : \"left: \" + getInputPadBySide(props, 'left') + \";\";\n});","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n a11yTitle: PropTypes.string,\n dropHeight: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n dropProps: PropTypes.object,\n icon: PropTypes.element,\n id: PropTypes.string,\n name: PropTypes.string,\n onChange: PropTypes.func,\n focusIndicator: PropTypes.bool,\n onBlur: PropTypes.func,\n mask: PropTypes.arrayOf(PropTypes.shape({\n length: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n fixed: PropTypes.string,\n options: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n restrictToOptions: PropTypes.bool,\n regexp: PropTypes.shape({}) // RegExp\n })),\n\n reverse: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', '2xl', '3xl', '4xl', '5xl', '6xl']), PropTypes.string]),\n textAlign: PropTypes.oneOf(['start', 'center', 'end']),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n };\n}\nexport var MaskedInputPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"dropHeight\", \"dropProps\", \"focus\", \"focusIndicator\", \"icon\", \"id\", \"mask\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"onKeyDown\", \"placeholder\", \"plain\", \"reverse\", \"textAlign\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Drop } from '../Drop';\nimport { FormContext } from '../Form/FormContext';\nimport { Keyboard } from '../Keyboard';\nimport { sizeStyle, useForwardedRef, useSizedIcon } from '../../utils';\nimport { StyledMaskedInput, StyledMaskedInputContainer, StyledIcon } from './StyledMaskedInput';\nimport { MaskedInputPropTypes } from './propTypes';\nvar parseValue = function parseValue(mask, value) {\n // break the value up into mask parts\n var valueParts = []; // { part, beginIndex, endIndex }\n var valueIndex = 0;\n var maskIndex = 0;\n while (value !== undefined && valueIndex < value.length && maskIndex < mask.length) {\n var item = mask[maskIndex];\n var found = void 0;\n if (item.fixed) {\n var length = item.fixed.length;\n\n // grab however much of value (starting at valueIndex) matches\n // item.fixed. If none matches it and there is more in value\n // add in the fixed item.\n var matching = 0;\n while (matching < length && value[valueIndex + matching] === item.fixed[matching]) {\n matching += 1;\n }\n if (matching > 0) {\n var part = value.slice(valueIndex, valueIndex + matching);\n if (valueIndex + matching < value.length) {\n // matched part of the fixed portion but there's more stuff\n // after it. Go ahead and fill in the entire fixed chunk\n part = item.fixed;\n }\n valueParts.push({\n part: part,\n beginIndex: valueIndex,\n endIndex: valueIndex + matching - 1\n });\n valueIndex += matching;\n } else {\n valueParts.push({\n part: item.fixed,\n beginIndex: valueIndex,\n endIndex: valueIndex + length - 1\n });\n }\n maskIndex += 1;\n found = true;\n } else if (item.options && item.restrictToOptions !== false) {\n // reverse assuming larger is later\n found = item.options.slice(0).reverse()\n // eslint-disable-next-line no-loop-func\n .some(function (option) {\n var length = option.length;\n var part = value.slice(valueIndex, valueIndex + length);\n if (part === option) {\n valueParts.push({\n part: part,\n beginIndex: valueIndex,\n endIndex: valueIndex + length - 1\n });\n valueIndex += length;\n maskIndex += 1;\n return true;\n }\n return false;\n });\n }\n if (!found) {\n if (item.regexp) {\n var minLength = Array.isArray(item.length) && item.length[0] || item.length || 1;\n var maxLength = Array.isArray(item.length) && item.length[1] || item.length || value.length - valueIndex;\n var _length = maxLength;\n while (!found && _length >= minLength) {\n var _part = value.slice(valueIndex, valueIndex + _length);\n if (item.regexp.test(_part)) {\n valueParts.push({\n part: _part,\n beginIndex: valueIndex,\n endIndex: valueIndex + _length - 1\n });\n valueIndex += _length;\n maskIndex += 1;\n found = true;\n }\n _length -= 1;\n }\n if (!found) {\n valueIndex = value.length;\n }\n } else {\n var _length2 = Array.isArray(item.length) ? item.length[1] : item.length || value.length - valueIndex;\n var _part2 = value.slice(valueIndex, valueIndex + _length2);\n valueParts.push({\n part: _part2,\n beginIndex: valueIndex,\n endIndex: valueIndex + _length2 - 1\n });\n valueIndex += _length2;\n maskIndex += 1;\n }\n }\n }\n return valueParts;\n};\nvar defaultMask = [{\n regexp: /[^]*/\n}];\nvar ContainerBox = styled(Box).withConfig({\n displayName: \"MaskedInput__ContainerBox\",\n componentId: \"sc-af8hzu-0\"\n})([\"\", \";\"], function (props) {\n return props.dropHeight ? sizeStyle('max-height', props.dropHeight, props.theme) : 'max-height: inherit;';\n});\nvar dropAlign = {\n top: 'bottom',\n left: 'left'\n};\nvar MaskedInput = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n dropHeight = _ref.dropHeight,\n dropProps = _ref.dropProps,\n focusProp = _ref.focus,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n icon = _ref.icon,\n id = _ref.id,\n _ref$mask = _ref.mask,\n mask = _ref$mask === void 0 ? defaultMask : _ref$mask,\n name = _ref.name,\n _onBlur = _ref.onBlur,\n onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n onKeyDown = _ref.onKeyDown,\n placeholder = _ref.placeholder,\n plain = _ref.plain,\n reverse = _ref.reverse,\n textAlign = _ref.textAlign,\n valueProp = _ref.value,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var formContext = useContext(FormContext);\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp,\n initialValue: ''\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n var valueParts = useMemo(function () {\n return parseValue(mask, value);\n }, [mask, value]);\n var inputRef = useForwardedRef(ref);\n var dropRef = useRef();\n\n // Caller's ref, if provided\n var _useState = useState(),\n dropPropsTarget = _useState[0],\n setDropPropsTarget = _useState[1];\n useEffect(function () {\n var nextDropPropsTarget;\n // If caller provided a ref, set to 'pending' until ref.current is defined\n if (dropProps && 'target' in dropProps) {\n nextDropPropsTarget = dropProps.target || 'pending';\n setDropPropsTarget(nextDropPropsTarget);\n }\n }, [dropProps]);\n var _useState2 = useState(focusProp),\n focus = _useState2[0],\n setFocus = _useState2[1];\n var _useState3 = useState(),\n activeMaskIndex = _useState3[0],\n setActiveMaskIndex = _useState3[1];\n var _useState4 = useState(),\n activeOptionIndex = _useState4[0],\n setActiveOptionIndex = _useState4[1];\n var _useState5 = useState(),\n showDrop = _useState5[0],\n setShowDrop = _useState5[1];\n useEffect(function () {\n if (focus) {\n var timer = setTimeout(function () {\n // determine which mask element the caret is at\n var caretIndex = inputRef.current.selectionStart;\n var maskIndex;\n valueParts.some(function (part, index) {\n if (part.beginIndex <= caretIndex && part.endIndex >= caretIndex) {\n maskIndex = index;\n return true;\n }\n return false;\n });\n if (maskIndex === undefined && valueParts.length < mask.length) {\n maskIndex = valueParts.length; // first unused one\n }\n\n if (maskIndex && mask[maskIndex].fixed) {\n maskIndex -= 1; // fixed mask parts are never \"active\"\n }\n\n if (maskIndex !== activeMaskIndex) {\n setActiveMaskIndex(maskIndex);\n setActiveOptionIndex(-1);\n setShowDrop(maskIndex >= 0 && mask[maskIndex].options && true);\n }\n }, 10); // 10ms empirically chosen\n return function () {\n return clearTimeout(timer);\n };\n }\n return undefined;\n }, [activeMaskIndex, focus, inputRef, mask, valueParts]);\n var setInputValue = useCallback(function (nextValue) {\n // Calling set value function directly on input because React library\n // overrides setter `event.target.value =` and loses original event\n // target fidelity.\n // https://stackoverflow.com/a/46012210 &&\n // https://github.com/grommet/grommet/pull/3171#discussion_r296415239\n var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;\n nativeInputValueSetter.call(inputRef.current, nextValue);\n var event = new Event('input', {\n bubbles: true\n });\n inputRef.current.dispatchEvent(event);\n }, [inputRef]);\n\n // This could be due to a paste or as the user is typing.\n var onChangeInput = useCallback(function (event) {\n var eventValue = event.target.value;\n // Align with the mask.\n var nextValueParts = parseValue(mask, eventValue);\n var nextValue = nextValueParts.map(function (part) {\n return part.part;\n }).join('');\n if (nextValue !== eventValue) {\n // The mask adjusted the next value. If something was added,\n // the value must be valid. Change the actual input value\n // to correspond.\n // This will re-trigger this callback with the next value.\n if (nextValue.length > eventValue.length) setInputValue(nextValue);\n // If the nextValue is shorter, something must be invalid.\n else if (value && eventValue.length < value.length) {\n // If the user is removing characters, preserve what the\n // user is working on.\n setValue(eventValue);\n if (onChange) onChange(event);\n } else {\n // If the user is adding invalid characters, don't allow it.\n // Revert to the prior value.\n setInputValue(value);\n }\n } else if (value !== nextValue) {\n setValue(nextValue);\n if (onChange) onChange(event);\n }\n }, [mask, onChange, setInputValue, setValue, value]);\n var onOption = useCallback(function (option) {\n return function () {\n var nextValueParts = [].concat(valueParts);\n nextValueParts[activeMaskIndex] = {\n part: option\n };\n // add any fixed parts that follow\n var index = activeMaskIndex + 1;\n while (index < mask.length && !nextValueParts[index] && mask[index].fixed) {\n nextValueParts[index] = {\n part: mask[index].fixed\n };\n index += 1;\n }\n var nextValue = nextValueParts.map(function (part) {\n return part.part;\n }).join('');\n setInputValue(nextValue);\n // restore focus to input\n inputRef.current.focus();\n };\n }, [activeMaskIndex, inputRef, mask, setInputValue, valueParts]);\n var onNextOption = useCallback(function (event) {\n var item = mask[activeMaskIndex];\n if (item && item.options) {\n event.preventDefault();\n var index = Math.min(activeOptionIndex + 1, item.options.length - 1);\n setActiveOptionIndex(index);\n }\n }, [activeMaskIndex, activeOptionIndex, mask]);\n var onPreviousOption = useCallback(function (event) {\n if (activeMaskIndex >= 0 && mask[activeMaskIndex].options) {\n event.preventDefault();\n var index = Math.max(activeOptionIndex - 1, 0);\n setActiveOptionIndex(index);\n }\n }, [activeMaskIndex, activeOptionIndex, mask]);\n var onSelectOption = useCallback(function (event) {\n if (activeMaskIndex >= 0 && activeOptionIndex >= 0) {\n event.preventDefault();\n var option = mask[activeMaskIndex].options[activeOptionIndex];\n onOption(option)();\n }\n }, [activeMaskIndex, activeOptionIndex, mask, onOption]);\n var onEsc = useCallback(function (event) {\n if (showDrop) {\n // we have to stop both synthetic events and native events\n // drop and layer should not close by pressing esc on this input\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation();\n setShowDrop(false);\n }\n }, [showDrop]);\n var onHideDrop = useCallback(function () {\n return setShowDrop(false);\n }, []);\n var renderPlaceholder = function renderPlaceholder() {\n return mask.map(function (item) {\n return item.placeholder || item.fixed;\n }).join('');\n };\n var maskedInputIcon = useSizedIcon(icon, rest.size, theme);\n return /*#__PURE__*/React.createElement(StyledMaskedInputContainer, {\n plain: plain\n }, maskedInputIcon && /*#__PURE__*/React.createElement(StyledIcon, {\n reverse: reverse,\n theme: theme\n }, maskedInputIcon), /*#__PURE__*/React.createElement(Keyboard, {\n onEsc: onEsc,\n onTab: showDrop ? function () {\n return setShowDrop(false);\n } : undefined,\n onLeft: undefined,\n onRight: undefined,\n onUp: onPreviousOption,\n onDown: showDrop ? onNextOption : function () {\n return setShowDrop(true);\n },\n onEnter: onSelectOption,\n onKeyDown: onKeyDown\n }, /*#__PURE__*/React.createElement(StyledMaskedInput, _extends({\n ref: inputRef,\n \"aria-label\": a11yTitle,\n id: id,\n name: name,\n autoComplete: \"off\",\n focusIndicator: focusIndicator,\n plain: plain,\n placeholder: placeholder || renderPlaceholder(),\n icon: icon,\n reverse: reverse,\n focus: focus,\n textAlign: textAlign\n }, rest, {\n value: value,\n theme: theme,\n onFocus: function onFocus(event) {\n setFocus(true);\n setShowDrop(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n // This will be called when the user clicks on a suggestion,\n // check for that and don't remove the drop in that case.\n // Drop will already have removed itself if the user has focused\n // outside of the Drop.\n if (!dropRef.current) setShowDrop(false);\n if (_onBlur) _onBlur(event);\n },\n onChange: onChangeInput\n }))), showDrop && mask[activeMaskIndex] && mask[activeMaskIndex].options &&\n // If caller has specified dropProps.target, ensure target is defined\n dropPropsTarget !== 'pending' && /*#__PURE__*/React.createElement(Drop, _extends({\n id: id ? \"masked-input-drop__\" + id : undefined,\n align: dropAlign,\n responsive: false,\n target: inputRef.current,\n onClickOutside: onHideDrop,\n onEsc: onHideDrop\n }, dropProps), /*#__PURE__*/React.createElement(ContainerBox, {\n ref: dropRef,\n overflow: \"auto\",\n dropHeight: dropHeight\n }, mask[activeMaskIndex].options.map(function (option, index) {\n // Determine whether the label is done as a child or\n // as an option Button kind property.\n var child = !theme.button.option ? /*#__PURE__*/React.createElement(Box, {\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n }\n }, option) : undefined;\n // if we have a child, turn on plain, and hoverIndicator\n\n return /*#__PURE__*/React.createElement(Box, {\n key: option,\n flex: false\n }, /*#__PURE__*/React.createElement(Button, {\n tabIndex: \"-1\",\n onClick: onOption(option),\n onMouseOver: function onMouseOver() {\n return setActiveOptionIndex(index);\n },\n onFocus: function onFocus() {},\n active: index === activeOptionIndex,\n plain: !child ? undefined : true,\n align: \"start\",\n kind: !child ? 'option' : undefined,\n hoverIndicator: !child ? undefined : 'background',\n label: !child ? option : undefined\n }, child));\n }))));\n});\nMaskedInput.displayName = 'MaskedInput';\nMaskedInput.propTypes = MaskedInputPropTypes;\nexport { MaskedInput };","function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { setHoursWithOffset } from '../../utils';\nimport { handleOffset } from '../Calendar/utils';\n\n// Converting between Date and String types is handled via a \"schema\".\n// The schema is an array of strings, split into strings with identical\n// characters. So, 'mm/dd/yyyy' will be ['mm', '/', 'dd', '/', 'yyyyy'].\nexport var formatToSchema = function formatToSchema(format) {\n if (!format) return undefined;\n var result = [];\n var i = 0;\n var part;\n while (i < format.length) {\n if (!part || part[0] !== format[i]) {\n if (part) result.push(part);\n part = format[i];\n } else {\n part += format[i];\n }\n i += 1;\n }\n if (part) result.push(part);\n return result;\n};\nvar masks = {\n m: {\n length: [1, 2],\n regexp: /^[1-9]$|^1[0-2]$/\n },\n mm: {\n length: [1, 2],\n regexp: /^[0-1]$|^0[1-9]$|^1[0-2]$/\n },\n d: {\n length: [1, 2],\n regexp: /^[1-9]$|^[1-2][0-9]$|^3[0-1]$/\n },\n dd: {\n length: [1, 2],\n regexp: /^[0-3]$|^0[1-9]$|^[1-2][0-9]$|^3[0-1]$/\n },\n yy: {\n length: [1, 2],\n regexp: /^[0-9]{1,2}$/\n },\n yyyy: {\n length: [1, 4],\n regexp: /^[0-9]{1,4}$/\n }\n};\nexport var schemaToMask = function schemaToMask(schema) {\n if (!schema) return undefined;\n return schema.map(function (part) {\n var lower = part.toLowerCase();\n var _char = lower[0];\n if (_char === 'm' || _char === 'd' || _char === 'y') return _extends({\n placeholder: part\n }, masks[lower]);\n return {\n fixed: part\n };\n });\n};\n\n// convert value into text representation using the schema\nexport var valueToText = function valueToText(value, schema) {\n var text = '';\n // when user initializes dates as empty array, we want to still\n // show the placeholder text\n if (!value || Array.isArray(value) && !value.length) return text;\n var dates = (Array.isArray(value) ? value : [value]).map(function (v) {\n return setHoursWithOffset(v);\n });\n var dateIndex = 0;\n var parts = {};\n schema.every(function (part) {\n var _char2 = part[0].toLowerCase();\n // advance dateIndex if we already have this part\n while (dateIndex < dates.length && (Number.isNaN(dates[dateIndex].date) || (_char2 === 'm' || _char2 === 'd' || _char2 === 'y') && parts[part])) {\n dateIndex += 1;\n parts = {};\n }\n var date = dates[dateIndex];\n if (date && part === 'm') {\n text += date.getMonth() + 1;\n parts[part] = true;\n } else if (date && part === 'mm') {\n text += (\"0\" + (date.getMonth() + 1)).slice(-2);\n parts[part] = true;\n } else if (date && part === 'd') {\n text += date.getDate();\n parts[part] = true;\n } else if (date && part === 'dd') {\n text += (\"0\" + date.getDate()).slice(-2);\n parts[part] = true;\n } else if (date && part === 'yy') {\n text += date.getFullYear().toString().slice(-2);\n parts[part] = true;\n } else if (date && part === 'yyyy') {\n text += date.getFullYear();\n parts[part] = true;\n } else if (!date && (part[0] === 'm' || part[0] === 'd' || part[0] === 'y')) {\n return false;\n } else {\n text += part;\n }\n return true;\n });\n return text;\n};\nvar charCodeZero = '0'.charCodeAt(0);\nvar charCodeNine = '9'.charCodeAt(0);\nvar pullDigits = function pullDigits(text, index) {\n var end = index;\n while (text.charCodeAt(end) >= charCodeZero && text.charCodeAt(end) <= charCodeNine) end += 1;\n return text.slice(index, end);\n};\nexport var validateBounds = function validateBounds(dateBounds, selectedDate) {\n if (!dateBounds || !selectedDate) return selectedDate;\n var _dateBounds$map = dateBounds.map(function (date) {\n return setHoursWithOffset(date).toISOString();\n }),\n startDate = _dateBounds$map[0],\n endDate = _dateBounds$map[1];\n var isoSelectedDates = (Array.isArray(selectedDate) ? selectedDate : [selectedDate]).map(function (date) {\n return setHoursWithOffset(date).toISOString();\n });\n var validSelection = isoSelectedDates.every(function (isoSelectedDate) {\n return !endDate && startDate === isoSelectedDate || isoSelectedDate >= startDate && isoSelectedDate <= endDate;\n });\n return validSelection ? selectedDate : undefined;\n};\nexport var textToValue = function textToValue(text, schema, range, reference, outputFormat) {\n if (!text) return range ? [] : undefined;\n var result;\n var addDate = function addDate(parts) {\n var leapYear = parts.y % 4 === 0 && parts.y % 100 !== 0 || parts.y % 400 === 0;\n\n // Do a little sanity checking on the parts first.\n // If not valid, leave as is.\n if (!parts.m || !parts.d || !parts.y || parts.y.length < 4 || parts.m.length > 2 || parts.d.length > 2 || parts.m > 12 || parts.d > 31 || (parts.m === \"02\" || parts.m === \"2\") && parts.d > (leapYear ? 29 : 28)) return parts;\n\n // use time info from reference date\n var time = reference ? [reference.getHours(), reference.getMinutes(), reference.getSeconds(), reference.getMilliseconds()] : null;\n var date = _construct(Date, [parts.y, parts.m - 1, parts.d].concat(time)).toISOString();\n if (date && outputFormat === 'no timezone') {\n var _handleOffset$toISOSt = handleOffset(date).toISOString().split('T');\n date = _handleOffset$toISOSt[0];\n }\n if (!range) {\n if (!result) result = date;\n } else {\n if (!result) result = [];\n result.push(date);\n }\n // we've consumed these parts, return an empty object in case we need\n // to start building up another one for a range\n return {};\n };\n var parts = {};\n var index = 0;\n schema.forEach(function (part) {\n if (index < text.length) {\n var lower = part.toLowerCase();\n var _char3 = lower[0];\n if (parts[_char3] !== undefined) parts = addDate(parts);\n if (_char3 === 'm') {\n parts.m = pullDigits(text, index);\n index += parts.m.length;\n } else if (_char3 === 'd') {\n var _parts;\n parts.d = pullDigits(text, index);\n // when format is something like yyyy/mm/dd,\n // '0' as incomplete day can cause date to be\n // prematurely calculated.\n // ex: 2022/01/0 would reutrn 2021/12/31 in addDate()\n if (parts.d === '0') delete parts.d;\n index += ((_parts = parts) == null || (_parts = _parts.d) == null ? void 0 : _parts.length) || 0;\n } else if (_char3 === 'y') {\n parts.y = pullDigits(text, index);\n index += parts.y.length;\n if (lower === 'yy' && parts.y.length === 2) {\n // convert to full year, pivot at 69 based on POSIX strptime()\n parts.y = \"\" + (parts.y < 69 ? 20 : 19) + parts.y;\n }\n } else if (text.slice(index, index + part.length) === part) {\n index += part.length;\n } else {\n // syntax error\n index = text.length;\n result = undefined;\n }\n }\n });\n parts = addDate(parts);\n if (!result) return range ? [] : undefined;\n return result;\n};\nexport var valuesAreEqual = function valuesAreEqual(value1, value2) {\n return Array.isArray(value1) && Array.isArray(value2) && value1.every(function (d1, i) {\n return d1 === value2[i];\n }) || value1 === value2;\n};","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n buttonProps: PropTypes.shape({}),\n calendarProps: PropTypes.shape({}),\n defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n dropProps: PropTypes.shape({}),\n format: PropTypes.string,\n icon: PropTypes.element,\n id: PropTypes.string,\n inline: PropTypes.bool,\n reverse: PropTypes.bool,\n inputProps: PropTypes.shape({}),\n name: PropTypes.string,\n onChange: PropTypes.func,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', '2xl', '3xl', '4xl', '5xl', '6xl']), PropTypes.string])\n };\n}\nexport var DateInputPropTypes = PropType;","var _excluded = [\"buttonProps\", \"calendarProps\", \"defaultValue\", \"disabled\", \"dropProps\", \"format\", \"id\", \"icon\", \"inline\", \"inputProps\", \"name\", \"onChange\", \"onFocus\", \"plain\", \"reverse\", \"value\", \"messages\"],\n _excluded2 = [\"icon\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useRef, forwardRef, useContext, useEffect, useMemo, useState, useCallback } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Calendar as CalendarIcon } from 'grommet-icons/icons/Calendar';\nimport { defaultProps } from '../../default-props';\nimport { AnnounceContext } from '../../contexts/AnnounceContext';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Calendar } from '../Calendar';\nimport { Drop } from '../Drop';\nimport { DropButton } from '../DropButton';\nimport { FormContext } from '../Form';\nimport { Keyboard } from '../Keyboard';\nimport { MaskedInput } from '../MaskedInput';\nimport { useForwardedRef, setHoursWithOffset } from '../../utils';\nimport { formatToSchema, schemaToMask, valuesAreEqual, valueToText, textToValue, validateBounds } from './utils';\nimport { DateInputPropTypes } from './propTypes';\nimport { getOutputFormat } from '../Calendar/Calendar';\nvar getReference = function getReference(value) {\n var adjustedDate;\n var res;\n if (typeof value === 'string') res = value;else if (Array.isArray(value) && Array.isArray(value[0])) res = value[0].find(function (date) {\n return date;\n });else if (Array.isArray(value) && value.length) {\n res = value[0];\n }\n if (res) {\n adjustedDate = setHoursWithOffset(res);\n }\n return adjustedDate;\n};\nvar DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {\n var _theme$icon, _theme$dateInput$icon;\n var buttonProps = _ref.buttonProps,\n calendarProps = _ref.calendarProps,\n defaultValue = _ref.defaultValue,\n disabled = _ref.disabled,\n dropProps = _ref.dropProps,\n format = _ref.format,\n id = _ref.id,\n icon = _ref.icon,\n _ref$inline = _ref.inline,\n inline = _ref$inline === void 0 ? false : _ref$inline,\n inputProps = _ref.inputProps,\n name = _ref.name,\n _onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n plain = _ref.plain,\n _ref$reverse = _ref.reverse,\n reverseProp = _ref$reverse === void 0 ? false : _ref$reverse,\n valueArg = _ref.value,\n messages = _ref.messages,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var announce = useContext(AnnounceContext);\n var _useContext = useContext(MessageContext),\n formatMessage = _useContext.format;\n var iconSize = ((_theme$icon = theme.icon) == null ? void 0 : _theme$icon.matchSize) && rest.size || ((_theme$dateInput$icon = theme.dateInput.icon) == null ? void 0 : _theme$dateInput$icon.size) || 'medium';\n var _useContext2 = useContext(FormContext),\n useFormInput = _useContext2.useFormInput;\n var ref = useForwardedRef(refArg);\n var containerRef = useRef();\n var _useFormInput = useFormInput({\n name: name,\n value: valueArg,\n initialValue: defaultValue\n }),\n value = _useFormInput[0],\n setValue = _useFormInput[1];\n var _useState = useState(getOutputFormat(value)),\n outputFormat = _useState[0],\n setOutputFormat = _useState[1];\n useEffect(function () {\n setOutputFormat(function (previousFormat) {\n var nextFormat = getOutputFormat(value);\n // when user types, date could become something like 07//2020\n // and value becomes undefined. don't lose the format from the\n // previous valid date\n return previousFormat !== nextFormat ? previousFormat : nextFormat;\n });\n }, [value]);\n\n // keep track of timestamp from original date(s)\n var _useState2 = useState(getReference(value)),\n reference = _useState2[0],\n setReference = _useState2[1];\n\n // do we expect multiple dates?\n var range = Array.isArray(value) || format && format.includes('-');\n\n // parse format and build a formal schema we can use elsewhere\n var schema = useMemo(function () {\n return formatToSchema(format);\n }, [format]);\n\n // mask is only used when a format is provided\n var mask = useMemo(function () {\n return schemaToMask(schema);\n }, [schema]);\n\n // textValue is only used when a format is provided\n var _useState3 = useState(schema ? valueToText(value, schema) : undefined),\n textValue = _useState3[0],\n setTextValue = _useState3[1];\n\n // Setting the icon through `inputProps` is deprecated.\n // The `icon` prop should be used instead.\n var _ref2 = inputProps || {},\n MaskedInputIcon = _ref2.icon,\n restOfInputProps = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n if (MaskedInputIcon) {\n console.warn(\"Customizing the DateInput icon through inputProps is deprecated.\\nUse the icon prop instead.\");\n }\n var reverse = reverseProp || restOfInputProps.reverse;\n var calendarDropdownAlign = {\n top: 'bottom',\n left: 'left'\n };\n\n // We need to distinguish between the caller changing a Form value\n // and the user typing a date that he isn't finished with yet.\n // To handle this, we see if we have a value and the text value\n // associated with it doesn't align to it, then we update the text value.\n // We compare using textToValue to avoid \"06/01/2021\" not\n // matching \"06/1/2021\".\n useEffect(function () {\n if (schema && value !== undefined) {\n var nextTextValue = valueToText(value, schema);\n if (!valuesAreEqual(textToValue(textValue, schema, range, reference), textToValue(nextTextValue, schema, range, reference)) || textValue === '' && nextTextValue !== '') {\n setTextValue(nextTextValue);\n }\n }\n }, [range, schema, textValue, reference, value]);\n\n // textValue of MaskedInput is controlled.\n // for uncontrolled forms, ensure the reset event\n // resets the textValue\n useEffect(function () {\n var _ref$current;\n var form = ref == null || (_ref$current = ref.current) == null ? void 0 : _ref$current.form;\n var handleFormReset = function handleFormReset(e) {\n if (schema && ref.current && e.target.contains(ref.current)) {\n setTextValue('');\n }\n };\n // place the listener on the form directly. if listener is on window,\n // the event could get blocked if caller has e.stopPropagation(), etc. in\n // their form onReset\n form == null ? void 0 : form.addEventListener('reset', handleFormReset);\n return function () {\n return form == null ? void 0 : form.removeEventListener('reset', handleFormReset);\n };\n }, [schema, ref]);\n\n // when format and not inline, whether to show the Calendar in a Drop\n var _useState4 = useState(),\n open = _useState4[0],\n setOpen = _useState4[1];\n var openCalendar = useCallback(function () {\n setOpen(true);\n announce(formatMessage({\n id: 'dateInput.enterCalendar',\n messages: messages\n }));\n }, [announce, formatMessage, messages]);\n var closeCalendar = useCallback(function () {\n setOpen(false);\n announce(formatMessage({\n id: 'dateInput.exitCalendar',\n messages: messages\n }));\n }, [announce, formatMessage, messages]);\n var dates = useMemo(function () {\n return range && value != null && value.length ? [value] : undefined;\n }, [range, value]);\n var calendar = /*#__PURE__*/React.createElement(Calendar, _extends({\n ref: inline ? ref : undefined,\n id: inline && !format ? id : undefined,\n range: range,\n date: range ? undefined : value\n // when caller initializes with empty array, dates should be undefined\n // allowing the user to select both begin and end of the range\n ,\n dates: dates\n // places focus on days grid when Calendar opens\n ,\n initialFocus: open ? 'days' : undefined,\n onSelect: disabled ? undefined : function (nextValue) {\n var normalizedValue;\n if (range && Array.isArray(nextValue)) {\n normalizedValue = nextValue[0];\n } // clicking an edge date removes it\n else if (range && nextValue) normalizedValue = [nextValue, nextValue];else normalizedValue = nextValue;\n if (schema) setTextValue(valueToText(normalizedValue, schema));\n setValue(normalizedValue);\n setReference(getReference(nextValue));\n if (_onChange) _onChange({\n value: normalizedValue\n });\n if (open && !range) {\n closeCalendar();\n setTimeout(function () {\n var _ref$current2;\n return (_ref$current2 = ref.current) == null ? void 0 : _ref$current2.focus();\n }, 1);\n }\n }\n }, calendarProps));\n var formContextValue = useMemo(function () {\n return {\n useFormInput: function useFormInput(_ref3) {\n var valueProp = _ref3.value;\n return [valueProp, function () {}];\n }\n };\n }, []);\n if (!format) {\n // When no format is specified, we don't give the user a way to type\n if (inline) return calendar;\n return /*#__PURE__*/React.createElement(DropButton, _extends({\n ref: ref,\n id: id,\n dropProps: _extends({\n align: calendarDropdownAlign\n }, dropProps),\n dropContent: calendar,\n icon: icon || MaskedInputIcon || /*#__PURE__*/React.createElement(CalendarIcon, {\n size: iconSize\n })\n }, buttonProps));\n }\n var calendarButton = /*#__PURE__*/React.createElement(Button, {\n onClick: open ? closeCalendar : openCalendar,\n plain: true,\n icon: icon || MaskedInputIcon || /*#__PURE__*/React.createElement(CalendarIcon, {\n size: iconSize\n }),\n margin: reverse ? {\n left: 'small'\n } : {\n right: 'small'\n }\n });\n var input = /*#__PURE__*/React.createElement(FormContext.Provider, {\n key: \"input\"\n // don't let MaskedInput drive the Form\n ,\n value: formContextValue\n }, /*#__PURE__*/React.createElement(Keyboard, {\n onEsc: open ? function () {\n return closeCalendar();\n } : undefined,\n onSpace: function onSpace(event) {\n event.preventDefault();\n openCalendar();\n }\n }, /*#__PURE__*/React.createElement(Box, {\n ref: containerRef,\n border: !plain,\n round: theme.dateInput.container.round,\n direction: \"row\",\n fill: true\n }, reverse && calendarButton, /*#__PURE__*/React.createElement(MaskedInput, _extends({\n ref: ref,\n id: id,\n name: name,\n reverse: true,\n disabled: disabled,\n mask: mask,\n plain: true\n }, restOfInputProps, rest, {\n value: textValue,\n onChange: function onChange(event) {\n var nextTextValue = event.target.value;\n setTextValue(nextTextValue);\n var nextValue = textToValue(nextTextValue, schema, range, reference, outputFormat);\n var validatedNextValue = validateBounds(calendarProps == null ? void 0 : calendarProps.bounds, nextValue);\n if (!validatedNextValue && nextValue) {\n setTextValue('');\n }\n if (validatedNextValue !== undefined) setReference(getReference(validatedNextValue));\n // update value even when undefined\n setValue(validatedNextValue);\n if (_onChange) {\n event.persist(); // extract from React synthetic event pool\n var adjustedEvent = event;\n adjustedEvent.value = validatedNextValue;\n _onChange(adjustedEvent);\n }\n },\n onFocus: function onFocus(event) {\n announce(formatMessage({\n id: 'dateInput.openCalendar',\n messages: messages\n }));\n if (_onFocus) _onFocus(event);\n }\n })), !reverse && calendarButton)));\n if (inline) {\n return /*#__PURE__*/React.createElement(Box, null, input, calendar);\n }\n if (open) {\n return [input, /*#__PURE__*/React.createElement(Keyboard, {\n key: \"drop\",\n onEsc: function onEsc() {\n return ref.current.focus();\n }\n }, /*#__PURE__*/React.createElement(Drop, _extends({\n overflow: \"visible\",\n id: id ? id + \"__drop\" : undefined,\n target: containerRef.current,\n align: _extends({}, calendarDropdownAlign, dropProps),\n onEsc: closeCalendar,\n onClickOutside: function onClickOutside(_ref4) {\n var target = _ref4.target;\n if (target !== containerRef.current && !containerRef.current.contains(target)) {\n closeCalendar();\n }\n }\n }, dropProps), calendar))];\n }\n return input;\n});\nDateInput.displayName = 'DateInput';\nDateInput.propTypes = DateInputPropTypes;\nexport { DateInput };","import styled, { css } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { animationObjectStyle } from '../../utils/animation';\nvar animationItemStyle = function animationItemStyle(animationType, theme) {\n if (typeof animationType === 'string') {\n return animationObjectStyle({\n type: animationType\n }, theme, theme.diagram);\n }\n if (typeof animationType === 'object') {\n return animationObjectStyle(animationType, theme, theme.diagram);\n }\n if (typeof animationType === 'boolean') {\n return animationObjectStyle({\n type: 'draw'\n }, theme, theme.diagram);\n }\n return '';\n};\nvar animationStyle = function animationStyle(props) {\n var animationCopy = props.animation;\n if (typeof props.animation === 'object') {\n animationCopy.type = animationCopy.type || 'draw';\n }\n var animationType = animationCopy.type || animationCopy;\n if (animationType === 'draw' || animationType === true) {\n return css([\"path{stroke-dasharray:500;stroke-dashoffset:500;animation:\", \";}\"], animationItemStyle(animationCopy, props.theme));\n }\n return css([\"animation:\", \";\"], animationItemStyle(animationCopy, props.theme));\n};\nvar connectionStyle = function connectionStyle(connection, index, theme) {\n var type = connection.props.animation.type;\n if (typeof connection.props.animation === 'object') {\n type = type || 'draw';\n }\n var animationType = type || connection.props.animation;\n return css([\"path:nth-child(\", \"){stroke-dasharray:\", \";stroke-dashoffset:\", \";animation:\", \";}\"], index + 1, animationType === 'draw' || animationType === true ? 500 : 0, animationType === 'draw' || animationType === true ? 500 : 0, animationItemStyle(connection.props.animation, theme));\n};\nvar availableAnimations = [true, 'draw', 'pulse'];\nvar StyledDiagram = styled.svg.withConfig({\n displayName: \"StyledDiagram\",\n componentId: \"sc-1vzeu9f-0\"\n})([\"max-width:100%;width:100%;height:100%;\", \" \", \" \", \"\"], function (props) {\n return props.connections && props.connections.map(function (connection, index) {\n if (connection !== undefined && connection.props.animation) {\n var animation = connection.props.animation;\n // setting type to 'draw' if user doesn't specify a type\n if (typeof animation === 'object') {\n // copying 'connection' to avoid linter error\n var connectionCopy = connection;\n connectionCopy.props.animation.type = animation.type || 'draw';\n return availableAnimations.includes(animation.type || animation) ? connectionStyle(connectionCopy, index, props.theme) : '';\n }\n return connectionStyle(connection, index, props.theme);\n }\n return '';\n });\n}, function (props) {\n return props.animation && (availableAnimations.includes(props.animation.type || props.animation) || Object.keys(props.animation).length !== 0) ? animationStyle(props) : '';\n}, function (props) {\n return props.theme.diagram && props.theme.diagram.extend;\n});\nStyledDiagram.defaultProps = {};\nObject.setPrototypeOf(StyledDiagram.defaultProps, defaultProps);\nexport { StyledDiagram };","import PropTypes from 'prop-types';\nimport { colorPropType } from '../../utils/general-prop-types';\nvar animationPropType = PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['pulse', 'draw']), PropTypes.shape({\n type: PropTypes.oneOf(['pulse', 'draw']),\n delay: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n duration: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge'])\n})]);\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n animation: animationPropType,\n connections: PropTypes.arrayOf(PropTypes.shape({\n anchor: PropTypes.oneOf(['center', 'vertical', 'horizontal']),\n animation: animationPropType,\n color: colorPropType,\n fromTarget: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n label: PropTypes.string,\n // for accessibility\n offset: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large']), PropTypes.string]),\n thickness: PropTypes.oneOfType([PropTypes.oneOf(['hair', 'xxsmall', 'xsmall', 'small', 'medium', 'large']), PropTypes.string]),\n toTarget: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n type: PropTypes.oneOf(['direct', 'curved', 'rectilinear'])\n })).isRequired\n };\n}\nexport var DiagramPropTypes = PropType;","var _excluded = [\"connections\"],\n _excluded2 = [\"anchor\", \"animation\", \"color\", \"offset\", \"round\", \"thickness\", \"type\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { normalizeColor, parseMetricToNum, useForwardedRef } from '../../utils';\nimport { StyledDiagram } from './StyledDiagram';\nimport { DiagramPropTypes } from './propTypes';\nvar computeMidPoint = function computeMidPoint(fromPoint, toPoint) {\n return [fromPoint[0] > toPoint[0] ? toPoint[0] + (fromPoint[0] - toPoint[0]) / 2 : fromPoint[0] + (toPoint[0] - fromPoint[0]) / 2, fromPoint[1] > toPoint[1] ? toPoint[1] + (fromPoint[1] - toPoint[1]) / 2 : fromPoint[1] + (toPoint[1] - fromPoint[1]) / 2];\n};\nvar COMMANDS = {\n curved: function curved(fromPoint, toPoint, offset, anchor) {\n var midPoint = computeMidPoint(fromPoint, toPoint);\n var cmds = \"M \" + (fromPoint[0] + offset) + \",\" + (fromPoint[1] + offset) + \" \";\n if (anchor === 'horizontal') {\n cmds += \"Q \" + (midPoint[0] + offset) + \",\" + (fromPoint[1] + offset) + \" \" + (midPoint[0] + offset + \",\" + (midPoint[1] + offset) + \" \");\n } else {\n cmds += \"Q \" + (fromPoint[0] + offset) + \",\" + (midPoint[1] + offset) + \" \" + (midPoint[0] + offset + \",\" + (midPoint[1] + offset) + \" \");\n }\n cmds += \"T \" + (toPoint[0] + offset) + \",\" + (toPoint[1] + offset);\n return cmds;\n },\n direct: function direct(fromPoint, toPoint, offset) {\n return \"M \" + (fromPoint[0] + offset) + \",\" + (fromPoint[1] + offset) + \" \" + (\"L \" + (toPoint[0] + offset) + \",\" + (toPoint[1] + offset));\n },\n rectilinear: function rectilinear(fromPoint, toPoint, offset, anchor) {\n var midPoint = computeMidPoint(fromPoint, toPoint);\n var cmds = \"M \" + (fromPoint[0] + offset) + \",\" + (fromPoint[1] + offset) + \" \";\n if (anchor === 'horizontal') {\n cmds += \"L \" + (midPoint[0] + offset) + \",\" + (fromPoint[1] + offset) + \" \" + (\"L \" + (midPoint[0] + offset) + \",\" + (toPoint[1] + offset) + \" \");\n } else {\n cmds += \"L \" + (fromPoint[0] + offset) + \",\" + (midPoint[1] + offset) + \" \" + (\"L \" + (toPoint[0] + offset) + \",\" + (midPoint[1] + offset) + \" \");\n }\n cmds += \"L \" + (toPoint[0] + offset) + \",\" + (toPoint[1] + offset);\n return cmds;\n }\n};\nvar findTarget = function findTarget(target) {\n if (typeof target === 'string') {\n return document.getElementById(target);\n }\n return target;\n};\nvar Diagram = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var connections = _ref.connections,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState({\n width: 0,\n height: 0\n }),\n dimensions = _useState[0],\n setDimensions = _useState[1];\n var _useState2 = useState(),\n connectionPoints = _useState2[0],\n setConnectionPoints = _useState2[1];\n var svgRef = useForwardedRef(ref);\n useEffect(function () {\n setConnectionPoints(undefined);\n }, [connections]);\n var onResize = useCallback(function () {\n var svg = svgRef.current;\n if (svg) {\n var rect = svg.getBoundingClientRect();\n if (rect.width !== dimensions.width || rect.height !== dimensions.height) {\n setDimensions({\n width: rect.width,\n height: rect.height\n });\n setConnectionPoints(undefined);\n }\n }\n }, [dimensions.width, dimensions.height, svgRef]);\n\n // Ref that stores resize handler\n var savedOnResize = useRef();\n\n // Update resize ref value if onResize changes.\n // This allows our effect below to always get latest handler\n useEffect(function () {\n savedOnResize.current = onResize;\n }, [onResize]);\n useEffect(function () {\n var onResizeHandler = function onResizeHandler(event) {\n return savedOnResize.current(event);\n };\n onResizeHandler();\n window.addEventListener('resize', onResizeHandler);\n return function () {\n window.removeEventListener('resize', onResizeHandler);\n };\n }, []);\n var placeConnections = useCallback(function () {\n var containerRect = svgRef.current.getBoundingClientRect();\n var updatedConnectionPoints = connections.map(function (_ref2) {\n var anchor = _ref2.anchor,\n fromTarget = _ref2.fromTarget,\n toTarget = _ref2.toTarget;\n var points;\n var fromElement = findTarget(fromTarget);\n var toElement = findTarget(toTarget);\n if (!fromElement) {\n console.warn(\"Diagram cannot find \" + fromTarget);\n }\n if (!toElement) {\n console.warn(\"Diagram cannot find \" + toTarget);\n }\n if (fromElement && toElement) {\n var fromRect = fromElement.getBoundingClientRect();\n var toRect = toElement.getBoundingClientRect();\n // There is no x and y when unit testing.\n var fromPoint = [fromRect.left - containerRect.left || 0, fromRect.top - containerRect.top || 0];\n var toPoint = [toRect.left - containerRect.left || 0, toRect.top - containerRect.top || 0];\n if (anchor === 'vertical') {\n fromPoint[0] += fromRect.width / 2;\n toPoint[0] += toRect.width / 2;\n if (fromRect.top < toRect.top) {\n fromPoint[1] += fromRect.height;\n } else {\n toPoint[1] += toRect.height;\n }\n } else if (anchor === 'horizontal') {\n fromPoint[1] += fromRect.height / 2;\n toPoint[1] += toRect.height / 2;\n if (fromRect.left < toRect.left) {\n fromPoint[0] += fromRect.width;\n } else {\n toPoint[0] += toRect.width;\n }\n } else {\n // center\n fromPoint[0] += fromRect.width / 2;\n fromPoint[1] += fromRect.height / 2;\n toPoint[0] += toRect.width / 2;\n toPoint[1] += toRect.height / 2;\n }\n points = [fromPoint, toPoint];\n }\n return points;\n });\n setConnectionPoints(updatedConnectionPoints);\n }, [connections, svgRef]);\n useEffect(function () {\n if (!connectionPoints) {\n placeConnections();\n }\n }, [connectionPoints, placeConnections]);\n var paths;\n if (connectionPoints) {\n paths = connections.map(function (_ref3, index) {\n var anchor = _ref3.anchor,\n animation = _ref3.animation,\n color = _ref3.color,\n offset = _ref3.offset,\n round = _ref3.round,\n thickness = _ref3.thickness,\n type = _ref3.type,\n connectionRest = _objectWithoutPropertiesLoose(_ref3, _excluded2);\n var path;\n var cleanedRest = _extends({}, connectionRest);\n delete cleanedRest.fromTarget;\n delete cleanedRest.toTarget;\n var points = connectionPoints[index];\n if (points) {\n var offsetWidth = offset ? parseMetricToNum(theme.global.edgeSize[offset]) : 0;\n var d = COMMANDS[type || 'curved'](points[0], points[1], offsetWidth, anchor);\n var strokeWidth = thickness ? parseMetricToNum(theme.global.edgeSize[thickness] || thickness) : 1;\n var colorName = color || theme.diagram.line && theme.diagram.line.color;\n if (!colorName) {\n var colors = Object.keys(theme.global.colors).filter(function (n) {\n return n.match(/^graph-[0-9]$/);\n });\n colorName = colors[index % colors.length];\n }\n path = /*#__PURE__*/React.createElement(\"path\", _extends({\n // eslint-disable-next-line react/no-array-index-key\n key: index\n // eslint-disable-next-line react/no-unknown-property\n ,\n animation: animation\n }, cleanedRest, {\n stroke: normalizeColor(colorName, theme),\n strokeWidth: strokeWidth,\n strokeLinecap: round ? 'round' : 'butt',\n strokeLinejoin: round ? 'round' : 'miter',\n fill: \"none\",\n d: d\n }));\n }\n return path;\n });\n }\n return /*#__PURE__*/React.createElement(StyledDiagram, _extends({\n ref: svgRef,\n viewBox: \"0 0 \" + dimensions.width + \" \" + dimensions.height,\n preserveAspectRatio: \"xMinYMin meet\",\n connections: paths\n }, rest), /*#__PURE__*/React.createElement(\"g\", null, paths));\n});\nDiagram.displayName = 'Diagram';\nDiagram.defaultProps = {\n connections: []\n};\nDiagram.propTypes = DiagramPropTypes;\nexport { Diagram };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n basis: PropTypes.oneOfType([PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', 'full', '1/2', '1/3', '2/3', '1/4', '2/4', '3/4', 'auto']), PropTypes.string]),\n children: PropTypes.func,\n fill: PropTypes.bool,\n gap: PropTypes.oneOfType([PropTypes.oneOf(['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n values: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.number\n })).isRequired\n });\n}\nexport var DistributionPropTypes = PropType;","var _excluded = [\"basis\", \"children\", \"direction\", \"fill\", \"gap\", \"values\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { DistributionPropTypes } from './propTypes';\nvar Value = function Value(_ref) {\n var basis = _ref.basis,\n children = _ref.children;\n return /*#__PURE__*/React.createElement(Box, {\n basis: basis,\n flex: \"shrink\",\n overflow: \"hidden\"\n }, children);\n};\nValue.propTypes = {\n basis: PropTypes.string.isRequired,\n children: PropTypes.node.isRequired\n};\nvar Distribution = function Distribution(_ref2) {\n var basis = _ref2.basis,\n children = _ref2.children,\n direction = _ref2.direction,\n fill = _ref2.fill,\n gap = _ref2.gap,\n values = _ref2.values,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n if (values.length === 1) {\n var value = values[0];\n return /*#__PURE__*/React.createElement(Value, {\n value: value,\n basis: basis\n }, children(value));\n }\n if (values.length > 1) {\n var reducer = function reducer(accumulator, _ref3) {\n var value = _ref3.value;\n return accumulator + (value || 0);\n };\n var total = values.filter(function (v) {\n return Object.prototype.hasOwnProperty.call(v, 'value');\n }).reduce(reducer, 0);\n\n // figure out how many of the values area needed to represent half of the\n // total\n var subTotal = 0;\n var subIndex;\n values.some(function (v, index) {\n subTotal += Object.prototype.hasOwnProperty.call(v, 'value') && v.value || 0;\n if (subTotal >= total * 0.4) {\n subIndex = index + 1;\n return true;\n }\n return false;\n });\n if (subIndex === values.length) {\n var _value = values[0];\n return /*#__PURE__*/React.createElement(Value, {\n value: _value,\n basis: basis\n }, children(_value));\n }\n var childBasis;\n if (subTotal === 0) {\n childBasis = ['0px', '0px'];\n } else if (subTotal === total) {\n childBasis = ['full', '0px'];\n } else if (subTotal > total * 0.7) {\n childBasis = ['3/4', '1/4'];\n } else if (subTotal > total * 0.6) {\n childBasis = ['2/3', '1/3'];\n } else {\n childBasis = ['1/2', '1/2'];\n }\n return /*#__PURE__*/React.createElement(Box, _extends({\n direction: direction,\n basis: basis,\n flex: basis ? 'shrink' : true,\n overflow: \"hidden\",\n gap: gap,\n fill: fill\n }, rest), /*#__PURE__*/React.createElement(Distribution, {\n values: values.slice(0, subIndex),\n basis: childBasis[0],\n direction: direction === 'row' ? 'column' : 'row',\n gap: gap\n }, children), /*#__PURE__*/React.createElement(Distribution, {\n values: values.slice(subIndex),\n basis: childBasis[1],\n direction: direction === 'row' ? 'column' : 'row',\n gap: gap\n }, children));\n }\n return null;\n};\nDistribution.defaultProps = {\n basis: undefined,\n children: function children(value) {\n return /*#__PURE__*/React.createElement(Box, {\n fill: true,\n border: true\n }, /*#__PURE__*/React.createElement(Text, null, value.value));\n },\n direction: 'row',\n gap: 'xsmall',\n values: []\n};\nDistribution.propTypes = DistributionPropTypes;\nexport { Distribution };","import styled from 'styled-components';\nimport { inputStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar StyledFileInput = styled.input.withConfig({\n displayName: \"StyledFileInput\",\n componentId: \"sc-rl7ywv-0\"\n})([\"position:absolute;height:100%;width:100%;\", \" font-size:0;opacity:0;border:none;\", \" \", \" &::-moz-focus-inner{border:none;outline:none;}&::-webkit-file-upload-button{cursor:pointer;}\"], inputStyle, function (props) {\n return !props.disabled && 'cursor: pointer;';\n}, function (props) {\n return props.rightOffset && \"\\n width: calc(100% - \" + props.rightOffset + \"px);\\n right: \" + props.rightOffset + \"px;\\n \";\n});\nStyledFileInput.defaultProps = {};\nObject.setPrototypeOf(StyledFileInput.defaultProps, defaultProps);\nexport { StyledFileInput };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n confirmRemove: PropTypes.func,\n disabled: PropTypes.bool,\n id: PropTypes.string,\n messages: PropTypes.shape({\n browse: PropTypes.string,\n dropPrompt: PropTypes.string,\n dropPromptMultiple: PropTypes.string,\n files: PropTypes.string,\n remove: PropTypes.string,\n removeAll: PropTypes.string\n }),\n multiple: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n aggregateThreshold: PropTypes.number\n })]),\n name: PropTypes.string,\n onChange: PropTypes.func,\n renderFile: PropTypes.func\n };\n}\nexport var FileInputPropTypes = PropType;","var SI_CONVERSION_FACTOR = 1000;\nvar IEC_CONVERSION_FACTOR = 1024;\nvar getCurrentOS = function getCurrentOS() {\n var currentOS = ['Win', 'Linux', 'Mac'].find(function (v) {\n var _window;\n if (typeof window !== 'undefined') return ((_window = window) == null || (_window = _window.navigator) == null || (_window = _window.userAgent) == null ? void 0 : _window.indexOf(v)) >= 0;\n return undefined;\n });\n return currentOS;\n};\nvar defaultFormat = function defaultFormat(size) {\n var units = ['B', 'KB', 'MB', 'GB', 'TB'];\n var factor = SI_CONVERSION_FACTOR;\n var index = 0;\n var num = size;\n while (num >= factor && index < units.length - 1) {\n num /= factor;\n index += 1;\n }\n return num.toFixed(1) + \" \" + units[index];\n};\nvar windowsFormat = function windowsFormat(size) {\n var num = Math.ceil(size / IEC_CONVERSION_FACTOR);\n return Intl.NumberFormat().format(num) + \" KB\";\n};\nvar makeFormatBytes = function makeFormatBytes(OS) {\n return function (size) {\n switch (OS) {\n case 'Win':\n return windowsFormat(size);\n default:\n return defaultFormat(size);\n }\n };\n};\nvar formatBytes = makeFormatBytes(getCurrentOS());\nexport { formatBytes };","var _excluded = [\"a11yTitle\", \"background\", \"border\", \"confirmRemove\", \"disabled\", \"id\", \"plain\", \"renderFile\", \"maxSize\", \"messages\", \"margin\", \"multiple\", \"name\", \"onChange\", \"pad\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { CircleAlert } from 'grommet-icons/icons/CircleAlert';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { defaultProps } from '../../default-props';\nimport { disabledStyle, focusStyle, parseMetricToNum, unfocusStyle, useForwardedRef, useKeyboard } from '../../utils';\nimport { Anchor } from '../Anchor';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { FormContext } from '../Form/FormContext';\nimport { Keyboard } from '../Keyboard';\nimport { Text } from '../Text';\nimport { StyledFileInput } from './StyledFileInput';\nimport { FileInputPropTypes } from './propTypes';\nimport { formatBytes } from './utils/formatBytes';\n// We want the interaction of but none of its styling.\n// So, we put what we want to show underneath and\n// position the on top with an opacity of zero.\n// If there are any files selected, we need to show the buttons to remove them.\n// So, we offset the from the right by the appropriate width.\n// We don't use Stack because of how we need to control the positioning.\n\nvar ContentsBox = styled(Box).withConfig({\n displayName: \"FileInput__ContentsBox\",\n componentId: \"sc-1jzq7im-0\"\n})([\"cursor:pointer;position:relative;\", \" \", \";\", \";\", \";\", \";\", \";\"], function (props) {\n return props.disabled && disabledStyle();\n}, function (props) {\n return props.theme.fileInput && props.theme.fileInput.extend;\n}, function (props) {\n return props.hover && props.theme.fileInput && props.theme.fileInput.hover && props.theme.fileInput.hover.extend;\n}, function (props) {\n return props.dragOver && props.theme.fileInput && props.theme.fileInput.dragOver && props.theme.fileInput.dragOver.extend;\n}, function (props) {\n return props.focus && focusStyle();\n}, function (props) {\n return !props.focus && unfocusStyle();\n});\nvar Label = styled(Text).withConfig({\n displayName: \"FileInput__Label\",\n componentId: \"sc-1jzq7im-1\"\n})([\"\", \";\"], function (props) {\n return props.theme.fileInput && props.theme.fileInput.label && props.theme.fileInput.label.extend;\n});\nvar Message = styled(Text).withConfig({\n displayName: \"FileInput__Message\",\n componentId: \"sc-1jzq7im-2\"\n})([\"\", \";\"], function (props) {\n return props.theme.fileInput && props.theme.fileInput.message && props.theme.fileInput.message.extend;\n});\nvar defaultPendingRemoval = {\n event: undefined,\n index: undefined\n};\nvar FileInput = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n background = _ref.background,\n border = _ref.border,\n confirmRemove = _ref.confirmRemove,\n disabled = _ref.disabled,\n id = _ref.id,\n plain = _ref.plain,\n renderFile = _ref.renderFile,\n maxSize = _ref.maxSize,\n messages = _ref.messages,\n margin = _ref.margin,\n multiple = _ref.multiple,\n name = _ref.name,\n _onChange = _ref.onChange,\n pad = _ref.pad,\n valueProp = _ref.value,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext);\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var formContext = useContext(FormContext);\n var _React$useState = React.useState(),\n hover = _React$useState[0],\n setHover = _React$useState[1];\n var _React$useState2 = React.useState(),\n dragOver = _React$useState2[0],\n setDragOver = _React$useState2[1];\n var _React$useState3 = React.useState(),\n focus = _React$useState3[0],\n setFocus = _React$useState3[1];\n var _useState = useState(false),\n showRemoveConfirmation = _useState[0],\n setShowRemoveConfirmation = _useState[1];\n var _useState2 = useState(defaultPendingRemoval),\n pendingRemoval = _useState2[0],\n setPendingRemoval = _useState2[1];\n var aggregateThreshold = multiple && multiple.aggregateThreshold || 10;\n var max = multiple == null ? void 0 : multiple.max;\n var inputRef = useForwardedRef(ref);\n var controlRef = useRef();\n var removeRef = useRef();\n var ConfirmRemove = confirmRemove;\n var RemoveIcon = theme.fileInput.icons.remove;\n var usingKeyboard = useKeyboard();\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp,\n initialValue: [],\n validate: [maxSize ? function () {\n var fileList = [].concat(files);\n var message = '';\n var numOfInvalidFiles = fileList.filter(function (_ref2) {\n var size = _ref2.size;\n return size > maxSize;\n }).length;\n if (numOfInvalidFiles) {\n var messageId = 'fileInput.maxSizeSingle';\n if (multiple) {\n messageId = \"fileInput.maxSizeMultiple.\" + (numOfInvalidFiles === 1 ? 'singular' : 'plural');\n }\n message = format({\n id: messageId,\n messages: messages,\n values: {\n maxSize: formatBytes(maxSize),\n numOfFiles: numOfInvalidFiles\n }\n });\n }\n return message;\n } : '', max ? function () {\n var fileList = [].concat(files);\n var message = '';\n if (fileList.length > max) {\n message = format({\n id: 'fileInput.maxFile',\n messages: messages,\n values: {\n max: max\n }\n });\n }\n return message;\n } : '']\n }),\n files = _formContext$useFormI[0],\n setFiles = _formContext$useFormI[1];\n var mergeTheme = function mergeTheme(propertyName, defaultKey) {\n var result = {};\n var themeProp = theme.fileInput[propertyName];\n if (themeProp) if (typeof themeProp !== 'object') {\n if (defaultKey) result[defaultKey] = themeProp;else result = themeProp;\n } else result = _extends({}, themeProp);\n var hoverThemeProp = theme.fileInput.hover[propertyName];\n if (hover && hoverThemeProp) if (typeof hoverThemeProp !== 'object') {\n if (defaultKey) result[defaultKey] = hoverThemeProp;else result = hoverThemeProp;\n } else result = _extends({}, result, hoverThemeProp);\n var dragOverThemeProp = theme.fileInput.dragOver[propertyName];\n if (dragOver && dragOverThemeProp) if (typeof dragOverThemeProp !== 'object') {\n if (defaultKey) result[defaultKey] = dragOverThemeProp;else result = dragOverThemeProp;\n } else result = _extends({}, result, dragOverThemeProp);\n return typeof result === 'object' && Object.keys(result).length === 0 ? undefined : result;\n };\n var rightPad;\n if (mergeTheme('pad')) {\n var _mergeTheme = mergeTheme('pad'),\n horizontal = _mergeTheme.horizontal,\n right = _mergeTheme.right;\n if (right) {\n rightPad = theme.global.edgeSize[right] || right;\n } else if (horizontal) {\n rightPad = theme.global.edgeSize[horizontal] || horizontal;\n }\n }\n\n // rightPad needs to be included in the rightOffset\n // otherwise input may cover the RemoveButton, making it\n // unreachable by mouse click.\n // If browse anchor or button is greater than remove button then\n // rightoffset will take the larger width\n var rightOffset;\n if (removeRef.current && controlRef.current) {\n var rightOffsetBrowse = controlRef.current.getBoundingClientRect().width;\n var rightOffsetRemove = removeRef.current.getBoundingClientRect().width;\n if (rightPad && typeof rightPad === 'string') rightOffset = rightOffsetRemove + parseMetricToNum(rightPad);\n if (files.length === 1 || files.length > aggregateThreshold) {\n rightOffset = rightOffsetBrowse + rightOffsetRemove + parseMetricToNum(theme.global.edgeSize.small) * 2;\n } else if (rightOffsetBrowse > rightOffsetRemove) {\n rightOffset = rightOffsetBrowse + parseMetricToNum(theme.global.edgeSize.small) * 2;\n } else rightOffset = rightOffsetRemove;\n } else if (!files.length && controlRef.current) {\n rightOffset = controlRef.current.getBoundingClientRect().width + parseMetricToNum(theme.global.edgeSize.small) * 2;\n }\n\n // Show the number of files when more than one\n\n var message;\n if (!files.length) {\n message = format({\n id: multiple ? 'fileInput.dropPromptMultiple' : 'fileInput.dropPrompt',\n messages: messages\n });\n } else message = files.length + \" items\";\n var removeFile = function removeFile(index) {\n var nextFiles;\n if (index === 'all') {\n nextFiles = [];\n } else {\n nextFiles = [].concat(files);\n nextFiles.splice(index, 1);\n }\n setFiles(nextFiles);\n\n // Need to have a way to track the files other than an array\n // since inputRef.current.files is a read-only FileList\n // https://stackoverflow.com/a/64019766\n /* eslint-disable no-undef */\n var dt = new DataTransfer();\n var curFiles = inputRef.current.files;\n if (index === 'all' || nextFiles.length === 0) inputRef.current.value = '';\n for (var i = 0; i < curFiles.length; i += 1) {\n var curfile = curFiles[i];\n if (index !== i) dt.items.add(curfile);\n }\n var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'files').set;\n nativeInputValueSetter.call(inputRef.current, dt.files);\n var event = new Event('input', {\n bubbles: true\n });\n inputRef.current.dispatchEvent(event);\n if (_onChange) _onChange(event, {\n files: nextFiles\n });\n inputRef.current.focus();\n };\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ContentsBox, {\n theme: theme,\n flex: false,\n disabled: disabled,\n background: mergeTheme('background', 'color'),\n border: !plain ? mergeTheme('border', 'side') : undefined,\n margin: mergeTheme('margin'),\n pad: mergeTheme('pad'),\n round: mergeTheme('round', 'size'),\n align: files.length ? 'stretch' : 'center',\n justify: \"center\",\n hover: hover,\n onMouseOver: disabled ? undefined : function () {\n return setHover(true);\n },\n onMouseOut: disabled ? undefined : function () {\n return setHover(false);\n },\n dragOver: dragOver,\n focus: usingKeyboard && focus\n }, /*#__PURE__*/React.createElement(StyledFileInput, _extends({\n ref: inputRef,\n type: \"file\",\n id: id,\n name: name,\n maxSize: maxSize,\n multiple: multiple,\n disabled: disabled,\n plain: true,\n rightOffset: rightOffset\n }, rest, {\n onDragOver: function onDragOver() {\n return setDragOver(true);\n },\n onDragLeave: function onDragLeave() {\n return setDragOver(false);\n },\n onChange: function onChange(event) {\n event.persist();\n var fileList = event.target.files;\n var nextFiles = multiple ? [].concat(files) : [];\n var _loop = function _loop(i) {\n // avoid duplicates\n var existing = nextFiles.filter(function (file) {\n return file.name === fileList[i].name && file.size === fileList[i].size;\n }).length > 0;\n if (!existing) {\n nextFiles.push(fileList[i]);\n }\n };\n for (var i = 0; i < fileList.length; i += 1) {\n _loop(i);\n }\n setFiles(nextFiles);\n setDragOver(false);\n if (_onChange) _onChange(event, {\n files: nextFiles\n });\n },\n onBlur: function onBlur() {\n return setFocus(false);\n },\n onFocus: function onFocus() {\n return setFocus(true);\n }\n })), (!files.length || files.length > 1) && /*#__PURE__*/React.createElement(Box, {\n align: \"center\",\n fill: \"horizontal\",\n direction: \"row\",\n justify: \"between\"\n }, files.length <= aggregateThreshold && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Message, theme.fileInput.message, message), /*#__PURE__*/React.createElement(Keyboard, {\n onSpace: function onSpace(event) {\n event.preventDefault();\n if (controlRef.current === event.target) inputRef.current.click();\n },\n onEnter: function onEnter(event) {\n if (controlRef.current === event.target) inputRef.current.click();\n }\n }, theme.fileInput.button ? /*#__PURE__*/React.createElement(Button\n // The focus here is redundant for keyboard users\n , {\n tabIndex: -1,\n ref: controlRef,\n kind: theme.fileInput.button,\n label: format({\n id: 'fileInput.browse',\n messages: messages\n }),\n onClick: function onClick() {\n inputRef.current.click();\n inputRef.current.focus();\n }\n }) : /*#__PURE__*/React.createElement(Anchor\n // The focus here is redundant for keyboard users\n , {\n tabIndex: -1,\n alignSelf: \"center\",\n ref: controlRef,\n margin: \"small\",\n onClick: function onClick() {\n inputRef.current.click();\n inputRef.current.focus();\n },\n label: format({\n id: 'fileInput.browse',\n messages: messages\n })\n })))), files.length > aggregateThreshold && /*#__PURE__*/React.createElement(Box, {\n justify: \"between\",\n direction: \"row\",\n align: \"center\"\n }, /*#__PURE__*/React.createElement(Label, theme.fileInput.label, files.length, ' ', format({\n id: 'fileInput.files',\n messages: messages\n })), /*#__PURE__*/React.createElement(Box, {\n flex: false,\n direction: \"row\",\n align: \"center\"\n }, /*#__PURE__*/React.createElement(Button, {\n ref: removeRef,\n a11yTitle: format({\n id: 'fileInput.removeAll',\n messages: messages\n }),\n icon: /*#__PURE__*/React.createElement(RemoveIcon, null),\n hoverIndicator: true,\n onClick: function onClick(event) {\n if (confirmRemove) {\n event.persist(); // necessary for when React < v17\n setPendingRemoval({\n event: event,\n index: 'all'\n });\n setShowRemoveConfirmation(true);\n } else removeFile('all');\n }\n }), /*#__PURE__*/React.createElement(Keyboard, {\n onSpace: function onSpace(event) {\n if (controlRef.current === event.target) inputRef.current.click();\n },\n onEnter: function onEnter(event) {\n if (controlRef.current === event.target) inputRef.current.click();\n }\n }, theme.fileInput.button ? /*#__PURE__*/React.createElement(Button\n // The focus here is redundant for keyboard users\n , {\n tabIndex: -1,\n ref: controlRef,\n kind: theme.fileInput.button,\n label: format({\n id: 'fileInput.browse',\n messages: messages\n }),\n onClick: function onClick() {\n inputRef.current.click();\n inputRef.current.focus();\n }\n }) : /*#__PURE__*/React.createElement(Anchor\n // The focus here is redundant for keyboard users\n , {\n tabIndex: -1,\n alignSelf: \"center\",\n ref: controlRef,\n margin: \"small\",\n onClick: function onClick() {\n inputRef.current.click();\n inputRef.current.focus();\n },\n label: format({\n id: 'fileInput.browse',\n messages: messages\n })\n })))), files.length > 0 && files.length <= aggregateThreshold && files.map(function (file, index) {\n return /*#__PURE__*/React.createElement(Box, {\n key: file.name,\n justify: \"between\",\n direction: \"row\",\n align: \"center\"\n }, renderFile ? renderFile(file) : /*#__PURE__*/React.createElement(Box, _extends({}, theme.fileInput.label, {\n gap: \"xsmall\",\n align: \"center\",\n direction: \"row\"\n }), (maxSize && file.size > maxSize || max && index >= max) && /*#__PURE__*/React.createElement(CircleAlert, null), /*#__PURE__*/React.createElement(Label, {\n weight: theme.global.input.weight || theme.global.input.font.weight,\n truncate: true\n }, file.name)), /*#__PURE__*/React.createElement(Box, {\n flex: false,\n direction: \"row\",\n align: \"center\"\n }, /*#__PURE__*/React.createElement(Button, {\n ref: index ? undefined : removeRef,\n a11yTitle: format({\n id: 'fileInput.remove',\n messages: messages\n }) + \" \" + file.name,\n icon: /*#__PURE__*/React.createElement(RemoveIcon, null),\n hoverIndicator: true,\n onClick: function onClick(event) {\n if (confirmRemove) {\n event.persist(); // necessary for when React < v17\n setPendingRemoval({\n event: event,\n index: index\n });\n setShowRemoveConfirmation(true);\n } else removeFile(index);\n }\n }), files.length === 1 && /*#__PURE__*/React.createElement(Keyboard, {\n onSpace: function onSpace(event) {\n if (controlRef.current === event.target) inputRef.current.click();\n },\n onEnter: function onEnter(event) {\n if (controlRef.current === event.target) inputRef.current.click();\n }\n }, theme.fileInput.button ? /*#__PURE__*/React.createElement(Button\n // The focus here is redundant for keyboard users\n , {\n tabIndex: -1,\n ref: controlRef,\n kind: theme.fileInput.button,\n label: format({\n id: 'fileInput.browse',\n messages: messages\n }),\n onClick: function onClick() {\n inputRef.current.click();\n inputRef.current.focus();\n }\n }) : /*#__PURE__*/React.createElement(Anchor\n // The focus here is redundant for keyboard users\n , {\n tabIndex: -1,\n ref: controlRef,\n margin: \"small\",\n onClick: function onClick() {\n inputRef.current.click();\n inputRef.current.focus();\n },\n label: format({\n id: 'fileInput.browse',\n messages: messages\n })\n }))));\n })), showRemoveConfirmation && /*#__PURE__*/React.createElement(ConfirmRemove, {\n onConfirm: function onConfirm() {\n removeFile(pendingRemoval.index);\n setPendingRemoval(defaultPendingRemoval);\n setShowRemoveConfirmation(false);\n },\n onCancel: function onCancel() {\n return setShowRemoveConfirmation(false);\n }\n }));\n});\nFileInput.defaultProps = {};\nObject.setPrototypeOf(FileInput.defaultProps, defaultProps);\nFileInput.displayName = 'FileInput';\nFileInput.propTypes = FileInputPropTypes;\nexport { FileInput };","import { css } from 'styled-components';\nimport { deepFreeze } from '../utils/object';\nexport var grommet = deepFreeze({\n global: {\n colors: {\n background: {\n light: '#ffffff',\n dark: '#000000'\n }\n },\n backgrounds: {\n stack: {\n color: 'light-1',\n image: \"url(https://v2.grommet.io/img/stak-hurrah.svg)\"\n },\n 'gradient-purple-blue': {\n color: 'neutral-3',\n image: \"linear-gradient(\\n #3D138D 0%, /* neutral-2 */\\n #00739D 100% /* neutral-3 */\\n );\",\n rotate: 145\n },\n 'gradient-purple-gold': {\n color: 'neutral-2',\n image: \"linear-gradient(\\n #3D138D 0%, /* neutral-2 */\\n #EB0F79 75%,\\n #FFCA58 100% /* accent-4 */\\n );\"\n }\n },\n font: {\n family: \"-apple-system,\\n BlinkMacSystemFont, \\n \\\"Segoe UI\\\", \\n Roboto, \\n Oxygen, \\n Ubuntu, \\n Cantarell, \\n \\\"Fira Sans\\\", \\n \\\"Droid Sans\\\", \\n \\\"Helvetica Neue\\\", \\n Arial, sans-serif, \\n \\\"Apple Color Emoji\\\", \\n \\\"Segoe UI Emoji\\\", \\n \\\"Segoe UI Symbol\\\"\"\n }\n },\n button: {\n extend: css([\"\", \"\"], function (props) {\n return !props.plain && 'font-weight: bold;';\n })\n }\n});","import { css } from 'styled-components';\nimport { deepFreeze } from '../utils/object';\nimport { normalizeColor } from '../utils/colors';\nvar accentColors = ['#FD6FFF', '#60EB9F', '#60EBE1', '#FFCA58'];\nvar neutralColors = ['#EB6060', '#01C781', '#6095EB', '#FFB200'];\nvar statusColors = {\n critical: '#FF3333',\n error: '#FF3333',\n warning: '#F7E464',\n ok: '#7DD892',\n unknown: '#a8a8a8',\n disabled: '#a8a8a8'\n};\nvar backgroundColor = '#111111';\nvar colors = {\n active: 'rgba(102, 102, 102, 0.5)',\n background: backgroundColor,\n black: '#000000',\n brand: '#FD6FFF',\n control: {\n dark: '#FFCA58',\n light: '#403216'\n },\n focus: '#FFCA58',\n icon: {\n dark: '#f8f8f8',\n light: '#666666'\n },\n placeholder: '#AAAAAA',\n text: {\n dark: '#eeeeee',\n light: '#444444'\n },\n white: '#FFFFFF'\n};\nvar colorArray = function colorArray(array, prefix) {\n return array.forEach(function (color, index) {\n colors[prefix + \"-\" + (index + 1)] = color;\n });\n};\ncolorArray(accentColors, 'accent');\ncolorArray(neutralColors, 'neutral');\nObject.keys(statusColors).forEach(function (color) {\n colors[\"status-\" + color] = statusColors[color];\n});\nexport var dark = deepFreeze({\n global: {\n colors: colors,\n drop: {\n background: '#333333'\n },\n focus: {\n border: {\n color: css([\"\", \";\"], function (props) {\n return normalizeColor('focus', props.theme);\n }),\n width: '2px'\n }\n },\n font: {\n family: 'Arial'\n },\n input: {\n weight: 700\n }\n },\n anchor: {\n color: 'control'\n },\n layer: {\n background: backgroundColor,\n overlay: {\n background: 'rgba(48, 48, 48, 0.5)'\n }\n }\n});","import { css } from 'styled-components';\nimport { deepFreeze } from '../utils/object';\nexport var hacktoberfest2022 = deepFreeze({\n defaultMode: 'dark',\n global: {\n colors: {\n background: '#160F1D',\n 'background-back': '#000000',\n 'background-front': '#160F1D',\n 'text-strong': '#FFFFFF',\n text: '#E4E1E6',\n 'text-weak': '#76717A',\n grey: '#AFACB2',\n lime: '#C6FC60',\n pink: '#D856A7',\n purple: '#7C7EF4',\n teal: '#73DAFB',\n yellow: '#EDD063',\n darkPurple: '#291E40',\n active: 'purple',\n focus: '#233670',\n brand: 'lime',\n control: 'teal',\n 'graph-0': 'yellow',\n 'graph-1': 'purple',\n 'graph-2': 'teal',\n 'graph-3': 'pink',\n 'graph-4': 'lime',\n // clear unused colors\n icon: undefined,\n 'accent-1': undefined,\n 'accent-2': undefined,\n 'accent-3': undefined,\n 'accent-4': undefined,\n 'neutral-1': undefined,\n 'neutral-2': undefined,\n 'neutral-3': undefined,\n 'neutral-4': undefined,\n 'neutral-5': undefined,\n 'light-1': undefined,\n 'light-2': undefined,\n 'light-3': undefined,\n 'light-4': undefined,\n 'light-5': undefined,\n 'light-6': undefined,\n 'dark-1': undefined,\n 'dark-2': undefined,\n 'dark-3': undefined,\n 'dark-4': undefined,\n 'dark-5': undefined,\n 'dark-6': undefined\n },\n backgrounds: {\n 'gradient-purple-teal': {\n image: \"linear-gradient(\\n #7C7EF4 0%,\\n #73DAFB 100%\\n );\"\n },\n 'gradient-teal-purple': {\n image: \"linear-gradient(\\n #73DAFB 0%,\\n #7C7EF4 100%\\n );\"\n },\n 'gradient-yellow-teal-purple': {\n image: \"linear-gradient(\\n #EDD063 0%,\\n #73DAFB 50%,\\n #7C7EF4 100%\\n );\",\n rotate: 90\n },\n 'gradient-yellow-teal': {\n image: \"linear-gradient(\\n #EDD063 0%,\\n #73DAFB 100%\\n );\",\n rotate: 90\n }\n },\n focus: {\n shadow: {\n color: 'focus',\n size: '3px'\n }\n },\n font: {\n family: '\"JetBrains Mono\", monospace',\n face: \"/* latin */\\n@font-face {\\n font-family: 'JetBrains Mono';\\n font-style: normal;\\n font-weight: 400;\\n src: url(https://fonts.gstatic.com/s/jetbrainsmono/v13/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOlOTk6OThhvA.woff) format('woff');\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\\n}\"\n }\n },\n grommet: {\n extend: css([\"text-transform:uppercase;\"])\n },\n anchor: {\n color: 'text',\n hover: {\n color: 'text-strong'\n }\n },\n button: {\n border: {\n width: '0px',\n radius: '0px'\n },\n padding: {\n horizontal: '20px',\n vertical: '10px'\n },\n color: 'text-strong',\n size: {\n small: {\n pad: {\n horizontal: '16px',\n vertical: '8px'\n }\n },\n medium: {\n pad: {\n horizontal: '20px',\n vertical: '10px'\n }\n }\n },\n \"default\": {\n color: 'text-strong'\n },\n primary: {\n border: false,\n background: 'gradient-yellow-teal-purple',\n color: 'text'\n },\n hover: {\n border: false\n },\n extend: css([\"clip-path:polygon( 12px 0px,100% 0px,100% 72%,calc(100% - 12px) 100%,0px 100%,0px 12px );text-transform:uppercase;&:focus{clip-path:none;}\"])\n },\n heading: {\n extend: css([\"text-shadow:rgba(255,215,77,0.6) -1px -1px 6px,rgba(124,127,255,0.6) 1px 1px 6px;\"])\n }\n});","export { base, generate } from './base';\nexport { grommet } from './grommet';\nexport { dark } from './dark';\nexport { hacktoberfest2022 } from './hacktoberfest2022';","import styled, { css } from 'styled-components';\nimport { baseStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar fullStyle = function fullStyle(full) {\n if (full === 'min') return css([\"min-height:100vh;\"]);\n return css([\"width:100vw;height:100vh;overflow:auto;\"]);\n};\nvar StyledGrommet = styled.div.withConfig({\n displayName: \"StyledGrommet\",\n componentId: \"sc-19lkkz7-0\"\n})([\"\", \" \", \" \", \" \", \" \", \"\"], function (props) {\n return !props.plain && baseStyle;\n}, function (props) {\n return props.full && fullStyle(props.full);\n}, function (props) {\n return props.theme.global.font.face;\n}, function (props) {\n return props.theme.grommet.extend;\n}, function (props) {\n return props.cssVars && Object.keys(props.theme.global.colors).filter(function (k) {\n return typeof props.theme.global.colors[k] === 'string';\n }).map(function (k) {\n return \"--\" + k + \": \" + props.theme.global.colors[k] + \";\";\n }).join('\\n');\n});\nStyledGrommet.defaultProps = {};\nObject.setPrototypeOf(StyledGrommet.defaultProps, defaultProps);\nexport { StyledGrommet };","import PropTypes from 'prop-types';\nimport { backgroundDoc } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n background: backgroundDoc,\n dir: PropTypes.oneOf(['rtl']),\n full: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['min'])]),\n options: PropTypes.shape({\n layer: PropTypes.shape({\n singleId: PropTypes.bool\n })\n }),\n plain: PropTypes.bool,\n cssVars: PropTypes.bool,\n theme: PropTypes.object,\n themeMode: PropTypes.oneOf(['dark', 'light', 'auto']),\n userAgent: PropTypes.string,\n containerTarget: PropTypes.object,\n messages: PropTypes.shape({\n format: PropTypes.func,\n messages: PropTypes.shape({\n fileInput: PropTypes.shape({\n browse: PropTypes.string,\n dropPrompt: PropTypes.string,\n dropPromptMultiple: PropTypes.string,\n files: PropTypes.string,\n remove: PropTypes.string,\n removeAll: PropTypes.string\n }),\n form: PropTypes.shape({\n invalid: PropTypes.string,\n required: PropTypes.string\n }),\n menu: PropTypes.shape({\n openMenu: PropTypes.string,\n closeMenu: PropTypes.string\n }),\n rangeSelector: PropTypes.shape({\n lower: PropTypes.string,\n upper: PropTypes.string\n }),\n select: PropTypes.shape({\n multiple: PropTypes.string\n }),\n skipLinks: PropTypes.shape({\n skipTo: PropTypes.string\n }),\n tabs: PropTypes.shape({\n tabContents: PropTypes.string\n }),\n textInput: PropTypes.shape({\n enterSelect: PropTypes.string,\n suggestionsCount: PropTypes.string,\n suggestionsExist: PropTypes.string,\n suggestionIsOpen: PropTypes.string\n }),\n video: PropTypes.shape({\n closeMenu: PropTypes.string,\n fullScreen: PropTypes.string,\n progressMeter: PropTypes.string,\n scrubber: PropTypes.string,\n openMenu: PropTypes.string,\n pauseButton: PropTypes.string,\n playButton: PropTypes.string,\n volumeDown: PropTypes.string,\n volumeUp: PropTypes.string\n })\n }),\n onAnalytics: PropTypes.func\n })\n };\n}\nexport var GrommetPropTypes = PropType;","var _excluded = [\"children\", \"full\", \"containerTarget\", \"theme\", \"options\", \"messages\", \"onAnalytics\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useEffect, useMemo, useState } from 'react';\nimport { createGlobalStyle } from 'styled-components';\nimport { ContainerTargetContext, ResponsiveContext, ThemeContext } from '../../contexts';\nimport { deepMerge, backgroundIsDark, getBreakpoint, getDeviceBreakpoint, normalizeColor, useForwardedRef } from '../../utils';\nimport { base as baseTheme } from '../../themes';\nimport { StyledGrommet } from './StyledGrommet';\nimport { RootsContext } from '../../contexts/RootsContext';\nimport { OptionsContext } from '../../contexts/OptionsContext';\nimport { format as _format, MessageContext } from '../../contexts/MessageContext';\nimport defaultMessages from '../../languages/default.json';\nimport { GrommetPropTypes } from './propTypes';\nimport { AnalyticsProvider } from '../../contexts/AnalyticsContext';\nvar FullGlobalStyle = createGlobalStyle([\"body{margin:0;}\"]);\nvar deviceResponsive = function deviceResponsive(userAgent, theme) {\n // log('--deviceResponsive', userAgent, theme);\n /*\n * Regexes provided for mobile and tablet detection are meant to replace\n * a full-featured specific library due to contributing a considerable size\n * into the bundle.\n *\n * User agents found https://deviceatlas.com/blog/list-of-user-agent-strings\n */\n if (userAgent) {\n if (/(tablet|ipad|playbook|silk)|(android(?!.*mobile))/i.test(userAgent)) {\n return getDeviceBreakpoint('tablet', theme);\n }\n if (/Mobile|iPhone|Android/.test(userAgent)) {\n return getDeviceBreakpoint('phone', theme);\n }\n return getDeviceBreakpoint('computer', theme);\n }\n return undefined;\n};\nvar defaultOptions = {};\nvar Grommet = /*#__PURE__*/forwardRef(function (props, ref) {\n var children = props.children,\n full = props.full,\n _props$containerTarge = props.containerTarget,\n containerTarget = _props$containerTarge === void 0 ? typeof document === 'object' ? document.body : undefined : _props$containerTarge,\n themeProp = props.theme,\n _props$options = props.options,\n options = _props$options === void 0 ? defaultOptions : _props$options,\n messagesProp = props.messages,\n onAnalytics = props.onAnalytics,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var background = props.background,\n dir = props.dir,\n themeMode = props.themeMode,\n userAgent = props.userAgent;\n var _useState = useState(),\n stateResponsive = _useState[0],\n setResponsive = _useState[1];\n var _useState2 = useState([]),\n roots = _useState2[0],\n setRoots = _useState2[1];\n var theme = useMemo(function () {\n var nextTheme = deepMerge(baseTheme, themeProp || {});\n\n // if user provides specific menu alignment, we don't want\n // the defaults to be included at all (can cause issues with controlMirror)\n // override merged value with themeProp value\n if (themeProp && themeProp.menu && themeProp.menu.drop && themeProp.menu.drop.align) {\n delete nextTheme.menu.drop.align;\n nextTheme.menu.drop.align = themeProp.menu.drop.align;\n }\n var themeBackground = nextTheme.global.colors.background;\n nextTheme.dark = (themeMode || nextTheme.defaultMode) === 'dark';\n if (themeMode === 'auto' && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\n nextTheme.dark = true;\n }\n var color = normalizeColor(background || themeBackground, nextTheme);\n nextTheme.dark = backgroundIsDark(color, nextTheme);\n nextTheme.baseBackground = background || themeBackground;\n // This allows DataTable to intelligently set the background of a pinned\n // header or footer.\n nextTheme.background = nextTheme.baseBackground;\n if (dir) {\n nextTheme.dir = dir;\n }\n return nextTheme;\n }, [background, dir, themeMode, themeProp]);\n var messages = useMemo(function () {\n // combine the passed in messages, if any, with the default\n // messages and format function.\n var nextMessages = deepMerge(defaultMessages, (messagesProp == null ? void 0 : messagesProp.messages) || {});\n return {\n messages: nextMessages,\n format: function format(opts) {\n var message = (messagesProp == null ? void 0 : messagesProp.format) && messagesProp.format(opts);\n return typeof message !== 'undefined' ? message : _format(opts, nextMessages);\n }\n };\n }, [messagesProp]);\n useEffect(function () {\n var onResize = function onResize() {\n setResponsive(getBreakpoint(document.body.clientWidth, theme));\n };\n window.addEventListener('resize', onResize);\n onResize();\n return function () {\n window.removeEventListener('resize', onResize);\n };\n }, [theme]);\n var responsive = stateResponsive || deviceResponsive(userAgent, theme) || theme.global.deviceBreakpoints.tablet;\n var grommetRef = useForwardedRef(ref);\n useEffect(function () {\n if (grommetRef.current) setRoots([grommetRef.current]);\n }, [grommetRef]);\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, /*#__PURE__*/React.createElement(ResponsiveContext.Provider, {\n value: responsive\n }, /*#__PURE__*/React.createElement(RootsContext.Provider, {\n value: roots\n }, /*#__PURE__*/React.createElement(ContainerTargetContext.Provider, {\n value: containerTarget\n }, /*#__PURE__*/React.createElement(OptionsContext.Provider, {\n value: options\n }, /*#__PURE__*/React.createElement(MessageContext.Provider, {\n value: messages\n }, /*#__PURE__*/React.createElement(AnalyticsProvider, {\n onAnalytics: onAnalytics\n }, /*#__PURE__*/React.createElement(StyledGrommet, _extends({\n full: full\n }, rest, {\n ref: grommetRef\n }), children), full && /*#__PURE__*/React.createElement(FullGlobalStyle, null))))))));\n});\nGrommet.displayName = 'Grommet';\nGrommet.propTypes = GrommetPropTypes;\nexport { Grommet };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from 'react';\nimport { Box } from '../Box';\nvar Main = function Main(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/React.createElement(Box, _extends({\n as: \"main\",\n fill: \"vertical\",\n flex: \"grow\",\n overflow: \"auto\"\n }, rest));\n};\nexport { Main };","import styled, { css } from 'styled-components';\nimport { genericStyles, normalizeColor, textAlignStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar colorStyle = css([\"color:\", \";\"], function (props) {\n return normalizeColor(props.colorProp, props.theme);\n});\nvar sizeStyle = function sizeStyle(props) {\n var size = props.size || 'medium';\n var data = props.theme.paragraph[size];\n return css([\"font-size:\", \";line-height:\", \";max-width:\", \";\"], data ? data.size : size, data ? data.height : 'normal', props.fillProp ? 'none' : data && data.maxWidth);\n};\nvar fontFamily = css([\"font-family:\", \";\"], function (props) {\n return props.theme.paragraph.font.family;\n});\nvar maxlinesStyle = function maxlinesStyle(props) {\n return props.maxLines && css([\"display:-webkit-box;-webkit-line-clamp:\", \";-webkit-box-orient:vertical;overflow:hidden;\"], props.maxLines);\n};\nvar StyledParagraph = styled.p.withConfig({\n displayName: \"StyledParagraph\",\n componentId: \"sc-tbetod-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return maxlinesStyle(props);\n}, function (props) {\n return sizeStyle(props);\n}, function (props) {\n return props.textAlign && textAlignStyle;\n}, function (props) {\n return props.colorProp && colorStyle;\n}, function (props) {\n return props.theme.paragraph.font && props.theme.paragraph.font.family && fontFamily;\n}, function (props) {\n return props.theme.paragraph && props.theme.paragraph.extend;\n});\nStyledParagraph.defaultProps = {};\nObject.setPrototypeOf(StyledParagraph.defaultProps, defaultProps);\nexport { StyledParagraph };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { colorPropType, genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n color: colorPropType,\n fill: PropTypes.bool,\n maxLines: PropTypes.number,\n responsive: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large', 'xlarge', 'xxlarge']), PropTypes.string]),\n textAlign: PropTypes.oneOf(['start', 'center', 'end', 'justify'])\n });\n}\nexport var ParagraphPropTypes = PropType;","import React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Skeleton } from '../Skeleton';\nimport { Box } from '../Box';\nvar ParagraphSkeleton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var fill = _ref.fill,\n sizeProp = _ref.size;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var size = sizeProp || 'medium';\n var data = theme.paragraph[size];\n var height = data ? data.size : size;\n return /*#__PURE__*/React.createElement(Box, {\n ref: ref,\n gap: \"xsmall\",\n width: {\n max: fill ? 'none' : data && data.maxWidth\n }\n }, /*#__PURE__*/React.createElement(Skeleton, {\n height: height\n }), /*#__PURE__*/React.createElement(Skeleton, {\n height: height\n }), /*#__PURE__*/React.createElement(Skeleton, {\n height: height,\n width: \"30%\"\n }));\n});\nParagraphSkeleton.displayName = 'ParagraphSkeleton';\nexport { ParagraphSkeleton };","var _excluded = [\"children\", \"color\", \"fill\", \"size\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useMemo } from 'react';\nimport { StyledParagraph } from './StyledParagraph';\nimport { ParagraphPropTypes } from './propTypes';\nimport { useSkeleton } from '../Skeleton';\nimport { ParagraphSkeleton } from './ParagraphSkeleton';\nimport { TextContext } from '../Text/TextContext';\nvar Paragraph = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n color = _ref.color,\n fill = _ref.fill,\n size = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var skeleton = useSkeleton();\n var textContextValue = useMemo(function () {\n return {\n size: size\n };\n }, [size]);\n if (skeleton) {\n return /*#__PURE__*/React.createElement(ParagraphSkeleton, _extends({\n ref: ref,\n fill: fill,\n size: size\n }, rest), children);\n }\n return /*#__PURE__*/React.createElement(StyledParagraph, _extends({\n ref: ref,\n colorProp: color,\n fillProp: fill,\n size: size\n }, rest), children !== undefined ? /*#__PURE__*/React.createElement(TextContext.Provider, {\n value: textContextValue\n }, children) : undefined);\n});\nParagraph.displayName = 'Paragraph';\nParagraph.prototype = ParagraphPropTypes;\nexport { Paragraph };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n components: PropTypes.object,\n options: PropTypes.shape({})\n };\n}\nexport var MarkdownPropTypes = PropType;","var _excluded = [\"children\", \"components\", \"options\", \"theme\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, Fragment } from 'react';\nimport Markdown from 'markdown-to-jsx';\nimport { deepMerge } from '../../utils';\nimport { Heading } from '../Heading';\nimport { Paragraph } from '../Paragraph';\nimport { Anchor } from '../Anchor';\nimport { Image } from '../Image';\nimport { Table } from '../Table';\nimport { TableBody } from '../TableBody';\nimport { TableCell } from '../TableCell';\nimport { TableFooter } from '../TableFooter';\nimport { TableHeader } from '../TableHeader';\nimport { TableRow } from '../TableRow';\nimport { MarkdownPropTypes } from './propTypes';\nvar GrommetMarkdown = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n components = _ref.components,\n options = _ref.options,\n theme = _ref.theme,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var heading = [1, 2, 3, 4].reduce(function (obj, level) {\n var result = _extends({}, obj);\n result[\"h\" + level] = {\n component: Heading,\n props: {\n level: level\n }\n };\n return result;\n }, {});\n var overrides = deepMerge({\n a: {\n component: Anchor\n },\n img: {\n component: Image\n },\n p: {\n component: Paragraph\n },\n table: {\n component: Table\n },\n td: {\n component: TableCell,\n props: {\n plain: true\n }\n },\n tbody: {\n component: TableBody\n },\n tfoot: {\n component: TableFooter\n },\n th: {\n component: TableCell\n },\n thead: {\n component: TableHeader\n },\n tr: {\n component: TableRow\n }\n }, heading, components, options && options.overrides);\n\n // we use Fragment as the wrapper so we can assign the ref with the div\n // wrapper can still be overridden with the options.\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref\n }, rest), /*#__PURE__*/React.createElement(Markdown, {\n children: children,\n options: _extends({\n wrapper: Fragment\n }, options, {\n overrides: overrides\n })\n }));\n});\nGrommetMarkdown.propTypes = MarkdownPropTypes;\nexport { GrommetMarkdown as Markdown };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar VERTICAL_ALIGN_OPTIONS = ['top', 'bottom'];\nvar HORIZONTAL_ALIGN_OPTIONS = ['right', 'left'];\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n disabled: PropTypes.bool,\n dropAlign: PropTypes.shape({\n top: PropTypes.oneOf(VERTICAL_ALIGN_OPTIONS),\n bottom: PropTypes.oneOf(VERTICAL_ALIGN_OPTIONS),\n left: PropTypes.oneOf(HORIZONTAL_ALIGN_OPTIONS),\n right: PropTypes.oneOf(HORIZONTAL_ALIGN_OPTIONS)\n }),\n dropBackground: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n color: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.oneOf(['weak', 'medium', 'strong'])])\n })]),\n dropTarget: PropTypes.object,\n dropProps: PropTypes.object,\n justifyContent: PropTypes.oneOf(['start', 'center', 'end', 'between', 'around', 'stretch']),\n icon: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),\n items: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.object))]).isRequired,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n messages: PropTypes.shape({\n closeMenu: PropTypes.string,\n openMenu: PropTypes.string\n }),\n open: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large', 'xlarge']), PropTypes.string])\n });\n}\nexport var MenuPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"aria-label\", \"children\", \"disabled\", \"dropAlign\", \"dropBackground\", \"dropProps\", \"dropTarget\", \"justifyContent\", \"icon\", \"items\", \"label\", \"messages\", \"onKeyDown\", \"open\", \"plain\", \"size\"],\n _excluded2 = [\"align\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useRef, forwardRef, useCallback, useContext, useMemo, useState, useEffect } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { DropButton } from '../DropButton';\nimport { Keyboard } from '../Keyboard';\nimport { Text } from '../Text';\nimport { normalizeColor } from '../../utils';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { MenuPropTypes } from './propTypes';\nvar ContainerBox = styled(Box).withConfig({\n displayName: \"Menu__ContainerBox\",\n componentId: \"sc-17fcys9-0\"\n})([\"max-height:inherit;@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){width:100%;}:focus{outline:none;}\", \";\"], function (props) {\n return props.theme.menu.extend;\n});\n\n/* Notes on keyboard interactivity (based on W3) // For details reference: https://www.w3.org/TR/wai-aria-practices/#menu\n\nTo open menu when menu button is focused:\n- Space/Enter/Up arrow/Down arrow will open menu\n\nTo navigate within menu:\n- Up/down arrow keys can be used and will loop through options\n(keeping focus within the Menu)\n- Tab can be used, but once the last menu item is reached, Tab will close the\nMenu and continue through page content.\n\nTo close the menu:\n- Tabbing beyond the first or last menu item.\n- Esc will close the menu\n- Select a menu item\n\nTo make a selection:\n- Enter key is pressed.\n- Space is pressed.\n*/\n\nvar Menu = /*#__PURE__*/forwardRef(function (props, ref) {\n var a11yTitle = props.a11yTitle,\n ariaLabel = props['aria-label'],\n children = props.children,\n disabled = props.disabled,\n dropAlign = props.dropAlign,\n dropBackground = props.dropBackground,\n dropProps = props.dropProps,\n dropTarget = props.dropTarget,\n justifyContent = props.justifyContent,\n icon = props.icon,\n items = props.items,\n label = props.label,\n messages = props.messages,\n onKeyDown = props.onKeyDown,\n open = props.open,\n plain = props.plain,\n size = props.size,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var iconColor = normalizeColor(theme.menu.icons.color || 'control', theme);\n // need to destructure the align otherwise it will get passed through\n // to DropButton and override prop values\n var _theme$menu$drop = theme.menu.drop,\n themeDropAlign = _theme$menu$drop.align,\n themeDropProps = _objectWithoutPropertiesLoose(_theme$menu$drop, _excluded2);\n var a11y = ariaLabel || a11yTitle;\n\n // total number of menu items\n var itemCount = useMemo(function () {\n var count = 0;\n if (items && Array.isArray(items[0])) {\n items.forEach(function (group) {\n count += group.length;\n });\n } else count = items.length;\n return count;\n }, [items]);\n var align = dropProps && dropProps.align || dropAlign || themeDropAlign;\n var controlButtonIndex = useMemo(function () {\n if (align.top === 'top') return -1;\n if (align.bottom === 'bottom') return itemCount;\n return undefined;\n }, [align, itemCount]);\n\n // Keeps track of whether menu options should be mirrored\n // when there's not enough space below DropButton. This state\n // is modified on /Drop/DropContainer.js.\n var _useState = useState(),\n alignControlMirror = _useState[0],\n setAlignControlMirror = _useState[1];\n var initialAlignTop = alignControlMirror === align.top;\n var dropContainerRef = useRef();\n var buttonRefs = useRef([]);\n var constants = useMemo(function () {\n return {\n none: 'none',\n tab: 9,\n // Menu control button included on top of menu items\n controlTop: align.top === 'top' || undefined,\n // Menu control button included on the bottom of menu items\n controlBottom: align.bottom === 'bottom' || undefined,\n controlButtonIndex: controlButtonIndex\n };\n }, [align, controlButtonIndex]);\n var _useState2 = useState(constants.none),\n activeItemIndex = _useState2[0],\n setActiveItemIndex = _useState2[1];\n var _useState3 = useState(open || false),\n isOpen = _useState3[0],\n setOpen = _useState3[1];\n var MenuIcon = isOpen && theme.menu.icons.up ? theme.menu.icons.up : theme.menu.icons.down;\n var onDropClose = useCallback(function () {\n setActiveItemIndex(constants.none);\n setOpen(false);\n }, [constants.none]);\n var onDropOpen = useCallback(function () {\n setOpen(true);\n }, []);\n useEffect(function () {\n // need to wait for Drop to be ready\n var timer = setTimeout(function () {\n if (isOpen) {\n var optionsNode = dropContainerRef.current;\n if (optionsNode) {\n optionsNode.focus();\n }\n }\n }, 100);\n return function () {\n return clearTimeout(timer);\n };\n }, [isOpen]);\n var onSelectMenuItem = function onSelectMenuItem(event) {\n if (isOpen) {\n if (activeItemIndex >= 0) {\n event.preventDefault();\n event.stopPropagation();\n buttonRefs.current[activeItemIndex].click();\n }\n } else {\n onDropOpen();\n }\n };\n var isTab = function isTab(event) {\n return event.keyCode === constants.tab || event.which === constants.tab;\n };\n var onNextMenuItem = function onNextMenuItem(event) {\n event.preventDefault();\n if (!isOpen) {\n onDropOpen();\n } else if (isTab(event) && (!constants.controlBottom && activeItemIndex === itemCount - 1 || constants.controlBottom && activeItemIndex === controlButtonIndex)) {\n // User has reached end of the menu, this tab will close\n // the menu drop because there are no more \"next items\" to access\n onDropClose();\n } else {\n var index;\n if (\n // This checks if the user has reached the end of the menu.\n // In the case the the menu control button is located at the\n // bottom of the menu, it checks if the user has reached the button.\n // Otherwise, it checks if the user is at the last menu item.\n constants.controlBottom && activeItemIndex === controlButtonIndex || !constants.controlBottom && activeItemIndex === itemCount - 1 || activeItemIndex === constants.none) {\n // place focus on the first menu item\n index = 0;\n } else {\n index = activeItemIndex + 1;\n }\n setActiveItemIndex(index);\n if (buttonRefs.current[index]) {\n buttonRefs.current[index].focus();\n }\n }\n };\n var onPreviousMenuItem = function onPreviousMenuItem(event) {\n event.preventDefault();\n if (!isOpen) {\n onDropOpen();\n } else if (isTab(event) && (constants.controlTop && activeItemIndex === controlButtonIndex || !constants.controlTop && activeItemIndex - 1 < 0)) {\n // User has reached beginning of the menu, this tab will close\n // the menu drop because there are no more \"previous items\" to access\n onDropClose();\n } else {\n var index;\n if (activeItemIndex === 'none') {\n index = itemCount - 1;\n } else if (activeItemIndex - 1 < 0) {\n if (constants.controlTop && activeItemIndex - 1 === controlButtonIndex) {\n index = itemCount;\n } else {\n index = itemCount - 1;\n }\n } else {\n index = activeItemIndex - 1;\n }\n setActiveItemIndex(index);\n if (buttonRefs.current[index]) {\n buttonRefs.current[index].focus();\n }\n }\n };\n var menuIcon = icon !== false ? icon !== true && icon || /*#__PURE__*/React.createElement(MenuIcon, {\n color: iconColor,\n size: size\n }) : null;\n var buttonProps = {\n plain: plain,\n size: size\n };\n var content;\n if (children) {\n content = children;\n } else if (!theme.button[\"default\"]) {\n content = /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n justify: justifyContent,\n align: \"center\",\n pad: \"small\",\n gap: label && icon !== false ? 'small' : undefined\n }, /*#__PURE__*/React.createElement(Text, {\n size: size\n }, label), menuIcon);\n } else {\n // when a theme has theme.button.default, keep content as\n // undefined so we can rely on Button label & icon props\n buttonProps = {\n icon: menuIcon,\n label: label,\n plain: plain,\n reverse: true,\n size: size\n };\n content = undefined;\n }\n var controlMirror = /*#__PURE__*/React.createElement(Box, {\n flex: false\n }, /*#__PURE__*/React.createElement(Button, _extends({\n ref: function ref(r) {\n // make it accessible at the end of all menu items\n buttonRefs.current[itemCount] = r;\n },\n a11yTitle: a11y || format({\n id: 'menu.closeMenu',\n messages: messages\n }),\n active: activeItemIndex === controlButtonIndex,\n focusIndicator: false,\n hoverIndicator: \"background\",\n onClick: onDropClose,\n onFocus: function onFocus() {\n return setActiveItemIndex(controlButtonIndex);\n }\n // On first tab into menu, the control button should not\n // be able to receive tab focus because the focus should\n // go to the first menu item instead.\n ,\n tabIndex: activeItemIndex === constants.none ? '-1' : undefined\n }, theme.menu.item, buttonProps), typeof content === 'function' ? function () {\n return content(_extends({}, props, {\n drop: true\n }));\n } : content));\n var menuItem = function menuItem(item, index) {\n var _theme$menu$item, _theme$menu$item2, _theme$menu$item3, _theme$menu$item4;\n // Determine whether the label is done as a child or\n // as an option Button kind property.\n var child = !theme.button.option ? /*#__PURE__*/React.createElement(Box, {\n align: ((_theme$menu$item = theme.menu.item) == null ? void 0 : _theme$menu$item.align) || 'start',\n pad: \"small\",\n direction: \"row\",\n gap: item.gap || ((_theme$menu$item2 = theme.menu.item) == null ? void 0 : _theme$menu$item2.gap),\n justify: item.justify || ((_theme$menu$item3 = theme.menu.item) == null ? void 0 : _theme$menu$item3.justify)\n }, item.reverse && item.label, item.icon, !item.reverse && item.label) : undefined;\n\n // if we have a child, turn on plain, and hoverIndicator\n return (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(Box, {\n key: index,\n flex: false,\n role: \"none\"\n }, /*#__PURE__*/React.createElement(Button, _extends({\n ref: function ref(r) {\n buttonRefs.current[index] = r;\n },\n role: \"menuitem\",\n onFocus: function onFocus() {\n setActiveItemIndex(index);\n },\n active: activeItemIndex === index,\n focusIndicator: false,\n plain: !child ? undefined : true,\n align: \"start\",\n kind: !child ? 'option' : undefined,\n hoverIndicator: !child ? undefined : 'background'\n }, theme.menu.item, {\n justify: item.justify || ((_theme$menu$item4 = theme.menu.item) == null ? void 0 : _theme$menu$item4.justify)\n }, !child ? item : _extends({}, item, {\n gap: undefined,\n icon: undefined,\n label: undefined,\n reverse: undefined\n }), {\n onClick: function onClick() {\n if (item.onClick) {\n item.onClick.apply(item, arguments);\n }\n if (item.close !== false) {\n onDropClose();\n }\n }\n }), child))\n );\n };\n var menuContent;\n if (itemCount && Array.isArray(items[0])) {\n var index = 0;\n menuContent = items.map(function (group, groupIndex) {\n var _theme$menu$group, _theme$menu$group2, _theme$menu$group3;\n return /*#__PURE__*/React.createElement(Box\n // eslint-disable-next-line react/no-array-index-key\n , {\n key: groupIndex\n // ensure menu groups don't collapse if vertical space on screen\n // causes scrolling within the menu\n ,\n flex: false\n }, groupIndex > 0 && /*#__PURE__*/React.createElement(Box, {\n pad: theme.menu.group.separator.pad\n }, /*#__PURE__*/React.createElement(Box, {\n border: {\n side: 'top',\n color: (_theme$menu$group = theme.menu.group) == null || (_theme$menu$group = _theme$menu$group.separator) == null ? void 0 : _theme$menu$group.color,\n size: (_theme$menu$group2 = theme.menu.group) == null || (_theme$menu$group2 = _theme$menu$group2.separator) == null ? void 0 : _theme$menu$group2.size\n }\n })), /*#__PURE__*/React.createElement(Box, (_theme$menu$group3 = theme.menu.group) == null ? void 0 : _theme$menu$group3.container, group.map(function (item) {\n // item index needs to be its index in the entire menu as if\n // it were a flat array\n var currentIndex = index;\n index += 1;\n return menuItem(item, currentIndex);\n })));\n });\n } else menuContent = items.map(function (item, index) {\n return menuItem(item, index);\n });\n return /*#__PURE__*/React.createElement(Keyboard, {\n onDown: onDropOpen,\n onUp: onDropOpen,\n onSpace: onSelectMenuItem,\n onEsc: onDropClose,\n onTab: onDropClose,\n onKeyDown: onKeyDown\n }, /*#__PURE__*/React.createElement(DropButton, _extends({\n ref: ref\n }, rest, buttonProps, {\n a11yTitle: a11y || format({\n id: 'menu.openMenu',\n messages: messages\n }),\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": isOpen,\n onAlign: setAlignControlMirror,\n disabled: disabled,\n dropAlign: align,\n dropTarget: dropTarget,\n dropProps: dropProps || themeDropProps,\n open: isOpen,\n onOpen: onDropOpen,\n onClose: onDropClose,\n dropContent: /*#__PURE__*/React.createElement(Keyboard, {\n onTab: function onTab(event) {\n return event.shiftKey ? onPreviousMenuItem(event) : onNextMenuItem(event);\n },\n onDown: onNextMenuItem,\n onUp: onPreviousMenuItem,\n onEnter: onSelectMenuItem\n }, /*#__PURE__*/React.createElement(ContainerBox, {\n ref: dropContainerRef,\n tabIndex: -1,\n background: dropBackground || theme.menu.background\n }, alignControlMirror === 'top' && align.top === 'top' ? controlMirror : undefined, /*#__PURE__*/React.createElement(Box, {\n overflow: \"auto\",\n role: \"menu\",\n a11yTitle: a11y\n }, menuContent), !initialAlignTop && (\n // don't show controlMirror if caller is using\n // align.bottom === 'top'\n alignControlMirror === 'bottom' && !align.bottom === 'top' || align.bottom === 'bottom') ? controlMirror : undefined))\n }), content));\n});\nMenu.defaultProps = {\n items: [],\n messages: undefined,\n justifyContent: 'start'\n};\nMenu.displayName = 'Menu';\nMenu.propTypes = MenuPropTypes;\nexport { Menu };","import styled, { css } from 'styled-components';\nimport { genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar roundStyle = css([\"border-radius:\", \";\"], function (props) {\n return props.theme.global.edgeSize[props.round.size];\n});\n\n// overflow: hidden is needed for ie11\nvar StyledMeter = styled.svg.withConfig({\n displayName: \"StyledMeter\",\n componentId: \"sc-nsxarx-0\"\n})([\"max-width:100%;overflow:hidden;\", \" \", \" \", \" path{transition:stroke 0.3s,stroke-width 0.3s;}\", \";\"], function (props) {\n return props.reverse && css([\"transform:scale(-1,1);\"]);\n}, genericStyles, function (props) {\n return props.round && roundStyle;\n}, function (props) {\n return props.theme.meter && props.theme.meter.extend;\n});\nStyledMeter.defaultProps = {};\nObject.setPrototypeOf(StyledMeter.defaultProps, defaultProps);\nexport { StyledMeter };","import { normalizeColor } from '../../utils';\nexport var strokeProps = function strokeProps(color, theme) {\n var result = {};\n if (color) {\n if (typeof color === 'object') {\n result.stroke = normalizeColor(color.color, theme);\n if (color.opacity) {\n result.strokeOpacity = \"\" + (color.opacity === true ? theme.global.opacity.medium : theme.global.opacity[color.opacity] || color.opacity);\n }\n } else {\n result.stroke = normalizeColor(color, theme);\n }\n }\n return result;\n};\nvar neutralExp = /^neutral-\\d+/;\nexport var defaultColor = function defaultColor(index, theme, valuesLength) {\n if (index === valuesLength - 1 && theme.meter.color) {\n return theme.meter.color;\n }\n // We want the last value to have the first color\n var colorIndex = valuesLength - index - 1;\n if (theme.meter && theme.meter.colors) {\n var _colors = theme.meter.colors[theme.dark ? 'dark' : 'light'] || theme.meter.colors;\n return _colors[colorIndex % _colors.length];\n }\n var colors = Object.keys(theme.global.colors).filter(function (n) {\n return n.match(/^graph-[0-9]$/);\n });\n if (colors.length > 0) {\n return colors[colorIndex % colors.length];\n }\n // Deprecate using \"neutral-*\" color names. Remove eventually.\n var neutralColors = Object.keys(theme.global.colors).filter(function (k) {\n return neutralExp.test(k);\n });\n return neutralColors[colorIndex % neutralColors.length];\n};","var _excluded = [\"background\", \"max\", \"round\", \"size\", \"thickness\", \"direction\", \"values\", \"reverse\"],\n _excluded2 = [\"color\", \"highlight\", \"label\", \"onHover\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { parseMetricToNum } from '../../utils';\nimport { StyledMeter } from './StyledMeter';\nimport { strokeProps, defaultColor } from './utils';\nvar Bar = /*#__PURE__*/forwardRef(function (props, ref) {\n var background = props.background,\n max = props.max,\n round = props.round,\n size = props.size,\n thicknessProp = props.thickness,\n direction = props.direction,\n values = props.values,\n reverse = props.reverse,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var length = size === 'full' ? 288 : parseMetricToNum(theme.global.size[size] || size);\n var thickness = parseMetricToNum(theme.global.edgeSize[thicknessProp] || thicknessProp);\n // account for the round cap, if any\n var capOffset = round ? thickness / 2 : 0;\n var mid = thickness / 2;\n var someHighlight = (values || []).some(function (v) {\n return v.highlight;\n });\n var start = direction === 'horizontal' ? capOffset : max * (length - 2 * capOffset) / max;\n var paths = (values || []).reduce(function (acc, valueArg, index) {\n if (valueArg.value > 0) {\n var color = valueArg.color,\n highlight = valueArg.highlight,\n label = valueArg.label,\n onHover = valueArg.onHover,\n value = valueArg.value,\n pathRest = _objectWithoutPropertiesLoose(valueArg, _excluded2);\n var key = \"p-\" + index;\n var delta = value * (length - 2 * capOffset) / max;\n var d = direction === 'horizontal' ? \"M \" + start + \",\" + mid + \" L \" + (start + delta) + \",\" + mid : \"M \" + mid + \",\" + start + \" L \" + mid + \",\" + (start - delta);\n var colorName = color || defaultColor(index, theme, values ? values.length : 0);\n var hoverProps;\n if (onHover) {\n hoverProps = {\n onMouseOver: function onMouseOver() {\n return onHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return onHover(false);\n }\n };\n }\n if (direction === 'horizontal') {\n start += delta;\n } else {\n start -= delta;\n }\n var result = /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key,\n d: d,\n fill: \"none\"\n }, strokeProps(someHighlight && !highlight ? background : colorName, theme), {\n strokeWidth: direction === 'horizontal' ? thickness : length,\n strokeLinecap: round ? 'round' : 'butt'\n }, hoverProps, pathRest));\n acc.push(result);\n }\n return acc;\n }, []).reverse(); // reverse so the caps looks right\n\n var width;\n if (direction === 'horizontal') {\n width = size === 'full' ? '100%' : length;\n } else {\n width = size === 'full' ? '100%' : thickness;\n }\n var backgroundPath = direction === 'horizontal' ? \"M \" + capOffset + \",\" + mid + \" L \" + (length - capOffset) + \",\" + mid : \"M \" + mid + \",\" + capOffset + \" L \" + mid + \",\" + (length - capOffset);\n return /*#__PURE__*/React.createElement(StyledMeter, _extends({\n ref: ref,\n viewBox: direction === 'horizontal' ? \"0 0 \" + length + \" \" + thickness : \"0 0 \" + thickness + \" \" + length,\n preserveAspectRatio: \"none\",\n width: width,\n height: direction === 'horizontal' ? thickness : length,\n round: round ? {\n size: thicknessProp\n } : undefined\n }, rest, {\n reverse: reverse\n }), /*#__PURE__*/React.createElement(\"path\", _extends({\n d: backgroundPath,\n fill: \"none\"\n }, strokeProps(background, theme), {\n strokeWidth: thickness,\n strokeLinecap: round ? 'round' : 'square'\n })), paths);\n});\nBar.displayName = 'Bar';\nBar.defaultProps = {\n background: 'light-1'\n};\nObject.setPrototypeOf(Bar.defaultProps, defaultProps);\nexport { Bar };","var _excluded = [\"background\", \"max\", \"round\", \"size\", \"thickness\", \"type\", \"values\"],\n _excluded2 = [\"color\", \"highlight\", \"label\", \"onHover\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { arcCommands, parseMetricToNum, translateEndAngle } from '../../utils';\nimport { StyledMeter } from './StyledMeter';\nimport { strokeProps, defaultColor } from './utils';\nvar Circle = /*#__PURE__*/forwardRef(function (props, ref) {\n var background = props.background,\n max = props.max,\n round = props.round,\n size = props.size,\n thickness = props.thickness,\n type = props.type,\n values = props.values,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var theme = useContext(ThemeContext);\n var width = size === 'full' ? 288 : parseMetricToNum(theme.global.size[size] || size);\n var strokeWidth = type === 'pie' ? width / 2 : parseMetricToNum(theme.global.edgeSize[thickness] || thickness);\n var centerX = width / 2;\n var centerY = width / 2;\n var radius = width / 2 - strokeWidth / 2;\n // truncate to avoid floating point arithmetic errors\n // see: https://github.com/grommet/grommet/issues/6190\n // Choose a scale factor at least 3 orders of magnitude above max\n var scalePower = Math.max(5, Math.ceil(Math.log10(max)) + 3);\n var scale = Math.pow(10, scalePower);\n var anglePer = Math.floor((type === 'semicircle' ? 180 : 360) / max * scale) / scale;\n // (type === 'semicircle' ? 180 : 360) / max;\n var someHighlight = (values || []).some(function (v) {\n return v.highlight;\n });\n var startValue = 0;\n var startAngle = type === 'semicircle' ? 270 : 0;\n var paths = [];\n var pathCaps = [];\n (values || []).filter(function (v) {\n return v.value > 0;\n }).forEach(function (valueArg, index) {\n var color = valueArg.color,\n highlight = valueArg.highlight,\n label = valueArg.label,\n onHover = valueArg.onHover,\n value = valueArg.value,\n pathRest = _objectWithoutPropertiesLoose(valueArg, _excluded2);\n var key = \"p-\" + index;\n var colorName = color || defaultColor(index, theme, values ? values.length : 0);\n var endAngle;\n if (startValue + value >= max) {\n endAngle = type === 'semicircle' ? 90 : 360;\n } else {\n endAngle = translateEndAngle(startAngle, anglePer, value);\n }\n var hoverProps;\n if (onHover) {\n hoverProps = {\n onMouseOver: function onMouseOver() {\n return onHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return onHover(false);\n }\n };\n }\n var stroke = strokeProps(someHighlight && !highlight ? background : colorName, theme);\n if (round) {\n var d1 = arcCommands(centerX, centerY, radius, startAngle, endAngle);\n paths.unshift( /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key,\n d: d1,\n fill: \"none\"\n }, stroke, {\n strokeWidth: strokeWidth,\n strokeLinecap: \"round\"\n }, hoverProps, pathRest)));\n\n // To handle situations where the last values are small, redraw\n // a dot at the end. Give just a bit of angle to avoid anti-aliasing\n // leakage around the edge.\n var d2 = arcCommands(centerX, centerY, radius, endAngle - 0.5, endAngle);\n var pathCap = /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key + \"-\",\n d: d2,\n fill: \"none\"\n }, stroke, {\n strokeWidth: strokeWidth,\n strokeLinecap: \"round\"\n }, hoverProps, pathRest));\n // If we are on a large enough path to not need re-drawing previous\n // ones, clear the pathCaps we've collected already.\n if (endAngle - startAngle > 2 * anglePer) {\n pathCaps = [];\n }\n pathCaps.unshift(pathCap);\n } else {\n var d = arcCommands(centerX, centerY, radius, startAngle, endAngle);\n paths.push( /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key,\n d: d,\n fill: \"none\"\n }, stroke, {\n strokeWidth: strokeWidth,\n strokeLinecap: \"butt\"\n }, hoverProps, pathRest)));\n }\n startValue += value;\n startAngle = endAngle;\n });\n var track;\n if (type === 'semicircle') {\n var d1 = arcCommands(centerX, centerY, radius, 270, 90);\n track = /*#__PURE__*/React.createElement(\"path\", _extends({\n d: d1,\n strokeWidth: strokeWidth,\n fill: \"none\"\n }, strokeProps(background, theme), {\n strokeLinecap: round ? 'round' : 'square'\n }));\n } else {\n track = /*#__PURE__*/React.createElement(\"circle\", _extends({\n cx: centerX,\n cy: centerY,\n r: radius\n }, strokeProps(background, theme), {\n strokeWidth: strokeWidth,\n strokeLinecap: round ? 'round' : 'square',\n fill: \"none\"\n }));\n }\n var viewBoxHeight = type === 'semicircle' ? width / 2 : width;\n return /*#__PURE__*/React.createElement(StyledMeter, _extends({\n ref: ref,\n viewBox: \"0 0 \" + width + \" \" + viewBoxHeight,\n width: size === 'full' ? '100%' : width,\n height: size === 'full' ? '100%' : viewBoxHeight\n }, rest), track, paths, pathCaps);\n});\nCircle.displayName = 'Circle';\nCircle.defaultProps = {};\nObject.setPrototypeOf(Circle.defaultProps, defaultProps);\nexport { Circle };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n background: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n color: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.oneOf(['weak', 'medium', 'strong']), PropTypes.number, PropTypes.bool])\n })]),\n color: PropTypes.string,\n max: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n reverse: PropTypes.bool,\n round: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'full']), PropTypes.string]),\n thickness: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n type: PropTypes.oneOf(['bar', 'circle', 'pie', 'semicircle']),\n direction: PropTypes.oneOf(['horizontal', 'vertical']),\n value: PropTypes.number,\n values: PropTypes.arrayOf(PropTypes.shape({\n color: PropTypes.string,\n highlight: PropTypes.bool,\n label: PropTypes.string.isRequired,\n // for accessibility\n onClick: PropTypes.func,\n onHover: PropTypes.func,\n value: PropTypes.number.isRequired\n }))\n });\n}\nexport var MeterPropTypes = PropType;","var _excluded = [\"background\", \"color\", \"direction\", \"size\", \"thickness\", \"type\", \"reverse\", \"value\", \"values\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useMemo, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Bar } from './Bar';\nimport { Circle } from './Circle';\nimport { MeterPropTypes } from './propTypes';\nvar deriveMax = function deriveMax(values) {\n var max = 100;\n if (values && values.length > 1) {\n max = 0;\n values.forEach(function (v) {\n max += v.value;\n });\n }\n return max;\n};\nvar Meter = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref$background = _ref.background,\n background = _ref$background === void 0 ? {\n color: 'light-2',\n opacity: 'medium'\n } : _ref$background,\n color = _ref.color,\n _ref$direction = _ref.direction,\n direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 'medium' : _ref$size,\n _ref$thickness = _ref.thickness,\n thickness = _ref$thickness === void 0 ? 'medium' : _ref$thickness,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'bar' : _ref$type,\n reverseProp = _ref.reverse,\n value = _ref.value,\n valuesProp = _ref.values,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n // normalize values to an array of objects\n var values = useMemo(function () {\n if (valuesProp) return valuesProp;\n if (value) return [{\n color: color,\n value: value\n }];\n return [];\n }, [color, value, valuesProp]);\n var reverse = direction === 'horizontal' && (theme.dir === 'rtl' || reverseProp) && !(theme.dir === 'rtl' && reverseProp);\n var memoizedMax = useMemo(function () {\n return deriveMax(values);\n }, [values]);\n var content;\n if (type === 'bar') {\n content = /*#__PURE__*/React.createElement(Bar, _extends({\n ref: ref,\n max: memoizedMax,\n values: values,\n size: size,\n thickness: thickness,\n background: background,\n direction: direction,\n reverse: reverse\n }, rest));\n } else if (type === 'circle' || type === 'pie' || type === 'semicircle') {\n content = /*#__PURE__*/React.createElement(Circle, _extends({\n ref: ref,\n max: memoizedMax,\n values: values,\n size: size,\n thickness: thickness,\n type: type,\n background: background,\n reverse: reverse\n }, rest));\n }\n return content;\n});\nMeter.displayName = 'Meter';\nMeter.prototype = MeterPropTypes;\nexport { Meter };","import { createContext } from 'react';\nexport var PageContext = /*#__PURE__*/createContext({});","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n kind: PropTypes.string\n };\n}\nexport var PagePropTypes = PropType;","var _excluded = [\"kind\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { PageContext } from './PageContext';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { PagePropTypes } from './propTypes';\nvar Page = function Page(_ref) {\n var kind = _ref.kind,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var size = useContext(ResponsiveContext);\n var theme = useContext(ThemeContext);\n var contentValue = useMemo(function () {\n var _theme$page$kind, _theme$page$kind2;\n return _extends({\n alignSelf: (_theme$page$kind = theme.page[kind]) == null ? void 0 : _theme$page$kind.alignSelf,\n width: (_theme$page$kind2 = theme.page[kind]) == null ? void 0 : _theme$page$kind2.width\n }, theme.page[kind][size]);\n }, [theme, size, kind]);\n return /*#__PURE__*/React.createElement(PageContext.Provider, {\n value: contentValue\n }, /*#__PURE__*/React.createElement(Box, _extends({\n fill: \"horizontal\"\n }, rest)));\n};\nPage.displayName = 'Page';\nPage.propTypes = PagePropTypes;\nPage.defaultProps = {\n kind: 'wide'\n};\nexport { Page };","export { Page } from './Page';\nexport { PageContext } from './PageContext';","import PropTypes from 'prop-types';\nimport { colorPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n background: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n color: colorPropType,\n dark: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n image: PropTypes.string,\n position: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.oneOf(['weak', 'medium', 'strong'])]),\n repeat: PropTypes.oneOfType([PropTypes.oneOf(['no-repeat', 'repeat']), PropTypes.string]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['cover', 'contain']), PropTypes.string]),\n light: PropTypes.string,\n fill: PropTypes.oneOf(['horizontal'])\n })])\n };\n}\nexport var PageContentPropTypes = PropType;","var _excluded = [\"children\", \"background\"];\nfunction _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext } from 'react';\nimport { Box } from '../Box';\nimport { PageContext } from '../Page';\nimport { PageContentPropTypes } from './propTypes';\nvar PageContent = function PageContent(_ref) {\n var children = _ref.children,\n background = _ref.background,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(PageContext),\n pageContext = _extends({}, (_objectDestructuringEmpty(_useContext), _useContext));\n if (background != null && background.fill) {\n return /*#__PURE__*/React.createElement(Box, {\n background: background\n }, /*#__PURE__*/React.createElement(Box, _extends({\n fill: \"horizontal\"\n }, pageContext, rest), children));\n }\n return /*#__PURE__*/React.createElement(Box, _extends({\n fill: \"horizontal\",\n background: background\n }, pageContext, rest), children);\n};\nPageContent.displayName = 'PageContent';\nPageContent.propTypes = PageContentPropTypes;\nexport { PageContent };","var _excluded = [\"actions\", \"gridProps\", \"parent\", \"responsive\", \"size\", \"subtitle\", \"title\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Header } from '../Header';\nimport { Heading } from '../Heading';\nimport { Grid } from '../Grid';\nimport { Paragraph } from '../Paragraph';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nvar sizeStyle = function sizeStyle(size, feature, theme, breakpoint) {\n var _ref, _theme$pageHeader$siz, _theme$global$breakpo, _theme$global$breakpo2;\n var style = _extends({}, theme.pageHeader[feature], (_ref = size && ((_theme$pageHeader$siz = theme.pageHeader.size[size]) == null ? void 0 : _theme$pageHeader$siz[feature])) != null ? _ref : theme.pageHeader[feature], (!size || size === 'medium') && feature === 'subtitle' && ((_theme$global$breakpo = theme.global.breakpoints[breakpoint]) == null ? void 0 : _theme$global$breakpo.value) <= ((_theme$global$breakpo2 = theme.global.breakpoints.small) == null ? void 0 : _theme$global$breakpo2.value) && {\n size: 'medium'\n });\n return style;\n};\nvar PageHeader = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var actions = _ref2.actions,\n gridPropsProp = _ref2.gridProps,\n parent = _ref2.parent,\n responsive = _ref2.responsive,\n size = _ref2.size,\n subtitle = _ref2.subtitle,\n title = _ref2.title,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n var theme = useContext(ThemeContext);\n var breakpoint = useContext(ResponsiveContext);\n var actionsProps = _extends({}, theme.pageHeader.actions);\n var gridProps = theme.pageHeader[breakpoint] || theme.pageHeader.medium;\n if (responsive && theme.pageHeader.responsive.breakpoints.includes(breakpoint)) {\n gridProps = _extends({}, gridProps, theme.pageHeader.responsive);\n actionsProps = _extends({}, actionsProps, theme.pageHeader.responsive.actions);\n }\n var _gridProps = gridProps,\n areas = _gridProps.areas,\n columns = _gridProps.columns,\n gap = _gridProps.gap,\n rows = _gridProps.rows;\n return /*#__PURE__*/React.createElement(Header, _extends({\n ref: ref,\n direction: \"column\",\n gap: \"none\",\n pad: sizeStyle(size, 'pad', theme)\n }, rest), /*#__PURE__*/React.createElement(Grid, _extends({\n columns: columns,\n rows: rows,\n areas: areas,\n gap: gap,\n fill: \"horizontal\"\n }, gridPropsProp), /*#__PURE__*/React.createElement(Box, _extends({\n gridArea: \"parent\"\n }, theme.pageHeader.parent), parent), /*#__PURE__*/React.createElement(Box, {\n gridArea: \"title\"\n }, typeof title === 'string' ? /*#__PURE__*/React.createElement(Heading, sizeStyle(size, 'title', theme), title) : title), /*#__PURE__*/React.createElement(Box, {\n gridArea: \"subtitle\"\n }, typeof subtitle === 'string' ? /*#__PURE__*/React.createElement(Paragraph, sizeStyle(size, 'subtitle', theme, breakpoint), subtitle) : subtitle), /*#__PURE__*/React.createElement(Box, _extends({\n gridArea: \"actions\"\n }, actionsProps), actions)));\n});\nPageHeader.displayName = 'PageHeader';\nexport { PageHeader };","import React from 'react';\nexport var NameValueListContext = /*#__PURE__*/React.createContext({});","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { Fragment, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { NameValueListContext } from '../NameValueList/NameValueListContext';\nvar NameValuePair = function NameValuePair(_ref) {\n var _theme$nameValuePair;\n var children = _ref.children,\n nameProp = _ref.name;\n var _useContext = useContext(NameValueListContext),\n nameProps = _useContext.nameProps,\n pairProps = _useContext.pairProps,\n valueProps = _useContext.valueProps;\n var size = useContext(ResponsiveContext);\n var theme = useContext(ThemeContext);\n var direction = pairProps == null ? void 0 : pairProps.direction;\n var column = direction === 'column' || direction === 'column-reverse' || size === 'small';\n var Container = column ? Box : Fragment;\n var nameAlign = size !== 'small' ? nameProps == null ? void 0 : nameProps.align : undefined;\n var valueAlign = size !== 'small' ? valueProps == null ? void 0 : valueProps.align : undefined;\n // using margin to act as gap\n //
elements must only directly contain\n // properly-ordered
and
groups\n var valueGap;\n if (column && (_theme$nameValuePair = theme.nameValuePair) != null && (_theme$nameValuePair = _theme$nameValuePair.column) != null && _theme$nameValuePair.gap) valueGap = {\n bottom: theme.nameValuePair.column.gap\n };\n var name;\n if (typeof nameProp === 'string' || typeof nameProp === 'number') name = /*#__PURE__*/React.createElement(Text, _extends({\n as: \"dt\",\n margin: valueGap,\n textAlign: nameAlign\n }, theme.nameValuePair.name), nameProp);else name = /*#__PURE__*/React.createElement(Box, {\n as: \"dt\",\n align: nameAlign\n }, nameProp);\n var value;\n if (typeof children === 'string' || typeof children === 'number') value =\n /*#__PURE__*/\n // override browser default margin for dd\n React.createElement(Text, _extends({\n as: \"dd\",\n margin: \"none\",\n textAlign: valueAlign\n }, theme.nameValuePair.value), children);else value =\n /*#__PURE__*/\n // override browser default margin for dd\n React.createElement(Box, {\n margin: \"none\",\n as: \"dd\",\n align: valueAlign\n }, children);\n var first = direction !== 'column-reverse' ? name : value;\n var second = direction !== 'column-reverse' ? value : name;\n return /*#__PURE__*/React.createElement(Container, null, first, second);\n};\nexport { NameValuePair };","var _excluded = [\"align\", \"layout\", \"nameProps\", \"pairProps\", \"valueProps\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Grid } from '../Grid';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { NameValueListContext } from './NameValueListContext';\nvar NameValueList = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _theme$nameValueList$;\n var align = _ref.align,\n _ref$layout = _ref.layout,\n layout = _ref$layout === void 0 ? 'column' : _ref$layout,\n nameProps = _ref.nameProps,\n _ref$pairProps = _ref.pairProps,\n pairProps = _ref$pairProps === void 0 ? {\n direction: 'row'\n } : _ref$pairProps,\n valueProps = _ref.valueProps,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var size = useContext(ResponsiveContext);\n var theme = useContext(ThemeContext);\n\n // If layout is grid, valueWidth sets the max width of the column.\n // Grid will 'fit' as many columns of valueWidth per row as container's\n // width allows.\n var columns;\n var valueWidth = (valueProps == null ? void 0 : valueProps.width) || theme.nameValueList.value.width;\n var nameWidth = (nameProps == null ? void 0 : nameProps.width) || theme.nameValueList.name.width;\n if (size === 'small' || layout === 'grid') columns = {\n count: 'fit',\n size: !Array.isArray(valueWidth) ? ['auto', valueWidth] : valueWidth\n };else if (layout === 'column' && pairProps.direction === 'row') columns = [nameWidth, !Array.isArray(valueWidth) ? ['auto', valueWidth] : valueWidth];else columns = [valueWidth];\n var gap = theme.nameValueList.gap;\n if ((pairProps.direction === 'column' || size === 'small') && (_theme$nameValueList$ = theme.nameValueList.pair) != null && (_theme$nameValueList$ = _theme$nameValueList$.column) != null && _theme$nameValueList$.gap) {\n gap = theme.nameValueList.pair.column.gap;\n }\n var listContextValue = useMemo(function () {\n return {\n nameProps: nameProps,\n pairProps: pairProps,\n valueProps: valueProps\n };\n }, [nameProps, pairProps, valueProps]);\n return /*#__PURE__*/React.createElement(NameValueListContext.Provider, {\n value: listContextValue\n }, /*#__PURE__*/React.createElement(Grid, _extends({\n as: \"dl\",\n ref: ref,\n align: align,\n columns: columns,\n gap: gap,\n margin: \"none\" // override browser default margin for dl\n }, rest)));\n});\nNameValueList.displayName = 'NameValueList';\nexport { NameValueList };","import PropTypes from 'prop-types';\nimport { AnchorPropTypes } from '../Anchor/propTypes';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n actions: PropTypes.arrayOf(PropTypes.shape(AnchorPropTypes)),\n global: PropTypes.bool,\n title: PropTypes.string,\n message: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n status: PropTypes.oneOf(['critical', 'warning', 'normal', 'info', 'unknown']),\n toast: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n autoClose: PropTypes.bool,\n position: PropTypes.oneOf(['bottom', 'bottom-left', 'bottom-right', 'center', 'end', 'hidden', 'left', 'right', 'start', 'top', 'top-left', 'top-right'])\n })]),\n onClose: PropTypes.func,\n icon: PropTypes.element,\n time: PropTypes.number\n };\n}\nexport var NotificationType = PropType;","var _excluded = [\"actions\", \"message\", \"onClose\", \"id\", \"global\", \"status\", \"title\", \"toast\", \"icon\", \"time\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useCallback, useContext, useEffect, useState, useMemo, Fragment } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Anchor } from '../Anchor';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Layer } from '../Layer';\nimport { Paragraph } from '../Paragraph';\nimport { Text } from '../Text';\nimport { NotificationType } from './propTypes';\nvar adaptThemeStyle = function adaptThemeStyle(value, theme) {\n var textStyle = value;\n var closeButtonStyle = value;\n if (typeof value === 'string' && theme.global.edgeSize[value]) {\n textStyle = {\n vertical: value,\n left: value,\n right: undefined\n };\n closeButtonStyle = {\n vertical: value,\n right: value\n };\n } else if (typeof value === 'object') {\n var left = value.left,\n right = value.right,\n top = value.top,\n bottom = value.bottom,\n horizontal = value.horizontal,\n vertical = value.vertical;\n textStyle = {\n top: top || vertical,\n bottom: bottom || vertical,\n left: left || horizontal,\n right: undefined\n };\n closeButtonStyle = {\n top: top || vertical,\n bottom: bottom || vertical,\n right: right || horizontal\n };\n }\n return [textStyle, closeButtonStyle];\n};\nvar NotificationAnchor = styled(Anchor).withConfig({\n displayName: \"Notification__NotificationAnchor\",\n componentId: \"sc-1yq09yz-0\"\n})([\"white-space:nowrap;\"]);\nvar Notification = function Notification(_ref) {\n var _theme$notification, _theme$notification2, _theme$notification3, _theme$notification4, _theme$notification5;\n var actionsProp = _ref.actions,\n messageProp = _ref.message,\n onClose = _ref.onClose,\n id = _ref.id,\n global = _ref.global,\n status = _ref.status,\n title = _ref.title,\n toast = _ref.toast,\n icon = _ref.icon,\n time = _ref.time,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var autoClose = toast && (toast == null ? void 0 : toast.autoClose) === undefined ? true : toast.autoClose;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(true),\n visible = _useState[0],\n setVisible = _useState[1];\n var position = useMemo(function () {\n return toast && (toast == null ? void 0 : toast.position) || 'top';\n }, [toast]);\n var close = useCallback(function (event) {\n setVisible(false);\n if (onClose) onClose(event);\n }, [onClose]);\n useEffect(function () {\n if (autoClose) {\n var timer = setTimeout(close, time || theme.notification.toast.time || theme.notification.time);\n return function () {\n return clearTimeout(timer);\n };\n }\n return undefined;\n }, [autoClose, close, theme.notification.toast.time, theme.notification.time, time]);\n var CloseIcon = theme.notification.close.icon;\n var _ref2 = ((_theme$notification = theme.notification) == null ? void 0 : _theme$notification[status]) || theme.notification.unknown,\n StatusIcon = _ref2.icon,\n color = _ref2.color;\n var closeIconColor = theme.notification.close.color;\n var kind = useMemo(function () {\n if (toast) return 'toast';\n if (global) return 'global';\n return undefined;\n }, [global, toast]);\n var direction;\n if (kind && theme.notification[kind].direction) direction = theme.notification[kind].direction;else direction = theme.notification.direction;\n var background;\n if (kind && (_theme$notification2 = theme.notification) != null && (_theme$notification2 = _theme$notification2[status]) != null && (_theme$notification2 = _theme$notification2[kind]) != null && _theme$notification2.background) background = theme.notification[status][kind].background;else if ((_theme$notification3 = theme.notification) != null && (_theme$notification3 = _theme$notification3[status]) != null && _theme$notification3.background) background = theme.notification[status].background;else background = ((_theme$notification4 = theme.notification) == null || (_theme$notification4 = _theme$notification4[kind]) == null || (_theme$notification4 = _theme$notification4.container) == null ? void 0 : _theme$notification4.background) || theme.notification.container.background;\n var TextWrapper = direction === 'row' ? Text : Fragment;\n\n // notification is built with two child boxes that contain:\n // 1. icon + text (wrapped in button when clickable)\n // 2. close button\n // pad needs to be applied to the child boxes, but we don't want to apply\n // extra padding between the icon + text and the button.\n var pad;\n if (kind && theme.notification[kind].container.pad) pad = theme.notification[kind].container.pad;else pad = theme.notification.container.pad;\n var textPad;\n var closeButtonPad;\n if (onClose) {\n var _adaptThemeStyle = adaptThemeStyle(pad, theme);\n textPad = _adaptThemeStyle[0];\n closeButtonPad = _adaptThemeStyle[1];\n } else textPad = pad;\n var actions;\n var message = messageProp;\n if (actionsProp) actions = actionsProp.map(function (action) {\n return /*#__PURE__*/React.createElement(Fragment, {\n key: action.label\n }, /*#__PURE__*/React.createElement(NotificationAnchor\n // create space between first anchor and\n // text content and next anchor\n , _extends({\n margin: {\n right: 'xsmall'\n }\n }, action, theme.notification.actions)), ' ');\n });\n var Message = direction !== 'row' ? Paragraph : Text;\n if (message || actions) message = typeof message === 'string' ? /*#__PURE__*/React.createElement(Message, theme.notification.message, /*#__PURE__*/React.createElement(Text, {\n margin: {\n right: 'xsmall'\n }\n }, message), actions) : message;\n var iconDimension = ((_theme$notification5 = theme.notification) == null || (_theme$notification5 = _theme$notification5.message) == null ? void 0 : _theme$notification5.size) || 'medium';\n var content = /*#__PURE__*/React.createElement(Box, _extends({}, theme.notification.container, global ? _extends({}, theme.notification.global.container) : {}, toast ? _extends({}, theme.notification.toast.container) : {}, {\n background: background\n // let internal box control pad\n ,\n pad: undefined,\n direction: \"row\",\n gap: \"small\",\n id: toast ? undefined : id\n }, rest), /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n pad: textPad,\n flex: true\n }, /*#__PURE__*/React.createElement(Box, theme.notification.iconContainer, icon || /*#__PURE__*/React.createElement(StatusIcon, {\n color: color,\n height: iconDimension\n })), /*#__PURE__*/React.createElement(Box, theme.notification.textContainer, /*#__PURE__*/React.createElement(TextWrapper, null, title && /*#__PURE__*/React.createElement(Text, theme.notification.title, title), message && title && direction === 'row' && /*#__PURE__*/React.createElement(React.Fragment, null, \"\\xA0\"), message))), onClose &&\n /*#__PURE__*/\n // theme.notification.container and textContainer may both have pad,\n // account for both\n React.createElement(Box, {\n pad: closeButtonPad\n }, /*#__PURE__*/React.createElement(Box, theme.notification.textContainer, /*#__PURE__*/React.createElement(Button, {\n icon: /*#__PURE__*/React.createElement(CloseIcon, {\n color: closeIconColor,\n height: iconDimension,\n width: iconDimension\n }),\n onClick: close,\n hoverIndicator: true,\n plain: true\n }))));\n if (toast) {\n content = visible && /*#__PURE__*/React.createElement(Layer, _extends({}, theme.notification.toast.layer, {\n role: \"log\",\n modal: false,\n onEsc: onClose,\n id: id,\n responsive: false,\n plain: true,\n position: position\n }), content);\n }\n return content;\n};\nNotification.defaultProps = {\n status: 'unknown',\n toast: false\n};\nObject.setPrototypeOf(Notification.defaultProps, defaultProps);\nNotification.displayName = 'Notification';\nNotification.propTypes = NotificationType;\nexport { Notification };","import styled, { css } from 'styled-components';\nimport { disabledStyle, edgeStyle, focusStyle, normalizeColor, parseMetricToNum, getRGBA } from '../../utils';\nimport { defaultProps } from '../../default-props';\n\n// opacity of the bound trumps the track opacity\nvar getBoundOpacity = function getBoundOpacity(props, bound) {\n return props.theme.rangeInput && props.theme.rangeInput.track && props.theme.rangeInput.track[bound] && props.theme.rangeInput.track[bound].opacity ? props.theme.rangeInput.track[bound].opacity : 1;\n};\nvar getBoundColor = function getBoundColor(props, bound) {\n if (props.theme.rangeInput && props.theme.rangeInput.track && props.theme.rangeInput.track[bound] && props.theme.rangeInput.track[bound].color) {\n return getRGBA(normalizeColor(props.theme.rangeInput.track[bound].color, props.theme), getBoundOpacity(props, bound));\n }\n // If bound color is undefined pick the default track color with bound opacity\n return getRGBA(normalizeColor(props.theme.rangeInput.track.color, props.theme), getBoundOpacity(props, bound));\n};\nvar trackColorStyle = function trackColorStyle(props) {\n var _props$theme$rangeInp, _props$theme$rangeInp2;\n var max = props.max,\n min = props.min;\n var thumbPosition = ((props.value || 0) - min) / (max - min) * 100 + \"%\";\n var defaultTrackColor;\n\n // backward compatibility in case no bounds are defined\n if (props.theme.rangeInput && props.theme.rangeInput.track && !props.theme.rangeInput.track.lower && !props.theme.rangeInput.track.upper) {\n var color = getRGBA(normalizeColor(props.theme.rangeInput.track.color, props.theme), 0.2);\n // Since the track color was changed from border-with-opacity to just border\n // this condition is used to make sure we are applying the opacity correctly\n // for 'border' color (for backward compatibility purposes).\n if (color === 'rgba(0, 0, 0, 0.2)') {\n defaultTrackColor = color;\n }\n // no bounds are defined but color may have changed\n else {\n defaultTrackColor = getRGBA(normalizeColor(props.theme.rangeInput.track.color, props.theme), props.theme.rangeInput.track.opacity || 1);\n }\n if (!props.color) return \"background: \" + defaultTrackColor;\n }\n var upperTrackColor = (_props$theme$rangeInp = props.theme.rangeInput.track) != null && _props$theme$rangeInp.upper ? getBoundColor(props, 'upper') : defaultTrackColor;\n var lowerTrackColor = (_props$theme$rangeInp2 = props.theme.rangeInput.track) != null && _props$theme$rangeInp2.lower ? getBoundColor(props, 'lower') : getRGBA(normalizeColor(props.theme.global.colors.control, props.theme), props.theme.rangeInput.track.opacity || 1);\n if (typeof props.color === 'string' || typeof props.color === 'object' && !Array.isArray(props.color)) {\n lowerTrackColor = normalizeColor(props.color, props.theme);\n return \"background: linear-gradient(\\n to right,\\n \" + lowerTrackColor + \",\\n \" + lowerTrackColor + \" \" + thumbPosition + \",\\n \" + upperTrackColor + \" \" + thumbPosition + \",\\n \" + upperTrackColor + \"\\n );\\n \";\n }\n if (Array.isArray(props.color)) {\n var arrayOfTrackColors = props.color;\n var valuePercentage = 0;\n var result = \"background: linear-gradient(to right,\";\n for (var index = 0; index < arrayOfTrackColors.length; index += 1) {\n var _arrayOfTrackColors$i = arrayOfTrackColors[index],\n value = _arrayOfTrackColors$i.value,\n _color = _arrayOfTrackColors$i.color,\n opacity = _arrayOfTrackColors$i.opacity;\n result += getRGBA(normalizeColor(_color, props.theme), opacity || 1) + \" \" + valuePercentage + \"%,\";\n if (props.value >= value) {\n valuePercentage = (value - min) / (max - min) * 100;\n result += getRGBA(normalizeColor(_color, props.theme), opacity || 1) + \" \" + valuePercentage + \"%,\";\n } else {\n result += getRGBA(normalizeColor(_color, props.theme), opacity || 1) + \" \" + thumbPosition + \",\";\n result += upperTrackColor + \" \" + thumbPosition + \", \" + upperTrackColor + \")\";\n break;\n }\n if (index === arrayOfTrackColors.length - 1) {\n result += upperTrackColor + \" \" + valuePercentage + \"%, \" + upperTrackColor + \")\";\n }\n }\n return result;\n }\n return \"background: linear-gradient(\\n to right,\\n \" + lowerTrackColor + \",\\n \" + lowerTrackColor + \" \" + thumbPosition + \",\\n \" + upperTrackColor + \" \" + thumbPosition + \",\\n \" + upperTrackColor + \"\\n );\\n \";\n};\nvar disabledRangeInputStyle = function disabledRangeInputStyle(props, context) {\n var _props$theme$rangeInp3;\n return css([\"\", \" \", \"\"], disabledStyle(props.theme.rangeInput.disabled.opacity), ((_props$theme$rangeInp3 = props.theme.rangeInput.disabled[context]) == null ? void 0 : _props$theme$rangeInp3.color) && \"background: \" + normalizeColor(props.theme.rangeInput.disabled[context].color, props.theme) + \";\");\n};\nvar hoverStyle = function hoverStyle(props) {\n return css([\"box-shadow:0px 0px 0px 2px \", \";\"], normalizeColor(props.theme.rangeInput.thumb.color || 'control', props.theme));\n};\nvar rangeTrackStyle = css([\"box-sizing:border-box;width:100%;height:\", \";\", \";\", \" \", \";\"], function (props) {\n return props.theme.rangeInput.track.height;\n}, function (props) {\n return trackColorStyle(props);\n}, function (props) {\n return props.theme.rangeInput && props.theme.rangeInput.track && props.theme.rangeInput.track.extend;\n}, function (props) {\n var _props$theme;\n return props.disabled && ((_props$theme = props.theme) == null || (_props$theme = _props$theme.rangeInput) == null ? void 0 : _props$theme.disabled) && disabledRangeInputStyle(props, 'track');\n});\nvar rangeThumbStyle = css([\"box-sizing:border-box;position:relative;border-radius:\", \";height:\", \";width:\", \";overflow:visible;background:\", \";-webkit-appearance:none;cursor:pointer;\", \" \", \";\"], function (props) {\n return props.theme.global.spacing;\n}, function (props) {\n return props.theme.global.spacing;\n}, function (props) {\n return props.theme.global.spacing;\n}, function (props) {\n return normalizeColor(props.theme.rangeInput.thumb.color || 'control', props.theme);\n}, function (props) {\n return props.theme.rangeInput && props.theme.rangeInput.thumb && props.theme.rangeInput.thumb.extend;\n}, function (props) {\n var _props$theme2;\n return props.disabled && ((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.rangeInput) == null ? void 0 : _props$theme2.disabled) && disabledRangeInputStyle(props, 'thumb');\n});\nvar firefoxMicrosoftThumbStyle = css([\"\", \" margin-top:0px;height:\", \";width:\", \";\", \" \", \"\"], rangeThumbStyle, function (props) {\n return props.theme.global.spacing;\n}, function (props) {\n return props.theme.global.spacing;\n}, function (props) {\n return props.focus && props.focusIndicator && focusStyle();\n}, function (props) {\n return props.theme.rangeInput && props.theme.rangeInput.thumb && props.theme.rangeInput.thumb.extend;\n});\n\n/* eslint-disable max-len */\nvar StyledRangeInput = styled.input.withConfig({\n displayName: \"StyledRangeInput\",\n componentId: \"sc-15st9ck-0\"\n})([\"box-sizing:border-box;position:relative;-webkit-appearance:none;border-color:transparent;height:\", \";width:100%;padding:0px;cursor:\", \";background:transparent;margin:0px;\", \" &::-moz-focus-inner{border:none;}&::-moz-focus-outer{border:none;}&::-webkit-slider-runnable-track{\", \"}&::-webkit-slider-thumb{margin-top:-\", \"px;\", \" \", \" \", \"}&::-moz-range-track{\", \"}&::-moz-range-thumb{\", \"}&::-ms-thumb{\", \"}\", \" &::-ms-track{\", \" border-color:transparent;color:transparent;}&::-ms-fill-lower{\", \";border-color:transparent;}&::-ms-fill-upper{\", \";border-color:transparent;}&:focus::-webkit-slider-thumb{\", \"}&:focus-visible{outline:0;}&:focus{outline:none;}\", \"\"], function (props) {\n return props.theme.global.spacing;\n}, function (props) {\n return props.disabled ? 'default' : 'pointer';\n}, function (props) {\n return props.theme.rangeInput.pad && edgeStyle('padding', props.theme.rangeInput.pad, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, rangeTrackStyle, function (props) {\n return (parseMetricToNum(props.theme.global.spacing) - parseMetricToNum(props.theme.rangeInput.track.height || 0)) * 0.5;\n}, rangeThumbStyle, function (props) {\n return !props.disabled && css([\"&:hover{\", \"}\"], hoverStyle(props));\n}, function (props) {\n return props.focus && !props.focusIndicator && css([\"\", \"\"], hoverStyle(props));\n}, rangeTrackStyle, firefoxMicrosoftThumbStyle, firefoxMicrosoftThumbStyle, function (props) {\n return !props.disabled && css([\"&:hover::-moz-range-thumb{\", \"}&:hover::-ms-thumb{\", \"}\"], hoverStyle(props), hoverStyle(props));\n}, rangeTrackStyle, function (props) {\n return trackColorStyle(props, 'lower');\n}, function (props) {\n return trackColorStyle(props, 'upper');\n}, function (props) {\n return props.focus && props.focusIndicator && focusStyle();\n}, function (props) {\n return props.theme.rangeInput && props.theme.rangeInput.extend;\n});\n/* eslint-enable max-len */\n\nStyledRangeInput.defaultProps = {};\nObject.setPrototypeOf(StyledRangeInput.defaultProps, defaultProps);\nexport { StyledRangeInput };","import PropTypes from 'prop-types';\nimport { colorPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n a11yTitle: PropTypes.string,\n color: PropTypes.oneOfType([colorPropType, PropTypes.arrayOf(PropTypes.shape({\n color: colorPropType.isRequired,\n value: PropTypes.number.isRequired,\n opacity: PropTypes.number\n }))]),\n id: PropTypes.string,\n min: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n max: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n name: PropTypes.string,\n onChange: PropTypes.func,\n step: PropTypes.number,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n };\n}\nexport var RangeInputPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"color\", \"focus\", \"focusIndicator\", \"name\", \"onChange\", \"onFocus\", \"onBlur\", \"value\", \"step\", \"min\", \"max\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useState, useCallback, useEffect } from 'react';\nimport { FormContext } from '../Form/FormContext';\nimport { StyledRangeInput } from './StyledRangeInput';\nimport { RangeInputPropTypes } from './propTypes';\nimport { useForwardedRef } from '../../utils';\nvar RangeInput = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n color = _ref.color,\n focusProp = _ref.focus,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n name = _ref.name,\n _onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n _onBlur = _ref.onBlur,\n valueProp = _ref.value,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 1 : _ref$step,\n _ref$min = _ref.min,\n min = _ref$min === void 0 ? 0 : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 100 : _ref$max,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var formContext = useContext(FormContext);\n var _useState = useState(focusProp),\n focus = _useState[0],\n setFocus = _useState[1];\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n var _useState2 = useState({\n x: null,\n y: null\n }),\n scroll = _useState2[0],\n setScroll = _useState2[1];\n var rangeInputRef = useForwardedRef(ref);\n useEffect(function () {\n var x = scroll.x,\n y = scroll.y;\n if (x !== null && y !== null) {\n var handleScrollTo = function handleScrollTo() {\n return window.scrollTo(x, y);\n };\n window.addEventListener('scroll', handleScrollTo);\n return function () {\n return window.removeEventListener('scroll', handleScrollTo);\n };\n }\n return undefined;\n }, [scroll]);\n var setRangeInputValue = useCallback(function (nextValue) {\n if (nextValue > max || nextValue < min) return;\n // Calling set value function directly on input because React library\n // overrides setter `event.target.value =` and loses original event\n // target fidelity.\n // https://stackoverflow.com/a/46012210\n var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;\n nativeInputValueSetter.call(rangeInputRef.current, nextValue);\n var event = new Event('input', {\n bubbles: true\n });\n rangeInputRef.current.dispatchEvent(event);\n }, [rangeInputRef, min, max]);\n var handleOnWheel = function handleOnWheel(event) {\n var newValue = parseFloat(value);\n if (event.deltaY < 0) {\n setRangeInputValue(newValue + step);\n } else {\n setRangeInputValue(newValue - step);\n }\n };\n // This is to make sure scrollbar doesn't move\n // when user changes RangeInput value.\n var handleMouseOver = function handleMouseOver() {\n return setScroll({\n x: window.scrollX,\n y: window.scrollY\n });\n };\n var handleMouseOut = function handleMouseOut() {\n return setScroll({\n x: null,\n y: null\n });\n };\n return /*#__PURE__*/React.createElement(StyledRangeInput, _extends({\n \"aria-label\": a11yTitle,\n \"aria-valuemax\": max,\n \"aria-valuemin\": min,\n \"aria-valuenow\": value,\n ref: rangeInputRef,\n name: name,\n focus: focus,\n focusIndicator: focusIndicator,\n value: value\n }, rest, {\n color: color,\n onFocus: function onFocus(event) {\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n },\n onChange: function onChange(event) {\n setValue(event.target.value);\n if (_onChange) _onChange(event);\n },\n onMouseOver: handleMouseOver,\n onMouseOut: handleMouseOut,\n onWheel: handleOnWheel,\n step: step,\n type: \"range\",\n min: min,\n max: max\n }));\n});\nRangeInput.displayName = 'RangeInput';\nRangeInput.propTypes = RangeInputPropTypes;\nexport { RangeInput };","var _excluded = [\"path\", \"method\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Anchor } from '../Anchor';\nvar RoutedAnchor = /*#__PURE__*/function (_Component) {\n _inheritsLoose(RoutedAnchor, _Component);\n function RoutedAnchor() {\n return _Component.apply(this, arguments) || this;\n }\n var _proto = RoutedAnchor.prototype;\n _proto.render = function render() {\n var _this = this;\n var _this$props = this.props,\n path = _this$props.path,\n method = _this$props.method,\n rest = _objectWithoutPropertiesLoose(_this$props, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"This component will be deprecated in the upcoming releases. \\n Please refer to https://github.com/grommet/grommet/issues/2855 \\n for more information.\");\n }\n return /*#__PURE__*/React.createElement(Anchor, _extends({}, rest, {\n href: path,\n onClick: function onClick(event) {\n var onClick = _this.props.onClick;\n var router = _this.context.router;\n if (event) {\n var modifierKey = event.ctrlKey || event.metaKey;\n\n // if the user right-clicked in the Anchor we should let it go\n if (modifierKey) {\n return;\n }\n }\n if (router) {\n event.preventDefault();\n (router.history || router)[method](path);\n }\n if (onClick) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n onClick.apply(void 0, [event].concat(args));\n }\n }\n }));\n };\n return RoutedAnchor;\n}(Component);\nRoutedAnchor.contextTypes = {\n router: PropTypes.shape({}).isRequired\n};\nRoutedAnchor.defaultProps = {\n method: 'push'\n};\nexport { RoutedAnchor };","var _excluded = [\"href\", \"path\", \"method\", \"onClick\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from '../Button';\nvar RoutedButton = /*#__PURE__*/function (_Component) {\n _inheritsLoose(RoutedButton, _Component);\n function RoutedButton() {\n var _this;\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n _this = _Component.call.apply(_Component, [this].concat(_args)) || this;\n _this.onClick = function (event) {\n var _this$props = _this.props,\n method = _this$props.method,\n onClick = _this$props.onClick,\n path = _this$props.path;\n var router = _this.context.router;\n if (event) {\n var modifierKey = event.ctrlKey || event.metaKey;\n\n // if the user right-clicked in the button we should let it go\n if (modifierKey) {\n return;\n }\n }\n if (router) {\n event.preventDefault();\n (router.history || router)[method](path);\n }\n if (onClick) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n onClick.apply(void 0, [event].concat(args));\n }\n };\n return _this;\n }\n var _proto = RoutedButton.prototype;\n _proto.render = function render() {\n var _this$props2 = this.props,\n href = _this$props2.href,\n path = _this$props2.path,\n method = _this$props2.method,\n onClick = _this$props2.onClick,\n rest = _objectWithoutPropertiesLoose(_this$props2, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"This component will be deprecated in the upcoming releases.\\n Please refer to https://github.com/grommet/grommet/issues/2855\\n for more information.\");\n }\n return /*#__PURE__*/React.createElement(Button, _extends({}, rest, {\n href: path || href,\n disabled: !path && !onClick,\n onClick: this.onClick\n }));\n };\n return RoutedButton;\n}(Component);\nRoutedButton.contextTypes = {\n router: PropTypes.shape({}).isRequired\n};\nRoutedButton.defaultProps = {\n method: 'push'\n};\nexport { RoutedButton };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.node,\n footer: PropTypes.node,\n header: PropTypes.node\n };\n}\nexport var SidebarPropTypes = PropType;","var _excluded = [\"children\", \"footer\", \"header\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport { Box } from '../Box';\nimport { SidebarPropTypes } from './propTypes';\nexport var Sidebar = function Sidebar(_ref) {\n var children = _ref.children,\n footer = _ref.footer,\n header = _ref.header,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Box, _extends({\n pad: \"small\",\n gap: \"large\",\n height: {\n min: '100%'\n }\n }, rest), header, /*#__PURE__*/React.createElement(Box, {\n flex: true\n }, children), footer);\n};\nSidebar.propTypes = SidebarPropTypes;\nSidebar.defaultProps = {\n children: undefined,\n footer: undefined,\n header: undefined\n};","var _excluded = [\"id\", \"label\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef } from 'react';\nimport { Anchor } from '../Anchor';\nexport var SkipLink = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var id = _ref.id,\n label = _ref.label,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Anchor, _extends({\n href: \"#\" + id,\n ref: ref,\n label: label\n }, rest));\n});","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.node.isRequired,\n messages: PropTypes.shape({\n skipTo: PropTypes.string\n })\n };\n}\nexport var SkipLinksPropTypes = PropType;","import React, { Children, cloneElement, useContext, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { Layer } from '../Layer';\nimport { defaultProps } from '../../default-props';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { SkipLinksPropTypes } from './propTypes';\nvar SkipLinks = function SkipLinks(_ref) {\n var children = _ref.children,\n id = _ref.id,\n messages = _ref.messages;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(false),\n showLayer = _useState[0],\n setShowLayer = _useState[1];\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var layerRef = useRef(null);\n var onFocus = function onFocus() {\n setShowLayer(true);\n };\n var removeLayer = function removeLayer() {\n setShowLayer(false);\n };\n var onBlur = function onBlur() {\n // timeout needed so it gives enough time for activeElement to be updated\n setTimeout(function () {\n var layerNode = layerRef.current;\n if (layerNode && !layerNode.contains(document.activeElement)) {\n // close the layer when the activeElement isn't contained in the layer\n removeLayer();\n }\n }, 0);\n };\n return /*#__PURE__*/React.createElement(Layer, {\n id: id,\n position: showLayer ? theme.skipLinks.position : 'hidden',\n ref: layerRef,\n onFocus: onFocus,\n onBlur: onBlur,\n modal: false\n // Prepend the Layer so any SkipLink will be the first element that\n // pressing the Tab key reaches, targetChildPosition triggers prepend.\n ,\n targetChildPosition: \"first\"\n // Non-modal Layer's will take the full screen at small breakpoints\n // by default, which isn't what we want, hence setting responsive false\n ,\n responsive: false\n }, /*#__PURE__*/React.createElement(Box, theme.skipLinks.container, /*#__PURE__*/React.createElement(Text, theme.skipLinks.label, format({\n id: 'skipLinks.skipTo',\n messages: messages\n })), /*#__PURE__*/React.createElement(Box, {\n align: \"center\",\n gap: \"medium\"\n }, Children.map(children, function (child, index) {\n return child && /*#__PURE__*/cloneElement(child, {\n // eslint-disable-next-line react/no-array-index-key\n key: \"skip-link-\" + index,\n onClick: removeLayer\n });\n }))));\n};\nSkipLinks.defaultProps = {};\nSkipLinks.propTypes = SkipLinksPropTypes;\nexport { SkipLinks };","var _excluded = [\"label\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Anchor } from '../Anchor';\nvar HiddenAnchor = styled(Anchor).withConfig({\n displayName: \"SkipLinkTarget__HiddenAnchor\",\n componentId: \"sc-16wjfgk-0\"\n})([\"width:0;height:0;overflow:hidden;position:absolute;\"]);\nexport var SkipLinkTarget = function SkipLinkTarget(_ref) {\n var label = _ref.label,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(HiddenAnchor, _extends({}, rest, {\n tabIndex: \"-1\",\n \"aria-hidden\": \"true\"\n }), label);\n};","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n color: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n })]),\n message: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n start: PropTypes.string,\n end: PropTypes.string\n })])\n };\n}\nexport var SpinnerPropTypes = PropType;","var _excluded = [\"ref\", \"size\"],\n _excluded2 = [\"children\", \"color\", \"size\", \"message\"],\n _excluded3 = [\"size\", \"color\", \"border\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { isValidElement, forwardRef, useContext, useEffect } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { AnnounceContext } from '../../contexts/AnnounceContext';\nimport { Box } from '../Box';\nimport { defaultProps } from '../../default-props';\nimport { SpinnerPropTypes } from './propTypes';\nvar BasicSpinner = function BasicSpinner(_ref) {\n var ref = _ref.ref,\n size = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Box, _extends({\n flex: false,\n height: size,\n width: size,\n ref: ref\n }, rest));\n};\n/**\n * If the user is calling … with children, it will take\n * precedence over theme styling. Yet, it will still inherit the\n * default animation and size of the spinner, and of course any additional\n * given props.\n *\n * If the user is providing an icon/svg via the theme.spinner.icon,\n * the Spinner will use it as a child and will include all its relevant\n * theme props (size/color/pad…) as well,\n * user will only need to type .\n * If the icon has its own animation, user can turn it off via the theme.\n *\n * If none of the above is provider, will provide its default\n * border, size and friends, all configurable via theme or props.\n */\nvar Spinner = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var children = _ref2.children,\n colorProp = _ref2.color,\n size = _ref2.size,\n message = _ref2.message,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var announce = useContext(AnnounceContext);\n useEffect(function () {\n if (message != null && message.start) announce(message.start);else if (typeof message === 'string') announce(message);\n return function () {\n return (message == null ? void 0 : message.end) && announce(message.end);\n };\n }, [announce, message]);\n\n // Avoid color and size leaking into the DOM\n var _theme$spinner$contai = theme.spinner.container,\n sizeThemeProp = _theme$spinner$contai.size,\n colorThemeProp = _theme$spinner$contai.color,\n borderThemeProp = _theme$spinner$contai.border,\n themeProps = _objectWithoutPropertiesLoose(_theme$spinner$contai, _excluded3);\n var normalizedSize = size || sizeThemeProp;\n var spinnerSize = theme.spinner.size[normalizedSize] || normalizedSize;\n var color = colorProp || colorThemeProp;\n var Icon = theme.spinner.icon;\n var defaultBorder = [{\n side: 'all',\n color: 'background-contrast',\n size: size\n }, {\n side: 'top',\n color: color,\n size: size\n }];\n var spinnerBorder = Array.isArray(borderThemeProp) ? borderThemeProp.map(function (borderSide) {\n return _extends({}, borderSide, {\n color: borderSide.side === 'all' ? borderSide.color || 'background-contrast' : color\n });\n }) : borderThemeProp;\n\n // children will take precedence over theme attributes\n if (children) {\n return /*#__PURE__*/React.createElement(BasicSpinner, _extends({\n size: spinnerSize,\n ref: ref\n }, rest), children);\n }\n\n // In case icon is provided by the theme\n if (Icon) return /*#__PURE__*/React.createElement(BasicSpinner, _extends({\n size: spinnerSize,\n ref: ref\n }, themeProps, rest), /*#__PURE__*/isValidElement(Icon) ? Icon : /*#__PURE__*/React.createElement(Icon, {\n size: spinnerSize,\n color: color\n }));\n return /*#__PURE__*/React.createElement(BasicSpinner, _extends({\n size: spinnerSize,\n ref: ref,\n border: typeof borderThemeProp === 'undefined' ? defaultBorder : spinnerBorder\n }, themeProps, rest));\n});\nSpinner.displayName = 'Spinner';\nSpinner.propTypes = SpinnerPropTypes;\nexport { Spinner };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useContext, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Star } from 'grommet-icons/icons/Star';\nimport { StarOutline } from 'grommet-icons/icons/StarOutline';\nimport { RadioButtonGroup } from '../RadioButtonGroup';\nvar StarRating = function StarRating(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var theme = useContext(ThemeContext);\n var _useState = useState(),\n value = _useState[0],\n setValue = _useState[1];\n var options = [];\n for (var i = 1; i < 6; i += 1) {\n options.push(i);\n }\n return /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({\n direction: \"row\",\n options: options,\n onChange: function onChange(event) {\n setValue(event.target.value);\n }\n }, rest), function (option) {\n var _theme$starRating, _theme$starRating2;\n return option <= value ? /*#__PURE__*/React.createElement(Star, {\n color: (_theme$starRating = theme.starRating) == null ? void 0 : _theme$starRating.color\n }) : /*#__PURE__*/React.createElement(StarOutline, {\n color: (_theme$starRating2 = theme.starRating) == null ? void 0 : _theme$starRating2.color\n });\n });\n};\nStarRating.displayName = 'StarRating';\nexport { StarRating };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n name: PropTypes.string,\n value: PropTypes.string.isRequired,\n onClick: PropTypes.func,\n onRemove: PropTypes.func,\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string])\n });\n}\nexport var TagPropTypes = PropType;","import styled from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { borderStyle, roundStyle } from '../../utils';\nimport { Button } from '../Button';\nexport var StyledTagButton = styled(Button).withConfig({\n displayName: \"StyledTag__StyledTagButton\",\n componentId: \"sc-cb9fl2-0\"\n})([\"\", \" \", \"\"], function (props) {\n return props.border && borderStyle(props.border, true, props.theme);\n}, function (props) {\n return props.round && roundStyle(props.round, true, props.theme);\n});\nStyledTagButton.defaultProps = {};\nObject.setPrototypeOf(StyledTagButton.defaultProps, defaultProps);\nexport var StyledRemoveButton = styled(Button).withConfig({\n displayName: \"StyledTag__StyledRemoveButton\",\n componentId: \"sc-cb9fl2-1\"\n})([\"\", \"\"], function (props) {\n return props.round && roundStyle(props.round, true, props.theme);\n});\nStyledRemoveButton.defaultProps = {};\nObject.setPrototypeOf(StyledRemoveButton.defaultProps, defaultProps);","var _excluded = [\"name\", \"value\", \"size\", \"onRemove\", \"onClick\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { FormClose } from 'grommet-icons/icons/FormClose';\nimport { defaultProps } from '../../default-props';\nimport { TagPropTypes } from './propTypes';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { StyledRemoveButton, StyledTagButton } from './StyledTag';\nvar Tag = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _theme$tag$size, _theme$tag$size2, _theme$tag$size3, _theme$tag$size4;\n var name = _ref.name,\n value = _ref.value,\n size = _ref.size,\n onRemove = _ref.onRemove,\n onClick = _ref.onClick,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var containerProps = _extends({\n ref: ref,\n align: 'center',\n background: theme.tag.background,\n border: theme.tag.border,\n round: ((_theme$tag$size = theme.tag.size) == null || (_theme$tag$size = _theme$tag$size[size]) == null ? void 0 : _theme$tag$size.round) || theme.tag.round\n }, rest);\n var contents = /*#__PURE__*/React.createElement(Box, {\n width: {\n min: 'min-content'\n },\n pad: ((_theme$tag$size2 = theme.tag.size) == null || (_theme$tag$size2 = _theme$tag$size2[size]) == null ? void 0 : _theme$tag$size2.pad) || theme.tag.pad\n }, /*#__PURE__*/React.createElement(Text, {\n size: size\n }, name && /*#__PURE__*/React.createElement(Text, _extends({}, theme.tag.name, {\n size: size\n }), ' ', name), name && value ? /*#__PURE__*/React.createElement(Text, {\n size: size\n }, theme.tag.separator) : '', value && /*#__PURE__*/React.createElement(Text, _extends({}, theme.tag.value, {\n size: size\n }), value)));\n if (onClick && onRemove) {\n console.warn('Tag cannot combine \"onClick\" and \"onRemove\".');\n }\n return onRemove || !onClick ? /*#__PURE__*/React.createElement(Box, _extends({\n flex: false,\n direction: \"row\",\n width: {\n min: 'min-content'\n }\n }, containerProps), contents, onRemove && /*#__PURE__*/React.createElement(StyledRemoveButton, _extends({\n onClick: onRemove,\n plain: true,\n hoverIndicator: true,\n focusIndicator: true,\n icon: /*#__PURE__*/React.createElement(FormClose, (_theme$tag$size3 = theme.tag.size) == null || (_theme$tag$size3 = _theme$tag$size3[size]) == null ? void 0 : _theme$tag$size3.icon),\n round: ((_theme$tag$size4 = theme.tag.size) == null || (_theme$tag$size4 = _theme$tag$size4[size]) == null ? void 0 : _theme$tag$size4.round) || theme.tag.round\n }, theme.tag.remove))) : /*#__PURE__*/React.createElement(StyledTagButton, _extends({\n flex: false,\n plain: true,\n onClick: onClick,\n hoverIndicator: true,\n focusIndicator: true\n }, containerProps), contents);\n});\nTag.displayName = 'Tag';\nTag.prototype = TagPropTypes;\nexport { Tag };","import styled, { css } from 'styled-components';\nimport { disabledStyle, inputStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar plainStyle = css([\"outline:none;border:none;width:100%;-webkit-appearance:none;\"]);\nvar resizeStyle = function resizeStyle(resize) {\n if (resize === 'horizontal') {\n return 'resize: horizontal;';\n }\n if (resize === 'vertical') {\n return 'resize: vertical;';\n }\n if (resize) {\n return 'resize: both;';\n }\n return 'resize: none;';\n};\nvar StyledTextArea = styled.textarea.withConfig({\n displayName: \"StyledTextArea\",\n componentId: \"sc-17i3mwp-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \";max-width:100%;\"], inputStyle, function (props) {\n return props.resize !== undefined && resizeStyle(props.resize);\n}, function (props) {\n return props.fillArg && 'height: 100%;';\n}, function (props) {\n return props.plain && plainStyle;\n}, function (props) {\n return props.disabled && disabledStyle(props.theme.textArea.disabled && props.theme.textArea.disabled.opacity);\n}, function (props) {\n return props.theme.textArea && props.theme.textArea.extend;\n});\nStyledTextArea.defaultProps = {};\nObject.setPrototypeOf(StyledTextArea.defaultProps, defaultProps);\nexport { StyledTextArea };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n a11yTitle: PropTypes.string,\n id: PropTypes.string,\n fill: PropTypes.bool,\n focusIndicator: PropTypes.bool,\n name: PropTypes.string,\n onChange: PropTypes.func,\n placeholder: PropTypes.string,\n plain: PropTypes.bool,\n value: PropTypes.string,\n resize: PropTypes.oneOfType([PropTypes.oneOf(['vertical', 'horizontal']), PropTypes.bool]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', '2xl', '3xl', '4xl', '5xl', '6xl']), PropTypes.string])\n };\n}\nexport var TextAreaPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"fill\", \"focusIndicator\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"onKeyDown\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useState } from 'react';\nimport { FormContext } from '../Form/FormContext';\nimport { Keyboard } from '../Keyboard';\nimport { StyledTextArea } from './StyledTextArea';\nimport { TextAreaPropTypes } from './propTypes';\nvar TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n fill = _ref.fill,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n name = _ref.name,\n _onBlur = _ref.onBlur,\n _onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n onKeyDown = _ref.onKeyDown,\n valueProp = _ref.value,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var formContext = useContext(FormContext);\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n return /*#__PURE__*/React.createElement(Keyboard, {\n onEsc: function onEsc(event) {\n // we have to stop both synthetic events and native events\n // drop and layer should not close by pressing esc on this input\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation();\n },\n onKeyDown: onKeyDown\n }, /*#__PURE__*/React.createElement(StyledTextArea, _extends({\n \"aria-label\": a11yTitle,\n ref: ref,\n name: name,\n fillArg: fill,\n focus: focus,\n value: value,\n focusIndicator: focusIndicator\n }, rest, {\n onFocus: function onFocus(event) {\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n },\n onChange: function onChange(event) {\n setValue(event.target.value);\n if (_onChange) _onChange(event);\n }\n })));\n});\nTextArea.displayName = 'TextArea';\nTextArea.propTypes = TextAreaPropTypes;\nexport { TextArea };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Like } from 'grommet-icons/icons/Like';\nimport { LikeFill } from 'grommet-icons/icons/LikeFill';\nimport { Dislike } from 'grommet-icons/icons/Dislike';\nimport { DislikeFill } from 'grommet-icons/icons/DislikeFill';\nimport { RadioButtonGroup } from '../RadioButtonGroup';\nvar ThumbsRating = function ThumbsRating(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var theme = useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({\n direction: \"row\",\n options: ['like', 'dislike']\n }, rest), function (option, _ref2) {\n var _theme$thumbsRating3, _theme$thumbsRating4;\n var checked = _ref2.checked;\n if (option === 'like') {\n var _theme$thumbsRating, _theme$thumbsRating2;\n return checked ? /*#__PURE__*/React.createElement(LikeFill, {\n color: (_theme$thumbsRating = theme.thumbsRating) == null || (_theme$thumbsRating = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating.color\n }) : /*#__PURE__*/React.createElement(Like, {\n color: (_theme$thumbsRating2 = theme.thumbsRating) == null || (_theme$thumbsRating2 = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2.color\n });\n }\n return checked ? /*#__PURE__*/React.createElement(DislikeFill, {\n color: (_theme$thumbsRating3 = theme.thumbsRating) == null || (_theme$thumbsRating3 = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3.color\n }) : /*#__PURE__*/React.createElement(Dislike, {\n color: (_theme$thumbsRating4 = theme.thumbsRating) == null || (_theme$thumbsRating4 = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4.color\n });\n });\n};\nThumbsRating.displayName = 'ThumbsRating';\nexport { ThumbsRating };","import styled, { css } from 'styled-components';\nimport { focusStyle, genericStyles, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar FIT_MAP = {\n cover: 'cover',\n contain: 'contain'\n};\nvar fitStyle = css([\"flex:1 1;min-height:0;object-fit:\", \";\"], function (props) {\n return FIT_MAP[props.fit];\n});\n\n// z-index is for Safari so controls aren't hidden\nvar StyledVideo = styled.video.withConfig({\n displayName: \"StyledVideo\",\n componentId: \"sc-w4v8h9-0\"\n})([\"max-width:100%;z-index:1;\", \"::cue{background:\", \";}\", \";\"], function (props) {\n return props.fit && fitStyle;\n}, function (props) {\n return props.theme.video.captions.background;\n}, function (props) {\n return props.theme.video && props.theme.video.extend;\n});\nStyledVideo.defaultProps = {};\nObject.setPrototypeOf(StyledVideo.defaultProps, defaultProps);\nvar StyledVideoContainer = styled.div.withConfig({\n displayName: \"StyledVideo__StyledVideoContainer\",\n componentId: \"sc-w4v8h9-1\"\n})([\"flex:1 1;display:flex;flex-direction:column;overflow:hidden;position:relative;\", \";&:focus{\", \"}\"], genericStyles, focusStyle());\nStyledVideoContainer.defaultProps = {};\nObject.setPrototypeOf(StyledVideoContainer.defaultProps, defaultProps);\n\n// z-index is for Safari so controls aren't hidden\nvar positionStyle = css([\"position:absolute;left:0;right:0;bottom:0;z-index:1;\"]);\nvar StyledVideoControls = styled.div.withConfig({\n displayName: \"StyledVideo__StyledVideoControls\",\n componentId: \"sc-w4v8h9-2\"\n})([\"flex:0 0;\", \" opacity:0;transition:opacity 0.3s;\", \";\"], function (props) {\n return props.over && positionStyle;\n}, function (props) {\n return props.active ? 'opacity: 1;' : 'pointer-events: none';\n});\nStyledVideoControls.defaultProps = {};\nObject.setPrototypeOf(StyledVideoControls.defaultProps, defaultProps);\nvar headStyle = css([\"::after{content:'';height:100%;width:\", \";background:\", \";position:absolute;left:\", \";}\"], function (props) {\n return props.theme.global.edgeSize.xsmall;\n}, function (props) {\n return normalizeColor(props.theme.video.scrubber.color, props.theme);\n}, function (props) {\n return props.value + \"%\";\n});\nvar StyledVideoScrubber = styled.div.withConfig({\n displayName: \"StyledVideo__StyledVideoScrubber\",\n componentId: \"sc-w4v8h9-3\"\n})([\"cursor:pointer;width:100%;height:100%;\", \";&:focus{\", \"}\"], function (props) {\n return props.value && headStyle;\n}, focusStyle());\nStyledVideoScrubber.defaultProps = {};\nObject.setPrototypeOf(StyledVideoScrubber.defaultProps, defaultProps);\nexport { StyledVideo, StyledVideoContainer, StyledVideoControls, StyledVideoScrubber };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n autoPlay: PropTypes.bool,\n controls: PropTypes.oneOfType([PropTypes.oneOf([false, 'over', 'below']), PropTypes.shape({\n position: PropTypes.oneOf([false, 'over', 'below']),\n items: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['captions', 'descriptions', 'fullScreen', 'play', 'pause', 'volume']), PropTypes.shape({\n icon: PropTypes.element,\n a11yTitle: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool\n })]))\n })]),\n fit: PropTypes.oneOf(['cover', 'contain']),\n loop: PropTypes.bool,\n mute: PropTypes.bool,\n messages: PropTypes.shape({\n closeMenu: PropTypes.string,\n fullScreen: PropTypes.string,\n openMenu: PropTypes.string,\n pauseButton: PropTypes.string,\n playButton: PropTypes.string,\n progressMeter: PropTypes.string,\n scrubber: PropTypes.string,\n volumeDown: PropTypes.string,\n volumeUp: PropTypes.string\n }),\n skipInterval: PropTypes.number\n });\n}\nexport var VideoPropTypes = PropType;","var _excluded = [\"alignSelf\", \"autoPlay\", \"children\", \"controls\", \"gridArea\", \"loop\", \"margin\", \"messages\", \"mute\", \"onDurationChange\", \"onEnded\", \"onPause\", \"onPlay\", \"onTimeUpdate\", \"onVolumeChange\", \"skipInterval\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { defaultProps } from '../../default-props';\nimport { AnnounceContext } from '../../contexts/AnnounceContext';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Menu } from '../Menu';\nimport { Meter } from '../Meter';\nimport { Stack } from '../Stack';\nimport { Text } from '../Text';\nimport { Keyboard } from '../Keyboard';\nimport { containsFocus, useForwardedRef } from '../../utils';\nimport { StyledVideo, StyledVideoContainer, StyledVideoControls, StyledVideoScrubber } from './StyledVideo';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { VideoPropTypes } from './propTypes';\n\n// Split the volume control into 6 segments. Empirically determined.\nvar VOLUME_STEP = 0.166667;\nvar formatTime = function formatTime(time) {\n var minutes = Math.round(time / 60);\n if (minutes < 10) {\n minutes = \"0\" + minutes;\n }\n var seconds = Math.round(time) % 60;\n if (seconds < 10) {\n seconds = \"0\" + seconds;\n }\n return minutes + \":\" + seconds;\n};\nvar Video = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var alignSelf = _ref.alignSelf,\n autoPlay = _ref.autoPlay,\n children = _ref.children,\n controlsProp = _ref.controls,\n gridArea = _ref.gridArea,\n loop = _ref.loop,\n margin = _ref.margin,\n messages = _ref.messages,\n mute = _ref.mute,\n _onDurationChange = _ref.onDurationChange,\n _onEnded = _ref.onEnded,\n _onPause = _ref.onPause,\n _onPlay = _ref.onPlay,\n _onTimeUpdate = _ref.onTimeUpdate,\n _onVolumeChange = _ref.onVolumeChange,\n skipInterval = _ref.skipInterval,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var announce = useContext(AnnounceContext);\n var _useState = useState([]),\n captions = _useState[0],\n setCaptions = _useState[1];\n var _useState2 = useState(),\n currentTime = _useState2[0],\n setCurrentTime = _useState2[1];\n var _useState3 = useState(),\n duration = _useState3[0],\n setDuration = _useState3[1];\n var _useState4 = useState(),\n percentagePlayed = _useState4[0],\n setPercentagePlayed = _useState4[1];\n var _useState5 = useState(false),\n playing = _useState5[0],\n setPlaying = _useState5[1];\n var _useState6 = useState(false),\n announceAudioDescription = _useState6[0],\n setAnnounceAudioDescription = _useState6[1];\n var _useState7 = useState(),\n scrubTime = _useState7[0],\n setScrubTime = _useState7[1];\n var _useState8 = useState(),\n volume = _useState8[0],\n setVolume = _useState8[1];\n var _useState9 = useState(false),\n hasPlayed = _useState9[0],\n setHasPlayed = _useState9[1];\n var _useState10 = useState(),\n interacting = _useState10[0],\n setInteracting = _useState10[1];\n var _useState11 = useState(),\n height = _useState11[0],\n setHeight = _useState11[1];\n var _useState12 = useState(),\n width = _useState12[0],\n setWidth = _useState12[1];\n var containerRef = useRef();\n var scrubberRef = useRef();\n var videoRef = useForwardedRef(ref);\n var controls = useMemo(function () {\n var result;\n if (typeof controlsProp === 'string' || typeof controlsProp === 'boolean') {\n result = {\n items: ['volume', 'fullScreen'],\n position: controlsProp\n };\n } else {\n result = {\n items: (controlsProp == null ? void 0 : controlsProp.items) || ['volume', 'fullScreen'],\n position: (controlsProp == null ? void 0 : controlsProp.position) || 'over'\n };\n }\n return result;\n }, [controlsProp]);\n\n // mute if needed\n useEffect(function () {\n var video = videoRef.current;\n if (video && mute) video.muted = true;\n }, [mute, videoRef]);\n\n // when the video is first rendered, set state from it where needed\n useEffect(function () {\n var video = videoRef.current;\n if (video) {\n // hide all captioning to start with\n var textTracks = video.textTracks;\n for (var i = 0; i < textTracks.length; i += 1) {\n textTracks[i].mode = 'hidden';\n }\n setCurrentTime(video.currentTime);\n setPercentagePlayed(video.currentTime / video.duration * 100);\n setVolume(videoRef.current.volume);\n }\n }, [videoRef]);\n\n // turn off interacting after a while\n useEffect(function () {\n var timer = setTimeout(function () {\n if (interacting && !containsFocus(containerRef.current)) {\n setInteracting(false);\n }\n }, 3000);\n return function () {\n return clearTimeout(timer);\n };\n }, [interacting]);\n\n // track which audio description track is active\n var _useState13 = useState(),\n activeTrack = _useState13[0],\n setActiveTrack = _useState13[1];\n useLayoutEffect(function () {\n var video = videoRef.current;\n if (video) {\n if (video.videoHeight) {\n // set the size based on the video aspect ratio\n var rect = video.getBoundingClientRect();\n var ratio = rect.width / rect.height;\n var videoRatio = video.videoWidth / video.videoHeight;\n if (videoRatio > ratio) {\n var nextHeight = rect.width / videoRatio;\n if (nextHeight !== height) {\n setHeight(nextHeight);\n setWidth(undefined);\n }\n } else {\n var nextWidth = rect.height * videoRatio;\n if (nextWidth !== width) {\n setHeight(undefined);\n setWidth(nextWidth);\n }\n }\n }\n\n // remember the state of the text tracks for subsequent rendering\n var textTracks = video.textTracks;\n var nextCaptions = [];\n var set = false;\n // iterate through all of the tracks provided\n var _loop = function _loop() {\n var track = textTracks[i];\n var active = track.mode === 'showing';\n var getActiveTrack = function getActiveTrack(currentVideoTime) {\n var nextActiveTrack;\n for (var j = 0; j < track.cues.length; j += 1) {\n var _track$cues$j, _track$cues$j2;\n if (currentVideoTime > (track == null || (_track$cues$j = track.cues[j]) == null ? void 0 : _track$cues$j.startTime) && currentVideoTime < (track == null || (_track$cues$j2 = track.cues[j]) == null ? void 0 : _track$cues$j2.endTime)) {\n var _track$cues$j3;\n nextActiveTrack = track == null || (_track$cues$j3 = track.cues[j]) == null ? void 0 : _track$cues$j3.text;\n }\n }\n return nextActiveTrack;\n };\n\n // track is an audio description\n if (track.kind === 'descriptions') {\n if (announceAudioDescription) {\n video.ontimeupdate = function () {\n var nextActiveTrack = getActiveTrack(video.currentTime);\n if (activeTrack !== nextActiveTrack) {\n if (nextActiveTrack) {\n announce(nextActiveTrack, 'assertive');\n }\n setActiveTrack(nextActiveTrack);\n }\n };\n }\n }\n\n // otherwise treat as captions\n else {\n nextCaptions.push({\n label: track.label,\n active: active\n });\n if (!captions || !captions[i] || captions[i].active !== active) {\n set = true;\n }\n if (set) {\n setCaptions(nextCaptions);\n }\n }\n };\n for (var i = 0; i < textTracks.length; i += 1) {\n _loop();\n }\n }\n }, [activeTrack, announce, announceAudioDescription, captions, height, videoRef, width]);\n var play = useCallback(function () {\n return videoRef.current.play();\n }, [videoRef]);\n var pause = useCallback(function () {\n return videoRef.current.pause();\n }, [videoRef]);\n var scrub = useCallback(function (event) {\n if (scrubberRef.current) {\n var scrubberRect = scrubberRef.current.getBoundingClientRect();\n var percent = (event.clientX - scrubberRect.left) / scrubberRect.width;\n setScrubTime(duration * percent);\n }\n }, [duration]);\n var seek = useCallback(function (event) {\n if (scrubberRef.current) {\n var scrubberRect = scrubberRef.current.getBoundingClientRect();\n var percent = (event.clientX - scrubberRect.left) / scrubberRect.width;\n if (duration) videoRef.current.currentTime = duration * percent;\n }\n }, [duration, videoRef]);\n var seekForward = useCallback(function () {\n setInteracting(true);\n videoRef.current.currentTime += skipInterval || theme.video.scrubber.interval;\n }, [skipInterval, theme.video.scrubber.interval, videoRef]);\n var seekBackward = useCallback(function () {\n setInteracting(true);\n videoRef.current.currentTime -= skipInterval || theme.video.scrubber.interval;\n }, [skipInterval, theme.video.scrubber.interval, videoRef]);\n var louder = useCallback(function () {\n videoRef.current.volume += VOLUME_STEP;\n }, [videoRef]);\n var quieter = useCallback(function () {\n videoRef.current.volume -= VOLUME_STEP;\n }, [videoRef]);\n var showCaptions = useCallback(function (index) {\n var textTracks = videoRef.current.textTracks;\n for (var i = 0; i < textTracks.length; i += 1) textTracks[i].mode = i === index ? 'showing' : 'hidden';\n }, [videoRef]);\n var fullscreen = useCallback(function () {\n var video = videoRef.current;\n if (video.requestFullscreen) {\n video.requestFullscreen();\n } else if (video.msRequestFullscreen) {\n video.msRequestFullscreen();\n } else if (video.mozRequestFullScreen) {\n video.mozRequestFullScreen();\n } else if (video.webkitRequestFullscreen) {\n video.webkitRequestFullscreen();\n } else {\n console.warn(\"This browser doesn't support fullscreen.\");\n }\n }, [videoRef]);\n var controlsElement;\n if (controls != null && controls.position) {\n var _controls$items;\n var over = controls.position === 'over';\n var background = over ? theme.video.controls && theme.video.controls.background || {\n color: 'background-back',\n opacity: 'strong',\n dark: true\n } : undefined;\n var iconColor = over && (theme.video.icons.color || 'text');\n var formattedTime = formatTime(scrubTime || currentTime || duration);\n var Icons = {\n ClosedCaption: theme.video.icons.closedCaption,\n Configure: theme.video.icons.configure,\n FullScreen: theme.video.icons.fullScreen,\n Pause: theme.video.icons.pause,\n Play: theme.video.icons.play,\n ReduceVolume: theme.video.icons.reduceVolume,\n Volume: theme.video.icons.volume,\n Description: theme.video.icons.description\n };\n var captionControls = captions.map(function (caption, index) {\n return {\n icon: caption.label ? undefined : /*#__PURE__*/React.createElement(Icons.ClosedCaption, {\n color: iconColor\n }),\n label: caption.label,\n active: caption.active,\n a11yTitle: caption.label || format({\n id: 'video.captions',\n messages: messages\n }),\n onClick: function onClick() {\n showCaptions(caption.active ? -1 : index);\n var updatedCaptions = [];\n for (var i = 0; i < captions.length; i += 1) {\n updatedCaptions.push(captions[i]);\n // set other captions to active=false\n if (i !== index && updatedCaptions[i].active) updatedCaptions[i].active = false;\n // set the currently selected captions to active\n else if (i === index) updatedCaptions[i].active = !captions[index].active;\n }\n setCaptions(updatedCaptions);\n }\n };\n });\n var descriptionControls = {\n icon: /*#__PURE__*/React.createElement(Icons.Description, {\n color: iconColor\n }),\n a11yTitle: format({\n id: 'video.audioDescriptions',\n messages: messages\n }),\n active: announceAudioDescription,\n onClick: function onClick() {\n return setAnnounceAudioDescription(!announceAudioDescription);\n }\n };\n var volumeControls = ['volume', 'reduceVolume'].map(function (control) {\n return {\n icon: control === 'volume' ? /*#__PURE__*/React.createElement(Icons.Volume, {\n color: iconColor\n }) : /*#__PURE__*/React.createElement(Icons.ReduceVolume, {\n color: iconColor\n }),\n a11yTitle: format({\n id: control === 'volume' ? 'video.volumeUp' : 'video.volumeDown',\n messages: messages\n }),\n onClick: function onClick() {\n if (volume <= 1 - VOLUME_STEP && control === 'volume') {\n return louder();\n }\n if (volume >= VOLUME_STEP && control === 'reduceVolume') {\n return quieter();\n }\n return undefined;\n },\n close: false\n };\n });\n var buttonProps = {\n captions: captionControls,\n descriptions: descriptionControls,\n volume: volumeControls,\n fullScreen: {\n icon: /*#__PURE__*/React.createElement(Icons.FullScreen, {\n color: iconColor\n }),\n a11yTitle: format({\n id: 'video.fullScreen',\n messages: messages\n }),\n onClick: fullscreen\n },\n pause: {\n icon: /*#__PURE__*/React.createElement(Icons.Pause, {\n color: iconColor\n }),\n a11yTitle: format({\n id: 'video.pauseButton',\n messages: messages\n }),\n disabled: !playing,\n onClick: pause\n },\n play: {\n icon: /*#__PURE__*/React.createElement(Icons.Play, {\n color: iconColor\n }),\n a11yTitle: format({\n id: 'video.playButton',\n messages: messages\n }),\n disabled: playing,\n onClick: play\n }\n };\n var controlsMenuItems = [];\n (_controls$items = controls.items) == null ? void 0 : _controls$items.map(function (item) {\n if (item === 'volume') {\n volumeControls.map(function (control) {\n return controlsMenuItems.push(control);\n });\n return undefined;\n }\n if (item === 'captions' && typeof buttonProps[item] === 'object') {\n for (var i = 0; i < buttonProps[item].length; i += 1) controlsMenuItems.push(buttonProps[item][i]);\n return undefined;\n }\n if (item === 'descriptions') {\n controlsMenuItems.push(buttonProps[item]);\n return undefined;\n }\n if (typeof item === 'string') {\n return controlsMenuItems.push(buttonProps[item]);\n }\n return controlsMenuItems.push(item);\n });\n controlsElement = /*#__PURE__*/React.createElement(StyledVideoControls, {\n over: over,\n active: !hasPlayed || controls.position === 'below' || over && interacting,\n onBlur: function onBlur() {\n if (!containsFocus(containerRef.current)) setInteracting(false);\n }\n }, /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n justify: \"between\",\n background: background\n }, /*#__PURE__*/React.createElement(Button, {\n icon: playing ? /*#__PURE__*/React.createElement(Icons.Pause, {\n color: iconColor,\n a11yTitle: format({\n id: 'video.pauseButton',\n messages: messages\n })\n }) : /*#__PURE__*/React.createElement(Icons.Play, {\n color: iconColor,\n a11yTitle: format({\n id: 'video.playButton',\n messages: messages\n })\n }),\n hoverIndicator: \"background\",\n onClick: playing ? pause : play,\n onFocus: function onFocus() {\n return setInteracting(true);\n }\n }), /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n flex: true\n }, /*#__PURE__*/React.createElement(Box, {\n flex: true\n }, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Meter, {\n \"aria-label\": format({\n id: 'video.progressMeter',\n messages: messages\n }),\n background: over ? theme.video.scrubber && theme.video.scrubber.track && theme.video.scrubber.track.color || 'dark-3' : undefined,\n size: \"full\",\n thickness: \"small\",\n values: [{\n value: percentagePlayed || 0\n }]\n }), /*#__PURE__*/React.createElement(StyledVideoScrubber, {\n \"aria-label\": format({\n id: 'video.scrubber',\n messages: messages\n }),\n ref: scrubberRef,\n tabIndex: 0,\n role: \"button\",\n value: scrubTime ? Math.round(scrubTime / duration * 100) : undefined,\n onMouseMove: scrub,\n onMouseLeave: function onMouseLeave() {\n return setScrubTime(undefined);\n },\n onClick: seek,\n onFocus: function onFocus() {\n return setInteracting(true);\n }\n }))), /*#__PURE__*/React.createElement(Box, {\n pad: {\n horizontal: 'small'\n }\n }, /*#__PURE__*/React.createElement(Text, {\n margin: \"none\"\n }, formattedTime))), /*#__PURE__*/React.createElement(Menu, {\n icon: /*#__PURE__*/React.createElement(Icons.Configure, {\n color: iconColor\n }),\n dropAlign: {\n bottom: 'top',\n right: 'right'\n },\n dropBackground: background,\n messages: {\n openMenu: format({\n id: 'video.openMenu',\n messages: messages\n }),\n closeMenu: format({\n id: 'video.closeMenu',\n messages: messages\n })\n },\n items: [].concat(controlsMenuItems),\n onFocus: function onFocus() {\n return setInteracting(true);\n }\n })));\n }\n var mouseEventListeners;\n if ((controls == null ? void 0 : controls.position) === 'over') {\n mouseEventListeners = {\n onMouseEnter: function onMouseEnter() {\n return setInteracting(true);\n },\n onMouseMove: function onMouseMove() {\n return setInteracting(true);\n },\n onTouchStart: function onTouchStart() {\n return setInteracting(true);\n }\n };\n }\n var style;\n if (rest.fit === 'contain' && (controls == null ? void 0 : controls.position) === 'over') {\n // constrain the size to fit the aspect ratio so the controls\n // overlap correctly\n if (width) {\n style = {\n width: width\n };\n } else if (height) {\n style = {\n height: height\n };\n }\n }\n return /*#__PURE__*/React.createElement(Keyboard, {\n onLeft: seekBackward,\n onRight: seekForward\n }, /*#__PURE__*/React.createElement(StyledVideoContainer, _extends({\n ref: containerRef\n }, mouseEventListeners, {\n alignSelf: alignSelf,\n gridArea: gridArea,\n margin: margin,\n style: style,\n tabIndex: \"-1\"\n }), /*#__PURE__*/React.createElement(StyledVideo, _extends({}, rest, {\n ref: videoRef,\n onDurationChange: function onDurationChange(event) {\n var video = videoRef.current;\n setDuration(video.duration);\n setPercentagePlayed(video.currentTime / video.duration * 100);\n if (_onDurationChange) _onDurationChange(event);\n },\n onEnded: function onEnded(event) {\n setPlaying(false);\n if (_onEnded) _onEnded(event);\n },\n onPause: function onPause(event) {\n setPlaying(false);\n if (_onPause) _onPause(event);\n },\n onPlay: function onPlay(event) {\n setPlaying(true);\n setHasPlayed(true);\n if (_onPlay) _onPlay(event);\n },\n onTimeUpdate: function onTimeUpdate(event) {\n var video = videoRef.current;\n setCurrentTime(video.currentTime);\n setPercentagePlayed(video.currentTime / video.duration * 100);\n if (_onTimeUpdate) _onTimeUpdate(event);\n },\n onVolumeChange: function onVolumeChange(event) {\n setVolume(videoRef.current.volume);\n if (_onVolumeChange) _onVolumeChange(event);\n },\n autoPlay: autoPlay || false,\n loop: loop || false\n }), children), controlsElement));\n});\nVideo.defaultProps = {};\nVideo.displayName = 'Video';\nVideo.propTypes = VideoPropTypes;\nexport { Video };","import styled from 'styled-components';\nimport { genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar fillStyle = function fillStyle(fillProp) {\n if (fillProp === 'horizontal') {\n return \"\\n width: 100%;\\n height: unset;\\n \";\n }\n if (fillProp === 'vertical') {\n return \"\\n width: unset;\\n height: 100%;\\n \";\n }\n if (fillProp) {\n return \"\\n width: 100%;\\n height: 100%;\\n \";\n }\n return '';\n};\n\n// undefined fillProp has width for backwards compatibility\nvar StyledWorldMap = styled.svg.withConfig({\n displayName: \"StyledWorldMap\",\n componentId: \"sc-had4c3-0\"\n})([\"\", \" \", \" \", \";\"], genericStyles, function (props) {\n return props.fillProp !== undefined ? fillStyle(props.fillProp) : 'width: 100%;';\n}, function (props) {\n return props.theme.worldMap && props.theme.worldMap.extend;\n});\nStyledWorldMap.defaultProps = {};\nObject.setPrototypeOf(StyledWorldMap.defaultProps, defaultProps);\nexport { StyledWorldMap };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { colorPropType, genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n color: colorPropType,\n continents: PropTypes.arrayOf(PropTypes.shape({\n color: colorPropType,\n name: PropTypes.oneOf(['Africa', 'Asia', 'Australia', 'Europe', 'North America', 'South America']).isRequired,\n onClick: PropTypes.func,\n onHover: PropTypes.func\n })),\n fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),\n onSelectPlace: PropTypes.func,\n places: PropTypes.arrayOf(PropTypes.shape({\n color: colorPropType,\n content: PropTypes.node,\n dropProps: PropTypes.shape({}),\n name: PropTypes.string,\n // for a11y aria-label\n location: PropTypes.arrayOf(PropTypes.number).isRequired,\n onClick: PropTypes.func,\n onHover: PropTypes.func\n })),\n hoverColor: colorPropType\n });\n}\nexport var WorldMapPropTypes = PropType;","var _excluded = [\"fill\", \"color\", \"continents\", \"hoverColor\", \"onSelectPlace\", \"places\"],\n _excluded2 = [\"location\"],\n _excluded3 = [\"color\", \"onClick\", \"onHover\"],\n _excluded4 = [\"color\", \"coords\", \"content\", \"dropProps\", \"key\", \"name\", \"onClick\", \"onHover\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Drop } from '../Drop';\nimport { defaultProps } from '../../default-props';\nimport { normalizeColor, parseMetricToNum } from '../../utils';\nimport { StyledWorldMap } from './StyledWorldMap';\nimport { WorldMapPropTypes } from './propTypes';\n\n// The graphic is drawn as a rectangular grid using coordinates spaced\n// by FACTOR pixels.\nvar FACTOR = 10;\n\n// Mapping constants between coordinates and latitude+longitude.\n// The map coordinate space isn't precisely a mercator projection. So,\n// we have a few adjustments that we've empirically determined. The following\n// cities were used to make the empirical determinations:\n// London (0 lon), Quito (0 lat), Nome (far west), Sydney (far east),\n// Svalbard (far north), Ushuaia (far south).\n\n// These map to reality, they aren't adjusted.\nvar EQUATOR_Y = 32;\nvar WIDTH = 93;\n\n// Scale the latitude and longitude to align better with actual locations.\nvar LAT_SCALE = 0.98;\n// adjust more extreme latitudes to fit with the map dots better\nvar LAT_EXTREME_SCALE = 0.91;\nvar LON_SCALE = 0.99;\n\n// We shift the map coordinates to align better with actual locations.\nvar X_OFFSET = -2;\nvar Y_OFFSET = -2;\n\n// The continents have both an area boundary for interaction\n// and dots described as rows where each row is described by three values:\n// a starting coordinate and a length. This approach is more efficient than\n// describing it via SVG elements, keeping the code/library size smaller.\nvar CONTINENTS = [{\n name: 'Australia',\n origin: [74, 32],\n area: [[4, 0], [7, 1], [15, 7], [13, 9], [8, 8], [0, 6], [0, 2]],\n dots: [[4, 0, 1], [2, 1, 6], [0, 2, 9], [0, 3, 10], [0, 4, 10], [0, 5, 3], [5, 5, 5], [5, 6, 4], [8, 8, 1], [15, 7, 1], [14, 8, 1], [13, 9, 1]]\n}, {\n name: 'Asia',\n origin: [52, 1],\n area: [[16, 0], [38, 5], [40, 7], [28, 17], [24, 25], [29, 29], [19, 29], [11, 24], [3, 23], [0, 20], [0, 19], [6, 13], [7, 6]],\n dots: [[16, 0, 1], [17, 1, 2], [18, 2, 2], [15, 3, 6], [28, 3, 1], [30, 3, 1], [10, 4, 2], [13, 4, 10], [24, 4, 1], [9, 5, 22], [32, 5, 1], [38, 5, 1], [7, 6, 2], [10, 6, 1], [12, 6, 27], [7, 7, 34], [7, 8, 31], [7, 9, 26], [34, 9, 3], [7, 10, 22], [31, 10, 1], [33, 10, 1], [7, 11, 21], [32, 11, 2], [7, 12, 21], [32, 12, 1], [6, 13, 22], [32, 13, 1], [6, 14, 22], [5, 15, 22], [3, 16, 2], [6, 16, 20], [2, 17, 3], [6, 17, 16], [24, 17, 1], [28, 17, 1], [1, 18, 22], [26, 18, 2], [0, 19, 24], [0, 20, 5], [6, 20, 17], [2, 21, 5], [10, 21, 14], [2, 22, 5], [11, 22, 4], [16, 22, 4], [3, 23, 3], [11, 23, 2], [17, 23, 3], [23, 23, 1], [11, 24, 2], [18, 24, 2], [23, 24, 1], [24, 25, 1], [18, 26, 1], [22, 26, 1], [18, 27, 1], [20, 27, 4], [18, 28, 1], [21, 28, 1], [23, 28, 1], [26, 28, 3], [19, 29, 1], [28, 29, 2]]\n}, {\n name: 'Africa',\n origin: [40, 19],\n area: [[3, 0], [6, 0], [11, 2], [16, 7], [16, 15], [11, 18], [9, 18], [0, 6], [0, 3]],\n dots: [[3, 0, 4], [2, 1, 6], [9, 1, 2], [1, 2, 11], [0, 3, 13], [0, 4, 14], [0, 5, 14], [0, 6, 16], [1, 7, 16], [2, 8, 2], [6, 8, 11], [7, 9, 9], [7, 10, 8], [7, 11, 7], [8, 12, 7], [7, 13, 8], [7, 14, 7], [16, 14, 1], [8, 15, 5], [15, 15, 2], [8, 16, 5], [9, 17, 3], [9, 18, 3]]\n}, {\n name: 'Europe',\n origin: [39, 2],\n area: [[8, 0], [10, 0], [20, 2], [19, 11], [18, 13], [14, 16], [3, 16], [0, 7]],\n dots: [[8, 0, 3], [9, 1, 1], [20, 2, 1], [19, 3, 1], [12, 4, 1], [19, 4, 1], [9, 5, 6], [9, 6, 7], [17, 6, 3], [0, 7, 1], [8, 7, 12], [7, 8, 3], [11, 8, 9], [7, 9, 3], [11, 9, 9], [4, 10, 1], [7, 10, 1], [9, 10, 1], [11, 10, 9], [3, 11, 2], [7, 11, 13], [4, 12, 1], [6, 12, 13], [4, 13, 15], [5, 14, 3], [9, 14, 4], [15, 14, 2], [3, 15, 3], [8, 15, 1], [10, 15, 5], [6, 15, 2], [3, 16, 2], [10, 16, 5]]\n}, {\n name: 'South America',\n origin: [22, 26],\n area: [[2, 0], [5, 0], [11, 4], [11, 8], [3, 18], [2, 17], [0, 4], [0, 3]],\n dots: [[2, 0, 4], [1, 1, 7], [1, 2, 7], [0, 3, 10], [0, 4, 12], [1, 5, 11], [2, 6, 9], [3, 7, 8], [3, 8, 8], [3, 9, 6], [3, 10, 6], [3, 11, 5], [3, 12, 3], [2, 13, 3], [2, 14, 3], [2, 15, 2], [2, 16, 2], [2, 17, 2], [3, 18, 1]]\n}, {\n name: 'North America',\n origin: [0, 0],\n area: [[21, 0], [39, 0], [39, 6], [22, 26], [16, 23], [2, 12], [0, 7]],\n dots: [[22, 0, 6], [29, 0, 1], [31, 0, 1], [33, 0, 5], [20, 1, 1], [22, 1, 1], [24, 1, 2], [27, 1, 13], [17, 2, 1], [20, 2, 5], [26, 2, 13], [13, 3, 1], [19, 3, 1], [21, 3, 3], [26, 3, 14], [14, 4, 1], [16, 4, 4], [21, 4, 3], [29, 4, 11], [12, 5, 3], [16, 5, 1], [18, 5, 1], [20, 5, 3], [24, 5, 1], [30, 5, 8], [14, 6, 3], [19, 6, 1], [22, 6, 4], [31, 6, 8], [0, 7, 15], [16, 7, 1], [18, 7, 4], [24, 7, 2], [30, 7, 7], [2, 8, 20], [24, 8, 3], [29, 8, 5], [2, 9, 20], [24, 9, 2], [30, 9, 3], [1, 10, 18], [23, 10, 2], [31, 10, 1], [2, 11, 2], [8, 11, 11], [23, 11, 2], [26, 11, 1], [2, 12, 1], [8, 12, 13], [24, 12, 3], [10, 13, 12], [23, 13, 5], [11, 14, 17], [11, 15, 9], [21, 15, 6], [28, 15, 2], [11, 16, 11], [23, 16, 4], [11, 17, 14], [12, 18, 11], [12, 19, 12], [13, 20, 9], [15, 21, 3], [22, 21, 1], [16, 22, 2], [16, 23, 2], [20, 23, 1], [23, 23, 1], [18, 24, 3], [21, 25, 1], [22, 26, 1]]\n}];\nvar mergeBounds = function mergeBounds(bounds1, bounds2) {\n return [bounds1 ? Math.min(bounds1[0], bounds2[0]) : bounds2[0], bounds1 ? Math.min(bounds1[1], bounds2[1]) : bounds2[1], bounds1 ? Math.max(bounds1[2], bounds2[2]) : bounds2[2], bounds1 ? Math.max(bounds1[3], bounds2[3]) : bounds2[3]];\n};\nvar midPoint = function midPoint(bounds) {\n return [bounds[0] + (bounds[2] - bounds[0]) / 2, bounds[1] + (bounds[3] - bounds[1]) / 2];\n};\n\n// from https://stackoverflow.com/a/14457180/8513067\nvar latLonToCoord = function latLonToCoord(_ref) {\n var lat = _ref[0],\n lon = _ref[1];\n var scaledLon = lon * LON_SCALE;\n var x = Math.round((scaledLon + 180) * (WIDTH / 360));\n // adjust more extreme latitudes to fit with the map dots better\n var scaledLat = lat * (lat > 60 || lat < -50 ? LAT_EXTREME_SCALE : LAT_SCALE);\n var latRad = scaledLat * Math.PI / 180;\n var mercN = Math.log(Math.tan(Math.PI / 4 + latRad / 2));\n var y = Math.round(EQUATOR_Y - WIDTH * mercN / (2 * Math.PI));\n return [x + X_OFFSET, y + Y_OFFSET];\n};\nvar coordToLatLon = function coordToLatLon(_ref2) {\n var x = _ref2[0],\n y = _ref2[1];\n var mercN = (EQUATOR_Y - (y - Y_OFFSET)) * (2 * Math.PI) / WIDTH;\n var latRad = (Math.atan(Math.exp(mercN)) - Math.PI / 4) * 2;\n var scaledLat = latRad * 180 / Math.PI / LAT_SCALE;\n // adjust more extreme latitudes to fit with the map dots better\n var lat = scaledLat / (scaledLat > 60 || scaledLat < -50 ? LAT_EXTREME_SCALE : LAT_SCALE);\n var lon = (x - X_OFFSET) * 360 / WIDTH - 180;\n return [lat, lon];\n};\nvar buildContinent = function buildContinent(_ref3) {\n var areaProp = _ref3.area,\n dotsProp = _ref3.dots,\n name = _ref3.name,\n origin = _ref3.origin;\n var bounds = [origin[0], origin[1], origin[0], origin[1]];\n var dots = dotsProp.map(function (segment) {\n var count = segment[2];\n var spots = [];\n for (var i = 0; i < count; i += 1) spots.push('h0');\n var dotCommands = spots.join(' m10,0 ');\n var x = FACTOR * (origin[0] + segment[0] + 1);\n var y = FACTOR * (origin[1] + segment[1] + 1);\n bounds = mergeBounds(bounds, [origin[0], origin[1], origin[0] + segment[0] + segment[2], origin[1] + segment[1]]);\n return \"M\" + x + \",\" + y + \" \" + dotCommands;\n }).join(' ');\n var area = areaProp.map(function (point, index) {\n var x = FACTOR * (point[0] + origin[0] + 1);\n var y = FACTOR * (point[1] + origin[1] + 1);\n return \"\" + (index === 0 ? 'M' : 'L') + x + \",\" + y;\n }).join(' ') + \" Z\";\n var mid = midPoint(bounds);\n return {\n area: area,\n dots: dots,\n name: name,\n origin: origin,\n bounds: bounds,\n mid: mid\n };\n};\nvar buildWorld = function buildWorld() {\n // Build the SVG paths describing the individual dots\n var continents = CONTINENTS.map(buildContinent);\n var bounds;\n continents.forEach(function (continent) {\n bounds = mergeBounds(bounds, continent.bounds);\n });\n return {\n continents: continents,\n bounds: bounds,\n x: bounds[0] * FACTOR,\n y: bounds[1] * FACTOR,\n width: (bounds[2] - bounds[0] + 1) * FACTOR,\n height: (bounds[3] - bounds[1] + 2) * FACTOR\n };\n};\nvar buildInteractiveProps = function buildInteractiveProps(_ref4, activeFunc, active) {\n var name = _ref4.name,\n onClick = _ref4.onClick,\n onHover = _ref4.onHover;\n return {\n role: 'button',\n 'aria-label': name,\n tabIndex: '0',\n onClick: onClick ? function () {\n return onClick(name);\n } : undefined,\n onMouseOver: function onMouseOver() {\n if (!active) {\n activeFunc(name);\n if (onHover) {\n onHover(true);\n }\n }\n },\n onMouseLeave: function onMouseLeave() {\n if (active) {\n activeFunc(undefined);\n if (onHover) {\n onHover(false);\n }\n }\n },\n onFocus: function onFocus() {\n // This moves the map unnecessarily. Instead, we should check\n // the position and scroll if it isn't already visible\n // this._worldMapRef.scrollIntoView();\n if (!active) {\n activeFunc(name);\n }\n },\n onBlur: function onBlur() {\n if (active) {\n activeFunc(undefined);\n }\n }\n };\n};\nvar WorldMap = /*#__PURE__*/forwardRef(function (_ref5, ref) {\n var fill = _ref5.fill,\n color = _ref5.color,\n continentsProp = _ref5.continents,\n hoverColor = _ref5.hoverColor,\n onSelectPlace = _ref5.onSelectPlace,\n placesProp = _ref5.places,\n rest = _objectWithoutPropertiesLoose(_ref5, _excluded);\n var theme = React.useContext(ThemeContext);\n var world = React.useMemo(buildWorld, []);\n var _React$useState = React.useState({}),\n continents = _React$useState[0],\n setContinents = _React$useState[1];\n React.useEffect(function () {\n if (continentsProp) {\n setContinents(continentsProp.reduce(function (obj, continent) {\n // eslint-disable-next-line no-param-reassign\n obj[continent.name] = continent;\n return obj;\n }, {}));\n } else setContinents({});\n }, [continentsProp]);\n var _React$useState2 = React.useState([]),\n places = _React$useState2[0],\n setPlaces = _React$useState2[1];\n\n // targets are used for the Drops associated with places content\n var _React$useState3 = React.useState([]),\n targets = _React$useState3[0],\n setTargets = _React$useState3[1];\n React.useEffect(function () {\n if (placesProp) {\n setPlaces(placesProp.map(function (_ref6) {\n var location = _ref6.location,\n place = _objectWithoutPropertiesLoose(_ref6, _excluded2);\n var coords = latLonToCoord(location);\n return _extends({\n coords: coords,\n key: location.join(',')\n }, place);\n }));\n } else setPlaces([]);\n return function () {\n setTargets([]);\n };\n }, [placesProp, world]);\n var _React$useState4 = React.useState(),\n over = _React$useState4[0],\n setOver = _React$useState4[1];\n var _React$useState5 = React.useState(),\n activeCoords = _React$useState5[0],\n setActiveCoords = _React$useState5[1];\n var _React$useState6 = React.useState(),\n activeContinent = _React$useState6[0],\n setActiveContinent = _React$useState6[1];\n var _React$useState7 = React.useState(),\n activePlace = _React$useState7[0],\n setActivePlace = _React$useState7[1];\n var containerRef = React.useRef();\n var placeRef = React.useCallback(function (node, index) {\n setTargets(function (prevTargets) {\n if (!prevTargets[index]) {\n var nextTargets = [].concat(prevTargets);\n nextTargets[index] = node;\n return nextTargets;\n }\n return prevTargets;\n });\n }, []);\n var onMouseMove = React.useCallback(function (event) {\n // determine the map coordinates for where the mouse is\n // containerRef uses the group so we can handle aspect ratio scaling\n var rect = containerRef.current.getBoundingClientRect();\n // since the SVG viewBox might be scaled\n var scale = rect.width / world.width;\n var coords = [Math.round((event.clientX - rect.left) / scale / FACTOR), Math.round((event.clientY - rect.top) / scale / FACTOR)];\n setActiveCoords(coords);\n }, [world.width]);\n var continentElements = world.continents.map(function (_ref7) {\n var area = _ref7.area,\n dots = _ref7.dots,\n name = _ref7.name;\n var _ref8 = continents[name] || {},\n continentColor = _ref8.color,\n onClick = _ref8.onClick,\n onHover = _ref8.onHover,\n restContinents = _objectWithoutPropertiesLoose(_ref8, _excluded3);\n var active = activeContinent && activeContinent === name;\n var interactiveProps = {};\n if (onClick || onHover) {\n interactiveProps = buildInteractiveProps(continents[name], function (activate) {\n return setActiveContinent(activate);\n }, active);\n }\n return /*#__PURE__*/React.createElement(\"g\", _extends({\n key: name\n }, interactiveProps, restContinents), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"none\",\n fill: \"#fff\",\n fillOpacity: \"0.01\",\n d: area\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: dots,\n strokeLinecap: \"round\",\n strokeWidth: parseMetricToNum(theme.worldMap.continent[active ? 'active' : 'base']),\n stroke: normalizeColor(continentColor || color || theme.worldMap.color, theme)\n }));\n });\n var placesContent = [];\n var placeElements = places.map(function (place, index) {\n var placeColor = place.color,\n coords = place.coords,\n content = place.content,\n dropProps = place.dropProps,\n key = place.key,\n name = place.name,\n onClick = place.onClick,\n onHover = place.onHover,\n restPlace = _objectWithoutPropertiesLoose(place, _excluded4);\n var d = \"M\" + FACTOR * coords[0] + \", \" + FACTOR * coords[1] + \" h0\";\n var active = activePlace && activePlace === name;\n var interactiveProps = {};\n if (onClick || onHover) {\n interactiveProps = buildInteractiveProps(place, function (activate) {\n return setActivePlace(activate);\n }, active);\n }\n if (content && targets[index]) {\n placesContent.push( /*#__PURE__*/React.createElement(Drop, _extends({\n key: key || name\n }, dropProps, {\n target: targets[index]\n }), content));\n }\n return /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key,\n ref: function ref(node) {\n return placeRef(node, index);\n },\n strokeLinecap: \"round\",\n strokeWidth: parseMetricToNum(theme.worldMap.place[active ? 'active' : 'base']),\n stroke: normalizeColor(placeColor || color || theme.worldMap.color, theme)\n }, interactiveProps, restPlace, {\n d: d\n }));\n });\n\n // If the caller is interested in onSelectPlace changes, track where the\n var interactiveProps = {};\n if (onSelectPlace) {\n interactiveProps = {\n onMouseOver: function onMouseOver() {\n return setOver(true);\n },\n onMouseMove: over ? onMouseMove : undefined,\n onMouseLeave: function onMouseLeave() {\n setOver(false);\n setActiveCoords(undefined);\n }\n };\n }\n var active;\n if (activeCoords) {\n var d = \"M\" + FACTOR * activeCoords[0] + \", \" + FACTOR * activeCoords[1] + \" h0\";\n active = /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"none\",\n fill: \"none\",\n fillRule: \"evenodd\",\n onClick: function onClick() {\n return onSelectPlace(coordToLatLon(activeCoords, world.bounds));\n }\n }, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeWidth: parseMetricToNum(theme.worldMap.place.active),\n stroke: normalizeColor(hoverColor || color || theme.worldMap.hover.color, theme),\n d: d\n }));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledWorldMap, _extends({\n ref: ref,\n viewBox: world.x + \" \" + world.y + \" \" + world.width + \" \" + world.height,\n preserveAspectRatio: \"xMinYMin meet\",\n fillProp: fill,\n width: world.width,\n height: world.height\n }, interactiveProps, rest), /*#__PURE__*/React.createElement(\"g\", {\n ref: containerRef,\n stroke: \"none\",\n fill: \"none\",\n fillRule: \"evenodd\"\n }, continentElements), placeElements, active), placesContent);\n});\nWorldMap.displayName = 'WorldMap';\nWorldMap.defaultProps = {};\nObject.setPrototypeOf(WorldMap.defaultProps, defaultProps);\nWorldMap.propTypes = WorldMapPropTypes;\nexport { WorldMap };","export * from './Accordion';\nexport * from './AccordionPanel';\nexport * from './Anchor';\nexport * from './Avatar';\nexport * from './Box';\nexport * from './Button';\nexport * from './Calendar';\nexport * from './Card';\nexport * from './CardBody';\nexport * from './CardFooter';\nexport * from './CardHeader';\nexport * from './Cards';\nexport * from './Carousel';\nexport * from './CheckBoxGroup';\nexport * from './Chart';\nexport * from './CheckBox';\nexport * from './Clock';\nexport * from './Collapsible';\nexport * from './Data';\nexport * from './DataChart';\nexport * from './DataFilter';\nexport * from './DataFilters';\nexport * from './DataSearch';\nexport * from './DataSort';\nexport * from './DataSummary';\nexport * from './DataTable';\nexport * from './DataTableColumns';\nexport * from './DataTableGroupBy';\nexport * from './DataView';\nexport * from './DateInput';\nexport * from './Diagram';\nexport * from './Distribution';\nexport * from './Drop';\nexport * from './DropButton';\nexport * from './FileInput';\nexport * from './Footer';\nexport * from './Form';\nexport * from './FormField';\nexport * from './Grid';\nexport * from './Grommet';\nexport * from './Header';\nexport * from './Heading';\nexport * from './Image';\nexport * from './InfiniteScroll';\nexport * from './Keyboard';\nexport * from './Layer';\nexport * from './List';\nexport * from './Main';\nexport * from './Markdown';\nexport * from './MaskedInput';\nexport * from './Menu';\nexport * from './Meter';\nexport * from './Page';\nexport * from './PageContent';\nexport * from './PageHeader';\nexport * from './Pagination';\nexport * from './Paragraph';\nexport * from './NameValuePair';\nexport * from './NameValueList';\nexport * from './Nav';\nexport * from './Notification';\nexport * from './RadioButton';\nexport * from './RadioButtonGroup';\nexport * from './RangeInput';\nexport * from './RangeSelector';\nexport * from './RoutedAnchor';\nexport * from './RoutedButton';\nexport * from './Select';\nexport * from './SelectMultiple';\nexport * from './Sidebar';\nexport * from './Skeleton';\nexport * from './SkipLink';\nexport * from './SkipLinks';\nexport * from './SkipLinkTarget';\nexport * from './Spinner';\nexport * from './Stack';\nexport * from './StarRating';\nexport * from './Table';\nexport * from './TableBody';\nexport * from './TableCell';\nexport * from './TableFooter';\nexport * from './TableHeader';\nexport * from './TableRow';\nexport * from './Tab';\nexport * from './Tabs';\nexport * from './Tag';\nexport * from './Text';\nexport * from './TextArea';\nexport * from './TextInput';\nexport * from './Tip';\nexport * from './Toolbar';\nexport * from './ThumbsRating';\nexport * from './Video';\nexport * from './WorldMap';","'use client';\n\nexport * from './components';\nexport * from './contexts';\nexport * from './default-props';\nexport * from './themes';","\"use strict\";\n\nexports.__esModule = true;\nexports.generate = exports.base = void 0;\nvar _Actions = require(\"grommet-icons/icons/Actions\");\nvar _AssistListening = require(\"grommet-icons/icons/AssistListening\");\nvar _CircleInformation = require(\"grommet-icons/icons/CircleInformation\");\nvar _ClosedCaption = require(\"grommet-icons/icons/ClosedCaption\");\nvar _Expand = require(\"grommet-icons/icons/Expand\");\nvar _FormClose = require(\"grommet-icons/icons/FormClose\");\nvar _FormDown = require(\"grommet-icons/icons/FormDown\");\nvar _FormNext = require(\"grommet-icons/icons/FormNext\");\nvar _FormPrevious = require(\"grommet-icons/icons/FormPrevious\");\nvar _FormUp = require(\"grommet-icons/icons/FormUp\");\nvar _Next = require(\"grommet-icons/icons/Next\");\nvar _Pause = require(\"grommet-icons/icons/Pause\");\nvar _Play = require(\"grommet-icons/icons/Play\");\nvar _FormPin = require(\"grommet-icons/icons/FormPin\");\nvar _Previous = require(\"grommet-icons/icons/Previous\");\nvar _StatusCriticalSmall = require(\"grommet-icons/icons/StatusCriticalSmall\");\nvar _StatusGoodSmall = require(\"grommet-icons/icons/StatusGoodSmall\");\nvar _StatusWarningSmall = require(\"grommet-icons/icons/StatusWarningSmall\");\nvar _StatusUnknownSmall = require(\"grommet-icons/icons/StatusUnknownSmall\");\nvar _Subtract = require(\"grommet-icons/icons/Subtract\");\nvar _Volume = require(\"grommet-icons/icons/Volume\");\nvar _VolumeLow = require(\"grommet-icons/icons/VolumeLow\");\nvar _base = require(\"grommet-icons/themes/base\");\nvar _object = require(\"../utils/object\");\nvar _mixins = require(\"../utils/mixins\");\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nvar brandColor = '#7D4CDB';\nvar accentColors = ['#6FFFB0', '#FD6FFF', '#81FCED', '#FFCA58'];\nvar neutralColors = ['#00873D', '#3D138D', '#00739D', '#A2423D'];\nvar statusColors = {\n critical: '#FF4040',\n error: '#B30000',\n warning: '#FFAA15',\n ok: '#00C781',\n unknown: '#CCCCCC',\n disabled: '#CCCCCC'\n};\nvar darkColors = ['#333333', '#555555', '#777777', '#999999', '#999999', '#999999'];\nvar lightColors = ['#F8F8F8', '#F2F2F2', '#EDEDED', '#DADADA', '#DADADA', '#DADADA'];\nvar focusColor = accentColors[0];\nvar colors = {\n active: 'rgba(221, 221, 221, 0.5)',\n 'background-back': {\n dark: '#33333308',\n light: '#EDEDED'\n },\n 'background-front': {\n dark: '#444444',\n light: '#FFFFFF'\n },\n 'background-contrast': {\n light: '#33333310',\n dark: '#FFFFFF18'\n },\n 'active-background': 'background-contrast',\n 'active-text': 'text-strong',\n black: '#000000',\n border: {\n dark: 'rgba(255, 255, 255, 0.33)',\n light: 'rgba(0, 0, 0, 0.33)'\n },\n brand: brandColor,\n control: {\n dark: 'accent-1',\n light: 'brand'\n },\n focus: focusColor,\n 'graph-0': 'accent-1',\n 'graph-1': 'neutral-1',\n 'graph-2': 'neutral-2',\n 'graph-3': 'neutral-3',\n 'graph-4': 'neutral-4',\n placeholder: '#AAAAAA',\n selected: 'brand',\n text: {\n dark: '#f8f8f8',\n light: '#444444'\n },\n 'text-strong': {\n dark: '#FFFFFF',\n light: '#000000'\n },\n 'text-weak': {\n dark: '#CCCCCC',\n light: '#555555'\n },\n 'text-xweak': {\n dark: '#BBBBBB',\n light: '#666666'\n },\n icon: {\n dark: '#f8f8f8',\n light: '#666666'\n },\n 'selected-background': 'brand',\n 'selected-text': 'text-strong',\n white: '#FFFFFF'\n};\nvar colorArray = function colorArray(array, prefix) {\n return array.forEach(function (color, index) {\n colors[prefix + \"-\" + (index + 1)] = color;\n });\n};\ncolorArray(accentColors, 'accent');\ncolorArray(darkColors, 'dark');\ncolorArray(lightColors, 'light');\ncolorArray(neutralColors, 'neutral');\nObject.keys(statusColors).forEach(function (color) {\n colors[\"status-\" + color] = statusColors[color];\n});\nvar generate = function generate(baseSpacing, scale) {\n if (baseSpacing === void 0) {\n baseSpacing = 24;\n }\n if (scale === void 0) {\n scale = 6;\n }\n // 24\n var baseFontSize = baseSpacing * 0.75; // 18\n var fontScale = baseSpacing / scale; // 4\n\n var fontSizing = function fontSizing(factor) {\n return {\n size: baseFontSize + factor * fontScale + \"px\",\n height: baseSpacing + factor * fontScale + \"px\",\n // maxWidth chosen to be ~50 characters wide\n // see: https://ux.stackexchange.com/a/34125\n maxWidth: baseSpacing * (baseFontSize + factor * fontScale) + \"px\"\n };\n };\n var borderWidth = 2;\n var controlBorderWidth = 1;\n var result = (0, _object.deepMerge)(_base.base, {\n global: {\n active: {\n background: {\n color: 'active',\n opacity: 'medium'\n },\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n animation: {\n duration: '1s',\n jiggle: {\n duration: '0.1s'\n }\n },\n // backgrounds: undefined,\n borderSize: {\n xsmall: '1px',\n small: '2px',\n medium: baseSpacing / 6 + \"px\",\n // 4\n large: baseSpacing / 2 + \"px\",\n // 12\n xlarge: baseSpacing + \"px\" // 24\n },\n\n breakpoints: {\n small: {\n value: baseSpacing * 32,\n // 768\n borderSize: {\n xsmall: '1px',\n small: '2px',\n medium: baseSpacing / 6 + \"px\",\n // 4\n large: baseSpacing / 4 + \"px\",\n // 6\n xlarge: baseSpacing / 2 + \"px\" // 12\n },\n\n edgeSize: {\n none: '0px',\n hair: '1px',\n // for Chart\n xxsmall: '2px',\n xsmall: baseSpacing / 8 + \"px\",\n // 3\n small: baseSpacing / 4 + \"px\",\n // 6\n medium: baseSpacing / 2 + \"px\",\n // 12\n large: baseSpacing + \"px\",\n // 24\n xlarge: baseSpacing * 2 + \"px\" // 48\n },\n\n size: {\n xxsmall: baseSpacing + \"px\",\n // 24\n xsmall: baseSpacing * 2 + \"px\",\n // 48\n small: baseSpacing * 4 + \"px\",\n // 96\n medium: baseSpacing * 8 + \"px\",\n // 192\n large: baseSpacing * 16 + \"px\",\n // 384\n xlarge: baseSpacing * 32 + \"px\",\n // 768\n full: '100%'\n }\n },\n medium: {\n value: baseSpacing * 64 // 1536\n },\n\n large: {} // anything above 'medium'\n },\n\n // Breakpoints used at Server Side Rendering for the initial rendering\n // These values correspond to the theme breakpoints\n deviceBreakpoints: {\n phone: 'small',\n tablet: 'medium',\n computer: 'large'\n },\n colors: colors,\n control: {\n border: {\n width: controlBorderWidth + \"px\",\n radius: '4px',\n color: 'border'\n },\n disabled: {\n opacity: 0.3\n }\n },\n // The time to wait after the user stopped typing, measured in ms.\n // A half second (500ms) debounce can be a helpful starting point.\n // You want to give the user time to fill out a field, but capture\n // their attention before they move on past it. 2 second (2000ms)\n // might be too long depending on how fast people type, and 200ms\n // would be an eye blink\n debounceDelay: 500,\n drop: {\n // intelligentMargin: undefined,\n background: {\n dark: 'black',\n light: 'white'\n },\n border: {\n radius: '0px'\n },\n // margin: undefined\n shadowSize: 'small',\n // shadowSize is deprecated, use 'elevation'\n zIndex: '20'\n },\n edgeSize: {\n none: '0px',\n hair: '1px',\n // for Chart\n xxsmall: baseSpacing / 8 + \"px\",\n // 3\n xsmall: baseSpacing / 4 + \"px\",\n // 6\n small: baseSpacing / 2 + \"px\",\n // 12\n medium: baseSpacing + \"px\",\n // 24\n large: baseSpacing * 2 + \"px\",\n // 48\n xlarge: baseSpacing * 4 + \"px\",\n // 96\n responsiveBreakpoint: 'small'\n },\n elevation: {\n light: {\n none: 'none',\n xsmall: '0px 1px 2px rgba(0, 0, 0, 0.20)',\n small: '0px 2px 4px rgba(0, 0, 0, 0.20)',\n medium: '0px 4px 8px rgba(0, 0, 0, 0.20)',\n large: '0px 8px 16px rgba(0, 0, 0, 0.20)',\n xlarge: '0px 12px 24px rgba(0, 0, 0, 0.20)'\n },\n dark: {\n none: 'none',\n xsmall: '0px 2px 2px rgba(255, 255, 255, 0.40)',\n small: '0px 4px 4px rgba(255, 255, 255, 0.40)',\n medium: '0px 6px 8px rgba(255, 255, 255, 0.40)',\n large: '0px 8px 16px rgba(255, 255, 255, 0.40)',\n xlarge: '0px 12px 24px rgba(255, 255, 255, 0.40)'\n }\n },\n focus: {\n // shadow or outline are required for accessibility\n border: {\n // remove to only have shadow\n color: 'focus'\n },\n // outline: { color: undefined, size: undefined },\n shadow: {\n color: 'focus',\n size: '2px'\n }\n },\n font: _extends({}, fontSizing(0)),\n hover: {\n background: {\n color: 'active',\n opacity: 'medium'\n },\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n input: {\n padding: {\n horizontal: (0, _mixins.parseMetricToNum)(baseSpacing / 2 + \"px\") - (0, _mixins.parseMetricToNum)(controlBorderWidth + \"px\") + \"px\",\n vertical: (0, _mixins.parseMetricToNum)(baseSpacing / 2 + \"px\") - (0, _mixins.parseMetricToNum)(controlBorderWidth + \"px\") + \"px\"\n },\n font: {\n // size: undefined,\n // height: undefined,\n weight: 600\n }\n // deprecate in v3\n // weight: undefined,\n },\n\n opacity: {\n strong: 0.8,\n medium: 0.4,\n weak: 0.1\n },\n selected: {\n background: 'selected',\n color: 'white'\n },\n spacing: baseSpacing + \"px\",\n size: {\n xxsmall: baseSpacing * 2 + \"px\",\n // 48\n xsmall: baseSpacing * 4 + \"px\",\n // 96\n small: baseSpacing * 8 + \"px\",\n // 192\n medium: baseSpacing * 16 + \"px\",\n // 384\n large: baseSpacing * 32 + \"px\",\n // 768\n xlarge: baseSpacing * 48 + \"px\",\n // 1152\n xxlarge: baseSpacing * 64 + \"px\",\n // 1536\n full: '100%'\n }\n },\n // icon: {\n // extennd: undefined,\n // matchSize: undefined,\n // size: undefined,\n // },\n accordion: {\n panel: {\n // border: {\n // side: 'bottom',\n // color: 'border',\n // },\n },\n border: {\n side: 'bottom',\n color: 'border'\n },\n heading: {\n level: '4' // level ranges from 1-6\n // margin: undefined\n },\n\n hover: {\n // background: undefined,\n color: {\n dark: 'light-4',\n light: 'dark-3'\n },\n // deprecated\n heading: {\n color: {\n dark: 'light-4',\n light: 'dark-3'\n }\n }\n },\n icons: {\n collapse: _FormUp.FormUp,\n expand: _FormDown.FormDown\n // color: { dark: undefined, light: undefined },\n }\n },\n\n anchor: {\n textDecoration: 'none',\n fontWeight: 600,\n color: {\n dark: 'accent-1',\n light: 'brand'\n },\n gap: 'small',\n hover: {\n textDecoration: 'underline'\n // fontWeight: undefined,\n // extend: undefined,\n }\n // size: {\n // medium: {\n // color: undefined,\n // fontWeight: undefined,\n // textDecoration: undefined,\n // },\n // },\n // extend: undefined,\n },\n\n avatar: {\n // extend: undefined,\n size: {\n xsmall: baseSpacing * 0.75 + \"px\",\n // 18px\n small: baseSpacing + \"px\",\n // 24px\n medium: baseSpacing * 2 + \"px\",\n // default 48px\n large: baseSpacing * 3 + \"px\",\n // 72px\n xlarge: baseSpacing * 4 + \"px\",\n // 96px\n '2xl': baseSpacing * 5 + \"px\",\n // 120px\n '3xl': baseSpacing * 6 + \"px\",\n // 144px\n '4xl': baseSpacing * 7 + \"px\",\n // 168px\n '5xl': baseSpacing * 8 + \"px\" // 192px\n },\n\n text: {\n size: {\n xsmall: 'small',\n // 14px\n small: 'medium',\n // 18px\n medium: 'large',\n // 22px\n large: 'xlarge',\n // 26px\n xlarge: 'xxlarge',\n // 34px\n '2xl': '3xl',\n // 42px\n '3xl': '4xl',\n // 54px\n '4xl': '5xl',\n // 70px\n '5xl': '6xl' // 90px\n }\n // fontWeight: undefined,\n // extend: undefined\n }\n },\n\n box: {\n responsiveBreakpoint: 'small' // when we switch rows to columns\n // extend: undefined,\n },\n\n button: {\n badge: {\n // align: undefined,,\n container: {\n background: 'brand'\n // pad: undefined,\n // extend: undefined,\n },\n\n size: {\n medium: baseSpacing + \"px\" // 24px\n },\n\n text: {\n size: {\n medium: 'small' // 14px\n }\n }\n },\n\n gap: 'small',\n size: {\n small: {\n border: {\n radius: baseSpacing * 0.75 + \"px\"\n },\n pad: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n // 4px\n horizontal: baseSpacing - borderWidth * 2 + \"px\" // 20px,\n }\n // iconOnly: {\n // pad: undefined,\n // },\n },\n\n medium: {\n border: {\n radius: baseSpacing * 0.75 + \"px\" // 18px\n },\n\n pad: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n // 4px\n horizontal: baseSpacing - borderWidth + \"px\" // 22px\n }\n // iconOnly: {\n // pad: undefined,\n // },\n },\n\n large: {\n border: {\n radius: baseSpacing + \"px\" // 24px\n },\n\n pad: {\n vertical: baseSpacing / 4 + borderWidth + \"px\",\n // 8px\n horizontal: baseSpacing + borderWidth * 4 + \"px\" // 32px,\n }\n // iconOnly: {\n // pad: undefined,\n // },\n }\n },\n\n border: {\n // color: { dark: undefined, light: undefined }\n width: borderWidth + \"px\",\n radius: baseSpacing * 0.75 + \"px\"\n },\n // color: { dark: undefined, light: undefined }\n // default: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // primary: {\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // secondary: {\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // option: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n active: {\n background: 'active-background',\n // border: undefined,\n color: 'active-text'\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n },\n\n disabled: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n opacity: 0.3\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n },\n\n // hover: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n // },\n padding: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n horizontal: baseSpacing - borderWidth + \"px\"\n },\n transition: {\n timing: 'ease-in-out',\n duration: 0.1,\n properties: ['color', 'background-color', 'border-color', 'box-shadow']\n },\n skeleton: {\n width: {\n min: '100px'\n }\n }\n },\n calendar: {\n // daySize must align with global.size\n small: {\n // title: {},\n fontSize: baseFontSize - fontScale + \"px\",\n lineHeight: 1.375,\n daySize: baseSpacing * 8 / 7 + \"px\",\n slideDuration: '0.2s'\n },\n medium: {\n // title: {},\n fontSize: baseFontSize + \"px\",\n lineHeight: 1.45,\n daySize: baseSpacing * 16 / 7 + \"px\",\n slideDuration: '0.5s'\n },\n large: {\n // title: {},\n fontSize: baseFontSize + 3 * fontScale + \"px\",\n lineHeight: 1.11,\n daySize: baseSpacing * 32 / 7 + \"px\",\n slideDuration: '0.8s'\n },\n icons: {\n previous: _Previous.Previous,\n next: _Next.Next,\n small: {\n previous: _FormPrevious.FormPrevious,\n next: _FormNext.FormNext\n }\n },\n heading: {\n level: '4'\n } // level ranges from 1-6\n },\n\n card: {\n container: {\n round: 'small',\n elevation: 'small'\n // extend: undefined,\n },\n\n // hover: {\n // container: {\n // elevation: undefined,\n // },\n // },\n header: {},\n body: {},\n footer: {}\n },\n cards: {\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n }\n },\n\n carousel: {\n icons: {\n current: _Subtract.Subtract,\n next: _Next.Next,\n previous: _Previous.Previous\n // color: { dark: undefined, light: undefined },\n },\n\n animation: {\n duration: 1000\n },\n disabled: {\n icons: {\n // color: { dark: undefined, light: undefined },\n }\n }\n },\n chart: {\n color: 'graph-0'\n // extend: undefined,\n },\n\n checkBox: {\n border: {\n color: {\n dark: 'rgba(255, 255, 255, 0.5)',\n light: 'rgba(0, 0, 0, 0.15)'\n },\n width: '2px'\n },\n check: {\n // extend: undefined,\n radius: '4px',\n thickness: '4px'\n },\n label: {\n align: 'center'\n },\n // color: { dark: undefined, light: undefined },\n // extend: undefined,\n // gap: undefined\n hover: {\n border: {\n color: {\n dark: 'white',\n light: 'black'\n }\n }\n // background: undefined,\n // extend: undefined,\n },\n\n icon: {\n // size: undefined,\n // extend: undefined,\n },\n icons: {\n // checked: undefined,\n // indeterminate: undefined,\n },\n // pad: undefined,\n size: baseSpacing + \"px\",\n toggle: {\n // background: undefined\n color: {\n dark: '#d9d9d9',\n light: '#d9d9d9'\n },\n knob: {\n // extend: undefined,\n },\n radius: baseSpacing + \"px\",\n size: baseSpacing * 2 + \"px\"\n // extend: undefined,\n }\n },\n\n checkBoxGroup: {\n // container: {\n // // any box props\n // extend: undefined,\n // },\n },\n clock: {\n analog: {\n // extend: undefined,\n hour: {\n color: {\n dark: 'light-2',\n light: 'dark-3'\n },\n width: baseSpacing / 3 + \"px\",\n size: baseSpacing + \"px\",\n shape: 'round'\n },\n minute: {\n color: {\n dark: 'light-4',\n light: 'dark-3'\n },\n width: baseSpacing / 6 + \"px\",\n size: Math.round(baseSpacing / 2) + \"px\",\n shape: 'round'\n },\n second: {\n color: {\n dark: 'accent-1',\n light: 'accent-1'\n },\n width: baseSpacing / 8 + \"px\",\n size: Math.round(baseSpacing / 2.666) + \"px\",\n shape: 'round'\n },\n size: {\n xsmall: baseSpacing * 2 + \"px\",\n small: baseSpacing * 3 + \"px\",\n medium: baseSpacing * 4 + \"px\",\n large: baseSpacing * 6 + \"px\",\n xlarge: baseSpacing * 9 + \"px\",\n xxlarge: baseSpacing * 12 + \"px\",\n huge: baseSpacing * 12 + \"px\" // kept for backwards compatibility\n }\n },\n\n digital: {\n text: {\n xsmall: {\n size: baseFontSize - 2 * fontScale + \"px\",\n height: 1.5\n },\n small: {\n size: baseFontSize - fontScale + \"px\",\n height: 1.43\n },\n medium: {\n size: baseFontSize + \"px\",\n height: 1.375\n },\n large: {\n size: baseFontSize + fontScale + \"px\",\n height: 1.167\n },\n xlarge: {\n size: baseFontSize + 2 * fontScale + \"px\",\n height: 1.1875\n },\n xxlarge: {\n size: baseFontSize + 4 * fontScale + \"px\",\n height: 1.125\n }\n }\n }\n },\n collapsible: {\n minSpeed: 200,\n baseline: 500\n },\n dateInput: {\n container: {\n round: 'xxsmall'\n }\n // icon: {\n // size: undefined,\n // },\n },\n\n dataTable: {\n // body: {\n // extend: undefined,\n // },\n pinned: {\n // body: {\n // background: undefined,\n // extend: undefined,\n // },\n header: {\n background: {\n opacity: 'strong'\n }\n // extend: undefined,\n },\n\n footer: {\n background: {\n opacity: 'strong'\n }\n // extend: undefined,\n }\n },\n\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n },\n\n groupHeader: {\n background: {\n dark: 'dark-2',\n light: 'light-2'\n },\n border: {\n side: 'bottom',\n size: 'xsmall'\n },\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n }\n },\n groupEnd: {\n border: {\n side: 'bottom',\n size: 'xsmall'\n }\n },\n header: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // extend: undefined,\n // font: {\n // weight: undefined,\n // size: undefined,\n // },\n gap: 'small',\n // hover: {\n // background: undefined,\n // },\n // pad: undefined,\n units: {\n color: 'text-xweak',\n margin: {\n left: 'xsmall'\n },\n alignSelf: 'end'\n }\n },\n icons: {\n ascending: _FormDown.FormDown,\n contract: _FormUp.FormUp,\n descending: _FormUp.FormUp,\n expand: _FormDown.FormDown\n // sortable: undefined,\n },\n\n primary: {\n weight: 'bold'\n },\n resize: {\n border: {\n color: 'border',\n side: 'end'\n }\n // hover: {\n // border: {\n // color: undefined,\n // side: undefined,\n // size: undefined,\n // },\n // },\n }\n },\n\n diagram: {\n // extend: undefined,\n line: {\n color: 'graph-0'\n }\n },\n // drop: {\n // extend: undefined,\n // maxHeight: undefined,\n // },\n fileInput: {\n // background: {},\n border: {\n // color: undefined,\n side: 'all',\n size: 'small',\n style: 'dashed'\n },\n dragOver: {\n border: {\n color: 'control'\n }\n // extend: undefined,\n },\n\n hover: {\n border: {\n color: 'brand'\n }\n // extend: undefined,\n },\n\n icons: {\n remove: _FormClose.FormClose\n },\n // pad: {},\n label: {\n margin: 'small'\n // extend: undefined,\n },\n\n message: {\n margin: 'small'\n // extend: undefined,\n }\n // extend: undefined,\n },\n\n formField: {\n border: {\n color: 'border',\n error: {\n color: {\n dark: 'white',\n light: 'status-critical'\n }\n },\n position: 'inner',\n side: 'bottom'\n },\n // checkBox: {\n // pad: undefined,\n // },\n content: {\n // margin: undefined,\n pad: 'small'\n },\n disabled: {\n background: {\n color: 'status-disabled',\n opacity: 'medium'\n }\n // border: {\n // color: undefined,\n // },\n // label: {\n // color: undefined,\n // },\n },\n\n // focus: {\n // background: {\n // color: undefined,\n // },\n // border: {\n // color: undefined,\n // },\n // },\n error: {\n color: 'status-critical',\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // background: undefined,\n // container: {}, // any Box props\n // icon: undefined,\n },\n\n // extend: undefined,\n help: {\n color: 'dark-3',\n margin: {\n start: 'small'\n }\n },\n info: {\n color: 'text-xweak',\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // container: {}, // any Box props\n // icon: undefined,\n },\n\n label: {\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // requiredIndicator: undefined,\n },\n\n margin: {\n bottom: 'small'\n },\n // round: undefined,\n survey: {\n label: {\n margin: {\n bottom: 'xsmall'\n },\n size: 'medium',\n weight: 400\n }\n }\n },\n grommet: {\n // extend: undefined\n },\n header: {\n sticky: {\n zIndex: '20'\n }\n },\n heading: {\n // color: undefined,\n font: {\n // family: undefined\n },\n level: {\n 1: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(4)),\n medium: _extends({}, fontSizing(8)),\n large: _extends({}, fontSizing(16)),\n xlarge: _extends({}, fontSizing(24))\n },\n 2: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(2)),\n medium: _extends({}, fontSizing(4)),\n large: _extends({}, fontSizing(8)),\n xlarge: _extends({}, fontSizing(12))\n },\n 3: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(1)),\n medium: _extends({}, fontSizing(2)),\n large: _extends({}, fontSizing(4)),\n xlarge: _extends({}, fontSizing(6))\n },\n 4: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(0)),\n medium: _extends({}, fontSizing(0)),\n large: _extends({}, fontSizing(0)),\n xlarge: _extends({}, fontSizing(0))\n },\n 5: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(-0.5)),\n medium: _extends({}, fontSizing(-0.5)),\n large: _extends({}, fontSizing(-0.5)),\n xlarge: _extends({}, fontSizing(-0.5))\n },\n 6: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(-1)),\n large: _extends({}, fontSizing(-1)),\n xlarge: _extends({}, fontSizing(-1))\n }\n },\n responsiveBreakpoint: 'small',\n // when we scale the font size down\n weight: 600,\n skeleton: {\n width: {\n min: '150px',\n max: '200px'\n }\n }\n },\n layer: {\n background: {\n dark: 'black',\n light: 'white'\n },\n border: {\n radius: '4px'\n // intelligentRounding: undefined,\n },\n\n container: {\n // elevation: undefined,\n zIndex: '20'\n },\n // extend: undefined,\n overlay: {\n background: 'rgba(0, 0, 0, 0.5)'\n // backdropFilter: undefined,\n },\n\n responsiveBreakpoint: 'small',\n // when Layer takes over the full screen\n zIndex: '20'\n },\n list: {\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n },\n\n item: {\n // background: undefined,\n border: 'horizontal',\n disabled: {\n color: 'status-disabled',\n cursor: 'default'\n },\n pinned: {\n background: 'background-contrast',\n icon: {\n size: 'medium',\n pad: 'small'\n }\n },\n pad: {\n horizontal: 'medium',\n vertical: 'small'\n }\n // extend: undefined,\n },\n\n icons: {\n down: _FormDown.FormDown,\n up: _FormUp.FormUp,\n pin: _FormPin.FormPin\n }\n // extend: undefined,\n },\n\n maskedInput: {\n // container: {\n // extend: undefined,\n // },\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n menu: {\n // background: undefined,\n // item: undefined,\n // extend: undefined,\n drop: {\n align: {\n top: 'top',\n left: 'left'\n }\n // any drop props\n },\n\n group: {\n container: {\n pad: {\n vertical: 'xsmall'\n }\n },\n separator: {\n color: 'border',\n size: 'xsmall',\n pad: {\n horizontal: 'small'\n }\n }\n },\n icons: {\n down: _FormDown.FormDown\n // up: undefined,\n // color: { dark: undefined, light: undefined },\n }\n },\n\n meter: {\n color: 'graph-0'\n // colors: [] || colors: ['graph-0', 'graph-1', 'graph-2', 'graph-3'],\n // extend: undefined,\n },\n\n nameValueList: {\n gap: {\n column: 'large',\n row: 'small'\n },\n pair: {\n column: {\n gap: {\n column: 'large',\n row: 'medium'\n }\n }\n },\n name: {\n width: 'small'\n },\n value: {\n width: 'medium'\n }\n },\n nameValuePair: {\n column: {\n gap: 'xxsmall'\n },\n name: {\n // any text props\n color: 'text',\n weight: 'bold'\n },\n value: {\n // any text props\n color: 'text'\n }\n },\n notification: {\n actions: {\n // any anchor props\n },\n direction: 'column',\n container: {\n // any box props\n round: 'xsmall',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n background: {\n color: 'background-front'\n }\n },\n global: {\n direction: 'row',\n container: {\n // any box props\n round: 'none',\n pad: {\n horizontal: 'large',\n vertical: 'xsmall'\n }\n }\n },\n toast: {\n // direction: undefined,\n container: {\n // any box props\n elevation: 'medium',\n width: 'medium'\n },\n layer: {\n position: 'top',\n margin: 'medium'\n },\n time: 8000\n },\n iconContainer: {\n // any box props\n pad: {\n right: 'small'\n },\n flex: false\n },\n textContainer: {\n // any box props\n gap: 'medium'\n },\n title: {\n // any text props\n weight: 'bold'\n },\n message: {\n // any text props\n margin: 'none'\n },\n close: {\n icon: _FormClose.FormClose\n },\n critical: {\n icon: _StatusCriticalSmall.StatusCriticalSmall,\n background: {\n color: 'status-critical',\n opacity: 'weak'\n },\n color: 'status-critical',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n warning: {\n icon: _StatusWarningSmall.StatusWarningSmall,\n background: {\n color: 'status-warning',\n opacity: 'weak'\n },\n color: 'status-warning',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n normal: {\n icon: _StatusGoodSmall.StatusGoodSmall,\n background: {\n color: 'status-ok',\n opacity: 'weak'\n },\n color: 'status-ok',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n info: {\n icon: _CircleInformation.CircleInformation,\n background: 'background-contrast',\n color: 'text-strong',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n unknown: {\n icon: _StatusUnknownSmall.StatusUnknownSmall,\n background: {\n color: 'status-unknown',\n opacity: 'weak'\n },\n color: 'status-unknown',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n // deprecate \"undefined\" in v3\n // and if undefined, no icon\n undefined: {\n icon: _StatusUnknownSmall.StatusUnknownSmall,\n // background: undefined,\n color: 'status-unknown'\n // global: {},\n // toast: {},\n }\n },\n\n page: {\n wide: {\n alignSelf: 'center',\n width: {\n min: 'medium',\n max: 'xxlarge'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n },\n narrow: {\n alignSelf: 'center',\n width: {\n min: 'medium',\n max: 'large'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n },\n full: {\n alignSelf: 'start',\n width: {\n min: 'medium',\n max: '100%'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n }\n },\n pageHeader: {\n actions: {\n // any box props\n align: 'end'\n },\n pad: {\n top: 'large',\n bottom: 'medium'\n },\n parent: {\n // any box props\n align: 'start'\n },\n responsive: {\n actions: {\n // any box props\n align: 'start',\n pad: {\n top: 'small'\n }\n },\n areas: [['parent'], ['title'], ['subtitle'], ['actions']],\n breakpoints: ['small'],\n columns: ['auto'],\n rows: ['auto']\n // gap: undefined,\n },\n\n subtitle: {\n // any paragraph props\n margin: 'none'\n },\n title: {\n // any heading props\n margin: 'none',\n fill: true\n },\n size: {\n small: {\n pad: {\n top: 'medium',\n bottom: 'small'\n },\n subtitle: {\n size: 'small'\n },\n title: {\n size: 'small'\n }\n },\n // medium: {\n // // pad: undefined,\n // // subtitle: {},\n // // title: {},\n // },\n large: {\n pad: {\n top: 'xlarge',\n bottom: 'large'\n },\n subtitle: {\n size: 'large'\n },\n title: {\n size: 'large'\n }\n }\n },\n small: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['small', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'large'\n }\n },\n medium: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['medium', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'medium'\n }\n },\n large: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['medium', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'large'\n }\n }\n },\n pagination: {\n button: {\n active: {\n background: {\n color: 'active-background'\n }\n },\n color: 'text-strong',\n hover: {\n background: {\n color: 'background-contrast'\n },\n color: undefined\n },\n size: {\n small: {\n border: {\n radius: baseSpacing / 8 + \"px\",\n // 3\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(-1)),\n height: baseSpacing * 1.25 + \"px\",\n width: baseSpacing * 1.25 + \"px\"\n },\n medium: {\n border: {\n radius: baseSpacing / 6 + \"px\",\n // 4\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(0)),\n height: baseSpacing * 1.5 + \"px\",\n width: baseSpacing * 1.5 + \"px\"\n },\n large: {\n border: {\n radius: baseSpacing / 4 + \"px\",\n // 6\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(1)),\n height: baseSpacing * 2 + \"px\",\n width: baseSpacing * 2 + \"px\"\n }\n }\n },\n // container: {\n // // any box props,\n // extend: undefined,\n // },\n controls: {\n align: 'center',\n direction: 'row',\n gap: 'xxsmall',\n margin: 'none',\n pad: 'none'\n },\n icons: {\n // color: undefined,\n next: _Next.Next,\n previous: _Previous.Previous\n }\n },\n paragraph: {\n font: {\n // family: undefined\n },\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(0)),\n large: _extends({}, fontSizing(1)),\n xlarge: _extends({}, fontSizing(2)),\n xxlarge: _extends({}, fontSizing(4))\n },\n thumbsRating: {\n // dislike: {\n // color: undefined,\n // },\n // like: {\n // color: undefined,\n // },\n },\n spinner: {\n container: {\n animation: 'rotateRight',\n color: 'brand',\n pad: 'small',\n round: 'full',\n size: 'small'\n },\n // icon: undefined\n size: {\n xsmall: baseSpacing * 0.75 + \"px\",\n small: baseSpacing + \"px\",\n // default 24\n medium: baseSpacing * 2 + \"px\",\n large: baseSpacing * 3 + \"px\",\n xlarge: baseSpacing * 4 + \"px\"\n }\n },\n radioButton: {\n border: {\n color: {\n dark: 'rgba(255, 255, 255, 0.5)',\n light: 'rgba(0, 0, 0, 0.15)'\n },\n width: '2px'\n },\n check: {\n radius: '100%'\n // background: {\n // color: undefined,\n // },\n // color: { dark: undefined, light: undefined },\n // extend: undefined,\n },\n\n // color: undefined,\n hover: {\n // background: {\n // color: undefined,\n // },\n border: {\n color: {\n dark: 'white',\n light: 'black'\n }\n }\n },\n icon: {\n // size: undefined,\n // extend: undefined,\n },\n icons: {\n // circle: undefined,\n },\n gap: 'small',\n size: baseSpacing + \"px\",\n font: {\n // weight: undefined,\n },\n container: {\n // extend: undefined\n }\n },\n radioButtonGroup: {\n // container: {}, // any box props\n },\n rangeInput: {\n disabled: {\n opacity: 0.3\n // thumb: {\n // color: undefined,\n // },\n // track: {\n // color: undefined,\n // },\n },\n\n // extend: undefined\n track: {\n height: '4px',\n color: 'border'\n // opacity: undefined,\n // lower: {\n // color: 'undefined',\n // opacity: undefined,\n // },\n // upper: {\n // color: undefined,\n // opacity: undefined,\n // },\n // extend: undefined\n },\n\n thumb: {\n // color: { dark: undefined, light: undefined },\n // extend: undefined\n }\n },\n rangeSelector: {\n background: {\n invert: {\n color: 'light-4'\n }\n }\n // edge: {\n // type: undefined,\n // },\n },\n\n select: {\n // background: undefined,\n clear: {\n container: {\n pad: 'small',\n background: 'background-contrast'\n },\n // any box props\n text: {\n color: 'text-weak'\n } // any text props\n },\n\n container: {\n // extend: undefined,\n },\n control: {\n // extend: undefined,\n // open: undefined,\n },\n // emptySearchMessage: {\n // container: {}, // any box props\n // text: {}, // any text props\n // },\n icons: {\n // color: { dark: undefined, light: undefined },\n margin: {\n horizontal: 'small'\n },\n down: _FormDown.FormDown\n // up: undefined\n },\n\n options: {\n container: {\n align: 'start',\n pad: 'small'\n },\n text: {\n margin: 'none'\n }\n },\n // searchInput: undefined,\n step: 20\n },\n selectMultiple: {\n maxInline: 5\n },\n skeleton: {\n border: false,\n colors: {\n dark: ['background', 'background-front'],\n light: ['background', 'background-back']\n }\n },\n skipLinks: {\n position: 'top',\n container: {\n elevation: 'large',\n round: 'small',\n pad: 'medium'\n },\n label: {\n margin: {\n bottom: 'medium'\n },\n size: 'medium'\n }\n },\n starRating: {\n // color: undefined,\n },\n tab: {\n active: {\n color: 'text'\n // background: undefined,\n },\n\n // background: undefined,\n border: {\n side: 'bottom',\n size: 'small',\n color: {\n dark: 'accent-1',\n light: 'brand'\n },\n active: {\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n disabled: {\n // color: undefined,\n },\n hover: {\n color: {\n dark: 'white',\n light: 'black'\n }\n // extend: undefined,\n }\n },\n\n color: 'control',\n // disabled: {\n // color: undefined,\n // },\n // extend: undefined,\n hover: {\n // background: undefined,\n // extend: undefined,\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n margin: {\n vertical: 'xxsmall',\n horizontal: 'small'\n },\n pad: {\n bottom: 'xsmall'\n }\n },\n tabs: {\n // background: undefined,\n // extend: undefined,\n // gap: undefined,\n header: {\n // alignSelf: undefined,\n // background: undefined,\n // border: {\n // side: undefined,\n // size: undefined,\n // style: undefined,\n // color: undefined,\n // },\n // extend: undefined,\n },\n panel: {\n // extend: undefined,\n },\n step: {\n small: 1,\n medium: 3,\n large: 3\n }\n },\n table: {\n header: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n border: 'bottom'\n // verticalAlign: undefined,\n // background: undefined,\n // extend: undefined,\n },\n\n body: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n }\n // background: undefined,\n // border: undefined,\n // extend: undefined,\n },\n\n // row: {\n // hover: {\n // background: undefined,\n // color: undefined,\n // },\n // },\n footer: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n border: 'top'\n // verticalAlign: undefined,\n // background: undefined,\n // extend: undefined,\n }\n },\n\n tag: {\n // background: undefined,\n border: true,\n round: 'large',\n // name: undefined,\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n remove: {\n margin: {\n right: 'xsmall'\n }\n },\n separator: ' : ',\n size: {\n xsmall: {\n pad: {\n horizontal: baseSpacing / 3 + \"px\",\n vertical: 'xxsmall'\n },\n icon: {\n size: baseSpacing * 0.75 + \"px\"\n }\n },\n small: {\n pad: {\n horizontal: baseSpacing * 0.4 + \"px\",\n vertical: 'xxsmall'\n },\n icon: {\n size: baseSpacing * 0.75 + \"px\"\n }\n },\n large: {\n pad: {\n horizontal: baseSpacing / 3 * 2 + \"px\",\n vertical: \"xsmall\"\n },\n icon: {\n size: baseSpacing * 1.25 + \"px\"\n }\n },\n xlarge: {\n pad: {\n horizontal: baseSpacing * 0.75 + \"px\",\n vertical: 'xsmall'\n },\n icon: {\n size: baseSpacing * 1.5 + \"px\"\n }\n }\n },\n value: {\n weight: 600\n }\n },\n text: {\n font: {\n // family: undefined\n },\n xsmall: _extends({}, fontSizing(-1.5)),\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(0)),\n // 18px\n large: _extends({}, fontSizing(1)),\n // 22px\n xlarge: _extends({}, fontSizing(2)),\n xxlarge: _extends({}, fontSizing(4)),\n '2xl': _extends({}, fontSizing(4)),\n '3xl': _extends({}, fontSizing(6)),\n '4xl': _extends({}, fontSizing(9)),\n '5xl': _extends({}, fontSizing(13)),\n '6xl': _extends({}, fontSizing(18)),\n skeleton: {\n width: {\n width: '100px',\n min: '100px'\n },\n margin: {\n vertical: 'xsmall'\n },\n colors: {\n dark: ['border', 'border'],\n light: ['background-front', 'background-back']\n }\n }\n },\n textArea: {\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n textInput: {\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n tip: {\n content: {\n // any Box props\n background: 'background-contrast',\n elevation: 'small',\n margin: 'xsmall',\n pad: {\n vertical: 'xsmall',\n horizontal: 'small'\n },\n round: 'small'\n },\n drop: {\n // any props for the drop\n align: {\n top: 'bottom'\n },\n // most common use case is Header with Buttons\n background: 'none',\n elevation: 'none',\n margin: 'none'\n }\n },\n video: {\n captions: {\n background: 'rgba(0, 0, 0, 0.7)'\n },\n // controls: { background: undefined },\n icons: {\n closedCaption: _ClosedCaption.ClosedCaption,\n configure: _Actions.Actions,\n fullScreen: _Expand.Expand,\n pause: _Pause.Pause,\n play: _Play.Play,\n reduceVolume: _VolumeLow.VolumeLow,\n volume: _Volume.Volume,\n description: _AssistListening.AssistListening\n // color: { dark: undefined, light: undefined },\n },\n\n scrubber: {\n color: 'light-4',\n interval: 10\n // track: { color: undefined }\n }\n },\n\n worldMap: {\n color: 'light-3',\n continent: {\n active: '8px',\n base: '6px'\n },\n hover: {\n color: 'light-4'\n },\n place: {\n active: '20px',\n base: '8px'\n }\n }\n });\n return (0, _object.deepFreeze)(result);\n};\nexports.generate = generate;\nvar base = generate(24);\nexports.base = base;","\"use strict\";\n\nexports.__esModule = true;\nexports.dark = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _object = require(\"../utils/object\");\nvar _colors = require(\"../utils/colors\");\nvar accentColors = ['#FD6FFF', '#60EB9F', '#60EBE1', '#FFCA58'];\nvar neutralColors = ['#EB6060', '#01C781', '#6095EB', '#FFB200'];\nvar statusColors = {\n critical: '#FF3333',\n error: '#FF3333',\n warning: '#F7E464',\n ok: '#7DD892',\n unknown: '#a8a8a8',\n disabled: '#a8a8a8'\n};\nvar backgroundColor = '#111111';\nvar colors = {\n active: 'rgba(102, 102, 102, 0.5)',\n background: backgroundColor,\n black: '#000000',\n brand: '#FD6FFF',\n control: {\n dark: '#FFCA58',\n light: '#403216'\n },\n focus: '#FFCA58',\n icon: {\n dark: '#f8f8f8',\n light: '#666666'\n },\n placeholder: '#AAAAAA',\n text: {\n dark: '#eeeeee',\n light: '#444444'\n },\n white: '#FFFFFF'\n};\nvar colorArray = function colorArray(array, prefix) {\n return array.forEach(function (color, index) {\n colors[prefix + \"-\" + (index + 1)] = color;\n });\n};\ncolorArray(accentColors, 'accent');\ncolorArray(neutralColors, 'neutral');\nObject.keys(statusColors).forEach(function (color) {\n colors[\"status-\" + color] = statusColors[color];\n});\nvar dark = (0, _object.deepFreeze)({\n global: {\n colors: colors,\n drop: {\n background: '#333333'\n },\n focus: {\n border: {\n color: (0, _styledComponents.css)([\"\", \";\"], function (props) {\n return (0, _colors.normalizeColor)('focus', props.theme);\n }),\n width: '2px'\n }\n },\n font: {\n family: 'Arial'\n },\n input: {\n weight: 700\n }\n },\n anchor: {\n color: 'control'\n },\n layer: {\n background: backgroundColor,\n overlay: {\n background: 'rgba(48, 48, 48, 0.5)'\n }\n }\n});\nexports.dark = dark;","\"use strict\";\n\nexports.__esModule = true;\nexports.grommet = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _object = require(\"../utils/object\");\nvar grommet = (0, _object.deepFreeze)({\n global: {\n colors: {\n background: {\n light: '#ffffff',\n dark: '#000000'\n }\n },\n backgrounds: {\n stack: {\n color: 'light-1',\n image: \"url(https://v2.grommet.io/img/stak-hurrah.svg)\"\n },\n 'gradient-purple-blue': {\n color: 'neutral-3',\n image: \"linear-gradient(\\n #3D138D 0%, /* neutral-2 */\\n #00739D 100% /* neutral-3 */\\n );\",\n rotate: 145\n },\n 'gradient-purple-gold': {\n color: 'neutral-2',\n image: \"linear-gradient(\\n #3D138D 0%, /* neutral-2 */\\n #EB0F79 75%,\\n #FFCA58 100% /* accent-4 */\\n );\"\n }\n },\n font: {\n family: \"-apple-system,\\n BlinkMacSystemFont, \\n \\\"Segoe UI\\\", \\n Roboto, \\n Oxygen, \\n Ubuntu, \\n Cantarell, \\n \\\"Fira Sans\\\", \\n \\\"Droid Sans\\\", \\n \\\"Helvetica Neue\\\", \\n Arial, sans-serif, \\n \\\"Apple Color Emoji\\\", \\n \\\"Segoe UI Emoji\\\", \\n \\\"Segoe UI Symbol\\\"\"\n }\n },\n button: {\n extend: (0, _styledComponents.css)([\"\", \"\"], function (props) {\n return !props.plain && 'font-weight: bold;';\n })\n }\n});\nexports.grommet = grommet;","\"use strict\";\n\nexports.__esModule = true;\nexports.hacktoberfest2022 = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _object = require(\"../utils/object\");\nvar hacktoberfest2022 = (0, _object.deepFreeze)({\n defaultMode: 'dark',\n global: {\n colors: {\n background: '#160F1D',\n 'background-back': '#000000',\n 'background-front': '#160F1D',\n 'text-strong': '#FFFFFF',\n text: '#E4E1E6',\n 'text-weak': '#76717A',\n grey: '#AFACB2',\n lime: '#C6FC60',\n pink: '#D856A7',\n purple: '#7C7EF4',\n teal: '#73DAFB',\n yellow: '#EDD063',\n darkPurple: '#291E40',\n active: 'purple',\n focus: '#233670',\n brand: 'lime',\n control: 'teal',\n 'graph-0': 'yellow',\n 'graph-1': 'purple',\n 'graph-2': 'teal',\n 'graph-3': 'pink',\n 'graph-4': 'lime',\n // clear unused colors\n icon: undefined,\n 'accent-1': undefined,\n 'accent-2': undefined,\n 'accent-3': undefined,\n 'accent-4': undefined,\n 'neutral-1': undefined,\n 'neutral-2': undefined,\n 'neutral-3': undefined,\n 'neutral-4': undefined,\n 'neutral-5': undefined,\n 'light-1': undefined,\n 'light-2': undefined,\n 'light-3': undefined,\n 'light-4': undefined,\n 'light-5': undefined,\n 'light-6': undefined,\n 'dark-1': undefined,\n 'dark-2': undefined,\n 'dark-3': undefined,\n 'dark-4': undefined,\n 'dark-5': undefined,\n 'dark-6': undefined\n },\n backgrounds: {\n 'gradient-purple-teal': {\n image: \"linear-gradient(\\n #7C7EF4 0%,\\n #73DAFB 100%\\n );\"\n },\n 'gradient-teal-purple': {\n image: \"linear-gradient(\\n #73DAFB 0%,\\n #7C7EF4 100%\\n );\"\n },\n 'gradient-yellow-teal-purple': {\n image: \"linear-gradient(\\n #EDD063 0%,\\n #73DAFB 50%,\\n #7C7EF4 100%\\n );\",\n rotate: 90\n },\n 'gradient-yellow-teal': {\n image: \"linear-gradient(\\n #EDD063 0%,\\n #73DAFB 100%\\n );\",\n rotate: 90\n }\n },\n focus: {\n shadow: {\n color: 'focus',\n size: '3px'\n }\n },\n font: {\n family: '\"JetBrains Mono\", monospace',\n face: \"/* latin */\\n@font-face {\\n font-family: 'JetBrains Mono';\\n font-style: normal;\\n font-weight: 400;\\n src: url(https://fonts.gstatic.com/s/jetbrainsmono/v13/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOlOTk6OThhvA.woff) format('woff');\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\\n}\"\n }\n },\n grommet: {\n extend: (0, _styledComponents.css)([\"text-transform:uppercase;\"])\n },\n anchor: {\n color: 'text',\n hover: {\n color: 'text-strong'\n }\n },\n button: {\n border: {\n width: '0px',\n radius: '0px'\n },\n padding: {\n horizontal: '20px',\n vertical: '10px'\n },\n color: 'text-strong',\n size: {\n small: {\n pad: {\n horizontal: '16px',\n vertical: '8px'\n }\n },\n medium: {\n pad: {\n horizontal: '20px',\n vertical: '10px'\n }\n }\n },\n \"default\": {\n color: 'text-strong'\n },\n primary: {\n border: false,\n background: 'gradient-yellow-teal-purple',\n color: 'text'\n },\n hover: {\n border: false\n },\n extend: (0, _styledComponents.css)([\"clip-path:polygon( 12px 0px,100% 0px,100% 72%,calc(100% - 12px) 100%,0px 100%,0px 12px );text-transform:uppercase;&:focus{clip-path:none;}\"])\n },\n heading: {\n extend: (0, _styledComponents.css)([\"text-shadow:rgba(255,215,77,0.6) -1px -1px 6px,rgba(124,127,255,0.6) 1px 1px 6px;\"])\n }\n});\nexports.hacktoberfest2022 = hacktoberfest2022;","\"use strict\";\n\nexports.__esModule = true;\nexports.hacktoberfest2022 = exports.grommet = exports.generate = exports.dark = exports.base = void 0;\nvar _base = require(\"./base\");\nexports.base = _base.base;\nexports.generate = _base.generate;\nvar _grommet = require(\"./grommet\");\nexports.grommet = _grommet.grommet;\nvar _dark = require(\"./dark\");\nexports.dark = _dark.dark;\nvar _hacktoberfest = require(\"./hacktoberfest2022\");\nexports.hacktoberfest2022 = _hacktoberfest.hacktoberfest2022;","\"use strict\";\n\nexports.__esModule = true;\nexports.withinDropPortal = exports.shouldKeepFocus = exports.setFocusWithoutScroll = exports.makeNodeUnfocusable = exports.makeNodeFocusable = exports.isNodeBeforeScroll = exports.isNodeAfterScroll = exports.isFocusable = exports.getNewContainer = exports.getFirstFocusableDescendant = exports.findVisibleParent = exports.findScrollParents = exports.findScrollParent = exports.findButtonParent = exports.containsFocus = void 0;\nvar findScrollParent = function findScrollParent(element, horizontal) {\n var result;\n if (element) {\n var parent = element.parentNode;\n while (!result && parent && parent.getBoundingClientRect) {\n var rect = parent.getBoundingClientRect();\n // 10px is to account for borders and scrollbars in a lazy way\n if (horizontal) {\n if (rect.width && parent.scrollWidth > rect.width + 10) {\n result = parent;\n }\n } else if (rect.height && parent.scrollHeight > rect.height + 10) {\n result = parent;\n }\n parent = parent.parentNode;\n }\n // last scrollable element will be the document\n // if nothing else is scrollable in the page\n if (!result) {\n result = document;\n } else if (result.tagName.toLowerCase() === 'body') {\n result = document;\n }\n }\n return result;\n};\nexports.findScrollParent = findScrollParent;\nvar documentTags = ['html', 'body'];\nvar findScrollParents = function findScrollParents(element, horizontal) {\n var result = [];\n if (element) {\n var parent = element.parentNode;\n while (parent && parent.getBoundingClientRect) {\n var rect = parent.getBoundingClientRect();\n // 10px is to account for borders and scrollbars in a lazy way\n if (horizontal) {\n if (rect.width && parent.scrollWidth > rect.width + 10) {\n result.push(parent);\n }\n } else if (rect.height && parent.scrollHeight > rect.height + 10) {\n result.push(parent);\n }\n parent = parent.parentNode;\n }\n if (result.length && documentTags.includes(result[0].tagName.toLowerCase())) {\n result.length = 0;\n }\n // last scrollable element will be the document\n result.push(document);\n }\n return result;\n};\nexports.findScrollParents = findScrollParents;\nvar containsFocus = function containsFocus(node) {\n var root = node.getRootNode();\n var element = root.activeElement;\n while (element) {\n if (element === node) break;\n element = element.parentElement;\n }\n return !!element;\n};\nexports.containsFocus = containsFocus;\nvar withinDropPortal = function withinDropPortal(node, portalContext) {\n var root = node == null ? void 0 : node.getRootNode();\n var element = node;\n var portalId;\n while (element && element !== root) {\n if (element.hasAttribute('data-g-portal-id')) {\n portalId = element.getAttribute('data-g-portal-id');\n element = root;\n } else {\n element = element.parentElement;\n }\n }\n // if portalContext doesn't contain the portalId then the\n // portal is new and node is within a drop that just opened\n if (portalId === undefined || portalContext.indexOf(parseInt(portalId, 10)) !== -1) return false;\n return true;\n};\n\n// Check if the element.tagName is an input, select or textarea\nexports.withinDropPortal = withinDropPortal;\nvar isFocusable = function isFocusable(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName === 'input' || tagName === 'select' || tagName === 'textarea';\n};\n\n// Get the first element that can receive focus\nexports.isFocusable = isFocusable;\nvar getFirstFocusableDescendant = function getFirstFocusableDescendant(element) {\n var children = element.getElementsByTagName('*');\n for (var i = 0; i < children.length; i += 1) {\n var child = children[i];\n if (isFocusable(child)) {\n return child;\n }\n }\n return undefined;\n};\nexports.getFirstFocusableDescendant = getFirstFocusableDescendant;\nvar shouldKeepFocus = function shouldKeepFocus(root) {\n var element = root.activeElement;\n if (isFocusable(element)) return true;\n return !!getFirstFocusableDescendant(element);\n};\nexports.shouldKeepFocus = shouldKeepFocus;\nvar getNewContainer = function getNewContainer(target, targetChildPosition) {\n if (target === void 0) {\n target = document.body;\n }\n // setup DOM\n var container = document.createElement('div');\n if (targetChildPosition === 'first') {\n // for SkipLinks\n target.prepend(container);\n } else {\n target.appendChild(container);\n }\n return container;\n};\nexports.getNewContainer = getNewContainer;\nvar setFocusWithoutScroll = function setFocusWithoutScroll(element) {\n var x = window.scrollX;\n var y = window.scrollY;\n element.focus();\n window.scrollTo(x, y);\n};\nexports.setFocusWithoutScroll = setFocusWithoutScroll;\nvar TABINDEX = 'tabindex';\nvar TABINDEX_STATE = 'data-g-tabindex';\nvar makeNodeFocusable = function makeNodeFocusable(node) {\n // do not touch aria live containers so that announcements work\n if (!node.hasAttribute('aria-live')) {\n node.removeAttribute('aria-hidden');\n // allow children to receive focus again\n var elements = node.getElementsByTagName('*');\n // only reset elements we've changed in makeNodeUnfocusable()\n Array.prototype.filter.call(elements || [], function (element) {\n return element.hasAttribute(TABINDEX_STATE);\n }).forEach(function (element) {\n var prior = element.getAttribute(TABINDEX_STATE);\n if (prior >= 0) {\n element.setAttribute(TABINDEX, element.getAttribute(TABINDEX_STATE));\n } else if (prior === 'none') {\n element.removeAttribute(TABINDEX);\n }\n element.removeAttribute(TABINDEX_STATE);\n });\n }\n};\nexports.makeNodeFocusable = makeNodeFocusable;\nvar autoFocusingTags = /(a|area|input|select|textarea|button|iframe)$/;\nvar makeNodeUnfocusable = function makeNodeUnfocusable(node) {\n // do not touch aria live containers so that announcements work\n if (!node.hasAttribute('aria-live')) {\n node.setAttribute('aria-hidden', true);\n // prevent children to receive focus\n var elements = node.getElementsByTagName('*');\n // first, save off the tabIndex of any element with one\n Array.prototype.filter.call(elements || [], function (element) {\n return element.getAttribute(TABINDEX) !== null;\n }).forEach(function (element) {\n element.setAttribute(TABINDEX_STATE, element.getAttribute(TABINDEX));\n element.setAttribute(TABINDEX, -1);\n });\n // then, if any element is inherently focusable and not handled above,\n // give it a tabIndex of -1 so it can't receive focus\n Array.prototype.filter.call(elements || [], function (element) {\n var currentTag = element.tagName.toLowerCase();\n return currentTag.match(autoFocusingTags) && element.focus && element.getAttribute(TABINDEX_STATE) === null;\n }).forEach(function (element) {\n element.setAttribute(TABINDEX_STATE, 'none');\n element.setAttribute(TABINDEX, -1);\n });\n }\n};\nexports.makeNodeUnfocusable = makeNodeUnfocusable;\nvar findVisibleParent = function findVisibleParent(element) {\n if (element) {\n // Get the closest ancestor element that is positioned.\n return element.offsetParent ? element : findVisibleParent(element.parentElement) || element;\n }\n return undefined;\n};\nexports.findVisibleParent = findVisibleParent;\nvar isNodeAfterScroll = function isNodeAfterScroll(node, target) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n bottom = _node$getBoundingClie.bottom;\n // target will be the document from findScrollParent()\n var _ref = target.getBoundingClientRect ? target.getBoundingClientRect() : {\n height: 0,\n top: 0\n },\n height = _ref.height,\n top = _ref.top;\n return bottom >= top + height;\n};\nexports.isNodeAfterScroll = isNodeAfterScroll;\nvar isNodeBeforeScroll = function isNodeBeforeScroll(node, target) {\n var _node$getBoundingClie2 = node.getBoundingClientRect(),\n top = _node$getBoundingClie2.top;\n // target will be the document from findScrollParent()\n var _ref2 = target.getBoundingClientRect ? target.getBoundingClientRect() : {\n top: 0\n },\n targetTop = _ref2.top;\n return top <= targetTop;\n};\nexports.isNodeBeforeScroll = isNodeBeforeScroll;\nvar findButtonParent = function findButtonParent(element) {\n if (element && element.nodeName !== 'BUTTON' && element.nodeName !== 'A') return findButtonParent(element.parentElement);\n return element;\n};\nexports.findButtonParent = findButtonParent;","\"use strict\";\n\nexports.__esModule = true;\nexports.PortalContext = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar PortalContext = /*#__PURE__*/_react[\"default\"].createContext([]);\nexports.PortalContext = PortalContext;","\"use strict\";\n\nexports.__esModule = true;\nexports.normalizeTiming = exports.animationObjectStyle = exports.animationEnding = exports.animationBounds = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar PULSE_SIZES = {\n xsmall: 1.001,\n small: 1.01,\n medium: 1.1,\n large: 1.5,\n xlarge: 2\n};\nvar SLIDE_SIZES = {\n xsmall: 1,\n small: 5,\n medium: 10,\n large: 50,\n xlarge: 200\n};\nvar JIGGLE_SIZES = {\n xsmall: 0.1,\n small: 1,\n medium: 5,\n large: 400,\n xlarge: 1000\n};\nvar ZOOM_SIZES = {\n xsmall: 0.001,\n small: 0.01,\n medium: 0.05,\n large: 0.1,\n xlarge: 0.5\n};\nvar animationBounds = function animationBounds(type, size) {\n if (size === void 0) {\n size = 'medium';\n }\n if (type === 'draw') {\n return ['', \"stroke-dashoffset: 0\"];\n }\n if (type === 'fadeIn') {\n return ['opacity: 0;', 'opacity: 1;'];\n }\n if (type === 'fadeOut') {\n return ['opacity: 1;', 'opacity: 0;'];\n }\n if (type === 'jiggle') {\n var deg = JIGGLE_SIZES[size];\n return [\"transform: rotate(-\" + deg + \"deg);\", \"transform: rotate(\" + deg + \"deg);\"];\n }\n if (type === 'pulse') {\n return ['transform: scale(1);', \"transform: scale(\" + PULSE_SIZES[size] + \")\"];\n }\n if (type === 'rotateRight') {\n return [\"transform: rotate(0deg);\", \"transform: rotate(359deg);\"];\n }\n if (type === 'rotateLeft') {\n return [\"transform: rotate(0deg);\", \"transform: rotate(-359deg);\"];\n }\n if (type === 'flipIn') {\n return ['transform: rotateY(90deg);', 'transform: rotateY(0);'];\n }\n if (type === 'flipOut') {\n return ['transform: rotateY(0);', 'transform: rotateY(90deg);'];\n }\n if (type === 'slideDown') {\n return [\"transform: translateY(-\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideLeft') {\n return [\"transform: translateX(\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideRight') {\n return [\"transform: translateX(-\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideUp') {\n return [\"transform: translateY(\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'zoomIn') {\n return [\"transform: scale(\" + (1 - ZOOM_SIZES[size]) + \");\", 'transform: none;'];\n }\n if (type === 'zoomOut') {\n return [\"transform: scale(\" + (1 + ZOOM_SIZES[size]) + \");\", 'transform: none;'];\n }\n return [];\n};\nexports.animationBounds = animationBounds;\nvar normalizeTiming = function normalizeTiming(time, defaultTiming) {\n return typeof time === 'number' ? time / 1000.0 + \"s\" : time || defaultTiming;\n};\nexports.normalizeTiming = normalizeTiming;\nvar animationEnding = function animationEnding(type) {\n if (type === 'draw') {\n return 'linear forwards';\n }\n if (type === 'jiggle') {\n return 'alternate infinite';\n }\n if (type === 'pulse') {\n return 'alternate infinite';\n }\n if (type === 'rotateRight' || type === 'rotateLeft') {\n return 'infinite linear';\n }\n return 'forwards';\n};\nexports.animationEnding = animationEnding;\nvar animationObjectStyle = function animationObjectStyle(animation, theme, themeObj) {\n var bounds = animationBounds(animation.type, animation.size);\n var animationTheme = themeObj && themeObj.animation || theme.global.animation;\n if (bounds) {\n var animationTransition = (0, _styledComponents.css)([\"from{\", \";}to{\", \";}\"], bounds[0], bounds[1]);\n var defaultDuration = function defaultDuration() {\n return normalizeTiming(animationTheme[animation.type] ? animationTheme[animation.type].duration : animation.duration, animationTheme.duration);\n };\n return (0, _styledComponents.css)([\"\", \" \", \" \", \" \", \"\"], (0, _styledComponents.keyframes)([\"\", \"\"], animationTransition), normalizeTiming(animation.duration, defaultDuration()), normalizeTiming(animation.delay, '0s'), animationEnding(animation.type));\n }\n return '';\n};\nexports.animationObjectStyle = animationObjectStyle;","\"use strict\";\n\nexports.__esModule = true;\nexports.selectedStyle = exports.normalizeBackground = exports.getHoverIndicatorStyle = exports.backgroundStyle = exports.backgroundIsDark = exports.backgroundAndTextColors = exports.activeStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _colors = require(\"./colors\");\n// evalStyle() converts a styled-components item into a string\nvar evalStyle = function evalStyle(arg, theme) {\n if (arg && Array.isArray(arg) && typeof arg[0] === 'function') {\n return arg[0]({\n theme: theme\n });\n }\n return arg;\n};\nvar normalizeBackground = function normalizeBackground(backgroundArg, theme) {\n var _theme$global$backgro;\n var background = ((_theme$global$backgro = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro[backgroundArg]) || backgroundArg;\n var result = background;\n // If the background has a light or dark object, use that\n if (background) {\n if (theme.dark && background.dark && typeof background.dark !== 'boolean') {\n result = background.dark;\n } else if (!theme.dark && background.light && typeof background.light !== 'boolean') {\n result = background.light;\n }\n result = evalStyle(result, theme);\n }\n return result;\n};\nexports.normalizeBackground = normalizeBackground;\nvar normalizeBackgroundColor = function normalizeBackgroundColor(backgroundArg, theme) {\n var _theme$global$backgro2;\n var background = backgroundArg.color || backgroundArg;\n var result = (0, _colors.normalizeColor)(\n // Background color may be defined by theme.global.backgrounds or\n // theme.global.colors.\n ((_theme$global$backgro2 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro2[background]) || background, theme, backgroundArg.dark);\n return result;\n};\nvar normalizeBackgroundImage = function normalizeBackgroundImage(background, theme) {\n var result;\n if (background.image) {\n var _theme$global$backgro3, _theme$global$backgro4;\n result = normalizeBackground(background.dark ? (_theme$global$backgro3 = theme.global.backgrounds) == null || (_theme$global$backgro3 = _theme$global$backgro3[background.image]) == null ? void 0 : _theme$global$backgro3.dark : (_theme$global$backgro4 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro4[background.image], theme) || background.image;\n } else {\n var _theme$global$backgro5;\n var normalized = normalizeBackground((_theme$global$backgro5 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro5[background], theme);\n result = typeof normalized === 'object' ? normalizeBackgroundImage(normalized, theme) : normalized;\n }\n return result;\n};\nvar rotateBackground = function rotateBackground(background, theme) {\n var backgroundImage = normalizeBackgroundImage(background, theme);\n var result = backgroundImage;\n if (backgroundImage.lastIndexOf('linear-gradient', 0) === 0) {\n var regex = /\\d{1,}deg\\b,/gm; // Contains rotation specified in degrees. Only targets 'deg' string with a trailing comma. Do not match 'deg' string for hsl, etc..\n result = backgroundImage.lastIndexOf('deg,') >= 0 ? backgroundImage.replace(regex, background.rotate + \"deg,\") : backgroundImage.replace('linear-gradient(', \"linear-gradient(\" + background.rotate + \"deg, \");\n } else {\n console.warn( // eslint-disable-next-line max-len\n \"'background.rotate' property only supports 'background.image' containing a linear-gradient string.\");\n }\n return result;\n};\nvar backgroundIsDark = function backgroundIsDark(backgroundArg, theme) {\n var background = normalizeBackground(backgroundArg, theme);\n var result;\n if (background) {\n if (typeof background === 'object') {\n var color = background.color,\n dark = background.dark,\n opacity = background.opacity;\n if (typeof dark === 'boolean') {\n result = dark;\n } else if (color && (\n // weak opacity means we keep the existing darkness\n !opacity || opacity !== 'weak')) {\n var backgroundColor = (0, _colors.normalizeColor)(background.color, theme);\n if (backgroundColor) {\n result = (0, _colors.colorIsDark)(backgroundColor);\n }\n }\n } else {\n var _color = (0, _colors.normalizeColor)(background, theme);\n if (_color) {\n result = (0, _colors.colorIsDark)(_color);\n }\n }\n }\n return result;\n};\nexports.backgroundIsDark = backgroundIsDark;\nvar darkContext = function darkContext(backgroundColor) {\n var isDark = (0, _colors.colorIsDark)(backgroundColor);\n if (isDark === undefined) return undefined;\n return isDark ? 'dark' : 'light';\n};\n\n// Returns an array of two CSS colors: [background, color]\n// Either could be undefined.\n// background could be a CSS gradient, like \"linear-gradient(...)\"\nvar backgroundAndTextColors = function backgroundAndTextColors(backgroundArg, textArg, theme) {\n if (!backgroundArg) return [undefined, textArg];\n var global = theme.global;\n var background = normalizeBackground(backgroundArg, theme);\n var text = textArg || global.colors.text;\n var backgroundColor;\n var textColor;\n if (typeof background === 'object') {\n if (background.dark === false) {\n textColor = text.light || text;\n } else if (background.dark) {\n textColor = text.dark || text;\n }\n if (background.color) {\n var color = normalizeBackgroundColor(background, theme);\n var opacity = background.opacity === true ? global.opacity.medium : global.opacity[background.opacity] || background.opacity;\n backgroundColor = (0, _colors.getRGBA)(color, opacity) || color;\n\n // If we don't have a textColor already, and we aren't too translucent,\n // set the textColor to have the best contrast against the background\n // color.\n if (!textColor && (opacity === undefined || opacity > 0.3)) {\n var shade = darkContext(backgroundColor, theme);\n textColor = (0, _colors.normalizeColor)(shade && text[shade] || text, theme);\n }\n }\n } else {\n backgroundColor = normalizeBackgroundColor(background, theme);\n var _shade = darkContext(backgroundColor, theme);\n var transparent;\n if (backgroundColor && (0, _colors.canExtractRGBArray)(backgroundColor)) {\n var colorArray = (0, _colors.getRGBArray)(backgroundColor);\n // check if the alpha value is less than 0.5\n if (colorArray[3] < 0.5) transparent = true;\n }\n if (_shade) {\n textColor = (0, _colors.normalizeColor)(text[_shade] || text, theme, _shade === 'dark');\n } else if (transparent && text) {\n textColor = (0, _colors.normalizeColor)(text, theme);\n } else {\n // If we can't determine the shade, we assume this isn't a simple color.\n // It could be a gradient. backgroundStyle() will take care of that case.\n if (backgroundColor !== 'transparent') backgroundColor = undefined;\n if (text) textColor = (0, _colors.normalizeColor)(text, theme);\n }\n }\n // if textArg is false, we don't want the textColor, used for Button hover\n if (textArg === false) textColor = undefined;\n return [backgroundColor, textColor];\n};\nexports.backgroundAndTextColors = backgroundAndTextColors;\nvar backgroundStyle = function backgroundStyle(backgroundArg, theme, textColorArg) {\n // for Grommet component, if the background isn't defined, don't set it\n if (backgroundArg === undefined) return undefined;\n var background = normalizeBackground(backgroundArg, theme);\n var _backgroundAndTextCol = backgroundAndTextColors(background, textColorArg, theme),\n backgroundColor = _backgroundAndTextCol[0],\n textColor = _backgroundAndTextCol[1];\n var backgroundImage = background.rotate ? rotateBackground(background, theme) : normalizeBackgroundImage(background, theme);\n var backgroundClipStyle = '';\n if (background.clip) {\n backgroundClipStyle = background.clip === 'text' ? \"-webkit-text-fill-color: transparent; \\n -webkit-background-clip: text; \\n background-clip: text;\" : \"background-clip: \" + background.clip + \";\";\n }\n if (typeof background === 'string' && background.lastIndexOf('url', 0) === 0) {\n return (0, _styledComponents.css)([\"background:\", \" no-repeat center center;background-size:cover;\"], background);\n }\n if (backgroundImage) {\n var backgroundStyles = \"\\n \" + (backgroundColor ? \"background-color: \" + backgroundColor + \";\" : '') + \"\\n background-image: \" + backgroundImage + \";\\n background-repeat: \" + (typeof background === 'object' && background.repeat || 'no-repeat') + \";\\n background-position: \" + (background.position || 'center center') + \";\\n background-size: \" + (background.size || 'cover') + \";\\n \" + backgroundClipStyle + \"\\n \";\n\n // allow both background color and image, in case the image doesn't fill\n // when image and opacity are used together, we need to use pseudo :before\n // to ensure that only image and background color are affected by opacity\n // but not the container contents\n return (0, _styledComponents.css)([\"\", \" \", \"\"], textColor ? \"color: \" + textColor + \";\" : '', !background.opacity ? backgroundStyles : \"position: relative;\\n z-index: 0;\\n &:before {\\n content: '';\\n position: absolute;\\n top: 0;\\n right: 0;\\n left: 0;\\n bottom: 0;\\n z-index: -1;\\n border-radius: inherit;\\n \" + backgroundStyles + \"\\n opacity: \" + (background.opacity === true ? theme.global.opacity.medium : theme.global.opacity[background.opacity] || background.opacity) + \";\\n }\");\n }\n if (backgroundColor) {\n return (0, _styledComponents.css)([\"background-color:\", \";\", \"\"], backgroundColor, textColor ? \"color: \" + textColor + \";\" : '');\n }\n if (typeof background === 'string')\n // This case takes care of gradients\n // or theme colors that use CSS names like 'crimson' that we don't parse\n return (0, _styledComponents.css)([\"background:\", \";\"], (0, _colors.normalizeColor)(background, theme));\n return undefined;\n};\nexports.backgroundStyle = backgroundStyle;\nvar activeStyle = (0, _styledComponents.css)([\"\", \"\"], function (props) {\n return backgroundStyle((0, _colors.normalizeColor)(props.theme.global.active.background, props.theme), props.theme, props.theme.global.active.color);\n});\nexports.activeStyle = activeStyle;\nvar selectedStyle = (0, _styledComponents.css)([\"\", \"\"], function (props) {\n return backgroundStyle((0, _colors.normalizeColor)(props.theme.global.selected.background, props.theme), props.theme, props.theme.global.selected.color);\n});\nexports.selectedStyle = selectedStyle;\nvar getHoverIndicatorStyle = function getHoverIndicatorStyle(hoverIndicator, theme) {\n var background;\n var elevation;\n if (hoverIndicator === true || hoverIndicator === 'background') {\n background = theme.global.hover.background;\n } else if (typeof hoverIndicator === 'object') {\n if (hoverIndicator.elevation || hoverIndicator.background) {\n elevation = hoverIndicator.elevation;\n background = hoverIndicator.background;\n } else background = hoverIndicator;\n } else {\n background = hoverIndicator;\n }\n return (0, _styledComponents.css)([\"\", \" \", \"\"], backgroundStyle(background, theme, theme.global.hover.color), elevation && \"box-shadow: \" + theme.global.elevation[theme.dark ? 'dark' : 'light'][elevation] + \";\");\n};\nexports.getHoverIndicatorStyle = getHoverIndicatorStyle;","\"use strict\";\n\nexports.__esModule = true;\nexports.responsiveBorderStyle = exports.borderStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _colors = require(\"./colors\");\nvar _mixins = require(\"./mixins\");\nvar responsiveBorderStyle = function responsiveBorderStyle(data, theme) {\n var color = (0, _colors.normalizeColor)(data.color || 'border', theme);\n var borderSize = data.size || 'xsmall';\n var style = data.style || 'solid';\n var side = typeof data === 'string' ? data : data.side || 'all';\n var breakpoint = theme.box.responsiveBreakpoint && theme.global.breakpoints[theme.box.responsiveBreakpoint];\n if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;\n var value = breakpoint && (breakpoint.borderSize[borderSize] || borderSize) && style + \" \" + (breakpoint.borderSize[borderSize] || borderSize) + \" \" + color;\n if (!value) return undefined;\n if (side === 'top' || side === 'bottom' || side === 'left' || side === 'right') return \"border-\" + side + \": \" + value + \";\";\n if (side === 'end' || side === 'start') return \"border-inline-\" + side + \": \" + value + \";\";\n if (side === 'vertical') return \"\\n border-left: \" + value + \";\\n border-right: \" + value + \";\\n \";\n if (side === 'horizontal') return \"\\n border-top: \" + value + \";\\n border-bottom: \" + value + \";\\n \";\n if (side === 'between') return undefined; // no-op\n return \"border: \" + value + \";\";\n};\nexports.responsiveBorderStyle = responsiveBorderStyle;\nvar borderStyle = function borderStyle(borderData, responsive, theme) {\n var borderStyles = [];\n (Array.isArray(borderData) ? borderData : [borderData]).forEach(function (data) {\n var styles = [];\n var color = (0, _colors.normalizeColor)(data.color || 'border', theme);\n var borderSize = data.size || 'xsmall';\n var style = data.style || 'solid';\n var side = typeof data === 'string' ? data : data.side || 'all';\n var value = style + \" \" + (theme.global.borderSize[borderSize] || borderSize) + \" \" + color;\n var responsiveStyle = responsive && responsiveBorderStyle(data, theme);\n var breakpoint = responsiveStyle && theme.box.responsiveBreakpoint && theme.global.breakpoints[theme.box.responsiveBreakpoint];\n if (side === 'top' || side === 'bottom' || side === 'left' || side === 'right') {\n styles.push(\"border-\" + side + \": \" + value + \";\");\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n } else if (side === 'end' || side === 'start') {\n styles.push((0, _styledComponents.css)([\"border-inline-\", \":\", \";\"], side, value));\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n } else if (side === 'vertical') {\n styles.push((0, _styledComponents.css)([\"border-left:\", \";border-right:\", \";\"], value, value));\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n } else if (side === 'horizontal') {\n styles.push((0, _styledComponents.css)([\"border-top:\", \";border-bottom:\", \";\"], value, value));\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n } else if (side === 'between') {\n // no-op\n } else {\n styles.push((0, _styledComponents.css)([\"border:\", \";\"], value));\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n }\n borderStyles.push(styles);\n });\n return borderStyles;\n};\nexports.borderStyle = borderStyle;","\"use strict\";\n\nexports.__esModule = true;\nexports.normalizeColor = exports.getRGBArray = exports.getRGBA = exports.colorIsDark = exports.canExtractRGBArray = void 0;\n// Returns the specific color that should be used according to the theme.\n// If 'dark' is supplied, it takes precedence over 'theme.dark'.\n// Can return undefined.\nvar normalizeColor = function normalizeColor(color, theme, dark) {\n var colorSpec = theme.global && theme.global.colors[color] !== undefined ? theme.global.colors[color] : color;\n // If the color has a light or dark object, use that\n var result = colorSpec;\n if (colorSpec) {\n if ((dark === true || dark === undefined && theme.dark) && colorSpec.dark !== undefined) {\n result = colorSpec.dark;\n } else if ((dark === false || !theme.dark) && colorSpec.light !== undefined) {\n result = colorSpec.light;\n }\n }\n // allow one level of indirection in color names\n if (result && theme.global && theme.global.colors[result] !== undefined) {\n result = normalizeColor(result, theme, dark);\n }\n return result;\n};\nexports.normalizeColor = normalizeColor;\nvar parseHexToRGB = function parseHexToRGB(color) {\n return color.length < 7 // 7 is what's needed for '#RRGGBB'\n ? color.match(/[A-Za-z0-9]{1}/g).map(function (v) {\n return parseInt(\"\" + v + v, 16);\n }) :\n // https://stackoverflow.com/a/42429333\n color.match(/[A-Za-z0-9]{2}/g).map(function (v) {\n return parseInt(v, 16);\n });\n};\n\n// From: https://stackoverflow.com/a/9493060/8513067\n// Converts an HSL color value to RGB. Conversion formula\n// adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n// Assumes h, s, and l are contained in the set [0, 1] and\n// returns r, g, and b in the set [0, 255].\nvar hslToRGB = function hslToRGB(h, s, l) {\n var r;\n var g;\n var b;\n if (s === 0 || s === '0') {\n // achromatic\n r = l;\n g = l;\n b = l;\n } else {\n var hue2rgb = function hue2rgb(p, q, inT) {\n var t = inT;\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 0.16666667) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 0.66666667) return p + (q - p) * (0.66666667 - t) * 6;\n return p;\n };\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 0.33333333);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 0.33333333);\n }\n return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];\n};\n\n// allow for alpha: #RGB, #RGBA, #RRGGBB, or #RRGGBBAA\nvar hexExp = /^#[A-Za-z0-9]{3,4}$|^#[A-Za-z0-9]{6,8}$/;\nvar rgbExp = /^rgba?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?\\)/;\nvar rgbaExp = /^rgba?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([.0-9]*)\\s?\\)/;\n// e.g. hsl(240, 60%, 50%)\nvar hslExp = /^hsla?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)%?\\s?,\\s?([0-9]*)%?\\s?.*?\\)/;\nvar canExtractRGBArray = function canExtractRGBArray(color) {\n return hexExp.test(color) || rgbExp.test(color) || rgbaExp.test(color) || hslExp.test(color);\n};\nexports.canExtractRGBArray = canExtractRGBArray;\nvar getRGBArray = function getRGBArray(color) {\n if (hexExp.test(color)) {\n var _parseHexToRGB = parseHexToRGB(color),\n red = _parseHexToRGB[0],\n green = _parseHexToRGB[1],\n blue = _parseHexToRGB[2],\n alpha = _parseHexToRGB[3];\n return [red, green, blue, alpha !== undefined ? alpha / 255.0 : undefined];\n }\n var match = color.match(rgbExp);\n if (match) {\n return match.splice(1).map(function (v) {\n return parseInt(v, 10);\n });\n }\n match = color.match(rgbaExp);\n if (match) {\n return match.splice(1).map(function (v) {\n return parseFloat(v, 10);\n });\n }\n match = color.match(hslExp);\n if (match) {\n var _match$splice$map = match.splice(1).map(function (v) {\n return parseInt(v, 10);\n }),\n h = _match$splice$map[0],\n s = _match$splice$map[1],\n l = _match$splice$map[2];\n return hslToRGB(h / 360.0, s / 100.0, l / 100.0);\n }\n return color;\n};\nexports.getRGBArray = getRGBArray;\nvar colorIsDark = function colorIsDark(color) {\n if (color && canExtractRGBArray(color)) {\n var _getRGBArray = getRGBArray(color),\n red = _getRGBArray[0],\n green = _getRGBArray[1],\n blue = _getRGBArray[2],\n alpha = _getRGBArray[3];\n // if there is an alpha and it's greater than 50%, we can't really tell\n if (alpha < 0.5) return undefined;\n var brightness = (299 * red + 587 * green + 114 * blue) / 1000;\n // From: http://www.had2know.com/technology/color-contrast-calculator-web-design.html\n // Above domain is no longer registered.\n return brightness < 125;\n }\n return undefined;\n};\nexports.colorIsDark = colorIsDark;\nvar getRGBA = function getRGBA(color, opacity) {\n if (color && canExtractRGBArray(color)) {\n var _getRGBArray2 = getRGBArray(color),\n red = _getRGBArray2[0],\n green = _getRGBArray2[1],\n blue = _getRGBArray2[2],\n alpha = _getRGBArray2[3];\n var normalizedAlpha;\n if (opacity !== undefined) {\n normalizedAlpha = opacity;\n } else if (alpha !== undefined) {\n normalizedAlpha = alpha;\n } else {\n normalizedAlpha = 1;\n }\n return \"rgba(\" + red + \", \" + green + \", \" + blue + \", \" + normalizedAlpha + \")\";\n }\n return undefined;\n};\nexports.getRGBA = getRGBA;","\"use strict\";\n\nexports.__esModule = true;\nexports.setHoursWithOffset = void 0;\nvar setHoursWithOffset = function setHoursWithOffset(date) {\n var newDate = new Date(date);\n if ((date == null ? void 0 : date.indexOf('T')) === -1) {\n var offset = newDate.getTimezoneOffset();\n var hour = newDate.getHours();\n newDate.setHours(hour, offset < 0 ? -offset : offset);\n }\n return newDate;\n};\nexports.setHoursWithOffset = setHoursWithOffset;","\"use strict\";\n\nexports.__esModule = true;\nexports.translateEndAngle = exports.polarToCartesian = exports.baseUnit = exports.arcCommands = void 0;\nvar POST_DECIMAL_DIGITS = 10;\nvar baseUnit = 24;\nexports.baseUnit = baseUnit;\nvar polarToCartesian = function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians)\n };\n};\nexports.polarToCartesian = polarToCartesian;\nvar arcCommands = function arcCommands(centerX, centerY, radius, startAngle, endAngle) {\n // handle that we can't draw a complete circle\n var normalizedEndAngle = endAngle;\n /* \n added endAngle - startAngle >= 360 \n for SemiCircle the endAngle will never be greater then startAngle \n since it starts with a startAngle of 270.\n */\n if (endAngle > startAngle && endAngle - startAngle >= 360) {\n normalizedEndAngle = startAngle + 359.99;\n }\n var start = polarToCartesian(centerX, centerY, radius, normalizedEndAngle);\n var end = polarToCartesian(centerX, centerY, radius, startAngle);\n var arcSweep = normalizedEndAngle - startAngle <= 180 ? '0' : '1';\n var d = ['M', start.x.toFixed(POST_DECIMAL_DIGITS), start.y.toFixed(POST_DECIMAL_DIGITS), 'A', radius.toFixed(POST_DECIMAL_DIGITS), radius.toFixed(POST_DECIMAL_DIGITS), 0, arcSweep, 0, end.x.toFixed(POST_DECIMAL_DIGITS), end.y.toFixed(POST_DECIMAL_DIGITS)].join(' ');\n return d;\n};\n\n/* TranslatedEngAngle will now take the value of the\nstartAngle + anglePer * value and mod by 360. This was added\nto take account the startAngle not being 0. So no matter the\nvalue it will be % 360 to get the correct angle. \n*/\nexports.arcCommands = arcCommands;\nvar translateEndAngle = function translateEndAngle(startAngle, anglePer, value) {\n return Math.max(0, startAngle + anglePer * value) % 360;\n};\nexports.translateEndAngle = translateEndAngle;","\"use strict\";\n\nexports.__esModule = true;\nexports.useSizedIcon = void 0;\nvar _react = require(\"react\");\nvar useSizedIcon = function useSizedIcon(icon, size, theme) {\n var _theme$icon;\n return icon && theme != null && (_theme$icon = theme.icon) != null && _theme$icon.matchSize && !icon.props.size ? /*#__PURE__*/(0, _react.cloneElement)(icon, {\n size: size\n }) : icon;\n};\nexports.useSizedIcon = useSizedIcon;","\"use strict\";\n\nexports.__esModule = true;\nvar _animation = require(\"./animation\");\nObject.keys(_animation).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _animation[key]) return;\n exports[key] = _animation[key];\n});\nvar _mixins = require(\"./mixins\");\nObject.keys(_mixins).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _mixins[key]) return;\n exports[key] = _mixins[key];\n});\nvar _background = require(\"./background\");\nObject.keys(_background).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _background[key]) return;\n exports[key] = _background[key];\n});\nvar _border = require(\"./border\");\nObject.keys(_border).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _border[key]) return;\n exports[key] = _border[key];\n});\nvar _colors = require(\"./colors\");\nObject.keys(_colors).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _colors[key]) return;\n exports[key] = _colors[key];\n});\nvar _dates = require(\"./dates\");\nObject.keys(_dates).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _dates[key]) return;\n exports[key] = _dates[key];\n});\nvar _DOM = require(\"./DOM\");\nObject.keys(_DOM).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _DOM[key]) return;\n exports[key] = _DOM[key];\n});\nvar _graphics = require(\"./graphics\");\nObject.keys(_graphics).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _graphics[key]) return;\n exports[key] = _graphics[key];\n});\nvar _icon = require(\"./icon\");\nObject.keys(_icon).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _icon[key]) return;\n exports[key] = _icon[key];\n});\nvar _styles = require(\"./styles\");\nObject.keys(_styles).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _styles[key]) return;\n exports[key] = _styles[key];\n});\nvar _object = require(\"./object\");\nObject.keys(_object).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _object[key]) return;\n exports[key] = _object[key];\n});\nvar _pagination = require(\"./pagination\");\nObject.keys(_pagination).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _pagination[key]) return;\n exports[key] = _pagination[key];\n});\nvar _PortalContext = require(\"./PortalContext\");\nObject.keys(_PortalContext).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _PortalContext[key]) return;\n exports[key] = _PortalContext[key];\n});\nvar _refs = require(\"./refs\");\nObject.keys(_refs).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _refs[key]) return;\n exports[key] = _refs[key];\n});\nvar _responsive = require(\"./responsive\");\nObject.keys(_responsive).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _responsive[key]) return;\n exports[key] = _responsive[key];\n});\nvar _useKeyboard = require(\"./use-keyboard\");\nObject.keys(_useKeyboard).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _useKeyboard[key]) return;\n exports[key] = _useKeyboard[key];\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.parseMetricToNum = exports.getAvailableAtBadge = exports.fontSize = exports.findAllByType = exports.edgeToNum = exports.breakpointStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar parseMetricToNum = function parseMetricToNum(metric) {\n if (typeof metric === 'number') return metric;\n if (metric.match(/\\s/) && process.env.NODE_ENV !== 'production') {\n console.warn(\"Invalid single measurement value: \\\"\" + metric + \"\\\"\");\n }\n return parseFloat(metric.match(/\\d+(\\.\\d+)?/), 10);\n};\nexports.parseMetricToNum = parseMetricToNum;\nvar edgeToNum = function edgeToNum(size, theme) {\n return size ? parseMetricToNum(theme.global.edgeSize[size] || size) : 0;\n};\nexports.edgeToNum = edgeToNum;\nvar fontSize = function fontSize(size, lineHeight) {\n return (0, _styledComponents.css)([\"font-size:\", \";line-height:\", \";\"], function (props) {\n return parseMetricToNum(size) / parseMetricToNum(props.theme.global.font.size) * 1 + \"rem\";\n }, function (props) {\n return lineHeight || Math.ceil(parseMetricToNum(size) / parseMetricToNum(props.theme.global.lineHeight)) * (parseMetricToNum(props.theme.global.lineHeight) / parseMetricToNum(size)) + \"px\";\n });\n};\nexports.fontSize = fontSize;\nvar breakpointStyle = function breakpointStyle(breakpoint, content) {\n return (0, _styledComponents.css)([\"@media only screen \", \"{\", \";}\"], breakpoint.value && \"and (max-width: \" + breakpoint.value + \"px)\", content);\n};\nexports.breakpointStyle = breakpointStyle;\nvar findAllByType = function findAllByType(component, type) {\n var matches = [];\n if (component.type === type) {\n matches.push(component);\n }\n if (component.children) {\n component.children.forEach(function (child) {\n matches = matches.concat(findAllByType(child, type));\n });\n }\n return matches;\n};\nexports.findAllByType = findAllByType;\nvar getAvailableAtBadge = function getAvailableAtBadge(availableAt, componentType) {\n return [{\n url: \"https://storybook.grommet.io/?selectedKind=\" + componentType + \"-\" + availableAt + \"&full=0&stories=1&panelRight=0\",\n badge: 'https://cdn-images-1.medium.com/fit/c/120/120/1*TD1P0HtIH9zF0UEH28zYtw.png',\n label: 'Storybook'\n }, {\n url: \"https://codesandbox.io/s/github/grommet/grommet-sandbox?initialpath=/\" + availableAt.toLowerCase() + \"&module=%2Fsrc%2F\" + availableAt + \".js\",\n badge: 'https://codesandbox.io/static/img/play-codesandbox.svg',\n label: 'CodeSandbox'\n }];\n};\nexports.getAvailableAtBadge = getAvailableAtBadge;","\"use strict\";\n\nexports.__esModule = true;\nexports.removeUndefined = exports.isObject = exports.deepMerge = exports.deepFreeze = void 0;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nvar isObject = function isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n};\nexports.isObject = isObject;\nvar deepFreeze = function deepFreeze(obj) {\n Object.keys(obj).forEach(function (key) {\n return key && isObject(obj[key]) && Object.freeze(obj[key]);\n });\n return Object.freeze(obj);\n};\nexports.deepFreeze = deepFreeze;\nvar deepMerge = function deepMerge(target) {\n for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n sources[_key - 1] = arguments[_key];\n }\n if (!sources.length) {\n return target;\n }\n // making sure to not change target (immutable)\n var output = _extends({}, target);\n sources.forEach(function (source) {\n if (isObject(source)) {\n Object.keys(source).forEach(function (key) {\n if (isObject(source[key])) {\n if (!output[key]) {\n output[key] = _extends({}, source[key]);\n } else {\n output[key] = deepMerge(output[key], source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n }\n });\n return output;\n};\nexports.deepMerge = deepMerge;\nvar removeUndefined = function removeUndefined(obj) {\n var result = {};\n Object.keys(obj).forEach(function (key) {\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n });\n return result;\n};\nexports.removeUndefined = removeUndefined;","\"use strict\";\n\nexports.__esModule = true;\nexports.usePagination = exports.normalizeShow = void 0;\nvar _react = require(\"react\");\nvar _excluded = [\"data\", \"page\", \"step\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nvar normalizeShow = function normalizeShow(showProp, step) {\n var page;\n // by default, show refers to the index of an item,\n // but if using pagination, show can take the form of { page: # },\n // where page refers to the page # to show\n if (typeof showProp === 'number') page = Math.ceil((showProp + 1) / step);else if (typeof showProp === 'object' && 'page' in showProp) page = showProp.page;\n return page;\n};\nexports.normalizeShow = normalizeShow;\nvar usePagination = function usePagination(_ref) {\n var data = _ref.data,\n page = _ref.page,\n step = _ref.step,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var totalPages = data ? Math.ceil(data.length / step) : 0;\n var _useState = (0, _react.useState)(Math.min(page, totalPages) || 1),\n activePage = _useState[0],\n setActivePage = _useState[1];\n\n // ensure activePage is never lower than 1 to ensure that itemsBeginIndex\n // and itemsEndIndex aren't negative\n if (activePage > totalPages && (data == null ? void 0 : data.length) > 0) setActivePage(Math.max(totalPages, 1));\n var itemsBeginIndex = step * (activePage - 1);\n var itemsEndIndex = itemsBeginIndex + step;\n var currentItems = (0, _react.useMemo)(function () {\n if (Array.isArray(data)) return data.slice(itemsBeginIndex, itemsEndIndex);\n return [];\n }, [data, itemsBeginIndex, itemsEndIndex]);\n var paginationProps = _extends({\n numberItems: data && data.length,\n onChange: function onChange(event) {\n return setActivePage(event.page);\n },\n page: activePage,\n step: step\n }, rest);\n return [currentItems, paginationProps];\n};\nexports.usePagination = usePagination;","\"use strict\";\n\nexports.__esModule = true;\nexports.useForwardedRef = void 0;\nvar _react = require(\"react\");\nvar useForwardedRef = function useForwardedRef(ref) {\n var innerRef = (0, _react.useRef)(null);\n (0, _react.useImperativeHandle)(ref, function () {\n return innerRef.current;\n }, [innerRef]);\n return innerRef;\n};\nexports.useForwardedRef = useForwardedRef;","\"use strict\";\n\nexports.__esModule = true;\nexports.getDeviceBreakpoint = exports.getBreakpointStyle = exports.getBreakpoint = void 0;\nvar getBreakpoint = function getBreakpoint(viewportWidth, theme) {\n var sortedBreakpoints = Object.keys(theme.global.breakpoints).sort(function (a, b) {\n var first = theme.global.breakpoints[a];\n var second = theme.global.breakpoints[b];\n if (!first) return 1;\n if (!second) return -1;\n if (!first.value) return 1;\n if (!second.value) return -1;\n return first.value - second.value;\n });\n\n // the last breakpoint on the sorted array should have\n // no windowWidth boundaries\n var lastBreakpoint = sortedBreakpoints[sortedBreakpoints.length - 1];\n var result = sortedBreakpoints.find(function (name) {\n var breakpoint = theme.global.breakpoints[name];\n return !breakpoint.value || breakpoint.value >= viewportWidth ? name : false;\n });\n return result || lastBreakpoint;\n};\nexports.getBreakpoint = getBreakpoint;\nvar getDeviceBreakpoint = function getDeviceBreakpoint(type, theme) {\n return theme.global.deviceBreakpoints[type];\n};\nexports.getDeviceBreakpoint = getDeviceBreakpoint;\nvar getBreakpointStyle = function getBreakpointStyle(theme, breakpointSize) {\n var breakpoint = breakpointSize && theme.global.breakpoints[breakpointSize] || {};\n if (!breakpoint.edgeSize) breakpoint.edgeSize = theme.global.edgeSize;\n if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;\n if (!breakpoint.size) breakpoint.size = theme.global.size;\n return breakpoint;\n};\nexports.getBreakpointStyle = getBreakpointStyle;","\"use strict\";\n\nexports.__esModule = true;\nexports.widthStyle = exports.unfocusStyle = exports.textAlignStyle = exports.sizeStyle = exports.roundStyle = exports.plainInputStyle = exports.overflowStyle = exports.kindPartStyles = exports.inputStyle = exports.inputPadForIcon = exports.heightStyle = exports.getInputPadBySide = exports.genericStyles = exports.focusStyle = exports.fillStyle = exports.edgeStyle = exports.disabledStyle = exports.controlBorderStyle = exports.baseStyle = exports.alignStyle = exports.alignContentStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _background = require(\"./background\");\nvar _colors = require(\"./colors\");\nvar _responsive = require(\"./responsive\");\nvar _mixins = require(\"./mixins\");\nvar baseStyle = (0, _styledComponents.css)([\"font-family:\", \";font-size:\", \";line-height:\", \";font-weight:\", \";\", \" \", \" box-sizing:border-box;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;\"], function (props) {\n return props.theme.global.font.family;\n}, function (props) {\n return props.theme.global.font.size;\n}, function (props) {\n return props.theme.global.font.height;\n}, function (props) {\n return props.theme.global.font.weight;\n}, function (props) {\n return props.theme.global.font.variant && \"\\n font-variant:\" + props.theme.global.font.variant + \";\\n \";\n}, function (props) {\n return !props.plain && (0, _background.backgroundStyle)(props.theme.baseBackground, props.theme);\n});\nexports.baseStyle = baseStyle;\nvar controlBorderStyle = (0, _styledComponents.css)([\"border:\", \" solid \", \";border-radius:\", \";\"], function (props) {\n return props.theme.global.control.border.width;\n}, function (props) {\n return (0, _colors.normalizeColor)(props.theme.global.control.border.color || 'border', props.theme);\n}, function (props) {\n return props.theme.global.control.border.radius;\n});\nexports.controlBorderStyle = controlBorderStyle;\nvar edgeStyle = function edgeStyle(kind, data, responsive, responsiveBreakpoint, theme) {\n var breakpoint = responsiveBreakpoint && theme.global.breakpoints[responsiveBreakpoint];\n if (typeof data === 'string') {\n return (0, _styledComponents.css)([\"\", \":\", \";\", \";\"], kind, theme.global.edgeSize[data] || data, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \": \" + (breakpoint.edgeSize[data] || data) + \";\\n \") : '');\n }\n var result = [];\n var horizontal = data.horizontal,\n vertical = data.vertical,\n top = data.top,\n bottom = data.bottom,\n left = data.left,\n right = data.right;\n\n // if horizontal and vertical are equal OR all sides are equal,\n // we can just return a single css value such as padding: 12px\n // instead of breaking out by sides.\n var horizontalVerticalEqual = horizontal && vertical && horizontal === vertical;\n var allSidesEqual = top && bottom && left && right && top === bottom === left === right;\n if (horizontalVerticalEqual || allSidesEqual) {\n // since the values will be the same between vertical & horizontal OR\n // left, right, top, & bottom, we can just choose one\n var value = horizontalVerticalEqual ? horizontal : top;\n return (0, _styledComponents.css)([\"\", \":\", \";\", \";\"], kind, theme.global.edgeSize[value] || value, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \": \" + (breakpoint.edgeSize[value] || value) + \";\\n \") : '');\n }\n if (horizontal) {\n result.push((0, _styledComponents.css)([\"\", \"-left:\", \";\", \"-right:\", \";\", \";\"], kind, theme.global.edgeSize[horizontal] || horizontal, kind, theme.global.edgeSize[horizontal] || horizontal, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-left: \" + (breakpoint.edgeSize[horizontal] || horizontal) + \";\\n \" + kind + \"-right: \" + (breakpoint.edgeSize[horizontal] || horizontal) + \";\\n \") : ''));\n }\n if (vertical) {\n result.push((0, _styledComponents.css)([\"\", \"-top:\", \";\", \"-bottom:\", \";\", \";\"], kind, theme.global.edgeSize[vertical] || vertical, kind, theme.global.edgeSize[vertical] || vertical, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-top: \" + (breakpoint.edgeSize[vertical] || vertical) + \";\\n \" + kind + \"-bottom: \" + (breakpoint.edgeSize[vertical] || vertical) + \";\\n \") : ''));\n }\n if (top) {\n result.push((0, _styledComponents.css)([\"\", \"-top:\", \";\", \";\"], kind, theme.global.edgeSize[top] || top, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-top: \" + (breakpoint.edgeSize[top] || top) + \";\\n \") : ''));\n }\n if (bottom) {\n result.push((0, _styledComponents.css)([\"\", \"-bottom:\", \";\", \";\"], kind, theme.global.edgeSize[bottom] || bottom, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-bottom: \" + (breakpoint.edgeSize[bottom] || bottom) + \";\\n \") : ''));\n }\n if (left) {\n result.push((0, _styledComponents.css)([\"\", \"-left:\", \";\", \";\"], kind, theme.global.edgeSize[left] || left, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-left: \" + (breakpoint.edgeSize[left] || left) + \";\\n \") : ''));\n }\n if (right) {\n result.push((0, _styledComponents.css)([\"\", \"-right:\", \";\", \";\"], kind, theme.global.edgeSize[right] || right, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-right: \" + (breakpoint.edgeSize[right] || right) + \";\\n \") : ''));\n }\n if (data.start) {\n result.push((0, _styledComponents.css)([\"\", \"-inline-start:\", \";\", \";\"], kind, theme.global.edgeSize[data.start] || data.start, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-inline-start: \" + (breakpoint.edgeSize[data.start] || data.start) + \";\\n \") : ''));\n }\n if (data.end) {\n result.push((0, _styledComponents.css)([\"\", \"-inline-end:\", \";\", \";\"], kind, theme.global.edgeSize[data.end] || data.end, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-inline-end: \" + (breakpoint.edgeSize[data.end] || data.end) + \";\\n \") : ''));\n }\n return result;\n};\nexports.edgeStyle = edgeStyle;\nvar fillStyle = function fillStyle(fillProp) {\n if (fillProp === 'horizontal') {\n return 'width: 100%;';\n }\n if (fillProp === 'vertical') {\n return 'height: 100%;';\n }\n if (fillProp) {\n return \"\\n width: 100%;\\n height: 100%;\\n \";\n }\n return undefined;\n};\nexports.fillStyle = fillStyle;\nvar focusStyles = function focusStyles(props, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n forceOutline = _ref.forceOutline,\n justBorder = _ref.justBorder;\n var focus = props.theme.global.focus;\n if (!focus || forceOutline && !focus.outline) {\n var color = (0, _colors.normalizeColor)('focus', props.theme);\n if (color) return \"outline: 2px solid \" + color + \";\";\n return ''; // native\n }\n\n if (focus.outline && (!focus.border || !justBorder)) {\n if (typeof focus.outline === 'object') {\n var _color = (0, _colors.normalizeColor)(focus.outline.color || 'focus', props.theme);\n var size = focus.outline.size || '2px';\n return \"\\n outline-offset: 0px;\\n outline: \" + size + \" solid \" + _color + \";\\n \";\n }\n return \"outline: \" + focus.outline + \";\";\n }\n if (focus.shadow && (!focus.border || !justBorder)) {\n if (typeof focus.shadow === 'object') {\n var _color2 = (0, _colors.normalizeColor)(\n // If there is a focus.border.color, use that for shadow too.\n // This is for backwards compatibility in v2.\n focus.border && focus.border.color || focus.shadow.color || 'focus', props.theme);\n var _size = focus.shadow.size || '2px'; // backwards compatible default\n return \"\\n outline: none;\\n box-shadow: 0 0 \" + _size + \" \" + _size + \" \" + _color2 + \";\\n \";\n }\n return \"\\n outline: none;\\n box-shadow: \" + focus.shadow + \";\\n \";\n }\n if (focus.border) {\n var _color3 = (0, _colors.normalizeColor)(focus.border.color || 'focus', props.theme);\n return \"\\n outline: none;\\n border-color: \" + _color3 + \";\\n \";\n }\n return ''; // defensive\n};\n\nvar unfocusStyles = function unfocusStyles(props, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n forceOutline = _ref2.forceOutline,\n justBorder = _ref2.justBorder;\n var focus = props.theme.global.focus;\n if (!focus || forceOutline && !focus.outline) {\n var color = (0, _colors.normalizeColor)('focus', props.theme);\n if (color) return \"outline: none;\";\n return ''; // native\n }\n\n if (focus.outline && (!focus.border || !justBorder)) {\n if (typeof focus.outline === 'object') {\n return \"\\n outline-offset: 0px;\\n outline: none;\\n \";\n }\n return \"outline: none;\";\n }\n if (focus.shadow && (!focus.border || !justBorder)) {\n if (typeof focus.shadow === 'object') {\n return \"\\n outline: none;\\n box-shadow: none;\\n \";\n }\n return \"\\n outline: none;\\n box-shadow: none;\\n \";\n }\n if (focus.border) {\n return \"\\n outline: none;\\n border-color: none;\\n \";\n }\n return ''; // defensive\n};\n\n// focus also supports clickable elements inside svg\nvar focusStyle = function focusStyle(_temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n forceOutline = _ref3.forceOutline,\n justBorder = _ref3.justBorder,\n skipSvgChildren = _ref3.skipSvgChildren;\n return (0, _styledComponents.css)([\"\", \" \", \" \", \"\"], function (props) {\n return !skipSvgChildren && \"\\n > circle,\\n > ellipse,\\n > line,\\n > path,\\n > polygon,\\n > polyline,\\n > rect {\\n \" + focusStyles(props) + \"\\n }\";\n }, function (props) {\n return focusStyles(props, {\n forceOutline: forceOutline,\n justBorder: justBorder\n });\n }, !forceOutline && \"\\n ::-moz-focus-inner {\\n border: 0;\\n }\\n \");\n};\n\n// This is placed next to focusStyle for easy maintainability\n// of code since changes to focusStyle should be reflected in\n// unfocusStyle as well.\n// this function can be used to reset focus styles which is\n// applicable when turning the focus ring off when using the mouse\n// see https://nelo.is/writing/styling-better-focus-states/\nexports.focusStyle = focusStyle;\nvar unfocusStyle = function unfocusStyle(_temp4) {\n var _ref4 = _temp4 === void 0 ? {} : _temp4,\n forceOutline = _ref4.forceOutline,\n justBorder = _ref4.justBorder,\n skipSvgChildren = _ref4.skipSvgChildren;\n return (0, _styledComponents.css)([\"\", \" \", \" \", \"\"], function (props) {\n return !skipSvgChildren && \"\\n > circle,\\n > ellipse,\\n > line,\\n > path,\\n > polygon,\\n > polyline,\\n > rect {\\n \" + unfocusStyles(props) + \"\\n }\";\n }, function (props) {\n return unfocusStyles(props, {\n forceOutline: forceOutline,\n justBorder: justBorder\n });\n }, !forceOutline && \"\\n ::-moz-focus-inner {\\n border: 0;\\n }\\n \");\n};\n\n// For backwards compatibility we need to add back the control border width.\n// Based on how grommet was functioning prior to https://github.com/grommet/grommet/pull/3939,\n// the padding was subtracting the border width from the theme value, but the\n// placeholder was not. Because we're now placing the subtraction into the\n// theme itself, we have to add back in the border width here.\n// This is used for placeholder/icon in TextInput and MaskedInput.\nexports.unfocusStyle = unfocusStyle;\nvar adjustPad = function adjustPad(props, value) {\n return (0, _mixins.parseMetricToNum)((props.theme.global.edgeSize[value] || value) + \"px\") + (0, _mixins.parseMetricToNum)(props.theme.global.control.border.width + \"px\") + \"px\";\n};\nvar getInputPadBySide = function getInputPadBySide(props, side) {\n if (typeof props.theme.global.input.padding !== 'object') {\n var _adjustedPad = adjustPad(props, props.theme.global.input.padding);\n return _adjustedPad;\n }\n var orientation;\n if (side === 'left' || side === 'right') orientation = 'horizontal';else if (side === 'top' || side === 'bottom') orientation = 'vertical';else orientation = undefined;\n\n // if individual side isn't available, fallback to the\n // orientation if possible\n var pad = props.theme.global.input.padding[side] || props.theme.global.input.padding[orientation];\n var adjustedPad = adjustPad(props, pad);\n return adjustedPad;\n};\nexports.getInputPadBySide = getInputPadBySide;\nvar placeholderColor = (0, _styledComponents.css)([\"color:\", \";\"], function (props) {\n return (0, _colors.normalizeColor)(props.theme.global.colors.placeholder, props.theme);\n});\nvar placeholderStyle = (0, _styledComponents.css)([\"&::-webkit-input-placeholder{\", \";}&::-moz-placeholder{\", \";}&:-ms-input-placeholder{\", \";}\"], placeholderColor, placeholderColor, placeholderColor);\nvar inputSizeStyle = function inputSizeStyle(props) {\n var data = props.theme.text[props.size];\n if (!data) {\n return (0, _styledComponents.css)([\"font-size:\", \";\"], props.size);\n }\n return (0, _styledComponents.css)([\"font-size:\", \";line-height:\", \";\"], data.size, data.height);\n};\nvar inputStyle = (0, _styledComponents.css)([\"box-sizing:border-box;\", \" font-family:inherit;border:none;-webkit-appearance:none;background:transparent;color:inherit;width:100%;\", \" \", \" \", \" margin:0;\", \" &:focus{\", \";}\", \" \", \"::-webkit-search-decoration{-webkit-appearance:none;}&::-moz-focus-inner{border:none;outline:none;}&:-moz-placeholder,&::-moz-placeholder{opacity:1;}\", \"\"], function (props) {\n var _props$theme$text$pro;\n return \"font-size: \" + (props.theme.global.input.font.size ? ((_props$theme$text$pro = props.theme.text[props.theme.global.input.font.size]) == null ? void 0 : _props$theme$text$pro.size) || props.theme.global.input.font.size : 'inherit') + \";\";\n}, function (props) {\n return props.theme.global.input.font.height && \"line-height: \" + props.theme.global.input.font.height + \";\";\n}, function (props) {\n return props.theme.global.input.padding && typeof props.theme.global.input.padding !== 'object' ? // On a breaking change release, this condition could be removed and\n // just the edgeStyle could remain. Currently, this is needed for\n // backwards compatibility since we are placing the calculation in\n // base.js\n \"padding: \" + ((0, _mixins.parseMetricToNum)(props.theme.global.edgeSize[props.theme.global.input.padding] || props.theme.global.input.padding) - (0, _mixins.parseMetricToNum)(props.theme.global.control.border.width)) + \"px;\" : edgeStyle('padding', props.theme.global.input.padding, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return (\n // for backwards compatibility, check if props.theme.global.input.weight\n (props.theme.global.input.weight || props.theme.global.input.font.weight) && (0, _styledComponents.css)([\"font-weight:\", \";\"], props.theme.global.input.weight || props.theme.global.input.font.weight)\n );\n}, function (props) {\n return props.size && inputSizeStyle(props);\n}, function (props) {\n return (!props.plain || props.focusIndicator) && focusStyle();\n}, controlBorderStyle, placeholderStyle, function (props) {\n return props.theme.global.input.extend;\n});\n\n// Apply padding on input to create space for icon.\n// When theme.icon.matchSize is true, the space for the\n// icon should equal the icon dimension + 12px (edgeSize.medium)\n// to ensure there is reasonable space between the icon and value or placeholder\nexports.inputStyle = inputStyle;\nvar inputPadForIcon = (0, _styledComponents.css)([\"\", \"\"], function (props) {\n var _props$theme, _props$theme$icon;\n var pad = (_props$theme = props.theme) != null && (_props$theme = _props$theme.icon) != null && _props$theme.matchSize ? (0, _mixins.parseMetricToNum)((_props$theme$icon = props.theme.icon) == null || (_props$theme$icon = _props$theme$icon.size) == null ? void 0 : _props$theme$icon[(props == null ? void 0 : props.size) || 'medium']) + (0, _mixins.parseMetricToNum)(props.theme.global.edgeSize.medium) + \"px\" : props.theme.global.edgeSize.large;\n return props.reverse ? \"padding-right: \" + pad + \";\" : \"padding-left: \" + pad + \";\";\n});\nexports.inputPadForIcon = inputPadForIcon;\nvar overflowStyle = function overflowStyle(overflowProp) {\n if (typeof overflowProp === 'string') {\n return (0, _styledComponents.css)([\"overflow:\", \";\"], overflowProp);\n }\n return (0, _styledComponents.css)([\"\", \" \", \";\"], overflowProp.horizontal && \"overflow-x: \" + overflowProp.horizontal + \";\", overflowProp.vertical && \"overflow-y: \" + overflowProp.vertical + \";\");\n};\nexports.overflowStyle = overflowStyle;\nvar ALIGN_SELF_MAP = {\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n baseline: 'baseline'\n};\nvar genericStyles = (0, _styledComponents.css)([\"\", \" \", \" \", \"\"], function (props) {\n return props.alignSelf && \"align-self: \" + ALIGN_SELF_MAP[props.alignSelf] + \";\";\n}, function (props) {\n return props.gridArea && \"grid-area: \" + props.gridArea + \";\";\n}, function (props) {\n return props.margin && props.theme.global && edgeStyle('margin', props.margin, props.responsive, props.theme.global.edgeSize.responsiveBreakpoint, props.theme);\n});\nexports.genericStyles = genericStyles;\nvar disabledStyle = function disabledStyle(componentStyle) {\n return (0, _styledComponents.css)([\"opacity:\", \";cursor:default;\"], function (props) {\n return componentStyle || props.theme.global.control.disabled.opacity;\n });\n};\nexports.disabledStyle = disabledStyle;\nvar sizeStyle = function sizeStyle(name, value, theme) {\n return (0, _styledComponents.css)([\"\", \":\", \";\"], name, theme.global.size[value] || value);\n};\nexports.sizeStyle = sizeStyle;\nvar plainInputStyle = (0, _styledComponents.css)([\"outline:none;border:none;\"]);\n\n// CSS for this sub-object in the theme\nexports.plainInputStyle = plainInputStyle;\nvar kindPartStyles = function kindPartStyles(obj, theme, colorValue) {\n var styles = [];\n if (obj.padding || obj.pad) {\n // button uses `padding` but other components use Grommet `pad`\n var pad = obj.padding || obj.pad;\n if (pad.vertical || pad.horizontal) styles.push(\"padding: \" + (theme.global.edgeSize[pad.vertical] || pad.vertical || 0) + \" \" + (theme.global.edgeSize[pad.horizontal] || pad.horizontal || 0) + \";\");else styles.push(\"padding: \" + (theme.global.edgeSize[pad] || pad || 0) + \";\");\n }\n if (obj.background) styles.push((0, _background.backgroundStyle)(colorValue || obj.background, theme, obj.color || (Object.prototype.hasOwnProperty.call(obj, 'color') && obj.color === undefined ? false : undefined)));else if (obj.color) styles.push(\"color: \" + (0, _colors.normalizeColor)(obj.color, theme) + \";\");\n if (obj.border) {\n if (obj.border.width) styles.push((0, _styledComponents.css)([\"border-style:solid;border-width:\", \";\"], obj.border.width));\n if (obj.border.color) styles.push((0, _styledComponents.css)([\"border-color:\", \";\"], (0, _colors.normalizeColor)(!obj.background && colorValue || obj.border.color || 'border', theme)));\n if (obj.border.radius) styles.push((0, _styledComponents.css)([\"border-radius:\", \";\"], obj.border.radius));\n } else if (obj.border === false) styles.push('border: none;');\n if (colorValue && !obj.border && !obj.background) styles.push(\"color: \" + (0, _colors.normalizeColor)(colorValue, theme) + \";\");\n if (obj.font) {\n if (obj.font.size) {\n styles.push(\"font-size: \" + (theme.text[obj.font.size].size || obj.font.size) + \";\");\n }\n if (obj.font.height) {\n styles.push(\"line-height: \" + obj.font.height + \";\");\n }\n if (obj.font.weight) {\n styles.push(\"font-weight: \" + obj.font.weight + \";\");\n }\n }\n if (obj.opacity) {\n var opacity = obj.opacity === true ? theme.global.opacity.medium : theme.global.opacity[obj.opacity] || obj.opacity;\n styles.push(\"opacity: \" + opacity + \";\");\n }\n if (obj.extend) styles.push(obj.extend);\n return styles;\n};\nexports.kindPartStyles = kindPartStyles;\nvar ROUND_MAP = {\n full: '100%'\n};\nvar roundStyle = function roundStyle(data, responsive, theme) {\n var breakpoint = (0, _responsive.getBreakpointStyle)(theme, theme.box.responsiveBreakpoint);\n var styles = [];\n if (typeof data === 'object') {\n var size = ROUND_MAP[data.size] || theme.global.edgeSize[data.size || 'medium'] || data.size;\n var responsiveSize = responsive && breakpoint && breakpoint.edgeSize[data.size] && (breakpoint.edgeSize[data.size] || data.size);\n if (data.corner === 'top') {\n styles.push((0, _styledComponents.css)([\"border-top-left-radius:\", \";border-top-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-top-left-radius: \" + responsiveSize + \";\\n border-top-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'bottom') {\n styles.push((0, _styledComponents.css)([\"border-bottom-left-radius:\", \";border-bottom-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-bottom-left-radius: \" + responsiveSize + \";\\n border-bottom-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'left') {\n styles.push((0, _styledComponents.css)([\"border-top-left-radius:\", \";border-bottom-left-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-top-left-radius: \" + responsiveSize + \";\\n border-bottom-left-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'right') {\n styles.push((0, _styledComponents.css)([\"border-top-right-radius:\", \";border-bottom-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-top-right-radius: \" + responsiveSize + \";\\n border-bottom-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner) {\n styles.push((0, _styledComponents.css)([\"border-\", \"-radius:\", \";\"], data.corner, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-\" + data.corner + \"-radius: \" + responsiveSize + \";\\n \"));\n }\n } else {\n styles.push((0, _styledComponents.css)([\"border-radius:\", \";\"], size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-radius: \" + responsiveSize + \";\\n \"));\n }\n }\n } else {\n var _size2 = data === true ? 'medium' : data;\n styles.push((0, _styledComponents.css)([\"border-radius:\", \";\"], ROUND_MAP[_size2] || theme.global.edgeSize[_size2] || _size2));\n var _responsiveSize = breakpoint && breakpoint.edgeSize[_size2];\n if (_responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-radius: \" + _responsiveSize + \";\\n \"));\n }\n }\n return styles;\n};\nexports.roundStyle = roundStyle;\nvar TEXT_ALIGN_MAP = {\n center: 'center',\n end: 'right',\n justify: 'justify',\n start: 'left'\n};\nvar textAlignStyle = (0, _styledComponents.css)([\"text-align:\", \";\"], function (props) {\n return TEXT_ALIGN_MAP[props.textAlign];\n});\nexports.textAlignStyle = textAlignStyle;\nvar ALIGN_ITEMS_MAP = {\n baseline: 'baseline',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nvar alignStyle = (0, _styledComponents.css)([\"align-items:\", \";\"], function (props) {\n var _ALIGN_ITEMS_MAP$prop;\n return (_ALIGN_ITEMS_MAP$prop = ALIGN_ITEMS_MAP[props.align]) != null ? _ALIGN_ITEMS_MAP$prop : props.align;\n});\nexports.alignStyle = alignStyle;\nvar ALIGN_CONTENT_MAP = {\n around: 'space-around',\n baseline: 'baseline',\n between: 'space-between',\n center: 'center',\n evenly: 'space-evenly',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nvar alignContentStyle = (0, _styledComponents.css)([\"align-content:\", \";\"], function (props) {\n var _ALIGN_CONTENT_MAP$pr;\n return (_ALIGN_CONTENT_MAP$pr = ALIGN_CONTENT_MAP[props.alignContent]) != null ? _ALIGN_CONTENT_MAP$pr : props.alignContent;\n});\nexports.alignContentStyle = alignContentStyle;\nvar getSize = function getSize(theme, size) {\n return theme.global.size[size] || size;\n};\nvar widthObjectStyle = function widthObjectStyle(width, theme) {\n var result = [];\n if (width.max) result.push((0, _styledComponents.css)([\"max-width:\", \";\"], getSize(theme, width.max)));\n if (width.min) result.push((0, _styledComponents.css)([\"min-width:\", \";\"], getSize(theme, width.min)));\n if (width.width) result.push((0, _styledComponents.css)([\"width:\", \";\"], getSize(theme, width.width)));\n return result;\n};\nvar widthStringStyle = function widthStringStyle(width, theme) {\n return (0, _styledComponents.css)([\"width:\", \";\"], getSize(theme, width));\n};\nvar widthStyle = function widthStyle(width, theme) {\n return typeof width === 'object' ? widthObjectStyle(width, theme) : widthStringStyle(width, theme);\n};\nexports.widthStyle = widthStyle;\nvar heightObjectStyle = function heightObjectStyle(height, theme) {\n var result = [];\n if (height.max) result.push((0, _styledComponents.css)([\"max-height:\", \";\"], getSize(theme, height.max)));\n if (height.min) result.push((0, _styledComponents.css)([\"min-height:\", \";\"], getSize(theme, height.min)));\n // backwards compatibile\n if (height.width) result.push((0, _styledComponents.css)([\"height:\", \";\"], getSize(theme, height.height)));\n if (height.height) result.push((0, _styledComponents.css)([\"height:\", \";\"], getSize(theme, height.height)));\n return result;\n};\nvar heightStringStyle = function heightStringStyle(height, theme) {\n return (0, _styledComponents.css)([\"height:\", \";\"], getSize(theme, height));\n};\nvar heightStyle = function heightStyle(height, theme) {\n return typeof height === 'object' ? heightObjectStyle(height, theme) : heightStringStyle(height, theme);\n};\nexports.heightStyle = heightStyle;","\"use strict\";\n\nexports.__esModule = true;\nexports.useKeyboard = exports[\"default\"] = void 0;\nvar _react = require(\"react\");\nvar useKeyboard = function useKeyboard() {\n var _useState = (0, _react.useState)(),\n usingKeyboard = _useState[0],\n setUsingKeyboard = _useState[1];\n (0, _react.useEffect)(function () {\n var onMouseDown = function onMouseDown() {\n return setUsingKeyboard(false);\n };\n var onKeyDown = function onKeyDown() {\n return setUsingKeyboard(true);\n };\n document.addEventListener('mousedown', onMouseDown);\n document.addEventListener('keydown', onKeyDown);\n return function () {\n document.removeEventListener('mousedown', onMouseDown);\n document.removeEventListener('keydown', onKeyDown);\n };\n }, []);\n return usingKeyboard;\n};\nexports.useKeyboard = useKeyboard;\nvar _default = useKeyboard;\nexports[\"default\"] = _default;"],"sourceRoot":""}