@4alldigital/foundation-ui--gamma 1.41.2 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/foundation-ui.css +1 -1
- package/dist/index.esm.js +1 -1994
- package/dist/index.js +1 -2056
- package/dist/types/{fui → lib}/components/Card/constants/index.d.ts +1 -1
- package/dist/types/lib/components/Form/Form.types.d.ts +21 -0
- package/dist/types/{fui → lib}/components/FormSelect/FormSelect.types.d.ts +0 -14
- package/dist/types/{fui → lib}/components/Icon/Icon.d.ts +0 -4
- package/dist/types/{fui → lib}/components/Image/Image.d.ts +0 -1
- package/dist/types/{fui → lib}/components/Image/Image.types.d.ts +0 -4
- package/dist/types/{fui → lib}/components/TextInput/TextInput.types.d.ts +0 -8
- package/dist/types/{fui/context/AppContext.d.ts → lib/context/App/index.d.ts} +1 -1
- package/dist/types/lib/context/index.d.ts +4 -0
- package/dist/types/lib/features/Search/view-helpers/getUrlSanitizer.d.ts +1 -0
- package/dist/types/{fui → lib}/index.d.ts +1 -2
- package/dist/types/lib/translations/index.d.ts +1 -0
- package/dist/types/packages/default/theme/styles/settings/settings.themes.d.ts +5 -5
- package/dist/types/packages/gamma/src/index.d.ts +2 -1
- package/dist/types/packages/gamma/theme/index.d.ts +57 -5
- package/dist/types/packages/gamma/theme/styles/settings/settings.themes.d.ts +5 -5
- package/package.json +4 -4
- package/dist/types/fui/components/Form/Form.types.d.ts +0 -36
- package/dist/types/fui/components/ListItem/ListItem.d.ts +0 -7
- package/dist/types/fui/components/ListItem/index.d.ts +0 -1
- package/dist/types/fui/features/Search/view-helpers/getUrlSanitizer.d.ts +0 -6
- package/dist/types/fui/features/Search/views/Sidebar/Sidebar.d.ts +0 -8
- package/dist/types/fui/features/Search/views/Sidebar/Sidebar.types.d.ts +0 -3
- package/dist/types/fui/features/Search/views/Sidebar/index.d.ts +0 -1
- package/dist/types/fui/hooks/useTheme.d.ts +0 -1
- package/dist/types/fui/setupTests.d.ts +0 -1
- package/dist/types/fui/stories/Page.d.ts +0 -6
- package/dist/types/fui/translations/index.d.ts +0 -2
- package/dist/types/fui/utils/parseDuration/index.d.ts +0 -19
- package/dist/types/packages/alpha/src/index.d.ts +0 -3
- package/dist/types/packages/alpha/theme/index.d.ts +0 -64
- package/dist/types/packages/alpha/theme/styles/buttons/buttons.themes.d.ts +0 -4
- package/dist/types/packages/alpha/theme/styles/colors/colors.themes.d.ts +0 -2
- package/dist/types/packages/alpha/theme/styles/fonts/fonts.themes.d.ts +0 -9
- package/dist/types/packages/alpha/theme/styles/settings/settings.themes.d.ts +0 -245
- package/dist/types/packages/beta/src/index.d.ts +0 -3
- package/dist/types/packages/beta/theme/index.d.ts +0 -64
- package/dist/types/packages/beta/theme/styles/buttons/buttons.themes.d.ts +0 -4
- package/dist/types/packages/beta/theme/styles/colors/colors.themes.d.ts +0 -2
- package/dist/types/packages/beta/theme/styles/fonts/fonts.themes.d.ts +0 -9
- package/dist/types/packages/beta/theme/styles/settings/settings.themes.d.ts +0 -246
- package/dist/types/packages/default/src/index.d.ts +0 -3
- package/dist/types/packages/default/theme/index.d.ts +0 -64
- package/dist/types/packages/default/theme/styles/cards/cards.themes.d.ts +0 -7
- /package/dist/types/{fui → lib}/components/AnimationCounter/AnimationCounter.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationCounter/AnimationCounter.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationCounter/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationSet1/AnimationSet1.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationSet1/AnimationSet1.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationSet1/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Authenticator/Authenticator.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Authenticator/Authenticator.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Authenticator/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Avatar/Avatar.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Avatar/Avatar.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Avatar/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Blockquote/Blockquote.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Blockquote/Blockquote.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Blockquote/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Button/Button.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Button/Button.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Button/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ButtonGroup/ButtonGroup.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ButtonGroup/ButtonGroup.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ButtonGroup/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/Card.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/Card.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardBasic/CardBasic.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardBasic/CardBasic.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardBasic/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardData/CardData.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardData/CardData.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardData/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardHorz/CardHorz.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardHorz/CardHorz.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardHorz/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardIcon/CardIcon.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardIcon/CardIcon.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardIcon/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardMedia/CardMedia.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardMedia/CardMedia.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardMedia/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardVideo/CardVideo.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardVideo/CardVideo.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardVideo/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Checkbox/Checkbox.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Checkbox/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Chip/Chip.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Chip/Chip.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Chip/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Container/Container.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Container/Container.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Container/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentPageLayout/ContentPageLayout.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentPageLayout/ContentPageLayout.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentPageLayout/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentRowsLayout/ContentRowsLayout.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentRowsLayout/ContentRowsLayout.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentRowsLayout/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Copy/Copy.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Copy/Copy.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Copy/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/DisplayHeading/DisplayHeading.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/DisplayHeading/DisplayHeading.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/DisplayHeading/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FileUpload/FileUpload.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FileUpload/FileUpload.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FileUpload/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Footer/Footer.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Footer/Footer.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Footer/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Form/Form.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Form/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormField/FormField.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormField/FormField.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormField/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormSelect/FormSelect.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormSelect/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Header/Header.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Header/Header.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Header/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Heading/Heading.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Heading/Heading.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Heading/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hero/Hero.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hero/Hero.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hero/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hr/Hr.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hr/Hr.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hr/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/HtmlContent/HtmlContent.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/HtmlContent/HtmlContent.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/HtmlContent/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Icon/Icon.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Icon/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Image/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Label/Label.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Label/Label.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Label/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Link/Link.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Link/Link.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Link/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/List/List.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/List/List.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/List/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ListItem/ListItem.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Loader/Loader.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Loader/Loader.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Loader/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Logo/Logo.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Logo/Logo.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Logo/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Menu/Menu.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Menu/Menu.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Menu/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Notice/Notice.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Notice/Notice.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Notice/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/OTPInput/OTPInput.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/OTPInput/OTPInput.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/OTPInput/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelCards/PanelCards.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelCards/PanelCards.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelCards/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelFeature/PanelFeature.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelFeature/PanelFeature.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelFeature/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelHero/PanelHero.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelHero/PanelHero.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelHero/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelProduct/PanelProduct.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelProduct/PanelProduct.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelProduct/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelVideo/PanelVideo.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelVideo/PanelVideo.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelVideo/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Radio/Radio.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Radio/Radio.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Radio/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Share/Share.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Share/Share.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Share/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Switch/Switch.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Switch/Switch.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Switch/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Tabs/Tabs.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Tabs/Tabs.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Tabs/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/TextInput/TextInput.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/TextInput/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Video/Video.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Video/Video.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Video/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/VisitUs/VisitUs.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/VisitUs/VisitUs.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/VisitUs/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/index.d.ts +0 -0
- /package/dist/types/{fui/context/ThemeContext.d.ts → lib/context/Theme/index.d.ts} +0 -0
- /package/dist/types/{fui → lib}/features/Search/Search.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/Search.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/view-helpers/appendClassName.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/view-helpers/formatResult.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/view-helpers/getFilterValueDisplay.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/view-helpers/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Layout/Layout.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Layout/Layout.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Layout/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/MultiCheckboxFacet/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Paging/Paging.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Paging/Paging.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Paging/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/PagingInfo/PagingInfo.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/PagingInfo/PagingInfo.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/PagingInfo/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Result/Result.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Result/Result.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Result/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Results/Results.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Results/Results.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Results/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/ResultsPerPage/ResultsPerPage.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/ResultsPerPage/ResultsPerPage.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/ResultsPerPage/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SearchBox/SearchBox.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SearchBox/SearchBox.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SearchBox/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleLinksFacet/SingleLinksFacet.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleLinksFacet/SingleLinksFacet.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleLinksFacet/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleSelectFacet/SingleSelectFacet.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleSelectFacet/SingleSelectFacet.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleSelectFacet/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Sorting/Sorting.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Sorting/Sorting.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Sorting/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ForgotPasswordForm/ForgotPasswordForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ForgotPasswordForm/ForgotPasswordForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ForgotPasswordForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/LoginForm/LoginForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/LoginForm/LoginForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/LoginForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ProfileForm/ProfileForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ProfileForm/ProfileForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ProfileForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/RegisterForm/RegisterForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/RegisterForm/RegisterForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/RegisterForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ResetPasswordForm/ResetPasswordForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ResetPasswordForm/ResetPasswordForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ResetPasswordForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/constants/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/validations/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/translations/en.d.ts +0 -0
- /package/dist/types/{fui → lib}/utils/htmlParser/index.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,2056 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var cx = require('classnames');
|
|
6
|
-
var framerMotion = require('framer-motion');
|
|
7
|
-
var tailwindMerge = require('tailwind-merge');
|
|
8
|
-
var react = require('@iconify/react');
|
|
9
|
-
var reactTabs = require('react-tabs');
|
|
10
|
-
var reactHookForm = require('react-hook-form');
|
|
11
|
-
var HoverVideoPlayer = require('react-hover-video-player');
|
|
12
|
-
var ReactPlayer = require('react-player/youtube');
|
|
13
|
-
var videojs = require('video.js');
|
|
14
|
-
var parse = require('html-react-parser');
|
|
15
|
-
var reactShare = require('react-share');
|
|
16
|
-
var ROtpInput = require('react-otp-input');
|
|
17
|
-
var ElasticSearchAPIConnector = require('@elastic/search-ui-elasticsearch-connector');
|
|
18
|
-
var reactSearchUi = require('@elastic/react-search-ui');
|
|
19
|
-
var RCPagination = require('rc-pagination');
|
|
20
|
-
var enUsLocale = require('rc-pagination/lib/locale/en_US');
|
|
21
|
-
|
|
22
|
-
/******************************************************************************
|
|
23
|
-
Copyright (c) Microsoft Corporation.
|
|
24
|
-
|
|
25
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
26
|
-
purpose with or without fee is hereby granted.
|
|
27
|
-
|
|
28
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
29
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
30
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
31
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
32
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
33
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
34
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
35
|
-
***************************************************************************** */
|
|
36
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var __assign = function() {
|
|
40
|
-
__assign = Object.assign || function __assign(t) {
|
|
41
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
42
|
-
s = arguments[i];
|
|
43
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
44
|
-
}
|
|
45
|
-
return t;
|
|
46
|
-
};
|
|
47
|
-
return __assign.apply(this, arguments);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
function __rest(s, e) {
|
|
51
|
-
var t = {};
|
|
52
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
53
|
-
t[p] = s[p];
|
|
54
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
55
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
56
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
57
|
-
t[p[i]] = s[p[i]];
|
|
58
|
-
}
|
|
59
|
-
return t;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
63
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
64
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
65
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
66
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
67
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
68
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function __generator(thisArg, body) {
|
|
73
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
74
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
75
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
76
|
-
function step(op) {
|
|
77
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
78
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
79
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
80
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
81
|
-
switch (op[0]) {
|
|
82
|
-
case 0: case 1: t = op; break;
|
|
83
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
84
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
85
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
86
|
-
default:
|
|
87
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
88
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
89
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
90
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
91
|
-
if (t[2]) _.ops.pop();
|
|
92
|
-
_.trys.pop(); continue;
|
|
93
|
-
}
|
|
94
|
-
op = body.call(thisArg, _);
|
|
95
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
96
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
101
|
-
var e = new Error(message);
|
|
102
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
var AnimationCounter = function (_a) {
|
|
106
|
-
var testID = _a.testID, from = _a.from, to = _a.to, animationOptions = _a.animationOptions, className = _a.className, _b = _a.numDecimals, numDecimals = _b === void 0 ? 0 : _b;
|
|
107
|
-
var ref = React.useRef(null);
|
|
108
|
-
var inView = framerMotion.useInView(ref, { once: true });
|
|
109
|
-
framerMotion.useIsomorphicLayoutEffect(function () {
|
|
110
|
-
var element = ref.current;
|
|
111
|
-
if (!element || !inView) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
115
|
-
element.textContent = to.toString();
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
element.textContent = from.toString();
|
|
119
|
-
var controls = framerMotion.animate(from, to, __assign(__assign({ duration: 1, ease: 'easeOut' }, animationOptions), { onUpdate: function (value) {
|
|
120
|
-
element.textContent = value.toFixed(numDecimals);
|
|
121
|
-
} }));
|
|
122
|
-
return function () {
|
|
123
|
-
controls.stop();
|
|
124
|
-
};
|
|
125
|
-
}, [ref, inView, from, to, animationOptions]);
|
|
126
|
-
return jsxRuntime.jsx("span", { ref: ref, "data-testid": testID || 'AnimationCounter', className: cx('relative', className) });
|
|
127
|
-
};
|
|
128
|
-
AnimationCounter.displayName = 'AnimationCounter';
|
|
129
|
-
|
|
130
|
-
var Blockquote = function (_a) {
|
|
131
|
-
var text = _a.text, citation = _a.citation, className = _a.className, citationAttribute = _a.citationAttribute, _b = _a.showIcon, showIcon = _b === void 0 ? true : _b;
|
|
132
|
-
var classes = cx('text-xl italic font-bold', className);
|
|
133
|
-
return (jsxRuntime.jsxs("blockquote", { "data-testid": "Blockquote", className: classes, children: [showIcon && jsxRuntime.jsx("svg", { "aria-hidden": "true", className: "w-10 h-10", viewBox: "0 0 24 27", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z", fill: "currentColor" }) }), jsxRuntime.jsx("div", { children: text }), citation && (jsxRuntime.jsx("figcaption", { className: "flex flex-start items-center mt-6 space-x-3", children: jsxRuntime.jsxs("div", { className: "flex items-center divide-x-2", children: [jsxRuntime.jsx("cite", { className: "pr-3 font-medium", children: citation }), citationAttribute && jsxRuntime.jsx("cite", { className: "pl-3 text-sm font-light", children: citationAttribute })] }) }))] }));
|
|
134
|
-
};
|
|
135
|
-
Blockquote.displayName = 'Blockquote';
|
|
136
|
-
|
|
137
|
-
exports.BTN_TYPES = void 0;
|
|
138
|
-
(function (BTN_TYPES) {
|
|
139
|
-
BTN_TYPES["SUBMIT"] = "submit";
|
|
140
|
-
BTN_TYPES["RESET"] = "reset";
|
|
141
|
-
BTN_TYPES["BUTTON"] = "button";
|
|
142
|
-
})(exports.BTN_TYPES || (exports.BTN_TYPES = {}));
|
|
143
|
-
exports.BTN_VARIANTS = void 0;
|
|
144
|
-
(function (BTN_VARIANTS) {
|
|
145
|
-
BTN_VARIANTS["PRIMARY"] = "primary";
|
|
146
|
-
BTN_VARIANTS["SECONDARY"] = "secondary";
|
|
147
|
-
BTN_VARIANTS["TERTIARY"] = "tertiary";
|
|
148
|
-
BTN_VARIANTS["LINK"] = "link";
|
|
149
|
-
// DANGER = 'danger',
|
|
150
|
-
// WARNING = 'warning',
|
|
151
|
-
// SUCCESS = 'success',
|
|
152
|
-
// INFO = 'info',
|
|
153
|
-
})(exports.BTN_VARIANTS || (exports.BTN_VARIANTS = {}));
|
|
154
|
-
exports.BTN_SIZES = void 0;
|
|
155
|
-
(function (BTN_SIZES) {
|
|
156
|
-
BTN_SIZES["SMALL"] = "small";
|
|
157
|
-
BTN_SIZES["MEDIUM"] = "medium";
|
|
158
|
-
BTN_SIZES["LARGE"] = "large";
|
|
159
|
-
})(exports.BTN_SIZES || (exports.BTN_SIZES = {}));
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Icon component
|
|
163
|
-
* List of supported icons can be found at https://icon-sets.iconify.design.
|
|
164
|
-
*/
|
|
165
|
-
var Icon = function (_a) {
|
|
166
|
-
// if (color) {
|
|
167
|
-
// return (
|
|
168
|
-
// <IconifyIcon
|
|
169
|
-
// data-testid={testID || id || 'Icon'}
|
|
170
|
-
// icon={name}
|
|
171
|
-
// width={size}
|
|
172
|
-
// height={size}
|
|
173
|
-
// color={color}
|
|
174
|
-
// className={className}
|
|
175
|
-
// fill={color || 'currentColor'}
|
|
176
|
-
// />
|
|
177
|
-
// );
|
|
178
|
-
// }
|
|
179
|
-
var name = _a.name, _b = _a.size, size = _b === void 0 ? 24 : _b, color = _a.color, id = _a.id, className = _a.className, testID = _a.testID;
|
|
180
|
-
return (jsxRuntime.jsx(react.Icon, { "data-testid": testID || id || 'Icon', icon: name, width: size, height: size, color: color || 'currentColor', className: className }));
|
|
181
|
-
};
|
|
182
|
-
Icon.displayName = 'Icon';
|
|
183
|
-
|
|
184
|
-
var Loader = function (_a) {
|
|
185
|
-
var color = _a.color, _b = _a.size, size = _b === void 0 ? 8 : _b, _c = _a.thickness, thickness = _c === void 0 ? 4 : _c;
|
|
186
|
-
var sizeClass = size ? "w-".concat(size, " h-").concat(size) : 'w-8 h-8';
|
|
187
|
-
return (jsxRuntime.jsx("div", { "data-testid": "Loader", className: 'flex items-center justify-center', children: jsxRuntime.jsxs("div", { role: "status", className: 'flex items-center', children: [jsxRuntime.jsxs("svg", { className: "animate-spin ".concat(sizeClass, " text-white"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: color || 'currentColor', strokeWidth: thickness }), jsxRuntime.jsx("path", { className: "opacity-75", fill: color || 'currentColor', d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })] }) }));
|
|
188
|
-
};
|
|
189
|
-
Loader.displayName = 'Loader';
|
|
190
|
-
|
|
191
|
-
var Button = function (_a) {
|
|
192
|
-
var _b, _c, _d, _e;
|
|
193
|
-
var _f = _a.variant, variant = _f === void 0 ? exports.BTN_VARIANTS.PRIMARY : _f, _g = _a.size, size = _g === void 0 ? exports.BTN_SIZES.MEDIUM : _g, _h = _a.type, type = _h === void 0 ? exports.BTN_TYPES.BUTTON : _h, _j = _a.wide, wide = _j === void 0 ? true : _j, _k = _a.rounded, rounded = _k === void 0 ? true : _k, _l = _a.raised, raised = _l === void 0 ? true : _l, uppercase = _a.uppercase, children = _a.children, id = _a.id, disabled = _a.disabled, ariaLabel = _a.ariaLabel, onClick = _a.onClick, icon = _a.icon, external = _a.external, iconFirst = _a.iconFirst, outline = _a.outline, testID = _a.testID, className = _a.className, isLoading = _a.isLoading;
|
|
194
|
-
var smallX = wide ? 'px-5' : 'px-3';
|
|
195
|
-
var mediumX = wide ? 'px-8' : 'px-4';
|
|
196
|
-
var largeX = wide ? 'px-11' : 'px-5';
|
|
197
|
-
var sizes = {
|
|
198
|
-
small: {
|
|
199
|
-
x: children ? smallX : 'px-1',
|
|
200
|
-
y: 'py-1',
|
|
201
|
-
space: 'space-x-2',
|
|
202
|
-
text: 'text-sm',
|
|
203
|
-
icon: 'w-3 h-3',
|
|
204
|
-
},
|
|
205
|
-
medium: {
|
|
206
|
-
x: children ? mediumX : 'px-2',
|
|
207
|
-
y: 'py-2',
|
|
208
|
-
space: 'space-x-3',
|
|
209
|
-
text: 'text-base',
|
|
210
|
-
icon: 'w-5 h-5',
|
|
211
|
-
},
|
|
212
|
-
large: {
|
|
213
|
-
x: children ? largeX : 'px-3',
|
|
214
|
-
y: 'py-3',
|
|
215
|
-
space: 'space-x-4',
|
|
216
|
-
text: 'text-lg',
|
|
217
|
-
icon: 'w-6 h-6',
|
|
218
|
-
},
|
|
219
|
-
};
|
|
220
|
-
var classes = tailwindMerge.twMerge(cx('appearance-none font-body flex items-center transition-all duration-200 transform active:scale-95 justify-around border-solid border rounded cursor-pointer outline-none focus:outline-none focus-visible:outline-none', { 'border-primary': outline }, { 'border-primary300 dark:border-primary400 hover:border-primary400 dark:hover:border-primary500': outline }, { shadow: raised }, { uppercase: uppercase }, { 'auto-cols-auto grid-cols-2 gap-4': isLoading || icon || external }, { 'rounded-full': rounded }, { 'flex-row-reverse': iconFirst }, { 'opacity-50 cursor-not-allowed': disabled }, "".concat((_b = sizes === null || sizes === void 0 ? void 0 : sizes[size]) === null || _b === void 0 ? void 0 : _b.y, " ").concat((_c = sizes === null || sizes === void 0 ? void 0 : sizes[size]) === null || _c === void 0 ? void 0 : _c.x, " ").concat((_d = sizes === null || sizes === void 0 ? void 0 : sizes[size]) === null || _d === void 0 ? void 0 : _d.text), { 'text-white border-primary bg-primary hover:bg-primary-darker': variant === exports.BTN_VARIANTS.PRIMARY }, { 'text-white border-secondary bg-secondary hover:bg-secondary-darker': variant === exports.BTN_VARIANTS.SECONDARY }, { 'text-black border-tertiary bg-tertiary hover:bg-tertiary-darker': variant === exports.BTN_VARIANTS.TERTIARY }, {
|
|
221
|
-
'px-0 text-primary border-transparent bg-transparent hover:bg-transparent shadow-none group-hover:invert': variant === exports.BTN_VARIANTS.LINK,
|
|
222
|
-
}, className));
|
|
223
|
-
var iconClasses = cx((_e = sizes === null || sizes === void 0 ? void 0 : sizes[size]) === null || _e === void 0 ? void 0 : _e.icon);
|
|
224
|
-
return (jsxRuntime.jsx("button", { id: id, "data-testid": testID || id || 'Button', onClick: onClick, className: classes, type: type, disabled: disabled, "aria-label": ariaLabel, role: "button", children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, icon && !external && (jsxRuntime.jsx("span", { className: "flex items-center", children: jsxRuntime.jsx(Icon, { name: icon, className: iconClasses }) })), external && (jsxRuntime.jsx("span", { className: "flex items-center", children: jsxRuntime.jsx(Icon, { name: "carbon:launch", className: iconClasses }) })), isLoading && (jsxRuntime.jsx("div", { className: "flex items-center", children: jsxRuntime.jsx(Loader, { size: 4 }) }))] }) }));
|
|
225
|
-
};
|
|
226
|
-
Button.displayName = 'Button';
|
|
227
|
-
|
|
228
|
-
var Checkbox = React.forwardRef(function MyInput(_a, ref) {
|
|
229
|
-
var id = _a.id, label = _a.label, required = _a.required, className = _a.className, disabled = _a.disabled, rest = __rest(_a, ["id", "label", "required", "className", "disabled"]);
|
|
230
|
-
return (jsxRuntime.jsxs("div", { "data-testid": "Checkbox", className: cx('flex items-center', className), children: [jsxRuntime.jsxs("div", { className: "relative bg-none w-5 h-5 flex justify-center items-center", children: [jsxRuntime.jsx("input", __assign({ id: id, ref: ref, disabled: disabled, type: "checkbox", className: "form-item checkbox m-0 appearance-none peer h-full w-full shrink-0 focus:ring-2", required: required }, rest)), jsxRuntime.jsx("span", { className: "absolute transition-opacity opacity-0 pointer-events-none peer-checked:opacity-100 w-full h-full flex items-center justify-center top-0 left-0", children: jsxRuntime.jsx(Icon, { name: "mdi:check-bold", size: 12 }) })] }), label && (jsxRuntime.jsx("label", { className: "label pl-2 leading-none text-sm", htmlFor: id, children: label }))] }));
|
|
231
|
-
});
|
|
232
|
-
Checkbox.displayName = 'Checkbox';
|
|
233
|
-
|
|
234
|
-
var Link = function (_a) {
|
|
235
|
-
var href = _a.href, children = _a.children, _b = _a.onClick, onClick = _b === void 0 ? function () { return console.log('Link clicked'); } : _b, history = _a.history, target = _a.target, id = _a.id, testID = _a.testID, className = _a.className, prefetch = _a.prefetch, _c = _a.hideExternalIcon, hideExternalIcon = _c === void 0 ? false : _c;
|
|
236
|
-
var linkClasses = cx('link cursor-pointer no-underline text-body-text dark:text-dark-body-text', className);
|
|
237
|
-
// Check if link is external
|
|
238
|
-
var isExternal = !hideExternalIcon && href && href.startsWith('http');
|
|
239
|
-
if (isExternal) {
|
|
240
|
-
return (jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("a", { "data-testid": testID || id || 'Link', className: cx(linkClasses), href: href, target: "_blank", rel: "noopener noreferrer", children: children }), jsxRuntime.jsx(Icon, { name: "mdi:external-link", className: "inline-block w-4 h-4 ml-1 mb-0" })] }));
|
|
241
|
-
}
|
|
242
|
-
// Allow for non-next.js Application usage.
|
|
243
|
-
try {
|
|
244
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
245
|
-
var nextLink = require('next/link').default;
|
|
246
|
-
if (!nextLink)
|
|
247
|
-
throw new Error('Next.js Image not found');
|
|
248
|
-
return React.createElement(nextLink, {
|
|
249
|
-
href: href,
|
|
250
|
-
'data-testid': testID || id || 'Link',
|
|
251
|
-
className: linkClasses,
|
|
252
|
-
target: target || '_self',
|
|
253
|
-
prefetch: prefetch || false,
|
|
254
|
-
}, children);
|
|
255
|
-
}
|
|
256
|
-
catch (_d) {
|
|
257
|
-
console.log('Not using Next Link.');
|
|
258
|
-
var handleClick = function (event) {
|
|
259
|
-
if (onClick) {
|
|
260
|
-
onClick(event);
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
if (event.defaultPrevented === true) {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
if (history && href) {
|
|
267
|
-
event.preventDefault();
|
|
268
|
-
history.push(href);
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
return (jsxRuntime.jsx("a", { "data-testid": testID || id || 'Link', className: linkClasses, href: href, onClick: handleClick, target: target, children: children }));
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
Link.displayName = 'Link';
|
|
275
|
-
|
|
276
|
-
var Chip = function (_a) {
|
|
277
|
-
var testID = _a.testID, text = _a.text, outline = _a.outline, rounded = _a.rounded, variant = _a.variant, _b = _a.size, size = _b === void 0 ? 'medium' : _b, icon = _a.icon, iconFirst = _a.iconFirst, onClick = _a.onClick;
|
|
278
|
-
var classes = tailwindMerge.twMerge(cx('flex inline-flex items-center justify-center rounded select-none gap-2', { 'border border-solid border-primary': outline }, { 'rounded-full': rounded }, { 'flex-row-reverse': iconFirst }, {
|
|
279
|
-
'bg-primary text-white': variant === 'primary',
|
|
280
|
-
}, { 'bg-secondary text-white': variant === 'secondary' }, { 'bg-info text-white': variant === 'info' }, {
|
|
281
|
-
'bg-success text-white': variant === 'success',
|
|
282
|
-
}, { 'bg-warning text-white': variant === 'warning' }, { 'bg-error text-white': variant === 'error' }, {
|
|
283
|
-
'py-1 px-2': size === 'small',
|
|
284
|
-
}, { 'py-2 px-4': size === 'medium' }, { 'py-3 px-6': size === 'large' }));
|
|
285
|
-
if (onClick && typeof onClick === 'function') {
|
|
286
|
-
return (jsxRuntime.jsxs(Link, { "data-testid": testID || 'Chip', className: classes, onClick: onClick, children: [jsxRuntime.jsx("div", { children: text }), icon && (jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: jsxRuntime.jsx(Icon, { name: icon }) }))] }));
|
|
287
|
-
}
|
|
288
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || 'Chip', className: classes, children: [jsxRuntime.jsx("div", { children: text }), icon && (jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: jsxRuntime.jsx(Icon, { name: icon }) }))] }));
|
|
289
|
-
};
|
|
290
|
-
Chip.displayName = 'Chip';
|
|
291
|
-
|
|
292
|
-
exports.COPY_ALIGN = void 0;
|
|
293
|
-
(function (COPY_ALIGN) {
|
|
294
|
-
COPY_ALIGN["LEFT"] = "left";
|
|
295
|
-
COPY_ALIGN["CENTER"] = "center";
|
|
296
|
-
COPY_ALIGN["RIGHT"] = "right";
|
|
297
|
-
COPY_ALIGN["JUSTIFY"] = "justify";
|
|
298
|
-
COPY_ALIGN["NOWRAP"] = "nowrap";
|
|
299
|
-
})(exports.COPY_ALIGN || (exports.COPY_ALIGN = {}));
|
|
300
|
-
exports.COPY_TRANSFORM = void 0;
|
|
301
|
-
(function (COPY_TRANSFORM) {
|
|
302
|
-
COPY_TRANSFORM["LOWERCASE"] = "lowercase";
|
|
303
|
-
COPY_TRANSFORM["UPPERCASE"] = "uppercase";
|
|
304
|
-
COPY_TRANSFORM["CAPITALIZE"] = "capitalize";
|
|
305
|
-
COPY_TRANSFORM["NORMALCASE"] = "normal-case";
|
|
306
|
-
})(exports.COPY_TRANSFORM || (exports.COPY_TRANSFORM = {}));
|
|
307
|
-
exports.COPY_CONTEXTUAL = void 0;
|
|
308
|
-
(function (COPY_CONTEXTUAL) {
|
|
309
|
-
COPY_CONTEXTUAL["INVERTED"] = "inverted";
|
|
310
|
-
COPY_CONTEXTUAL["MUTED"] = "muted";
|
|
311
|
-
})(exports.COPY_CONTEXTUAL || (exports.COPY_CONTEXTUAL = {}));
|
|
312
|
-
exports.COPY_SIZE = void 0;
|
|
313
|
-
(function (COPY_SIZE) {
|
|
314
|
-
COPY_SIZE["SMALL"] = "small";
|
|
315
|
-
COPY_SIZE["LARGE"] = "large";
|
|
316
|
-
COPY_SIZE["INTRO"] = "intro";
|
|
317
|
-
})(exports.COPY_SIZE || (exports.COPY_SIZE = {}));
|
|
318
|
-
exports.COPY_TAG = void 0;
|
|
319
|
-
(function (COPY_TAG) {
|
|
320
|
-
COPY_TAG["P"] = "p";
|
|
321
|
-
COPY_TAG["SPAN"] = "span";
|
|
322
|
-
COPY_TAG["DIV"] = "div";
|
|
323
|
-
COPY_TAG["SMALL"] = "small";
|
|
324
|
-
})(exports.COPY_TAG || (exports.COPY_TAG = {}));
|
|
325
|
-
|
|
326
|
-
var Copy = function (_a) {
|
|
327
|
-
var _b;
|
|
328
|
-
var children = _a.children, _c = _a.as, Tag = _c === void 0 ? exports.COPY_TAG.P : _c, size = _a.size, align = _a.align, transform = _a.transform, id = _a.id, className = _a.className, testID = _a.testID;
|
|
329
|
-
var classes = cx((_b = {}, _b["text-".concat(align)] = align, _b), { 'text-sm': size === 'small' }, { 'text-lg': size === 'large' }, { 'text-2xl': size === 'intro' }, { 'mb-3 leading-5 mt-0': Tag === 'p' }, { 'text-sm': Tag === 'small' },
|
|
330
|
-
//'body-text',
|
|
331
|
-
transform, className);
|
|
332
|
-
return (jsxRuntime.jsx(Tag, { "data-testid": testID || id || 'Copy', className: tailwindMerge.twMerge(classes), children: children }));
|
|
333
|
-
};
|
|
334
|
-
Copy.displayName = 'Copy';
|
|
335
|
-
|
|
336
|
-
var FileUpload = React.forwardRef(function FileUploadInput(_a, ref) {
|
|
337
|
-
var id = _a.id, name = _a.name, required = _a.required, disabled = _a.disabled, className = _a.className, onChangeCallback = _a.onChangeCallback, onChange = _a.onChange, rest = __rest(_a, ["id", "name", "required", "disabled", "className", "onChangeCallback", "onChange"]);
|
|
338
|
-
var handleFileChange = function (event) {
|
|
339
|
-
if (onChangeCallback && typeof onChangeCallback === 'function') {
|
|
340
|
-
onChangeCallback(event);
|
|
341
|
-
}
|
|
342
|
-
if (onChange && typeof onChange === 'function') {
|
|
343
|
-
onChange({ target: { value: event.target.value, name: name } });
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
return (jsxRuntime.jsx("div", { "data-testid": "FileUpload", className: className, children: jsxRuntime.jsx("input", __assign({ ref: ref, className: cx('form-item text-input file-upload p-0 relative m-0 min-w-0 flex-auto appearance-none block box-border bg-clip-padding file:p-3 file:cursor-pointer file:mr-3 file:overflow-hidden cursor-pointer file:border-0 file:rounded-none file:border-solid file:border-inherit file:transition file:duration-150 file:ease-in-out file:[border-inline-end-width:1px] file:[margin-inline-end:0.75rem] '), "aria-describedby": name, type: "file", disabled: disabled, required: required, name: name, id: id, onChange: handleFileChange }, rest)) }));
|
|
347
|
-
});
|
|
348
|
-
FileUpload.displayName = 'FileUpload';
|
|
349
|
-
|
|
350
|
-
exports.HEADING_TAGS = void 0;
|
|
351
|
-
(function (HEADING_TAGS) {
|
|
352
|
-
HEADING_TAGS["H1"] = "h1";
|
|
353
|
-
HEADING_TAGS["H2"] = "h2";
|
|
354
|
-
HEADING_TAGS["H3"] = "h3";
|
|
355
|
-
HEADING_TAGS["H4"] = "h4";
|
|
356
|
-
HEADING_TAGS["H5"] = "h5";
|
|
357
|
-
})(exports.HEADING_TAGS || (exports.HEADING_TAGS = {}));
|
|
358
|
-
exports.HEADING_ALIGN = void 0;
|
|
359
|
-
(function (HEADING_ALIGN) {
|
|
360
|
-
HEADING_ALIGN["LEFT"] = "left";
|
|
361
|
-
HEADING_ALIGN["CENTER"] = "center";
|
|
362
|
-
HEADING_ALIGN["RIGHT"] = "right";
|
|
363
|
-
HEADING_ALIGN["JUSTIFY"] = "justify";
|
|
364
|
-
HEADING_ALIGN["NOWRAP"] = "nowrap";
|
|
365
|
-
})(exports.HEADING_ALIGN || (exports.HEADING_ALIGN = {}));
|
|
366
|
-
exports.HEADING_TRANSFORM = void 0;
|
|
367
|
-
(function (HEADING_TRANSFORM) {
|
|
368
|
-
HEADING_TRANSFORM["LOWERCASE"] = "lowercase";
|
|
369
|
-
HEADING_TRANSFORM["UPPERCASE"] = "uppercase";
|
|
370
|
-
HEADING_TRANSFORM["CAPITALIZE"] = "capitalize";
|
|
371
|
-
HEADING_TRANSFORM["NORMAL_CASE"] = "normal-case";
|
|
372
|
-
})(exports.HEADING_TRANSFORM || (exports.HEADING_TRANSFORM = {}));
|
|
373
|
-
|
|
374
|
-
var Heading = function (_a) {
|
|
375
|
-
var _b;
|
|
376
|
-
var children = _a.children, _c = _a.tag, tag = _c === void 0 ? exports.HEADING_TAGS.H2 : _c, transform = _a.transform, align = _a.align, id = _a.id, testID = _a.testID, flush = _a.flush, className = _a.className, singleLine = _a.singleLine;
|
|
377
|
-
var fontSize = function () {
|
|
378
|
-
switch (tag) {
|
|
379
|
-
case 'h1':
|
|
380
|
-
return 'text-5xl md:text-5xl lg:text-5xl';
|
|
381
|
-
case 'h2':
|
|
382
|
-
return 'text-4xl md:text-4xl lg:text-4xl';
|
|
383
|
-
case 'h3':
|
|
384
|
-
return 'text-3xl md:text-3xl lg:text-3xl';
|
|
385
|
-
case 'h4':
|
|
386
|
-
return 'text-2xl md:text-2xl lg:text-2xl';
|
|
387
|
-
case 'h5':
|
|
388
|
-
return 'text-lg md:text-lg lg:text-lg';
|
|
389
|
-
default:
|
|
390
|
-
return 'text-2xl md:text-2xl lg:text-2xl';
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
var size = fontSize();
|
|
394
|
-
var Tag = tag;
|
|
395
|
-
var classes = cx("m-0 p-0 font-heading font-bold ".concat(size), (_b = {}, _b["text-".concat(align)] = align, _b), { 'mb-2': !flush }, { 'm-0': flush }, { 'whitespace-nowrap text-ellipsis overflow-hidden': singleLine }, transform, className);
|
|
396
|
-
return (jsxRuntime.jsx(Tag, { "data-testid": testID || id || 'Heading', className: classes, children: children }));
|
|
397
|
-
};
|
|
398
|
-
Heading.displayName = 'Heading';
|
|
399
|
-
|
|
400
|
-
var Hr = function (_a) {
|
|
401
|
-
var _b = _a.size, size = _b === void 0 ? 'small' : _b;
|
|
402
|
-
return (jsxRuntime.jsx("hr", { className: cx('border-0 border-b border-dark-body-text dark:border-dark-body-text', {
|
|
403
|
-
'mt-4 mb-4': size === 'small',
|
|
404
|
-
'mt-8 mb-8': size === 'medium',
|
|
405
|
-
'mt-16 mb-16 ': size === 'large',
|
|
406
|
-
}) }));
|
|
407
|
-
};
|
|
408
|
-
Hr.displayName = 'Hr';
|
|
409
|
-
|
|
410
|
-
var Image = function (_a) {
|
|
411
|
-
var src = _a.src, alt = _a.alt, title = _a.title, caption = _a.caption, _b = _a.figure, figure = _b === void 0 ? false : _b, onLoad = _a.onLoad, id = _a.id, className = _a.className, _c = _a.sizes, sizes = _c === void 0 ? '(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw' : _c, testID = _a.testID, rest = __rest(_a, ["src", "alt", "title", "caption", "figure", "onLoad", "id", "className", "sizes", "testID"]);
|
|
412
|
-
try {
|
|
413
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
414
|
-
var nextImage = require('next/image').default;
|
|
415
|
-
if (!nextImage)
|
|
416
|
-
throw new Error('Next.js Image not found');
|
|
417
|
-
var hasFill = !rest.width ? true : false;
|
|
418
|
-
var useSizes = hasFill ? { sizes: sizes } : {};
|
|
419
|
-
return React.createElement(nextImage, __assign(__assign({ src: typeof src === 'string' ? src : src, alt: alt, title: title, fill: hasFill, onLoad: onLoad, className: className }, useSizes), rest));
|
|
420
|
-
}
|
|
421
|
-
catch (_d) {
|
|
422
|
-
var figureClasses = cx('m-0');
|
|
423
|
-
var classes = cx('w-full h-full', className);
|
|
424
|
-
/**
|
|
425
|
-
* Render as a figure.
|
|
426
|
-
*/
|
|
427
|
-
if (figure || caption) {
|
|
428
|
-
return (jsxRuntime.jsxs("figure", { "data-testid": testID || id || 'Image', className: figureClasses, children: [jsxRuntime.jsx("img", { onLoad: onLoad, src: src, alt: alt, title: title, className: classes }), caption && jsxRuntime.jsx("figcaption", { children: caption })] }));
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Default render as an image.
|
|
432
|
-
*/
|
|
433
|
-
return (jsxRuntime.jsx("img", { "data-testid": testID || id || 'Image', onLoad: onLoad, src: src, alt: alt, title: title, className: classes }));
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
Image.displayName = 'Image';
|
|
437
|
-
|
|
438
|
-
var Label = function (_a) {
|
|
439
|
-
var children = _a.children, id = _a.id, transform = _a.transform, className = _a.className;
|
|
440
|
-
return (jsxRuntime.jsx("label", { "data-testid": "Label", className: tailwindMerge.twMerge(cx('label mb-2', transform, className)), htmlFor: id, children: children }));
|
|
441
|
-
};
|
|
442
|
-
Label.displayName = 'Label';
|
|
443
|
-
|
|
444
|
-
exports.Variants = void 0;
|
|
445
|
-
(function (Variants) {
|
|
446
|
-
Variants["UNSTYLED"] = "unstyled";
|
|
447
|
-
Variants["INLINE"] = "inline";
|
|
448
|
-
Variants["SMALL"] = "small";
|
|
449
|
-
Variants["LARGE"] = "large";
|
|
450
|
-
})(exports.Variants || (exports.Variants = {}));
|
|
451
|
-
exports.ListTag = void 0;
|
|
452
|
-
(function (ListTag) {
|
|
453
|
-
ListTag["OL"] = "ol";
|
|
454
|
-
ListTag["UL"] = "ul";
|
|
455
|
-
ListTag["DL"] = "dl";
|
|
456
|
-
ListTag["DIV"] = "div";
|
|
457
|
-
ListTag["DT"] = "dt";
|
|
458
|
-
ListTag["DD"] = "dd";
|
|
459
|
-
ListTag["LI"] = "li";
|
|
460
|
-
})(exports.ListTag || (exports.ListTag = {}));
|
|
461
|
-
|
|
462
|
-
var List = function (_a) {
|
|
463
|
-
var variants = _a.variants, children = _a.children, _b = _a.as, as = _b === void 0 ? exports.ListTag.UL : _b, id = _a.id, testID = _a.testID, className = _a.className;
|
|
464
|
-
var modifiers = variants ? variants.map(function (el) { return "list--".concat(el); }) : null;
|
|
465
|
-
var Tag = as;
|
|
466
|
-
return (jsxRuntime.jsx(Tag, { "data-testid": testID || id || 'List', className: cx(modifiers, className), children: children }));
|
|
467
|
-
};
|
|
468
|
-
List.displayName = 'List';
|
|
469
|
-
|
|
470
|
-
var Logo = function (_a) {
|
|
471
|
-
var testID = _a.testID, logo = _a.logo, className = _a.className, _b = _a.aspectRatioClass, aspectRatioClass = _b === void 0 ? 'aspect-[1/1]' : _b;
|
|
472
|
-
return (jsxRuntime.jsx("div", { "data-testid": testID || 'Logo', className: cx('relative w-full', aspectRatioClass, className), children: jsxRuntime.jsx(Image, { src: logo, alt: "logo", fill: true, sizes: "(max-width: 600px) 100px, 200px", priority: true }) }));
|
|
473
|
-
};
|
|
474
|
-
Logo.displayName = 'Logo';
|
|
475
|
-
|
|
476
|
-
var Notice = function (_a) {
|
|
477
|
-
var id = _a.id, testID = _a.testID, title = _a.title, text = _a.text, icon = _a.icon, type = _a.type, onCloseCallback = _a.onCloseCallback, onClickCallback = _a.onClickCallback, actionText = _a.actionText;
|
|
478
|
-
var classes = cx('p-4 rounded relative', {
|
|
479
|
-
'bg-info text-white': type === 'info',
|
|
480
|
-
'bg-success text-white': type === 'success',
|
|
481
|
-
'bg-warning text-black': type === 'warning',
|
|
482
|
-
'bg-error text-white': type === 'error',
|
|
483
|
-
});
|
|
484
|
-
return (jsxRuntime.jsx("div", { "data-testid": testID || id || 'Notice', className: classes, children: jsxRuntime.jsxs("div", { className: "flex gap-2", children: [icon && (jsxRuntime.jsx("div", { className: "mr-2", children: jsxRuntime.jsx(Icon, { name: icon }) })), jsxRuntime.jsxs("div", { children: [title && jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H3, children: title }), jsxRuntime.jsx(Copy, { className: "mb-0", children: text })] }), onClickCallback && actionText && (jsxRuntime.jsx("div", { className: "ml-auto flex items-end", children: jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, onClick: onClickCallback, "aria-label": "Action", size: exports.BTN_SIZES.SMALL, children: actionText }) })), onCloseCallback && (jsxRuntime.jsx("div", { className: "absolute top-2 right-4", children: jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.LINK, icon: "mdi:close", onClick: onCloseCallback, "aria-label": "Close" }) }))] }) }));
|
|
485
|
-
};
|
|
486
|
-
Notice.displayName = 'Notice';
|
|
487
|
-
|
|
488
|
-
var Radio = React.forwardRef(function MyInput(_a, ref) {
|
|
489
|
-
var name = _a.name, required = _a.required, className = _a.className, options = _a.options, rest = __rest(_a, ["name", "required", "className", "options"]);
|
|
490
|
-
return (jsxRuntime.jsx("div", { "data-testid": "Radio", className: cx('flex items-center', className), children: jsxRuntime.jsx("div", { className: cx('flex flex-col gap-2', className), children: options === null || options === void 0 ? void 0 : options.map(function (option) {
|
|
491
|
-
var _a;
|
|
492
|
-
var value = ((_a = option === null || option === void 0 ? void 0 : option.value) === null || _a === void 0 ? void 0 : _a.toString()) || undefined;
|
|
493
|
-
return (jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [jsxRuntime.jsx("input", __assign({ ref: ref, name: name, type: "radio", required: required, className: "form-item radio peer appearance-none m-0 p-0 w-4 h-4" }, rest, {
|
|
494
|
-
// Prevent controller overriding radio values.
|
|
495
|
-
id: value, value: value })), jsxRuntime.jsx("div", { className: "form-icon opacity-0 peer-checked:opacity-100 absolute w-4 h-4 flex items-center justify-center top-0 left-0 pointer-events-none", children: jsxRuntime.jsx(Icon, { name: "mdi:circle", size: 12 }) })] }), jsxRuntime.jsx("label", { className: "label pl-2 leading-none", htmlFor: value, children: option.label })] }, value));
|
|
496
|
-
}) }) }));
|
|
497
|
-
});
|
|
498
|
-
Radio.displayName = 'Radio';
|
|
499
|
-
|
|
500
|
-
var Switch = React.forwardRef(function MyInput(_a, ref) {
|
|
501
|
-
var id = _a.id, name = _a.name, required = _a.required, disabled = _a.disabled, className = _a.className, rest = __rest(_a, ["id", "name", "required", "disabled", "className"]);
|
|
502
|
-
return (jsxRuntime.jsxs("label", { "data-testid": "Switch", className: cx('inline-flex items-center cursor-pointer', className), children: [jsxRuntime.jsx("input", __assign({ ref: ref, id: id, name: name, type: "checkbox", value: "", className: "sr-only peer", disabled: disabled, required: required }, rest)), jsxRuntime.jsx("div", { className: "form-item switch peer-focus:ring-info dark:peer-focus:ring-info relative w-11 h-6 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[1px] after:start-[1px] after:bg-white after:border after:rounded-full after:h-5 after:w-5 after:transition-all transition-all" })] }));
|
|
503
|
-
});
|
|
504
|
-
Switch.displayName = 'Switch';
|
|
505
|
-
|
|
506
|
-
var InputType;
|
|
507
|
-
(function (InputType) {
|
|
508
|
-
InputType["TEXT"] = "text";
|
|
509
|
-
InputType["PASSWORD"] = "password";
|
|
510
|
-
InputType["EMAIL"] = "email";
|
|
511
|
-
InputType["NUMBER"] = "number";
|
|
512
|
-
InputType["TEL"] = "tel";
|
|
513
|
-
InputType["URL"] = "url";
|
|
514
|
-
InputType["SEARCH"] = "search";
|
|
515
|
-
InputType["DATE"] = "date";
|
|
516
|
-
InputType["TIME"] = "time";
|
|
517
|
-
InputType["DATETIME"] = "datetime-local";
|
|
518
|
-
InputType["MONTH"] = "month";
|
|
519
|
-
InputType["WEEK"] = "week";
|
|
520
|
-
InputType["FILE"] = "file";
|
|
521
|
-
InputType["TEXTAREA"] = "textarea";
|
|
522
|
-
InputType["HIDDEN"] = "hidden";
|
|
523
|
-
})(InputType || (InputType = {}));
|
|
524
|
-
|
|
525
|
-
var TextInput = React.forwardRef(function MyInput(_a, ref) {
|
|
526
|
-
var _b = _a.type, type = _b === void 0 ? InputType.TEXT : _b, _c = _a.required, required = _c === void 0 ? false : _c, className = _a.className, onChange = _a.onChange, placeholder = _a.placeholder, icon = _a.icon, _d = _a.disabled, disabled = _d === void 0 ? false : _d, name = _a.name, autoComplete = _a.autoComplete, rest = __rest(_a, ["type", "required", "className", "onChange", "placeholder", "icon", "disabled", "name", "autoComplete"]);
|
|
527
|
-
React.useEffect(function () {
|
|
528
|
-
if (typeof window !== 'undefined') {
|
|
529
|
-
// eslint-disable-next-line global-require
|
|
530
|
-
require('date-input-polyfill');
|
|
531
|
-
}
|
|
532
|
-
}, []);
|
|
533
|
-
var format = 'dd/mm/yyyy';
|
|
534
|
-
var placeholderSet = type === 'date' ? format.toUpperCase() : placeholder;
|
|
535
|
-
if (type === InputType.TEXTAREA) {
|
|
536
|
-
return (jsxRuntime.jsx("div", { "data-testid": "TextInput", className: "relative", children: jsxRuntime.jsx("textarea", __assign({ ref: ref, id: name, autoComplete: name, required: required, "aria-required": required, disabled: disabled, placeholder: placeholderSet, onChange: onChange, rows: 4, className: cx('form-item text-input resize-none', className) }, rest)) }));
|
|
537
|
-
}
|
|
538
|
-
return (jsxRuntime.jsxs("div", { "data-testid": "TextInput", className: "relative", children: [icon && (jsxRuntime.jsx("div", { className: "form-icon absolute inset-y-0 start-3 flex items-center ps-3.5 pointer-events-none", children: jsxRuntime.jsx(Icon, { name: icon }) })), jsxRuntime.jsx("input", __assign({ ref: ref, id: name, type: type, autoComplete: autoComplete, required: required, "aria-required": required, disabled: disabled, placeholder: placeholderSet, onChange: onChange, className: cx('form-item text-input', { 'pl-12': icon }, className) }, rest))] }));
|
|
539
|
-
});
|
|
540
|
-
TextInput.displayName = 'TextInput';
|
|
541
|
-
|
|
542
|
-
var en = {
|
|
543
|
-
GLOBAL: {},
|
|
544
|
-
FORMS: {
|
|
545
|
-
LOGIN_FORM: {
|
|
546
|
-
TITLE: 'Login',
|
|
547
|
-
SUBMIT: 'Login',
|
|
548
|
-
FORGOT_PASSWORD: 'Forgot password?',
|
|
549
|
-
REGISTER: 'Register',
|
|
550
|
-
EMAIL: 'Email',
|
|
551
|
-
PASSWORD: 'Password',
|
|
552
|
-
},
|
|
553
|
-
REGISTER_FORM: {
|
|
554
|
-
TITLE: 'Register',
|
|
555
|
-
SUBMIT: 'Register',
|
|
556
|
-
EMAIL: 'Email',
|
|
557
|
-
PASSWORD: 'Password',
|
|
558
|
-
PASSWORD_DESCRIPTION: 'Password must be at least 8 characters long and contain at least one number, one uppercase letter, one lowercase letter, and one special character.',
|
|
559
|
-
},
|
|
560
|
-
FORGOT_PASSWORD_FORM: {
|
|
561
|
-
TITLE: 'Forgot Password',
|
|
562
|
-
SUBMIT: 'Send Reset Email',
|
|
563
|
-
EMAIL: 'Email',
|
|
564
|
-
},
|
|
565
|
-
RESET_PASSWORD_FORM: {
|
|
566
|
-
TITLE: 'Reset Password',
|
|
567
|
-
SUBMIT: 'Reset Password',
|
|
568
|
-
PASSWORD: 'Password',
|
|
569
|
-
CONFIRM_PASSWORD: 'Confirm Password',
|
|
570
|
-
},
|
|
571
|
-
PROFILE_FORM: {
|
|
572
|
-
TITLE: 'Profile',
|
|
573
|
-
SUBMIT: 'Save',
|
|
574
|
-
FIRST_NAME: 'First Name',
|
|
575
|
-
LAST_NAME: 'Last Name',
|
|
576
|
-
AVATAR: 'Avatar',
|
|
577
|
-
EMAIL: 'Email',
|
|
578
|
-
PASSWORD: 'Password',
|
|
579
|
-
PASSWORD_DESCRIPTION: 'Password must be at least 8 characters long and contain at least one number, one uppercase letter, one lowercase letter, and one special character.',
|
|
580
|
-
},
|
|
581
|
-
},
|
|
582
|
-
UI: {
|
|
583
|
-
SHOW: 'Show',
|
|
584
|
-
NO_IMAGE: 'No image',
|
|
585
|
-
UPLOAD: 'Upload',
|
|
586
|
-
SAVE: 'Save',
|
|
587
|
-
CANCEL: 'Cancel',
|
|
588
|
-
DELETE: 'Delete',
|
|
589
|
-
LOGIN_WITH_GOOGLE: 'Login with Google',
|
|
590
|
-
LOGIN_WITH_APPLE: 'Login with Apple',
|
|
591
|
-
SIGNUP_WITH_GOOGLE: 'Signup with Google',
|
|
592
|
-
SIGNUP_WITH_APPLE: 'Signup with Apple',
|
|
593
|
-
BACK_TO_LOGIN: 'Back to Login',
|
|
594
|
-
FORGOT_PASSWORD: 'Forgot Password?',
|
|
595
|
-
SUBMIT: 'Submit',
|
|
596
|
-
LOGIN: 'Login',
|
|
597
|
-
LOGOUT: 'Logout',
|
|
598
|
-
REGISTER: 'Register',
|
|
599
|
-
SOCIAL: {
|
|
600
|
-
GOOGLE: 'Google',
|
|
601
|
-
FACEBOOK: 'Facebook',
|
|
602
|
-
TWITTER: 'Twitter',
|
|
603
|
-
EMAIL: 'Email',
|
|
604
|
-
},
|
|
605
|
-
READ_MORE: 'Read more',
|
|
606
|
-
READ_LESS: 'Show less',
|
|
607
|
-
CLOSE: 'Close',
|
|
608
|
-
BACK: 'Back',
|
|
609
|
-
SHARE: 'Share',
|
|
610
|
-
DOWNLOAD: 'Download',
|
|
611
|
-
FORMAT_HOUR: '{hour}hr',
|
|
612
|
-
FORMAT_HOURS: '{hours}hrs',
|
|
613
|
-
FORMAT_MINUTE: '{minute}min',
|
|
614
|
-
FORMAT_MINUTES: '{minutes}mins',
|
|
615
|
-
LOAD_MORE_LABEL: 'Load more',
|
|
616
|
-
NO_MORE_RESULTS: "That's all folks.",
|
|
617
|
-
UNKNOWN_ERROR_TITLE: 'Unknown error',
|
|
618
|
-
UNKNOWN_ERROR_MESSAGE: 'Sorry, something bad happened! Please try again.',
|
|
619
|
-
CONTENT_SORT_TITLE: 'Sort by',
|
|
620
|
-
CONTENT_FILTERS_TITLE: 'Filters',
|
|
621
|
-
CONTENT_FILTERS_LABEL: 'Filter',
|
|
622
|
-
CLOSE_FILTERS_LABEL: 'Done',
|
|
623
|
-
CLEAR_ALL_FILTERS_LABEL: 'Clear All',
|
|
624
|
-
CLEAR_FILTERS_LABEL: 'Clear',
|
|
625
|
-
MORE_ITEMS_LABEL: 'Next items',
|
|
626
|
-
PREVIOUS_ITEMS_LABEL: 'Previous items',
|
|
627
|
-
CHOOSE_BTN_LABEL: 'Choose',
|
|
628
|
-
ADD_BTN_LABEL: 'Add',
|
|
629
|
-
SEND_BTN_LABEL: 'Send',
|
|
630
|
-
CANCEL_BTN_LABEL: 'Cancel',
|
|
631
|
-
DONE_BTN_LABEL: 'Done',
|
|
632
|
-
EDIT_BTN_LABEL: 'Edit',
|
|
633
|
-
CHANGE_BTN_LABEL: 'Change',
|
|
634
|
-
REMOVE_BTN_LABEL: 'Remove',
|
|
635
|
-
MESSAGE_PROMPT_BTN_LABEL: 'Add one',
|
|
636
|
-
SELECT_FILE_BTN_LABEL: 'Select file',
|
|
637
|
-
TOO_MANY_REQUESTS_MESSAGE: 'Too many requests. Please try again later.',
|
|
638
|
-
COPYRIGHT: 'Copyright',
|
|
639
|
-
ALL_RIGHTS_RESERVED: 'All rights reserved',
|
|
640
|
-
},
|
|
641
|
-
ERRORS: {},
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
var Avatar = function (_a) {
|
|
645
|
-
var testID = _a.testID, _b = _a.name, name = _b === void 0 ? 'avatar' : _b, _c = _a.isEditable, isEditable = _c === void 0 ? true : _c, initValue = _a.initValue;
|
|
646
|
-
var _d = React.useState(initValue), file = _d[0], setFile = _d[1];
|
|
647
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || '"Avatar"', className: "foo-bar", children: [jsxRuntime.jsxs("div", { className: "relative w-[200px] aspect-1 rounded-full border border-solid overflow-hidden flex items-center justify-center m-4", children: [file && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Image, { src: file, alt: name, width: 200, height: 200 }), isEditable && (jsxRuntime.jsx("div", { className: "absolute w-full h-full flex items-center justify-center", children: jsxRuntime.jsx(Button, { onClick: function () {
|
|
648
|
-
setFile(undefined);
|
|
649
|
-
}, children: en.UI.REMOVE_BTN_LABEL }) }))] })), !file && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center" }), isEditable && (jsxRuntime.jsx("div", { className: "absolute w-full h-full flex items-center justify-center", children: jsxRuntime.jsx(Label, { id: name, className: "button cursor-pointer mb-0", children: jsxRuntime.jsx(Copy, { className: "mb-0", children: en.UI.UPLOAD }) }) }))] }))] }), jsxRuntime.jsx("input", { type: "file", id: name, name: name, className: "hidden", onChange: function (event) {
|
|
650
|
-
var _a;
|
|
651
|
-
var file = (_a = event.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
652
|
-
if (file) {
|
|
653
|
-
var imageURL = URL.createObjectURL(file);
|
|
654
|
-
setFile(imageURL);
|
|
655
|
-
}
|
|
656
|
-
} })] }));
|
|
657
|
-
};
|
|
658
|
-
Avatar.displayName = 'Avatar';
|
|
659
|
-
|
|
660
|
-
var AnimationSet1 = function (_a) {
|
|
661
|
-
var testID = _a.testID, bgAsset = _a.bgAsset, focalAsset1 = _a.focalAsset1, focalAsset2 = _a.focalAsset2, focalAsset3 = _a.focalAsset3;
|
|
662
|
-
var ref = React.useRef(null);
|
|
663
|
-
var isInView = framerMotion.useInView(ref);
|
|
664
|
-
console.log('isInView', isInView);
|
|
665
|
-
// Animation data.
|
|
666
|
-
var assetsInitial = { opacity: 0.001, rotate: 0, scale: 1, x: 200, y: 0 };
|
|
667
|
-
var assetsAnimate = {
|
|
668
|
-
opacity: 1,
|
|
669
|
-
rotate: 0,
|
|
670
|
-
rotateX: 0,
|
|
671
|
-
rotateY: 0,
|
|
672
|
-
scale: 1,
|
|
673
|
-
transition: { damping: 60, delay: 0, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
674
|
-
x: 0,
|
|
675
|
-
y: 0,
|
|
676
|
-
};
|
|
677
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || 'AnimationSet1', className: cx("relative w-full h-full"), children: [bgAsset && (jsxRuntime.jsx(framerMotion.motion.div, { className: "absolute left-1/2 top-1/2 w-full h-full", initial: {
|
|
678
|
-
opacity: 0.001,
|
|
679
|
-
rotate: 0,
|
|
680
|
-
scale: 0.5,
|
|
681
|
-
x: 0,
|
|
682
|
-
y: 0,
|
|
683
|
-
perspective: '1200px',
|
|
684
|
-
translateX: '-50%',
|
|
685
|
-
translateY: '-50%',
|
|
686
|
-
}, animate: {
|
|
687
|
-
opacity: 0.5,
|
|
688
|
-
rotate: 0,
|
|
689
|
-
rotateX: 0,
|
|
690
|
-
rotateY: 0,
|
|
691
|
-
scale: 1.25,
|
|
692
|
-
transition: { damping: 60, delay: 0.7, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
693
|
-
perspective: '1200px',
|
|
694
|
-
translateX: '-50%',
|
|
695
|
-
translateY: '-50%',
|
|
696
|
-
x: 0,
|
|
697
|
-
y: 0,
|
|
698
|
-
}, transition: { duration: 0.5 }, children: jsxRuntime.jsx(Image, { src: bgAsset.src, alt: bgAsset.alt, fill: true }) })), (focalAsset1 || focalAsset2) && (jsxRuntime.jsxs(framerMotion.motion.div, { className: "absolute right-0 top-1/2 z-10 overflow-visible w-3/4 aspect-[0.78/1]", style: { transform: 'translateY(-50%)' }, children: [focalAsset1 && (jsxRuntime.jsx(framerMotion.motion.div, { className: "absolute w-1/2 aspect-[0.35/1] right-16 top-0", initial: assetsInitial, animate: assetsAnimate, children: jsxRuntime.jsx(Image, { src: focalAsset1.src, alt: focalAsset1.alt, fill: true }) })), focalAsset2 && (jsxRuntime.jsx(framerMotion.motion.div, { className: "absolute w-1/2 aspect-[0.5/1] left-0 top-20", initial: assetsInitial, animate: __assign(__assign({}, assetsAnimate), { transition: __assign(__assign({}, assetsAnimate.transition), { delay: 0.3 }) }), children: jsxRuntime.jsx(Image, { src: focalAsset2.src, alt: focalAsset2.alt, fill: true }) }))] })), focalAsset3 && (jsxRuntime.jsx("div", { className: "absolute w-1/4 aspect-[0.5/1] flex flex-col flex-nowrap p-0 top-10 z-20 items-end justify-end left-10", children: jsxRuntime.jsx(framerMotion.motion.div, { className: "relative w-full overflow-visible aspect-[1.2/1]", initial: { opacity: 0.001, rotate: 0, scale: 1, x: 100, y: 0 }, animate: {
|
|
699
|
-
opacity: 1,
|
|
700
|
-
rotate: 0,
|
|
701
|
-
rotateX: 0,
|
|
702
|
-
rotateY: 0,
|
|
703
|
-
scale: 1,
|
|
704
|
-
transition: { damping: 60, delay: 0.6, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
705
|
-
x: 0,
|
|
706
|
-
y: 0,
|
|
707
|
-
}, children: jsxRuntime.jsx(Image, { src: focalAsset3.src, fill: true, alt: focalAsset3.alt }) }) }))] }));
|
|
708
|
-
};
|
|
709
|
-
AnimationSet1.displayName = 'AnimationSet1';
|
|
710
|
-
|
|
711
|
-
var Tabs = function (_a) {
|
|
712
|
-
var data = _a.data;
|
|
713
|
-
var _b = React.useState(0), activeTab = _b[0], setActiveTab = _b[1];
|
|
714
|
-
if (!data) {
|
|
715
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
716
|
-
}
|
|
717
|
-
return (jsxRuntime.jsx("div", { "data-testid": "Tabs", children: jsxRuntime.jsxs(reactTabs.Tabs, { onSelect: function (index) { return setActiveTab(index); }, children: [jsxRuntime.jsx(reactTabs.TabList, { className: "mb-8 flex p-0", children: data.map(function (tab, index) {
|
|
718
|
-
return (jsxRuntime.jsx(reactTabs.Tab, { className: cx('list-none rel ative cursor-pointer inline-block flex-1 items-center justify-center p-4', {
|
|
719
|
-
'border-transparent border-solid border-0 border-b-2': activeTab !== index,
|
|
720
|
-
'border-primary border-solid border-0 border-b-2': activeTab === index,
|
|
721
|
-
}), children: jsxRuntime.jsx(Copy, { className: "m-0 text-center", children: tab.title }) }, index));
|
|
722
|
-
}) }), data.map(function (tab, index) { return (jsxRuntime.jsx(reactTabs.TabPanel, { className: "", children: tab.content }, index)); })] }) }));
|
|
723
|
-
};
|
|
724
|
-
Tabs.displayName = 'Tabs';
|
|
725
|
-
|
|
726
|
-
var socialLoginUrlGoogle = "".concat(process.env.AWS_COGNITO_USERPOOL_DOMAIN, "/oauth2/authorize?client_id=").concat(process.env.AWS_COGNITO_CLIENT_ID, "&response_type=code&scope=aws.cognito.signin.user.admin+email+openid+profile&identity_provider=Google&redirect_uri=").concat(process.env.AWS_COGNITO_REDIRECT_URI);
|
|
727
|
-
var socialLoginUrlApple = "".concat(process.env.AWS_COGNITO_USERPOOL_DOMAIN, "/oauth2/authorize?client_id=").concat(process.env.AWS_COGNITO_CLIENT_ID, "&response_type=CODE&scope=aws.cognito.signin.user.admin+email+openid+profile&identity_provider=SignInWithApple&redirect_uri=").concat(process.env.AWS_COGNITO_REDIRECT_URI);
|
|
728
|
-
|
|
729
|
-
var validEmail = {
|
|
730
|
-
required: 'Email required',
|
|
731
|
-
pattern: {
|
|
732
|
-
value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
|
|
733
|
-
message: 'Invalid email address',
|
|
734
|
-
},
|
|
735
|
-
};
|
|
736
|
-
var validPassword = {
|
|
737
|
-
required: 'You must specify a password',
|
|
738
|
-
minLength: {
|
|
739
|
-
value: 8,
|
|
740
|
-
message: 'Password must have at least 8 characters',
|
|
741
|
-
},
|
|
742
|
-
pattern: {
|
|
743
|
-
value: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/,
|
|
744
|
-
message: 'Password must contain contain at least one number, one uppercase letter, one lowercase letter, and one special character.',
|
|
745
|
-
},
|
|
746
|
-
};
|
|
747
|
-
|
|
748
|
-
var Form = function (_a) {
|
|
749
|
-
var children = _a.children, className = _a.className, submit = _a.submit, _b = _a.onSubmit, onSubmit = _b === void 0 ? function () { } : _b, onChange = _a.onChange, hideSubmit = _a.hideSubmit, ariaSubmitLabel = _a.ariaSubmitLabel, submitID = _a.submitID, _c = _a.submitVariant, submitVariant = _c === void 0 ? exports.BTN_VARIANTS.PRIMARY : _c, _d = _a.initialValues, initialValues = _d === void 0 ? {} : _d, _e = _a.isBoxed, isBoxed = _e === void 0 ? false : _e, _f = _a.submitType, submitType = _f === void 0 ? exports.BTN_TYPES.SUBMIT : _f, _g = _a.disabledSubmitWithReturn, disabledSubmitWithReturn = _g === void 0 ? false : _g, _h = _a.isDisabled, isDisabled = _h === void 0 ? false : _h;
|
|
750
|
-
var methods = reactHookForm.useForm({
|
|
751
|
-
defaultValues: initialValues,
|
|
752
|
-
mode: 'onBlur',
|
|
753
|
-
reValidateMode: 'onChange',
|
|
754
|
-
});
|
|
755
|
-
React.useEffect(function () {
|
|
756
|
-
if (onChange && typeof onChange === 'function') {
|
|
757
|
-
var subscription_1 = methods.watch(function (value, event) {
|
|
758
|
-
onChange(value, event);
|
|
759
|
-
});
|
|
760
|
-
return function () { return subscription_1.unsubscribe(); };
|
|
761
|
-
}
|
|
762
|
-
}, []);
|
|
763
|
-
var submitClasses = cx({ 'sr-only': hideSubmit });
|
|
764
|
-
var _j = methods.formState, isSubmitting = _j.isSubmitting, isDirty = _j.isDirty, isValid = _j.isValid;
|
|
765
|
-
return (jsxRuntime.jsx(reactHookForm.FormProvider, __assign({}, methods, { children: jsxRuntime.jsx("div", { "data-testid": "Form", className: cx('w-full max-w-s @containers @form'), children: jsxRuntime.jsxs("form", { onSubmit: methods.handleSubmit(onSubmit), onKeyDown: function (event) {
|
|
766
|
-
if (disabledSubmitWithReturn && event.key === 'Enter') {
|
|
767
|
-
event.preventDefault();
|
|
768
|
-
}
|
|
769
|
-
}, className: cx('w-2xs relative', { 'form px-8 pt-6 pb-8 ': isBoxed }, { 'opacity-50': isSubmitting }, className), children: [children, submit && (jsxRuntime.jsx("div", { className: "flex items-center justify-end", children: jsxRuntime.jsx(Button, { id: submitID || submit, className: submitClasses, ariaLabel: ariaSubmitLabel || submit || 'Submit', type: submitType, outline: true, isLoading: isSubmitting, disabled: isSubmitting || !isValid || !isDirty || isDisabled, variant: submitVariant, children: submit }) }))] }) }) })));
|
|
770
|
-
};
|
|
771
|
-
Form.displayName = 'Form';
|
|
772
|
-
|
|
773
|
-
exports.FIELD_TYPES = void 0;
|
|
774
|
-
(function (FIELD_TYPES) {
|
|
775
|
-
FIELD_TYPES["TEXT"] = "text";
|
|
776
|
-
FIELD_TYPES["TEXTAREA"] = "textarea";
|
|
777
|
-
FIELD_TYPES["SELECT"] = "select";
|
|
778
|
-
FIELD_TYPES["CHECKBOX"] = "checkbox";
|
|
779
|
-
FIELD_TYPES["RADIO"] = "radio";
|
|
780
|
-
FIELD_TYPES["SWITCH"] = "switch";
|
|
781
|
-
FIELD_TYPES["DATE"] = "date";
|
|
782
|
-
FIELD_TYPES["TIME"] = "time";
|
|
783
|
-
FIELD_TYPES["DATETIME"] = "datetime";
|
|
784
|
-
FIELD_TYPES["FILE"] = "file";
|
|
785
|
-
FIELD_TYPES["PASSWORD"] = "password";
|
|
786
|
-
FIELD_TYPES["EMAIL"] = "email";
|
|
787
|
-
FIELD_TYPES["NUMBER"] = "number";
|
|
788
|
-
FIELD_TYPES["TEL"] = "tel";
|
|
789
|
-
FIELD_TYPES["URL"] = "url";
|
|
790
|
-
FIELD_TYPES["SEARCH"] = "search";
|
|
791
|
-
FIELD_TYPES["HIDDEN"] = "hidden";
|
|
792
|
-
// MONTH = 'month',
|
|
793
|
-
// WEEK = 'week',
|
|
794
|
-
// HIDDEN = 'hidden',
|
|
795
|
-
// COLOR = 'color',
|
|
796
|
-
// RANGE = 'range',
|
|
797
|
-
// CURRENCY = 'currency',
|
|
798
|
-
// PERCENT = 'percent',
|
|
799
|
-
})(exports.FIELD_TYPES || (exports.FIELD_TYPES = {}));
|
|
800
|
-
|
|
801
|
-
var FormSelect = React.forwardRef(function MyInput(_a, ref) {
|
|
802
|
-
var id = _a.id, name = _a.name, options = _a.options, required = _a.required, className = _a.className, disabled = _a.disabled, rest = __rest(_a, ["id", "name", "options", "required", "className", "disabled"]);
|
|
803
|
-
if (!options) {
|
|
804
|
-
throw new Error('FormSelect requires options prop');
|
|
805
|
-
}
|
|
806
|
-
return (jsxRuntime.jsx("div", { id: id, className: cx('pb-2 min-w-20', className), children: jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx("select", __assign({ ref: ref,
|
|
807
|
-
// id={id}
|
|
808
|
-
name: name, disabled: disabled, required: required, className: "form-item text-input" }, rest, { children: options.map(function (option, index) {
|
|
809
|
-
var _a, _b;
|
|
810
|
-
return (jsxRuntime.jsx("option", { value: (_a = option === null || option === void 0 ? void 0 : option.value) === null || _a === void 0 ? void 0 : _a.toString(), disabled: option.disabled, className: "bg-body-background dark:bg-dark-body-background", children: option.label }, "".concat((_b = option === null || option === void 0 ? void 0 : option.value) === null || _b === void 0 ? void 0 : _b.toString(), "--").concat(index)));
|
|
811
|
-
}) })), jsxRuntime.jsx("div", { className: "form-icon absolute inset-0 z-10 pointer-events-none h-full w-12 items-center justify-center top-0 right-0 left-auto flex", children: jsxRuntime.jsx(Icon, { name: "mdi:chevron-down", size: 24, className: "pointer-events-none" }) })] }) }));
|
|
812
|
-
});
|
|
813
|
-
FormSelect.displayName = 'FormSelect';
|
|
814
|
-
|
|
815
|
-
var FormField = function (_a) {
|
|
816
|
-
var _b, _c;
|
|
817
|
-
var name = _a.name, type = _a.type, label = _a.label, required = _a.required, className = _a.className, icon = _a.icon, options = _a.options, disabled = _a.disabled, description = _a.description, showPasswordLabel = _a.showPasswordLabel, hidePasswordLabel = _a.hidePasswordLabel, _d = _a.validations, validations = _d === void 0 ? {} : _d, _e = _a.fileUploadCallback, fileUploadCallback = _e === void 0 ? function () { } : _e, autoComplete = _a.autoComplete;
|
|
818
|
-
var _f = React.useState(false), passwordShowStatus = _f[0], setPasswordShow = _f[1];
|
|
819
|
-
var _g = reactHookForm.useFormContext(), control = _g.control, formState = _g.formState;
|
|
820
|
-
var errors = formState.errors;
|
|
821
|
-
var renderType = function (type, field) {
|
|
822
|
-
switch (type) {
|
|
823
|
-
case exports.FIELD_TYPES.HIDDEN:
|
|
824
|
-
return jsxRuntime.jsx("input", __assign({ type: InputType.HIDDEN, disabled: disabled }, field));
|
|
825
|
-
case exports.FIELD_TYPES.TEXT:
|
|
826
|
-
return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.TEXT, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled, autoComplete: autoComplete }, field)));
|
|
827
|
-
case exports.FIELD_TYPES.PASSWORD: {
|
|
828
|
-
var toggleType = passwordShowStatus ? InputType.TEXT : InputType.PASSWORD;
|
|
829
|
-
var btnClass = 'appearance-none border-none bg-transparent flex items-center';
|
|
830
|
-
return (jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx("span", { className: "absolute right-0 top-0 flex items-center justify-center h-full z-10 pr-2", onClick: function () { return setPasswordShow(function (pS) { return !pS; }); }, role: "button", tabIndex: 0, children: passwordShowStatus ? (jsxRuntime.jsx("button", { type: "button", "aria-label": hidePasswordLabel, className: cx(btnClass, 'form-icon'), children: jsxRuntime.jsx(Icon, { name: "mdi:eye-off", size: 24 }) })) : (jsxRuntime.jsx("button", { type: "button", "aria-label": showPasswordLabel, className: cx(btnClass, 'form-icon'), children: jsxRuntime.jsx(Icon, { name: "mdi:eye", size: 24 }) })) }), jsxRuntime.jsx(TextInput, __assign({ type: toggleType, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled, autoComplete: autoComplete }, field))] }));
|
|
831
|
-
}
|
|
832
|
-
case exports.FIELD_TYPES.TEXTAREA:
|
|
833
|
-
return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.TEXTAREA, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled }, field)));
|
|
834
|
-
case exports.FIELD_TYPES.EMAIL:
|
|
835
|
-
return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.EMAIL, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled, autoComplete: autoComplete }, field)));
|
|
836
|
-
case exports.FIELD_TYPES.DATE:
|
|
837
|
-
return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.DATE, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled }, field)));
|
|
838
|
-
case exports.FIELD_TYPES.DATETIME:
|
|
839
|
-
return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.DATETIME, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled }, field)));
|
|
840
|
-
case exports.FIELD_TYPES.NUMBER:
|
|
841
|
-
return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.NUMBER, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled }, field)));
|
|
842
|
-
case exports.FIELD_TYPES.CHECKBOX:
|
|
843
|
-
return (jsxRuntime.jsx(Checkbox, __assign({ required: required || Boolean(validations.required), id: name, className: className, label: label, disabled: disabled }, field)));
|
|
844
|
-
case exports.FIELD_TYPES.RADIO:
|
|
845
|
-
return (jsxRuntime.jsx(Radio, __assign({ required: required || Boolean(validations.required), id: name, className: className, options: options, disabled: disabled }, field)));
|
|
846
|
-
case exports.FIELD_TYPES.SWITCH:
|
|
847
|
-
return (jsxRuntime.jsx(Switch, __assign({ id: name, required: required || Boolean(validations.required), className: className, disabled: disabled }, field)));
|
|
848
|
-
case exports.FIELD_TYPES.SELECT:
|
|
849
|
-
return (jsxRuntime.jsx(FormSelect, __assign({ required: required || Boolean(validations.required), id: name, className: className, disabled: disabled, label: label, options: options }, field)));
|
|
850
|
-
case exports.FIELD_TYPES.FILE:
|
|
851
|
-
return (jsxRuntime.jsx(FileUpload, __assign({ required: required || Boolean(validations.required), id: name, className: className, disabled: disabled, onChangeCallback: function (event) {
|
|
852
|
-
fileUploadCallback(event);
|
|
853
|
-
} }, field)));
|
|
854
|
-
default:
|
|
855
|
-
return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.TEXT, required: required || Boolean(validations.required), disabled: disabled, icon: icon, className: className }, field)));
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
// TODO: HELPER CLASSES : data-[invalid=true]:bg-error data-[valid]:bg-success
|
|
859
|
-
var showLabel = label && type !== exports.FIELD_TYPES.CHECKBOX;
|
|
860
|
-
var labelWithAsterisk = required || Boolean(validations.required) ? "".concat(label, " *") : label;
|
|
861
|
-
return (jsxRuntime.jsx("div", { className: "relative", children: jsxRuntime.jsxs("div", { "data-testid": "FormField", className: "mb-4", children: [showLabel && (jsxRuntime.jsx("div", { className: "flex items-baseline justify-between", children: jsxRuntime.jsx(Label, { id: name, children: labelWithAsterisk }) })), jsxRuntime.jsx("div", { className: "mb-1", children: jsxRuntime.jsx(reactHookForm.Controller
|
|
862
|
-
// https://stackoverflow.com/questions/47012169/a-component-is-changing-an-uncontrolled-input-of-type-text-to-be-controlled-erro
|
|
863
|
-
, {
|
|
864
|
-
// https://stackoverflow.com/questions/47012169/a-component-is-changing-an-uncontrolled-input-of-type-text-to-be-controlled-erro
|
|
865
|
-
defaultValue: '', name: name, control: control, rules: validations, render: function (_a) {
|
|
866
|
-
var field = _a.field;
|
|
867
|
-
return renderType(type, field);
|
|
868
|
-
} }) }), description && (jsxRuntime.jsx("div", { className: "formfield-description", children: jsxRuntime.jsx(Copy, { size: exports.COPY_SIZE.SMALL, className: "mb-0", children: description }) })), errors[name] && (jsxRuntime.jsx("div", { className: "formfield-error text-error italic", children: jsxRuntime.jsx(Copy, { size: exports.COPY_SIZE.SMALL, className: "mb-0", children: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors[name]) === null || _b === void 0 ? void 0 : _b.message) === null || _c === void 0 ? void 0 : _c.toString() }) }))] }) }));
|
|
869
|
-
};
|
|
870
|
-
FormField.displayName = 'FormField';
|
|
871
|
-
|
|
872
|
-
var LoginForm = function (_a) {
|
|
873
|
-
var handleSubmit = _a.handleSubmit, initialValues = _a.initialValues, _b = _a.showSocialButtons, showSocialButtons = _b === void 0 ? false : _b;
|
|
874
|
-
return (jsxRuntime.jsxs("div", { "data-testid": "LoginForm", className: "form-wrapper", children: [jsxRuntime.jsxs(Form, { onSubmit: handleSubmit, submit: en.FORMS.LOGIN_FORM.SUBMIT, disabledSubmitWithReturn: true, initialValues: initialValues, children: [jsxRuntime.jsx(FormField, { name: "email", type: exports.FIELD_TYPES.EMAIL, label: en.FORMS.LOGIN_FORM.EMAIL, required: true, validations: validEmail, autoComplete: "email" }), jsxRuntime.jsx(FormField, { name: "password", type: exports.FIELD_TYPES.PASSWORD, label: en.FORMS.LOGIN_FORM.PASSWORD, required: true, autoComplete: "current-password" })] }), showSocialButtons && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Hr, {}), jsxRuntime.jsx("div", { className: "flex flex-col gap-4 items-center", children: jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 max-w-[250px]", children: [jsxRuntime.jsx(Button, { onClick: function () { return window.location.assign(socialLoginUrlGoogle); }, variant: exports.BTN_VARIANTS.PRIMARY, iconFirst: true, icon: "mdi:google", children: en.UI.LOGIN_WITH_GOOGLE }), jsxRuntime.jsx(Button, { onClick: function () { return window.location.assign(socialLoginUrlApple); }, variant: exports.BTN_VARIANTS.PRIMARY, iconFirst: true, icon: "mdi:apple", children: en.UI.LOGIN_WITH_APPLE })] }) })] }))] }));
|
|
875
|
-
};
|
|
876
|
-
LoginForm.displayName = 'LoginForm';
|
|
877
|
-
|
|
878
|
-
var RegisterForm = function (_a) {
|
|
879
|
-
var handleSubmit = _a.handleSubmit, _b = _a.showSocialButtons, showSocialButtons = _b === void 0 ? false : _b;
|
|
880
|
-
return (jsxRuntime.jsxs("div", { "data-testid": "RegisterForm", className: "form-wrapper", children: [jsxRuntime.jsxs(Form, { onSubmit: handleSubmit, submit: en.FORMS.REGISTER_FORM.SUBMIT, disabledSubmitWithReturn: true, children: [jsxRuntime.jsx(FormField, { name: "email", type: exports.FIELD_TYPES.EMAIL, label: en.FORMS.REGISTER_FORM.EMAIL, required: true, validations: validEmail, autoComplete: "email" }), jsxRuntime.jsx(FormField, { name: "password", type: exports.FIELD_TYPES.PASSWORD, label: en.FORMS.REGISTER_FORM.PASSWORD, required: true, description: en.FORMS.REGISTER_FORM.PASSWORD_DESCRIPTION, validations: validPassword, autoComplete: "new-password" })] }), showSocialButtons && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Hr, {}), jsxRuntime.jsx("div", { className: "flex flex-col gap-4 items-center", children: jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 max-w-[250px]", children: [jsxRuntime.jsx(Button, { onClick: function () { return window.location.assign(socialLoginUrlGoogle); }, variant: exports.BTN_VARIANTS.PRIMARY, iconFirst: true, icon: "mdi:google", children: en.UI.SIGNUP_WITH_GOOGLE }), jsxRuntime.jsx(Button, { onClick: function () { return window.location.assign(socialLoginUrlApple); }, variant: exports.BTN_VARIANTS.PRIMARY, iconFirst: true, icon: "mdi:apple", children: en.UI.SIGNUP_WITH_APPLE })] }) })] }))] }));
|
|
881
|
-
};
|
|
882
|
-
RegisterForm.displayName = 'RegisterForm';
|
|
883
|
-
|
|
884
|
-
var ForgotPasswordForm = function (_a) {
|
|
885
|
-
var handleSubmit = _a.handleSubmit;
|
|
886
|
-
return (jsxRuntime.jsx("div", { "data-testid": "ForgotPasswordForm", className: "form-wrapper", children: jsxRuntime.jsx(Form, { onSubmit: handleSubmit, submit: en.FORMS.FORGOT_PASSWORD_FORM.SUBMIT, disabledSubmitWithReturn: true, children: jsxRuntime.jsx(FormField, { name: "email", type: exports.FIELD_TYPES.EMAIL, label: en.FORMS.FORGOT_PASSWORD_FORM.EMAIL, required: true, validations: validEmail }) }) }));
|
|
887
|
-
};
|
|
888
|
-
ForgotPasswordForm.displayName = 'ForgotPasswordForm';
|
|
889
|
-
|
|
890
|
-
var Authenticator = function (_a) {
|
|
891
|
-
var loginSubmit = _a.loginSubmit, registerSubmit = _a.registerSubmit, passwordForgotSubmit = _a.passwordForgotSubmit, handleTokenCallback = _a.handleTokenCallback, _b = _a.showSocialLogin, showSocialLogin = _b === void 0 ? false : _b;
|
|
892
|
-
var _c = React.useState(false), showForgotPassword = _c[0], setShowForgotPassword = _c[1];
|
|
893
|
-
// TODO: Move this up into AuthProvider Component.
|
|
894
|
-
React.useEffect(function () {
|
|
895
|
-
console.log('Authenticator useEffect', process.env);
|
|
896
|
-
function fetchToken() {
|
|
897
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
898
|
-
var searchParams, code, url, params, response, data;
|
|
899
|
-
return __generator(this, function (_a) {
|
|
900
|
-
switch (_a.label) {
|
|
901
|
-
case 0:
|
|
902
|
-
// Only run this code if the environment variables are set
|
|
903
|
-
if (!process.env.AWS_COGNITO_USERPOOL_DOMAIN ||
|
|
904
|
-
!process.env.AWS_COGNITO_CLIENT_ID ||
|
|
905
|
-
!process.env.AWS_COGNITO_REDIRECT_URI)
|
|
906
|
-
return [2 /*return*/];
|
|
907
|
-
searchParams = new URLSearchParams(window.location.search);
|
|
908
|
-
code = searchParams.get('code');
|
|
909
|
-
if (!code) return [3 /*break*/, 3];
|
|
910
|
-
url = "".concat(process.env.AWS_COGNITO_USERPOOL_DOMAIN, "/oauth2/token");
|
|
911
|
-
params = new URLSearchParams();
|
|
912
|
-
params.append('grant_type', 'authorization_code');
|
|
913
|
-
params.append('client_id', process.env.AWS_COGNITO_CLIENT_ID);
|
|
914
|
-
params.append('code', code);
|
|
915
|
-
params.append('redirect_uri', process.env.AWS_COGNITO_REDIRECT_URI);
|
|
916
|
-
return [4 /*yield*/, fetch(url, {
|
|
917
|
-
method: 'POST',
|
|
918
|
-
headers: {
|
|
919
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
920
|
-
},
|
|
921
|
-
body: params,
|
|
922
|
-
})];
|
|
923
|
-
case 1:
|
|
924
|
-
response = _a.sent();
|
|
925
|
-
return [4 /*yield*/, response.json()];
|
|
926
|
-
case 2:
|
|
927
|
-
data = _a.sent();
|
|
928
|
-
if (data) {
|
|
929
|
-
if (handleTokenCallback && typeof handleTokenCallback === 'function') {
|
|
930
|
-
handleTokenCallback(data);
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
_a.label = 3;
|
|
934
|
-
case 3: return [2 /*return*/];
|
|
935
|
-
}
|
|
936
|
-
});
|
|
937
|
-
});
|
|
938
|
-
}
|
|
939
|
-
fetchToken();
|
|
940
|
-
}, []);
|
|
941
|
-
return (jsxRuntime.jsxs("div", { "data-testid": "Authenticator", className: "w-full", children: [!showForgotPassword && (jsxRuntime.jsx(Tabs, { data: [
|
|
942
|
-
{
|
|
943
|
-
title: 'Login',
|
|
944
|
-
content: (jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [jsxRuntime.jsx(LoginForm, { handleSubmit: loginSubmit, showSocialButtons: showSocialLogin }), jsxRuntime.jsx("div", { className: "mt-4", children: jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.LINK, onClick: function () { return setShowForgotPassword(!showForgotPassword); }, children: showForgotPassword ? 'Back to Login' : 'Forgot Password?' }) })] })),
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
title: 'Register',
|
|
948
|
-
content: jsxRuntime.jsx(RegisterForm, { handleSubmit: registerSubmit, showSocialButtons: showSocialLogin }),
|
|
949
|
-
},
|
|
950
|
-
] })), showForgotPassword && (jsxRuntime.jsx(Tabs, { data: [
|
|
951
|
-
{
|
|
952
|
-
title: 'Forgot Password',
|
|
953
|
-
content: (jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [jsxRuntime.jsx(ForgotPasswordForm, { handleSubmit: passwordForgotSubmit }), jsxRuntime.jsx("div", { className: "mt-4", children: jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.LINK, onClick: function () { return setShowForgotPassword(!showForgotPassword); }, children: showForgotPassword ? 'Back to Login' : 'Forgot Password?' }) })] })),
|
|
954
|
-
},
|
|
955
|
-
] }))] }));
|
|
956
|
-
};
|
|
957
|
-
Authenticator.displayName = 'Authenticator';
|
|
958
|
-
|
|
959
|
-
var cardWrapperClasses = 'relative rounded-lg overflow-hidden transition duration-300 ease-in-out cursor-pointer hover:scale-105 shadow hover:shadow-lg bg-white text-black hover:bg-primary hover:text-body-text-inverted';
|
|
960
|
-
|
|
961
|
-
var CardBasic = function (_a) {
|
|
962
|
-
var id = _a.id, title = _a.title, description = _a.description, image = _a.image, className = _a.className, metaData = _a.metaData, actions = _a.actions, padded = _a.padded, scaleOnHover = _a.scaleOnHover, _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b;
|
|
963
|
-
return (jsxRuntime.jsxs("div", { id: id, "data-testid": "CardBasic", className: tailwindMerge.twMerge(cx(cardWrapperClasses, { 'p-8': padded }, { 'hover:scale-100': !scaleOnHover }, className)), onClick: onClick, children: [image && (jsxRuntime.jsx("div", { className: tailwindMerge.twMerge(cx('relative w-full overflow-hidden aspect-[16/9]', { rounded: padded }, image.aspectRatio)), children: jsxRuntime.jsx(Image, { fill: true, src: image === null || image === void 0 ? void 0 : image.src, sizes: "100vh", alt: image === null || image === void 0 ? void 0 : image.alt, className: "absolute inset-0 object-cover" }) })), jsxRuntime.jsx("div", { className: "w-full flex flex-col gap-1", children: jsxRuntime.jsxs("div", { className: cx({ 'p-3': !padded }, { 'pt-3': padded }), children: [jsxRuntime.jsx("div", { children: title && (jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H4, singleLine: true, children: title })) }), jsxRuntime.jsx("div", { children: description && jsxRuntime.jsx(Copy, { className: "mb-0", children: description }) }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [metaData && (jsxRuntime.jsx("div", { className: "flex shrink-0 mt-2", children: metaData.map(function (meta, index) {
|
|
964
|
-
if (index === 0) {
|
|
965
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: [meta, "\u00A0\u00B7"] }, meta));
|
|
966
|
-
}
|
|
967
|
-
if (index === metaData.length - 1) {
|
|
968
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: ["\u00A0", meta] }, meta));
|
|
969
|
-
}
|
|
970
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: ["\u00A0", meta, "\u00A0\u00B7"] }, meta));
|
|
971
|
-
}) })), actions && (jsxRuntime.jsxs("div", { className: "flex items-center gap-1 flex-wrap", children: [actions.like && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.like.isActive ? 'mdi:like' : 'mdi:like-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
972
|
-
var _a;
|
|
973
|
-
event.stopPropagation();
|
|
974
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.like) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.like.onClick === 'function') {
|
|
975
|
-
actions.like.onClick({ id: id });
|
|
976
|
-
}
|
|
977
|
-
} })), actions.share && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.share.isActive ? 'mdi:share' : 'mdi:share-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
978
|
-
var _a;
|
|
979
|
-
event.stopPropagation();
|
|
980
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.share) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.share.onClick === 'function') {
|
|
981
|
-
actions.share.onClick({ id: id });
|
|
982
|
-
}
|
|
983
|
-
} })), actions.save && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.save.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
984
|
-
var _a;
|
|
985
|
-
event.stopPropagation();
|
|
986
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.save) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.save.onClick === 'function') {
|
|
987
|
-
actions.save.onClick({ id: id });
|
|
988
|
-
}
|
|
989
|
-
} })), actions.comment && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.comment.isActive ? 'mdi:comment' : 'mdi:comment-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
990
|
-
var _a;
|
|
991
|
-
event.stopPropagation();
|
|
992
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.comment) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.comment.onClick === 'function') {
|
|
993
|
-
actions.comment.onClick({ id: id });
|
|
994
|
-
}
|
|
995
|
-
} })), actions.bookmark && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.bookmark.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
996
|
-
var _a;
|
|
997
|
-
event.stopPropagation();
|
|
998
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.bookmark) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.bookmark.onClick === 'function') {
|
|
999
|
-
actions.bookmark.onClick({ id: id });
|
|
1000
|
-
}
|
|
1001
|
-
} })), actions.report && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.report.isActive ? 'mdi:flag' : 'mdi:flag-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1002
|
-
var _a;
|
|
1003
|
-
event.stopPropagation();
|
|
1004
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.report) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.report.onClick === 'function') {
|
|
1005
|
-
actions.report.onClick({ id: id });
|
|
1006
|
-
}
|
|
1007
|
-
} })), actions.follow && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.follow.isActive ? 'mdi:account-plus' : 'mdi:account-plus-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1008
|
-
var _a;
|
|
1009
|
-
event.stopPropagation();
|
|
1010
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.follow) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.follow.onClick === 'function') {
|
|
1011
|
-
actions.follow.onClick({ id: id });
|
|
1012
|
-
}
|
|
1013
|
-
} })), actions.download && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.download.isActive ? 'mdi:download' : 'mdi:download-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1014
|
-
var _a;
|
|
1015
|
-
event.stopPropagation();
|
|
1016
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.download) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.download.onClick === 'function') {
|
|
1017
|
-
actions.download.onClick({ id: id });
|
|
1018
|
-
}
|
|
1019
|
-
} })), actions.edit && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.edit.isActive ? 'mdi:pencil' : 'mdi:pencil-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1020
|
-
var _a;
|
|
1021
|
-
event.stopPropagation();
|
|
1022
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.edit) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.edit.onClick === 'function') {
|
|
1023
|
-
actions.edit.onClick({ id: id });
|
|
1024
|
-
}
|
|
1025
|
-
} })), actions.delete && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.delete.isActive ? 'mdi:delete' : 'mdi:delete-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1026
|
-
var _a;
|
|
1027
|
-
event.stopPropagation();
|
|
1028
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.delete) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.delete.onClick === 'function') {
|
|
1029
|
-
actions.delete.onClick({ id: id });
|
|
1030
|
-
}
|
|
1031
|
-
} }))] }))] })] }) })] }));
|
|
1032
|
-
};
|
|
1033
|
-
CardBasic.displayName = 'CardBasic';
|
|
1034
|
-
|
|
1035
|
-
var CardMedia = function (_a) {
|
|
1036
|
-
var id = _a.id, title = _a.title, description = _a.description, image = _a.image, className = _a.className, metaData = _a.metaData, actions = _a.actions, _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b, playCallback = _a.playCallback;
|
|
1037
|
-
return (jsxRuntime.jsxs("div", { id: id, "data-testid": "CardBasic", className: cx(cardWrapperClasses, className), onClick: onClick, children: [image && (jsxRuntime.jsxs("div", { className: cx('relative w-full overflow-hidden aspect-[16/9]', image.aspectRatio), children: [jsxRuntime.jsx(Image, { fill: true, src: image === null || image === void 0 ? void 0 : image.src, sizes: "100vh", alt: image === null || image === void 0 ? void 0 : image.alt, className: "absolute inset-0 object-cover" }), playCallback && (jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: "mdi:play", size: exports.BTN_SIZES.LARGE, onClick: function (event) {
|
|
1038
|
-
event.stopPropagation();
|
|
1039
|
-
if (typeof playCallback === 'function') {
|
|
1040
|
-
playCallback(event);
|
|
1041
|
-
}
|
|
1042
|
-
} }) }))] })), jsxRuntime.jsx("div", { className: "w-full flex flex-col gap-1", children: jsxRuntime.jsxs("div", { className: "p-3", children: [jsxRuntime.jsx("div", { children: title && (jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H5, singleLine: true, flush: true, children: title })) }), jsxRuntime.jsx("div", { children: description && jsxRuntime.jsx(Copy, { children: description }) }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [metaData && (jsxRuntime.jsx("div", { className: "flex shrink-0", children: metaData.map(function (meta, index) {
|
|
1043
|
-
if (index === 0) {
|
|
1044
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: [meta, "\u00A0\u00B7"] }, meta));
|
|
1045
|
-
}
|
|
1046
|
-
if (index === metaData.length - 1) {
|
|
1047
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: ["\u00A0", meta] }, meta));
|
|
1048
|
-
}
|
|
1049
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: ["\u00A0", meta, "\u00A0\u00B7"] }, meta));
|
|
1050
|
-
}) })), actions && (jsxRuntime.jsxs("div", { className: "flex items-center gap-1 flex-wrap", children: [actions.like && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.like.isActive ? 'mdi:like' : 'mdi:like-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1051
|
-
var _a;
|
|
1052
|
-
event.stopPropagation();
|
|
1053
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.like) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.like.onClick === 'function') {
|
|
1054
|
-
actions.like.onClick({ id: id });
|
|
1055
|
-
}
|
|
1056
|
-
} })), actions.share && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.share.isActive ? 'mdi:share' : 'mdi:share-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1057
|
-
var _a;
|
|
1058
|
-
event.stopPropagation();
|
|
1059
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.share) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.share.onClick === 'function') {
|
|
1060
|
-
actions.share.onClick({ id: id });
|
|
1061
|
-
}
|
|
1062
|
-
} })), actions.save && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.save.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1063
|
-
var _a;
|
|
1064
|
-
event.stopPropagation();
|
|
1065
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.save) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.save.onClick === 'function') {
|
|
1066
|
-
actions.save.onClick({ id: id });
|
|
1067
|
-
}
|
|
1068
|
-
} })), actions.comment && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.comment.isActive ? 'mdi:comment' : 'mdi:comment-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1069
|
-
var _a;
|
|
1070
|
-
event.stopPropagation();
|
|
1071
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.comment) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.comment.onClick === 'function') {
|
|
1072
|
-
actions.comment.onClick({ id: id });
|
|
1073
|
-
}
|
|
1074
|
-
} })), actions.bookmark && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.bookmark.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1075
|
-
var _a;
|
|
1076
|
-
event.stopPropagation();
|
|
1077
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.bookmark) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.bookmark.onClick === 'function') {
|
|
1078
|
-
actions.bookmark.onClick({ id: id });
|
|
1079
|
-
}
|
|
1080
|
-
} })), actions.report && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.report.isActive ? 'mdi:flag' : 'mdi:flag-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1081
|
-
var _a;
|
|
1082
|
-
event.stopPropagation();
|
|
1083
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.report) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.report.onClick === 'function') {
|
|
1084
|
-
actions.report.onClick({ id: id });
|
|
1085
|
-
}
|
|
1086
|
-
} })), actions.follow && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.follow.isActive ? 'mdi:account-plus' : 'mdi:account-plus-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1087
|
-
var _a;
|
|
1088
|
-
event.stopPropagation();
|
|
1089
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.follow) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.follow.onClick === 'function') {
|
|
1090
|
-
actions.follow.onClick({ id: id });
|
|
1091
|
-
}
|
|
1092
|
-
} })), actions.download && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.download.isActive ? 'mdi:download' : 'mdi:download-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1093
|
-
var _a;
|
|
1094
|
-
event.stopPropagation();
|
|
1095
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.download) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.download.onClick === 'function') {
|
|
1096
|
-
actions.download.onClick({ id: id });
|
|
1097
|
-
}
|
|
1098
|
-
} })), actions.edit && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.edit.isActive ? 'mdi:pencil' : 'mdi:pencil-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1099
|
-
var _a;
|
|
1100
|
-
event.stopPropagation();
|
|
1101
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.edit) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.edit.onClick === 'function') {
|
|
1102
|
-
actions.edit.onClick({ id: id });
|
|
1103
|
-
}
|
|
1104
|
-
} })), actions.delete && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.delete.isActive ? 'mdi:delete' : 'mdi:delete-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1105
|
-
var _a;
|
|
1106
|
-
event.stopPropagation();
|
|
1107
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.delete) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.delete.onClick === 'function') {
|
|
1108
|
-
actions.delete.onClick({ id: id });
|
|
1109
|
-
}
|
|
1110
|
-
} }))] }))] })] }) })] }));
|
|
1111
|
-
};
|
|
1112
|
-
CardMedia.displayName = 'CardMedia';
|
|
1113
|
-
|
|
1114
|
-
var CardVideo = function (_a) {
|
|
1115
|
-
var video = _a.video, _b = _a.isMuted, isMuted = _b === void 0 ? true : _b, id = _a.id, title = _a.title, description = _a.description, image = _a.image, className = _a.className, metaData = _a.metaData, actions = _a.actions, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c;
|
|
1116
|
-
return (jsxRuntime.jsxs("div", { id: id, "data-testid": "CardVideo", className: cx(cardWrapperClasses, className), onClick: onClick, children: [image && video && (jsxRuntime.jsx("div", { className: cx('relative w-full h-full aspect-[16/9]', image.aspectRatio), children: jsxRuntime.jsx(HoverVideoPlayer, { videoId: "video--".concat(id), playbackStartDelay: 1000, videoSrc: jsxRuntime.jsx("source", { src: video, type: "video/mp4" }), videoClassName: cx('hls-hover-video w-full aspect-[16/9]', image.aspectRatio), sizingMode: "overlay", preload: "none", loop: false, muted: isMuted, className: cx('w-full overflow-hidden aspect-[16/9]', image.aspectRatio), pausedOverlay: jsxRuntime.jsx("div", { className: cx('relative w-full overflow-hidden aspect-[16/9]', image.aspectRatio), children: jsxRuntime.jsx(Image, { fill: true, src: image === null || image === void 0 ? void 0 : image.src, width: 0, height: 0,
|
|
1117
|
-
// sizes="100vh"
|
|
1118
|
-
alt: image === null || image === void 0 ? void 0 : image.alt, className: "absolute inset-0 object-cover" }) }), loadingOverlay: jsxRuntime.jsx("div", { className: cx('w-full flex items-center justify-center aspect-[16/9]', image.aspectRatio), children: jsxRuntime.jsx("div", { className: "", children: jsxRuntime.jsx(Loader, {}) }) }) }, "".concat(id, "--card")) })), jsxRuntime.jsx("div", { className: "w-full flex flex-col gap-1", children: jsxRuntime.jsxs("div", { className: "p-3", children: [jsxRuntime.jsx("div", { children: title && (jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H5, singleLine: true, flush: true, children: title })) }), jsxRuntime.jsx("div", { children: description && jsxRuntime.jsx(Copy, { children: description }) }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [metaData && (jsxRuntime.jsx("div", { className: "flex shrink-0", children: metaData.map(function (meta, index) {
|
|
1119
|
-
if (index === 0) {
|
|
1120
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: [meta, "\u00A0\u00B7"] }, meta));
|
|
1121
|
-
}
|
|
1122
|
-
if (index === metaData.length - 1) {
|
|
1123
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: ["\u00A0", meta] }, meta));
|
|
1124
|
-
}
|
|
1125
|
-
return (jsxRuntime.jsxs(Copy, { className: "text-xs", as: exports.COPY_TAG.SMALL, children: ["\u00A0", meta, "\u00A0\u00B7"] }, meta));
|
|
1126
|
-
}) })), actions && (jsxRuntime.jsxs("div", { className: "flex items-center gap-1 flex-wrap", children: [actions.like && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.like.isActive ? 'mdi:like' : 'mdi:like-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1127
|
-
var _a;
|
|
1128
|
-
event.stopPropagation();
|
|
1129
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.like) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.like.onClick === 'function') {
|
|
1130
|
-
actions.like.onClick({ id: id });
|
|
1131
|
-
}
|
|
1132
|
-
} })), actions.share && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.share.isActive ? 'mdi:share' : 'mdi:share-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1133
|
-
var _a;
|
|
1134
|
-
event.stopPropagation();
|
|
1135
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.share) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.share.onClick === 'function') {
|
|
1136
|
-
actions.share.onClick({ id: id });
|
|
1137
|
-
}
|
|
1138
|
-
} })), actions.save && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.save.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1139
|
-
var _a;
|
|
1140
|
-
event.stopPropagation();
|
|
1141
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.save) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.save.onClick === 'function') {
|
|
1142
|
-
actions.save.onClick({ id: id });
|
|
1143
|
-
}
|
|
1144
|
-
} })), actions.comment && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.comment.isActive ? 'mdi:comment' : 'mdi:comment-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1145
|
-
var _a;
|
|
1146
|
-
event.stopPropagation();
|
|
1147
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.comment) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.comment.onClick === 'function') {
|
|
1148
|
-
actions.comment.onClick({ id: id });
|
|
1149
|
-
}
|
|
1150
|
-
} })), actions.bookmark && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.bookmark.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1151
|
-
var _a;
|
|
1152
|
-
event.stopPropagation();
|
|
1153
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.bookmark) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.bookmark.onClick === 'function') {
|
|
1154
|
-
actions.bookmark.onClick({ id: id });
|
|
1155
|
-
}
|
|
1156
|
-
} })), actions.report && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.report.isActive ? 'mdi:flag' : 'mdi:flag-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1157
|
-
var _a;
|
|
1158
|
-
event.stopPropagation();
|
|
1159
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.report) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.report.onClick === 'function') {
|
|
1160
|
-
actions.report.onClick({ id: id });
|
|
1161
|
-
}
|
|
1162
|
-
} })), actions.follow && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.follow.isActive ? 'mdi:account-plus' : 'mdi:account-plus-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1163
|
-
var _a;
|
|
1164
|
-
event.stopPropagation();
|
|
1165
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.follow) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.follow.onClick === 'function') {
|
|
1166
|
-
actions.follow.onClick({ id: id });
|
|
1167
|
-
}
|
|
1168
|
-
} })), actions.download && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.download.isActive ? 'mdi:download' : 'mdi:download-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1169
|
-
var _a;
|
|
1170
|
-
event.stopPropagation();
|
|
1171
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.download) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.download.onClick === 'function') {
|
|
1172
|
-
actions.download.onClick({ id: id });
|
|
1173
|
-
}
|
|
1174
|
-
} })), actions.edit && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.edit.isActive ? 'mdi:pencil' : 'mdi:pencil-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1175
|
-
var _a;
|
|
1176
|
-
event.stopPropagation();
|
|
1177
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.edit) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.edit.onClick === 'function') {
|
|
1178
|
-
actions.edit.onClick({ id: id });
|
|
1179
|
-
}
|
|
1180
|
-
} })), actions.delete && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: actions.delete.isActive ? 'mdi:delete' : 'mdi:delete-outline', size: exports.BTN_SIZES.SMALL, onClick: function (event) {
|
|
1181
|
-
var _a;
|
|
1182
|
-
event.stopPropagation();
|
|
1183
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.delete) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.delete.onClick === 'function') {
|
|
1184
|
-
actions.delete.onClick({ id: id });
|
|
1185
|
-
}
|
|
1186
|
-
} }))] }))] })] }) })] }));
|
|
1187
|
-
};
|
|
1188
|
-
CardVideo.displayName = 'CardVideo';
|
|
1189
|
-
|
|
1190
|
-
var CardIcon = function (_a) {
|
|
1191
|
-
var id = _a.id, title = _a.title, description = _a.description, icon = _a.icon, className = _a.className, _b = _a.onClick, onClick = _b === void 0 ? undefined : _b, moreTitle = _a.moreTitle, align = _a.align;
|
|
1192
|
-
var cardClasses = onClick ? cardWrapperClasses : '';
|
|
1193
|
-
return (jsxRuntime.jsxs("div", { id: id, "data-testid": "CardIcon", className: tailwindMerge.twMerge(cx(cardClasses, 'p-8 group gap-4 flex flex-col cursor-default', { 'items-start': align === 'left' }, { 'items-center': align === 'center' }, { 'items-end': align === 'right' }, className)), children: [icon && (jsxRuntime.jsx("div", { className: cx('relative'), children: jsxRuntime.jsx(Icon, { name: icon, size: 48 }) })), jsxRuntime.jsxs("div", { className: cx({ 'text-left': align === 'left' }, { 'text-center': align === 'center' }, { 'text-right': align === 'right' }), children: [jsxRuntime.jsx("div", { children: title && (jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H5, singleLine: true, children: title })) }), jsxRuntime.jsx("div", { children: description && jsxRuntime.jsx(Copy, { align: align, children: description }) })] }), onClick && (jsxRuntime.jsx("div", { className: "flex items-center justify-start gap-2", children: jsxRuntime.jsx(Button, { icon: "mdi:arrow-right", variant: exports.BTN_VARIANTS.LINK, onClick: onClick, children: moreTitle }) }))] }));
|
|
1194
|
-
};
|
|
1195
|
-
CardIcon.displayName = 'CardIcon';
|
|
1196
|
-
|
|
1197
|
-
var CardHorz = function (_a) {
|
|
1198
|
-
var testID = _a.testID, id = _a.id, title = _a.title, description = _a.description, image = _a.image, onClick = _a.onClick, className = _a.className, padded = _a.padded, icon = _a.icon;
|
|
1199
|
-
return (jsxRuntime.jsxs("div", { id: id, "data-testid": testID || 'CardHorz', className: cx('relative rounded-lg overflow-hidden flex gap-4 cursor-pointer shadow hover:shadow-lg', { 'p-4': padded }, className), onClick: onClick, children: [image && (jsxRuntime.jsx("div", { className: "w-1/3 aspect-[1/1]", children: jsxRuntime.jsx("div", { className: tailwindMerge.twMerge(cx('relative w-full overflow-hidden h-full', image.aspectRatio)), children: jsxRuntime.jsx(Image, { fill: true, src: image === null || image === void 0 ? void 0 : image.src, alt: image === null || image === void 0 ? void 0 : image.alt, className: "absolute inset-0 object-cover" }) }) })), icon && (jsxRuntime.jsx("div", { className: "py-2 pl-2", children: jsxRuntime.jsx(Icon, { name: icon, size: 30 }) })), jsxRuntime.jsx("div", { className: "flex flex-1 overflow-hidden h-min", children: jsxRuntime.jsxs("div", { className: "flex-col gap-2 py-2 pr-2 overflow-hidden", children: [title && (jsxRuntime.jsx("div", { className: "", children: jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H4, children: title }) })), description && (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Copy, { className: "mb-0", children: description }) }))] }) })] }));
|
|
1200
|
-
};
|
|
1201
|
-
CardHorz.displayName = 'CardHorz';
|
|
1202
|
-
|
|
1203
|
-
var CardData = function (_a) {
|
|
1204
|
-
var testID = _a.testID, className = _a.className, data = _a.data, padded = _a.padded, _b = _a.shadow, shadow = _b === void 0 ? true : _b;
|
|
1205
|
-
var x = framerMotion.motionValue(0);
|
|
1206
|
-
React.useEffect(function () {
|
|
1207
|
-
// TODO; make this global
|
|
1208
|
-
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
1209
|
-
return;
|
|
1210
|
-
}
|
|
1211
|
-
framerMotion.animate(x, 200, { duration: 0.5 });
|
|
1212
|
-
}, [x]);
|
|
1213
|
-
if (!data) {
|
|
1214
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
1215
|
-
}
|
|
1216
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || 'CardData', className: cx('relative rounded-lg overflow-hidden flex flex-col items-center gap-4', { 'p-4': padded }, { shadow: shadow }, className), children: [(data === null || data === void 0 ? void 0 : data.animateNumber) && (jsxRuntime.jsxs("div", { className: "font-heading text-4xl md:text-4xl lg:text-4xl font-bold", children: [jsxRuntime.jsx(AnimationCounter, { from: data.numberData.from, to: data.numberData.to, numDecimals: data.numberData.numDecimals }), jsxRuntime.jsx("span", { children: data === null || data === void 0 ? void 0 : data.item })] })), !(data === null || data === void 0 ? void 0 : data.animateNumber) && (jsxRuntime.jsx("div", { className: "text-lg", children: jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H2, flush: true, children: data === null || data === void 0 ? void 0 : data.item }) })), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Copy, { children: data === null || data === void 0 ? void 0 : data.label }) })] }));
|
|
1217
|
-
};
|
|
1218
|
-
CardData.displayName = 'CardData';
|
|
1219
|
-
|
|
1220
|
-
var Card = function (_a) {
|
|
1221
|
-
var variant = _a.variant, className = _a.className, data = _a.data, rest = __rest(_a, ["variant", "className", "data"]);
|
|
1222
|
-
switch (variant) {
|
|
1223
|
-
case 'basic':
|
|
1224
|
-
return jsxRuntime.jsx(CardBasic, __assign({ className: className }, data, rest));
|
|
1225
|
-
case 'media':
|
|
1226
|
-
return jsxRuntime.jsx(CardMedia, __assign({ className: className }, data, rest));
|
|
1227
|
-
case 'video':
|
|
1228
|
-
return jsxRuntime.jsx(CardVideo, __assign({ className: className }, data, rest));
|
|
1229
|
-
case 'icon':
|
|
1230
|
-
return jsxRuntime.jsx(CardIcon, __assign({ className: className }, data, rest));
|
|
1231
|
-
case 'horz':
|
|
1232
|
-
return jsxRuntime.jsx(CardHorz, __assign({ className: className }, data, rest));
|
|
1233
|
-
case 'data':
|
|
1234
|
-
return jsxRuntime.jsx(CardData, __assign({ className: className }, data, rest));
|
|
1235
|
-
default:
|
|
1236
|
-
return jsxRuntime.jsx(CardBasic, __assign({ className: className }, data, rest));
|
|
1237
|
-
}
|
|
1238
|
-
};
|
|
1239
|
-
Card.displayName = 'Card';
|
|
1240
|
-
|
|
1241
|
-
var DisplayHeading = function (_a) {
|
|
1242
|
-
var text = _a.text;
|
|
1243
|
-
// split the text into an array of words
|
|
1244
|
-
var arrayOfWords = text.split(' ');
|
|
1245
|
-
return (jsxRuntime.jsx("div", { "data-testid": "DisplayHeading", className: "relative", children: jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H1, className: "", children: arrayOfWords.map(function (word, index) {
|
|
1246
|
-
// if last word.
|
|
1247
|
-
var isLastWord = index === arrayOfWords.length - 1;
|
|
1248
|
-
var dhKey = "".concat(word, "-").concat(index);
|
|
1249
|
-
return (jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("span", { className: cx({ 'display-heading relative font-heading': !isLastWord }, { 'inline-block relative font-heading': isLastWord }), children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isLastWord && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "display-heading--emphasis" }), jsxRuntime.jsx("span", { className: "display-heading--lastword", children: word })] })), !isLastWord && jsxRuntime.jsx("span", { children: word })] }) }), !isLastWord && ' '] }, dhKey));
|
|
1250
|
-
}) }) }));
|
|
1251
|
-
};
|
|
1252
|
-
DisplayHeading.displayName = 'DisplayHeading';
|
|
1253
|
-
|
|
1254
|
-
var SPACING;
|
|
1255
|
-
(function (SPACING) {
|
|
1256
|
-
SPACING["NONE"] = "py-0";
|
|
1257
|
-
SPACING["ATOM"] = "py-8";
|
|
1258
|
-
SPACING["DEFAULT"] = "py-16";
|
|
1259
|
-
SPACING["ELEMENT"] = "py-24";
|
|
1260
|
-
SPACING["COMPONENT"] = "py-32";
|
|
1261
|
-
SPACING["MODULE"] = "py-40";
|
|
1262
|
-
SPACING["FEATURE"] = "py-64";
|
|
1263
|
-
})(SPACING || (SPACING = {}));
|
|
1264
|
-
|
|
1265
|
-
var PanelCards = function (_a) {
|
|
1266
|
-
var testID = _a.testID, cardData = _a.cardData, title = _a.title, description = _a.description, withSeparators = _a.withSeparators, _b = _a.spacing, spacing = _b === void 0 ? SPACING.MODULE : _b;
|
|
1267
|
-
var ref = React.useRef(null);
|
|
1268
|
-
var isInView = framerMotion.useInView(ref, { once: true });
|
|
1269
|
-
return (jsxRuntime.jsxs("div", { ref: ref, "data-testid": testID || 'PanelCards', className: spacing, children: [(title || description) && (jsxRuntime.jsxs("div", { className: "relative text-center py-8", children: [title && jsxRuntime.jsx(DisplayHeading, { text: title }), description && jsxRuntime.jsx(Copy, { align: exports.COPY_ALIGN.CENTER, children: description })] })), jsxRuntime.jsx("div", { className: "flex gap-8", children: cardData === null || cardData === void 0 ? void 0 : cardData.map(function (card, index) { return (jsxRuntime.jsxs("span", { className: "flex gap-8 justify-between", children: [jsxRuntime.jsx("div", { className: cx('relative flex flex-1 items-center justify-center', { '': withSeparators }), style: {
|
|
1270
|
-
transform: isInView ? 'none' : 'translateY(200px)',
|
|
1271
|
-
opacity: isInView ? 1 : 0,
|
|
1272
|
-
transition: "all 0.9s cubic-bezier(0.17, 0.55, 0.55, 1) ".concat(0.1 * index, "s"),
|
|
1273
|
-
}, children: jsxRuntime.jsx(Card, __assign({}, card)) }), withSeparators && index < cardData.length - 1 && (jsxRuntime.jsx("div", { className: "w-1 h-10 border-0 border-r border-solid border-primary500" }, "separator-".concat(index)))] }, "card-".concat(index))); }) })] }));
|
|
1274
|
-
};
|
|
1275
|
-
PanelCards.displayName = 'PanelCards';
|
|
1276
|
-
|
|
1277
|
-
var Container = function (_a) {
|
|
1278
|
-
var children = _a.children, className = _a.className, spacing = _a.spacing, padded = _a.padded, isNarrow = _a.isNarrow, isCentered = _a.isCentered, isFlush = _a.isFlush;
|
|
1279
|
-
var classes = tailwindMerge.twMerge(cx('container mx-auto my-0', { 'px-4': padded }, { 'py-40': spacing === 'feature' }, { 'py-24': spacing === 'component' }, { 'py-16': spacing === 'module' }, { 'py-10': spacing === 'element' }, { 'py-4': spacing === 'atom' }, { 'py-0': spacing === 'none' }, { 'max-w-3xl': isNarrow }, { 'flex items-center justify-center flex-col': isCentered }, { 'px-0 max-w-full mx-0': isFlush }));
|
|
1280
|
-
var contentClasses = cx('mx-4 md:mx-0', {
|
|
1281
|
-
'w-full': !isCentered,
|
|
1282
|
-
}, className);
|
|
1283
|
-
return (jsxRuntime.jsx("div", { "data-testid": "Container", className: classes, children: jsxRuntime.jsx("div", { className: contentClasses, children: children }) }));
|
|
1284
|
-
};
|
|
1285
|
-
Container.displayName = 'Container';
|
|
1286
|
-
|
|
1287
|
-
var PanelFeature = function (_a) {
|
|
1288
|
-
var testID = _a.testID, title = _a.title, description = _a.description, inversed = _a.inversed, assets = _a.assets, buttonData = _a.buttonData, _b = _a.withBg, withBg = _b === void 0 ? true : _b, _c = _a.spacing, spacing = _c === void 0 ? SPACING.DEFAULT : _c;
|
|
1289
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || 'PanelFeature', className: cx("relative m-auto w-full flex flex-none flex-nowrap", spacing), children: [withBg && (jsxRuntime.jsx("div", { className: "rounded-full blur-[250px] flex flex-none aspect-1 absolute -top-24 -left-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter" })), jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs("div", { className: cx('relative flex sm:flex-col md:flex-row flex-nowrap w-full h-min justify-between overflow-visible p-0 items-center gap-16', {
|
|
1290
|
-
'flex-row-reverse': inversed,
|
|
1291
|
-
}), children: [jsxRuntime.jsxs("div", { className: "w-1/2 flex flex-col items-start justify-center", children: [jsxRuntime.jsxs("div", { className: "relative text-left", children: [jsxRuntime.jsx(DisplayHeading, { text: title }), jsxRuntime.jsx(Copy, { className: "mb-0", children: description })] }), jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-2 my-8", children: [jsxRuntime.jsx(Chip, { rounded: true, text: "New", variant: "info" }), jsxRuntime.jsx(Chip, { rounded: true, text: "Trending", variant: "info" }), jsxRuntime.jsx(Chip, { rounded: true, text: "Popular", variant: "info" })] }), jsxRuntime.jsx("div", { className: "", children: jsxRuntime.jsx(Button, __assign({}, buttonData)) })] }), jsxRuntime.jsx("div", { className: "w-1/2 flex items-center justify-center", children: jsxRuntime.jsx("div", { className: "w-full aspect-[1/1] flex items-center justify-center", children: jsxRuntime.jsx(AnimationSet1, { bgAsset: assets.bgAsset, focalAsset1: assets.focalAsset1, focalAsset2: assets.focalAsset2, focalAsset3: assets.focalAsset3 }) }) })] }) })] }));
|
|
1292
|
-
};
|
|
1293
|
-
PanelFeature.displayName = 'PanelFeature';
|
|
1294
|
-
|
|
1295
|
-
// VideoJS CSS.
|
|
1296
|
-
// import 'video.js/dist/video-js.css';
|
|
1297
|
-
var Video = function (_a) {
|
|
1298
|
-
var url = _a.url, sources = _a.sources, onReady = _a.onReady, className = _a.className, _b = _a.options, options = _b === void 0 ? {} : _b, _c = _a.isYoutube, isYoutube = _c === void 0 ? false : _c, _d = _a.defaultAudioTrack, defaultAudioTrack = _d === void 0 ? 'No Music' : _d, _e = _a.rounded, rounded = _e === void 0 ? true : _e, aspectRatioValue = _a.aspectRatioValue;
|
|
1299
|
-
var reactPlayerRef = React.useRef(null);
|
|
1300
|
-
var videoRef = React.useRef(null);
|
|
1301
|
-
var playerRef = React.useRef(null);
|
|
1302
|
-
var aspectRatioConfig = React.useMemo(function () {
|
|
1303
|
-
switch (aspectRatioValue) {
|
|
1304
|
-
case '4/3':
|
|
1305
|
-
return {
|
|
1306
|
-
aspectRatio: '4:3',
|
|
1307
|
-
className: 'aspect-[4/3]',
|
|
1308
|
-
};
|
|
1309
|
-
case '1/1':
|
|
1310
|
-
return {
|
|
1311
|
-
aspectRatio: '1:1',
|
|
1312
|
-
className: 'aspect-[1/1]',
|
|
1313
|
-
};
|
|
1314
|
-
case '3/4':
|
|
1315
|
-
return {
|
|
1316
|
-
aspectRatio: '3:4',
|
|
1317
|
-
className: 'aspect-[3/4]',
|
|
1318
|
-
};
|
|
1319
|
-
case '9/16':
|
|
1320
|
-
return {
|
|
1321
|
-
aspectRatio: '9:16',
|
|
1322
|
-
className: 'aspect-[9/16]',
|
|
1323
|
-
};
|
|
1324
|
-
case '16/7':
|
|
1325
|
-
return {
|
|
1326
|
-
aspectRatio: '16:7',
|
|
1327
|
-
className: 'aspect-[16/7]',
|
|
1328
|
-
};
|
|
1329
|
-
case '16/5':
|
|
1330
|
-
return {
|
|
1331
|
-
aspectRatio: '16:5',
|
|
1332
|
-
className: 'aspect-[16/5]',
|
|
1333
|
-
};
|
|
1334
|
-
default:
|
|
1335
|
-
return {
|
|
1336
|
-
aspectRatio: '16:9',
|
|
1337
|
-
className: 'aspect-[16/9]',
|
|
1338
|
-
};
|
|
1339
|
-
}
|
|
1340
|
-
}, [aspectRatioValue]);
|
|
1341
|
-
React.useEffect(function () {
|
|
1342
|
-
var _a;
|
|
1343
|
-
// Do not initialize Video.js player if it's a YouTube video
|
|
1344
|
-
if (isYoutube)
|
|
1345
|
-
return;
|
|
1346
|
-
var videoOptions = __assign(__assign({ autoplay: true, controls: true, muted: false, responsive: true, fill: true, fluid: true, aspectRatio: aspectRatioConfig.aspectRatio || '16:9', controlBar: {
|
|
1347
|
-
skipButtons: {
|
|
1348
|
-
forward: 30,
|
|
1349
|
-
backward: 30,
|
|
1350
|
-
},
|
|
1351
|
-
volumePanel: {
|
|
1352
|
-
inline: true,
|
|
1353
|
-
},
|
|
1354
|
-
}, html5: {
|
|
1355
|
-
hls: {
|
|
1356
|
-
enableLowInitialPlaylist: true, // Optional configuration for better HLS performance
|
|
1357
|
-
},
|
|
1358
|
-
} }, options), { sources: sources });
|
|
1359
|
-
// Make sure Video.js player is only initialized once
|
|
1360
|
-
if (!playerRef.current) {
|
|
1361
|
-
// The Video.js player needs to be _inside_ the component el for React 18 Strict Mode.
|
|
1362
|
-
var videoElement = document.createElement('video-js');
|
|
1363
|
-
videoElement.classList.add('vjs-big-play-centered');
|
|
1364
|
-
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(videoElement);
|
|
1365
|
-
var player_1 = (playerRef.current = videojs(videoElement, videoOptions, function () {
|
|
1366
|
-
videojs.log('player is ready', player_1);
|
|
1367
|
-
onReady && onReady(player_1);
|
|
1368
|
-
}));
|
|
1369
|
-
// Wait for metadata to be loaded.
|
|
1370
|
-
player_1.on('loadedmetadata', function () {
|
|
1371
|
-
// @ts-expect-error - TS doesn't know about the audioTracks function.
|
|
1372
|
-
var audioTracksList = player_1.audioTracks();
|
|
1373
|
-
for (var i = 0; i < audioTracksList.length; i++) {
|
|
1374
|
-
if (audioTracksList[i].label === defaultAudioTrack) {
|
|
1375
|
-
audioTracksList[i].enabled = true;
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
});
|
|
1379
|
-
// You could update an existing player in the `else` block here
|
|
1380
|
-
// on prop change, for example:
|
|
1381
|
-
}
|
|
1382
|
-
}, [options, videoRef]);
|
|
1383
|
-
// Dispose the Video.js player when the functional component unmounts
|
|
1384
|
-
React.useEffect(function () {
|
|
1385
|
-
// DO NOT dispose the player if it's a YouTube video
|
|
1386
|
-
if (isYoutube)
|
|
1387
|
-
return;
|
|
1388
|
-
var player = playerRef.current;
|
|
1389
|
-
return function () {
|
|
1390
|
-
if (player && !player.isDisposed()) {
|
|
1391
|
-
player.dispose();
|
|
1392
|
-
playerRef.current = null;
|
|
1393
|
-
}
|
|
1394
|
-
};
|
|
1395
|
-
}, [playerRef]);
|
|
1396
|
-
if (isYoutube && url) {
|
|
1397
|
-
return (jsxRuntime.jsx("div", { "data-testid": "Video", className: cx('relative w-full h-full aspect-[16/9]', className), children: jsxRuntime.jsx(ReactPlayer, { ref: reactPlayerRef, className: "react-player", url: url, width: "100%", height: "100%", controls: true, onReady: onReady }) }));
|
|
1398
|
-
}
|
|
1399
|
-
return (jsxRuntime.jsx("div", { className: tailwindMerge.twMerge(cx('relative w-full overflow-hidden h-full aspect-[16/9] bg-black object-cover', {
|
|
1400
|
-
rouded: rounded,
|
|
1401
|
-
}, aspectRatioConfig.className, className)), children: jsxRuntime.jsx("div", { "data-vjs-player": true, children: jsxRuntime.jsx("div", { ref: videoRef, className: "object-cover" }) }) }));
|
|
1402
|
-
};
|
|
1403
|
-
Video.displayName = 'Video';
|
|
1404
|
-
|
|
1405
|
-
var options = {
|
|
1406
|
-
replace: function (domNode) {
|
|
1407
|
-
// Handle a tag links.
|
|
1408
|
-
if (domNode.name === 'a') {
|
|
1409
|
-
var props = parse.attributesToProps(domNode.attribs);
|
|
1410
|
-
return jsxRuntime.jsx(Link, __assign({}, props, { children: parse.domToReact(domNode.children, options) }));
|
|
1411
|
-
}
|
|
1412
|
-
// Handle p tag copy.
|
|
1413
|
-
if (domNode.attribs && domNode.name === 'p') {
|
|
1414
|
-
var props = parse.attributesToProps(domNode.attribs);
|
|
1415
|
-
return jsxRuntime.jsx(Copy, __assign({}, props, { children: parse.domToReact(domNode.children, options) }));
|
|
1416
|
-
}
|
|
1417
|
-
// Handle default.
|
|
1418
|
-
return domNode;
|
|
1419
|
-
},
|
|
1420
|
-
};
|
|
1421
|
-
|
|
1422
|
-
var HtmlContent = function (_a) {
|
|
1423
|
-
var testID = _a.testID, data = _a.data, align = _a.align, className = _a.className;
|
|
1424
|
-
return (jsxRuntime.jsx("span", { "data-testid": testID || '"HtmlContent"', className: cx('relative', {
|
|
1425
|
-
'text-right': align === 'right',
|
|
1426
|
-
}, {
|
|
1427
|
-
'text-center': align === 'center',
|
|
1428
|
-
}, {
|
|
1429
|
-
'text-left': align === 'left',
|
|
1430
|
-
}, className), children: parse(data, options) }));
|
|
1431
|
-
};
|
|
1432
|
-
HtmlContent.displayName = 'HtmlContent';
|
|
1433
|
-
|
|
1434
|
-
var PanelHero = function (_a) {
|
|
1435
|
-
var testID = _a.testID, title = _a.title, description = _a.description, image = _a.image, _b = _a.buttonData, buttonData = _b === void 0 ? {
|
|
1436
|
-
variant: exports.BTN_VARIANTS.PRIMARY,
|
|
1437
|
-
size: exports.BTN_SIZES.LARGE,
|
|
1438
|
-
} : _b, _c = _a.inversed, inversed = _c === void 0 ? false : _c, _d = _a.withBg, withBg = _d === void 0 ? true : _d, _e = _a.spacing, spacing = _e === void 0 ? SPACING.MODULE : _e, video = _a.video;
|
|
1439
|
-
var controls = framerMotion.useAnimation();
|
|
1440
|
-
var ref = React.useRef(null);
|
|
1441
|
-
var isInView = framerMotion.useInView(ref);
|
|
1442
|
-
var defaultAnimation = {
|
|
1443
|
-
damping: 30,
|
|
1444
|
-
delay: 0,
|
|
1445
|
-
mass: 1.2,
|
|
1446
|
-
stiffness: 200,
|
|
1447
|
-
type: 'spring',
|
|
1448
|
-
duration: 0.5,
|
|
1449
|
-
};
|
|
1450
|
-
React.useEffect(function () {
|
|
1451
|
-
if (isInView) {
|
|
1452
|
-
controls.start(function (i) { return ({
|
|
1453
|
-
transform: 'none',
|
|
1454
|
-
transition: __assign(__assign({}, defaultAnimation), { delay: i * 0.1 }),
|
|
1455
|
-
}); });
|
|
1456
|
-
}
|
|
1457
|
-
}, [controls, isInView]);
|
|
1458
|
-
var aspectRatioClass = React.useMemo(function () {
|
|
1459
|
-
switch (video === null || video === void 0 ? void 0 : video.aspectRatioValue) {
|
|
1460
|
-
case '4/3':
|
|
1461
|
-
return 'aspect-[4/3]';
|
|
1462
|
-
case '1/1':
|
|
1463
|
-
return 'aspect-[1/1]';
|
|
1464
|
-
case '3/4':
|
|
1465
|
-
return 'aspect-[3/4]';
|
|
1466
|
-
case '9/16':
|
|
1467
|
-
return 'aspect-[9/16]';
|
|
1468
|
-
case '16/7':
|
|
1469
|
-
return 'aspect-[16/7]';
|
|
1470
|
-
case '16/5':
|
|
1471
|
-
return 'aspect-[16/5]';
|
|
1472
|
-
default:
|
|
1473
|
-
return 'aspect-[16/9]';
|
|
1474
|
-
}
|
|
1475
|
-
}, [video]);
|
|
1476
|
-
var translateX = inversed ? 'translateX(100px)' : 'translateX(-100px)';
|
|
1477
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || 'PanelHero', className: cx('relative m-auto w-full flex flex-none flex-nowrap', spacing), children: [withBg && (jsxRuntime.jsx("div", { className: cx('rounded-full blur-[200px] flex flex-none aspect-1 absolute w-[700px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter z-0', {
|
|
1478
|
-
'-bottom-24 right-0': !inversed,
|
|
1479
|
-
'-top-24 left-0': inversed,
|
|
1480
|
-
}) })), jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs("div", { className: cx('relative flex sm:flex-col md:flex-row flex-nowrap w-full h-min justify-between overflow-visible p-0 items-center gap-16', {
|
|
1481
|
-
'md:flex-row-reverse': inversed,
|
|
1482
|
-
}), children: [jsxRuntime.jsx("div", { ref: ref, className: "w-1/2 flex flex-col items-start justify-center z-10", children: jsxRuntime.jsxs("div", { className: cx('relative flex flex-col gap-4 from-body-background p-4 rounded', {
|
|
1483
|
-
'text-right bg-gradient-to-l': !inversed,
|
|
1484
|
-
}, {
|
|
1485
|
-
'text-left bg-gradient-to-r': inversed,
|
|
1486
|
-
}), children: [jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1487
|
-
transform: translateX,
|
|
1488
|
-
}, custom: 0, animate: controls, children: jsxRuntime.jsx(DisplayHeading, { text: title }) }), jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1489
|
-
transform: translateX,
|
|
1490
|
-
}, custom: 1, animate: controls, children: jsxRuntime.jsx(HtmlContent, { className: "mb-0", align: inversed ? exports.COPY_ALIGN.LEFT : exports.COPY_ALIGN.RIGHT, data: description }) }), jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1491
|
-
transform: translateX,
|
|
1492
|
-
}, custom: 2, animate: controls, children: jsxRuntime.jsx("div", { className: cx('flex items-center', {
|
|
1493
|
-
'justify-end': !inversed,
|
|
1494
|
-
'justify-start': inversed,
|
|
1495
|
-
}), children: jsxRuntime.jsx(Button, __assign({}, buttonData)) }) })] }) }), jsxRuntime.jsx("div", { className: "relative w-1/2 z-0", children: jsxRuntime.jsxs("div", { className: cx('relative scale-[1.35] rounded overflow-hidden shadow', aspectRatioClass), children: [image && jsxRuntime.jsx(Image, { src: image, alt: title, fill: true }), video && (jsxRuntime.jsx(Video, { sources: video.sources, options: {
|
|
1496
|
-
autoplay: true,
|
|
1497
|
-
muted: true,
|
|
1498
|
-
controls: false,
|
|
1499
|
-
}, aspectRatioValue: video.aspectRatioValue }))] }) })] }) })] }));
|
|
1500
|
-
};
|
|
1501
|
-
PanelHero.displayName = 'PanelHero';
|
|
1502
|
-
|
|
1503
|
-
var PanelProduct = function (_a) {
|
|
1504
|
-
var testID = _a.testID, title = _a.title, description = _a.description, image1 = _a.image1, image2 = _a.image2, _b = _a.iosLink, iosLink = _b === void 0 ? '#' : _b, _c = _a.androidLink, androidLink = _c === void 0 ? '#' : _c, _d = _a.inversed, inversed = _d === void 0 ? false : _d, _e = _a.withBg, withBg = _e === void 0 ? true : _e, _f = _a.spacing, spacing = _f === void 0 ? SPACING.MODULE : _f;
|
|
1505
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || 'PanelFeature', className: cx('relative m-auto w-full flex flex-none flex-nowrap', spacing), children: [withBg && (jsxRuntime.jsx("div", { className: "rounded-full blur-[250px] flex flex-none aspect-1 absolute -bottom-24 -right-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter" })), jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs("div", { className: cx('relative flex flex-col md:flex-row flex-nowrap w-full h-full overflow-visible gap-16 border border-solid border-primary bg-primary bg-opacity-10 backdrop-blur-lg rounded border-opacityDark20 p-8', {
|
|
1506
|
-
'flex-row-reverse': inversed,
|
|
1507
|
-
}), children: [jsxRuntime.jsxs("div", { className: "w-full md:w-1/2 top-0 relative", children: [jsxRuntime.jsx("div", { className: "absolute aspect-[8/17] -rotate-12 w-[135px] left-1/3 top-4 md:w-[180px] md:left-1/3 md:top-4 lg:w-[210px] lg:left-1/2 lg:-top-1/3", children: jsxRuntime.jsx(Image, { src: image2, alt: title }) }), jsxRuntime.jsx("div", { className: "relative md:absolute aspect-[8/17] -rotate-0 w-[150px] left-0 top-0 md:w-[220px] md:left-0 md:-top-6 lg:w-[250px] lg:left-1/4 lg:-top-1/2", children: jsxRuntime.jsx(Image, { src: image1, alt: title }) })] }), jsxRuntime.jsxs("div", { className: "w-full md:w-1/2", children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx(DisplayHeading, { text: title }) }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Copy, { children: description }) }), jsxRuntime.jsxs("div", { className: "flex items-center justify-start gap-4", children: [jsxRuntime.jsx("div", { className: "relative w-[150px] h-[50px]", children: jsxRuntime.jsx(Link, { href: iosLink, target: "_blank", hideExternalIcon: true, children: jsxRuntime.jsx(Image, { src: "https://apple-resources.s3.amazonaws.com/media-badges/download-on-the-app-store/black/en-us.svg", alt: "App Store" }) }) }), jsxRuntime.jsx("div", { className: "relative w-[190px] h-[75px]", children: jsxRuntime.jsx(Link, { href: androidLink, target: "_blank", hideExternalIcon: true, children: jsxRuntime.jsx(Image, { src: "https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png", alt: "Google Play" }) }) })] })] })] }) })] }));
|
|
1508
|
-
};
|
|
1509
|
-
PanelProduct.displayName = 'PanelProduct';
|
|
1510
|
-
|
|
1511
|
-
var PanelVideo = function (_a) {
|
|
1512
|
-
var testID = _a.testID, className = _a.className, title = _a.title, description = _a.description, _b = _a.spacing, spacing = _b === void 0 ? SPACING.NONE : _b, videoProps = _a.videoProps;
|
|
1513
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || '"PanelVideo"', className: cx('relative m-auto w-full flex flex-none flex-nowrap aspect-[16/6.6]', spacing, className), children: [jsxRuntime.jsx(Video, { rounded: false, options: __assign({ autoplay: true, muted: true, controls: false, loop: true }, videoProps === null || videoProps === void 0 ? void 0 : videoProps.options), sources: videoProps === null || videoProps === void 0 ? void 0 : videoProps.sources }), jsxRuntime.jsxs("div", { className: "absolute top-0 left-0 w-full h-full z-10", children: [jsxRuntime.jsx("div", { className: "absolute top-0 left-0 w-full h-full bg-gradient-to-r from-transparent to-black opacity-50" }), jsxRuntime.jsxs("div", { className: "absolute top-0 left-0 w-full h-full flex flex-col items-end justify-center pr-24 invert", children: [title && (jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1514
|
-
transform: 'translateX(25px)',
|
|
1515
|
-
}, animate: {
|
|
1516
|
-
transform: 'none',
|
|
1517
|
-
transition: { damping: 60, delay: 0, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
1518
|
-
}, transition: { duration: 0.5 }, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H2, children: title }) }) })), description && (jsxRuntime.jsx(framerMotion.motion.div, { initial: {
|
|
1519
|
-
transform: 'translateX(25px)',
|
|
1520
|
-
}, animate: {
|
|
1521
|
-
transform: 'none',
|
|
1522
|
-
transition: { damping: 60, delay: 0, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
1523
|
-
}, transition: { duration: 0.5 }, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Copy, { children: description }) }) }))] })] })] }));
|
|
1524
|
-
};
|
|
1525
|
-
PanelVideo.displayName = 'PanelVideo';
|
|
1526
|
-
|
|
1527
|
-
var ButtonGroup = function (_a) {
|
|
1528
|
-
var testID = _a.testID, buttonData = _a.buttonData;
|
|
1529
|
-
return (jsxRuntime.jsx("div", { "data-testid": testID || 'ButtonGroup', className: "inline-flex rounded", role: "group", children: buttonData === null || buttonData === void 0 ? void 0 : buttonData.map(function (data, index) {
|
|
1530
|
-
var isNotFirstOrLast = index > 0 && index < buttonData.length - 1;
|
|
1531
|
-
var isFirst = index === 0;
|
|
1532
|
-
var isLast = index === buttonData.length - 1;
|
|
1533
|
-
var buttonClasses = cx({ 'rounded-none': isNotFirstOrLast }, {
|
|
1534
|
-
'rounded-r': isFirst,
|
|
1535
|
-
'rounded-l': isLast,
|
|
1536
|
-
});
|
|
1537
|
-
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Button, __assign({}, data, { className: buttonClasses, children: data.children })) }, data.id));
|
|
1538
|
-
}) }));
|
|
1539
|
-
};
|
|
1540
|
-
ButtonGroup.displayName = 'ButtonGroup';
|
|
1541
|
-
|
|
1542
|
-
var Share = function (_a) {
|
|
1543
|
-
var testID = _a.testID, url = _a.url, _b = _a.title, title = _b === void 0 ? 'Share' : _b, _c = _a.enabled, enabled = _c === void 0 ? { facebook: true, twitter: true } : _c;
|
|
1544
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || 'Share', className: "flex gap-2 items-center ", children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsxs(Copy, { as: exports.COPY_TAG.P, className: "mb-0", children: [en.UI.SHARE, ":"] }) }), (enabled === null || enabled === void 0 ? void 0 : enabled.facebook) && (jsxRuntime.jsx(reactShare.FacebookShareButton, { url: url, title: title, className: "", children: jsxRuntime.jsx(Icon, { name: "mdi:facebook" }) })), (enabled === null || enabled === void 0 ? void 0 : enabled.twitter) && (jsxRuntime.jsx(reactShare.TwitterShareButton, { url: url, title: title, className: "", children: jsxRuntime.jsx(Icon, { name: "mdi:twitter" }) })), (enabled === null || enabled === void 0 ? void 0 : enabled.whatsapp) && (jsxRuntime.jsx(reactShare.WhatsappShareButton, { url: url, title: title, className: "", children: jsxRuntime.jsx(Icon, { name: "mdi:whatsapp" }) })), (enabled === null || enabled === void 0 ? void 0 : enabled.email) && (jsxRuntime.jsx(reactShare.EmailShareButton, { url: url, title: title, className: "", children: jsxRuntime.jsx(Icon, { name: "mdi:email" }) })), (enabled === null || enabled === void 0 ? void 0 : enabled.linkedin) && (jsxRuntime.jsx(reactShare.LinkedinShareButton, { url: url, title: title, className: "", children: jsxRuntime.jsx(Icon, { name: "mdi:linkedin" }) }))] }));
|
|
1545
|
-
};
|
|
1546
|
-
Share.displayName = 'Share';
|
|
1547
|
-
|
|
1548
|
-
var VisitUs = function (_a) {
|
|
1549
|
-
var testID = _a.testID, facebook = _a.facebook, twitter = _a.twitter, instagram = _a.instagram, linkedin = _a.linkedin;
|
|
1550
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || '"VisitUs"', className: "flex gap-2", children: [facebook && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, size: exports.BTN_SIZES.MEDIUM, icon: "mdi:facebook", onClick: function () { return window.open(facebook.url); } })), twitter && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, size: exports.BTN_SIZES.MEDIUM, icon: "mdi:twitter", onClick: function () { return window.open(twitter.url); } })), instagram && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, size: exports.BTN_SIZES.MEDIUM, icon: "mdi:instagram", onClick: function () { return window.open(instagram.url); } })), linkedin && (jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, size: exports.BTN_SIZES.MEDIUM, icon: "mdi:linkedin", onClick: function () { return window.open(linkedin.url); } }))] }));
|
|
1551
|
-
};
|
|
1552
|
-
VisitUs.displayName = 'VisitUs';
|
|
1553
|
-
|
|
1554
|
-
var Menu = function (_a) {
|
|
1555
|
-
var testID = _a.testID, title = _a.title, links = _a.links, _b = _a.inline, inline = _b === void 0 ? true : _b, _c = _a.separators, separators = _c === void 0 ? false : _c, className = _a.className;
|
|
1556
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || '"Menu"', className: tailwindMerge.twMerge(cx('flex flex-col gap-2', className)), children: [title && (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Heading, { tag: exports.HEADING_TAGS.H3, children: title }) })), jsxRuntime.jsx("div", { className: cx('flex gap-0 items-center md:items-start', { 'flex-row ': inline }, { 'flex-col ': !inline }), children: links === null || links === void 0 ? void 0 : links.map(function (link, index) {
|
|
1557
|
-
var key = "".concat(link.id, "--").concat(index);
|
|
1558
|
-
return (jsxRuntime.jsxs("div", { className: 'flex gap-0', children: [jsxRuntime.jsx("div", { className: "relative py-2", children: jsxRuntime.jsxs(Link, { href: link.url, className: "flex gap-1", children: [link.icon && jsxRuntime.jsx(Icon, { name: link.icon }), link.title && jsxRuntime.jsx("div", { children: link.title })] }) }), separators && index + 1 < links.length && (jsxRuntime.jsx("div", { className: "h-full flex self-center px-2", children: jsxRuntime.jsx(Icon, { name: "mdi:dot", className: "opacity-50" }) }))] }, key));
|
|
1559
|
-
}) })] }));
|
|
1560
|
-
};
|
|
1561
|
-
Menu.displayName = 'Menu';
|
|
1562
|
-
|
|
1563
|
-
var Hero = function (_a) {
|
|
1564
|
-
var testID = _a.testID, children = _a.children, _b = _a.withBg, withBg = _b === void 0 ? true : _b, _c = _a.inversed, inversed = _c === void 0 ? false : _c;
|
|
1565
|
-
return (jsxRuntime.jsxs("div", { "data-testid": testID || 'PanelHero', className: "relative py-8 m-auto w-full flex flex-none flex-nowrap", children: [withBg && (jsxRuntime.jsx("div", { className: cx('rounded-full blur-[200px] flex flex-none aspect-1 absolute w-[700px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter z-0', {
|
|
1566
|
-
'-bottom-24 right-0': !inversed,
|
|
1567
|
-
'-top-24 left-0': inversed,
|
|
1568
|
-
}) })), jsxRuntime.jsx(Container, { children: children })] }));
|
|
1569
|
-
};
|
|
1570
|
-
Hero.displayName = 'Hero';
|
|
1571
|
-
|
|
1572
|
-
exports.CPL_SPACING = void 0;
|
|
1573
|
-
(function (CPL_SPACING) {
|
|
1574
|
-
CPL_SPACING["NONE"] = "none";
|
|
1575
|
-
CPL_SPACING["ATOM"] = "atom";
|
|
1576
|
-
CPL_SPACING["DEFAULT"] = "default";
|
|
1577
|
-
CPL_SPACING["ELEMENT"] = "element";
|
|
1578
|
-
CPL_SPACING["COMPONENT"] = "component";
|
|
1579
|
-
CPL_SPACING["MODULE"] = "module";
|
|
1580
|
-
CPL_SPACING["FEATURE"] = "feature";
|
|
1581
|
-
})(exports.CPL_SPACING || (exports.CPL_SPACING = {}));
|
|
1582
|
-
|
|
1583
|
-
var ContentPageLayout = function (_a) {
|
|
1584
|
-
var _b = _a.spacing, spacing = _b === void 0 ? exports.CPL_SPACING.DEFAULT : _b, children = _a.children, narrow = _a.narrow, flush = _a.flush, className = _a.className;
|
|
1585
|
-
var classes = cx('flex', 'flex-col', 'flex-1', 'relative', { 'py-40': spacing === 'feature' }, { 'py-24': spacing === 'component' }, { 'py-16': spacing === 'module' }, { 'py-10': spacing === 'element' }, { 'py-8': spacing === 'default' }, { 'py-4': spacing === 'atom' }, { 'py-0': spacing === 'none' }, { 'max-w-5xl': narrow }, { 'p-0': flush }, className);
|
|
1586
|
-
return (jsxRuntime.jsx("div", { "data-testid": "ContentPageLayout", className: classes, children: children }));
|
|
1587
|
-
};
|
|
1588
|
-
ContentPageLayout.displayName = 'ContentPageLayout';
|
|
1589
|
-
|
|
1590
|
-
exports.CRL_SIZE = void 0;
|
|
1591
|
-
(function (CRL_SIZE) {
|
|
1592
|
-
CRL_SIZE["NONE"] = "none";
|
|
1593
|
-
CRL_SIZE["ATOM"] = "atom";
|
|
1594
|
-
CRL_SIZE["DEFAULT"] = "default";
|
|
1595
|
-
CRL_SIZE["ELEMENT"] = "element";
|
|
1596
|
-
CRL_SIZE["COMPONENT"] = "component";
|
|
1597
|
-
CRL_SIZE["MODULE"] = "module";
|
|
1598
|
-
CRL_SIZE["FEATURE"] = "feature";
|
|
1599
|
-
})(exports.CRL_SIZE || (exports.CRL_SIZE = {}));
|
|
1600
|
-
|
|
1601
|
-
var ContentRowsLayout = function (_a) {
|
|
1602
|
-
var className = _a.className, children = _a.children, _b = _a.size, size = _b === void 0 ? exports.CRL_SIZE.DEFAULT : _b;
|
|
1603
|
-
var classes = cx('grid', 'auto-rows-min', 'grid-cols-1', 'gap-x-4', { 'gap-y-0 mb-0': size === 'none' }, { 'gap-y-2 mb-2': size === 'atom' }, { 'gap-y-4 mb-4': size === 'default' }, { 'gap-y-8 mb-8': size === 'element' }, { 'gap-y-16 mb-16': size === 'module' }, { 'gap-y-24 mb-24': size === 'component' }, { 'gap-y-40 mb-40': size === 'feature' }, className);
|
|
1604
|
-
return (jsxRuntime.jsx("div", { "data-testid": "ContentRowsLayout", className: classes, children: children }));
|
|
1605
|
-
};
|
|
1606
|
-
ContentRowsLayout.displayName = 'ContentRowsLayout';
|
|
1607
|
-
|
|
1608
|
-
var AppContext = React.createContext({
|
|
1609
|
-
brand: undefined,
|
|
1610
|
-
header: undefined,
|
|
1611
|
-
footer: undefined,
|
|
1612
|
-
});
|
|
1613
|
-
var AppProvider = function (_a) {
|
|
1614
|
-
var children = _a.children, value = _a.value;
|
|
1615
|
-
return jsxRuntime.jsx(AppContext.Provider, { value: value, children: children });
|
|
1616
|
-
};
|
|
1617
|
-
|
|
1618
|
-
var Footer = function (_a) {
|
|
1619
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1620
|
-
var testID = _a.testID, className = _a.className, _q = _a.logoAspectRatio, logoAspectRatio = _q === void 0 ? 'aspect-[16/9]' : _q;
|
|
1621
|
-
var context = React.useContext(AppContext);
|
|
1622
|
-
return (jsxRuntime.jsxs("footer", { className: cx('w-full md:max-w-screen-lg lg:max-w-screen-xl m-auto pt-16 pb-8', className), children: [jsxRuntime.jsxs("div", { "data-testid": testID || '"Footer"', className: "footer flex flex-col md:flex-row py-8 gap-8", children: [jsxRuntime.jsxs("div", { className: "relative w-full md:w-1/3 flex flex-col gap-4 items-center md:items-start", children: [((_b = context === null || context === void 0 ? void 0 : context.brand) === null || _b === void 0 ? void 0 : _b.logo) && (jsxRuntime.jsx("div", { className: "relative w-24", children: jsxRuntime.jsx(Logo, { logo: (_c = context === null || context === void 0 ? void 0 : context.brand) === null || _c === void 0 ? void 0 : _c.logo, aspectRatioClass: logoAspectRatio }) })), ((_d = context.footer) === null || _d === void 0 ? void 0 : _d.about) && (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Copy, { children: context.footer.about }) })), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(VisitUs, { facebook: (_f = (_e = context.footer) === null || _e === void 0 ? void 0 : _e.visitUs) === null || _f === void 0 ? void 0 : _f.facebook, twitter: (_h = (_g = context.footer) === null || _g === void 0 ? void 0 : _g.visitUs) === null || _h === void 0 ? void 0 : _h.twitter, instagram: (_k = (_j = context.footer) === null || _j === void 0 ? void 0 : _j.visitUs) === null || _k === void 0 ? void 0 : _k.instagram, linkedin: (_m = (_l = context.footer) === null || _l === void 0 ? void 0 : _l.visitUs) === null || _m === void 0 ? void 0 : _m.linkedin }) })] }), ((_o = context.footer) === null || _o === void 0 ? void 0 : _o.menus) && (jsxRuntime.jsx("div", { className: "flex gap-4 flex-1 flex-col md:flex-row items-center md:items-start", children: context.footer.menus.map(function (menu, index) { return (jsxRuntime.jsx("div", { className: "flex flex-1", children: jsxRuntime.jsx(Menu, { title: menu.title, links: menu.links, inline: false }) }, "".concat(menu.title, "--").concat(index))); }) }))] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-center flex-col", children: [jsxRuntime.jsxs(Copy, { align: exports.COPY_ALIGN.CENTER, as: exports.COPY_TAG.SMALL, children: ["\u00A9 ", new Date().getFullYear(), " ", en.UI.COPYRIGHT, " ", (_p = context.brand) === null || _p === void 0 ? void 0 : _p.name] }), jsxRuntime.jsx(Copy, { align: exports.COPY_ALIGN.CENTER, as: exports.COPY_TAG.SMALL, children: en.UI.ALL_RIGHTS_RESERVED })] })] }));
|
|
1623
|
-
};
|
|
1624
|
-
Footer.displayName = 'Footer';
|
|
1625
|
-
|
|
1626
|
-
var Header = function (_a) {
|
|
1627
|
-
var _b, _c, _d, _e;
|
|
1628
|
-
var testID = _a.testID, menuLinks = _a.menuLinks, profileLinks = _a.profileLinks, loginCallback = _a.loginCallback, logoutCallback = _a.logoutCallback, _f = _a.isAuthenticated, isAuthenticated = _f === void 0 ? false : _f, _g = _a.hideMenu, hideMenu = _g === void 0 ? false : _g, _h = _a.logoAspectRatio, logoAspectRatio = _h === void 0 ? 'aspect-[16/9]' : _h, className = _a.className;
|
|
1629
|
-
var context = React.useContext(AppContext);
|
|
1630
|
-
var _j = React.useState('hidden'), mobileMenuClass = _j[0], mobileMenuIcon = _j[1];
|
|
1631
|
-
var _k = React.useState(false), showDropdown = _k[0], setShowDropdown = _k[1];
|
|
1632
|
-
var toggleMenuClass = function () {
|
|
1633
|
-
if (mobileMenuClass === 'hidden') {
|
|
1634
|
-
mobileMenuIcon('block');
|
|
1635
|
-
}
|
|
1636
|
-
else {
|
|
1637
|
-
mobileMenuIcon('hidden');
|
|
1638
|
-
}
|
|
1639
|
-
};
|
|
1640
|
-
return (jsxRuntime.jsxs("header", { "data-testid": testID || '"Header"', className: cx('w-full md:max-w-screen-lg lg:max-w-screen-xl m-auto py-4 px-4 md:px-2 lg:px-0', className), children: [jsxRuntime.jsxs("div", { className: "relative w-full flex", children: [((_b = context === null || context === void 0 ? void 0 : context.brand) === null || _b === void 0 ? void 0 : _b.logo) && (jsxRuntime.jsx("div", { className: "relative w-32", children: jsxRuntime.jsx(Link, { href: "/", children: jsxRuntime.jsx(Logo, { logo: (_c = context === null || context === void 0 ? void 0 : context.brand) === null || _c === void 0 ? void 0 : _c.logo, aspectRatioClass: logoAspectRatio }) }) })), jsxRuntime.jsx("div", { className: "flex-1 hidden md:flex items-center justify-center", children: jsxRuntime.jsx(Menu, { links: menuLinks, separators: true }) }), jsxRuntime.jsxs("div", { className: "hidden md:flex flex-col justify-center", children: [!isAuthenticated && jsxRuntime.jsx(Button, { onClick: loginCallback, children: en.UI.LOGIN }), isAuthenticated && (jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx(Button, { onClick: function () { return setShowDropdown(!showDropdown); }, icon: !showDropdown ? 'mdi:user' : 'mdi:user-outline' }), jsxRuntime.jsx("div", { onClick: function () { return setShowDropdown(false); }, className: cx('absolute bg-body-background dark:bg-dark-body-background shadow rounded py-2 px-4 right-0 top-12 w-24 z-20', { hidden: !showDropdown }), children: jsxRuntime.jsx(Menu, { links: profileLinks, inline: false }) })] }))] }), jsxRuntime.jsx("div", { className: "flex md:hidden flex-col justify-center flex-1 items-end", children: jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: "mdi:menu", onClick: toggleMenuClass }) })] }), jsxRuntime.jsxs("div", { className: cx('navbar-menu relative z-50', mobileMenuClass, { hidden: hideMenu }), children: [jsxRuntime.jsx("div", { className: "navbar-backdrop fixed inset-0 bg-black opacity-25" }), jsxRuntime.jsxs("nav", { className: "fixed top-0 left-0 bottom-0 flex flex-col w-5/6 max-w-sm py-4 px-4 bg-body-background dark:bg-dark-body-background border-r overflow-y-auto", children: [jsxRuntime.jsxs("div", { className: "flex justify-between", children: [jsxRuntime.jsx("div", { className: "relative w-32", children: ((_d = context === null || context === void 0 ? void 0 : context.brand) === null || _d === void 0 ? void 0 : _d.logo) && (jsxRuntime.jsx("div", { className: "relative w-32", children: jsxRuntime.jsx(Logo, { logo: (_e = context === null || context === void 0 ? void 0 : context.brand) === null || _e === void 0 ? void 0 : _e.logo, aspectRatioClass: "aspect-[16/9]" }) })) }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Button, { variant: exports.BTN_VARIANTS.PRIMARY, icon: "mdi:close", onClick: toggleMenuClass }) })] }), jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 gap-4", children: [isAuthenticated && (jsxRuntime.jsx("div", { className: "md:hidden flex justify-center", children: jsxRuntime.jsx(Copy, { children: "User profile avatar and details here." }) })), jsxRuntime.jsx("div", { className: "flex flex-1 justify-center pt-4", children: jsxRuntime.jsx(Menu, { links: menuLinks, inline: false }) }), isAuthenticated && (jsxRuntime.jsx("div", { className: "md:hidden flex justify-center", children: jsxRuntime.jsx(Button, { onClick: logoutCallback, children: en.UI.LOGOUT }) })), !isAuthenticated && (jsxRuntime.jsx("div", { className: "md:hidden flex justify-center", children: jsxRuntime.jsx(Button, { onClick: function () {
|
|
1641
|
-
loginCallback();
|
|
1642
|
-
toggleMenuClass();
|
|
1643
|
-
}, children: en.UI.LOGIN }) }))] })] })] })] }));
|
|
1644
|
-
};
|
|
1645
|
-
Header.displayName = 'Header';
|
|
1646
|
-
|
|
1647
|
-
var OTPInput = function (_a) {
|
|
1648
|
-
var testID = _a.testID, inputCallback = _a.inputCallback, seperator = _a.seperator, _b = _a.numInputs, numInputs = _b === void 0 ? 4 : _b, _c = _a.shouldAutoFocus, shouldAutoFocus = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? 'medium' : _d;
|
|
1649
|
-
var _e = React.useState(''), otp = _e[0], setOtp = _e[1];
|
|
1650
|
-
React.useEffect(function () {
|
|
1651
|
-
if (otp && otp.length === 4 && inputCallback !== undefined && typeof inputCallback === 'function') {
|
|
1652
|
-
inputCallback(otp);
|
|
1653
|
-
}
|
|
1654
|
-
}, [otp]);
|
|
1655
|
-
var sizeRatio = React.useMemo(function () {
|
|
1656
|
-
switch (size) {
|
|
1657
|
-
case 'small':
|
|
1658
|
-
return {
|
|
1659
|
-
width: '2.5rem',
|
|
1660
|
-
height: '3rem',
|
|
1661
|
-
};
|
|
1662
|
-
case 'medium':
|
|
1663
|
-
return {
|
|
1664
|
-
width: '3.5rem',
|
|
1665
|
-
height: '4rem',
|
|
1666
|
-
};
|
|
1667
|
-
case 'large':
|
|
1668
|
-
return {
|
|
1669
|
-
width: '4.5rem',
|
|
1670
|
-
height: '5rem',
|
|
1671
|
-
};
|
|
1672
|
-
default:
|
|
1673
|
-
return {
|
|
1674
|
-
width: '2.5rem',
|
|
1675
|
-
height: '2.5rem',
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
}, [size]);
|
|
1679
|
-
return (jsxRuntime.jsx("div", { "data-testid": testID || '"OTPInput"', className: "foo-bar", children: jsxRuntime.jsx(ROtpInput, { value: otp, onChange: setOtp, inputType: "number", numInputs: numInputs, shouldAutoFocus: shouldAutoFocus, renderSeparator: seperator ? (function () { return (jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: jsxRuntime.jsx(Icon, { name: "mdi:dot", className: "opacity-50" }) })); }) : (jsxRuntime.jsx("div", { className: "flex items-center justify-center w-4" })), renderInput: function (props) { return jsxRuntime.jsx("input", __assign({}, props, { className: cx('remove-arrow form-item text-input w-12') })); }, inputStyle: {
|
|
1680
|
-
width: sizeRatio.width,
|
|
1681
|
-
height: sizeRatio.height,
|
|
1682
|
-
} }) }));
|
|
1683
|
-
};
|
|
1684
|
-
OTPInput.displayName = 'OTPInput';
|
|
1685
|
-
|
|
1686
|
-
exports.CardVariant = void 0;
|
|
1687
|
-
(function (CardVariant) {
|
|
1688
|
-
CardVariant["BASIC"] = "basic";
|
|
1689
|
-
CardVariant["MEDIA"] = "media";
|
|
1690
|
-
CardVariant["VIDEO"] = "video";
|
|
1691
|
-
CardVariant["ICON"] = "icon";
|
|
1692
|
-
CardVariant["HORZ"] = "horz";
|
|
1693
|
-
CardVariant["DATA"] = "data";
|
|
1694
|
-
})(exports.CardVariant || (exports.CardVariant = {}));
|
|
1695
|
-
|
|
1696
|
-
exports.ResultAsTypes = void 0;
|
|
1697
|
-
(function (ResultAsTypes) {
|
|
1698
|
-
ResultAsTypes["cardBasic"] = "cardBasic";
|
|
1699
|
-
ResultAsTypes["cardMedia"] = "cardMedia";
|
|
1700
|
-
ResultAsTypes["cardVideo"] = "cardVideo";
|
|
1701
|
-
})(exports.ResultAsTypes || (exports.ResultAsTypes = {}));
|
|
1702
|
-
|
|
1703
|
-
function Sorting(_a) {
|
|
1704
|
-
var className = _a.className, label = _a.label, onChange = _a.onChange, options = _a.options;
|
|
1705
|
-
return (jsxRuntime.jsxs("div", { className: cx('m-0 p-0 mb-2 border-none', className), children: [jsxRuntime.jsx(Label, { className: "text-sm", transform: exports.COPY_TRANSFORM.UPPERCASE, children: label }), jsxRuntime.jsx(FormSelect, { id: label || 'Sorting', options: options, onChange: function (o) { return onChange(o.target.value); } })] }));
|
|
1706
|
-
}
|
|
1707
|
-
Sorting.displayName = 'Sorting';
|
|
1708
|
-
|
|
1709
|
-
function Paging(_a) {
|
|
1710
|
-
var className = _a.className, current = _a.current, _b = _a.resultsPerPage, resultsPerPage = _b === void 0 ? 10 : _b, onChange = _a.onChange, totalPages = _a.totalPages, rest = __rest(_a, ["className", "current", "resultsPerPage", "onChange", "totalPages"]);
|
|
1711
|
-
return (jsxRuntime.jsx(RCPagination, __assign({ current: current, onChange: onChange, simple: true, pageSize: resultsPerPage, total: totalPages * resultsPerPage, className: cx('m-0 p-0 list-none text-body-text flex gap-2 text-center items-center [&>li>span]:px-2', className), locale: enUsLocale, prevIcon: jsxRuntime.jsx("div", { className: "text-body-text", children: jsxRuntime.jsx(Icon, { name: "mdi:chevron-left" }) }), nextIcon: jsxRuntime.jsx("div", { className: "text-body-text", children: jsxRuntime.jsx(Icon, { name: "mdi:chevron-right" }) }) }, rest)));
|
|
1712
|
-
}
|
|
1713
|
-
Paging.displayName = 'Paging';
|
|
1714
|
-
|
|
1715
|
-
function ResultsPerPage(_a) {
|
|
1716
|
-
var className = _a.className, onChange = _a.onChange, options = _a.options, label = _a.label;
|
|
1717
|
-
// Return nothing without options.
|
|
1718
|
-
if (!options) {
|
|
1719
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
1720
|
-
}
|
|
1721
|
-
return (jsxRuntime.jsxs("div", { className: cx('m-0 p-0 border-none flex items-center justify-end', className), children: [jsxRuntime.jsx(Label, { className: "text-sm mr-2", transform: exports.COPY_TRANSFORM.UPPERCASE, children: en.UI.SHOW }), jsxRuntime.jsx(FormSelect, { id: label || 'ResultsPerPage', options: options.map(function (option) { return ({ label: option.toString(), value: option }); }), onChange: function (o) { return onChange(o.target.value); }, className: "min-w-20" })] }));
|
|
1722
|
-
}
|
|
1723
|
-
ResultsPerPage.displayName = 'ResultsPerPage';
|
|
1724
|
-
|
|
1725
|
-
function PagingInfo(_a) {
|
|
1726
|
-
var className = _a.className, end = _a.end, searchTerm = _a.searchTerm, start = _a.start, totalResults = _a.totalResults, rest = __rest(_a, ["className", "end", "searchTerm", "start", "totalResults"]);
|
|
1727
|
-
return (jsxRuntime.jsxs("div", __assign({ className: cx("m-0 p-0", className) }, rest, { children: ["Showing", " ", jsxRuntime.jsxs("strong", { children: [start, " - ", end] }), " ", "out of ", jsxRuntime.jsx("strong", { children: totalResults }), searchTerm && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [" ", "for: ", jsxRuntime.jsx("em", { children: searchTerm })] }))] })));
|
|
1728
|
-
}
|
|
1729
|
-
PagingInfo.displayName = 'PagingInfo';
|
|
1730
|
-
|
|
1731
|
-
function SearchBox(_a) {
|
|
1732
|
-
var className = _a.className, onChange = _a.onChange, onSubmit = _a.onSubmit, wasSearched = _a.wasSearched, placeholder = _a.placeholder;
|
|
1733
|
-
var searchContext = React.useContext(reactSearchUi.SearchContext);
|
|
1734
|
-
return (jsxRuntime.jsx("div", { className: cx('m-0 px-48', className), children: jsxRuntime.jsxs("form", { onSubmit: function (e) { return onSubmit(e); }, className: "flex items-center", children: [jsxRuntime.jsx("div", { className: "flex-1 bg-body-background dark:bg-dark-body-background bg-opacity-80", children: jsxRuntime.jsx(TextInput, { name: "SearchBoxInput", type: InputType.TEXT, placeholder: placeholder || 'Search now...', onChange: function (e) {
|
|
1735
|
-
var _a;
|
|
1736
|
-
onChange((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value);
|
|
1737
|
-
} }) }), jsxRuntime.jsx("div", { className: "pl-4", children: jsxRuntime.jsxs("div", { className: "flex flex-row gap-2", children: [wasSearched && (jsxRuntime.jsx(Button, { type: exports.BTN_TYPES.BUTTON, onClick: function () { return searchContext.driver.reset(); }, variant: exports.BTN_VARIANTS.SECONDARY, children: "Reset" })), jsxRuntime.jsx(Button, { type: exports.BTN_TYPES.SUBMIT, variant: exports.BTN_VARIANTS.PRIMARY, children: "Search" })] }) })] }) }));
|
|
1738
|
-
}
|
|
1739
|
-
SearchBox.displayName = 'SearchBox';
|
|
1740
|
-
|
|
1741
|
-
// import Sidebar from "../Sidebar";
|
|
1742
|
-
function Layout(_a) {
|
|
1743
|
-
var className = _a.className, children = _a.children, header = _a.header, bodyContent = _a.bodyContent, bodyFooter = _a.bodyFooter, bodyHeader = _a.bodyHeader, sideContent = _a.sideContent;
|
|
1744
|
-
var sidebarClasses = cx('hidden md:block fixed md:relative w-full h-full left-0 md:left-auto top-0 md:top-auto px-2 pb-4 md:pt-6 md:px-6 md:pb-auto md:pl-0', { 'hidden md:hidden': !sideContent });
|
|
1745
|
-
return (jsxRuntime.jsxs("div", { className: cx('w-full flex flex-col', className), children: [jsxRuntime.jsx("div", { className: "m-auto md:py-0 w-full", children: header }), jsxRuntime.jsxs("div", { className: cx('md:grid m-auto md:py-0 w-full', {
|
|
1746
|
-
'md:grid-cols-search-layout': !sideContent,
|
|
1747
|
-
'md:grid-cols-search-layout-with-sidebar': sideContent,
|
|
1748
|
-
}), children: [jsxRuntime.jsx("div", { className: sidebarClasses, children: sideContent }), jsxRuntime.jsxs("div", { className: cx('p-0 pt-2 md:p-6 md:pr-0', {
|
|
1749
|
-
'md:pl-0': !sideContent,
|
|
1750
|
-
}), children: [jsxRuntime.jsx("div", { className: "flex items-center justify-between", children: bodyHeader }), jsxRuntime.jsx("div", { className: "relative", children: children || bodyContent }), jsxRuntime.jsx("div", { className: "flex items-center justify-around", children: bodyFooter })] })] })] }));
|
|
1751
|
-
}
|
|
1752
|
-
Layout.displayName = 'Layout';
|
|
1753
|
-
|
|
1754
|
-
function Results(_a) {
|
|
1755
|
-
var children = _a.children, className = _a.className, gridClasses = _a.gridClasses, rest = __rest(_a, ["children", "className", "gridClasses"]);
|
|
1756
|
-
var layoutClasses = gridClasses || 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3';
|
|
1757
|
-
return (jsxRuntime.jsx("ul", __assign({ className: cx('relative grid gap-4 mb-4', layoutClasses, className) }, rest, { children: children })));
|
|
1758
|
-
}
|
|
1759
|
-
Results.displayName = 'Results';
|
|
1760
|
-
|
|
1761
|
-
/*
|
|
1762
|
-
Since Filter Values come in many different varieties, this helper
|
|
1763
|
-
encapsulates the logic for determining how to show the label of that
|
|
1764
|
-
filter in the UI.
|
|
1765
|
-
*/
|
|
1766
|
-
function getFilterValueDisplay(filterValue) {
|
|
1767
|
-
if (filterValue === undefined || filterValue === null)
|
|
1768
|
-
return '';
|
|
1769
|
-
if (Object.prototype.hasOwnProperty.call(filterValue, 'name'))
|
|
1770
|
-
return filterValue.name;
|
|
1771
|
-
return String(filterValue);
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
function getFieldType(object, type) {
|
|
1775
|
-
if (object)
|
|
1776
|
-
return object[type];
|
|
1777
|
-
}
|
|
1778
|
-
function getRaw(object) {
|
|
1779
|
-
return getFieldType(object, 'raw');
|
|
1780
|
-
}
|
|
1781
|
-
function getSnippet(object) {
|
|
1782
|
-
return getFieldType(object, 'snippet');
|
|
1783
|
-
}
|
|
1784
|
-
function htmlEscape(str) {
|
|
1785
|
-
if (!str)
|
|
1786
|
-
return '';
|
|
1787
|
-
return String(str)
|
|
1788
|
-
.replace(/&/g, '&')
|
|
1789
|
-
.replace(/"/g, '"')
|
|
1790
|
-
.replace(/'/g, ''')
|
|
1791
|
-
.replace(/</g, '<')
|
|
1792
|
-
.replace(/>/g, '>');
|
|
1793
|
-
}
|
|
1794
|
-
function getEscapedField(maybeObject) {
|
|
1795
|
-
// Fallback to raw values here, because non-string fields
|
|
1796
|
-
// will not have a snippet fallback. Raw values MUST be html escaped.
|
|
1797
|
-
var safeField = getSnippet(maybeObject) || htmlEscape(getRaw(maybeObject));
|
|
1798
|
-
return Array.isArray(safeField) ? safeField.join(', ') : safeField;
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
function Result(_a) {
|
|
1802
|
-
// Pass fields into the relevant Card.
|
|
1803
|
-
// const fields: any = formatResult(result);
|
|
1804
|
-
var className = _a.className, result = _a.result,
|
|
1805
|
-
// onClickLink,
|
|
1806
|
-
as = _a.as, _b = _a.cardMap, cardMap = _b === void 0 ? {
|
|
1807
|
-
idField: { fieldName: 'uuid' },
|
|
1808
|
-
titleField: { fieldName: 'title' },
|
|
1809
|
-
descriptionField: { fieldName: 'description' },
|
|
1810
|
-
imageField: { fieldName: 'image' },
|
|
1811
|
-
} : _b;
|
|
1812
|
-
var idField = cardMap.idField, titleField = cardMap.titleField, imageField = cardMap.imageField, videoField = cardMap.videoField, descriptionField = cardMap.descriptionField, metaDataFields = cardMap.metaDataFields, cardProps = cardMap.cardProps;
|
|
1813
|
-
var id = idField && getEscapedField(result[idField.fieldName]);
|
|
1814
|
-
var title = titleField && getEscapedField(result[titleField.fieldName]);
|
|
1815
|
-
var imageUrl = imageField && getEscapedField(result[imageField.fieldName]);
|
|
1816
|
-
var videoUrl = videoField && videoField.formatter
|
|
1817
|
-
? videoField.formatter(getEscapedField(result[videoField.fieldName]))
|
|
1818
|
-
: videoField && getEscapedField(result[videoField.fieldName]);
|
|
1819
|
-
var description = descriptionField && getEscapedField(result[descriptionField.fieldName]);
|
|
1820
|
-
var metaData = metaDataFields &&
|
|
1821
|
-
metaDataFields.map(function (field) {
|
|
1822
|
-
var value = getEscapedField(result[field.fieldName]);
|
|
1823
|
-
if (field.formatter && typeof field.formatter === 'function') {
|
|
1824
|
-
return field.formatter(value);
|
|
1825
|
-
}
|
|
1826
|
-
});
|
|
1827
|
-
var resultView = function () {
|
|
1828
|
-
var imageData = {
|
|
1829
|
-
src: imageUrl || '',
|
|
1830
|
-
alt: title || '',
|
|
1831
|
-
title: title || '',
|
|
1832
|
-
width: 500,
|
|
1833
|
-
height: 500,
|
|
1834
|
-
};
|
|
1835
|
-
var cardData = {
|
|
1836
|
-
id: id,
|
|
1837
|
-
title: title,
|
|
1838
|
-
image: imageData,
|
|
1839
|
-
video: videoUrl,
|
|
1840
|
-
description: description,
|
|
1841
|
-
metaData: metaData,
|
|
1842
|
-
actions: cardMap.actionsData,
|
|
1843
|
-
onClick: cardMap.onClickLink,
|
|
1844
|
-
};
|
|
1845
|
-
switch (as) {
|
|
1846
|
-
case exports.ResultAsTypes.cardMedia:
|
|
1847
|
-
return jsxRuntime.jsx(Card, __assign({ variant: exports.CardVariant.MEDIA, data: cardData }, cardProps));
|
|
1848
|
-
case exports.ResultAsTypes.cardVideo:
|
|
1849
|
-
return jsxRuntime.jsx(Card, __assign({ variant: exports.CardVariant.VIDEO, data: cardData }, cardProps, { isMuted: false }));
|
|
1850
|
-
default:
|
|
1851
|
-
return jsxRuntime.jsx(Card, __assign({ variant: exports.CardVariant.BASIC, data: cardData }, cardProps));
|
|
1852
|
-
}
|
|
1853
|
-
};
|
|
1854
|
-
return jsxRuntime.jsx("li", { className: cx('relative', className), children: resultView() });
|
|
1855
|
-
}
|
|
1856
|
-
Result.displayName = 'Result';
|
|
1857
|
-
|
|
1858
|
-
function Search(_a) {
|
|
1859
|
-
var showOptions = _a.showOptions, sortOptions = _a.sortOptions, _b = _a.resultAs, resultAs = _b === void 0 ? exports.ResultAsTypes.cardBasic : _b, ResultFieldMap = _a.ResultFieldMap, _c = _a.config, config = _c === void 0 ? {
|
|
1860
|
-
filters: [],
|
|
1861
|
-
facets: {},
|
|
1862
|
-
searchFields: {},
|
|
1863
|
-
resultsFields: {},
|
|
1864
|
-
alwaysSearchOnInitialLoad: true,
|
|
1865
|
-
initialPlaceholder: 'Search...',
|
|
1866
|
-
} : _c, _d = _a.facetDisplay, facetDisplay = _d === void 0 ? [] : _d, _e = _a.noSidebar, noSidebar = _e === void 0 ? false : _e, customConnector = _a.customConnector, showPagingInfo = _a.showPagingInfo, gridClasses = _a.gridClasses, _f = _a.initialState, initialState = _f === void 0 ? {} : _f, _g = _a.showTextSearch, showTextSearch = _g === void 0 ? true : _g;
|
|
1867
|
-
var connector = React.useMemo(function () {
|
|
1868
|
-
var defaultConnector = {
|
|
1869
|
-
host: process.env.REACT_APP_ELASTICSEARCH_HOST || 'http://localhost:9200',
|
|
1870
|
-
index: process.env.REACT_APP_ELASTICSEARCH_INDEX || '',
|
|
1871
|
-
apiKey: process.env.REACT_APP_ELASTICSEARCH_API_KEY,
|
|
1872
|
-
};
|
|
1873
|
-
return new ElasticSearchAPIConnector(customConnector || defaultConnector);
|
|
1874
|
-
}, []);
|
|
1875
|
-
var searchConfig = React.useMemo(function () {
|
|
1876
|
-
return {
|
|
1877
|
-
debug: process.env.NODE_ENV === 'development',
|
|
1878
|
-
alwaysSearchOnInitialLoad: config.alwaysSearchOnInitialLoad,
|
|
1879
|
-
apiConnector: connector,
|
|
1880
|
-
hasA11yNotifications: true,
|
|
1881
|
-
searchQuery: {
|
|
1882
|
-
filters: config.filters || [],
|
|
1883
|
-
search_fields: config.searchFields || {},
|
|
1884
|
-
result_fields: config.resultsFields || {},
|
|
1885
|
-
// disjunctiveFacets: ['created'], // Make certain Facets into OR instead of AND
|
|
1886
|
-
facets: config.facets,
|
|
1887
|
-
},
|
|
1888
|
-
autocompleteQuery: {
|
|
1889
|
-
results: {
|
|
1890
|
-
search_fields: {
|
|
1891
|
-
title: {},
|
|
1892
|
-
description: {},
|
|
1893
|
-
},
|
|
1894
|
-
resultsPerPage: 5,
|
|
1895
|
-
result_fields: {
|
|
1896
|
-
title: {
|
|
1897
|
-
snippet: {
|
|
1898
|
-
size: 100,
|
|
1899
|
-
fallback: true,
|
|
1900
|
-
},
|
|
1901
|
-
},
|
|
1902
|
-
},
|
|
1903
|
-
},
|
|
1904
|
-
// TODO: Implement suggestions
|
|
1905
|
-
// suggestions: {
|
|
1906
|
-
// types: {
|
|
1907
|
-
// documents: {
|
|
1908
|
-
// fields: ['title'],
|
|
1909
|
-
// },
|
|
1910
|
-
// },
|
|
1911
|
-
// size: 4,
|
|
1912
|
-
// },
|
|
1913
|
-
},
|
|
1914
|
-
initialState: __assign({ resultsPerPage: (showOptions === null || showOptions === void 0 ? void 0 : showOptions[0]) || 8 }, initialState),
|
|
1915
|
-
};
|
|
1916
|
-
}, [config]);
|
|
1917
|
-
return (jsxRuntime.jsx(reactSearchUi.SearchProvider, { config: searchConfig, children: jsxRuntime.jsx(reactSearchUi.WithSearch, { mapContextToProps: function (_a) {
|
|
1918
|
-
var wasSearched = _a.wasSearched;
|
|
1919
|
-
return ({
|
|
1920
|
-
wasSearched: wasSearched,
|
|
1921
|
-
});
|
|
1922
|
-
}, children: function (_a) {
|
|
1923
|
-
var wasSearched = _a.wasSearched;
|
|
1924
|
-
return (jsxRuntime.jsx("div", { className: "App", children: jsxRuntime.jsx(reactSearchUi.ErrorBoundary, { children: jsxRuntime.jsx(Layout, { header: showTextSearch && (jsxRuntime.jsx(reactSearchUi.SearchBox, { view: function (props) { return (jsxRuntime.jsx(SearchBox, __assign({}, props, { wasSearched: wasSearched, placeholder: config.initialPlaceholder }))); } })), sideContent: !noSidebar &&
|
|
1925
|
-
facetDisplay && (jsxRuntime.jsxs("div", { children: [wasSearched && jsxRuntime.jsx(reactSearchUi.Sorting, { label: 'Sort by', sortOptions: sortOptions, view: Sorting }), facetDisplay === null || facetDisplay === void 0 ? void 0 : facetDisplay.map(function (_a) {
|
|
1926
|
-
var field = _a.field, label = _a.label, view = _a.view;
|
|
1927
|
-
return (jsxRuntime.jsx(reactSearchUi.Facet, { field: field, label: label, view: view }, field));
|
|
1928
|
-
})] })), bodyContent: jsxRuntime.jsx(reactSearchUi.Results, { shouldTrackClickThrough: false, resultView: function (props) { return jsxRuntime.jsx(Result, __assign({}, props, { as: resultAs, cardMap: ResultFieldMap })); }, className: "list-none p-0 m-0", view: function (props) { return jsxRuntime.jsx(Results, __assign({}, props, { gridClasses: gridClasses })); } }), bodyHeader: jsxRuntime.jsxs(React.Fragment, { children: [wasSearched && showPagingInfo && jsxRuntime.jsx(reactSearchUi.PagingInfo, { view: PagingInfo }), wasSearched && showOptions && jsxRuntime.jsx(reactSearchUi.ResultsPerPage, { view: ResultsPerPage, options: showOptions })] }), bodyFooter: jsxRuntime.jsx(reactSearchUi.Paging, { view: Paging }), noSidebar: noSidebar }) }) }));
|
|
1929
|
-
} }) }));
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
function SingleSelectFacet(_a) {
|
|
1933
|
-
var className = _a.className, label = _a.label, onChange = _a.onChange, options = _a.options;
|
|
1934
|
-
var selectBoxOptions = options.map(function (option) {
|
|
1935
|
-
return {
|
|
1936
|
-
value: option.value,
|
|
1937
|
-
label: "".concat(option.value, " (").concat(option.count, ")"),
|
|
1938
|
-
};
|
|
1939
|
-
});
|
|
1940
|
-
return (jsxRuntime.jsxs("fieldset", { className: cx('m-0 p-0 mt-4 mb-2 border-none', className), children: [jsxRuntime.jsx(Label, { className: "text-sm", transform: exports.COPY_TRANSFORM.UPPERCASE, children: label }), jsxRuntime.jsx(FormSelect, { id: label, options: selectBoxOptions, onChange: function (o) { return onChange(o.target.value); } })] }));
|
|
1941
|
-
}
|
|
1942
|
-
SingleSelectFacet.displayName = 'SingleSelectFacet';
|
|
1943
|
-
|
|
1944
|
-
function SingleLinksFacet(_a) {
|
|
1945
|
-
var className = _a.className, label = _a.label, onRemove = _a.onRemove, onSelect = _a.onSelect, options = _a.options;
|
|
1946
|
-
var value = options.filter(function (o) { return o.selected; }).map(function (o) { return o.value; })[0];
|
|
1947
|
-
return (jsxRuntime.jsx("fieldset", { className: cx('m-0 p-0 mt-4 mb-2 border-none', className), children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Label, { className: "text-sm", transform: exports.COPY_TRANSFORM.UPPERCASE, children: label }), jsxRuntime.jsxs("ul", { className: "ul list-none p-0", children: [value && (jsxRuntime.jsxs("li", { className: "m-0 flex justify-between items-center flex-1", children: [getFilterValueDisplay(value), jsxRuntime.jsx("span", { className: "ml-1 px-1", children: jsxRuntime.jsx(Button, { onClick: function () { return onRemove(value); }, children: jsxRuntime.jsx(Icon, { name: "mdi:close" }) }) })] })), !value &&
|
|
1948
|
-
options.map(function (option) {
|
|
1949
|
-
var filterValue = getFilterValueDisplay(option.value);
|
|
1950
|
-
return (jsxRuntime.jsxs("li", { className: "m-0 flex justify-between", children: [jsxRuntime.jsx("a", { className: "no-underline text-sm visited:text-body-text", "data-transaction-name": "facet - ".concat(label), href: "/", onClick: function (e) {
|
|
1951
|
-
e.preventDefault();
|
|
1952
|
-
onSelect(option.value);
|
|
1953
|
-
}, children: jsxRuntime.jsx("label", { className: "label pl-0 leading-none text-sm", children: filterValue }) }), jsxRuntime.jsx(Copy, { as: exports.COPY_TAG.SPAN, size: exports.COPY_SIZE.SMALL, children: option.count.toLocaleString('en') })] }, filterValue));
|
|
1954
|
-
})] })] }) }));
|
|
1955
|
-
}
|
|
1956
|
-
SingleLinksFacet.displayName = 'SingleLinksFacet';
|
|
1957
|
-
|
|
1958
|
-
function MultiCheckboxFacet(_a) {
|
|
1959
|
-
var className = _a.className, label = _a.label, onMoreClick = _a.onMoreClick, onRemove = _a.onRemove, onSelect = _a.onSelect, options = _a.options, showMore = _a.showMore, showSearch = _a.showSearch, onSearch = _a.onSearch, searchPlaceholder = _a.searchPlaceholder;
|
|
1960
|
-
if (!options) {
|
|
1961
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Options required" });
|
|
1962
|
-
}
|
|
1963
|
-
return (jsxRuntime.jsxs("fieldset", { className: cx('m-0 p-0 mt-4 mb-2 border-none', className), children: [jsxRuntime.jsx(Label, { className: "text-sm", transform: exports.COPY_TRANSFORM.UPPERCASE, children: label }), showSearch && (jsxRuntime.jsx("div", { className: "mt-1", children: jsxRuntime.jsx(TextInput, { type: InputType.SEARCH, placeholder: searchPlaceholder || 'Search', onChange: function (e) {
|
|
1964
|
-
onSearch(e.target.value);
|
|
1965
|
-
} }) })), jsxRuntime.jsxs("div", { className: "my-4", children: [(options === null || options === void 0 ? void 0 : options.length) < 1 && jsxRuntime.jsx("div", { children: "No matching options" }), options === null || options === void 0 ? void 0 : options.map(function (option) {
|
|
1966
|
-
var checked = option.selected;
|
|
1967
|
-
var value = option.value;
|
|
1968
|
-
var filterDisplayValue = getFilterValueDisplay(value);
|
|
1969
|
-
return (jsxRuntime.jsxs("div", { className: "flex justify-between pb-2", children: [jsxRuntime.jsx(Checkbox, { id: "facet_".concat(label).concat(filterDisplayValue), "data-transaction-name": "facet - ".concat(label), checked: checked, onChange: function () { return (checked ? onRemove(value) : onSelect(value)); }, label: filterDisplayValue }), jsxRuntime.jsx(Copy, { as: exports.COPY_TAG.SPAN, size: exports.COPY_SIZE.SMALL, children: option.count.toLocaleString('en') })] }, filterDisplayValue));
|
|
1970
|
-
})] }), showMore && (jsxRuntime.jsx(Button, { size: exports.BTN_SIZES.SMALL, variant: exports.BTN_VARIANTS.TERTIARY, onClick: onMoreClick, "aria-label": "Show more options", children: "+ More" }))] }));
|
|
1971
|
-
}
|
|
1972
|
-
MultiCheckboxFacet.displayName = 'MultiCheckboxFacet';
|
|
1973
|
-
|
|
1974
|
-
var ResetPasswordForm = function (_a) {
|
|
1975
|
-
var handleSubmit = _a.handleSubmit;
|
|
1976
|
-
return (jsxRuntime.jsx("div", { "data-testid": "ResetPasswordForm", className: "form-wrapper", children: jsxRuntime.jsx(Form, { onSubmit: handleSubmit, submit: en.FORMS.RESET_PASSWORD_FORM.SUBMIT, disabledSubmitWithReturn: true, children: jsxRuntime.jsx(FormField, { name: "password", type: exports.FIELD_TYPES.PASSWORD, label: en.FORMS.RESET_PASSWORD_FORM.PASSWORD, required: true, validations: validPassword }) }) }));
|
|
1977
|
-
};
|
|
1978
|
-
ResetPasswordForm.displayName = 'ResetPasswordForm';
|
|
1979
|
-
|
|
1980
|
-
var ProfileForm = function (_a) {
|
|
1981
|
-
var testID = _a.testID, initialValues = _a.initialValues, handleSubmit = _a.handleSubmit;
|
|
1982
|
-
return (jsxRuntime.jsx("div", { "data-testid": testID || '"ProfileForm"', className: "form-wrapper", children: jsxRuntime.jsxs(Form, { onSubmit: handleSubmit, submit: en.FORMS.PROFILE_FORM.SUBMIT, disabledSubmitWithReturn: true, initialValues: initialValues, children: [jsxRuntime.jsx("div", { className: "mb-4", children: jsxRuntime.jsx(Avatar, { name: "avatar", initValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues.avatar }) }), jsxRuntime.jsx(FormField, { name: "firstName", type: exports.FIELD_TYPES.TEXT, label: en.FORMS.PROFILE_FORM.FIRST_NAME, required: true }), jsxRuntime.jsx(FormField, { name: "lastName", type: exports.FIELD_TYPES.TEXT, label: en.FORMS.PROFILE_FORM.LAST_NAME, required: true }), jsxRuntime.jsx(FormField, { name: "email", type: exports.FIELD_TYPES.EMAIL, label: en.FORMS.PROFILE_FORM.EMAIL, required: true, validations: validEmail })] }) }));
|
|
1983
|
-
};
|
|
1984
|
-
ProfileForm.displayName = 'ProfileForm';
|
|
1985
|
-
|
|
1986
|
-
var defaultTheme = {
|
|
1987
|
-
isDarkTheme: false,
|
|
1988
|
-
toggleTheme: function () { return console.log('toggleTheme'); },
|
|
1989
|
-
};
|
|
1990
|
-
var ThemeContext = React.createContext(defaultTheme);
|
|
1991
|
-
var ThemeProvider = function (_a) {
|
|
1992
|
-
var children = _a.children, theme = _a.theme;
|
|
1993
|
-
return (jsxRuntime.jsx(ThemeContext.Provider, { value: theme, children: children }));
|
|
1994
|
-
};
|
|
1995
|
-
|
|
1996
|
-
exports.AnimationCounter = AnimationCounter;
|
|
1997
|
-
exports.AnimationSet1 = AnimationSet1;
|
|
1998
|
-
exports.AppContext = AppContext;
|
|
1999
|
-
exports.AppProvider = AppProvider;
|
|
2000
|
-
exports.Authenticator = Authenticator;
|
|
2001
|
-
exports.Avatar = Avatar;
|
|
2002
|
-
exports.Blockquote = Blockquote;
|
|
2003
|
-
exports.Button = Button;
|
|
2004
|
-
exports.ButtonGroup = ButtonGroup;
|
|
2005
|
-
exports.Card = Card;
|
|
2006
|
-
exports.Checkbox = Checkbox;
|
|
2007
|
-
exports.Chip = Chip;
|
|
2008
|
-
exports.Container = Container;
|
|
2009
|
-
exports.ContentPageLayout = ContentPageLayout;
|
|
2010
|
-
exports.ContentRowsLayout = ContentRowsLayout;
|
|
2011
|
-
exports.Copy = Copy;
|
|
2012
|
-
exports.DisplayHeading = DisplayHeading;
|
|
2013
|
-
exports.FileUpload = FileUpload;
|
|
2014
|
-
exports.Footer = Footer;
|
|
2015
|
-
exports.ForgotPasswordForm = ForgotPasswordForm;
|
|
2016
|
-
exports.Form = Form;
|
|
2017
|
-
exports.FormField = FormField;
|
|
2018
|
-
exports.FormSelect = FormSelect;
|
|
2019
|
-
exports.Header = Header;
|
|
2020
|
-
exports.Heading = Heading;
|
|
2021
|
-
exports.Hero = Hero;
|
|
2022
|
-
exports.Hr = Hr;
|
|
2023
|
-
exports.HtmlContent = HtmlContent;
|
|
2024
|
-
exports.Icon = Icon;
|
|
2025
|
-
exports.Image = Image;
|
|
2026
|
-
exports.Label = Label;
|
|
2027
|
-
exports.Link = Link;
|
|
2028
|
-
exports.List = List;
|
|
2029
|
-
exports.Loader = Loader;
|
|
2030
|
-
exports.LoginForm = LoginForm;
|
|
2031
|
-
exports.Logo = Logo;
|
|
2032
|
-
exports.Menu = Menu;
|
|
2033
|
-
exports.MultiCheckboxFacet = MultiCheckboxFacet;
|
|
2034
|
-
exports.Notice = Notice;
|
|
2035
|
-
exports.OTPInput = OTPInput;
|
|
2036
|
-
exports.PanelCards = PanelCards;
|
|
2037
|
-
exports.PanelFeature = PanelFeature;
|
|
2038
|
-
exports.PanelHero = PanelHero;
|
|
2039
|
-
exports.PanelProduct = PanelProduct;
|
|
2040
|
-
exports.PanelVideo = PanelVideo;
|
|
2041
|
-
exports.ProfileForm = ProfileForm;
|
|
2042
|
-
exports.Radio = Radio;
|
|
2043
|
-
exports.RegisterForm = RegisterForm;
|
|
2044
|
-
exports.ResetPasswordForm = ResetPasswordForm;
|
|
2045
|
-
exports.Search = Search;
|
|
2046
|
-
exports.Share = Share;
|
|
2047
|
-
exports.SingleLinksFacet = SingleLinksFacet;
|
|
2048
|
-
exports.SingleSelectFacet = SingleSelectFacet;
|
|
2049
|
-
exports.Switch = Switch;
|
|
2050
|
-
exports.Tabs = Tabs;
|
|
2051
|
-
exports.TextInput = TextInput;
|
|
2052
|
-
exports.ThemeContext = ThemeContext;
|
|
2053
|
-
exports.ThemeProvider = ThemeProvider;
|
|
2054
|
-
exports.Video = Video;
|
|
2055
|
-
exports.VisitUs = VisitUs;
|
|
2056
|
-
exports.defaultTheme = defaultTheme;
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),s=require("classnames"),a=require("framer-motion"),r=require("tailwind-merge"),i=require("@iconify/react"),n=require("react-tabs"),o=require("react-hook-form"),l=require("react-hover-video-player"),c=require("react-player/youtube"),d=require("video.js"),m=require("html-react-parser"),u=require("react-share"),p=require("react-otp-input"),x=require("@elastic/search-ui-elasticsearch-connector"),h=require("@elastic/react-search-ui"),f=require("rc-pagination"),v=require("rc-pagination/lib/locale/en_US");const g=({testID:r,from:i,to:n,animationOptions:o,className:l,numDecimals:c=0})=>{const d=t.useRef(null),m=a.useInView(d,{once:!0});return a.useIsomorphicLayoutEffect((()=>{const e=d.current;if(!e||!m)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return void(e.textContent=n.toString());e.textContent=i.toString();const t=a.animate(i,n,Object.assign(Object.assign({duration:1,ease:"easeOut"},o),{onUpdate:t=>{e.textContent=t.toFixed(c)}}));return()=>{t.stop()}}),[d,m,i,n,o]),e.jsx("span",{ref:d,"data-testid":r||"AnimationCounter",className:s("relative",l)})};g.displayName="AnimationCounter";const b=({text:t,citation:a,className:r,citationAttribute:i,showIcon:n=!0})=>{const o=s("text-xl italic font-bold",r);return e.jsxs("blockquote",{"data-testid":"Blockquote",className:o,children:[n&&e.jsx("svg",{"aria-hidden":"true",className:"w-10 h-10",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z",fill:"currentColor"})}),e.jsx("div",{children:t}),a&&e.jsx("figcaption",{className:"flex flex-start items-center mt-6 space-x-3",children:e.jsxs("div",{className:"flex items-center divide-x-2",children:[e.jsx("cite",{className:"pr-3 font-medium",children:a}),i&&e.jsx("cite",{className:"pl-3 text-sm font-light",children:i})]})})]})};var N,j,y;b.displayName="Blockquote",exports.BTN_TYPES=void 0,(N=exports.BTN_TYPES||(exports.BTN_TYPES={})).SUBMIT="submit",N.RESET="reset",N.BUTTON="button",exports.BTN_VARIANTS=void 0,(j=exports.BTN_VARIANTS||(exports.BTN_VARIANTS={})).PRIMARY="primary",j.SECONDARY="secondary",j.TERTIARY="tertiary",j.LINK="link",exports.BTN_SIZES=void 0,(y=exports.BTN_SIZES||(exports.BTN_SIZES={})).SMALL="small",y.MEDIUM="medium",y.LARGE="large";const A=({name:t,size:s=24,color:a,id:r,className:n,testID:o})=>e.jsx(i.Icon,{"data-testid":o||r||"Icon",icon:t,width:s,height:s,color:a||"currentColor",className:n});A.displayName="Icon";const S=({color:t,size:s=8,thickness:a=4})=>{const r=s?`w-${s} h-${s}`:"w-8 h-8";return e.jsx("div",{"data-testid":"Loader",className:"flex items-center justify-center",children:e.jsxs("div",{role:"status",className:"flex items-center",children:[e.jsxs("svg",{className:`animate-spin ${r} text-white`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:t||"currentColor",strokeWidth:a}),e.jsx("path",{className:"opacity-75",fill:t||"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e.jsx("span",{className:"sr-only",children:"Loading..."})]})})};S.displayName="Loader";const E=({variant:t=exports.BTN_VARIANTS.PRIMARY,size:a=exports.BTN_SIZES.MEDIUM,type:i=exports.BTN_TYPES.BUTTON,wide:n=!0,rounded:o=!0,raised:l=!0,uppercase:c,children:d,id:m,disabled:u,ariaLabel:p,onClick:x,icon:h,external:f,iconFirst:v,outline:g,testID:b,className:N,isLoading:j})=>{var y,E,w,T;const C={small:{x:d?n?"px-5":"px-3":"px-1",y:"py-1",space:"space-x-2",text:"text-sm",icon:"w-3 h-3"},medium:{x:d?n?"px-8":"px-4":"px-2",y:"py-2",space:"space-x-3",text:"text-base",icon:"w-5 h-5"},large:{x:d?n?"px-11":"px-5":"px-3",y:"py-3",space:"space-x-4",text:"text-lg",icon:"w-6 h-6"}},I=r.twMerge(s("appearance-none font-body flex items-center transition-all duration-200 transform active:scale-95 justify-around border-solid border rounded cursor-pointer outline-none focus:outline-none focus-visible:outline-none",{"border-primary":g},{"border-primary300 dark:border-primary400 hover:border-primary400 dark:hover:border-primary500":g},{shadow:l},{uppercase:c},{"auto-cols-auto grid-cols-2 gap-4":j||h||f},{"rounded-full":o},{"flex-row-reverse":v},{"opacity-50 cursor-not-allowed":u},`${null===(y=null==C?void 0:C[a])||void 0===y?void 0:y.y} ${null===(E=null==C?void 0:C[a])||void 0===E?void 0:E.x} ${null===(w=null==C?void 0:C[a])||void 0===w?void 0:w.text}`,{"text-white border-primary bg-primary hover:bg-primary-darker":t===exports.BTN_VARIANTS.PRIMARY},{"text-white border-secondary bg-secondary hover:bg-secondary-darker":t===exports.BTN_VARIANTS.SECONDARY},{"text-black border-tertiary bg-tertiary hover:bg-tertiary-darker":t===exports.BTN_VARIANTS.TERTIARY},{"px-0 text-primary border-transparent bg-transparent hover:bg-transparent shadow-none group-hover:invert":t===exports.BTN_VARIANTS.LINK},N)),R=s(null===(T=null==C?void 0:C[a])||void 0===T?void 0:T.icon);return e.jsx("button",{id:m,"data-testid":b||m||"Button",onClick:x,className:I,type:i,disabled:u,"aria-label":p,role:"button",children:e.jsxs(e.Fragment,{children:[d,h&&!f&&e.jsx("span",{className:"flex items-center",children:e.jsx(A,{name:h,className:R})}),f&&e.jsx("span",{className:"flex items-center",children:e.jsx(A,{name:"carbon:launch",className:R})}),j&&e.jsx("div",{className:"flex items-center",children:e.jsx(S,{size:4})})]})})};function w(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(s[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(s[a[r]]=e[a[r]])}return s}function T(e,t,s,a){return new(s||(s=Promise))((function(r,i){function n(e){try{l(a.next(e))}catch(e){i(e)}}function o(e){try{l(a.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(n,o)}l((a=a.apply(e,t||[])).next())}))}E.displayName="Button","function"==typeof SuppressedError&&SuppressedError;const C=t.forwardRef((function(t,a){var{id:r,label:i,required:n,className:o,disabled:l}=t,c=w(t,["id","label","required","className","disabled"]);return e.jsxs("div",{"data-testid":"Checkbox",className:s("flex items-center",o),children:[e.jsxs("div",{className:"relative bg-none w-5 h-5 flex justify-center items-center",children:[e.jsx("input",Object.assign({id:r,ref:a,disabled:l,type:"checkbox",className:"form-item checkbox m-0 appearance-none peer h-full w-full shrink-0 focus:ring-2",required:n},c)),e.jsx("span",{className:"absolute transition-opacity opacity-0 pointer-events-none peer-checked:opacity-100 w-full h-full flex items-center justify-center top-0 left-0",children:e.jsx(A,{name:"mdi:check-bold",size:12})})]}),i&&e.jsx("label",{className:"label pl-2 leading-none text-sm",htmlFor:r,children:i})]})}));C.displayName="Checkbox";const I=({href:a,children:r,onClick:i=(()=>console.log("Link clicked")),history:n,target:o,id:l,testID:c,className:d,prefetch:m,hideExternalIcon:u=!1})=>{const p=s("link cursor-pointer no-underline text-bodyText dark:text-darkBodyText",d);if(!u&&a&&a.startsWith("http"))return e.jsxs("span",{children:[e.jsx("a",{"data-testid":c||l||"Link",className:s(p),href:a,target:"_blank",rel:"noopener noreferrer",children:r}),e.jsx(A,{name:"mdi:external-link",className:"inline-block w-4 h-4 ml-1 mb-0"})]});try{const e=require("next/link").default;if(!e)throw new Error("Next.js Image not found");return t.createElement(e,{href:a,"data-testid":c||l||"Link",className:p,target:o||"_self",prefetch:m||!1},r)}catch(t){console.log("Not using Next Link.");const s=e=>{i?i(e):!0!==e.defaultPrevented&&n&&a&&(e.preventDefault(),n.push(a))};return e.jsx("a",{"data-testid":c||l||"Link",className:p,href:a,onClick:s,target:o,children:r})}};I.displayName="Link";const R=({testID:t,text:a,outline:i,rounded:n,variant:o,size:l="medium",icon:c,iconFirst:d,onClick:m})=>{const u=r.twMerge(s("flex inline-flex items-center justify-center rounded select-none gap-2",{"border border-solid border-primary":i},{"rounded-full":n},{"flex-row-reverse":d},{"bg-primary text-white":"primary"===o},{"bg-secondary text-white":"secondary"===o},{"bg-info text-white":"info"===o},{"bg-success text-white":"success"===o},{"bg-warning text-white":"warning"===o},{"bg-error text-white":"error"===o},{"py-1 px-2":"small"===l},{"py-2 px-4":"medium"===l},{"py-3 px-6":"large"===l}));return m&&"function"==typeof m?e.jsxs(I,{"data-testid":t||"Chip",className:u,onClick:m,children:[e.jsx("div",{children:a}),c&&e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(A,{name:c})})]}):e.jsxs("div",{"data-testid":t||"Chip",className:u,children:[e.jsx("div",{children:a}),c&&e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(A,{name:c})})]})};var k,L,O,_,P;R.displayName="Chip",exports.COPY_ALIGN=void 0,(k=exports.COPY_ALIGN||(exports.COPY_ALIGN={})).LEFT="left",k.CENTER="center",k.RIGHT="right",k.JUSTIFY="justify",k.NOWRAP="nowrap",exports.COPY_TRANSFORM=void 0,(L=exports.COPY_TRANSFORM||(exports.COPY_TRANSFORM={})).LOWERCASE="lowercase",L.UPPERCASE="uppercase",L.CAPITALIZE="capitalize",L.NORMALCASE="normal-case",exports.COPY_CONTEXTUAL=void 0,(O=exports.COPY_CONTEXTUAL||(exports.COPY_CONTEXTUAL={})).INVERTED="inverted",O.MUTED="muted",exports.COPY_SIZE=void 0,(_=exports.COPY_SIZE||(exports.COPY_SIZE={})).SMALL="small",_.LARGE="large",_.INTRO="intro",exports.COPY_TAG=void 0,(P=exports.COPY_TAG||(exports.COPY_TAG={})).P="p",P.SPAN="span",P.DIV="div",P.SMALL="small";const M=({children:t,as:a=exports.COPY_TAG.P,size:i,align:n,transform:o,id:l,className:c,testID:d})=>{const m=s({[`text-${n}`]:n},{"text-sm":"small"===i},{"text-lg":"large"===i},{"text-2xl":"intro"===i},{"mb-3 leading-5 mt-0":"p"===a},{"text-sm":"small"===a},o,c);return e.jsx(a,{"data-testid":d||l||"Copy",className:r.twMerge(m),children:t})};M.displayName="Copy";const F=t.forwardRef((function(t,a){var{id:r,name:i,required:n,disabled:o,className:l,onChangeCallback:c,onChange:d}=t,m=w(t,["id","name","required","disabled","className","onChangeCallback","onChange"]);return e.jsx("div",{"data-testid":"FileUpload",className:l,children:e.jsx("input",Object.assign({ref:a,className:s("form-item text-input file-upload p-0 relative m-0 min-w-0 flex-auto appearance-none block box-border bg-clip-padding file:p-3 file:cursor-pointer file:mr-3 file:overflow-hidden cursor-pointer file:border-0 file:rounded-none file:border-solid file:border-inherit file:transition file:duration-150 file:ease-in-out file:[border-inline-end-width:1px] file:[margin-inline-end:0.75rem] "),"aria-describedby":i,type:"file",disabled:o,required:n,name:i,id:r,onChange:e=>{c&&"function"==typeof c&&c(e),d&&"function"==typeof d&&d({target:{value:e.target.value,name:i}})}},m))})}));var D,B,Y;F.displayName="FileUpload",exports.HEADING_TAGS=void 0,(D=exports.HEADING_TAGS||(exports.HEADING_TAGS={})).H1="h1",D.H2="h2",D.H3="h3",D.H4="h4",D.H5="h5",exports.HEADING_ALIGN=void 0,(B=exports.HEADING_ALIGN||(exports.HEADING_ALIGN={})).LEFT="left",B.CENTER="center",B.RIGHT="right",B.JUSTIFY="justify",B.NOWRAP="nowrap",exports.HEADING_TRANSFORM=void 0,(Y=exports.HEADING_TRANSFORM||(exports.HEADING_TRANSFORM={})).LOWERCASE="lowercase",Y.UPPERCASE="uppercase",Y.CAPITALIZE="capitalize",Y.NORMAL_CASE="normal-case";const G=({children:t,tag:a=exports.HEADING_TAGS.H2,transform:r,align:i,id:n,testID:o,flush:l,className:c,singleLine:d})=>{const m=(()=>{switch(a){case"h1":return"text-5xl md:text-5xl lg:text-5xl";case"h2":return"text-4xl md:text-4xl lg:text-4xl";case"h3":return"text-3xl md:text-3xl lg:text-3xl";case"h4":default:return"text-2xl md:text-2xl lg:text-2xl";case"h5":return"text-lg md:text-lg lg:text-lg"}})(),u=a,p=s(`m-0 p-0 font-heading font-bold ${m}`,{[`text-${i}`]:i},{"mb-2":!l},{"m-0":l},{"whitespace-nowrap text-ellipsis overflow-hidden":d},r,c);return e.jsx(u,{"data-testid":o||n||"Heading",className:p,children:t})};G.displayName="Heading";const U=({size:t="small"})=>e.jsx("hr",{className:s("border-0 border-b border-darkBodyText dark:border-darkBodyText",{"mt-4 mb-4":"small"===t,"mt-8 mb-8":"medium"===t,"mt-16 mb-16 ":"large"===t})});U.displayName="Hr";const V=a=>{var{src:r,alt:i,title:n,caption:o,figure:l=!1,onLoad:c,id:d,className:m,sizes:u="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",testID:p}=a,x=w(a,["src","alt","title","caption","figure","onLoad","id","className","sizes","testID"]);try{const e=require("next/image").default;if(!e)throw new Error("Next.js Image not found");const s=!x.width,a=s?{sizes:u}:{};return t.createElement(e,Object.assign(Object.assign({src:r,alt:i,title:n,fill:s,onLoad:c,className:m},a),x))}catch(t){const a=s("m-0"),u=s("w-full h-full",m);return l||o?e.jsxs("figure",{"data-testid":p||d||"Image",className:a,children:[e.jsx("img",{onLoad:c,src:r,alt:i,title:n,className:u}),o&&e.jsx("figcaption",{children:o})]}):e.jsx("img",{"data-testid":p||d||"Image",onLoad:c,src:r,alt:i,title:n,className:u})}};V.displayName="Image";const H=({children:t,id:a,transform:i,className:n})=>e.jsx("label",{"data-testid":"Label",className:r.twMerge(s("label mb-2",i,n)),htmlFor:a,children:t});var q,z;H.displayName="Label",exports.Variants=void 0,(q=exports.Variants||(exports.Variants={})).UNSTYLED="unstyled",q.INLINE="inline",q.SMALL="small",q.LARGE="large",exports.ListTag=void 0,(z=exports.ListTag||(exports.ListTag={})).OL="ol",z.UL="ul",z.DL="dl",z.DIV="div",z.DT="dt",z.DD="dd",z.LI="li";const W=({variants:t,children:a,as:r=exports.ListTag.UL,id:i,testID:n,className:o})=>{const l=t?t.map((e=>`list--${e}`)):null,c=r;return e.jsx(c,{"data-testid":n||i||"List",className:s(l,o),children:a})};W.displayName="List";const Z=({testID:t,logo:a,className:r,aspectRatioClass:i="aspect-[1/1]"})=>e.jsx("div",{"data-testid":t||"Logo",className:s("relative w-full",i,r),children:e.jsx(V,{src:a,alt:"logo",fill:!0,sizes:"(max-width: 600px) 100px, 200px",priority:!0})});Z.displayName="Logo";const $=({id:t,testID:a,title:r,text:i,icon:n,type:o,onCloseCallback:l,onClickCallback:c,actionText:d})=>{const m=s("p-4 rounded relative",{"bg-info text-white":"info"===o,"bg-success text-white":"success"===o,"bg-warning text-black":"warning"===o,"bg-error text-white":"error"===o});return e.jsx("div",{"data-testid":a||t||"Notice",className:m,children:e.jsxs("div",{className:"flex gap-2",children:[n&&e.jsx("div",{className:"mr-2",children:e.jsx(A,{name:n})}),e.jsxs("div",{children:[r&&e.jsx(G,{tag:exports.HEADING_TAGS.H3,children:r}),e.jsx(M,{className:"mb-0",children:i})]}),c&&d&&e.jsx("div",{className:"ml-auto flex items-end",children:e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,onClick:c,"aria-label":"Action",size:exports.BTN_SIZES.SMALL,children:d})}),l&&e.jsx("div",{className:"absolute top-2 right-4",children:e.jsx(E,{variant:exports.BTN_VARIANTS.LINK,icon:"mdi:close",onClick:l,"aria-label":"Close"})})]})})};$.displayName="Notice";const X=t.forwardRef((function(t,a){var{name:r,required:i,className:n,options:o}=t,l=w(t,["name","required","className","options"]);return e.jsx("div",{"data-testid":"Radio",className:s("flex items-center",n),children:e.jsx("div",{className:s("flex flex-col gap-2",n),children:null==o?void 0:o.map((t=>{var s;const n=(null===(s=null==t?void 0:t.value)||void 0===s?void 0:s.toString())||void 0;return e.jsxs("div",{className:"flex items-center relative",children:[e.jsxs("div",{className:"relative flex items-center",children:[e.jsx("input",Object.assign({ref:a,name:r,type:"radio",required:i,className:"form-item radio peer appearance-none m-0 p-0 w-4 h-4"},l,{id:n,value:n})),e.jsx("div",{className:"form-icon opacity-0 peer-checked:opacity-100 absolute w-4 h-4 flex items-center justify-center top-0 left-0 pointer-events-none",children:e.jsx(A,{name:"mdi:circle",size:12})})]}),e.jsx("label",{className:"label pl-2 leading-none",htmlFor:n,children:t.label})]},n)}))})})}));X.displayName="Radio";const K=t.forwardRef((function(t,a){var{id:r,name:i,required:n,disabled:o,className:l}=t,c=w(t,["id","name","required","disabled","className"]);return e.jsxs("label",{"data-testid":"Switch",className:s("inline-flex items-center cursor-pointer",l),children:[e.jsx("input",Object.assign({ref:a,id:r,name:i,type:"checkbox",value:"",className:"sr-only peer",disabled:o,required:n},c)),e.jsx("div",{className:"form-item switch peer-focus:ring-info dark:peer-focus:ring-info relative w-11 h-6 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[1px] after:start-[1px] after:bg-white after:border after:rounded-full after:h-5 after:w-5 after:transition-all transition-all"})]})}));var J;K.displayName="Switch",function(e){e.TEXT="text",e.PASSWORD="password",e.EMAIL="email",e.NUMBER="number",e.TEL="tel",e.URL="url",e.SEARCH="search",e.DATE="date",e.TIME="time",e.DATETIME="datetime-local",e.MONTH="month",e.WEEK="week",e.FILE="file",e.TEXTAREA="textarea",e.HIDDEN="hidden"}(J||(J={}));const Q=t.forwardRef((function(a,r){var{type:i=J.TEXT,required:n=!1,className:o,onChange:l,placeholder:c,icon:d,disabled:m=!1,name:u,autoComplete:p}=a,x=w(a,["type","required","className","onChange","placeholder","icon","disabled","name","autoComplete"]);t.useEffect((()=>{"undefined"!=typeof window&&require("date-input-polyfill")}),[]);const h="date"===i?"dd/mm/yyyy".toUpperCase():c;return i===J.TEXTAREA?e.jsx("div",{"data-testid":"TextInput",className:"relative",children:e.jsx("textarea",Object.assign({ref:r,id:u,autoComplete:u,required:n,"aria-required":n,disabled:m,placeholder:h,onChange:l,rows:4,className:s("form-item text-input resize-none",o)},x))}):e.jsxs("div",{"data-testid":"TextInput",className:"relative",children:[d&&e.jsx("div",{className:"form-icon absolute inset-y-0 start-3 flex items-center ps-3.5 pointer-events-none",children:e.jsx(A,{name:d})}),e.jsx("input",Object.assign({ref:r,id:u,type:i,autoComplete:p,required:n,"aria-required":n,disabled:m,placeholder:h,onChange:l,className:s("form-item text-input",{"pl-12":d},o)},x))]})}));Q.displayName="TextInput";const ee={GLOBAL:{},FORMS:{LOGIN_FORM:{TITLE:"Login",SUBMIT:"Login",FORGOT_PASSWORD:"Forgot password?",REGISTER:"Register",EMAIL:"Email",PASSWORD:"Password"},REGISTER_FORM:{TITLE:"Register",SUBMIT:"Register",EMAIL:"Email",PASSWORD:"Password",PASSWORD_DESCRIPTION:"Password must be at least 8 characters long and contain at least one number, one uppercase letter, one lowercase letter, and one special character."},FORGOT_PASSWORD_FORM:{TITLE:"Forgot Password",SUBMIT:"Send Reset Email",EMAIL:"Email"},RESET_PASSWORD_FORM:{TITLE:"Reset Password",SUBMIT:"Reset Password",PASSWORD:"Password",CONFIRM_PASSWORD:"Confirm Password"},PROFILE_FORM:{TITLE:"Profile",SUBMIT:"Save",FIRST_NAME:"First Name",LAST_NAME:"Last Name",AVATAR:"Avatar",EMAIL:"Email",PASSWORD:"Password",PASSWORD_DESCRIPTION:"Password must be at least 8 characters long and contain at least one number, one uppercase letter, one lowercase letter, and one special character."}},UI:{SHOW:"Show",NO_IMAGE:"No image",UPLOAD:"Upload",SAVE:"Save",CANCEL:"Cancel",DELETE:"Delete",LOGIN_WITH_GOOGLE:"Login with Google",LOGIN_WITH_APPLE:"Login with Apple",SIGNUP_WITH_GOOGLE:"Signup with Google",SIGNUP_WITH_APPLE:"Signup with Apple",BACK_TO_LOGIN:"Back to Login",FORGOT_PASSWORD:"Forgot Password?",SUBMIT:"Submit",LOGIN:"Login",LOGOUT:"Logout",REGISTER:"Register",SOCIAL:{GOOGLE:"Google",FACEBOOK:"Facebook",TWITTER:"Twitter",EMAIL:"Email"},READ_MORE:"Read more",READ_LESS:"Show less",CLOSE:"Close",BACK:"Back",SHARE:"Share",DOWNLOAD:"Download",FORMAT_HOUR:"{hour}hr",FORMAT_HOURS:"{hours}hrs",FORMAT_MINUTE:"{minute}min",FORMAT_MINUTES:"{minutes}mins",LOAD_MORE_LABEL:"Load more",NO_MORE_RESULTS:"That's all folks.",UNKNOWN_ERROR_TITLE:"Unknown error",UNKNOWN_ERROR_MESSAGE:"Sorry, something bad happened! Please try again.",CONTENT_SORT_TITLE:"Sort by",CONTENT_FILTERS_TITLE:"Filters",CONTENT_FILTERS_LABEL:"Filter",CLOSE_FILTERS_LABEL:"Done",CLEAR_ALL_FILTERS_LABEL:"Clear All",CLEAR_FILTERS_LABEL:"Clear",MORE_ITEMS_LABEL:"Next items",PREVIOUS_ITEMS_LABEL:"Previous items",CHOOSE_BTN_LABEL:"Choose",ADD_BTN_LABEL:"Add",SEND_BTN_LABEL:"Send",CANCEL_BTN_LABEL:"Cancel",DONE_BTN_LABEL:"Done",EDIT_BTN_LABEL:"Edit",CHANGE_BTN_LABEL:"Change",REMOVE_BTN_LABEL:"Remove",MESSAGE_PROMPT_BTN_LABEL:"Add one",SELECT_FILE_BTN_LABEL:"Select file",TOO_MANY_REQUESTS_MESSAGE:"Too many requests. Please try again later.",COPYRIGHT:"Copyright",ALL_RIGHTS_RESERVED:"All rights reserved"},ERRORS:{}},te=({testID:s,name:a="avatar",isEditable:r=!0,initValue:i})=>{const[n,o]=t.useState(i);return e.jsxs("div",{"data-testid":s||'"Avatar"',className:"foo-bar",children:[e.jsxs("div",{className:"relative w-[200px] aspect-1 rounded-full border border-solid overflow-hidden flex items-center justify-center m-4",children:[n&&e.jsxs(e.Fragment,{children:[e.jsx(V,{src:n,alt:a,width:200,height:200}),r&&e.jsx("div",{className:"absolute w-full h-full flex items-center justify-center",children:e.jsx(E,{onClick:()=>{o(void 0)},children:ee.UI.REMOVE_BTN_LABEL})})]}),!n&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-full h-full flex items-center justify-center"}),r&&e.jsx("div",{className:"absolute w-full h-full flex items-center justify-center",children:e.jsx(H,{id:a,className:"button cursor-pointer mb-0",children:e.jsx(M,{className:"mb-0",children:ee.UI.UPLOAD})})})]})]}),e.jsx("input",{type:"file",id:a,name:a,className:"hidden",onChange:e=>{var t;const s=null===(t=e.target.files)||void 0===t?void 0:t[0];if(s){const e=URL.createObjectURL(s);o(e)}}})]})};te.displayName="Avatar";const se=({testID:r,bgAsset:i,focalAsset1:n,focalAsset2:o,focalAsset3:l})=>{const c=t.useRef(null),d=a.useInView(c);console.log("isInView",d);const m={opacity:.001,rotate:0,scale:1,x:200,y:0},u={opacity:1,rotate:0,rotateX:0,rotateY:0,scale:1,transition:{damping:60,delay:0,mass:1.2,stiffness:300,type:"spring"},x:0,y:0};return e.jsxs("div",{"data-testid":r||"AnimationSet1",className:s("relative w-full h-full"),children:[i&&e.jsx(a.motion.div,{className:"absolute left-1/2 top-1/2 w-full h-full",initial:{opacity:.001,rotate:0,scale:.5,x:0,y:0,perspective:"1200px",translateX:"-50%",translateY:"-50%"},animate:{opacity:.5,rotate:0,rotateX:0,rotateY:0,scale:1.25,transition:{damping:60,delay:.7,mass:1.2,stiffness:300,type:"spring"},perspective:"1200px",translateX:"-50%",translateY:"-50%",x:0,y:0},transition:{duration:.5},children:e.jsx(V,{src:i.src,alt:i.alt,fill:!0})}),(n||o)&&e.jsxs(a.motion.div,{className:"absolute right-0 top-1/2 z-10 overflow-visible w-3/4 aspect-[0.78/1]",style:{transform:"translateY(-50%)"},children:[n&&e.jsx(a.motion.div,{className:"absolute w-1/2 aspect-[0.35/1] right-16 top-0",initial:m,animate:u,children:e.jsx(V,{src:n.src,alt:n.alt,fill:!0})}),o&&e.jsx(a.motion.div,{className:"absolute w-1/2 aspect-[0.5/1] left-0 top-20",initial:m,animate:Object.assign(Object.assign({},u),{transition:Object.assign(Object.assign({},u.transition),{delay:.3})}),children:e.jsx(V,{src:o.src,alt:o.alt,fill:!0})})]}),l&&e.jsx("div",{className:"absolute w-1/4 aspect-[0.5/1] flex flex-col flex-nowrap p-0 top-10 z-20 items-end justify-end left-10",children:e.jsx(a.motion.div,{className:"relative w-full overflow-visible aspect-[1.2/1]",initial:{opacity:.001,rotate:0,scale:1,x:100,y:0},animate:{opacity:1,rotate:0,rotateX:0,rotateY:0,scale:1,transition:{damping:60,delay:.6,mass:1.2,stiffness:300,type:"spring"},x:0,y:0},children:e.jsx(V,{src:l.src,fill:!0,alt:l.alt})})})]})};se.displayName="AnimationSet1";const ae=({data:a})=>{const[r,i]=t.useState(0);return a?e.jsx("div",{"data-testid":"Tabs",children:e.jsxs(n.Tabs,{onSelect:e=>i(e),children:[e.jsx(n.TabList,{className:"mb-8 flex p-0",children:a.map(((t,a)=>e.jsx(n.Tab,{className:s("list-none rel ative cursor-pointer inline-block flex-1 items-center justify-center p-4",{"border-transparent border-solid border-0 border-b-2":r!==a,"border-primary border-solid border-0 border-b-2":r===a}),children:e.jsx(M,{className:"m-0 text-center",children:t.title})},a)))}),a.map(((t,s)=>e.jsx(n.TabPanel,{className:"",children:t.content},s)))]})}):e.jsx(e.Fragment,{})};ae.displayName="Tabs";const re=`${process.env.AWS_COGNITO_USERPOOL_DOMAIN}/oauth2/authorize?client_id=${process.env.AWS_COGNITO_CLIENT_ID}&response_type=code&scope=aws.cognito.signin.user.admin+email+openid+profile&identity_provider=Google&redirect_uri=${process.env.AWS_COGNITO_REDIRECT_URI}`,ie=`${process.env.AWS_COGNITO_USERPOOL_DOMAIN}/oauth2/authorize?client_id=${process.env.AWS_COGNITO_CLIENT_ID}&response_type=CODE&scope=aws.cognito.signin.user.admin+email+openid+profile&identity_provider=SignInWithApple&redirect_uri=${process.env.AWS_COGNITO_REDIRECT_URI}`,ne={required:"Email required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Invalid email address"}},oe={required:"You must specify a password",minLength:{value:8,message:"Password must have at least 8 characters"},pattern:{value:/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/,message:"Password must contain contain at least one number, one uppercase letter, one lowercase letter, and one special character."}},le=({children:a,className:r,submit:i,onSubmit:n=(()=>{}),onChange:l,hideSubmit:c,ariaSubmitLabel:d,submitID:m,submitVariant:u=exports.BTN_VARIANTS.PRIMARY,initialValues:p={},isBoxed:x=!1,submitType:h=exports.BTN_TYPES.SUBMIT,disabledSubmitWithReturn:f=!1,isDisabled:v=!1})=>{const g=o.useForm({defaultValues:p,mode:"onBlur",reValidateMode:"onChange"});t.useEffect((()=>{if(l&&"function"==typeof l){const e=g.watch(((e,t)=>{l(e,t)}));return()=>e.unsubscribe()}}),[]);const b=s({"sr-only":c}),{formState:{isSubmitting:N,isDirty:j,isValid:y}}=g;return e.jsx(o.FormProvider,Object.assign({},g,{children:e.jsx("div",{"data-testid":"Form",className:s("w-full max-w-s @containers @form"),children:e.jsxs("form",{onSubmit:g.handleSubmit(n),onKeyDown:e=>{f&&"Enter"===e.key&&e.preventDefault()},className:s("w-2xs relative",{"form px-8 pt-6 pb-8 ":x},{"opacity-50":N},r),children:[a,i&&e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(E,{id:m||i,className:b,ariaLabel:d||i||"Submit",type:h,outline:!0,isLoading:N,disabled:N||!y||!j||v,variant:u,children:i})})]})})}))};var ce;le.displayName="Form",exports.FIELD_TYPES=void 0,(ce=exports.FIELD_TYPES||(exports.FIELD_TYPES={})).TEXT="text",ce.TEXTAREA="textarea",ce.SELECT="select",ce.CHECKBOX="checkbox",ce.RADIO="radio",ce.SWITCH="switch",ce.DATE="date",ce.TIME="time",ce.DATETIME="datetime",ce.FILE="file",ce.PASSWORD="password",ce.EMAIL="email",ce.NUMBER="number",ce.TEL="tel",ce.URL="url",ce.SEARCH="search",ce.HIDDEN="hidden";const de=t.forwardRef((function(t,a){var{id:r,name:i,options:n,required:o,className:l,disabled:c}=t,d=w(t,["id","name","options","required","className","disabled"]);if(!n)throw new Error("FormSelect requires options prop");return e.jsx("div",{id:r,className:s("pb-2 min-w-20",l),children:e.jsxs("div",{className:"relative",children:[e.jsx("select",Object.assign({ref:a,name:i,disabled:c,required:o,className:"form-item text-input"},d,{children:n.map(((t,s)=>{var a,r;return e.jsx("option",{value:null===(a=null==t?void 0:t.value)||void 0===a?void 0:a.toString(),disabled:t.disabled,className:"bg-bodyBackground dark:bg-darkBodyBackground",children:t.label},`${null===(r=null==t?void 0:t.value)||void 0===r?void 0:r.toString()}--${s}`)}))})),e.jsx("div",{className:"form-icon absolute inset-0 z-10 pointer-events-none h-full w-12 items-center justify-center top-0 right-0 left-auto flex",children:e.jsx(A,{name:"mdi:chevron-down",size:24,className:"pointer-events-none"})})]})})}));de.displayName="FormSelect";const me=({name:a,type:r,label:i,required:n,className:l,icon:c,options:d,disabled:m,description:u,showPasswordLabel:p,hidePasswordLabel:x,validations:h={},fileUploadCallback:f=(()=>{}),autoComplete:v})=>{var g,b;const[N,j]=t.useState(!1),{control:y,formState:S}=o.useFormContext(),{errors:E}=S,w=i&&r!==exports.FIELD_TYPES.CHECKBOX,T=n||Boolean(h.required)?`${i} *`:i;return e.jsx("div",{className:"relative",children:e.jsxs("div",{"data-testid":"FormField",className:"mb-4",children:[w&&e.jsx("div",{className:"flex items-baseline justify-between",children:e.jsx(H,{id:a,children:T})}),e.jsx("div",{className:"mb-1",children:e.jsx(o.Controller,{defaultValue:"",name:a,control:y,rules:h,render:({field:t})=>((t,r)=>{switch(t){case exports.FIELD_TYPES.HIDDEN:return e.jsx("input",Object.assign({type:J.HIDDEN,disabled:m},r));case exports.FIELD_TYPES.TEXT:return e.jsx(Q,Object.assign({type:J.TEXT,required:n||Boolean(h.required),icon:c,className:l,disabled:m,autoComplete:v},r));case exports.FIELD_TYPES.PASSWORD:{const t=N?J.TEXT:J.PASSWORD,a="appearance-none border-none bg-transparent flex items-center";return e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute right-0 top-0 flex items-center justify-center h-full z-10 pr-2",onClick:()=>j((e=>!e)),role:"button",tabIndex:0,children:N?e.jsx("button",{type:"button","aria-label":x,className:s(a,"form-icon"),children:e.jsx(A,{name:"mdi:eye-off",size:24})}):e.jsx("button",{type:"button","aria-label":p,className:s(a,"form-icon"),children:e.jsx(A,{name:"mdi:eye",size:24})})}),e.jsx(Q,Object.assign({type:t,required:n||Boolean(h.required),icon:c,className:l,disabled:m,autoComplete:v},r))]})}case exports.FIELD_TYPES.TEXTAREA:return e.jsx(Q,Object.assign({type:J.TEXTAREA,required:n||Boolean(h.required),icon:c,className:l,disabled:m},r));case exports.FIELD_TYPES.EMAIL:return e.jsx(Q,Object.assign({type:J.EMAIL,required:n||Boolean(h.required),icon:c,className:l,disabled:m,autoComplete:v},r));case exports.FIELD_TYPES.DATE:return e.jsx(Q,Object.assign({type:J.DATE,required:n||Boolean(h.required),icon:c,className:l,disabled:m},r));case exports.FIELD_TYPES.DATETIME:return e.jsx(Q,Object.assign({type:J.DATETIME,required:n||Boolean(h.required),icon:c,className:l,disabled:m},r));case exports.FIELD_TYPES.NUMBER:return e.jsx(Q,Object.assign({type:J.NUMBER,required:n||Boolean(h.required),icon:c,className:l,disabled:m},r));case exports.FIELD_TYPES.CHECKBOX:return e.jsx(C,Object.assign({required:n||Boolean(h.required),id:a,className:l,label:i,disabled:m},r));case exports.FIELD_TYPES.RADIO:return e.jsx(X,Object.assign({required:n||Boolean(h.required),id:a,className:l,options:d,disabled:m},r));case exports.FIELD_TYPES.SWITCH:return e.jsx(K,Object.assign({id:a,required:n||Boolean(h.required),className:l,disabled:m},r));case exports.FIELD_TYPES.SELECT:return e.jsx(de,Object.assign({required:n||Boolean(h.required),id:a,className:l,disabled:m,label:i,options:d},r));case exports.FIELD_TYPES.FILE:return e.jsx(F,Object.assign({required:n||Boolean(h.required),id:a,className:l,disabled:m,onChangeCallback:e=>{f(e)}},r));default:return e.jsx(Q,Object.assign({type:J.TEXT,required:n||Boolean(h.required),disabled:m,icon:c,className:l},r))}})(r,t)})}),u&&e.jsx("div",{className:"formfield-description",children:e.jsx(M,{size:exports.COPY_SIZE.SMALL,className:"mb-0",children:u})}),E[a]&&e.jsx("div",{className:"formfield-error text-error italic",children:e.jsx(M,{size:exports.COPY_SIZE.SMALL,className:"mb-0",children:null===(b=null===(g=null==E?void 0:E[a])||void 0===g?void 0:g.message)||void 0===b?void 0:b.toString()})})]})})};me.displayName="FormField";const ue=({handleSubmit:t,initialValues:s,showSocialButtons:a=!1})=>e.jsxs("div",{"data-testid":"LoginForm",className:"form-wrapper",children:[e.jsxs(le,{onSubmit:t,submit:ee.FORMS.LOGIN_FORM.SUBMIT,disabledSubmitWithReturn:!0,initialValues:s,children:[e.jsx(me,{name:"email",type:exports.FIELD_TYPES.EMAIL,label:ee.FORMS.LOGIN_FORM.EMAIL,required:!0,validations:ne,autoComplete:"email"}),e.jsx(me,{name:"password",type:exports.FIELD_TYPES.PASSWORD,label:ee.FORMS.LOGIN_FORM.PASSWORD,required:!0,autoComplete:"current-password"})]}),a&&e.jsxs(e.Fragment,{children:[e.jsx(U,{}),e.jsx("div",{className:"flex flex-col gap-4 items-center",children:e.jsxs("div",{className:"flex flex-col gap-4 max-w-[250px]",children:[e.jsx(E,{onClick:()=>window.location.assign(re),variant:exports.BTN_VARIANTS.PRIMARY,iconFirst:!0,icon:"mdi:google",children:ee.UI.LOGIN_WITH_GOOGLE}),e.jsx(E,{onClick:()=>window.location.assign(ie),variant:exports.BTN_VARIANTS.PRIMARY,iconFirst:!0,icon:"mdi:apple",children:ee.UI.LOGIN_WITH_APPLE})]})})]})]});ue.displayName="LoginForm";const pe=({handleSubmit:t,showSocialButtons:s=!1})=>e.jsxs("div",{"data-testid":"RegisterForm",className:"form-wrapper",children:[e.jsxs(le,{onSubmit:t,submit:ee.FORMS.REGISTER_FORM.SUBMIT,disabledSubmitWithReturn:!0,children:[e.jsx(me,{name:"email",type:exports.FIELD_TYPES.EMAIL,label:ee.FORMS.REGISTER_FORM.EMAIL,required:!0,validations:ne,autoComplete:"email"}),e.jsx(me,{name:"password",type:exports.FIELD_TYPES.PASSWORD,label:ee.FORMS.REGISTER_FORM.PASSWORD,required:!0,description:ee.FORMS.REGISTER_FORM.PASSWORD_DESCRIPTION,validations:oe,autoComplete:"new-password"})]}),s&&e.jsxs(e.Fragment,{children:[e.jsx(U,{}),e.jsx("div",{className:"flex flex-col gap-4 items-center",children:e.jsxs("div",{className:"flex flex-col gap-4 max-w-[250px]",children:[e.jsx(E,{onClick:()=>window.location.assign(re),variant:exports.BTN_VARIANTS.PRIMARY,iconFirst:!0,icon:"mdi:google",children:ee.UI.SIGNUP_WITH_GOOGLE}),e.jsx(E,{onClick:()=>window.location.assign(ie),variant:exports.BTN_VARIANTS.PRIMARY,iconFirst:!0,icon:"mdi:apple",children:ee.UI.SIGNUP_WITH_APPLE})]})})]})]});pe.displayName="RegisterForm";const xe=({handleSubmit:t})=>e.jsx("div",{"data-testid":"ForgotPasswordForm",className:"form-wrapper",children:e.jsx(le,{onSubmit:t,submit:ee.FORMS.FORGOT_PASSWORD_FORM.SUBMIT,disabledSubmitWithReturn:!0,children:e.jsx(me,{name:"email",type:exports.FIELD_TYPES.EMAIL,label:ee.FORMS.FORGOT_PASSWORD_FORM.EMAIL,required:!0,validations:ne})})});xe.displayName="ForgotPasswordForm";const he=({loginSubmit:s,registerSubmit:a,passwordForgotSubmit:r,handleTokenCallback:i,showSocialLogin:n=!1})=>{const[o,l]=t.useState(!1);return t.useEffect((()=>{console.log("Authenticator useEffect",process.env),function(){T(this,void 0,void 0,(function*(){if(!process.env.AWS_COGNITO_USERPOOL_DOMAIN||!process.env.AWS_COGNITO_CLIENT_ID||!process.env.AWS_COGNITO_REDIRECT_URI)return;const e=new URLSearchParams(window.location.search).get("code");if(e){const t=`${process.env.AWS_COGNITO_USERPOOL_DOMAIN}/oauth2/token`,s=new URLSearchParams;s.append("grant_type","authorization_code"),s.append("client_id",process.env.AWS_COGNITO_CLIENT_ID),s.append("code",e),s.append("redirect_uri",process.env.AWS_COGNITO_REDIRECT_URI);const a=yield fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:s}),r=yield a.json();r&&i&&"function"==typeof i&&i(r)}}))}()}),[]),e.jsxs("div",{"data-testid":"Authenticator",className:"w-full",children:[!o&&e.jsx(ae,{data:[{title:"Login",content:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ue,{handleSubmit:s,showSocialButtons:n}),e.jsx("div",{className:"mt-4",children:e.jsx(E,{variant:exports.BTN_VARIANTS.LINK,onClick:()=>l(!o),children:o?"Back to Login":"Forgot Password?"})})]})},{title:"Register",content:e.jsx(pe,{handleSubmit:a,showSocialButtons:n})}]}),o&&e.jsx(ae,{data:[{title:"Forgot Password",content:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(xe,{handleSubmit:r}),e.jsx("div",{className:"mt-4",children:e.jsx(E,{variant:exports.BTN_VARIANTS.LINK,onClick:()=>l(!o),children:o?"Back to Login":"Forgot Password?"})})]})}]})]})};he.displayName="Authenticator";const fe="relative rounded-lg overflow-hidden transition duration-300 ease-in-out cursor-pointer hover:scale-105 shadow hover:shadow-lg bg-white text-black hover:bg-primary hover:text-bodyText-inverted",ve=({id:t,title:a,description:i,image:n,className:o,metaData:l,actions:c,padded:d,scaleOnHover:m,onClick:u=(()=>{})})=>e.jsxs("div",{id:t,"data-testid":"CardBasic",className:r.twMerge(s(fe,{"p-8":d},{"hover:scale-100":!m},o)),onClick:u,children:[n&&e.jsx("div",{className:r.twMerge(s("relative w-full overflow-hidden aspect-[16/9]",{rounded:d},n.aspectRatio)),children:e.jsx(V,{fill:!0,src:null==n?void 0:n.src,sizes:"100vh",alt:null==n?void 0:n.alt,className:"absolute inset-0 object-cover"})}),e.jsx("div",{className:"w-full flex flex-col gap-1",children:e.jsxs("div",{className:s({"p-3":!d},{"pt-3":d}),children:[e.jsx("div",{children:a&&e.jsx(G,{tag:exports.HEADING_TAGS.H4,singleLine:!0,children:a})}),e.jsx("div",{children:i&&e.jsx(M,{className:"mb-0",children:i})}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l&&e.jsx("div",{className:"flex shrink-0 mt-2",children:l.map(((t,s)=>0===s?e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[t," ·"]},t):s===l.length-1?e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[" ",t]},t):e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[" ",t," ·"]},t)))}),c&&e.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[c.like&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.like.isActive?"mdi:like":"mdi:like-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.like)||void 0===s?void 0:s.onClick)&&"function"==typeof c.like.onClick&&c.like.onClick({id:t})}}),c.share&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.share.isActive?"mdi:share":"mdi:share-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.share)||void 0===s?void 0:s.onClick)&&"function"==typeof c.share.onClick&&c.share.onClick({id:t})}}),c.save&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.save.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.save)||void 0===s?void 0:s.onClick)&&"function"==typeof c.save.onClick&&c.save.onClick({id:t})}}),c.comment&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.comment.isActive?"mdi:comment":"mdi:comment-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.comment)||void 0===s?void 0:s.onClick)&&"function"==typeof c.comment.onClick&&c.comment.onClick({id:t})}}),c.bookmark&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.bookmark.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.bookmark)||void 0===s?void 0:s.onClick)&&"function"==typeof c.bookmark.onClick&&c.bookmark.onClick({id:t})}}),c.report&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.report.isActive?"mdi:flag":"mdi:flag-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.report)||void 0===s?void 0:s.onClick)&&"function"==typeof c.report.onClick&&c.report.onClick({id:t})}}),c.follow&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.follow.isActive?"mdi:account-plus":"mdi:account-plus-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.follow)||void 0===s?void 0:s.onClick)&&"function"==typeof c.follow.onClick&&c.follow.onClick({id:t})}}),c.download&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.download.isActive?"mdi:download":"mdi:download-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.download)||void 0===s?void 0:s.onClick)&&"function"==typeof c.download.onClick&&c.download.onClick({id:t})}}),c.edit&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.edit.isActive?"mdi:pencil":"mdi:pencil-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.edit)||void 0===s?void 0:s.onClick)&&"function"==typeof c.edit.onClick&&c.edit.onClick({id:t})}}),c.delete&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:c.delete.isActive?"mdi:delete":"mdi:delete-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==c?void 0:c.delete)||void 0===s?void 0:s.onClick)&&"function"==typeof c.delete.onClick&&c.delete.onClick({id:t})}})]})]})]})})]});ve.displayName="CardBasic";const ge=({id:t,title:a,description:r,image:i,className:n,metaData:o,actions:l,onClick:c=(()=>{}),playCallback:d})=>e.jsxs("div",{id:t,"data-testid":"CardBasic",className:s(fe,n),onClick:c,children:[i&&e.jsxs("div",{className:s("relative w-full overflow-hidden aspect-[16/9]",i.aspectRatio),children:[e.jsx(V,{fill:!0,src:null==i?void 0:i.src,sizes:"100vh",alt:null==i?void 0:i.alt,className:"absolute inset-0 object-cover"}),d&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:"mdi:play",size:exports.BTN_SIZES.LARGE,onClick:e=>{e.stopPropagation(),"function"==typeof d&&d(e)}})})]}),e.jsx("div",{className:"w-full flex flex-col gap-1",children:e.jsxs("div",{className:"p-3",children:[e.jsx("div",{children:a&&e.jsx(G,{tag:exports.HEADING_TAGS.H5,singleLine:!0,flush:!0,children:a})}),e.jsx("div",{children:r&&e.jsx(M,{children:r})}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o&&e.jsx("div",{className:"flex shrink-0",children:o.map(((t,s)=>0===s?e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[t," ·"]},t):s===o.length-1?e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[" ",t]},t):e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[" ",t," ·"]},t)))}),l&&e.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[l.like&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.like.isActive?"mdi:like":"mdi:like-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.like)||void 0===s?void 0:s.onClick)&&"function"==typeof l.like.onClick&&l.like.onClick({id:t})}}),l.share&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.share.isActive?"mdi:share":"mdi:share-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.share)||void 0===s?void 0:s.onClick)&&"function"==typeof l.share.onClick&&l.share.onClick({id:t})}}),l.save&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.save.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.save)||void 0===s?void 0:s.onClick)&&"function"==typeof l.save.onClick&&l.save.onClick({id:t})}}),l.comment&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.comment.isActive?"mdi:comment":"mdi:comment-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.comment)||void 0===s?void 0:s.onClick)&&"function"==typeof l.comment.onClick&&l.comment.onClick({id:t})}}),l.bookmark&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.bookmark.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.bookmark)||void 0===s?void 0:s.onClick)&&"function"==typeof l.bookmark.onClick&&l.bookmark.onClick({id:t})}}),l.report&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.report.isActive?"mdi:flag":"mdi:flag-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.report)||void 0===s?void 0:s.onClick)&&"function"==typeof l.report.onClick&&l.report.onClick({id:t})}}),l.follow&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.follow.isActive?"mdi:account-plus":"mdi:account-plus-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.follow)||void 0===s?void 0:s.onClick)&&"function"==typeof l.follow.onClick&&l.follow.onClick({id:t})}}),l.download&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.download.isActive?"mdi:download":"mdi:download-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.download)||void 0===s?void 0:s.onClick)&&"function"==typeof l.download.onClick&&l.download.onClick({id:t})}}),l.edit&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.edit.isActive?"mdi:pencil":"mdi:pencil-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.edit)||void 0===s?void 0:s.onClick)&&"function"==typeof l.edit.onClick&&l.edit.onClick({id:t})}}),l.delete&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:l.delete.isActive?"mdi:delete":"mdi:delete-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var s;e.stopPropagation(),(null===(s=null==l?void 0:l.delete)||void 0===s?void 0:s.onClick)&&"function"==typeof l.delete.onClick&&l.delete.onClick({id:t})}})]})]})]})})]});ge.displayName="CardMedia";const be=({video:t,isMuted:a=!0,id:r,title:i,description:n,image:o,className:c,metaData:d,actions:m,onClick:u=(()=>{})})=>e.jsxs("div",{id:r,"data-testid":"CardVideo",className:s(fe,c),onClick:u,children:[o&&t&&e.jsx("div",{className:s("relative w-full h-full aspect-[16/9]",o.aspectRatio),children:e.jsx(l,{videoId:`video--${r}`,playbackStartDelay:1e3,videoSrc:e.jsx("source",{src:t,type:"video/mp4"}),videoClassName:s("hls-hover-video w-full aspect-[16/9]",o.aspectRatio),sizingMode:"overlay",preload:"none",loop:!1,muted:a,className:s("w-full overflow-hidden aspect-[16/9]",o.aspectRatio),pausedOverlay:e.jsx("div",{className:s("relative w-full overflow-hidden aspect-[16/9]",o.aspectRatio),children:e.jsx(V,{fill:!0,src:null==o?void 0:o.src,width:0,height:0,alt:null==o?void 0:o.alt,className:"absolute inset-0 object-cover"})}),loadingOverlay:e.jsx("div",{className:s("w-full flex items-center justify-center aspect-[16/9]",o.aspectRatio),children:e.jsx("div",{className:"",children:e.jsx(S,{})})})},`${r}--card`)}),e.jsx("div",{className:"w-full flex flex-col gap-1",children:e.jsxs("div",{className:"p-3",children:[e.jsx("div",{children:i&&e.jsx(G,{tag:exports.HEADING_TAGS.H5,singleLine:!0,flush:!0,children:i})}),e.jsx("div",{children:n&&e.jsx(M,{children:n})}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[d&&e.jsx("div",{className:"flex shrink-0",children:d.map(((t,s)=>0===s?e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[t," ·"]},t):s===d.length-1?e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[" ",t]},t):e.jsxs(M,{className:"text-xs",as:exports.COPY_TAG.SMALL,children:[" ",t," ·"]},t)))}),m&&e.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[m.like&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.like.isActive?"mdi:like":"mdi:like-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.like)||void 0===t?void 0:t.onClick)&&"function"==typeof m.like.onClick&&m.like.onClick({id:r})}}),m.share&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.share.isActive?"mdi:share":"mdi:share-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.share)||void 0===t?void 0:t.onClick)&&"function"==typeof m.share.onClick&&m.share.onClick({id:r})}}),m.save&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.save.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.save)||void 0===t?void 0:t.onClick)&&"function"==typeof m.save.onClick&&m.save.onClick({id:r})}}),m.comment&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.comment.isActive?"mdi:comment":"mdi:comment-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.comment)||void 0===t?void 0:t.onClick)&&"function"==typeof m.comment.onClick&&m.comment.onClick({id:r})}}),m.bookmark&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.bookmark.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.bookmark)||void 0===t?void 0:t.onClick)&&"function"==typeof m.bookmark.onClick&&m.bookmark.onClick({id:r})}}),m.report&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.report.isActive?"mdi:flag":"mdi:flag-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.report)||void 0===t?void 0:t.onClick)&&"function"==typeof m.report.onClick&&m.report.onClick({id:r})}}),m.follow&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.follow.isActive?"mdi:account-plus":"mdi:account-plus-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.follow)||void 0===t?void 0:t.onClick)&&"function"==typeof m.follow.onClick&&m.follow.onClick({id:r})}}),m.download&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.download.isActive?"mdi:download":"mdi:download-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.download)||void 0===t?void 0:t.onClick)&&"function"==typeof m.download.onClick&&m.download.onClick({id:r})}}),m.edit&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.edit.isActive?"mdi:pencil":"mdi:pencil-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.edit)||void 0===t?void 0:t.onClick)&&"function"==typeof m.edit.onClick&&m.edit.onClick({id:r})}}),m.delete&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:m.delete.isActive?"mdi:delete":"mdi:delete-outline",size:exports.BTN_SIZES.SMALL,onClick:e=>{var t;e.stopPropagation(),(null===(t=null==m?void 0:m.delete)||void 0===t?void 0:t.onClick)&&"function"==typeof m.delete.onClick&&m.delete.onClick({id:r})}})]})]})]})})]});be.displayName="CardVideo";const Ne=({id:t,title:a,description:i,icon:n,className:o,onClick:l,moreTitle:c,align:d})=>{const m=l?fe:"";return e.jsxs("div",{id:t,"data-testid":"CardIcon",className:r.twMerge(s(m,"p-8 group gap-4 flex flex-col cursor-default",{"items-start":"left"===d},{"items-center":"center"===d},{"items-end":"right"===d},o)),children:[n&&e.jsx("div",{className:s("relative"),children:e.jsx(A,{name:n,size:48})}),e.jsxs("div",{className:s({"text-left":"left"===d},{"text-center":"center"===d},{"text-right":"right"===d}),children:[e.jsx("div",{children:a&&e.jsx(G,{tag:exports.HEADING_TAGS.H5,singleLine:!0,children:a})}),e.jsx("div",{children:i&&e.jsx(M,{align:d,children:i})})]}),l&&e.jsx("div",{className:"flex items-center justify-start gap-2",children:e.jsx(E,{icon:"mdi:arrow-right",variant:exports.BTN_VARIANTS.LINK,onClick:l,children:c})})]})};Ne.displayName="CardIcon";const je=({testID:t,id:a,title:i,description:n,image:o,onClick:l,className:c,padded:d,icon:m})=>e.jsxs("div",{id:a,"data-testid":t||"CardHorz",className:s("relative rounded-lg overflow-hidden flex gap-4 cursor-pointer shadow hover:shadow-lg",{"p-4":d},c),onClick:l,children:[o&&e.jsx("div",{className:"w-1/3 aspect-[1/1]",children:e.jsx("div",{className:r.twMerge(s("relative w-full overflow-hidden h-full",o.aspectRatio)),children:e.jsx(V,{fill:!0,src:null==o?void 0:o.src,alt:null==o?void 0:o.alt,className:"absolute inset-0 object-cover"})})}),m&&e.jsx("div",{className:"py-2 pl-2",children:e.jsx(A,{name:m,size:30})}),e.jsx("div",{className:"flex flex-1 overflow-hidden h-min",children:e.jsxs("div",{className:"flex-col gap-2 py-2 pr-2 overflow-hidden",children:[i&&e.jsx("div",{className:"",children:e.jsx(G,{tag:exports.HEADING_TAGS.H4,children:i})}),n&&e.jsx("div",{children:e.jsx(M,{className:"mb-0",children:n})})]})})]});je.displayName="CardHorz";const ye=({testID:r,className:i,data:n,padded:o,shadow:l=!0})=>{const c=a.motionValue(0);return t.useEffect((()=>{window.matchMedia("(prefers-reduced-motion: reduce)").matches||a.animate(c,200,{duration:.5})}),[c]),n?e.jsxs("div",{"data-testid":r||"CardData",className:s("relative rounded-lg overflow-hidden flex flex-col items-center gap-4",{"p-4":o},{shadow:l},i),children:[(null==n?void 0:n.animateNumber)&&e.jsxs("div",{className:"font-heading text-4xl md:text-4xl lg:text-4xl font-bold",children:[e.jsx(g,{from:n.numberData.from,to:n.numberData.to,numDecimals:n.numberData.numDecimals}),e.jsx("span",{children:null==n?void 0:n.item})]}),!(null==n?void 0:n.animateNumber)&&e.jsx("div",{className:"text-lg",children:e.jsx(G,{tag:exports.HEADING_TAGS.H2,flush:!0,children:null==n?void 0:n.item})}),e.jsx("div",{children:e.jsx(M,{children:null==n?void 0:n.label})})]}):e.jsx(e.Fragment,{})};ye.displayName="CardData";const Ae=t=>{var{variant:s,className:a,data:r}=t,i=w(t,["variant","className","data"]);switch(s){case"basic":default:return e.jsx(ve,Object.assign({className:a},r,i));case"media":return e.jsx(ge,Object.assign({className:a},r,i));case"video":return e.jsx(be,Object.assign({className:a},r,i));case"icon":return e.jsx(Ne,Object.assign({className:a},r,i));case"horz":return e.jsx(je,Object.assign({className:a},r,i));case"data":return e.jsx(ye,Object.assign({className:a},r,i))}};Ae.displayName="Card";const Se=({text:t})=>{const a=t.split(" ");return e.jsx("div",{"data-testid":"DisplayHeading",className:"relative",children:e.jsx(G,{tag:exports.HEADING_TAGS.H1,className:"",children:a.map(((t,r)=>{const i=r===a.length-1,n=`${t}-${r}`;return e.jsxs("span",{children:[e.jsx("span",{className:s({"display-heading relative font-heading":!i},{"inline-block relative font-heading":i}),children:e.jsxs(e.Fragment,{children:[i&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"display-heading--emphasis"}),e.jsx("span",{className:"display-heading--lastword",children:t})]}),!i&&e.jsx("span",{children:t})]})}),!i&&" "]},n)}))})})};var Ee;Se.displayName="DisplayHeading",function(e){e.NONE="py-0",e.ATOM="py-8",e.DEFAULT="py-16",e.ELEMENT="py-24",e.COMPONENT="py-32",e.MODULE="py-40",e.FEATURE="py-64"}(Ee||(Ee={}));const we=({testID:r,cardData:i,title:n,description:o,withSeparators:l,spacing:c=Ee.MODULE})=>{const d=t.useRef(null),m=a.useInView(d,{once:!0});return e.jsxs("div",{ref:d,"data-testid":r||"PanelCards",className:c,children:[(n||o)&&e.jsxs("div",{className:"relative text-center py-8",children:[n&&e.jsx(Se,{text:n}),o&&e.jsx(M,{align:exports.COPY_ALIGN.CENTER,children:o})]}),e.jsx("div",{className:"flex gap-8",children:null==i?void 0:i.map(((t,a)=>e.jsxs("span",{className:"flex gap-8 justify-between",children:[e.jsx("div",{className:s("relative flex flex-1 items-center justify-center",{"":l}),style:{transform:m?"none":"translateY(200px)",opacity:m?1:0,transition:`all 0.9s cubic-bezier(0.17, 0.55, 0.55, 1) ${.1*a}s`},children:e.jsx(Ae,Object.assign({},t))}),l&&a<i.length-1&&e.jsx("div",{className:"w-1 h-10 border-0 border-r border-solid border-primary500"},`separator-${a}`)]},`card-${a}`)))})]})};we.displayName="PanelCards";const Te=({children:t,className:a,spacing:i,padded:n,isNarrow:o,isCentered:l,isFlush:c})=>{const d=r.twMerge(s("container mx-auto my-0",{"px-4":n},{"py-40":"feature"===i},{"py-24":"component"===i},{"py-16":"module"===i},{"py-10":"element"===i},{"py-4":"atom"===i},{"py-0":"none"===i},{"max-w-3xl":o},{"flex items-center justify-center flex-col":l},{"px-0 max-w-full mx-0":c})),m=s("mx-4 md:mx-0",{"w-full":!l},a);return e.jsx("div",{"data-testid":"Container",className:d,children:e.jsx("div",{className:m,children:t})})};Te.displayName="Container";const Ce=({testID:t,title:a,description:r,inversed:i,assets:n,buttonData:o,withBg:l=!0,spacing:c=Ee.DEFAULT})=>e.jsxs("div",{"data-testid":t||"PanelFeature",className:s("relative m-auto w-full flex flex-none flex-nowrap",c),children:[l&&e.jsx("div",{className:"rounded-full blur-[250px] flex flex-none aspect-1 absolute -top-24 -left-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter"}),e.jsx(Te,{children:e.jsxs("div",{className:s("relative flex sm:flex-col md:flex-row flex-nowrap w-full h-min justify-between overflow-visible p-0 items-center gap-16",{"flex-row-reverse":i}),children:[e.jsxs("div",{className:"w-1/2 flex flex-col items-start justify-center",children:[e.jsxs("div",{className:"relative text-left",children:[e.jsx(Se,{text:a}),e.jsx(M,{className:"mb-0",children:r})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 my-8",children:[e.jsx(R,{rounded:!0,text:"New",variant:"info"}),e.jsx(R,{rounded:!0,text:"Trending",variant:"info"}),e.jsx(R,{rounded:!0,text:"Popular",variant:"info"})]}),e.jsx("div",{className:"",children:e.jsx(E,Object.assign({},o))})]}),e.jsx("div",{className:"w-1/2 flex items-center justify-center",children:e.jsx("div",{className:"w-full aspect-[1/1] flex items-center justify-center",children:e.jsx(se,{bgAsset:n.bgAsset,focalAsset1:n.focalAsset1,focalAsset2:n.focalAsset2,focalAsset3:n.focalAsset3})})})]})})]});Ce.displayName="PanelFeature";const Ie=({url:a,sources:i,onReady:n,className:o,options:l={},isYoutube:m=!1,defaultAudioTrack:u="No Music",rounded:p=!0,aspectRatioValue:x})=>{const h=t.useRef(null),f=t.useRef(null),v=t.useRef(null),g=t.useMemo((()=>{switch(x){case"4/3":return{aspectRatio:"4:3",className:"aspect-[4/3]"};case"1/1":return{aspectRatio:"1:1",className:"aspect-[1/1]"};case"3/4":return{aspectRatio:"3:4",className:"aspect-[3/4]"};case"9/16":return{aspectRatio:"9:16",className:"aspect-[9/16]"};case"16/7":return{aspectRatio:"16:7",className:"aspect-[16/7]"};case"16/5":return{aspectRatio:"16:5",className:"aspect-[16/5]"};default:return{aspectRatio:"16:9",className:"aspect-[16/9]"}}}),[x]);return t.useEffect((()=>{var e;if(m)return;const t=Object.assign(Object.assign({autoplay:!0,controls:!0,muted:!1,responsive:!0,fill:!0,fluid:!0,aspectRatio:g.aspectRatio||"16:9",controlBar:{skipButtons:{forward:30,backward:30},volumePanel:{inline:!0}},html5:{hls:{enableLowInitialPlaylist:!0}}},l),{sources:i});if(!v.current){const s=document.createElement("video-js");s.classList.add("vjs-big-play-centered"),null===(e=null==f?void 0:f.current)||void 0===e||e.appendChild(s);const a=v.current=d(s,t,(()=>{d.log("player is ready",a),n&&n(a)}));a.on("loadedmetadata",(function(){const e=a.audioTracks();for(let t=0;t<e.length;t++)e[t].label===u&&(e[t].enabled=!0)}))}}),[l,f]),t.useEffect((()=>{if(m)return;const e=v.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),v.current=null)}}),[v]),m&&a?e.jsx("div",{"data-testid":"Video",className:s("relative w-full h-full aspect-[16/9]",o),children:e.jsx(c,{ref:h,className:"react-player",url:a,width:"100%",height:"100%",controls:!0,onReady:n})}):e.jsx("div",{className:r.twMerge(s("relative w-full overflow-hidden h-full aspect-[16/9] bg-black object-cover",{rouded:p},g.className,o)),children:e.jsx("div",{"data-vjs-player":!0,children:e.jsx("div",{ref:f,className:"object-cover"})})})};Ie.displayName="Video";const Re={replace(t){if("a"===t.name){const s=m.attributesToProps(t.attribs);return e.jsx(I,Object.assign({},s,{children:m.domToReact(t.children,Re)}))}if(t.attribs&&"p"===t.name){const s=m.attributesToProps(t.attribs);return e.jsx(M,Object.assign({},s,{children:m.domToReact(t.children,Re)}))}return t}},ke=({testID:t,data:a,align:r,className:i})=>e.jsx("span",{"data-testid":t||'"HtmlContent"',className:s("relative",{"text-right":"right"===r},{"text-center":"center"===r},{"text-left":"left"===r},i),children:m(a,Re)});ke.displayName="HtmlContent";const Le=({testID:r,title:i,description:n,image:o,buttonData:l={variant:exports.BTN_VARIANTS.PRIMARY,size:exports.BTN_SIZES.LARGE},inversed:c=!1,withBg:d=!0,spacing:m=Ee.MODULE,video:u})=>{const p=a.useAnimation(),x=t.useRef(null),h=a.useInView(x),f={damping:30,delay:0,mass:1.2,stiffness:200,type:"spring",duration:.5};t.useEffect((()=>{h&&p.start((e=>({transform:"none",transition:Object.assign(Object.assign({},f),{delay:.1*e})})))}),[p,h]);const v=t.useMemo((()=>{switch(null==u?void 0:u.aspectRatioValue){case"4/3":return"aspect-[4/3]";case"1/1":return"aspect-[1/1]";case"3/4":return"aspect-[3/4]";case"9/16":return"aspect-[9/16]";case"16/7":return"aspect-[16/7]";case"16/5":return"aspect-[16/5]";default:return"aspect-[16/9]"}}),[u]),g=c?"translateX(100px)":"translateX(-100px)";return e.jsxs("div",{"data-testid":r||"PanelHero",className:s("relative m-auto w-full flex flex-none flex-nowrap",m),children:[d&&e.jsx("div",{className:s("rounded-full blur-[200px] flex flex-none aspect-1 absolute w-[700px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter z-0",{"-bottom-24 right-0":!c,"-top-24 left-0":c})}),e.jsx(Te,{children:e.jsxs("div",{className:s("relative flex sm:flex-col md:flex-row flex-nowrap w-full h-min justify-between overflow-visible p-0 items-center gap-16",{"md:flex-row-reverse":c}),children:[e.jsx("div",{ref:x,className:"w-1/2 flex flex-col items-start justify-center z-10",children:e.jsxs("div",{className:s("relative flex flex-col gap-4 from-bodyBackground p-4 rounded",{"text-right bg-gradient-to-l":!c},{"text-left bg-gradient-to-r":c}),children:[e.jsx(a.motion.div,{initial:{transform:g},custom:0,animate:p,children:e.jsx(Se,{text:i})}),e.jsx(a.motion.div,{initial:{transform:g},custom:1,animate:p,children:e.jsx(ke,{className:"mb-0",align:c?exports.COPY_ALIGN.LEFT:exports.COPY_ALIGN.RIGHT,data:n})}),e.jsx(a.motion.div,{initial:{transform:g},custom:2,animate:p,children:e.jsx("div",{className:s("flex items-center",{"justify-end":!c,"justify-start":c}),children:e.jsx(E,Object.assign({},l))})})]})}),e.jsx("div",{className:"relative w-1/2 z-0",children:e.jsxs("div",{className:s("relative scale-[1.35] rounded overflow-hidden shadow",v),children:[o&&e.jsx(V,{src:o,alt:i,fill:!0}),u&&e.jsx(Ie,{sources:u.sources,options:{autoplay:!0,muted:!0,controls:!1},aspectRatioValue:u.aspectRatioValue})]})})]})})]})};Le.displayName="PanelHero";const Oe=({testID:t,title:a,description:r,image1:i,image2:n,iosLink:o="#",androidLink:l="#",inversed:c=!1,withBg:d=!0,spacing:m=Ee.MODULE})=>e.jsxs("div",{"data-testid":t||"PanelFeature",className:s("relative m-auto w-full flex flex-none flex-nowrap",m),children:[d&&e.jsx("div",{className:"rounded-full blur-[250px] flex flex-none aspect-1 absolute -bottom-24 -right-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter"}),e.jsx(Te,{children:e.jsxs("div",{className:s("relative flex flex-col md:flex-row flex-nowrap w-full h-full overflow-visible gap-16 border border-solid border-primary bg-primary bg-opacity-10 backdrop-blur-lg rounded border-opacityDark20 p-8",{"flex-row-reverse":c}),children:[e.jsxs("div",{className:"w-full md:w-1/2 top-0 relative",children:[e.jsx("div",{className:"absolute aspect-[8/17] -rotate-12 w-[135px] left-1/3 top-4 md:w-[180px] md:left-1/3 md:top-4 lg:w-[210px] lg:left-1/2 lg:-top-1/3",children:e.jsx(V,{src:n,alt:a})}),e.jsx("div",{className:"relative md:absolute aspect-[8/17] -rotate-0 w-[150px] left-0 top-0 md:w-[220px] md:left-0 md:-top-6 lg:w-[250px] lg:left-1/4 lg:-top-1/2",children:e.jsx(V,{src:i,alt:a})})]}),e.jsxs("div",{className:"w-full md:w-1/2",children:[e.jsx("div",{children:e.jsx(Se,{text:a})}),e.jsx("div",{children:e.jsx(M,{children:r})}),e.jsxs("div",{className:"flex items-center justify-start gap-4",children:[e.jsx("div",{className:"relative w-[150px] h-[50px]",children:e.jsx(I,{href:o,target:"_blank",hideExternalIcon:!0,children:e.jsx(V,{src:"https://apple-resources.s3.amazonaws.com/media-badges/download-on-the-app-store/black/en-us.svg",alt:"App Store"})})}),e.jsx("div",{className:"relative w-[190px] h-[75px]",children:e.jsx(I,{href:l,target:"_blank",hideExternalIcon:!0,children:e.jsx(V,{src:"https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png",alt:"Google Play"})})})]})]})]})})]});Oe.displayName="PanelProduct";const _e=({testID:t,className:r,title:i,description:n,spacing:o=Ee.NONE,videoProps:l})=>e.jsxs("div",{"data-testid":t||'"PanelVideo"',className:s("relative m-auto w-full flex flex-none flex-nowrap aspect-[16/6.6]",o,r),children:[e.jsx(Ie,{rounded:!1,options:Object.assign({autoplay:!0,muted:!0,controls:!1,loop:!0},null==l?void 0:l.options),sources:null==l?void 0:l.sources}),e.jsxs("div",{className:"absolute top-0 left-0 w-full h-full z-10",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-gradient-to-r from-transparent to-black opacity-50"}),e.jsxs("div",{className:"absolute top-0 left-0 w-full h-full flex flex-col items-end justify-center pr-24 invert",children:[i&&e.jsx(a.motion.div,{initial:{transform:"translateX(25px)"},animate:{transform:"none",transition:{damping:60,delay:0,mass:1.2,stiffness:300,type:"spring"}},transition:{duration:.5},children:e.jsx("div",{children:e.jsx(G,{tag:exports.HEADING_TAGS.H2,children:i})})}),n&&e.jsx(a.motion.div,{initial:{transform:"translateX(25px)"},animate:{transform:"none",transition:{damping:60,delay:0,mass:1.2,stiffness:300,type:"spring"}},transition:{duration:.5},children:e.jsx("div",{children:e.jsx(M,{children:n})})})]})]})]});_e.displayName="PanelVideo";const Pe=({testID:t,buttonData:a})=>e.jsx("div",{"data-testid":t||"ButtonGroup",className:"inline-flex rounded",role:"group",children:null==a?void 0:a.map(((t,r)=>{const i=r>0&&r<a.length-1,n=0===r,o=r===a.length-1,l=s({"rounded-none":i},{"rounded-r":n,"rounded-l":o});return e.jsx("div",{children:e.jsx(E,Object.assign({},t,{className:l,children:t.children}))},t.id)}))});Pe.displayName="ButtonGroup";const Me=({testID:t,url:s,title:a="Share",enabled:r={facebook:!0,twitter:!0}})=>e.jsxs("div",{"data-testid":t||"Share",className:"flex gap-2 items-center ",children:[e.jsx("div",{children:e.jsxs(M,{as:exports.COPY_TAG.P,className:"mb-0",children:[ee.UI.SHARE,":"]})}),(null==r?void 0:r.facebook)&&e.jsx(u.FacebookShareButton,{url:s,title:a,className:"",children:e.jsx(A,{name:"mdi:facebook"})}),(null==r?void 0:r.twitter)&&e.jsx(u.TwitterShareButton,{url:s,title:a,className:"",children:e.jsx(A,{name:"mdi:twitter"})}),(null==r?void 0:r.whatsapp)&&e.jsx(u.WhatsappShareButton,{url:s,title:a,className:"",children:e.jsx(A,{name:"mdi:whatsapp"})}),(null==r?void 0:r.email)&&e.jsx(u.EmailShareButton,{url:s,title:a,className:"",children:e.jsx(A,{name:"mdi:email"})}),(null==r?void 0:r.linkedin)&&e.jsx(u.LinkedinShareButton,{url:s,title:a,className:"",children:e.jsx(A,{name:"mdi:linkedin"})})]});Me.displayName="Share";const Fe=({testID:t,facebook:s,twitter:a,instagram:r,linkedin:i})=>e.jsxs("div",{"data-testid":t||'"VisitUs"',className:"flex gap-2",children:[s&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,size:exports.BTN_SIZES.MEDIUM,icon:"mdi:facebook",onClick:()=>window.open(s.url)}),a&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,size:exports.BTN_SIZES.MEDIUM,icon:"mdi:twitter",onClick:()=>window.open(a.url)}),r&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,size:exports.BTN_SIZES.MEDIUM,icon:"mdi:instagram",onClick:()=>window.open(r.url)}),i&&e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,size:exports.BTN_SIZES.MEDIUM,icon:"mdi:linkedin",onClick:()=>window.open(i.url)})]});Fe.displayName="VisitUs";const De=({testID:t,title:a,links:i,inline:n=!0,separators:o=!1,className:l})=>e.jsxs("div",{"data-testid":t||'"Menu"',className:r.twMerge(s("flex flex-col gap-2",l)),children:[a&&e.jsx("div",{children:e.jsx(G,{tag:exports.HEADING_TAGS.H3,children:a})}),e.jsx("div",{className:s("flex gap-0 items-center md:items-start",{"flex-row ":n},{"flex-col ":!n}),children:null==i?void 0:i.map(((t,s)=>{const a=`${t.id}--${s}`;return e.jsxs("div",{className:"flex gap-0",children:[e.jsx("div",{className:"relative py-2",children:e.jsxs(I,{href:t.url,className:"flex gap-1",children:[t.icon&&e.jsx(A,{name:t.icon}),t.title&&e.jsx("div",{children:t.title})]})}),o&&s+1<i.length&&e.jsx("div",{className:"h-full flex self-center px-2",children:e.jsx(A,{name:"mdi:dot",className:"opacity-50"})})]},a)}))})]});De.displayName="Menu";const Be=({testID:t,children:a,withBg:r=!0,inversed:i=!1})=>e.jsxs("div",{"data-testid":t||"PanelHero",className:"relative py-8 m-auto w-full flex flex-none flex-nowrap",children:[r&&e.jsx("div",{className:s("rounded-full blur-[200px] flex flex-none aspect-1 absolute w-[700px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter z-0",{"-bottom-24 right-0":!i,"-top-24 left-0":i})}),e.jsx(Te,{children:a})]});var Ye;Be.displayName="Hero",exports.CPL_SPACING=void 0,(Ye=exports.CPL_SPACING||(exports.CPL_SPACING={})).NONE="none",Ye.ATOM="atom",Ye.DEFAULT="default",Ye.ELEMENT="element",Ye.COMPONENT="component",Ye.MODULE="module",Ye.FEATURE="feature";const Ge=({spacing:t=exports.CPL_SPACING.DEFAULT,children:a,narrow:r,flush:i,className:n})=>{const o=s("flex","flex-col","flex-1","relative",{"py-40":"feature"===t},{"py-24":"component"===t},{"py-16":"module"===t},{"py-10":"element"===t},{"py-8":"default"===t},{"py-4":"atom"===t},{"py-0":"none"===t},{"max-w-5xl":r},{"p-0":i},n);return e.jsx("div",{"data-testid":"ContentPageLayout",className:o,children:a})};var Ue;Ge.displayName="ContentPageLayout",exports.CRL_SIZE=void 0,(Ue=exports.CRL_SIZE||(exports.CRL_SIZE={})).NONE="none",Ue.ATOM="atom",Ue.DEFAULT="default",Ue.ELEMENT="element",Ue.COMPONENT="component",Ue.MODULE="module",Ue.FEATURE="feature";const Ve=({className:t,children:a,size:r=exports.CRL_SIZE.DEFAULT})=>{const i=s("grid","auto-rows-min","grid-cols-1","gap-x-4",{"gap-y-0 mb-0":"none"===r},{"gap-y-2 mb-2":"atom"===r},{"gap-y-4 mb-4":"default"===r},{"gap-y-8 mb-8":"element"===r},{"gap-y-16 mb-16":"module"===r},{"gap-y-24 mb-24":"component"===r},{"gap-y-40 mb-40":"feature"===r},t);return e.jsx("div",{"data-testid":"ContentRowsLayout",className:i,children:a})};Ve.displayName="ContentRowsLayout";const He=t.createContext({brand:void 0,header:void 0,footer:void 0}),qe=({children:t,value:s})=>e.jsx(He.Provider,{value:s,children:t}),ze=({testID:a,className:r,logoAspectRatio:i="aspect-[16/9]"})=>{var n,o,l,c,d,m,u,p,x,h,f,v,g;const b=t.useContext(He);return e.jsxs("footer",{className:s("w-full md:max-w-screen-lg lg:max-w-screen-xl m-auto pt-16 pb-8",r),children:[e.jsxs("div",{"data-testid":a||'"Footer"',className:"footer flex flex-col md:flex-row py-8 gap-8",children:[e.jsxs("div",{className:"relative w-full md:w-1/3 flex flex-col gap-4 items-center md:items-start",children:[(null===(n=null==b?void 0:b.brand)||void 0===n?void 0:n.logo)&&e.jsx("div",{className:"relative w-24",children:e.jsx(Z,{logo:null===(o=null==b?void 0:b.brand)||void 0===o?void 0:o.logo,aspectRatioClass:i})}),(null===(l=b.footer)||void 0===l?void 0:l.about)&&e.jsx("div",{children:e.jsx(M,{children:b.footer.about})}),e.jsx("div",{children:e.jsx(Fe,{facebook:null===(d=null===(c=b.footer)||void 0===c?void 0:c.visitUs)||void 0===d?void 0:d.facebook,twitter:null===(u=null===(m=b.footer)||void 0===m?void 0:m.visitUs)||void 0===u?void 0:u.twitter,instagram:null===(x=null===(p=b.footer)||void 0===p?void 0:p.visitUs)||void 0===x?void 0:x.instagram,linkedin:null===(f=null===(h=b.footer)||void 0===h?void 0:h.visitUs)||void 0===f?void 0:f.linkedin})})]}),(null===(v=b.footer)||void 0===v?void 0:v.menus)&&e.jsx("div",{className:"flex gap-4 flex-1 flex-col md:flex-row items-center md:items-start",children:b.footer.menus.map(((t,s)=>e.jsx("div",{className:"flex flex-1",children:e.jsx(De,{title:t.title,links:t.links,inline:!1})},`${t.title}--${s}`)))})]}),e.jsxs("div",{className:"flex items-center justify-center flex-col",children:[e.jsxs(M,{align:exports.COPY_ALIGN.CENTER,as:exports.COPY_TAG.SMALL,children:["© ",(new Date).getFullYear()," ",ee.UI.COPYRIGHT," ",null===(g=b.brand)||void 0===g?void 0:g.name]}),e.jsx(M,{align:exports.COPY_ALIGN.CENTER,as:exports.COPY_TAG.SMALL,children:ee.UI.ALL_RIGHTS_RESERVED})]})]})};ze.displayName="Footer";const We=({testID:a,menuLinks:r,profileLinks:i,loginCallback:n,logoutCallback:o,isAuthenticated:l=!1,hideMenu:c=!1,logoAspectRatio:d="aspect-[16/9]",className:m})=>{var u,p,x,h;const f=t.useContext(He),[v,g]=t.useState("hidden"),[b,N]=t.useState(!1),j=()=>{g("hidden"===v?"block":"hidden")};return e.jsxs("header",{"data-testid":a||'"Header"',className:s("w-full md:max-w-screen-lg lg:max-w-screen-xl m-auto py-4 px-4 md:px-2 lg:px-0",m),children:[e.jsxs("div",{className:"relative w-full flex",children:[(null===(u=null==f?void 0:f.brand)||void 0===u?void 0:u.logo)&&e.jsx("div",{className:"relative w-32",children:e.jsx(I,{href:"/",children:e.jsx(Z,{logo:null===(p=null==f?void 0:f.brand)||void 0===p?void 0:p.logo,aspectRatioClass:d})})}),e.jsx("div",{className:"flex-1 hidden md:flex items-center justify-center",children:e.jsx(De,{links:r,separators:!0})}),e.jsxs("div",{className:"hidden md:flex flex-col justify-center",children:[!l&&e.jsx(E,{onClick:n,children:ee.UI.LOGIN}),l&&e.jsxs("div",{className:"relative",children:[e.jsx(E,{onClick:()=>N(!b),icon:b?"mdi:user-outline":"mdi:user"}),e.jsx("div",{onClick:()=>N(!1),className:s("absolute bg-bodyBackground dark:bg-darkBodyBackground shadow rounded py-2 px-4 right-0 top-12 w-24 z-20",{hidden:!b}),children:e.jsx(De,{links:i,inline:!1})})]})]}),e.jsx("div",{className:"flex md:hidden flex-col justify-center flex-1 items-end",children:e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:"mdi:menu",onClick:j})})]}),e.jsxs("div",{className:s("navbar-menu relative z-50",v,{hidden:c}),children:[e.jsx("div",{className:"navbar-backdrop fixed inset-0 bg-black opacity-25"}),e.jsxs("nav",{className:"fixed top-0 left-0 bottom-0 flex flex-col w-5/6 max-w-sm py-4 px-4 bg-bodyBackground dark:bg-darkBodyBackground border-r overflow-y-auto",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("div",{className:"relative w-32",children:(null===(x=null==f?void 0:f.brand)||void 0===x?void 0:x.logo)&&e.jsx("div",{className:"relative w-32",children:e.jsx(Z,{logo:null===(h=null==f?void 0:f.brand)||void 0===h?void 0:h.logo,aspectRatioClass:"aspect-[16/9]"})})}),e.jsx("div",{children:e.jsx(E,{variant:exports.BTN_VARIANTS.PRIMARY,icon:"mdi:close",onClick:j})})]}),e.jsxs("div",{className:"flex flex-col flex-1 gap-4",children:[l&&e.jsx("div",{className:"md:hidden flex justify-center",children:e.jsx(M,{children:"User profile avatar and details here."})}),e.jsx("div",{className:"flex flex-1 justify-center pt-4",children:e.jsx(De,{links:r,inline:!1})}),l&&e.jsx("div",{className:"md:hidden flex justify-center",children:e.jsx(E,{onClick:o,children:ee.UI.LOGOUT})}),!l&&e.jsx("div",{className:"md:hidden flex justify-center",children:e.jsx(E,{onClick:()=>{n(),j()},children:ee.UI.LOGIN})})]})]})]})]})};We.displayName="Header";const Ze=({testID:a,inputCallback:r,seperator:i,numInputs:n=4,shouldAutoFocus:o=!1,size:l="medium"})=>{const[c,d]=t.useState("");t.useEffect((()=>{c&&4===c.length&&void 0!==r&&"function"==typeof r&&r(c)}),[c]);const m=t.useMemo((()=>{switch(l){case"small":return{width:"2.5rem",height:"3rem"};case"medium":return{width:"3.5rem",height:"4rem"};case"large":return{width:"4.5rem",height:"5rem"};default:return{width:"2.5rem",height:"2.5rem"}}}),[l]);return e.jsx("div",{"data-testid":a||'"OTPInput"',className:"foo-bar",children:e.jsx(p,{value:c,onChange:d,inputType:"number",numInputs:n,shouldAutoFocus:o,renderSeparator:i?()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(A,{name:"mdi:dot",className:"opacity-50"})}):e.jsx("div",{className:"flex items-center justify-center w-4"}),renderInput:t=>e.jsx("input",Object.assign({},t,{className:s("remove-arrow form-item text-input w-12")})),inputStyle:{width:m.width,height:m.height}})})};var $e,Xe;function Ke({className:t,label:a,onChange:r,options:i}){return e.jsxs("div",{className:s("m-0 p-0 mb-2 border-none",t),children:[e.jsx(H,{className:"text-sm",transform:exports.COPY_TRANSFORM.UPPERCASE,children:a}),e.jsx(de,{id:a||"Sorting",options:i,onChange:e=>r(e.target.value)})]})}function Je(t){var{className:a,current:r,resultsPerPage:i=10,onChange:n,totalPages:o}=t,l=w(t,["className","current","resultsPerPage","onChange","totalPages"]);return e.jsx(f,Object.assign({current:r,onChange:n,simple:!0,pageSize:i,total:o*i,className:s("m-0 p-0 list-none text-bodyText flex gap-2 text-center items-center [&>li>span]:px-2",a),locale:v,prevIcon:e.jsx("div",{className:"text-bodyText",children:e.jsx(A,{name:"mdi:chevron-left"})}),nextIcon:e.jsx("div",{className:"text-bodyText",children:e.jsx(A,{name:"mdi:chevron-right"})})},l))}function Qe({className:t,onChange:a,options:r,label:i}){return r?e.jsxs("div",{className:s("m-0 p-0 border-none flex items-center justify-end",t),children:[e.jsx(H,{className:"text-sm mr-2",transform:exports.COPY_TRANSFORM.UPPERCASE,children:ee.UI.SHOW}),e.jsx(de,{id:i||"ResultsPerPage",options:r.map((e=>({label:e.toString(),value:e}))),onChange:e=>a(e.target.value),className:"min-w-20"})]}):e.jsx(e.Fragment,{})}function et(t){var{className:a,end:r,searchTerm:i,start:n,totalResults:o}=t,l=w(t,["className","end","searchTerm","start","totalResults"]);return e.jsxs("div",Object.assign({className:s("m-0 p-0",a)},l,{children:["Showing"," ",e.jsxs("strong",{children:[n," - ",r]})," ","out of ",e.jsx("strong",{children:o}),i&&e.jsxs(e.Fragment,{children:[" ","for: ",e.jsx("em",{children:i})]})]}))}function tt({className:a,onChange:r,onSubmit:i,wasSearched:n,placeholder:o}){const l=t.useContext(h.SearchContext);return e.jsx("div",{className:s("m-0 px-48",a),children:e.jsxs("form",{onSubmit:e=>i(e),className:"flex items-center",children:[e.jsx("div",{className:"flex-1 bg-bodyBackground dark:bg-darkBodyBackground bg-opacity-80",children:e.jsx(Q,{name:"SearchBoxInput",type:J.TEXT,placeholder:o||"Search now...",onChange:e=>{var t;r(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)}})}),e.jsx("div",{className:"pl-4",children:e.jsxs("div",{className:"flex flex-row gap-2",children:[n&&e.jsx(E,{type:exports.BTN_TYPES.BUTTON,onClick:()=>l.driver.reset(),variant:exports.BTN_VARIANTS.SECONDARY,children:"Reset"}),e.jsx(E,{type:exports.BTN_TYPES.SUBMIT,variant:exports.BTN_VARIANTS.PRIMARY,children:"Search"})]})})]})})}function st({className:t,children:a,header:r,bodyContent:i,bodyFooter:n,bodyHeader:o,sideContent:l}){const c=s("hidden md:block fixed md:relative w-full h-full left-0 md:left-auto top-0 md:top-auto px-2 pb-4 md:pt-6 md:px-6 md:pb-auto md:pl-0",{"hidden md:hidden":!l});return e.jsxs("div",{className:s("w-full flex flex-col",t),children:[e.jsx("div",{className:"m-auto md:py-0 w-full",children:r}),e.jsxs("div",{className:s("md:grid m-auto md:py-0 w-full",{"md:grid-cols-searchLayout":!l,"md:grid-cols-searchayoutWithidebar":l}),children:[e.jsx("div",{className:c,children:l}),e.jsxs("div",{className:s("p-0 pt-2 md:p-6 md:pr-0",{"md:pl-0":!l}),children:[e.jsx("div",{className:"flex items-center justify-between",children:o}),e.jsx("div",{className:"relative",children:a||i}),e.jsx("div",{className:"flex items-center justify-around",children:n})]})]})]})}function at(t){var{children:a,className:r,gridClasses:i}=t,n=w(t,["children","className","gridClasses"]);const o=i||"grid-cols-1 md:grid-cols-2 lg:grid-cols-3";return e.jsx("ul",Object.assign({className:s("relative grid gap-4 mb-4",o,r)},n,{children:a}))}function rt(e){return null==e?"":Object.prototype.hasOwnProperty.call(e,"name")?e.name:String(e)}function it(e,t){if(e)return e[t]}function nt(e){const t=it(e,"snippet")||(s=function(e){return it(e,"raw")}(e),s?String(s).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):"");var s;return Array.isArray(t)?t.join(", "):t}function ot({className:t,result:a,as:r,cardMap:i={idField:{fieldName:"uuid"},titleField:{fieldName:"title"},descriptionField:{fieldName:"description"},imageField:{fieldName:"image"}}}){const{idField:n,titleField:o,imageField:l,videoField:c,descriptionField:d,metaDataFields:m,cardProps:u}=i,p=n&&nt(a[n.fieldName]),x=o&&nt(a[o.fieldName]),h=l&&nt(a[l.fieldName]),f=c&&c.formatter?c.formatter(nt(a[c.fieldName])):c&&nt(a[c.fieldName]),v=d&&nt(a[d.fieldName]),g=m&&m.map((e=>{const t=nt(a[e.fieldName]);if(e.formatter&&"function"==typeof e.formatter)return e.formatter(t)}));return e.jsx("li",{className:s("relative",t),children:(()=>{const t={id:p,title:x,image:{src:h||"",alt:x||"",title:x||"",width:500,height:500},video:f,description:v,metaData:g,actions:i.actionsData,onClick:i.onClickLink};switch(r){case exports.ResultAsTypes.cardMedia:return e.jsx(Ae,Object.assign({variant:exports.CardVariant.MEDIA,data:t},u));case exports.ResultAsTypes.cardVideo:return e.jsx(Ae,Object.assign({variant:exports.CardVariant.VIDEO,data:t},u,{isMuted:!1}));default:return e.jsx(Ae,Object.assign({variant:exports.CardVariant.BASIC,data:t},u))}})()})}function lt({className:t,label:a,onChange:r,options:i}){const n=i.map((e=>({value:e.value,label:`${e.value} (${e.count})`})));return e.jsxs("fieldset",{className:s("m-0 p-0 mt-4 mb-2 border-none",t),children:[e.jsx(H,{className:"text-sm",transform:exports.COPY_TRANSFORM.UPPERCASE,children:a}),e.jsx(de,{id:a,options:n,onChange:e=>r(e.target.value)})]})}function ct({className:t,label:a,onRemove:r,onSelect:i,options:n}){const o=n.filter((e=>e.selected)).map((e=>e.value))[0];return e.jsx("fieldset",{className:s("m-0 p-0 mt-4 mb-2 border-none",t),children:e.jsxs("div",{children:[e.jsx(H,{className:"text-sm",transform:exports.COPY_TRANSFORM.UPPERCASE,children:a}),e.jsxs("ul",{className:"ul list-none p-0",children:[o&&e.jsxs("li",{className:"m-0 flex justify-between items-center flex-1",children:[rt(o),e.jsx("span",{className:"ml-1 px-1",children:e.jsx(E,{onClick:()=>r(o),children:e.jsx(A,{name:"mdi:close"})})})]}),!o&&n.map((t=>{const s=rt(t.value);return e.jsxs("li",{className:"m-0 flex justify-between",children:[e.jsx("a",{className:"no-underline text-sm visited:text-bodyText","data-transaction-name":`facet - ${a}`,href:"/",onClick:e=>{e.preventDefault(),i(t.value)},children:e.jsx("label",{className:"label pl-0 leading-none text-sm",children:s})}),e.jsx(M,{as:exports.COPY_TAG.SPAN,size:exports.COPY_SIZE.SMALL,children:t.count.toLocaleString("en")})]},s)}))]})]})})}function dt({className:t,label:a,onMoreClick:r,onRemove:i,onSelect:n,options:o,showMore:l,showSearch:c,onSearch:d,searchPlaceholder:m}){return o?e.jsxs("fieldset",{className:s("m-0 p-0 mt-4 mb-2 border-none",t),children:[e.jsx(H,{className:"text-sm",transform:exports.COPY_TRANSFORM.UPPERCASE,children:a}),c&&e.jsx("div",{className:"mt-1",children:e.jsx(Q,{type:J.SEARCH,placeholder:m||"Search",onChange:e=>{d(e.target.value)}})}),e.jsxs("div",{className:"my-4",children:[(null==o?void 0:o.length)<1&&e.jsx("div",{children:"No matching options"}),null==o?void 0:o.map((t=>{const s=t.selected,r=t.value,o=rt(r);return e.jsxs("div",{className:"flex justify-between pb-2",children:[e.jsx(C,{id:`facet_${a}${o}`,"data-transaction-name":`facet - ${a}`,checked:s,onChange:()=>s?i(r):n(r),label:o}),e.jsx(M,{as:exports.COPY_TAG.SPAN,size:exports.COPY_SIZE.SMALL,children:t.count.toLocaleString("en")})]},o)}))]}),l&&e.jsx(E,{size:exports.BTN_SIZES.SMALL,variant:exports.BTN_VARIANTS.TERTIARY,onClick:r,"aria-label":"Show more options",children:"+ More"})]}):e.jsx(e.Fragment,{children:"Options required"})}Ze.displayName="OTPInput",exports.CardVariant=void 0,($e=exports.CardVariant||(exports.CardVariant={})).BASIC="basic",$e.MEDIA="media",$e.VIDEO="video",$e.ICON="icon",$e.HORZ="horz",$e.DATA="data",exports.ResultAsTypes=void 0,(Xe=exports.ResultAsTypes||(exports.ResultAsTypes={})).cardBasic="cardBasic",Xe.cardMedia="cardMedia",Xe.cardVideo="cardVideo",Ke.displayName="Sorting",Je.displayName="Paging",Qe.displayName="ResultsPerPage",et.displayName="PagingInfo",tt.displayName="SearchBox",st.displayName="Layout",at.displayName="Results",ot.displayName="Result",lt.displayName="SingleSelectFacet",ct.displayName="SingleLinksFacet",dt.displayName="MultiCheckboxFacet";const mt=({handleSubmit:t})=>e.jsx("div",{"data-testid":"ResetPasswordForm",className:"form-wrapper",children:e.jsx(le,{onSubmit:t,submit:ee.FORMS.RESET_PASSWORD_FORM.SUBMIT,disabledSubmitWithReturn:!0,children:e.jsx(me,{name:"password",type:exports.FIELD_TYPES.PASSWORD,label:ee.FORMS.RESET_PASSWORD_FORM.PASSWORD,required:!0,validations:oe})})});mt.displayName="ResetPasswordForm";const ut=({testID:t,initialValues:s,handleSubmit:a})=>e.jsx("div",{"data-testid":t||'"ProfileForm"',className:"form-wrapper",children:e.jsxs(le,{onSubmit:a,submit:ee.FORMS.PROFILE_FORM.SUBMIT,disabledSubmitWithReturn:!0,initialValues:s,children:[e.jsx("div",{className:"mb-4",children:e.jsx(te,{name:"avatar",initValue:null==s?void 0:s.avatar})}),e.jsx(me,{name:"firstName",type:exports.FIELD_TYPES.TEXT,label:ee.FORMS.PROFILE_FORM.FIRST_NAME,required:!0}),e.jsx(me,{name:"lastName",type:exports.FIELD_TYPES.TEXT,label:ee.FORMS.PROFILE_FORM.LAST_NAME,required:!0}),e.jsx(me,{name:"email",type:exports.FIELD_TYPES.EMAIL,label:ee.FORMS.PROFILE_FORM.EMAIL,required:!0,validations:ne})]})});ut.displayName="ProfileForm";const pt={isDarkTheme:!1,toggleTheme:()=>console.log("toggleTheme")},xt=t.createContext(pt),ht={colors:{white:"#FFF",black:"#000",primary:"#222",secondary:"#666",tertiary:"#EEE",accent:"#1FB2A6",neutral:"#191D24",info:"#3ABFF8",success:"#36D399",warning:"#FBBD23",error:"#F87272",opacityDark10:"rgba(0, 0, 0, 0.1)",opacityDark20:"rgba(0, 0, 0, 0.2)",opacityDark30:"rgba(0, 0, 0, 0.3)",opacityDark40:"rgba(0, 0, 0, 0.4)",opacityDark50:"rgba(0, 0, 0, 0.5)",opacityDark60:"rgba(0, 0, 0, 0.6)",opacityDark70:"rgba(0, 0, 0, 0.7)",opacityDark80:"rgba(0, 0, 0, 0.8)",opacityDark90:"rgba(0, 0, 0, 0.9)",opacityLight10:"rgba(255, 255, 255, 0.1)",opacityLight20:"rgba(255, 255, 255, 0.2)",opacityLight30:"rgba(255, 255, 255, 0.3)",opacityLight40:"rgba(255, 255, 255, 0.4)",opacityLight50:"rgba(255, 255, 255, 0.5)",opacityLight60:"rgba(255, 255, 255, 0.6)",opacityLight70:"rgba(255, 255, 255, 0.7)",opacityLight80:"rgba(255, 255, 255, 0.8)",opacityLight90:"rgba(255, 255, 255, 0.9)",primary50:"#F2F2F2",primary100:"#E6E6E6",primary200:"#CCCCCC",primary300:"#B3B3B3",primary400:"#999999",primary500:"#808080",primary600:"#666666",primary700:"#4D4D4D",primary800:"#333333",primary900:"#1A1A1A",secondary50:"#FDFDFD",secondary100:"#FBFBFB",secondary200:"#F8F8F8",secondary300:"#F5F5F5",secondary400:"#F2F2F2",secondary500:"#EFEFEF",secondary600:"#ECECEC",secondary700:"#E9E9E9",secondary800:"#E6E6E6",secondary900:"#E3E3E3",tertiary50:"#F8F8F8",tertiary100:"#F1F1F1",tertiary200:"#EAEAEA",tertiary300:"#E3E3E3",tertiary400:"#DCDCDC",tertiary500:"#D5D5D5",tertiary600:"#CECECE",tertiary700:"#C7C7C7",tertiary800:"#C0C0C0",tertiary900:"#B9B9B9",accent50:"#E5F8F6",accent100:"#CCEFF0",accent200:"#B2E6E6",accent300:"#99DDDD",accent400:"#7FD4D4",accent500:"#66CBCB",accent600:"#4DB2B2",accent700:"#339999",accent800:"#1A8080",accent900:"#006666",neutral50:"#F8F8F8",neutral100:"#F1F1F1",neutral200:"#EAEAEA",neutral300:"#E3E3E3",neutral400:"#DCDCDC",neutral500:"#D5D5D5",neutral600:"#CECECE",neutral700:"#C7C7C7",neutral800:"#C0C0C0",neutral900:"#B9B9B9",info50:"#E6F9FD",info100:"#CFF3FB",info200:"#B8EDF8",info300:"#A1E7F6",info400:"#8AE1F3",info500:"#73DBF1",info600:"#5CC5DA",info700:"#469EB3",info800:"#2F788C",info900:"#195165",success50:"#E6FDEE",success100:"#CFFBDD",success200:"#B8F8CC",success300:"#A1F6BB",success400:"#8AEDAA",success500:"#73E499",success600:"#5CC482",success700:"#469E6C",success800:"#2F784F",success900:"#195133",warning50:"#FEF9E6",warning100:"#FDF3CD",warning200:"#FCECB4",warning300:"#FBDF8B",warning400:"#FAD262",warning500:"#F9C639",warning600:"#E0AD32",warning700:"#B78C27",warning800:"#8E6B1D",warning900:"#654A13",error50:"#FCE6E6",error100:"#F9CDCD",error200:"#F6B4B4",error300:"#F29999",error400:"#EF8080",error500:"#EC6666",error600:"#D95252",error700:"#B34040",error800:"#8E2E2E",error900:"#6B1B1B",grey50:"#F8F8F8",grey100:"#F1F1F1",grey200:"#EAEAEA",grey300:"#E3E3E3",grey400:"#DCDCDC",grey500:"#C0C0C0",grey600:"#A9A9A9",grey700:"#8C8C8C",grey800:"#666666",grey900:"#404040",purple50:"#ede9f4",purple100:"#c8b9de",purple200:"#ae98ce",purple300:"#8968b7",purple400:"#724ba9",purple500:"#4f1e94",purple600:"#481b87",purple700:"#381569",purple800:"#2b1151",purple900:"#210d3e"},screens:{sm:"480px",md:"768px",lg:"976px",xl:"1440px"},spacing:{px:"1px",0:"0",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem",10:"2.5rem",11:"2.75rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem",32:"8rem",40:"10rem",48:"12rem",56:"14rem",64:"16rem",128:"32rem"},borderRadius:{none:"0",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"3.25rem"}],"6xl":["3.75rem",{lineHeight:"4rem"}],"7xl":["4.5rem",{lineHeight:"5rem"}],"8xl":["6rem",{lineHeight:"7rem"}],"9xl":["8rem",{lineHeight:"9rem"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},extend:{gridTemplateColumns:{headerMd:"200px auto 200px",headerSd:"125px auto 125px",headerXs:"auto 175px",searchLayout:"1fr",searchLayoutWithSidebar:"1fr 3fr"}}};function ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vt={exports:{}},gt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},bt={exports:{}},Nt=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},jt=Array.prototype.concat,yt=Array.prototype.slice,At=bt.exports=function(e){for(var t=[],s=0,a=e.length;s<a;s++){var r=e[s];Nt(r)?t=jt.call(t,yt.call(r)):t.push(r)}return t};At.wrap=function(e){return function(){return e(At(arguments))}};var St=bt.exports,Et=gt,wt=St,Tt=Object.hasOwnProperty,Ct=Object.create(null);for(var It in Et)Tt.call(Et,It)&&(Ct[Et[It]]=It);var Rt=vt.exports={to:{},get:{}};function kt(e,t,s){return Math.min(Math.max(t,e),s)}function Lt(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}Rt.get=function(e){var t,s;switch(e.substring(0,3).toLowerCase()){case"hsl":t=Rt.get.hsl(e),s="hsl";break;case"hwb":t=Rt.get.hwb(e),s="hwb";break;default:t=Rt.get.rgb(e),s="rgb"}return t?{model:s,value:t}:null},Rt.get.rgb=function(e){if(!e)return null;var t,s,a,r=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=t[2],t=t[1],s=0;s<3;s++){var i=2*s;r[s]=parseInt(t.slice(i,i+2),16)}a&&(r[3]=parseInt(a,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(a=(t=t[1])[3],s=0;s<3;s++)r[s]=parseInt(t[s]+t[s],16);a&&(r[3]=parseInt(a+a,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(s=0;s<3;s++)r[s]=parseInt(t[s+1],0);t[4]&&(t[5]?r[3]=.01*parseFloat(t[4]):r[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:Tt.call(Et,t[1])?((r=Et[t[1]])[3]=1,r):null:null;for(s=0;s<3;s++)r[s]=Math.round(2.55*parseFloat(t[s+1]));t[4]&&(t[5]?r[3]=.01*parseFloat(t[4]):r[3]=parseFloat(t[4]))}for(s=0;s<3;s++)r[s]=kt(r[s],0,255);return r[3]=kt(r[3],0,1),r},Rt.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var s=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,kt(parseFloat(t[2]),0,100),kt(parseFloat(t[3]),0,100),kt(isNaN(s)?1:s,0,1)]}return null},Rt.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var s=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,kt(parseFloat(t[2]),0,100),kt(parseFloat(t[3]),0,100),kt(isNaN(s)?1:s,0,1)]}return null},Rt.to.hex=function(){var e=wt(arguments);return"#"+Lt(e[0])+Lt(e[1])+Lt(e[2])+(e[3]<1?Lt(Math.round(255*e[3])):"")},Rt.to.rgb=function(){var e=wt(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},Rt.to.rgb.percent=function(){var e=wt(arguments),t=Math.round(e[0]/255*100),s=Math.round(e[1]/255*100),a=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+s+"%, "+a+"%)":"rgba("+t+"%, "+s+"%, "+a+"%, "+e[3]+")"},Rt.to.hsl=function(){var e=wt(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Rt.to.hwb=function(){var e=wt(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Rt.to.keyword=function(e){return Ct[e.slice(0,3)]};var Ot=vt.exports;const _t=gt,Pt={};for(const e of Object.keys(_t))Pt[_t[e]]=e;const Mt={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Ft=Mt;for(const e of Object.keys(Mt)){if(!("channels"in Mt[e]))throw new Error("missing channels property: "+e);if(!("labels"in Mt[e]))throw new Error("missing channel labels property: "+e);if(Mt[e].labels.length!==Mt[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:s}=Mt[e];delete Mt[e].channels,delete Mt[e].labels,Object.defineProperty(Mt[e],"channels",{value:t}),Object.defineProperty(Mt[e],"labels",{value:s})}Mt.rgb.hsl=function(e){const t=e[0]/255,s=e[1]/255,a=e[2]/255,r=Math.min(t,s,a),i=Math.max(t,s,a),n=i-r;let o,l;i===r?o=0:t===i?o=(s-a)/n:s===i?o=2+(a-t)/n:a===i&&(o=4+(t-s)/n),o=Math.min(60*o,360),o<0&&(o+=360);const c=(r+i)/2;return l=i===r?0:c<=.5?n/(i+r):n/(2-i-r),[o,100*l,100*c]},Mt.rgb.hsv=function(e){let t,s,a,r,i;const n=e[0]/255,o=e[1]/255,l=e[2]/255,c=Math.max(n,o,l),d=c-Math.min(n,o,l),m=function(e){return(c-e)/6/d+.5};return 0===d?(r=0,i=0):(i=d/c,t=m(n),s=m(o),a=m(l),n===c?r=a-s:o===c?r=1/3+t-a:l===c&&(r=2/3+s-t),r<0?r+=1:r>1&&(r-=1)),[360*r,100*i,100*c]},Mt.rgb.hwb=function(e){const t=e[0],s=e[1];let a=e[2];const r=Mt.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(s,a));return a=1-1/255*Math.max(t,Math.max(s,a)),[r,100*i,100*a]},Mt.rgb.cmyk=function(e){const t=e[0]/255,s=e[1]/255,a=e[2]/255,r=Math.min(1-t,1-s,1-a);return[100*((1-t-r)/(1-r)||0),100*((1-s-r)/(1-r)||0),100*((1-a-r)/(1-r)||0),100*r]},Mt.rgb.keyword=function(e){const t=Pt[e];if(t)return t;let s,a=1/0;for(const t of Object.keys(_t)){const n=(i=_t[t],((r=e)[0]-i[0])**2+(r[1]-i[1])**2+(r[2]-i[2])**2);n<a&&(a=n,s=t)}var r,i;return s},Mt.keyword.rgb=function(e){return _t[e]},Mt.rgb.xyz=function(e){let t=e[0]/255,s=e[1]/255,a=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;return[100*(.4124*t+.3576*s+.1805*a),100*(.2126*t+.7152*s+.0722*a),100*(.0193*t+.1192*s+.9505*a)]},Mt.rgb.lab=function(e){const t=Mt.rgb.xyz(e);let s=t[0],a=t[1],r=t[2];s/=95.047,a/=100,r/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*a-16,500*(s-a),200*(a-r)]},Mt.hsl.rgb=function(e){const t=e[0]/360,s=e[1]/100,a=e[2]/100;let r,i,n;if(0===s)return n=255*a,[n,n,n];r=a<.5?a*(1+s):a+s-a*s;const o=2*a-r,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,n=6*i<1?o+6*(r-o)*i:2*i<1?r:3*i<2?o+(r-o)*(2/3-i)*6:o,l[e]=255*n;return l},Mt.hsl.hsv=function(e){const t=e[0];let s=e[1]/100,a=e[2]/100,r=s;const i=Math.max(a,.01);a*=2,s*=a<=1?a:2-a,r*=i<=1?i:2-i;return[t,100*(0===a?2*r/(i+r):2*s/(a+s)),100*((a+s)/2)]},Mt.hsv.rgb=function(e){const t=e[0]/60,s=e[1]/100;let a=e[2]/100;const r=Math.floor(t)%6,i=t-Math.floor(t),n=255*a*(1-s),o=255*a*(1-s*i),l=255*a*(1-s*(1-i));switch(a*=255,r){case 0:return[a,l,n];case 1:return[o,a,n];case 2:return[n,a,l];case 3:return[n,o,a];case 4:return[l,n,a];case 5:return[a,n,o]}},Mt.hsv.hsl=function(e){const t=e[0],s=e[1]/100,a=e[2]/100,r=Math.max(a,.01);let i,n;n=(2-s)*a;const o=(2-s)*r;return i=s*r,i/=o<=1?o:2-o,i=i||0,n/=2,[t,100*i,100*n]},Mt.hwb.rgb=function(e){const t=e[0]/360;let s=e[1]/100,a=e[2]/100;const r=s+a;let i;r>1&&(s/=r,a/=r);const n=Math.floor(6*t),o=1-a;i=6*t-n,1&n&&(i=1-i);const l=s+i*(o-s);let c,d,m;switch(n){default:case 6:case 0:c=o,d=l,m=s;break;case 1:c=l,d=o,m=s;break;case 2:c=s,d=o,m=l;break;case 3:c=s,d=l,m=o;break;case 4:c=l,d=s,m=o;break;case 5:c=o,d=s,m=l}return[255*c,255*d,255*m]},Mt.cmyk.rgb=function(e){const t=e[0]/100,s=e[1]/100,a=e[2]/100,r=e[3]/100;return[255*(1-Math.min(1,t*(1-r)+r)),255*(1-Math.min(1,s*(1-r)+r)),255*(1-Math.min(1,a*(1-r)+r))]},Mt.xyz.rgb=function(e){const t=e[0]/100,s=e[1]/100,a=e[2]/100;let r,i,n;return r=3.2406*t+-1.5372*s+-.4986*a,i=-.9689*t+1.8758*s+.0415*a,n=.0557*t+-.204*s+1.057*a,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,r=Math.min(Math.max(0,r),1),i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),[255*r,255*i,255*n]},Mt.xyz.lab=function(e){let t=e[0],s=e[1],a=e[2];t/=95.047,s/=100,a/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;return[116*s-16,500*(t-s),200*(s-a)]},Mt.lab.xyz=function(e){let t,s,a;s=(e[0]+16)/116,t=e[1]/500+s,a=s-e[2]/200;const r=s**3,i=t**3,n=a**3;return s=r>.008856?r:(s-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,a=n>.008856?n:(a-16/116)/7.787,t*=95.047,s*=100,a*=108.883,[t,s,a]},Mt.lab.lch=function(e){const t=e[0],s=e[1],a=e[2];let r;r=360*Math.atan2(a,s)/2/Math.PI,r<0&&(r+=360);return[t,Math.sqrt(s*s+a*a),r]},Mt.lch.lab=function(e){const t=e[0],s=e[1],a=e[2]/360*2*Math.PI;return[t,s*Math.cos(a),s*Math.sin(a)]},Mt.rgb.ansi16=function(e,t=null){const[s,a,r]=e;let i=null===t?Mt.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let n=30+(Math.round(r/255)<<2|Math.round(a/255)<<1|Math.round(s/255));return 2===i&&(n+=60),n},Mt.hsv.ansi16=function(e){return Mt.rgb.ansi16(Mt.hsv.rgb(e),e[2])},Mt.rgb.ansi256=function(e){const t=e[0],s=e[1],a=e[2];if(t===s&&s===a)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(a/255*5)},Mt.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const s=.5*(1+~~(e>50));return[(1&t)*s*255,(t>>1&1)*s*255,(t>>2&1)*s*255]},Mt.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},Mt.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},Mt.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let s=t[0];3===t[0].length&&(s=s.split("").map((e=>e+e)).join(""));const a=parseInt(s,16);return[a>>16&255,a>>8&255,255&a]},Mt.rgb.hcg=function(e){const t=e[0]/255,s=e[1]/255,a=e[2]/255,r=Math.max(Math.max(t,s),a),i=Math.min(Math.min(t,s),a),n=r-i;let o,l;return o=n<1?i/(1-n):0,l=n<=0?0:r===t?(s-a)/n%6:r===s?2+(a-t)/n:4+(t-s)/n,l/=6,l%=1,[360*l,100*n,100*o]},Mt.hsl.hcg=function(e){const t=e[1]/100,s=e[2]/100,a=s<.5?2*t*s:2*t*(1-s);let r=0;return a<1&&(r=(s-.5*a)/(1-a)),[e[0],100*a,100*r]},Mt.hsv.hcg=function(e){const t=e[1]/100,s=e[2]/100,a=t*s;let r=0;return a<1&&(r=(s-a)/(1-a)),[e[0],100*a,100*r]},Mt.hcg.rgb=function(e){const t=e[0]/360,s=e[1]/100,a=e[2]/100;if(0===s)return[255*a,255*a,255*a];const r=[0,0,0],i=t%1*6,n=i%1,o=1-n;let l=0;switch(Math.floor(i)){case 0:r[0]=1,r[1]=n,r[2]=0;break;case 1:r[0]=o,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=n;break;case 3:r[0]=0,r[1]=o,r[2]=1;break;case 4:r[0]=n,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=o}return l=(1-s)*a,[255*(s*r[0]+l),255*(s*r[1]+l),255*(s*r[2]+l)]},Mt.hcg.hsv=function(e){const t=e[1]/100,s=t+e[2]/100*(1-t);let a=0;return s>0&&(a=t/s),[e[0],100*a,100*s]},Mt.hcg.hsl=function(e){const t=e[1]/100,s=e[2]/100*(1-t)+.5*t;let a=0;return s>0&&s<.5?a=t/(2*s):s>=.5&&s<1&&(a=t/(2*(1-s))),[e[0],100*a,100*s]},Mt.hcg.hwb=function(e){const t=e[1]/100,s=t+e[2]/100*(1-t);return[e[0],100*(s-t),100*(1-s)]},Mt.hwb.hcg=function(e){const t=e[1]/100,s=1-e[2]/100,a=s-t;let r=0;return a<1&&(r=(s-a)/(1-a)),[e[0],100*a,100*r]},Mt.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Mt.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Mt.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Mt.gray.hsl=function(e){return[0,0,e[0]]},Mt.gray.hsv=Mt.gray.hsl,Mt.gray.hwb=function(e){return[0,100,e[0]]},Mt.gray.cmyk=function(e){return[0,0,0,e[0]]},Mt.gray.lab=function(e){return[e[0],0,0]},Mt.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),s=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(s.length)+s},Mt.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Dt=Ft;function Bt(e){const t=function(){const e={},t=Object.keys(Dt);for(let s=t.length,a=0;a<s;a++)e[t[a]]={distance:-1,parent:null};return e}(),s=[e];for(t[e].distance=0;s.length;){const e=s.pop(),a=Object.keys(Dt[e]);for(let r=a.length,i=0;i<r;i++){const r=a[i],n=t[r];-1===n.distance&&(n.distance=t[e].distance+1,n.parent=e,s.unshift(r))}}return t}function Yt(e,t){return function(s){return t(e(s))}}function Gt(e,t){const s=[t[e].parent,e];let a=Dt[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)s.unshift(t[r].parent),a=Yt(Dt[t[r].parent][r],a),r=t[r].parent;return a.conversion=s,a}const Ut=Ft,Vt=function(e){const t=Bt(e),s={},a=Object.keys(t);for(let e=a.length,r=0;r<e;r++){const e=a[r];null!==t[e].parent&&(s[e]=Gt(e,t))}return s},Ht={};Object.keys(Ut).forEach((e=>{Ht[e]={},Object.defineProperty(Ht[e],"channels",{value:Ut[e].channels}),Object.defineProperty(Ht[e],"labels",{value:Ut[e].labels});const t=Vt(e);Object.keys(t).forEach((s=>{const a=t[s];Ht[e][s]=function(e){const t=function(...t){const s=t[0];if(null==s)return s;s.length>1&&(t=s);const a=e(t);if("object"==typeof a)for(let e=a.length,t=0;t<e;t++)a[t]=Math.round(a[t]);return a};return"conversion"in e&&(t.conversion=e.conversion),t}(a),Ht[e][s].raw=function(e){const t=function(...t){const s=t[0];return null==s?s:(s.length>1&&(t=s),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(a)}))}));const qt=Ot,zt=Ht,Wt=["keyword","gray","hex"],Zt={};for(const e of Object.keys(zt))Zt[[...zt[e].labels].sort().join("")]=e;const $t={};function Xt(e,t){if(!(this instanceof Xt))return new Xt(e,t);if(t&&t in Wt&&(t=null),t&&!(t in zt))throw new Error("Unknown model: "+t);let s,a;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof Xt)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=qt.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,a=zt[this.model].channels,this.color=t.value.slice(0,a),this.valpha="number"==typeof t.value[a]?t.value[a]:1}else if(e.length>0){this.model=t||"rgb",a=zt[this.model].channels;const s=Array.prototype.slice.call(e,0,a);this.color=es(s,a),this.valpha="number"==typeof e[a]?e[a]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const a=t.sort().join("");if(!(a in Zt))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Zt[a];const{labels:r}=zt[this.model],i=[];for(s=0;s<r.length;s++)i.push(e[r[s]]);this.color=es(i)}if($t[this.model])for(a=zt[this.model].channels,s=0;s<a;s++){const e=$t[this.model][s];e&&(this.color[s]=e(this.color[s]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Xt.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in qt.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const s=1===t.valpha?t.color:[...t.color,this.valpha];return qt.to[t.model](s)},percentString(e){const t=this.rgb().round("number"==typeof e?e:1),s=1===t.valpha?t.color:[...t.color,this.valpha];return qt.to.rgb.percent(s)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=zt[this.model],{labels:s}=zt[this.model];for(let a=0;a<t;a++)e[s[a]]=this.color[a];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new Xt([...this.color.map(Kt(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new Xt([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Jt("rgb",0,Qt(255)),green:Jt("rgb",1,Qt(255)),blue:Jt("rgb",2,Qt(255)),hue:Jt(["hsl","hsv","hsl","hwb","hcg"],0,(e=>(e%360+360)%360)),saturationl:Jt("hsl",1,Qt(100)),lightness:Jt("hsl",2,Qt(100)),saturationv:Jt("hsv",1,Qt(100)),value:Jt("hsv",2,Qt(100)),chroma:Jt("hcg",1,Qt(100)),gray:Jt("hcg",2,Qt(100)),white:Jt("hwb",1,Qt(100)),wblack:Jt("hwb",2,Qt(100)),cyan:Jt("cmyk",0,Qt(100)),magenta:Jt("cmyk",1,Qt(100)),yellow:Jt("cmyk",2,Qt(100)),black:Jt("cmyk",3,Qt(100)),x:Jt("xyz",0,Qt(95.047)),y:Jt("xyz",1,Qt(100)),z:Jt("xyz",2,Qt(108.833)),l:Jt("lab",0,Qt(100)),a:Jt("lab",1),b:Jt("lab",2),keyword(e){return void 0!==e?new Xt(e):zt[this.model].keyword(this.color)},hex(e){return void 0!==e?new Xt(e):qt.to.hex(this.rgb().round().color)},hexa(e){if(void 0!==e)return new Xt(e);const t=this.rgb().round().color;let s=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===s.length&&(s="0"+s),qt.to.hex(t)+s},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[s,a]of e.entries()){const e=a/255;t[s]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),s=e.luminosity();return t>s?(t+.05)/(s+.05):(s+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return Xt.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let s=t.color[0];return s=(s+e)%360,s=s<0?360+s:s,t.color[0]=s,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const s=e.rgb(),a=this.rgb(),r=void 0===t?.5:t,i=2*r-1,n=s.alpha()-a.alpha(),o=((i*n==-1?i:(i+n)/(1+i*n))+1)/2,l=1-o;return Xt.rgb(o*s.red()+l*a.red(),o*s.green()+l*a.green(),o*s.blue()+l*a.blue(),s.alpha()*r+a.alpha()*(1-r))}};for(const e of Object.keys(zt)){if(Wt.includes(e))continue;const{channels:t}=zt[e];Xt.prototype[e]=function(...t){return this.model===e?new Xt(this):t.length>0?new Xt(t,e):new Xt([...(s=zt[this.model][e].raw(this.color),Array.isArray(s)?s:[s]),this.valpha],e);var s},Xt[e]=function(...s){let a=s[0];return"number"==typeof a&&(a=es(s,t)),new Xt(a,e)}}function Kt(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function Jt(e,t,s){e=Array.isArray(e)?e:[e];for(const a of e)($t[a]||($t[a]=[]))[t]=s;return e=e[0],function(a){let r;return void 0!==a?(s&&(a=s(a)),r=this[e](),r.color[t]=a,r):(r=this[e]().color[t],s&&(r=s(r)),r)}}function Qt(e){return function(t){return Math.max(0,Math.min(e,t))}}function es(e,t){for(let s=0;s<t;s++)"number"!=typeof e[s]&&(e[s]=0);return e}var ts=ft(Xt);const ss=(e,t)=>ts(e).darken(t).rgb().string(),as=Object.assign({inherit:"inherit",transparent:"transparent",black:ht.colors.black,white:ht.colors.white,bodyBackground:ht.colors.white,darkBodyBackground:ht.colors.primary,bodyText:ht.colors.primary,bodyTextInverted:ht.colors.primary50,darkBodyText:ht.colors.primary50,display:ht.colors.black,darkDisplay:ht.colors.white},Object.assign({},...Object.keys(ht.colors).map((e=>{const t=ht.colors[e];return{[e]:{DEFAULT:t,lighter:(s=t,a=.1,ts(s).lighten(a).rgb().string()),darker:ss(t,.1)}};var s,a})))),rs=Object.assign(Object.assign({},ht),{colors:Object.assign(Object.assign({},ht.colors),{primary:"#001e5a",secondary:"#fcb700",tertiary:"#a3b0ca",quaternary:"#0f71b1",primary50:"#e6e9ef",primary100:"#b0b9cc",primary200:"#8a98b3",primary300:"#546890",primary400:"#334b7b",primary500:"#001e5a",primary600:"#001b52",primary700:"#001540",primary800:"#001132",primary900:"#000d26",secondary50:"#fff8e6",secondary100:"#fee9b0",secondary200:"#fede8a",secondary300:"#fdcf54",secondary400:"#fdc533",secondary500:"#fcb700",secondary600:"#e5a700",secondary700:"#b38200",secondary800:"#8b6500",secondary900:"#6a4d00",tertiary50:"#f6f7fa",tertiary100:"#e2e7ef",tertiary200:"#d5dbe7",tertiary300:"#c1cadb",tertiary400:"#b5c0d5",tertiary500:"#a3b0ca",tertiary600:"#94a0b8",tertiary700:"#747d8f",tertiary800:"#5a616f",tertiary900:"#444a55",quaternary50:"#e7f1f7",quaternary100:"#b5d3e7",quaternary200:"#91bedb",quaternary300:"#5ea0cb",quaternary400:"#3f8dc1",quaternary500:"#0f71b1",quaternary600:"#0e67a1",quaternary700:"#0b507e",quaternary800:"#083e61",quaternary900:"#062f4a"}),borderRadius:Object.assign({},ht.borderRadius),fontWeight:Object.assign(Object.assign({},ht.fontWeight),{light:"300",normal:"400",bold:"700"})}),is=(e,t)=>ts(e).darken(t).rgb().string(),ns=Object.assign(Object.assign(Object.assign({},as),{bodyBackground:rs.colors.primary700,darkBodyBackground:rs.colors.primary800,bodyText:"#FFF",darkBodyText:"#EEE"}),Object.assign({},...Object.keys(rs.colors).map((e=>{const t=rs.colors[e];return{[e]:{DEFAULT:t,lighter:(s=t,a=.1,ts(s).lighten(a).rgb().string()),darker:is(t,.1)}};var s,a})))),os=Object.assign(Object.assign({},{sans:["sans-serif"],serif:["serif"],mono:["monospace"],body:["Roboto","sans-serif"],heading:["Roboto","sans-serif"],display:["monospace","sans-serif"]}),{body:["ProximaNova-Regular","sans-serif"],heading:["ProximaNova-Bold","sans-serif"]}),ls=Object.assign(Object.assign({},{raised:!1}),{raised:!1}),cs={colors:Object.assign({},ns),fontFamily:Object.assign({},os),fontSize:Object.assign({},null==rs?void 0:rs.fontSize),fontWeight:Object.assign({},null==rs?void 0:rs.fontWeight),buttons:Object.assign({},ls),screens:Object.assign({},null==rs?void 0:rs.screens),borderRadius:Object.assign({},null==rs?void 0:rs.borderRadius),spacing:Object.assign({},null==rs?void 0:rs.spacing),extend:Object.assign({},null==rs?void 0:rs.extend)};exports.AnimationCounter=g,exports.AnimationSet1=se,exports.AppContext=qe,exports.AppProvider=qe,exports.Authenticator=he,exports.Avatar=te,exports.Blockquote=b,exports.Button=E,exports.ButtonGroup=Pe,exports.Card=Ae,exports.Checkbox=C,exports.Chip=R,exports.Container=Te,exports.ContentPageLayout=Ge,exports.ContentRowsLayout=Ve,exports.Copy=M,exports.DisplayHeading=Se,exports.FileUpload=F,exports.Footer=ze,exports.ForgotPasswordForm=xe,exports.Form=le,exports.FormField=me,exports.FormSelect=de,exports.Header=We,exports.Heading=G,exports.Hero=Be,exports.Hr=U,exports.HtmlContent=ke,exports.Icon=A,exports.Image=V,exports.Label=H,exports.Link=I,exports.List=W,exports.Loader=S,exports.LoginForm=ue,exports.Logo=Z,exports.Menu=De,exports.MultiCheckboxFacet=dt,exports.Notice=$,exports.OTPInput=Ze,exports.PanelCards=we,exports.PanelFeature=Ce,exports.PanelHero=Le,exports.PanelProduct=Oe,exports.PanelVideo=_e,exports.ProfileForm=ut,exports.Radio=X,exports.RegisterForm=pe,exports.ResetPasswordForm=mt,exports.Search=function({showOptions:s,sortOptions:a,resultAs:r=exports.ResultAsTypes.cardBasic,ResultFieldMap:i,config:n={filters:[],facets:{},searchFields:{},resultsFields:{},alwaysSearchOnInitialLoad:!0,initialPlaceholder:"Search..."},facetDisplay:o=[],noSidebar:l=!1,customConnector:c,showPagingInfo:d,gridClasses:m,initialState:u={},showTextSearch:p=!0}){const f=t.useMemo((()=>{const e={host:process.env.REACT_APP_ELASTICSEARCH_HOST||"http://localhost:9200",index:process.env.REACT_APP_ELASTICSEARCH_INDEX||"",apiKey:process.env.REACT_APP_ELASTICSEARCH_API_KEY};return new x(c||e)}),[]),v=t.useMemo((()=>({debug:"development"===process.env.NODE_ENV,alwaysSearchOnInitialLoad:n.alwaysSearchOnInitialLoad,apiConnector:f,hasA11yNotifications:!0,searchQuery:{filters:n.filters||[],search_fields:n.searchFields||{},result_fields:n.resultsFields||{},facets:n.facets},autocompleteQuery:{results:{search_fields:{title:{},description:{}},resultsPerPage:5,result_fields:{title:{snippet:{size:100,fallback:!0}}}}},initialState:Object.assign({resultsPerPage:(null==s?void 0:s[0])||8},u)})),[n]);return e.jsx(h.SearchProvider,{config:v,children:e.jsx(h.WithSearch,{mapContextToProps:({wasSearched:e})=>({wasSearched:e}),children:({wasSearched:c})=>e.jsx("div",{className:"App",children:e.jsx(h.ErrorBoundary,{children:e.jsx(st,{header:p&&e.jsx(h.SearchBox,{view:t=>e.jsx(tt,Object.assign({},t,{wasSearched:c,placeholder:n.initialPlaceholder}))}),sideContent:!l&&o&&e.jsxs("div",{children:[c&&e.jsx(h.Sorting,{label:"Sort by",sortOptions:a,view:Ke}),null==o?void 0:o.map((({field:t,label:s,view:a})=>e.jsx(h.Facet,{field:t,label:s,view:a},t)))]}),bodyContent:e.jsx(h.Results,{shouldTrackClickThrough:!1,resultView:t=>e.jsx(ot,Object.assign({},t,{as:r,cardMap:i})),className:"list-none p-0 m-0",view:t=>e.jsx(at,Object.assign({},t,{gridClasses:m}))}),bodyHeader:e.jsxs(t.Fragment,{children:[c&&d&&e.jsx(h.PagingInfo,{view:et}),c&&s&&e.jsx(h.ResultsPerPage,{view:Qe,options:s})]}),bodyFooter:e.jsx(h.Paging,{view:Je}),noSidebar:l})})})})})},exports.Share=Me,exports.SingleLinksFacet=ct,exports.SingleSelectFacet=lt,exports.Switch=K,exports.Tabs=ae,exports.TextInput=Q,exports.ThemeContext=xt,exports.ThemeProvider=({children:t,theme:s})=>e.jsx(xt.Provider,{value:s,children:t}),exports.Video=Ie,exports.VisitUs=Fe,exports.defaultTheme=pt,exports.theme=cs;
|