@hero-design/rn 7.6.0 → 7.6.1-alpha
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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-build:types.log +2 -0
- package/.turbo/turbo-build:watch.log +1 -0
- package/.turbo/turbo-lint.log +2 -0
- package/.turbo/turbo-type-check.log +2 -0
- package/es/components/Avatar/StyledAvatar.d.ts +46 -0
- package/es/components/Avatar/__tests__/StyledAvatar.spec.d.ts +1 -0
- package/es/components/Avatar/__tests__/index.spec.d.ts +1 -0
- package/es/components/Avatar/index.d.ts +25 -0
- package/es/components/Badge/Status.d.ts +24 -0
- package/es/components/Badge/StyledBadge.d.ts +28 -0
- package/es/components/Badge/__tests__/Badge.spec.d.ts +1 -0
- package/es/components/Badge/__tests__/Status.spec.d.ts +1 -0
- package/es/components/Badge/index.d.ts +32 -0
- package/es/components/BottomNavigation/StyledBottomNavigation.d.ts +52 -0
- package/es/components/BottomNavigation/__tests__/index.spec.d.ts +1 -0
- package/es/components/BottomNavigation/index.d.ts +45 -0
- package/es/components/Button/IconButton.d.ts +34 -0
- package/es/components/Button/__tests__/index.spec.d.ts +1 -0
- package/es/components/Button/index.d.ts +4 -0
- package/es/components/Card/StyledCard.d.ts +17 -0
- package/es/components/Card/__tests__/StyledCard.spec.d.ts +1 -0
- package/es/components/Card/__tests__/index.spec.d.ts +1 -0
- package/es/components/Card/index.d.ts +22 -0
- package/es/components/Collapse/StyledCollapse.d.ts +15 -0
- package/es/components/Collapse/__tests__/StyledCollapse.spec.d.ts +1 -0
- package/es/components/Collapse/__tests__/index.spec.d.ts +1 -0
- package/es/components/Collapse/index.d.ts +23 -0
- package/es/components/Divider/StyledDivider.d.ts +13 -0
- package/es/components/Divider/__tests__/StyledDivider.spec.d.ts +1 -0
- package/es/components/Divider/index.d.ts +21 -0
- package/es/components/Drawer/StyledDrawer.d.ts +25 -0
- package/es/components/Drawer/__tests__/index.spec.d.ts +1 -0
- package/es/components/Drawer/index.d.ts +25 -0
- package/es/components/FAB/ActionGroup/ActionItem.d.ts +12 -0
- package/es/components/FAB/ActionGroup/StyledActionGroup.d.ts +30 -0
- package/es/components/FAB/ActionGroup/StyledActionItem.d.ts +13 -0
- package/es/components/FAB/ActionGroup/__tests__/index.spec.d.ts +1 -0
- package/es/components/FAB/ActionGroup/index.d.ts +34 -0
- package/es/components/FAB/AnimatedFABIcon.d.ts +6 -0
- package/es/components/FAB/FAB.d.ts +34 -0
- package/es/components/FAB/StyledFAB.d.ts +20 -0
- package/es/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +1 -0
- package/es/components/FAB/__tests__/StyledFAB.spec.d.ts +1 -0
- package/es/components/FAB/__tests__/index.spec.d.ts +1 -0
- package/es/components/FAB/index.d.ts +4 -0
- package/es/components/Icon/HeroIcon/index.d.ts +13 -0
- package/es/components/Icon/IconList.d.ts +2 -0
- package/es/components/Icon/__tests__/index.spec.d.ts +1 -0
- package/es/components/Icon/index.d.ts +27 -0
- package/es/components/Icon/utils.d.ts +2 -0
- package/es/components/Progress/ProgressBar.d.ts +18 -0
- package/es/components/Progress/ProgressCircle.d.ts +18 -0
- package/es/components/Progress/StyledProgressBar.d.ts +18 -0
- package/es/components/Progress/StyledProgressCircle.d.ts +38 -0
- package/es/components/Progress/index.d.ts +5 -0
- package/es/components/Progress/types.d.ts +1 -0
- package/es/components/Tabs/ActiveTabIndicator.d.ts +8 -0
- package/es/components/Tabs/ScrollableTabs.d.ts +3 -0
- package/es/components/Tabs/StyledScrollableTabs.d.ts +61 -0
- package/es/components/Tabs/StyledTabs.d.ts +55 -0
- package/es/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
- package/es/components/Tabs/__tests__/index.spec.d.ts +1 -0
- package/es/components/Tabs/index.d.ts +54 -0
- package/es/components/Tabs/utils.d.ts +2 -0
- package/es/components/Tag/StyledTag.d.ts +20 -0
- package/es/components/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/es/components/Tag/index.d.ts +21 -0
- package/es/components/Typography/Text/StyledText.d.ts +13 -0
- package/es/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
- package/es/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
- package/es/components/Typography/Text/index.d.ts +30 -0
- package/es/components/Typography/index.d.ts +6 -0
- package/es/index.d.ts +19 -0
- package/es/index.js +217 -2485
- package/es/theme/__tests__/index.spec.d.ts +1 -0
- package/es/theme/components/avatar.d.ts +32 -0
- package/es/theme/components/badge.d.ts +29 -0
- package/es/theme/components/bottomNavigation.d.ts +23 -0
- package/es/theme/components/card.d.ts +10 -0
- package/es/theme/components/divider.d.ts +17 -0
- package/es/theme/components/drawer.d.ts +21 -0
- package/es/theme/components/fab.d.ts +51 -0
- package/es/theme/components/icon.d.ts +19 -0
- package/es/theme/components/progress.d.ts +21 -0
- package/es/theme/components/tabs.d.ts +27 -0
- package/es/theme/components/tag.d.ts +30 -0
- package/es/theme/components/typography.d.ts +26 -0
- package/es/theme/global/borders.d.ts +11 -0
- package/es/theme/global/colors.d.ts +29 -0
- package/es/theme/global/index.d.ts +39 -0
- package/es/theme/global/scale.d.ts +9 -0
- package/es/theme/global/space.d.ts +13 -0
- package/es/theme/global/typography.d.ts +21 -0
- package/es/theme/index.d.ts +33 -0
- package/es/types.d.ts +5 -0
- package/es/utils/__tests__/scale.spec.d.ts +1 -0
- package/es/utils/helpers.d.ts +2 -0
- package/es/utils/hooks.d.ts +1 -0
- package/es/utils/scale.d.ts +3 -0
- package/lib/components/Avatar/StyledAvatar.d.ts +46 -0
- package/lib/components/Avatar/__tests__/StyledAvatar.spec.d.ts +1 -0
- package/lib/components/Avatar/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Avatar/index.d.ts +25 -0
- package/lib/components/Badge/Status.d.ts +24 -0
- package/lib/components/Badge/StyledBadge.d.ts +28 -0
- package/lib/components/Badge/__tests__/Badge.spec.d.ts +1 -0
- package/lib/components/Badge/__tests__/Status.spec.d.ts +1 -0
- package/lib/components/Badge/index.d.ts +32 -0
- package/lib/components/BottomNavigation/StyledBottomNavigation.d.ts +52 -0
- package/lib/components/BottomNavigation/__tests__/index.spec.d.ts +1 -0
- package/lib/components/BottomNavigation/index.d.ts +45 -0
- package/lib/components/Button/IconButton.d.ts +34 -0
- package/lib/components/Button/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Button/index.d.ts +4 -0
- package/lib/components/Card/StyledCard.d.ts +17 -0
- package/lib/components/Card/__tests__/StyledCard.spec.d.ts +1 -0
- package/lib/components/Card/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Card/index.d.ts +22 -0
- package/lib/components/Collapse/StyledCollapse.d.ts +15 -0
- package/lib/components/Collapse/__tests__/StyledCollapse.spec.d.ts +1 -0
- package/lib/components/Collapse/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Collapse/index.d.ts +23 -0
- package/lib/components/Divider/StyledDivider.d.ts +13 -0
- package/lib/components/Divider/__tests__/StyledDivider.spec.d.ts +1 -0
- package/lib/components/Divider/index.d.ts +21 -0
- package/lib/components/Drawer/StyledDrawer.d.ts +25 -0
- package/lib/components/Drawer/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Drawer/index.d.ts +25 -0
- package/lib/components/FAB/ActionGroup/ActionItem.d.ts +12 -0
- package/lib/components/FAB/ActionGroup/StyledActionGroup.d.ts +30 -0
- package/lib/components/FAB/ActionGroup/StyledActionItem.d.ts +13 -0
- package/lib/components/FAB/ActionGroup/__tests__/index.spec.d.ts +1 -0
- package/lib/components/FAB/ActionGroup/index.d.ts +34 -0
- package/lib/components/FAB/AnimatedFABIcon.d.ts +6 -0
- package/lib/components/FAB/FAB.d.ts +34 -0
- package/lib/components/FAB/StyledFAB.d.ts +20 -0
- package/lib/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +1 -0
- package/lib/components/FAB/__tests__/StyledFAB.spec.d.ts +1 -0
- package/lib/components/FAB/__tests__/index.spec.d.ts +1 -0
- package/lib/components/FAB/index.d.ts +4 -0
- package/lib/components/Icon/HeroIcon/index.d.ts +13 -0
- package/lib/components/Icon/IconList.d.ts +2 -0
- package/lib/components/Icon/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Icon/index.d.ts +27 -0
- package/lib/components/Icon/utils.d.ts +2 -0
- package/lib/components/Progress/ProgressBar.d.ts +18 -0
- package/lib/components/Progress/ProgressCircle.d.ts +18 -0
- package/lib/components/Progress/StyledProgressBar.d.ts +18 -0
- package/lib/components/Progress/StyledProgressCircle.d.ts +38 -0
- package/lib/components/Progress/index.d.ts +5 -0
- package/lib/components/Progress/types.d.ts +1 -0
- package/lib/components/Tabs/ActiveTabIndicator.d.ts +8 -0
- package/lib/components/Tabs/ScrollableTabs.d.ts +3 -0
- package/lib/components/Tabs/StyledScrollableTabs.d.ts +61 -0
- package/lib/components/Tabs/StyledTabs.d.ts +55 -0
- package/lib/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
- package/lib/components/Tabs/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Tabs/index.d.ts +54 -0
- package/lib/components/Tabs/utils.d.ts +2 -0
- package/lib/components/Tag/StyledTag.d.ts +20 -0
- package/lib/components/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/lib/components/Tag/index.d.ts +21 -0
- package/lib/components/Typography/Text/StyledText.d.ts +13 -0
- package/lib/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
- package/lib/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Typography/Text/index.d.ts +30 -0
- package/lib/components/Typography/index.d.ts +6 -0
- package/lib/index.d.ts +19 -0
- package/lib/index.js +390 -2658
- package/lib/theme/__tests__/index.spec.d.ts +1 -0
- package/lib/theme/components/avatar.d.ts +32 -0
- package/lib/theme/components/badge.d.ts +29 -0
- package/lib/theme/components/bottomNavigation.d.ts +23 -0
- package/lib/theme/components/card.d.ts +10 -0
- package/lib/theme/components/divider.d.ts +17 -0
- package/lib/theme/components/drawer.d.ts +21 -0
- package/lib/theme/components/fab.d.ts +51 -0
- package/lib/theme/components/icon.d.ts +19 -0
- package/lib/theme/components/progress.d.ts +21 -0
- package/lib/theme/components/tabs.d.ts +27 -0
- package/lib/theme/components/tag.d.ts +30 -0
- package/lib/theme/components/typography.d.ts +26 -0
- package/lib/theme/global/borders.d.ts +11 -0
- package/lib/theme/global/colors.d.ts +29 -0
- package/lib/theme/global/index.d.ts +39 -0
- package/lib/theme/global/scale.d.ts +9 -0
- package/lib/theme/global/space.d.ts +13 -0
- package/lib/theme/global/typography.d.ts +21 -0
- package/lib/theme/index.d.ts +33 -0
- package/lib/types.d.ts +5 -0
- package/lib/utils/__tests__/scale.spec.d.ts +1 -0
- package/lib/utils/helpers.d.ts +2 -0
- package/lib/utils/hooks.d.ts +1 -0
- package/lib/utils/scale.d.ts +3 -0
- package/package.json +1 -2
- package/rollup.config.js +7 -1
- package/src/index.ts +1 -2
- package/src/theme/index.ts +15 -1
- package/types/components/Avatar/StyledAvatar.d.ts +0 -0
- package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -0
- package/types/components/Avatar/__tests__/index.spec.d.ts +0 -0
- package/types/components/Avatar/index.d.ts +0 -0
- package/types/components/Badge/Status.d.ts +0 -0
- package/types/components/Badge/StyledBadge.d.ts +0 -0
- package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -0
- package/types/components/Badge/__tests__/Status.spec.d.ts +0 -0
- package/types/components/Badge/index.d.ts +0 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
- package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -0
- package/types/components/BottomNavigation/index.d.ts +0 -0
- package/types/components/BottomSheet/Footer.d.ts +0 -0
- package/types/components/BottomSheet/Header.d.ts +0 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
- package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -0
- package/types/components/BottomSheet/index.d.ts +0 -0
- package/types/components/Button/Button.d.ts +0 -0
- package/types/components/Button/IconButton.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
- package/types/components/Button/StyledButton.d.ts +0 -0
- package/types/components/Button/__tests__/Button.spec.d.ts +0 -0
- package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -0
- package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -0
- package/types/components/Button/index.d.ts +0 -0
- package/types/components/Card/StyledCard.d.ts +0 -0
- package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -0
- package/types/components/Card/__tests__/index.spec.d.ts +0 -0
- package/types/components/Card/index.d.ts +0 -0
- package/types/components/Checkbox/StyledCheckbox.d.ts +8 -0
- package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +1 -0
- package/types/components/Checkbox/__tests__/index.spec.d.ts +1 -0
- package/types/components/Checkbox/index.d.ts +25 -0
- package/types/components/Collapse/StyledCollapse.d.ts +0 -0
- package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -0
- package/types/components/Collapse/__tests__/index.spec.d.ts +0 -0
- package/types/components/Collapse/index.d.ts +0 -0
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
- package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -0
- package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -0
- package/types/components/ContentNavigator/index.d.ts +0 -0
- package/types/components/Divider/StyledDivider.d.ts +0 -0
- package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -0
- package/types/components/Divider/index.d.ts +0 -0
- package/types/components/Drawer/StyledDrawer.d.ts +0 -0
- package/types/components/Drawer/__tests__/index.spec.d.ts +0 -0
- package/types/components/Drawer/index.d.ts +0 -0
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -0
- package/types/components/FAB/ActionGroup/index.d.ts +0 -0
- package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
- package/types/components/FAB/FAB.d.ts +0 -0
- package/types/components/FAB/StyledFAB.d.ts +0 -0
- package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -0
- package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -0
- package/types/components/FAB/__tests__/index.spec.d.ts +0 -0
- package/types/components/FAB/index.d.ts +0 -0
- package/types/components/Icon/HeroIcon/index.d.ts +0 -0
- package/types/components/Icon/IconList.d.ts +0 -0
- package/types/components/Icon/__tests__/index.spec.d.ts +0 -0
- package/types/components/Icon/index.d.ts +0 -0
- package/types/components/Icon/utils.d.ts +0 -0
- package/types/components/Progress/ProgressBar.d.ts +0 -0
- package/types/components/Progress/ProgressCircle.d.ts +0 -0
- package/types/components/Progress/StyledProgressBar.d.ts +0 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
- package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
- package/types/components/Progress/index.d.ts +0 -0
- package/types/components/Progress/types.d.ts +0 -0
- package/types/components/Radio/Radio.d.ts +0 -0
- package/types/components/Radio/RadioGroup.d.ts +0 -0
- package/types/components/Radio/StyledRadio.d.ts +0 -0
- package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -0
- package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -0
- package/types/components/Radio/__tests__/StyledRadio.spec.d.ts +0 -0
- package/types/components/Radio/index.d.ts +0 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
- package/types/components/SectionHeading/__tests__/StyledHeading.d.ts +1 -0
- package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -0
- package/types/components/SectionHeading/index.d.ts +0 -0
- package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
- package/types/components/Spinner/StyledSpinner.d.ts +0 -0
- package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -0
- package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -0
- package/types/components/Spinner/__tests__/index.spec.d.ts +0 -0
- package/types/components/Spinner/index.d.ts +0 -0
- package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
- package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledTabs.d.ts +0 -0
- package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -0
- package/types/components/Tabs/__tests__/index.spec.d.ts +0 -0
- package/types/components/Tabs/index.d.ts +0 -0
- package/types/components/Tabs/utils.d.ts +0 -0
- package/types/components/Tag/StyledTag.d.ts +0 -0
- package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -0
- package/types/components/Tag/index.d.ts +0 -0
- package/types/components/TextInput/StyledTextInput.d.ts +0 -0
- package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -0
- package/types/components/TextInput/__tests__/index.spec.d.ts +0 -0
- package/types/components/TextInput/index.d.ts +0 -0
- package/types/components/Typography/Text/StyledText.d.ts +0 -0
- package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -0
- package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -0
- package/types/components/Typography/Text/index.d.ts +0 -0
- package/types/components/Typography/index.d.ts +0 -0
- package/types/index.d.ts +1 -2
- package/types/testHelpers/renderWithTheme.d.ts +0 -0
- package/types/theme/__tests__/index.spec.d.ts +0 -0
- package/types/theme/components/avatar.d.ts +0 -0
- package/types/theme/components/badge.d.ts +0 -0
- package/types/theme/components/bottomNavigation.d.ts +0 -0
- package/types/theme/components/bottomSheet.d.ts +0 -0
- package/types/theme/components/button.d.ts +0 -0
- package/types/theme/components/card.d.ts +0 -0
- package/types/theme/components/checkbox.d.ts +21 -0
- package/types/theme/components/contentNavigator.d.ts +0 -0
- package/types/theme/components/divider.d.ts +0 -0
- package/types/theme/components/drawer.d.ts +0 -0
- package/types/theme/components/fab.d.ts +0 -0
- package/types/theme/components/icon.d.ts +0 -0
- package/types/theme/components/progress.d.ts +0 -0
- package/types/theme/components/radio.d.ts +0 -0
- package/types/theme/components/spinner.d.ts +0 -0
- package/types/theme/components/tabs.d.ts +0 -0
- package/types/theme/components/tag.d.ts +0 -0
- package/types/theme/components/textInput.d.ts +0 -0
- package/types/theme/components/typography.d.ts +0 -0
- package/types/theme/global/borders.d.ts +0 -0
- package/types/theme/global/colors.d.ts +0 -0
- package/types/theme/global/index.d.ts +0 -0
- package/types/theme/global/scale.d.ts +0 -0
- package/types/theme/global/space.d.ts +0 -0
- package/types/theme/global/typography.d.ts +0 -0
- package/types/theme/index.d.ts +10 -1
- package/types/types.d.ts +0 -0
- package/types/utils/__tests__/scale.spec.d.ts +0 -0
- package/types/utils/helpers.d.ts +0 -0
- package/types/utils/hooks.d.ts +0 -0
- package/types/utils/scale.d.ts +0 -0
- package/.expo/README.md +0 -15
- package/.expo/packager-info.json +0 -10
- package/.expo/prebuild/cached-packages.json +0 -4
- package/.expo/settings.json +0 -10
- package/.expo/xcodebuild-error.log +0 -2
- package/.expo/xcodebuild.log +0 -11199
- package/.turbo/turbo-publish:npm.log +0 -0
- package/playground/.turbo/turbo-type-check.log +0 -7
- package/playground/src/emotion.d.ts +0 -7
package/es/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import React, { useContext, createElement,
|
|
1
|
+
import * as reactNative from 'react-native';
|
|
2
|
+
import { Dimensions, StyleSheet as StyleSheet$1, Text as Text$1, View, TouchableOpacity, Image, Animated, Platform, TouchableWithoutFeedback, Pressable, Easing, Modal, TouchableHighlight, TextInput as TextInput$1, FlatList } from 'react-native';
|
|
3
|
+
import React, { createContext, useContext, createElement, forwardRef, useRef, useEffect, useState, useCallback } from 'react';
|
|
4
|
+
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
|
|
4
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import PagerView from 'react-native-pager-view';
|
|
5
7
|
|
|
6
8
|
function ownKeys(object, enumerableOnly) {
|
|
7
9
|
var keys = Object.keys(object);
|
|
@@ -20,7 +22,7 @@ function _objectSpread2(target) {
|
|
|
20
22
|
for (var i = 1; i < arguments.length; i++) {
|
|
21
23
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
22
24
|
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
23
|
-
_defineProperty
|
|
25
|
+
_defineProperty(target, key, source[key]);
|
|
24
26
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
25
27
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
26
28
|
});
|
|
@@ -29,42 +31,17 @@ function _objectSpread2(target) {
|
|
|
29
31
|
return target;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
function _typeof
|
|
34
|
+
function _typeof(obj) {
|
|
33
35
|
"@babel/helpers - typeof";
|
|
34
36
|
|
|
35
|
-
return _typeof
|
|
37
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
36
38
|
return typeof obj;
|
|
37
39
|
} : function (obj) {
|
|
38
40
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
39
|
-
}, _typeof
|
|
41
|
+
}, _typeof(obj);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
function
|
|
43
|
-
if (!(instance instanceof Constructor)) {
|
|
44
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _defineProperties$1(target, props) {
|
|
49
|
-
for (var i = 0; i < props.length; i++) {
|
|
50
|
-
var descriptor = props[i];
|
|
51
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
52
|
-
descriptor.configurable = true;
|
|
53
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
54
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _createClass$1(Constructor, protoProps, staticProps) {
|
|
59
|
-
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
60
|
-
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
61
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
62
|
-
writable: false
|
|
63
|
-
});
|
|
64
|
-
return Constructor;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function _defineProperty$2(obj, key, value) {
|
|
44
|
+
function _defineProperty(obj, key, value) {
|
|
68
45
|
if (key in obj) {
|
|
69
46
|
Object.defineProperty(obj, key, {
|
|
70
47
|
value: value,
|
|
@@ -79,8 +56,8 @@ function _defineProperty$2(obj, key, value) {
|
|
|
79
56
|
return obj;
|
|
80
57
|
}
|
|
81
58
|
|
|
82
|
-
function _extends$
|
|
83
|
-
_extends$
|
|
59
|
+
function _extends$1() {
|
|
60
|
+
_extends$1 = Object.assign || function (target) {
|
|
84
61
|
for (var i = 1; i < arguments.length; i++) {
|
|
85
62
|
var source = arguments[i];
|
|
86
63
|
|
|
@@ -94,57 +71,10 @@ function _extends$3() {
|
|
|
94
71
|
return target;
|
|
95
72
|
};
|
|
96
73
|
|
|
97
|
-
return _extends$
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function _inherits$1(subClass, superClass) {
|
|
101
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
102
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
106
|
-
constructor: {
|
|
107
|
-
value: subClass,
|
|
108
|
-
writable: true,
|
|
109
|
-
configurable: true
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
Object.defineProperty(subClass, "prototype", {
|
|
113
|
-
writable: false
|
|
114
|
-
});
|
|
115
|
-
if (superClass) _setPrototypeOf$1(subClass, superClass);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function _getPrototypeOf$1(o) {
|
|
119
|
-
_getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
120
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
121
|
-
};
|
|
122
|
-
return _getPrototypeOf$1(o);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function _setPrototypeOf$1(o, p) {
|
|
126
|
-
_setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
127
|
-
o.__proto__ = p;
|
|
128
|
-
return o;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
return _setPrototypeOf$1(o, p);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function _isNativeReflectConstruct() {
|
|
135
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
136
|
-
if (Reflect.construct.sham) return false;
|
|
137
|
-
if (typeof Proxy === "function") return true;
|
|
138
|
-
|
|
139
|
-
try {
|
|
140
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
141
|
-
return true;
|
|
142
|
-
} catch (e) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
74
|
+
return _extends$1.apply(this, arguments);
|
|
145
75
|
}
|
|
146
76
|
|
|
147
|
-
function _objectWithoutPropertiesLoose
|
|
77
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
148
78
|
if (source == null) return {};
|
|
149
79
|
var target = {};
|
|
150
80
|
var sourceKeys = Object.keys(source);
|
|
@@ -159,10 +89,10 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
|
159
89
|
return target;
|
|
160
90
|
}
|
|
161
91
|
|
|
162
|
-
function _objectWithoutProperties
|
|
92
|
+
function _objectWithoutProperties(source, excluded) {
|
|
163
93
|
if (source == null) return {};
|
|
164
94
|
|
|
165
|
-
var target = _objectWithoutPropertiesLoose
|
|
95
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
166
96
|
|
|
167
97
|
var key, i;
|
|
168
98
|
|
|
@@ -180,52 +110,15 @@ function _objectWithoutProperties$1(source, excluded) {
|
|
|
180
110
|
return target;
|
|
181
111
|
}
|
|
182
112
|
|
|
183
|
-
function _assertThisInitialized$1(self) {
|
|
184
|
-
if (self === void 0) {
|
|
185
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return self;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function _possibleConstructorReturn$1(self, call) {
|
|
192
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
193
|
-
return call;
|
|
194
|
-
} else if (call !== void 0) {
|
|
195
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return _assertThisInitialized$1(self);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function _createSuper(Derived) {
|
|
202
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
203
|
-
|
|
204
|
-
return function _createSuperInternal() {
|
|
205
|
-
var Super = _getPrototypeOf$1(Derived),
|
|
206
|
-
result;
|
|
207
|
-
|
|
208
|
-
if (hasNativeReflectConstruct) {
|
|
209
|
-
var NewTarget = _getPrototypeOf$1(this).constructor;
|
|
210
|
-
|
|
211
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
212
|
-
} else {
|
|
213
|
-
result = Super.apply(this, arguments);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return _possibleConstructorReturn$1(this, result);
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
|
|
220
113
|
function _slicedToArray(arr, i) {
|
|
221
114
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
222
115
|
}
|
|
223
116
|
|
|
224
|
-
function _toConsumableArray
|
|
225
|
-
return _arrayWithoutHoles
|
|
117
|
+
function _toConsumableArray(arr) {
|
|
118
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
226
119
|
}
|
|
227
120
|
|
|
228
|
-
function _arrayWithoutHoles
|
|
121
|
+
function _arrayWithoutHoles(arr) {
|
|
229
122
|
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
230
123
|
}
|
|
231
124
|
|
|
@@ -233,7 +126,7 @@ function _arrayWithHoles(arr) {
|
|
|
233
126
|
if (Array.isArray(arr)) return arr;
|
|
234
127
|
}
|
|
235
128
|
|
|
236
|
-
function _iterableToArray
|
|
129
|
+
function _iterableToArray(iter) {
|
|
237
130
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
238
131
|
}
|
|
239
132
|
|
|
@@ -284,7 +177,7 @@ function _arrayLikeToArray(arr, len) {
|
|
|
284
177
|
return arr2;
|
|
285
178
|
}
|
|
286
179
|
|
|
287
|
-
function _nonIterableSpread
|
|
180
|
+
function _nonIterableSpread() {
|
|
288
181
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
289
182
|
}
|
|
290
183
|
|
|
@@ -1531,8 +1424,8 @@ var createCache = function createCache(options) {
|
|
|
1531
1424
|
return cache;
|
|
1532
1425
|
};
|
|
1533
1426
|
|
|
1534
|
-
function _extends
|
|
1535
|
-
_extends
|
|
1427
|
+
function _extends() {
|
|
1428
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1536
1429
|
for (var i = 1; i < arguments.length; i++) {
|
|
1537
1430
|
var source = arguments[i];
|
|
1538
1431
|
|
|
@@ -1545,7 +1438,7 @@ function _extends$2() {
|
|
|
1545
1438
|
|
|
1546
1439
|
return target;
|
|
1547
1440
|
};
|
|
1548
|
-
return _extends
|
|
1441
|
+
return _extends.apply(this, arguments);
|
|
1549
1442
|
}
|
|
1550
1443
|
|
|
1551
1444
|
var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
@@ -1562,7 +1455,7 @@ EmotionCacheContext.Provider;
|
|
|
1562
1455
|
|
|
1563
1456
|
var ThemeContext = /* #__PURE__ */createContext({});
|
|
1564
1457
|
|
|
1565
|
-
var useTheme = function useTheme() {
|
|
1458
|
+
var useTheme$1 = function useTheme() {
|
|
1566
1459
|
return useContext(ThemeContext);
|
|
1567
1460
|
};
|
|
1568
1461
|
|
|
@@ -1573,7 +1466,7 @@ var getTheme$1 = function getTheme(outerTheme, theme) {
|
|
|
1573
1466
|
return mergedTheme;
|
|
1574
1467
|
}
|
|
1575
1468
|
|
|
1576
|
-
return _extends
|
|
1469
|
+
return _extends({}, outerTheme, theme);
|
|
1577
1470
|
};
|
|
1578
1471
|
|
|
1579
1472
|
var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
@@ -1582,7 +1475,7 @@ var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
|
1582
1475
|
});
|
|
1583
1476
|
});
|
|
1584
1477
|
|
|
1585
|
-
var ThemeProvider = function ThemeProvider(props) {
|
|
1478
|
+
var ThemeProvider$1 = function ThemeProvider(props) {
|
|
1586
1479
|
var theme = useContext(ThemeContext);
|
|
1587
1480
|
|
|
1588
1481
|
if (props.theme !== theme) {
|
|
@@ -2367,2128 +2260,167 @@ var getTabsTheme = function getTabsTheme(theme) {
|
|
|
2367
2260
|
text: theme.colors.text
|
|
2368
2261
|
};
|
|
2369
2262
|
var space = {
|
|
2370
|
-
flatListHorizontalPadding: theme.space.small,
|
|
2371
|
-
itemHorizontalPadding: theme.space.small,
|
|
2372
|
-
itemVerticalPadding: theme.space.small,
|
|
2373
|
-
outlineHorizontalPadding: theme.space.small,
|
|
2374
|
-
outlineVerticalPadding: theme.space.xsmall
|
|
2375
|
-
};
|
|
2376
|
-
var radii = {
|
|
2377
|
-
outline: theme.radii.medium
|
|
2378
|
-
};
|
|
2379
|
-
var borderWidths = {
|
|
2380
|
-
headerBottom: theme.borderWidths.base
|
|
2381
|
-
};
|
|
2382
|
-
var sizes = {
|
|
2383
|
-
indicator: theme.space.xxsmall
|
|
2384
|
-
};
|
|
2385
|
-
return {
|
|
2386
|
-
borderWidths: borderWidths,
|
|
2387
|
-
colors: colors,
|
|
2388
|
-
space: space,
|
|
2389
|
-
radii: radii,
|
|
2390
|
-
sizes: sizes
|
|
2391
|
-
};
|
|
2392
|
-
};
|
|
2393
|
-
|
|
2394
|
-
var getTagTheme = function getTagTheme(theme) {
|
|
2395
|
-
var borderWidths = {
|
|
2396
|
-
"default": theme.borderWidths.base
|
|
2397
|
-
};
|
|
2398
|
-
var colors = {
|
|
2399
|
-
danger: theme.colors.danger,
|
|
2400
|
-
dangerBackground: theme.colors.dangerBackground,
|
|
2401
|
-
info: theme.colors.info,
|
|
2402
|
-
infoBackground: theme.colors.infoBackground,
|
|
2403
|
-
success: theme.colors.successDark,
|
|
2404
|
-
successBackground: theme.colors.successBackground,
|
|
2405
|
-
warning: theme.colors.warningDark,
|
|
2406
|
-
warningBackground: theme.colors.warningBackground
|
|
2407
|
-
};
|
|
2408
|
-
var fonts = {
|
|
2409
|
-
"default": theme.fonts.semiBold
|
|
2410
|
-
};
|
|
2411
|
-
var fontSizes = {
|
|
2412
|
-
"default": theme.fontSizes.small
|
|
2413
|
-
};
|
|
2414
|
-
var space = {
|
|
2415
|
-
horizontalPadding: theme.space.small,
|
|
2416
|
-
verticalPadding: theme.space.xxsmall
|
|
2417
|
-
};
|
|
2418
|
-
var radii = {
|
|
2419
|
-
"default": theme.radii.base
|
|
2420
|
-
};
|
|
2421
|
-
return {
|
|
2422
|
-
borderWidths: borderWidths,
|
|
2423
|
-
colors: colors,
|
|
2424
|
-
fonts: fonts,
|
|
2425
|
-
fontSizes: fontSizes,
|
|
2426
|
-
space: space,
|
|
2427
|
-
radii: radii
|
|
2428
|
-
};
|
|
2429
|
-
};
|
|
2430
|
-
|
|
2431
|
-
var getTextInputTheme = function getTextInputTheme(theme) {
|
|
2432
|
-
var colors = {
|
|
2433
|
-
labelBackground: theme.colors.platformBackground,
|
|
2434
|
-
border: theme.colors.text
|
|
2435
|
-
};
|
|
2436
|
-
var space = {
|
|
2437
|
-
containerPadding: theme.space.medium,
|
|
2438
|
-
labelLeft: theme.space.medium,
|
|
2439
|
-
labelTop: theme.lineHeights.small / -2,
|
|
2440
|
-
labelHorizontalPadding: theme.space.xsmall,
|
|
2441
|
-
inputHorizontalMargin: theme.space.small
|
|
2442
|
-
};
|
|
2443
|
-
var fontSizes = {
|
|
2444
|
-
text: theme.fontSizes.large
|
|
2445
|
-
};
|
|
2446
|
-
var borderWidths = {
|
|
2447
|
-
container: theme.borderWidths.base
|
|
2448
|
-
};
|
|
2449
|
-
var radii = {
|
|
2450
|
-
container: theme.radii.medium
|
|
2451
|
-
};
|
|
2452
|
-
return {
|
|
2453
|
-
colors: colors,
|
|
2454
|
-
space: space,
|
|
2455
|
-
fontSizes: fontSizes,
|
|
2456
|
-
borderWidths: borderWidths,
|
|
2457
|
-
radii: radii
|
|
2458
|
-
};
|
|
2459
|
-
};
|
|
2460
|
-
|
|
2461
|
-
var getTypographyTheme = function getTypographyTheme(theme) {
|
|
2462
|
-
var colors = {
|
|
2463
|
-
body: theme.colors.text,
|
|
2464
|
-
subdued: theme.colors.disabledText,
|
|
2465
|
-
primary: theme.colors.primary
|
|
2466
|
-
};
|
|
2467
|
-
var fonts = {
|
|
2468
|
-
light: theme.fonts.light,
|
|
2469
|
-
regular: theme.fonts.regular,
|
|
2470
|
-
semiBold: theme.fonts.semiBold
|
|
2471
|
-
};
|
|
2472
|
-
var fontSizes = {
|
|
2473
|
-
small: theme.fontSizes.small,
|
|
2474
|
-
medium: theme.fontSizes.medium,
|
|
2475
|
-
large: theme.fontSizes.large,
|
|
2476
|
-
xlarge: theme.fontSizes.xlarge
|
|
2477
|
-
};
|
|
2478
|
-
var lineHeights = {
|
|
2479
|
-
small: theme.lineHeights.small,
|
|
2480
|
-
medium: theme.lineHeights.medium,
|
|
2481
|
-
large: theme.lineHeights.large,
|
|
2482
|
-
xlarge: theme.lineHeights.xlarge
|
|
2483
|
-
};
|
|
2484
|
-
return {
|
|
2485
|
-
colors: colors,
|
|
2486
|
-
fonts: fonts,
|
|
2487
|
-
fontSizes: fontSizes,
|
|
2488
|
-
lineHeights: lineHeights
|
|
2489
|
-
};
|
|
2490
|
-
};
|
|
2491
|
-
|
|
2492
|
-
var getTheme = function getTheme() {
|
|
2493
|
-
var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
|
|
2494
|
-
var systemPallete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : systemPalette;
|
|
2495
|
-
var globalTheme = getGlobalTheme(scale, systemPallete);
|
|
2496
|
-
return _objectSpread2(_objectSpread2({}, globalTheme), {}, {
|
|
2497
|
-
__hd__: {
|
|
2498
|
-
avatar: getAvatarTheme(globalTheme),
|
|
2499
|
-
alert: getAlertTheme(globalTheme),
|
|
2500
|
-
badge: getBadgeTheme(globalTheme),
|
|
2501
|
-
bottomNavigation: getBottomNavigationTheme(globalTheme),
|
|
2502
|
-
bottomSheet: getBottomSheetTheme(globalTheme),
|
|
2503
|
-
button: getButtonTheme(globalTheme),
|
|
2504
|
-
card: getCardTheme(globalTheme),
|
|
2505
|
-
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
2506
|
-
divider: getDividerTheme(globalTheme),
|
|
2507
|
-
drawer: getDrawerTheme(globalTheme),
|
|
2508
|
-
fab: getFABTheme(globalTheme),
|
|
2509
|
-
icon: getIconTheme(globalTheme),
|
|
2510
|
-
progress: getProgressTheme(globalTheme),
|
|
2511
|
-
radio: getRadioTheme(globalTheme),
|
|
2512
|
-
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
2513
|
-
select: getSelectTheme(globalTheme),
|
|
2514
|
-
spinner: getSpinnerTheme(globalTheme),
|
|
2515
|
-
"switch": getSwitchTheme(globalTheme),
|
|
2516
|
-
tabs: getTabsTheme(globalTheme),
|
|
2517
|
-
tag: getTagTheme(globalTheme),
|
|
2518
|
-
textInput: getTextInputTheme(globalTheme),
|
|
2519
|
-
typography: getTypographyTheme(globalTheme)
|
|
2520
|
-
}
|
|
2521
|
-
});
|
|
2522
|
-
};
|
|
2523
|
-
|
|
2524
|
-
var theme = getTheme();
|
|
2525
|
-
|
|
2526
|
-
function getDefaultExportFromCjs (x) {
|
|
2527
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
var dist = {};
|
|
2531
|
-
|
|
2532
|
-
function _interopRequireDefault$5(obj) {
|
|
2533
|
-
return obj && obj.__esModule ? obj : {
|
|
2534
|
-
"default": obj
|
|
2535
|
-
};
|
|
2536
|
-
}
|
|
2537
|
-
|
|
2538
|
-
var interopRequireDefault = _interopRequireDefault$5;
|
|
2539
|
-
|
|
2540
|
-
var createIconSet$1 = {};
|
|
2541
|
-
|
|
2542
|
-
function _arrayWithoutHoles(arr) {
|
|
2543
|
-
if (Array.isArray(arr)) {
|
|
2544
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
2545
|
-
arr2[i] = arr[i];
|
|
2546
|
-
}
|
|
2547
|
-
|
|
2548
|
-
return arr2;
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
|
|
2552
|
-
var arrayWithoutHoles$1 = _arrayWithoutHoles;
|
|
2553
|
-
|
|
2554
|
-
function _iterableToArray(iter) {
|
|
2555
|
-
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
|
2556
|
-
}
|
|
2557
|
-
|
|
2558
|
-
var iterableToArray$1 = _iterableToArray;
|
|
2559
|
-
|
|
2560
|
-
function _nonIterableSpread() {
|
|
2561
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
var nonIterableSpread$1 = _nonIterableSpread;
|
|
2565
|
-
|
|
2566
|
-
var arrayWithoutHoles = arrayWithoutHoles$1;
|
|
2567
|
-
var iterableToArray = iterableToArray$1;
|
|
2568
|
-
var nonIterableSpread = nonIterableSpread$1;
|
|
2569
|
-
|
|
2570
|
-
function _toConsumableArray(arr) {
|
|
2571
|
-
return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
var toConsumableArray = _toConsumableArray;
|
|
2575
|
-
|
|
2576
|
-
var runtime = {exports: {}};
|
|
2577
|
-
|
|
2578
|
-
(function (module) {
|
|
2579
|
-
var runtime = function (exports) {
|
|
2580
|
-
|
|
2581
|
-
var Op = Object.prototype;
|
|
2582
|
-
var hasOwn = Op.hasOwnProperty;
|
|
2583
|
-
var undefined$1; // More compressible than void 0.
|
|
2584
|
-
|
|
2585
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
2586
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
2587
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
2588
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
2589
|
-
|
|
2590
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
2591
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
2592
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
2593
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
2594
|
-
var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
|
|
2595
|
-
// .throw, and .return methods.
|
|
2596
|
-
|
|
2597
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
2598
|
-
return generator;
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
|
|
2602
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
2603
|
-
// have been (and was previously) designed to take a closure to be
|
|
2604
|
-
// invoked without arguments, but in all the cases we care about we
|
|
2605
|
-
// already have an existing method we want to call, so there's no need
|
|
2606
|
-
// to create a new function object. We can even get away with assuming
|
|
2607
|
-
// the method takes exactly one argument, since that happens to be true
|
|
2608
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
2609
|
-
// only additional allocation required is the completion record, which
|
|
2610
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
2611
|
-
|
|
2612
|
-
function tryCatch(fn, obj, arg) {
|
|
2613
|
-
try {
|
|
2614
|
-
return {
|
|
2615
|
-
type: "normal",
|
|
2616
|
-
arg: fn.call(obj, arg)
|
|
2617
|
-
};
|
|
2618
|
-
} catch (err) {
|
|
2619
|
-
return {
|
|
2620
|
-
type: "throw",
|
|
2621
|
-
arg: err
|
|
2622
|
-
};
|
|
2623
|
-
}
|
|
2624
|
-
}
|
|
2625
|
-
|
|
2626
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
2627
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
2628
|
-
var GenStateExecuting = "executing";
|
|
2629
|
-
var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
|
|
2630
|
-
// breaking out of the dispatch switch statement.
|
|
2631
|
-
|
|
2632
|
-
var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
|
|
2633
|
-
// .constructor.prototype properties for functions that return Generator
|
|
2634
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
2635
|
-
// minifier not to mangle the names of these two functions.
|
|
2636
|
-
|
|
2637
|
-
function Generator() {}
|
|
2638
|
-
|
|
2639
|
-
function GeneratorFunction() {}
|
|
2640
|
-
|
|
2641
|
-
function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
|
|
2642
|
-
// don't natively support it.
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
var IteratorPrototype = {};
|
|
2646
|
-
|
|
2647
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
2648
|
-
return this;
|
|
2649
|
-
};
|
|
2650
|
-
|
|
2651
|
-
var getProto = Object.getPrototypeOf;
|
|
2652
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
2653
|
-
|
|
2654
|
-
if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
2655
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
2656
|
-
// of the polyfill.
|
|
2657
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
2661
|
-
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
2662
|
-
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
2663
|
-
GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
|
|
2664
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
2665
|
-
|
|
2666
|
-
function defineIteratorMethods(prototype) {
|
|
2667
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
2668
|
-
prototype[method] = function (arg) {
|
|
2669
|
-
return this._invoke(method, arg);
|
|
2670
|
-
};
|
|
2671
|
-
});
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
exports.isGeneratorFunction = function (genFun) {
|
|
2675
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
2676
|
-
return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
|
|
2677
|
-
// do is to check its .name property.
|
|
2678
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
|
|
2679
|
-
};
|
|
2680
|
-
|
|
2681
|
-
exports.mark = function (genFun) {
|
|
2682
|
-
if (Object.setPrototypeOf) {
|
|
2683
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
2684
|
-
} else {
|
|
2685
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
2686
|
-
|
|
2687
|
-
if (!(toStringTagSymbol in genFun)) {
|
|
2688
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
2689
|
-
}
|
|
2690
|
-
}
|
|
2691
|
-
|
|
2692
|
-
genFun.prototype = Object.create(Gp);
|
|
2693
|
-
return genFun;
|
|
2694
|
-
}; // Within the body of any async function, `await x` is transformed to
|
|
2695
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
2696
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
2697
|
-
// meant to be awaited.
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
exports.awrap = function (arg) {
|
|
2701
|
-
return {
|
|
2702
|
-
__await: arg
|
|
2703
|
-
};
|
|
2704
|
-
};
|
|
2705
|
-
|
|
2706
|
-
function AsyncIterator(generator) {
|
|
2707
|
-
function invoke(method, arg, resolve, reject) {
|
|
2708
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
2709
|
-
|
|
2710
|
-
if (record.type === "throw") {
|
|
2711
|
-
reject(record.arg);
|
|
2712
|
-
} else {
|
|
2713
|
-
var result = record.arg;
|
|
2714
|
-
var value = result.value;
|
|
2715
|
-
|
|
2716
|
-
if (value && _typeof$2(value) === "object" && hasOwn.call(value, "__await")) {
|
|
2717
|
-
return Promise.resolve(value.__await).then(function (value) {
|
|
2718
|
-
invoke("next", value, resolve, reject);
|
|
2719
|
-
}, function (err) {
|
|
2720
|
-
invoke("throw", err, resolve, reject);
|
|
2721
|
-
});
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
return Promise.resolve(value).then(function (unwrapped) {
|
|
2725
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
2726
|
-
// the .value of the Promise<{value,done}> result for the
|
|
2727
|
-
// current iteration.
|
|
2728
|
-
result.value = unwrapped;
|
|
2729
|
-
resolve(result);
|
|
2730
|
-
}, function (error) {
|
|
2731
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
2732
|
-
// into the async generator function so it can be handled there.
|
|
2733
|
-
return invoke("throw", error, resolve, reject);
|
|
2734
|
-
});
|
|
2735
|
-
}
|
|
2736
|
-
}
|
|
2737
|
-
|
|
2738
|
-
var previousPromise;
|
|
2739
|
-
|
|
2740
|
-
function enqueue(method, arg) {
|
|
2741
|
-
function callInvokeWithMethodAndArg() {
|
|
2742
|
-
return new Promise(function (resolve, reject) {
|
|
2743
|
-
invoke(method, arg, resolve, reject);
|
|
2744
|
-
});
|
|
2745
|
-
}
|
|
2746
|
-
|
|
2747
|
-
return previousPromise = // If enqueue has been called before, then we want to wait until
|
|
2748
|
-
// all previous Promises have been resolved before calling invoke,
|
|
2749
|
-
// so that results are always delivered in the correct order. If
|
|
2750
|
-
// enqueue has not been called before, then it is important to
|
|
2751
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
2752
|
-
// so that the async generator function has the opportunity to do
|
|
2753
|
-
// any necessary setup in a predictable way. This predictability
|
|
2754
|
-
// is why the Promise constructor synchronously invokes its
|
|
2755
|
-
// executor callback, and why async functions synchronously
|
|
2756
|
-
// execute code before the first await. Since we implement simple
|
|
2757
|
-
// async functions in terms of async generators, it is especially
|
|
2758
|
-
// important to get this right, even though it requires care.
|
|
2759
|
-
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
|
|
2760
|
-
// invocations of the iterator.
|
|
2761
|
-
callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
2762
|
-
} // Define the unified helper method that is used to implement .next,
|
|
2763
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
this._invoke = enqueue;
|
|
2767
|
-
}
|
|
2768
|
-
|
|
2769
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
2770
|
-
|
|
2771
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
2772
|
-
return this;
|
|
2773
|
-
};
|
|
2774
|
-
|
|
2775
|
-
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
2776
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
2777
|
-
// the final result produced by the iterator.
|
|
2778
|
-
|
|
2779
|
-
exports.async = function (innerFn, outerFn, self, tryLocsList) {
|
|
2780
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
|
|
2781
|
-
return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
|
|
2782
|
-
: iter.next().then(function (result) {
|
|
2783
|
-
return result.done ? result.value : iter.next();
|
|
2784
|
-
});
|
|
2785
|
-
};
|
|
2786
|
-
|
|
2787
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
2788
|
-
var state = GenStateSuspendedStart;
|
|
2789
|
-
return function invoke(method, arg) {
|
|
2790
|
-
if (state === GenStateExecuting) {
|
|
2791
|
-
throw new Error("Generator is already running");
|
|
2792
|
-
}
|
|
2793
|
-
|
|
2794
|
-
if (state === GenStateCompleted) {
|
|
2795
|
-
if (method === "throw") {
|
|
2796
|
-
throw arg;
|
|
2797
|
-
} // Be forgiving, per 25.3.3.3.3 of the spec:
|
|
2798
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
return doneResult();
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
context.method = method;
|
|
2805
|
-
context.arg = arg;
|
|
2806
|
-
|
|
2807
|
-
while (true) {
|
|
2808
|
-
var delegate = context.delegate;
|
|
2809
|
-
|
|
2810
|
-
if (delegate) {
|
|
2811
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
2812
|
-
|
|
2813
|
-
if (delegateResult) {
|
|
2814
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
2815
|
-
return delegateResult;
|
|
2816
|
-
}
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
if (context.method === "next") {
|
|
2820
|
-
// Setting context._sent for legacy support of Babel's
|
|
2821
|
-
// function.sent implementation.
|
|
2822
|
-
context.sent = context._sent = context.arg;
|
|
2823
|
-
} else if (context.method === "throw") {
|
|
2824
|
-
if (state === GenStateSuspendedStart) {
|
|
2825
|
-
state = GenStateCompleted;
|
|
2826
|
-
throw context.arg;
|
|
2827
|
-
}
|
|
2828
|
-
|
|
2829
|
-
context.dispatchException(context.arg);
|
|
2830
|
-
} else if (context.method === "return") {
|
|
2831
|
-
context.abrupt("return", context.arg);
|
|
2832
|
-
}
|
|
2833
|
-
|
|
2834
|
-
state = GenStateExecuting;
|
|
2835
|
-
var record = tryCatch(innerFn, self, context);
|
|
2836
|
-
|
|
2837
|
-
if (record.type === "normal") {
|
|
2838
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
2839
|
-
// GenStateExecuting and loop back for another invocation.
|
|
2840
|
-
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
|
|
2841
|
-
|
|
2842
|
-
if (record.arg === ContinueSentinel) {
|
|
2843
|
-
continue;
|
|
2844
|
-
}
|
|
2845
|
-
|
|
2846
|
-
return {
|
|
2847
|
-
value: record.arg,
|
|
2848
|
-
done: context.done
|
|
2849
|
-
};
|
|
2850
|
-
} else if (record.type === "throw") {
|
|
2851
|
-
state = GenStateCompleted; // Dispatch the exception by looping back around to the
|
|
2852
|
-
// context.dispatchException(context.arg) call above.
|
|
2853
|
-
|
|
2854
|
-
context.method = "throw";
|
|
2855
|
-
context.arg = record.arg;
|
|
2856
|
-
}
|
|
2857
|
-
}
|
|
2858
|
-
};
|
|
2859
|
-
} // Call delegate.iterator[context.method](context.arg) and handle the
|
|
2860
|
-
// result, either by returning a { value, done } result from the
|
|
2861
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
2862
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
2866
|
-
var method = delegate.iterator[context.method];
|
|
2867
|
-
|
|
2868
|
-
if (method === undefined$1) {
|
|
2869
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
2870
|
-
// method always terminates the yield* loop.
|
|
2871
|
-
context.delegate = null;
|
|
2872
|
-
|
|
2873
|
-
if (context.method === "throw") {
|
|
2874
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
2875
|
-
if (delegate.iterator["return"]) {
|
|
2876
|
-
// If the delegate iterator has a return method, give it a
|
|
2877
|
-
// chance to clean up.
|
|
2878
|
-
context.method = "return";
|
|
2879
|
-
context.arg = undefined$1;
|
|
2880
|
-
maybeInvokeDelegate(delegate, context);
|
|
2881
|
-
|
|
2882
|
-
if (context.method === "throw") {
|
|
2883
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
2884
|
-
// "return" to "throw", let that override the TypeError below.
|
|
2885
|
-
return ContinueSentinel;
|
|
2886
|
-
}
|
|
2887
|
-
}
|
|
2888
|
-
|
|
2889
|
-
context.method = "throw";
|
|
2890
|
-
context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
2891
|
-
}
|
|
2892
|
-
|
|
2893
|
-
return ContinueSentinel;
|
|
2894
|
-
}
|
|
2895
|
-
|
|
2896
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
2897
|
-
|
|
2898
|
-
if (record.type === "throw") {
|
|
2899
|
-
context.method = "throw";
|
|
2900
|
-
context.arg = record.arg;
|
|
2901
|
-
context.delegate = null;
|
|
2902
|
-
return ContinueSentinel;
|
|
2903
|
-
}
|
|
2904
|
-
|
|
2905
|
-
var info = record.arg;
|
|
2906
|
-
|
|
2907
|
-
if (!info) {
|
|
2908
|
-
context.method = "throw";
|
|
2909
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
2910
|
-
context.delegate = null;
|
|
2911
|
-
return ContinueSentinel;
|
|
2912
|
-
}
|
|
2913
|
-
|
|
2914
|
-
if (info.done) {
|
|
2915
|
-
// Assign the result of the finished delegate to the temporary
|
|
2916
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
2917
|
-
context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
|
|
2918
|
-
|
|
2919
|
-
context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
|
|
2920
|
-
// exception, let the outer generator proceed normally. If
|
|
2921
|
-
// context.method was "next", forget context.arg since it has been
|
|
2922
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
2923
|
-
// "return", allow the original .return call to continue in the
|
|
2924
|
-
// outer generator.
|
|
2925
|
-
|
|
2926
|
-
if (context.method !== "return") {
|
|
2927
|
-
context.method = "next";
|
|
2928
|
-
context.arg = undefined$1;
|
|
2929
|
-
}
|
|
2930
|
-
} else {
|
|
2931
|
-
// Re-yield the result returned by the delegate method.
|
|
2932
|
-
return info;
|
|
2933
|
-
} // The delegate iterator is finished, so forget it and continue with
|
|
2934
|
-
// the outer generator.
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
context.delegate = null;
|
|
2938
|
-
return ContinueSentinel;
|
|
2939
|
-
} // Define Generator.prototype.{next,throw,return} in terms of the
|
|
2940
|
-
// unified ._invoke helper method.
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
defineIteratorMethods(Gp);
|
|
2944
|
-
Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
|
|
2945
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
2946
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
2947
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
2948
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
2949
|
-
|
|
2950
|
-
Gp[iteratorSymbol] = function () {
|
|
2951
|
-
return this;
|
|
2952
|
-
};
|
|
2953
|
-
|
|
2954
|
-
Gp.toString = function () {
|
|
2955
|
-
return "[object Generator]";
|
|
2956
|
-
};
|
|
2957
|
-
|
|
2958
|
-
function pushTryEntry(locs) {
|
|
2959
|
-
var entry = {
|
|
2960
|
-
tryLoc: locs[0]
|
|
2961
|
-
};
|
|
2962
|
-
|
|
2963
|
-
if (1 in locs) {
|
|
2964
|
-
entry.catchLoc = locs[1];
|
|
2965
|
-
}
|
|
2966
|
-
|
|
2967
|
-
if (2 in locs) {
|
|
2968
|
-
entry.finallyLoc = locs[2];
|
|
2969
|
-
entry.afterLoc = locs[3];
|
|
2970
|
-
}
|
|
2971
|
-
|
|
2972
|
-
this.tryEntries.push(entry);
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
|
-
function resetTryEntry(entry) {
|
|
2976
|
-
var record = entry.completion || {};
|
|
2977
|
-
record.type = "normal";
|
|
2978
|
-
delete record.arg;
|
|
2979
|
-
entry.completion = record;
|
|
2980
|
-
}
|
|
2981
|
-
|
|
2982
|
-
function Context(tryLocsList) {
|
|
2983
|
-
// The root entry object (effectively a try statement without a catch
|
|
2984
|
-
// or a finally block) gives us a place to store values thrown from
|
|
2985
|
-
// locations where there is no enclosing try statement.
|
|
2986
|
-
this.tryEntries = [{
|
|
2987
|
-
tryLoc: "root"
|
|
2988
|
-
}];
|
|
2989
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
2990
|
-
this.reset(true);
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
exports.keys = function (object) {
|
|
2994
|
-
var keys = [];
|
|
2995
|
-
|
|
2996
|
-
for (var key in object) {
|
|
2997
|
-
keys.push(key);
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
keys.reverse(); // Rather than returning an object with a next method, we keep
|
|
3001
|
-
// things simple and return the next function itself.
|
|
3002
|
-
|
|
3003
|
-
return function next() {
|
|
3004
|
-
while (keys.length) {
|
|
3005
|
-
var key = keys.pop();
|
|
3006
|
-
|
|
3007
|
-
if (key in object) {
|
|
3008
|
-
next.value = key;
|
|
3009
|
-
next.done = false;
|
|
3010
|
-
return next;
|
|
3011
|
-
}
|
|
3012
|
-
} // To avoid creating an additional object, we just hang the .value
|
|
3013
|
-
// and .done properties off the next function object itself. This
|
|
3014
|
-
// also ensures that the minifier will not anonymize the function.
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
next.done = true;
|
|
3018
|
-
return next;
|
|
3019
|
-
};
|
|
3020
|
-
};
|
|
3021
|
-
|
|
3022
|
-
function values(iterable) {
|
|
3023
|
-
if (iterable) {
|
|
3024
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
3025
|
-
|
|
3026
|
-
if (iteratorMethod) {
|
|
3027
|
-
return iteratorMethod.call(iterable);
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
|
-
if (typeof iterable.next === "function") {
|
|
3031
|
-
return iterable;
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
if (!isNaN(iterable.length)) {
|
|
3035
|
-
var i = -1,
|
|
3036
|
-
next = function next() {
|
|
3037
|
-
while (++i < iterable.length) {
|
|
3038
|
-
if (hasOwn.call(iterable, i)) {
|
|
3039
|
-
next.value = iterable[i];
|
|
3040
|
-
next.done = false;
|
|
3041
|
-
return next;
|
|
3042
|
-
}
|
|
3043
|
-
}
|
|
3044
|
-
|
|
3045
|
-
next.value = undefined$1;
|
|
3046
|
-
next.done = true;
|
|
3047
|
-
return next;
|
|
3048
|
-
};
|
|
3049
|
-
|
|
3050
|
-
return next.next = next;
|
|
3051
|
-
}
|
|
3052
|
-
} // Return an iterator with no values.
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
return {
|
|
3056
|
-
next: doneResult
|
|
3057
|
-
};
|
|
3058
|
-
}
|
|
3059
|
-
|
|
3060
|
-
exports.values = values;
|
|
3061
|
-
|
|
3062
|
-
function doneResult() {
|
|
3063
|
-
return {
|
|
3064
|
-
value: undefined$1,
|
|
3065
|
-
done: true
|
|
3066
|
-
};
|
|
3067
|
-
}
|
|
3068
|
-
|
|
3069
|
-
Context.prototype = {
|
|
3070
|
-
constructor: Context,
|
|
3071
|
-
reset: function reset(skipTempReset) {
|
|
3072
|
-
this.prev = 0;
|
|
3073
|
-
this.next = 0; // Resetting context._sent for legacy support of Babel's
|
|
3074
|
-
// function.sent implementation.
|
|
3075
|
-
|
|
3076
|
-
this.sent = this._sent = undefined$1;
|
|
3077
|
-
this.done = false;
|
|
3078
|
-
this.delegate = null;
|
|
3079
|
-
this.method = "next";
|
|
3080
|
-
this.arg = undefined$1;
|
|
3081
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
3082
|
-
|
|
3083
|
-
if (!skipTempReset) {
|
|
3084
|
-
for (var name in this) {
|
|
3085
|
-
// Not sure about the optimal order of these conditions:
|
|
3086
|
-
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
|
|
3087
|
-
this[name] = undefined$1;
|
|
3088
|
-
}
|
|
3089
|
-
}
|
|
3090
|
-
}
|
|
3091
|
-
},
|
|
3092
|
-
stop: function stop() {
|
|
3093
|
-
this.done = true;
|
|
3094
|
-
var rootEntry = this.tryEntries[0];
|
|
3095
|
-
var rootRecord = rootEntry.completion;
|
|
3096
|
-
|
|
3097
|
-
if (rootRecord.type === "throw") {
|
|
3098
|
-
throw rootRecord.arg;
|
|
3099
|
-
}
|
|
3100
|
-
|
|
3101
|
-
return this.rval;
|
|
3102
|
-
},
|
|
3103
|
-
dispatchException: function dispatchException(exception) {
|
|
3104
|
-
if (this.done) {
|
|
3105
|
-
throw exception;
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
|
-
var context = this;
|
|
3109
|
-
|
|
3110
|
-
function handle(loc, caught) {
|
|
3111
|
-
record.type = "throw";
|
|
3112
|
-
record.arg = exception;
|
|
3113
|
-
context.next = loc;
|
|
3114
|
-
|
|
3115
|
-
if (caught) {
|
|
3116
|
-
// If the dispatched exception was caught by a catch block,
|
|
3117
|
-
// then let that catch block handle the exception normally.
|
|
3118
|
-
context.method = "next";
|
|
3119
|
-
context.arg = undefined$1;
|
|
3120
|
-
}
|
|
3121
|
-
|
|
3122
|
-
return !!caught;
|
|
3123
|
-
}
|
|
3124
|
-
|
|
3125
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3126
|
-
var entry = this.tryEntries[i];
|
|
3127
|
-
var record = entry.completion;
|
|
3128
|
-
|
|
3129
|
-
if (entry.tryLoc === "root") {
|
|
3130
|
-
// Exception thrown outside of any try block that could handle
|
|
3131
|
-
// it, so set the completion value of the entire function to
|
|
3132
|
-
// throw the exception.
|
|
3133
|
-
return handle("end");
|
|
3134
|
-
}
|
|
3135
|
-
|
|
3136
|
-
if (entry.tryLoc <= this.prev) {
|
|
3137
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
3138
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
3139
|
-
|
|
3140
|
-
if (hasCatch && hasFinally) {
|
|
3141
|
-
if (this.prev < entry.catchLoc) {
|
|
3142
|
-
return handle(entry.catchLoc, true);
|
|
3143
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
3144
|
-
return handle(entry.finallyLoc);
|
|
3145
|
-
}
|
|
3146
|
-
} else if (hasCatch) {
|
|
3147
|
-
if (this.prev < entry.catchLoc) {
|
|
3148
|
-
return handle(entry.catchLoc, true);
|
|
3149
|
-
}
|
|
3150
|
-
} else if (hasFinally) {
|
|
3151
|
-
if (this.prev < entry.finallyLoc) {
|
|
3152
|
-
return handle(entry.finallyLoc);
|
|
3153
|
-
}
|
|
3154
|
-
} else {
|
|
3155
|
-
throw new Error("try statement without catch or finally");
|
|
3156
|
-
}
|
|
3157
|
-
}
|
|
3158
|
-
}
|
|
3159
|
-
},
|
|
3160
|
-
abrupt: function abrupt(type, arg) {
|
|
3161
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3162
|
-
var entry = this.tryEntries[i];
|
|
3163
|
-
|
|
3164
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
3165
|
-
var finallyEntry = entry;
|
|
3166
|
-
break;
|
|
3167
|
-
}
|
|
3168
|
-
}
|
|
3169
|
-
|
|
3170
|
-
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
|
|
3171
|
-
// Ignore the finally entry if control is not jumping to a
|
|
3172
|
-
// location outside the try/catch block.
|
|
3173
|
-
finallyEntry = null;
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3176
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
3177
|
-
record.type = type;
|
|
3178
|
-
record.arg = arg;
|
|
3179
|
-
|
|
3180
|
-
if (finallyEntry) {
|
|
3181
|
-
this.method = "next";
|
|
3182
|
-
this.next = finallyEntry.finallyLoc;
|
|
3183
|
-
return ContinueSentinel;
|
|
3184
|
-
}
|
|
3185
|
-
|
|
3186
|
-
return this.complete(record);
|
|
3187
|
-
},
|
|
3188
|
-
complete: function complete(record, afterLoc) {
|
|
3189
|
-
if (record.type === "throw") {
|
|
3190
|
-
throw record.arg;
|
|
3191
|
-
}
|
|
3192
|
-
|
|
3193
|
-
if (record.type === "break" || record.type === "continue") {
|
|
3194
|
-
this.next = record.arg;
|
|
3195
|
-
} else if (record.type === "return") {
|
|
3196
|
-
this.rval = this.arg = record.arg;
|
|
3197
|
-
this.method = "return";
|
|
3198
|
-
this.next = "end";
|
|
3199
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
3200
|
-
this.next = afterLoc;
|
|
3201
|
-
}
|
|
3202
|
-
|
|
3203
|
-
return ContinueSentinel;
|
|
3204
|
-
},
|
|
3205
|
-
finish: function finish(finallyLoc) {
|
|
3206
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3207
|
-
var entry = this.tryEntries[i];
|
|
3208
|
-
|
|
3209
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
3210
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
3211
|
-
resetTryEntry(entry);
|
|
3212
|
-
return ContinueSentinel;
|
|
3213
|
-
}
|
|
3214
|
-
}
|
|
3215
|
-
},
|
|
3216
|
-
"catch": function _catch(tryLoc) {
|
|
3217
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3218
|
-
var entry = this.tryEntries[i];
|
|
3219
|
-
|
|
3220
|
-
if (entry.tryLoc === tryLoc) {
|
|
3221
|
-
var record = entry.completion;
|
|
3222
|
-
|
|
3223
|
-
if (record.type === "throw") {
|
|
3224
|
-
var thrown = record.arg;
|
|
3225
|
-
resetTryEntry(entry);
|
|
3226
|
-
}
|
|
3227
|
-
|
|
3228
|
-
return thrown;
|
|
3229
|
-
}
|
|
3230
|
-
} // The context.catch method must only be called with a location
|
|
3231
|
-
// argument that corresponds to a known catch block.
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
throw new Error("illegal catch attempt");
|
|
3235
|
-
},
|
|
3236
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
3237
|
-
this.delegate = {
|
|
3238
|
-
iterator: values(iterable),
|
|
3239
|
-
resultName: resultName,
|
|
3240
|
-
nextLoc: nextLoc
|
|
3241
|
-
};
|
|
3242
|
-
|
|
3243
|
-
if (this.method === "next") {
|
|
3244
|
-
// Deliberately forget the last sent value so that we don't
|
|
3245
|
-
// accidentally pass it on to the delegate.
|
|
3246
|
-
this.arg = undefined$1;
|
|
3247
|
-
}
|
|
3248
|
-
|
|
3249
|
-
return ContinueSentinel;
|
|
3250
|
-
}
|
|
3251
|
-
}; // Regardless of whether this script is executing as a CommonJS module
|
|
3252
|
-
// or not, return the runtime object so that we can declare the variable
|
|
3253
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
3254
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
3255
|
-
|
|
3256
|
-
return exports;
|
|
3257
|
-
}( // If this script is executing as a CommonJS module, use module.exports
|
|
3258
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
3259
|
-
// object. Either way, the resulting object will be used to initialize
|
|
3260
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
3261
|
-
module.exports );
|
|
3262
|
-
|
|
3263
|
-
try {
|
|
3264
|
-
regeneratorRuntime = runtime;
|
|
3265
|
-
} catch (accidentalStrictMode) {
|
|
3266
|
-
// This module should not be running in strict mode, so the above
|
|
3267
|
-
// assignment should always work unless something is misconfigured. Just
|
|
3268
|
-
// in case runtime.js accidentally runs in strict mode, we can escape
|
|
3269
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
3270
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
3271
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
3272
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
3273
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
3274
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
3275
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
3276
|
-
}
|
|
3277
|
-
})(runtime);
|
|
3278
|
-
|
|
3279
|
-
var regenerator = runtime.exports;
|
|
3280
|
-
|
|
3281
|
-
function _extends$1() {
|
|
3282
|
-
_extends_1 = _extends$1 = Object.assign || function (target) {
|
|
3283
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3284
|
-
var source = arguments[i];
|
|
3285
|
-
|
|
3286
|
-
for (var key in source) {
|
|
3287
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3288
|
-
target[key] = source[key];
|
|
3289
|
-
}
|
|
3290
|
-
}
|
|
3291
|
-
}
|
|
3292
|
-
|
|
3293
|
-
return target;
|
|
3294
|
-
};
|
|
3295
|
-
|
|
3296
|
-
return _extends$1.apply(this, arguments);
|
|
3297
|
-
}
|
|
3298
|
-
|
|
3299
|
-
var _extends_1 = _extends$1;
|
|
3300
|
-
|
|
3301
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
3302
|
-
if (source == null) return {};
|
|
3303
|
-
var target = {};
|
|
3304
|
-
var sourceKeys = Object.keys(source);
|
|
3305
|
-
var key, i;
|
|
3306
|
-
|
|
3307
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
3308
|
-
key = sourceKeys[i];
|
|
3309
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
3310
|
-
target[key] = source[key];
|
|
3311
|
-
}
|
|
3312
|
-
|
|
3313
|
-
return target;
|
|
3314
|
-
}
|
|
3315
|
-
|
|
3316
|
-
var objectWithoutPropertiesLoose$1 = _objectWithoutPropertiesLoose;
|
|
3317
|
-
|
|
3318
|
-
var objectWithoutPropertiesLoose = objectWithoutPropertiesLoose$1;
|
|
3319
|
-
|
|
3320
|
-
function _objectWithoutProperties(source, excluded) {
|
|
3321
|
-
if (source == null) return {};
|
|
3322
|
-
var target = objectWithoutPropertiesLoose(source, excluded);
|
|
3323
|
-
var key, i;
|
|
3324
|
-
|
|
3325
|
-
if (Object.getOwnPropertySymbols) {
|
|
3326
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
3327
|
-
|
|
3328
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
3329
|
-
key = sourceSymbolKeys[i];
|
|
3330
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
3331
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
3332
|
-
target[key] = source[key];
|
|
3333
|
-
}
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3336
|
-
return target;
|
|
3337
|
-
}
|
|
3338
|
-
|
|
3339
|
-
var objectWithoutProperties = _objectWithoutProperties;
|
|
3340
|
-
|
|
3341
|
-
function _classCallCheck(instance, Constructor) {
|
|
3342
|
-
if (!(instance instanceof Constructor)) {
|
|
3343
|
-
throw new TypeError("Cannot call a class as a function");
|
|
3344
|
-
}
|
|
3345
|
-
}
|
|
3346
|
-
|
|
3347
|
-
var classCallCheck = _classCallCheck;
|
|
3348
|
-
|
|
3349
|
-
function _defineProperties(target, props) {
|
|
3350
|
-
for (var i = 0; i < props.length; i++) {
|
|
3351
|
-
var descriptor = props[i];
|
|
3352
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
3353
|
-
descriptor.configurable = true;
|
|
3354
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
3355
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
3356
|
-
}
|
|
3357
|
-
}
|
|
3358
|
-
|
|
3359
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
3360
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3361
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
3362
|
-
return Constructor;
|
|
3363
|
-
}
|
|
3364
|
-
|
|
3365
|
-
var createClass = _createClass;
|
|
3366
|
-
|
|
3367
|
-
function _typeof2(obj) {
|
|
3368
|
-
if (typeof Symbol === "function" && _typeof$2(Symbol.iterator) === "symbol") {
|
|
3369
|
-
_typeof2 = function _typeof2(obj) {
|
|
3370
|
-
return _typeof$2(obj);
|
|
3371
|
-
};
|
|
3372
|
-
} else {
|
|
3373
|
-
_typeof2 = function _typeof2(obj) {
|
|
3374
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof$2(obj);
|
|
3375
|
-
};
|
|
3376
|
-
}
|
|
3377
|
-
|
|
3378
|
-
return _typeof2(obj);
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
|
-
function _typeof$1(obj) {
|
|
3382
|
-
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
|
|
3383
|
-
_typeof_1 = _typeof$1 = function _typeof(obj) {
|
|
3384
|
-
return _typeof2(obj);
|
|
3385
|
-
};
|
|
3386
|
-
} else {
|
|
3387
|
-
_typeof_1 = _typeof$1 = function _typeof(obj) {
|
|
3388
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
|
3389
|
-
};
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
|
-
return _typeof$1(obj);
|
|
3393
|
-
}
|
|
3394
|
-
|
|
3395
|
-
var _typeof_1 = _typeof$1;
|
|
3396
|
-
|
|
3397
|
-
function _assertThisInitialized(self) {
|
|
3398
|
-
if (self === void 0) {
|
|
3399
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
|
-
return self;
|
|
3403
|
-
}
|
|
3404
|
-
|
|
3405
|
-
var assertThisInitialized$1 = _assertThisInitialized;
|
|
3406
|
-
|
|
3407
|
-
var _typeof = _typeof_1;
|
|
3408
|
-
var assertThisInitialized = assertThisInitialized$1;
|
|
3409
|
-
|
|
3410
|
-
function _possibleConstructorReturn(self, call) {
|
|
3411
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
3412
|
-
return call;
|
|
3413
|
-
}
|
|
3414
|
-
|
|
3415
|
-
return assertThisInitialized(self);
|
|
3416
|
-
}
|
|
3417
|
-
|
|
3418
|
-
var possibleConstructorReturn = _possibleConstructorReturn;
|
|
3419
|
-
|
|
3420
|
-
function _getPrototypeOf(o) {
|
|
3421
|
-
getPrototypeOf = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
3422
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
3423
|
-
};
|
|
3424
|
-
return _getPrototypeOf(o);
|
|
3425
|
-
}
|
|
3426
|
-
|
|
3427
|
-
var getPrototypeOf = _getPrototypeOf;
|
|
3428
|
-
|
|
3429
|
-
function _setPrototypeOf(o, p) {
|
|
3430
|
-
setPrototypeOf$1 = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
3431
|
-
o.__proto__ = p;
|
|
3432
|
-
return o;
|
|
3433
|
-
};
|
|
3434
|
-
|
|
3435
|
-
return _setPrototypeOf(o, p);
|
|
3436
|
-
}
|
|
3437
|
-
|
|
3438
|
-
var setPrototypeOf$1 = _setPrototypeOf;
|
|
3439
|
-
|
|
3440
|
-
var setPrototypeOf = setPrototypeOf$1;
|
|
3441
|
-
|
|
3442
|
-
function _inherits(subClass, superClass) {
|
|
3443
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
3444
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
3448
|
-
constructor: {
|
|
3449
|
-
value: subClass,
|
|
3450
|
-
writable: true,
|
|
3451
|
-
configurable: true
|
|
3452
|
-
}
|
|
3453
|
-
});
|
|
3454
|
-
if (superClass) setPrototypeOf(subClass, superClass);
|
|
3455
|
-
}
|
|
3456
|
-
|
|
3457
|
-
var inherits = _inherits;
|
|
3458
|
-
|
|
3459
|
-
var propTypes = {exports: {}};
|
|
3460
|
-
|
|
3461
|
-
/**
|
|
3462
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3463
|
-
*
|
|
3464
|
-
* This source code is licensed under the MIT license found in the
|
|
3465
|
-
* LICENSE file in the root directory of this source tree.
|
|
3466
|
-
*/
|
|
3467
|
-
|
|
3468
|
-
var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
3469
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
3470
|
-
|
|
3471
|
-
/**
|
|
3472
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3473
|
-
*
|
|
3474
|
-
* This source code is licensed under the MIT license found in the
|
|
3475
|
-
* LICENSE file in the root directory of this source tree.
|
|
3476
|
-
*/
|
|
3477
|
-
|
|
3478
|
-
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
3479
|
-
|
|
3480
|
-
function emptyFunction() {}
|
|
3481
|
-
|
|
3482
|
-
function emptyFunctionWithReset() {}
|
|
3483
|
-
|
|
3484
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
3485
|
-
|
|
3486
|
-
var factoryWithThrowingShims = function factoryWithThrowingShims() {
|
|
3487
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
3488
|
-
if (secret === ReactPropTypesSecret) {
|
|
3489
|
-
// It is still safe when called from React.
|
|
3490
|
-
return;
|
|
3491
|
-
}
|
|
3492
|
-
|
|
3493
|
-
var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
|
|
3494
|
-
err.name = 'Invariant Violation';
|
|
3495
|
-
throw err;
|
|
3496
|
-
}
|
|
3497
|
-
shim.isRequired = shim;
|
|
3498
|
-
|
|
3499
|
-
function getShim() {
|
|
3500
|
-
return shim;
|
|
3501
|
-
}
|
|
3502
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
3503
|
-
|
|
3504
|
-
var ReactPropTypes = {
|
|
3505
|
-
array: shim,
|
|
3506
|
-
bool: shim,
|
|
3507
|
-
func: shim,
|
|
3508
|
-
number: shim,
|
|
3509
|
-
object: shim,
|
|
3510
|
-
string: shim,
|
|
3511
|
-
symbol: shim,
|
|
3512
|
-
any: shim,
|
|
3513
|
-
arrayOf: getShim,
|
|
3514
|
-
element: shim,
|
|
3515
|
-
elementType: shim,
|
|
3516
|
-
instanceOf: getShim,
|
|
3517
|
-
node: shim,
|
|
3518
|
-
objectOf: getShim,
|
|
3519
|
-
oneOf: getShim,
|
|
3520
|
-
oneOfType: getShim,
|
|
3521
|
-
shape: getShim,
|
|
3522
|
-
exact: getShim,
|
|
3523
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
3524
|
-
resetWarningCache: emptyFunction
|
|
3525
|
-
};
|
|
3526
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
3527
|
-
return ReactPropTypes;
|
|
3528
|
-
};
|
|
3529
|
-
|
|
3530
|
-
/**
|
|
3531
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3532
|
-
*
|
|
3533
|
-
* This source code is licensed under the MIT license found in the
|
|
3534
|
-
* LICENSE file in the root directory of this source tree.
|
|
3535
|
-
*/
|
|
3536
|
-
|
|
3537
|
-
{
|
|
3538
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
3539
|
-
// http://fb.me/prop-types-in-prod
|
|
3540
|
-
propTypes.exports = factoryWithThrowingShims();
|
|
3541
|
-
}
|
|
3542
|
-
|
|
3543
|
-
var ensureNativeModuleAvailable$1 = {};
|
|
3544
|
-
|
|
3545
|
-
Object.defineProperty(ensureNativeModuleAvailable$1, "__esModule", {
|
|
3546
|
-
value: true
|
|
3547
|
-
});
|
|
3548
|
-
|
|
3549
|
-
ensureNativeModuleAvailable$1["default"] = ensureNativeModuleAvailable;
|
|
3550
|
-
|
|
3551
|
-
var _reactNative$2 = ReactNative__default;
|
|
3552
|
-
var NativeIconAPI$1 = _reactNative$2.NativeModules.RNVectorIconsManager || _reactNative$2.NativeModules.RNVectorIconsModule;
|
|
3553
|
-
|
|
3554
|
-
function ensureNativeModuleAvailable() {
|
|
3555
|
-
if (!NativeIconAPI$1) {
|
|
3556
|
-
if (_reactNative$2.Platform.OS === 'android') {
|
|
3557
|
-
throw new Error('RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.');
|
|
3558
|
-
}
|
|
3559
|
-
|
|
3560
|
-
throw new Error('RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.');
|
|
3561
|
-
}
|
|
3562
|
-
}
|
|
3563
|
-
|
|
3564
|
-
var createIconSourceCache$1 = {};
|
|
3565
|
-
|
|
3566
|
-
Object.defineProperty(createIconSourceCache$1, "__esModule", {
|
|
3567
|
-
value: true
|
|
3568
|
-
});
|
|
3569
|
-
|
|
3570
|
-
createIconSourceCache$1["default"] = createIconSourceCache;
|
|
3571
|
-
|
|
3572
|
-
var TYPE_VALUE = 'value';
|
|
3573
|
-
var TYPE_ERROR = 'error';
|
|
3574
|
-
|
|
3575
|
-
function createIconSourceCache() {
|
|
3576
|
-
var cache = new Map();
|
|
3577
|
-
|
|
3578
|
-
var setValue = function setValue(key, value) {
|
|
3579
|
-
return cache.set(key, {
|
|
3580
|
-
type: TYPE_VALUE,
|
|
3581
|
-
data: value
|
|
3582
|
-
});
|
|
3583
|
-
};
|
|
3584
|
-
|
|
3585
|
-
var setError = function setError(key, error) {
|
|
3586
|
-
return cache.set(key, {
|
|
3587
|
-
type: TYPE_ERROR,
|
|
3588
|
-
data: error
|
|
3589
|
-
});
|
|
3590
|
-
};
|
|
3591
|
-
|
|
3592
|
-
var has = function has(key) {
|
|
3593
|
-
return cache.has(key);
|
|
3594
|
-
};
|
|
3595
|
-
|
|
3596
|
-
var get = function get(key) {
|
|
3597
|
-
if (!cache.has(key)) {
|
|
3598
|
-
return undefined;
|
|
3599
|
-
}
|
|
3600
|
-
|
|
3601
|
-
var _cache$get = cache.get(key),
|
|
3602
|
-
type = _cache$get.type,
|
|
3603
|
-
data = _cache$get.data;
|
|
3604
|
-
|
|
3605
|
-
if (type === TYPE_ERROR) {
|
|
3606
|
-
throw data;
|
|
3607
|
-
}
|
|
3608
|
-
|
|
3609
|
-
return data;
|
|
3610
|
-
};
|
|
3611
|
-
|
|
3612
|
-
return {
|
|
3613
|
-
setValue: setValue,
|
|
3614
|
-
setError: setError,
|
|
3615
|
-
has: has,
|
|
3616
|
-
get: get
|
|
3617
|
-
};
|
|
3618
|
-
}
|
|
3619
|
-
|
|
3620
|
-
var iconButton = {};
|
|
3621
|
-
|
|
3622
|
-
var pick = function pick(obj) {
|
|
3623
|
-
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3624
|
-
keys[_key - 1] = arguments[_key];
|
|
3625
|
-
}
|
|
3626
|
-
|
|
3627
|
-
return keys.flat().filter(function (key) {
|
|
3628
|
-
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
3629
|
-
}).reduce(function (acc, key) {
|
|
3630
|
-
acc[key] = obj[key];
|
|
3631
|
-
return acc;
|
|
3632
|
-
}, {});
|
|
3633
|
-
};
|
|
3634
|
-
|
|
3635
|
-
var omit = function omit(obj) {
|
|
3636
|
-
for (var _len2 = arguments.length, keysToOmit = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
3637
|
-
keysToOmit[_key2 - 1] = arguments[_key2];
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
var keysToOmitSet = new Set(keysToOmit.flat());
|
|
3641
|
-
return Object.getOwnPropertyNames(obj).filter(function (key) {
|
|
3642
|
-
return !keysToOmitSet.has(key);
|
|
3643
|
-
}).reduce(function (acc, key) {
|
|
3644
|
-
acc[key] = obj[key];
|
|
3645
|
-
return acc;
|
|
3646
|
-
}, {});
|
|
3647
|
-
};
|
|
3648
|
-
|
|
3649
|
-
var objectUtils = {
|
|
3650
|
-
pick: pick,
|
|
3651
|
-
omit: omit
|
|
3652
|
-
};
|
|
3653
|
-
|
|
3654
|
-
var _interopRequireDefault$4 = interopRequireDefault;
|
|
3655
|
-
Object.defineProperty(iconButton, "__esModule", {
|
|
3656
|
-
value: true
|
|
3657
|
-
});
|
|
3658
|
-
|
|
3659
|
-
iconButton["default"] = createIconButtonComponent;
|
|
3660
|
-
|
|
3661
|
-
var _extends2$2 = _interopRequireDefault$4(_extends_1);
|
|
3662
|
-
|
|
3663
|
-
var _objectWithoutProperties2$1 = _interopRequireDefault$4(objectWithoutProperties);
|
|
3664
|
-
|
|
3665
|
-
var _classCallCheck2$2 = _interopRequireDefault$4(classCallCheck);
|
|
3666
|
-
|
|
3667
|
-
var _createClass2$2 = _interopRequireDefault$4(createClass);
|
|
3668
|
-
|
|
3669
|
-
var _possibleConstructorReturn2$2 = _interopRequireDefault$4(possibleConstructorReturn);
|
|
3670
|
-
|
|
3671
|
-
var _getPrototypeOf2$1 = _interopRequireDefault$4(getPrototypeOf);
|
|
3672
|
-
|
|
3673
|
-
var _inherits2$2 = _interopRequireDefault$4(inherits);
|
|
3674
|
-
|
|
3675
|
-
var _react$2 = _interopRequireWildcard$2(React);
|
|
3676
|
-
|
|
3677
|
-
var _propTypes$2 = _interopRequireDefault$4(propTypes.exports);
|
|
3678
|
-
|
|
3679
|
-
var _reactNative$1 = ReactNative__default;
|
|
3680
|
-
var _objectUtils = objectUtils;
|
|
3681
|
-
var _jsxFileName$2 = "/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/icon-button.js";
|
|
3682
|
-
|
|
3683
|
-
function _getRequireWildcardCache$2(nodeInterop) {
|
|
3684
|
-
if (typeof WeakMap !== "function") return null;
|
|
3685
|
-
var cacheBabelInterop = new WeakMap();
|
|
3686
|
-
var cacheNodeInterop = new WeakMap();
|
|
3687
|
-
return (_getRequireWildcardCache$2 = function _getRequireWildcardCache(nodeInterop) {
|
|
3688
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
3689
|
-
})(nodeInterop);
|
|
3690
|
-
}
|
|
3691
|
-
|
|
3692
|
-
function _interopRequireWildcard$2(obj, nodeInterop) {
|
|
3693
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
3694
|
-
return obj;
|
|
3695
|
-
}
|
|
3696
|
-
|
|
3697
|
-
if (obj === null || _typeof$2(obj) !== "object" && typeof obj !== "function") {
|
|
3698
|
-
return {
|
|
3699
|
-
"default": obj
|
|
3700
|
-
};
|
|
3701
|
-
}
|
|
3702
|
-
|
|
3703
|
-
var cache = _getRequireWildcardCache$2(nodeInterop);
|
|
3704
|
-
|
|
3705
|
-
if (cache && cache.has(obj)) {
|
|
3706
|
-
return cache.get(obj);
|
|
3707
|
-
}
|
|
3708
|
-
|
|
3709
|
-
var newObj = {};
|
|
3710
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
3711
|
-
|
|
3712
|
-
for (var key in obj) {
|
|
3713
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
3714
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
3715
|
-
|
|
3716
|
-
if (desc && (desc.get || desc.set)) {
|
|
3717
|
-
Object.defineProperty(newObj, key, desc);
|
|
3718
|
-
} else {
|
|
3719
|
-
newObj[key] = obj[key];
|
|
3720
|
-
}
|
|
3721
|
-
}
|
|
3722
|
-
}
|
|
3723
|
-
|
|
3724
|
-
newObj["default"] = obj;
|
|
3725
|
-
|
|
3726
|
-
if (cache) {
|
|
3727
|
-
cache.set(obj, newObj);
|
|
3728
|
-
}
|
|
3729
|
-
|
|
3730
|
-
return newObj;
|
|
3731
|
-
}
|
|
3732
|
-
|
|
3733
|
-
var styles$1 = _reactNative$1.StyleSheet.create({
|
|
3734
|
-
container: {
|
|
3735
|
-
flexDirection: 'row',
|
|
3736
|
-
justifyContent: 'flex-start',
|
|
3737
|
-
alignItems: 'center',
|
|
3738
|
-
padding: 8
|
|
3739
|
-
},
|
|
3740
|
-
touchable: {
|
|
3741
|
-
overflow: 'hidden'
|
|
3742
|
-
},
|
|
3743
|
-
icon: {
|
|
3744
|
-
marginRight: 10
|
|
3745
|
-
},
|
|
3746
|
-
text: {
|
|
3747
|
-
fontWeight: '600',
|
|
3748
|
-
backgroundColor: 'transparent'
|
|
3749
|
-
}
|
|
3750
|
-
});
|
|
3751
|
-
|
|
3752
|
-
var IOS7_BLUE = '#007AFF';
|
|
3753
|
-
var TEXT_PROP_NAMES = ['ellipsizeMode', 'numberOfLines', 'textBreakStrategy', 'selectable', 'suppressHighlighting', 'allowFontScaling', 'adjustsFontSizeToFit', 'minimumFontScale'];
|
|
3754
|
-
var TOUCHABLE_PROP_NAMES = ['accessible', 'accessibilityLabel', 'accessibilityHint', 'accessibilityComponentType', 'accessibilityRole', 'accessibilityStates', 'accessibilityTraits', 'onFocus', 'onBlur', 'disabled', 'onPress', 'onPressIn', 'onPressOut', 'onLayout', 'onLongPress', 'nativeID', 'testID', 'delayPressIn', 'delayPressOut', 'delayLongPress', 'activeOpacity', 'underlayColor', 'selectionColor', 'onShowUnderlay', 'onHideUnderlay', 'hasTVPreferredFocus', 'tvParallaxProperties'];
|
|
3755
|
-
|
|
3756
|
-
function createIconButtonComponent(Icon) {
|
|
3757
|
-
var _class, _temp;
|
|
3758
|
-
|
|
3759
|
-
return _temp = _class = function (_PureComponent) {
|
|
3760
|
-
(0, _inherits2$2["default"])(IconButton, _PureComponent);
|
|
3761
|
-
|
|
3762
|
-
function IconButton() {
|
|
3763
|
-
(0, _classCallCheck2$2["default"])(this, IconButton);
|
|
3764
|
-
return (0, _possibleConstructorReturn2$2["default"])(this, (0, _getPrototypeOf2$1["default"])(IconButton).apply(this, arguments));
|
|
3765
|
-
}
|
|
3766
|
-
|
|
3767
|
-
(0, _createClass2$2["default"])(IconButton, [{
|
|
3768
|
-
key: "render",
|
|
3769
|
-
value: function render() {
|
|
3770
|
-
var _this$props = this.props,
|
|
3771
|
-
style = _this$props.style,
|
|
3772
|
-
iconStyle = _this$props.iconStyle,
|
|
3773
|
-
children = _this$props.children,
|
|
3774
|
-
restProps = (0, _objectWithoutProperties2$1["default"])(_this$props, ["style", "iconStyle", "children"]);
|
|
3775
|
-
var iconProps = (0, _objectUtils.pick)(restProps, TEXT_PROP_NAMES, 'style', 'name', 'size', 'color');
|
|
3776
|
-
var touchableProps = (0, _objectUtils.pick)(restProps, TOUCHABLE_PROP_NAMES);
|
|
3777
|
-
var props = (0, _objectUtils.omit)(restProps, Object.keys(iconProps), Object.keys(touchableProps), 'iconStyle', 'borderRadius', 'backgroundColor');
|
|
3778
|
-
iconProps.style = iconStyle ? [styles$1.icon, iconStyle] : styles$1.icon;
|
|
3779
|
-
var colorStyle = (0, _objectUtils.pick)(this.props, 'color');
|
|
3780
|
-
var blockStyle = (0, _objectUtils.pick)(this.props, 'backgroundColor', 'borderRadius');
|
|
3781
|
-
return _react$2["default"].createElement(_reactNative$1.TouchableHighlight, (0, _extends2$2["default"])({
|
|
3782
|
-
style: [styles$1.touchable, blockStyle]
|
|
3783
|
-
}, touchableProps, {
|
|
3784
|
-
__self: this,
|
|
3785
|
-
__source: {
|
|
3786
|
-
fileName: _jsxFileName$2,
|
|
3787
|
-
lineNumber: 116
|
|
3788
|
-
}
|
|
3789
|
-
}), _react$2["default"].createElement(_reactNative$1.View, (0, _extends2$2["default"])({
|
|
3790
|
-
style: [styles$1.container, blockStyle, style]
|
|
3791
|
-
}, props, {
|
|
3792
|
-
__self: this,
|
|
3793
|
-
__source: {
|
|
3794
|
-
fileName: _jsxFileName$2,
|
|
3795
|
-
lineNumber: 120
|
|
3796
|
-
}
|
|
3797
|
-
}), _react$2["default"].createElement(Icon, (0, _extends2$2["default"])({}, iconProps, {
|
|
3798
|
-
__self: this,
|
|
3799
|
-
__source: {
|
|
3800
|
-
fileName: _jsxFileName$2,
|
|
3801
|
-
lineNumber: 121
|
|
3802
|
-
}
|
|
3803
|
-
})), typeof children === 'string' ? _react$2["default"].createElement(_reactNative$1.Text, {
|
|
3804
|
-
style: [styles$1.text, colorStyle],
|
|
3805
|
-
selectable: false,
|
|
3806
|
-
__self: this,
|
|
3807
|
-
__source: {
|
|
3808
|
-
fileName: _jsxFileName$2,
|
|
3809
|
-
lineNumber: 123
|
|
3810
|
-
}
|
|
3811
|
-
}, children) : children));
|
|
3812
|
-
}
|
|
3813
|
-
}]);
|
|
3814
|
-
return IconButton;
|
|
3815
|
-
}(_react$2.PureComponent), _class.propTypes = {
|
|
3816
|
-
backgroundColor: _propTypes$2["default"].oneOfType([_propTypes$2["default"].string, _propTypes$2["default"].number]),
|
|
3817
|
-
borderRadius: _propTypes$2["default"].number,
|
|
3818
|
-
color: _propTypes$2["default"].any,
|
|
3819
|
-
size: _propTypes$2["default"].number,
|
|
3820
|
-
iconStyle: _propTypes$2["default"].any,
|
|
3821
|
-
style: _propTypes$2["default"].any,
|
|
3822
|
-
children: _propTypes$2["default"].node
|
|
3823
|
-
}, _class.defaultProps = {
|
|
3824
|
-
backgroundColor: IOS7_BLUE,
|
|
3825
|
-
borderRadius: 5,
|
|
3826
|
-
color: 'white',
|
|
3827
|
-
size: 20
|
|
3828
|
-
}, _temp;
|
|
3829
|
-
}
|
|
3830
|
-
|
|
3831
|
-
var _interopRequireDefault$3 = interopRequireDefault;
|
|
3832
|
-
Object.defineProperty(createIconSet$1, "__esModule", {
|
|
3833
|
-
value: true
|
|
3834
|
-
});
|
|
3835
|
-
createIconSet$1.NativeIconAPI = createIconSet$1.DEFAULT_ICON_SIZE = createIconSet$1.DEFAULT_ICON_COLOR = void 0;
|
|
3836
|
-
|
|
3837
|
-
createIconSet$1["default"] = createIconSet;
|
|
3838
|
-
|
|
3839
|
-
var _toConsumableArray2 = _interopRequireDefault$3(toConsumableArray);
|
|
3840
|
-
|
|
3841
|
-
var _regenerator = _interopRequireDefault$3(regenerator);
|
|
3842
|
-
|
|
3843
|
-
var _extends2$1 = _interopRequireDefault$3(_extends_1);
|
|
3844
|
-
|
|
3845
|
-
var _objectWithoutProperties2 = _interopRequireDefault$3(objectWithoutProperties);
|
|
3846
|
-
|
|
3847
|
-
var _classCallCheck2$1 = _interopRequireDefault$3(classCallCheck);
|
|
3848
|
-
|
|
3849
|
-
var _createClass2$1 = _interopRequireDefault$3(createClass);
|
|
3850
|
-
|
|
3851
|
-
var _possibleConstructorReturn2$1 = _interopRequireDefault$3(possibleConstructorReturn);
|
|
3852
|
-
|
|
3853
|
-
var _getPrototypeOf3 = _interopRequireDefault$3(getPrototypeOf);
|
|
3854
|
-
|
|
3855
|
-
var _inherits2$1 = _interopRequireDefault$3(inherits);
|
|
3856
|
-
|
|
3857
|
-
var _react$1 = _interopRequireWildcard$1(React);
|
|
3858
|
-
|
|
3859
|
-
var _propTypes$1 = _interopRequireDefault$3(propTypes.exports);
|
|
3860
|
-
|
|
3861
|
-
var _reactNative = ReactNative__default;
|
|
3862
|
-
|
|
3863
|
-
var _ensureNativeModuleAvailable = _interopRequireDefault$3(ensureNativeModuleAvailable$1);
|
|
3864
|
-
|
|
3865
|
-
var _createIconSourceCache = _interopRequireDefault$3(createIconSourceCache$1);
|
|
3866
|
-
|
|
3867
|
-
var _iconButton = _interopRequireDefault$3(iconButton);
|
|
3868
|
-
|
|
3869
|
-
var _jsxFileName$1 = "/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/create-icon-set.js";
|
|
3870
|
-
|
|
3871
|
-
function _getRequireWildcardCache$1(nodeInterop) {
|
|
3872
|
-
if (typeof WeakMap !== "function") return null;
|
|
3873
|
-
var cacheBabelInterop = new WeakMap();
|
|
3874
|
-
var cacheNodeInterop = new WeakMap();
|
|
3875
|
-
return (_getRequireWildcardCache$1 = function _getRequireWildcardCache(nodeInterop) {
|
|
3876
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
3877
|
-
})(nodeInterop);
|
|
3878
|
-
}
|
|
3879
|
-
|
|
3880
|
-
function _interopRequireWildcard$1(obj, nodeInterop) {
|
|
3881
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
3882
|
-
return obj;
|
|
3883
|
-
}
|
|
3884
|
-
|
|
3885
|
-
if (obj === null || _typeof$2(obj) !== "object" && typeof obj !== "function") {
|
|
3886
|
-
return {
|
|
3887
|
-
"default": obj
|
|
3888
|
-
};
|
|
3889
|
-
}
|
|
3890
|
-
|
|
3891
|
-
var cache = _getRequireWildcardCache$1(nodeInterop);
|
|
3892
|
-
|
|
3893
|
-
if (cache && cache.has(obj)) {
|
|
3894
|
-
return cache.get(obj);
|
|
3895
|
-
}
|
|
3896
|
-
|
|
3897
|
-
var newObj = {};
|
|
3898
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
3899
|
-
|
|
3900
|
-
for (var key in obj) {
|
|
3901
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
3902
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
3903
|
-
|
|
3904
|
-
if (desc && (desc.get || desc.set)) {
|
|
3905
|
-
Object.defineProperty(newObj, key, desc);
|
|
3906
|
-
} else {
|
|
3907
|
-
newObj[key] = obj[key];
|
|
3908
|
-
}
|
|
3909
|
-
}
|
|
3910
|
-
}
|
|
3911
|
-
|
|
3912
|
-
newObj["default"] = obj;
|
|
3913
|
-
|
|
3914
|
-
if (cache) {
|
|
3915
|
-
cache.set(obj, newObj);
|
|
3916
|
-
}
|
|
3917
|
-
|
|
3918
|
-
return newObj;
|
|
3919
|
-
}
|
|
3920
|
-
|
|
3921
|
-
var NativeIconAPI = _reactNative.NativeModules.RNVectorIconsManager || _reactNative.NativeModules.RNVectorIconsModule;
|
|
3922
|
-
createIconSet$1.NativeIconAPI = NativeIconAPI;
|
|
3923
|
-
var DEFAULT_ICON_SIZE = 12;
|
|
3924
|
-
createIconSet$1.DEFAULT_ICON_SIZE = DEFAULT_ICON_SIZE;
|
|
3925
|
-
var DEFAULT_ICON_COLOR = 'black';
|
|
3926
|
-
createIconSet$1.DEFAULT_ICON_COLOR = DEFAULT_ICON_COLOR;
|
|
3927
|
-
|
|
3928
|
-
function createIconSet(glyphMap, fontFamily, fontFile, fontStyle) {
|
|
3929
|
-
var fontBasename = fontFile ? fontFile.replace(/\.(otf|ttf)$/, '') : fontFamily;
|
|
3930
|
-
|
|
3931
|
-
var fontReference = _reactNative.Platform.select({
|
|
3932
|
-
windows: "/Assets/" + fontFile + "#" + fontFamily,
|
|
3933
|
-
android: fontBasename,
|
|
3934
|
-
web: fontBasename,
|
|
3935
|
-
"default": fontFamily
|
|
3936
|
-
});
|
|
3937
|
-
|
|
3938
|
-
var IconNamePropType = _propTypes$1["default"].oneOf(Object.keys(glyphMap));
|
|
3939
|
-
|
|
3940
|
-
var Icon = function (_PureComponent) {
|
|
3941
|
-
(0, _inherits2$1["default"])(Icon, _PureComponent);
|
|
3942
|
-
|
|
3943
|
-
function Icon() {
|
|
3944
|
-
var _getPrototypeOf2;
|
|
3945
|
-
|
|
3946
|
-
var _this;
|
|
3947
|
-
|
|
3948
|
-
(0, _classCallCheck2$1["default"])(this, Icon);
|
|
3949
|
-
|
|
3950
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3951
|
-
args[_key] = arguments[_key];
|
|
3952
|
-
}
|
|
3953
|
-
|
|
3954
|
-
_this = (0, _possibleConstructorReturn2$1["default"])(this, (_getPrototypeOf2 = (0, _getPrototypeOf3["default"])(Icon)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
3955
|
-
_this.root = null;
|
|
3956
|
-
|
|
3957
|
-
_this.handleRef = function (ref) {
|
|
3958
|
-
_this.root = ref;
|
|
3959
|
-
};
|
|
3960
|
-
|
|
3961
|
-
return _this;
|
|
3962
|
-
}
|
|
3963
|
-
|
|
3964
|
-
(0, _createClass2$1["default"])(Icon, [{
|
|
3965
|
-
key: "setNativeProps",
|
|
3966
|
-
value: function setNativeProps(nativeProps) {
|
|
3967
|
-
if (this.root) {
|
|
3968
|
-
this.root.setNativeProps(nativeProps);
|
|
3969
|
-
}
|
|
3970
|
-
}
|
|
3971
|
-
}, {
|
|
3972
|
-
key: "render",
|
|
3973
|
-
value: function render() {
|
|
3974
|
-
var _this$props = this.props,
|
|
3975
|
-
name = _this$props.name,
|
|
3976
|
-
size = _this$props.size,
|
|
3977
|
-
color = _this$props.color,
|
|
3978
|
-
style = _this$props.style,
|
|
3979
|
-
children = _this$props.children,
|
|
3980
|
-
props = (0, _objectWithoutProperties2["default"])(_this$props, ["name", "size", "color", "style", "children"]);
|
|
3981
|
-
var glyph = name ? glyphMap[name] || '?' : '';
|
|
3982
|
-
|
|
3983
|
-
if (typeof glyph === 'number') {
|
|
3984
|
-
glyph = String.fromCodePoint(glyph);
|
|
3985
|
-
}
|
|
3986
|
-
|
|
3987
|
-
var styleDefaults = {
|
|
3988
|
-
fontSize: size,
|
|
3989
|
-
color: color
|
|
3990
|
-
};
|
|
3991
|
-
var styleOverrides = {
|
|
3992
|
-
fontFamily: fontReference,
|
|
3993
|
-
fontWeight: 'normal',
|
|
3994
|
-
fontStyle: 'normal'
|
|
3995
|
-
};
|
|
3996
|
-
props.style = [styleDefaults, style, styleOverrides, fontStyle || {}];
|
|
3997
|
-
props.ref = this.handleRef;
|
|
3998
|
-
return _react$1["default"].createElement(_reactNative.Text, (0, _extends2$1["default"])({
|
|
3999
|
-
selectable: false
|
|
4000
|
-
}, props, {
|
|
4001
|
-
__self: this,
|
|
4002
|
-
__source: {
|
|
4003
|
-
fileName: _jsxFileName$1,
|
|
4004
|
-
lineNumber: 91
|
|
4005
|
-
}
|
|
4006
|
-
}), glyph, children);
|
|
4007
|
-
}
|
|
4008
|
-
}]);
|
|
4009
|
-
return Icon;
|
|
4010
|
-
}(_react$1.PureComponent);
|
|
4011
|
-
|
|
4012
|
-
Icon.propTypes = {
|
|
4013
|
-
allowFontScaling: _propTypes$1["default"].bool,
|
|
4014
|
-
name: IconNamePropType,
|
|
4015
|
-
size: _propTypes$1["default"].number,
|
|
4016
|
-
color: _propTypes$1["default"].any,
|
|
4017
|
-
children: _propTypes$1["default"].node,
|
|
4018
|
-
style: _propTypes$1["default"].any
|
|
4019
|
-
};
|
|
4020
|
-
Icon.defaultProps = {
|
|
4021
|
-
size: DEFAULT_ICON_SIZE,
|
|
4022
|
-
allowFontScaling: false
|
|
4023
|
-
};
|
|
4024
|
-
var imageSourceCache = (0, _createIconSourceCache["default"])();
|
|
4025
|
-
|
|
4026
|
-
function resolveGlyph(name) {
|
|
4027
|
-
var glyph = glyphMap[name] || '?';
|
|
4028
|
-
|
|
4029
|
-
if (typeof glyph === 'number') {
|
|
4030
|
-
return String.fromCodePoint(glyph);
|
|
4031
|
-
}
|
|
4032
|
-
|
|
4033
|
-
return glyph;
|
|
4034
|
-
}
|
|
4035
|
-
|
|
4036
|
-
function getImageSourceSync(name) {
|
|
4037
|
-
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_ICON_SIZE;
|
|
4038
|
-
var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_ICON_COLOR;
|
|
4039
|
-
(0, _ensureNativeModuleAvailable["default"])();
|
|
4040
|
-
var glyph = resolveGlyph(name);
|
|
4041
|
-
var processedColor = (0, _reactNative.processColor)(color);
|
|
4042
|
-
var cacheKey = glyph + ":" + size + ":" + processedColor;
|
|
4043
|
-
|
|
4044
|
-
if (imageSourceCache.has(cacheKey)) {
|
|
4045
|
-
return imageSourceCache.get(cacheKey);
|
|
4046
|
-
}
|
|
4047
|
-
|
|
4048
|
-
try {
|
|
4049
|
-
var imagePath = NativeIconAPI.getImageForFontSync(fontReference, glyph, size, processedColor);
|
|
4050
|
-
var value = {
|
|
4051
|
-
uri: imagePath,
|
|
4052
|
-
scale: _reactNative.PixelRatio.get()
|
|
4053
|
-
};
|
|
4054
|
-
imageSourceCache.setValue(cacheKey, value);
|
|
4055
|
-
return value;
|
|
4056
|
-
} catch (error) {
|
|
4057
|
-
imageSourceCache.setError(cacheKey, error);
|
|
4058
|
-
throw error;
|
|
4059
|
-
}
|
|
4060
|
-
}
|
|
4061
|
-
|
|
4062
|
-
function getImageSource(name) {
|
|
4063
|
-
var size,
|
|
4064
|
-
color,
|
|
4065
|
-
glyph,
|
|
4066
|
-
processedColor,
|
|
4067
|
-
cacheKey,
|
|
4068
|
-
imagePath,
|
|
4069
|
-
value,
|
|
4070
|
-
_args = arguments;
|
|
4071
|
-
return _regenerator["default"].async(function getImageSource$(_context) {
|
|
4072
|
-
while (1) {
|
|
4073
|
-
switch (_context.prev = _context.next) {
|
|
4074
|
-
case 0:
|
|
4075
|
-
size = _args.length > 1 && _args[1] !== undefined ? _args[1] : DEFAULT_ICON_SIZE;
|
|
4076
|
-
color = _args.length > 2 && _args[2] !== undefined ? _args[2] : DEFAULT_ICON_COLOR;
|
|
4077
|
-
(0, _ensureNativeModuleAvailable["default"])();
|
|
4078
|
-
glyph = resolveGlyph(name);
|
|
4079
|
-
processedColor = (0, _reactNative.processColor)(color);
|
|
4080
|
-
cacheKey = glyph + ":" + size + ":" + processedColor;
|
|
4081
|
-
|
|
4082
|
-
if (!imageSourceCache.has(cacheKey)) {
|
|
4083
|
-
_context.next = 8;
|
|
4084
|
-
break;
|
|
4085
|
-
}
|
|
4086
|
-
|
|
4087
|
-
return _context.abrupt("return", imageSourceCache.get(cacheKey));
|
|
4088
|
-
|
|
4089
|
-
case 8:
|
|
4090
|
-
_context.prev = 8;
|
|
4091
|
-
_context.next = 11;
|
|
4092
|
-
return _regenerator["default"].awrap(NativeIconAPI.getImageForFont(fontReference, glyph, size, processedColor));
|
|
4093
|
-
|
|
4094
|
-
case 11:
|
|
4095
|
-
imagePath = _context.sent;
|
|
4096
|
-
value = {
|
|
4097
|
-
uri: imagePath,
|
|
4098
|
-
scale: _reactNative.PixelRatio.get()
|
|
4099
|
-
};
|
|
4100
|
-
imageSourceCache.setValue(cacheKey, value);
|
|
4101
|
-
return _context.abrupt("return", value);
|
|
4102
|
-
|
|
4103
|
-
case 17:
|
|
4104
|
-
_context.prev = 17;
|
|
4105
|
-
_context.t0 = _context["catch"](8);
|
|
4106
|
-
imageSourceCache.setError(cacheKey, _context.t0);
|
|
4107
|
-
throw _context.t0;
|
|
4108
|
-
|
|
4109
|
-
case 21:
|
|
4110
|
-
case "end":
|
|
4111
|
-
return _context.stop();
|
|
4112
|
-
}
|
|
4113
|
-
}
|
|
4114
|
-
}, null, null, [[8, 17]]);
|
|
4115
|
-
}
|
|
4116
|
-
|
|
4117
|
-
function loadFont() {
|
|
4118
|
-
var file,
|
|
4119
|
-
_args2 = arguments;
|
|
4120
|
-
return _regenerator["default"].async(function loadFont$(_context2) {
|
|
4121
|
-
while (1) {
|
|
4122
|
-
switch (_context2.prev = _context2.next) {
|
|
4123
|
-
case 0:
|
|
4124
|
-
file = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : fontFile;
|
|
4125
|
-
|
|
4126
|
-
if (!(_reactNative.Platform.OS === 'ios')) {
|
|
4127
|
-
_context2.next = 7;
|
|
4128
|
-
break;
|
|
4129
|
-
}
|
|
4130
|
-
|
|
4131
|
-
(0, _ensureNativeModuleAvailable["default"])();
|
|
4132
|
-
|
|
4133
|
-
if (file) {
|
|
4134
|
-
_context2.next = 5;
|
|
4135
|
-
break;
|
|
4136
|
-
}
|
|
4137
|
-
|
|
4138
|
-
throw new Error('Unable to load font, because no file was specified. ');
|
|
4139
|
-
|
|
4140
|
-
case 5:
|
|
4141
|
-
_context2.next = 7;
|
|
4142
|
-
return _regenerator["default"].awrap(NativeIconAPI.loadFontWithFileName.apply(NativeIconAPI, (0, _toConsumableArray2["default"])(file.split('.'))));
|
|
4143
|
-
|
|
4144
|
-
case 7:
|
|
4145
|
-
case "end":
|
|
4146
|
-
return _context2.stop();
|
|
4147
|
-
}
|
|
4148
|
-
}
|
|
4149
|
-
});
|
|
4150
|
-
}
|
|
4151
|
-
|
|
4152
|
-
function hasIcon(name) {
|
|
4153
|
-
return Object.prototype.hasOwnProperty.call(glyphMap, name);
|
|
4154
|
-
}
|
|
4155
|
-
|
|
4156
|
-
function getRawGlyphMap() {
|
|
4157
|
-
return glyphMap;
|
|
4158
|
-
}
|
|
4159
|
-
|
|
4160
|
-
function getFontFamily() {
|
|
4161
|
-
return fontReference;
|
|
4162
|
-
}
|
|
4163
|
-
|
|
4164
|
-
Icon.Button = (0, _iconButton["default"])(Icon);
|
|
4165
|
-
Icon.getImageSource = getImageSource;
|
|
4166
|
-
Icon.getImageSourceSync = getImageSourceSync;
|
|
4167
|
-
Icon.loadFont = loadFont;
|
|
4168
|
-
Icon.hasIcon = hasIcon;
|
|
4169
|
-
Icon.getRawGlyphMap = getRawGlyphMap;
|
|
4170
|
-
Icon.getFontFamily = getFontFamily;
|
|
4171
|
-
return Icon;
|
|
4172
|
-
}
|
|
4173
|
-
|
|
4174
|
-
var createMultiStyleIconSet$1 = {};
|
|
4175
|
-
|
|
4176
|
-
function _defineProperty$1(obj, key, value) {
|
|
4177
|
-
if (key in obj) {
|
|
4178
|
-
Object.defineProperty(obj, key, {
|
|
4179
|
-
value: value,
|
|
4180
|
-
enumerable: true,
|
|
4181
|
-
configurable: true,
|
|
4182
|
-
writable: true
|
|
4183
|
-
});
|
|
4184
|
-
} else {
|
|
4185
|
-
obj[key] = value;
|
|
4186
|
-
}
|
|
4187
|
-
|
|
4188
|
-
return obj;
|
|
4189
|
-
}
|
|
4190
|
-
|
|
4191
|
-
var defineProperty = _defineProperty$1;
|
|
4192
|
-
|
|
4193
|
-
var _interopRequireDefault$2 = interopRequireDefault;
|
|
4194
|
-
Object.defineProperty(createMultiStyleIconSet$1, "__esModule", {
|
|
4195
|
-
value: true
|
|
4196
|
-
});
|
|
4197
|
-
|
|
4198
|
-
createMultiStyleIconSet$1["default"] = createMultiStyleIconSet;
|
|
4199
|
-
|
|
4200
|
-
var _classCallCheck2 = _interopRequireDefault$2(classCallCheck);
|
|
4201
|
-
|
|
4202
|
-
var _createClass2 = _interopRequireDefault$2(createClass);
|
|
4203
|
-
|
|
4204
|
-
var _possibleConstructorReturn2 = _interopRequireDefault$2(possibleConstructorReturn);
|
|
4205
|
-
|
|
4206
|
-
var _getPrototypeOf2 = _interopRequireDefault$2(getPrototypeOf);
|
|
4207
|
-
|
|
4208
|
-
var _inherits2 = _interopRequireDefault$2(inherits);
|
|
4209
|
-
|
|
4210
|
-
var _defineProperty2 = _interopRequireDefault$2(defineProperty);
|
|
4211
|
-
|
|
4212
|
-
var _extends2 = _interopRequireDefault$2(_extends_1);
|
|
4213
|
-
|
|
4214
|
-
var _react = _interopRequireWildcard(React);
|
|
4215
|
-
|
|
4216
|
-
var _propTypes = _interopRequireDefault$2(propTypes.exports);
|
|
4217
|
-
|
|
4218
|
-
var _createIconSet$2 = _interopRequireWildcard(createIconSet$1);
|
|
4219
|
-
|
|
4220
|
-
var _jsxFileName = "/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/create-multi-style-icon-set.js";
|
|
4221
|
-
|
|
4222
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
4223
|
-
if (typeof WeakMap !== "function") return null;
|
|
4224
|
-
var cacheBabelInterop = new WeakMap();
|
|
4225
|
-
var cacheNodeInterop = new WeakMap();
|
|
4226
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
4227
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
4228
|
-
})(nodeInterop);
|
|
4229
|
-
}
|
|
4230
|
-
|
|
4231
|
-
function _interopRequireWildcard(obj, nodeInterop) {
|
|
4232
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
4233
|
-
return obj;
|
|
4234
|
-
}
|
|
4235
|
-
|
|
4236
|
-
if (obj === null || _typeof$2(obj) !== "object" && typeof obj !== "function") {
|
|
4237
|
-
return {
|
|
4238
|
-
"default": obj
|
|
4239
|
-
};
|
|
4240
|
-
}
|
|
4241
|
-
|
|
4242
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
4243
|
-
|
|
4244
|
-
if (cache && cache.has(obj)) {
|
|
4245
|
-
return cache.get(obj);
|
|
4246
|
-
}
|
|
4247
|
-
|
|
4248
|
-
var newObj = {};
|
|
4249
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
4250
|
-
|
|
4251
|
-
for (var key in obj) {
|
|
4252
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
4253
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
4254
|
-
|
|
4255
|
-
if (desc && (desc.get || desc.set)) {
|
|
4256
|
-
Object.defineProperty(newObj, key, desc);
|
|
4257
|
-
} else {
|
|
4258
|
-
newObj[key] = obj[key];
|
|
4259
|
-
}
|
|
4260
|
-
}
|
|
4261
|
-
}
|
|
4262
|
-
|
|
4263
|
-
newObj["default"] = obj;
|
|
4264
|
-
|
|
4265
|
-
if (cache) {
|
|
4266
|
-
cache.set(obj, newObj);
|
|
4267
|
-
}
|
|
4268
|
-
|
|
4269
|
-
return newObj;
|
|
4270
|
-
}
|
|
4271
|
-
|
|
4272
|
-
function createMultiStyleIconSet(styles) {
|
|
4273
|
-
var optionsInput = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4274
|
-
var styleNames = Object.keys(styles);
|
|
4275
|
-
|
|
4276
|
-
if (styleNames.length === 0) {
|
|
4277
|
-
throw new Error('You need to add at least one style');
|
|
4278
|
-
}
|
|
4279
|
-
|
|
4280
|
-
var options = (0, _extends2["default"])({
|
|
4281
|
-
defaultStyle: styleNames[0],
|
|
4282
|
-
fallbackFamily: function fallbackFamily() {
|
|
4283
|
-
return styleNames[0];
|
|
4284
|
-
},
|
|
4285
|
-
glyphValidator: function glyphValidator() {
|
|
4286
|
-
return true;
|
|
4287
|
-
}
|
|
4288
|
-
}, optionsInput);
|
|
4289
|
-
var iconSets = styleNames.reduce(function (acc, name) {
|
|
4290
|
-
var style = styles[name];
|
|
4291
|
-
acc[name] = (0, _createIconSet$2["default"])(style.glyphMap || {}, style.fontFamily || '', style.fontFile || '', style.fontStyle || {});
|
|
4292
|
-
return acc;
|
|
4293
|
-
}, {});
|
|
4294
|
-
|
|
4295
|
-
function styleFromProps(props) {
|
|
4296
|
-
return Object.keys(props).reduce(function (result, propName) {
|
|
4297
|
-
return styleNames.indexOf(propName) !== -1 && props[propName] === true ? propName : result;
|
|
4298
|
-
}, options.defaultStyle);
|
|
4299
|
-
}
|
|
4300
|
-
|
|
4301
|
-
function getIconSetForProps(props) {
|
|
4302
|
-
var name = props.name;
|
|
4303
|
-
var style = styleFromProps(props);
|
|
4304
|
-
if (options.glyphValidator(name, style)) return iconSets[style];
|
|
4305
|
-
var family = options.fallbackFamily(name);
|
|
4306
|
-
|
|
4307
|
-
if (styleNames.indexOf(family) === -1) {
|
|
4308
|
-
return options.defaultStyle;
|
|
4309
|
-
}
|
|
4310
|
-
|
|
4311
|
-
return iconSets[family];
|
|
4312
|
-
}
|
|
4313
|
-
|
|
4314
|
-
function selectIconClass(iconSet, iconClass) {
|
|
4315
|
-
return iconClass.length > 0 ? iconSet[iconClass] : iconSet;
|
|
4316
|
-
}
|
|
4317
|
-
|
|
4318
|
-
function reduceProps(props) {
|
|
4319
|
-
return Object.keys(props).reduce(function (acc, prop) {
|
|
4320
|
-
if (styleNames.indexOf(prop) === -1) {
|
|
4321
|
-
acc[prop] = props[prop];
|
|
4322
|
-
}
|
|
4323
|
-
|
|
4324
|
-
return acc;
|
|
4325
|
-
}, {});
|
|
4326
|
-
}
|
|
4327
|
-
|
|
4328
|
-
function getStyledIconSet(style) {
|
|
4329
|
-
var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
4330
|
-
|
|
4331
|
-
if (styleNames.indexOf(style) === -1) {
|
|
4332
|
-
return iconSets[options.defaultStyle];
|
|
4333
|
-
}
|
|
4334
|
-
|
|
4335
|
-
return !name ? iconSets[styleFromProps((0, _defineProperty2["default"])({}, style, true))] : getIconSetForProps((0, _defineProperty2["default"])({
|
|
4336
|
-
name: name
|
|
4337
|
-
}, style, true));
|
|
4338
|
-
}
|
|
4339
|
-
|
|
4340
|
-
function getImageSource(name) {
|
|
4341
|
-
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _createIconSet$2.DEFAULT_ICON_SIZE;
|
|
4342
|
-
var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _createIconSet$2.DEFAULT_ICON_COLOR;
|
|
4343
|
-
var style = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : options.defaultStyle;
|
|
4344
|
-
return getStyledIconSet(style, name).getImageSource(name, size, color);
|
|
4345
|
-
}
|
|
4346
|
-
|
|
4347
|
-
function getFontFamily() {
|
|
4348
|
-
var style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : options.defaultStyle;
|
|
4349
|
-
return getStyledIconSet(style).getFontFamily();
|
|
4350
|
-
}
|
|
4351
|
-
|
|
4352
|
-
function getRawGlyphMap() {
|
|
4353
|
-
var style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : options.defaultStyle;
|
|
4354
|
-
return getStyledIconSet(style).getRawGlyphMap();
|
|
4355
|
-
}
|
|
4356
|
-
|
|
4357
|
-
function hasIcon(name) {
|
|
4358
|
-
var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : options.defaultStyle;
|
|
4359
|
-
return options.glyphValidator(name, style);
|
|
4360
|
-
}
|
|
4361
|
-
|
|
4362
|
-
function createStyledIconClass() {
|
|
4363
|
-
var selectClass = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
4364
|
-
|
|
4365
|
-
var IconClass = function (_PureComponent) {
|
|
4366
|
-
(0, _inherits2["default"])(IconClass, _PureComponent);
|
|
4367
|
-
|
|
4368
|
-
function IconClass() {
|
|
4369
|
-
(0, _classCallCheck2["default"])(this, IconClass);
|
|
4370
|
-
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(IconClass).apply(this, arguments));
|
|
4371
|
-
}
|
|
4372
|
-
|
|
4373
|
-
(0, _createClass2["default"])(IconClass, [{
|
|
4374
|
-
key: "render",
|
|
4375
|
-
value: function render() {
|
|
4376
|
-
var selectedIconSet = getIconSetForProps(this.props);
|
|
4377
|
-
var SelectedIconClass = selectIconClass(selectedIconSet, selectClass);
|
|
4378
|
-
var props = reduceProps(this.props);
|
|
4379
|
-
return _react["default"].createElement(SelectedIconClass, (0, _extends2["default"])({}, props, {
|
|
4380
|
-
__self: this,
|
|
4381
|
-
__source: {
|
|
4382
|
-
fileName: _jsxFileName,
|
|
4383
|
-
lineNumber: 123
|
|
4384
|
-
}
|
|
4385
|
-
}));
|
|
4386
|
-
}
|
|
4387
|
-
}]);
|
|
4388
|
-
return IconClass;
|
|
4389
|
-
}(_react.PureComponent);
|
|
4390
|
-
|
|
4391
|
-
IconClass.propTypes = styleNames.reduce(function (acc, name) {
|
|
4392
|
-
acc[name] = _propTypes["default"].bool;
|
|
4393
|
-
return acc;
|
|
4394
|
-
}, {});
|
|
4395
|
-
IconClass.defaultProps = styleNames.reduce(function (acc, name) {
|
|
4396
|
-
acc[name] = false;
|
|
4397
|
-
return acc;
|
|
4398
|
-
}, {});
|
|
4399
|
-
return IconClass;
|
|
4400
|
-
}
|
|
4401
|
-
|
|
4402
|
-
var Icon = createStyledIconClass();
|
|
4403
|
-
Icon.Button = createStyledIconClass('Button');
|
|
4404
|
-
Icon.getStyledIconSet = getStyledIconSet;
|
|
4405
|
-
Icon.getImageSource = getImageSource;
|
|
4406
|
-
Icon.getFontFamily = getFontFamily;
|
|
4407
|
-
Icon.getRawGlyphMap = getRawGlyphMap;
|
|
4408
|
-
Icon.hasIcon = hasIcon;
|
|
4409
|
-
return Icon;
|
|
4410
|
-
}
|
|
4411
|
-
|
|
4412
|
-
var createIconSetFromFontello$1 = {};
|
|
4413
|
-
|
|
4414
|
-
var _interopRequireDefault$1 = interopRequireDefault;
|
|
4415
|
-
Object.defineProperty(createIconSetFromFontello$1, "__esModule", {
|
|
4416
|
-
value: true
|
|
4417
|
-
});
|
|
4418
|
-
|
|
4419
|
-
createIconSetFromFontello$1["default"] = createIconSetFromFontello;
|
|
4420
|
-
|
|
4421
|
-
var _createIconSet$1 = _interopRequireDefault$1(createIconSet$1);
|
|
4422
|
-
|
|
4423
|
-
function createIconSetFromFontello(config, fontFamilyArg, fontFile) {
|
|
4424
|
-
var glyphMap = {};
|
|
4425
|
-
config.glyphs.forEach(function (glyph) {
|
|
4426
|
-
glyphMap[glyph.css] = glyph.code;
|
|
4427
|
-
});
|
|
4428
|
-
var fontFamily = fontFamilyArg || config.name || 'fontello';
|
|
4429
|
-
return (0, _createIconSet$1["default"])(glyphMap, fontFamily, fontFile || fontFamily + ".ttf");
|
|
4430
|
-
}
|
|
4431
|
-
|
|
4432
|
-
var createIconSetFromIcomoon = {};
|
|
4433
|
-
|
|
4434
|
-
var _interopRequireDefault = interopRequireDefault;
|
|
4435
|
-
Object.defineProperty(createIconSetFromIcomoon, "__esModule", {
|
|
4436
|
-
value: true
|
|
4437
|
-
});
|
|
2263
|
+
flatListHorizontalPadding: theme.space.small,
|
|
2264
|
+
itemHorizontalPadding: theme.space.small,
|
|
2265
|
+
itemVerticalPadding: theme.space.small,
|
|
2266
|
+
outlineHorizontalPadding: theme.space.small,
|
|
2267
|
+
outlineVerticalPadding: theme.space.xsmall
|
|
2268
|
+
};
|
|
2269
|
+
var radii = {
|
|
2270
|
+
outline: theme.radii.medium
|
|
2271
|
+
};
|
|
2272
|
+
var borderWidths = {
|
|
2273
|
+
headerBottom: theme.borderWidths.base
|
|
2274
|
+
};
|
|
2275
|
+
var sizes = {
|
|
2276
|
+
indicator: theme.space.xxsmall
|
|
2277
|
+
};
|
|
2278
|
+
return {
|
|
2279
|
+
borderWidths: borderWidths,
|
|
2280
|
+
colors: colors,
|
|
2281
|
+
space: space,
|
|
2282
|
+
radii: radii,
|
|
2283
|
+
sizes: sizes
|
|
2284
|
+
};
|
|
2285
|
+
};
|
|
4438
2286
|
|
|
4439
|
-
|
|
2287
|
+
var getTagTheme = function getTagTheme(theme) {
|
|
2288
|
+
var borderWidths = {
|
|
2289
|
+
"default": theme.borderWidths.base
|
|
2290
|
+
};
|
|
2291
|
+
var colors = {
|
|
2292
|
+
danger: theme.colors.danger,
|
|
2293
|
+
dangerBackground: theme.colors.dangerBackground,
|
|
2294
|
+
info: theme.colors.info,
|
|
2295
|
+
infoBackground: theme.colors.infoBackground,
|
|
2296
|
+
success: theme.colors.successDark,
|
|
2297
|
+
successBackground: theme.colors.successBackground,
|
|
2298
|
+
warning: theme.colors.warningDark,
|
|
2299
|
+
warningBackground: theme.colors.warningBackground
|
|
2300
|
+
};
|
|
2301
|
+
var fonts = {
|
|
2302
|
+
"default": theme.fonts.semiBold
|
|
2303
|
+
};
|
|
2304
|
+
var fontSizes = {
|
|
2305
|
+
"default": theme.fontSizes.small
|
|
2306
|
+
};
|
|
2307
|
+
var space = {
|
|
2308
|
+
horizontalPadding: theme.space.small,
|
|
2309
|
+
verticalPadding: theme.space.xxsmall
|
|
2310
|
+
};
|
|
2311
|
+
var radii = {
|
|
2312
|
+
"default": theme.radii.base
|
|
2313
|
+
};
|
|
2314
|
+
return {
|
|
2315
|
+
borderWidths: borderWidths,
|
|
2316
|
+
colors: colors,
|
|
2317
|
+
fonts: fonts,
|
|
2318
|
+
fontSizes: fontSizes,
|
|
2319
|
+
space: space,
|
|
2320
|
+
radii: radii
|
|
2321
|
+
};
|
|
2322
|
+
};
|
|
4440
2323
|
|
|
4441
|
-
var
|
|
2324
|
+
var getTextInputTheme = function getTextInputTheme(theme) {
|
|
2325
|
+
var colors = {
|
|
2326
|
+
labelBackground: theme.colors.platformBackground,
|
|
2327
|
+
border: theme.colors.text
|
|
2328
|
+
};
|
|
2329
|
+
var space = {
|
|
2330
|
+
containerPadding: theme.space.medium,
|
|
2331
|
+
labelLeft: theme.space.medium,
|
|
2332
|
+
labelTop: theme.lineHeights.small / -2,
|
|
2333
|
+
labelHorizontalPadding: theme.space.xsmall,
|
|
2334
|
+
inputHorizontalMargin: theme.space.small
|
|
2335
|
+
};
|
|
2336
|
+
var fontSizes = {
|
|
2337
|
+
text: theme.fontSizes.large
|
|
2338
|
+
};
|
|
2339
|
+
var borderWidths = {
|
|
2340
|
+
container: theme.borderWidths.base
|
|
2341
|
+
};
|
|
2342
|
+
var radii = {
|
|
2343
|
+
container: theme.radii.medium
|
|
2344
|
+
};
|
|
2345
|
+
return {
|
|
2346
|
+
colors: colors,
|
|
2347
|
+
space: space,
|
|
2348
|
+
fontSizes: fontSizes,
|
|
2349
|
+
borderWidths: borderWidths,
|
|
2350
|
+
radii: radii
|
|
2351
|
+
};
|
|
2352
|
+
};
|
|
4442
2353
|
|
|
4443
|
-
function
|
|
4444
|
-
var
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
2354
|
+
var getTypographyTheme = function getTypographyTheme(theme) {
|
|
2355
|
+
var colors = {
|
|
2356
|
+
body: theme.colors.text,
|
|
2357
|
+
subdued: theme.colors.disabledText,
|
|
2358
|
+
primary: theme.colors.primary
|
|
2359
|
+
};
|
|
2360
|
+
var fonts = {
|
|
2361
|
+
light: theme.fonts.light,
|
|
2362
|
+
regular: theme.fonts.regular,
|
|
2363
|
+
semiBold: theme.fonts.semiBold
|
|
2364
|
+
};
|
|
2365
|
+
var fontSizes = {
|
|
2366
|
+
small: theme.fontSizes.small,
|
|
2367
|
+
medium: theme.fontSizes.medium,
|
|
2368
|
+
large: theme.fontSizes.large,
|
|
2369
|
+
xlarge: theme.fontSizes.xlarge
|
|
2370
|
+
};
|
|
2371
|
+
var lineHeights = {
|
|
2372
|
+
small: theme.lineHeights.small,
|
|
2373
|
+
medium: theme.lineHeights.medium,
|
|
2374
|
+
large: theme.lineHeights.large,
|
|
2375
|
+
xlarge: theme.lineHeights.xlarge
|
|
2376
|
+
};
|
|
2377
|
+
return {
|
|
2378
|
+
colors: colors,
|
|
2379
|
+
fonts: fonts,
|
|
2380
|
+
fontSizes: fontSizes,
|
|
2381
|
+
lineHeights: lineHeights
|
|
2382
|
+
};
|
|
2383
|
+
};
|
|
4453
2384
|
|
|
4454
|
-
|
|
4455
|
-
var
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
})
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
2385
|
+
var getTheme = function getTheme() {
|
|
2386
|
+
var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
|
|
2387
|
+
var systemPallete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : systemPalette;
|
|
2388
|
+
var globalTheme = getGlobalTheme(scale, systemPallete);
|
|
2389
|
+
return _objectSpread2(_objectSpread2({}, globalTheme), {}, {
|
|
2390
|
+
__hd__: {
|
|
2391
|
+
avatar: getAvatarTheme(globalTheme),
|
|
2392
|
+
alert: getAlertTheme(globalTheme),
|
|
2393
|
+
badge: getBadgeTheme(globalTheme),
|
|
2394
|
+
bottomNavigation: getBottomNavigationTheme(globalTheme),
|
|
2395
|
+
bottomSheet: getBottomSheetTheme(globalTheme),
|
|
2396
|
+
button: getButtonTheme(globalTheme),
|
|
2397
|
+
card: getCardTheme(globalTheme),
|
|
2398
|
+
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
2399
|
+
divider: getDividerTheme(globalTheme),
|
|
2400
|
+
drawer: getDrawerTheme(globalTheme),
|
|
2401
|
+
fab: getFABTheme(globalTheme),
|
|
2402
|
+
icon: getIconTheme(globalTheme),
|
|
2403
|
+
progress: getProgressTheme(globalTheme),
|
|
2404
|
+
radio: getRadioTheme(globalTheme),
|
|
2405
|
+
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
2406
|
+
select: getSelectTheme(globalTheme),
|
|
2407
|
+
spinner: getSpinnerTheme(globalTheme),
|
|
2408
|
+
"switch": getSwitchTheme(globalTheme),
|
|
2409
|
+
tabs: getTabsTheme(globalTheme),
|
|
2410
|
+
tag: getTagTheme(globalTheme),
|
|
2411
|
+
textInput: getTextInputTheme(globalTheme),
|
|
2412
|
+
typography: getTypographyTheme(globalTheme)
|
|
4481
2413
|
}
|
|
4482
2414
|
});
|
|
2415
|
+
};
|
|
4483
2416
|
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
var _createIconSetFromFontello = _interopRequireDefault(createIconSetFromFontello$1);
|
|
2417
|
+
var theme = getTheme();
|
|
2418
|
+
var ThemeProvider = ThemeProvider$1;
|
|
2419
|
+
var useTheme = useTheme$1;
|
|
4489
2420
|
|
|
4490
|
-
|
|
4491
|
-
|
|
2421
|
+
function getDefaultExportFromCjs (x) {
|
|
2422
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
2423
|
+
}
|
|
4492
2424
|
|
|
4493
2425
|
var cssToReactNative = {};
|
|
4494
2426
|
|
|
@@ -4969,7 +2901,7 @@ var camelize = function camelize(obj) {
|
|
|
4969
2901
|
};
|
|
4970
2902
|
|
|
4971
2903
|
function walk(obj) {
|
|
4972
|
-
if (!obj || _typeof
|
|
2904
|
+
if (!obj || _typeof(obj) !== 'object') return obj;
|
|
4973
2905
|
if (isDate(obj) || isRegex(obj)) return obj;
|
|
4974
2906
|
if (isArray(obj)) return map(obj, walk);
|
|
4975
2907
|
return reduce(objectKeys(obj), function (acc, key) {
|
|
@@ -5334,7 +3266,7 @@ var cssColorKeywords = require$$0;
|
|
|
5334
3266
|
});
|
|
5335
3267
|
|
|
5336
3268
|
function _interopDefault(ex) {
|
|
5337
|
-
return ex && _typeof
|
|
3269
|
+
return ex && _typeof(ex) === 'object' && 'default' in ex ? ex['default'] : ex;
|
|
5338
3270
|
}
|
|
5339
3271
|
|
|
5340
3272
|
var parse = lib;
|
|
@@ -6189,7 +4121,7 @@ var buffer = '';
|
|
|
6189
4121
|
var lastType;
|
|
6190
4122
|
|
|
6191
4123
|
function handleInterpolation(interpolation, i, arr) {
|
|
6192
|
-
var type = _typeof
|
|
4124
|
+
var type = _typeof(interpolation);
|
|
6193
4125
|
|
|
6194
4126
|
if (type === 'string') {
|
|
6195
4127
|
// strip comments
|
|
@@ -6411,7 +4343,7 @@ var index$2 = components.reduce(function (acc, comp) {
|
|
|
6411
4343
|
enumerable: true,
|
|
6412
4344
|
configurable: false,
|
|
6413
4345
|
get: function get() {
|
|
6414
|
-
return styled(
|
|
4346
|
+
return styled(reactNative[comp]);
|
|
6415
4347
|
}
|
|
6416
4348
|
});
|
|
6417
4349
|
}, styled);
|
|
@@ -14335,7 +12267,7 @@ var heroIconConfig = {
|
|
|
14335
12267
|
preferences: preferences
|
|
14336
12268
|
};
|
|
14337
12269
|
|
|
14338
|
-
var HeroIcon =
|
|
12270
|
+
var HeroIcon = createIconSetFromIcoMoon(heroIconConfig, 'hero-icons', 'hero-icons.ttf');
|
|
14339
12271
|
var COLOR_INTENTS = {
|
|
14340
12272
|
text: 'text',
|
|
14341
12273
|
primary: 'primary',
|
|
@@ -14403,9 +12335,9 @@ var Text = function Text(_ref) {
|
|
|
14403
12335
|
fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
|
|
14404
12336
|
_ref$intent = _ref.intent,
|
|
14405
12337
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
14406
|
-
nativeProps = _objectWithoutProperties
|
|
12338
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
14407
12339
|
|
|
14408
|
-
return /*#__PURE__*/React.createElement(StyledText$3, _extends$
|
|
12340
|
+
return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
14409
12341
|
themeFontSize: fontSize,
|
|
14410
12342
|
themeFontWeight: fontWeight,
|
|
14411
12343
|
themeIntent: intent
|
|
@@ -14641,7 +12573,7 @@ var Status = function Status(_ref) {
|
|
|
14641
12573
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
14642
12574
|
style = _ref.style,
|
|
14643
12575
|
testID = _ref.testID,
|
|
14644
|
-
nativeProps = _objectWithoutProperties
|
|
12576
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
14645
12577
|
|
|
14646
12578
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
14647
12579
|
opacity = _React$useRef.current;
|
|
@@ -14660,7 +12592,7 @@ var Status = function Status(_ref) {
|
|
|
14660
12592
|
useNativeDriver: true
|
|
14661
12593
|
}).start();
|
|
14662
12594
|
}, [visible, opacity]);
|
|
14663
|
-
return /*#__PURE__*/React.createElement(View, _extends$
|
|
12595
|
+
return /*#__PURE__*/React.createElement(View, _extends$1({}, nativeProps, {
|
|
14664
12596
|
style: style,
|
|
14665
12597
|
testID: testID
|
|
14666
12598
|
}), children, /*#__PURE__*/React.createElement(StyledStatus, {
|
|
@@ -14694,7 +12626,7 @@ var Badge = function Badge(_ref) {
|
|
|
14694
12626
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
14695
12627
|
style = _ref.style,
|
|
14696
12628
|
testID = _ref.testID,
|
|
14697
|
-
nativeProps = _objectWithoutProperties
|
|
12629
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
14698
12630
|
|
|
14699
12631
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
14700
12632
|
opacity = _React$useRef.current;
|
|
@@ -14714,7 +12646,7 @@ var Badge = function Badge(_ref) {
|
|
|
14714
12646
|
}).start();
|
|
14715
12647
|
}, [visible, opacity]);
|
|
14716
12648
|
var content = typeof originalContent === 'number' && originalContent > max ? "".concat(max, "+") : String(originalContent);
|
|
14717
|
-
return /*#__PURE__*/React.createElement(StyledView$2, _extends$
|
|
12649
|
+
return /*#__PURE__*/React.createElement(StyledView$2, _extends$1({}, nativeProps, {
|
|
14718
12650
|
themeIntent: intent,
|
|
14719
12651
|
themePadding: getPaddingState(content),
|
|
14720
12652
|
style: [{
|
|
@@ -14803,7 +12735,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
14803
12735
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
14804
12736
|
selectedTabKey = _ref.selectedTabKey,
|
|
14805
12737
|
tabs = _ref.tabs,
|
|
14806
|
-
nativeProps = _objectWithoutProperties
|
|
12738
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$9);
|
|
14807
12739
|
|
|
14808
12740
|
var insets = useSafeAreaInsets();
|
|
14809
12741
|
/**
|
|
@@ -14818,7 +12750,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
14818
12750
|
if (!loaded.includes(selectedTabKey)) {
|
|
14819
12751
|
// Set the current tab to be loaded if it was not loaded before
|
|
14820
12752
|
setLoaded(function (loadedState) {
|
|
14821
|
-
return [].concat(_toConsumableArray
|
|
12753
|
+
return [].concat(_toConsumableArray(loadedState), [selectedTabKey]);
|
|
14822
12754
|
});
|
|
14823
12755
|
}
|
|
14824
12756
|
|
|
@@ -14901,9 +12833,9 @@ var Divider = function Divider(_ref) {
|
|
|
14901
12833
|
marginVertical = _ref.marginVertical,
|
|
14902
12834
|
style = _ref.style,
|
|
14903
12835
|
testID = _ref.testID,
|
|
14904
|
-
nativeProps = _objectWithoutProperties
|
|
12836
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
14905
12837
|
|
|
14906
|
-
return /*#__PURE__*/React.createElement(StyledDivider, _extends$
|
|
12838
|
+
return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
14907
12839
|
themeMarginHorizontal: marginHorizontal,
|
|
14908
12840
|
themeMarginVertical: marginVertical,
|
|
14909
12841
|
style: style,
|
|
@@ -15063,7 +12995,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
15063
12995
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
15064
12996
|
testID = _ref2.testID,
|
|
15065
12997
|
themeVariant = _ref2.themeVariant,
|
|
15066
|
-
nativeProps = _objectWithoutProperties
|
|
12998
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$7);
|
|
15067
12999
|
|
|
15068
13000
|
var progressAnimation = useRef(new Animated.Value(0));
|
|
15069
13001
|
useEffect(function () {
|
|
@@ -15093,7 +13025,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
15093
13025
|
return null;
|
|
15094
13026
|
};
|
|
15095
13027
|
|
|
15096
|
-
return /*#__PURE__*/React.createElement(AnimatedLoadingIndicatorWrapper, _extends$
|
|
13028
|
+
return /*#__PURE__*/React.createElement(AnimatedLoadingIndicatorWrapper, _extends$1({
|
|
15097
13029
|
testID: testID
|
|
15098
13030
|
}, nativeProps), Array.from(new Array(count), renderLoadingDot, themeVariant));
|
|
15099
13031
|
};
|
|
@@ -15593,9 +13525,9 @@ var Card = function Card(_ref) {
|
|
|
15593
13525
|
var _ref$variant = _ref.variant,
|
|
15594
13526
|
variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
|
|
15595
13527
|
children = _ref.children,
|
|
15596
|
-
nativeProps = _objectWithoutProperties
|
|
13528
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
15597
13529
|
|
|
15598
|
-
return /*#__PURE__*/React.createElement(StyledCard, _extends$
|
|
13530
|
+
return /*#__PURE__*/React.createElement(StyledCard, _extends$1({}, nativeProps, {
|
|
15599
13531
|
themeVariant: variant
|
|
15600
13532
|
}), variant === 'data' && /*#__PURE__*/React.createElement(LeftDataCard, {
|
|
15601
13533
|
testID: "data-card-indicator"
|
|
@@ -15847,7 +13779,7 @@ var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
|
|
|
15847
13779
|
|
|
15848
13780
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
15849
13781
|
var active = _ref.active,
|
|
15850
|
-
iconProps = _objectWithoutProperties
|
|
13782
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
15851
13783
|
|
|
15852
13784
|
var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
|
|
15853
13785
|
useEffect(function () {
|
|
@@ -16019,7 +13951,7 @@ var ActionItemsListComponent = function ActionItemsListComponent(_ref) {
|
|
|
16019
13951
|
return /*#__PURE__*/React.createElement(View, {
|
|
16020
13952
|
style: style
|
|
16021
13953
|
}, items === null || items === void 0 ? void 0 : items.map(function (itemProp) {
|
|
16022
|
-
return /*#__PURE__*/React.createElement(ActionItem, _extends$
|
|
13954
|
+
return /*#__PURE__*/React.createElement(ActionItem, _extends$1({
|
|
16023
13955
|
key: itemProp.icon
|
|
16024
13956
|
}, itemProp));
|
|
16025
13957
|
}));
|
|
@@ -16158,9 +14090,9 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
16158
14090
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
16159
14091
|
style = _ref2.style,
|
|
16160
14092
|
testID = _ref2.testID,
|
|
16161
|
-
nativeProps = _objectWithoutProperties
|
|
14093
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$4);
|
|
16162
14094
|
|
|
16163
|
-
var theme = useTheme();
|
|
14095
|
+
var theme = useTheme$1();
|
|
16164
14096
|
var radius = theme.__hd__.progress.sizes.radius;
|
|
16165
14097
|
var progressAnimatedValue = useRef(new Animated.Value(0));
|
|
16166
14098
|
useEffect(function () {
|
|
@@ -16196,7 +14128,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
16196
14128
|
outputRange: ['0deg', '360deg'],
|
|
16197
14129
|
extrapolate: 'clamp'
|
|
16198
14130
|
});
|
|
16199
|
-
return /*#__PURE__*/React.createElement(View, _extends$
|
|
14131
|
+
return /*#__PURE__*/React.createElement(View, _extends$1({}, nativeProps, {
|
|
16200
14132
|
testID: testID,
|
|
16201
14133
|
style: style
|
|
16202
14134
|
}), /*#__PURE__*/React.createElement(View, {
|
|
@@ -16284,7 +14216,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
16284
14216
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
16285
14217
|
style = _ref.style,
|
|
16286
14218
|
testID = _ref.testID,
|
|
16287
|
-
nativeProps = _objectWithoutProperties
|
|
14219
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$3);
|
|
16288
14220
|
|
|
16289
14221
|
var _useState = useState(0),
|
|
16290
14222
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -16312,7 +14244,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
16312
14244
|
outputRange: [999, 0],
|
|
16313
14245
|
extrapolate: 'clamp'
|
|
16314
14246
|
});
|
|
16315
|
-
return /*#__PURE__*/React.createElement(StyledWrapper$2, _extends$
|
|
14247
|
+
return /*#__PURE__*/React.createElement(StyledWrapper$2, _extends$1({}, nativeProps, {
|
|
16316
14248
|
testID: testID,
|
|
16317
14249
|
style: style
|
|
16318
14250
|
}), /*#__PURE__*/React.createElement(StyledInner, {
|
|
@@ -16434,7 +14366,7 @@ var _excluded$2 = ["testID"];
|
|
|
16434
14366
|
|
|
16435
14367
|
var Spinner = function Spinner(_ref) {
|
|
16436
14368
|
var testID = _ref.testID,
|
|
16437
|
-
nativeProps = _objectWithoutProperties
|
|
14369
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
16438
14370
|
|
|
16439
14371
|
return /*#__PURE__*/React.createElement(StyledView$1, nativeProps, /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
|
|
16440
14372
|
testID: testID
|
|
@@ -16654,7 +14586,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
16654
14586
|
textStyle = _ref.textStyle,
|
|
16655
14587
|
testID = _ref.testID,
|
|
16656
14588
|
accessibilityLabelledBy = _ref.accessibilityLabelledBy,
|
|
16657
|
-
nativeProps = _objectWithoutProperties
|
|
14589
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
16658
14590
|
|
|
16659
14591
|
return /*#__PURE__*/React.createElement(Container, {
|
|
16660
14592
|
style: style,
|
|
@@ -16667,7 +14599,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
16667
14599
|
testID: "input-prefix",
|
|
16668
14600
|
icon: prefix,
|
|
16669
14601
|
size: "xsmall"
|
|
16670
|
-
}), /*#__PURE__*/React.createElement(StyledTextInput, _extends$
|
|
14602
|
+
}), /*#__PURE__*/React.createElement(StyledTextInput, _extends$1({
|
|
16671
14603
|
style: textStyle,
|
|
16672
14604
|
testID: "text-input" // @ts-ignore
|
|
16673
14605
|
,
|
|
@@ -16771,7 +14703,7 @@ function OptionList(_ref2) {
|
|
|
16771
14703
|
return val !== opt.value;
|
|
16772
14704
|
}));
|
|
16773
14705
|
} else {
|
|
16774
|
-
_onPress([].concat(_toConsumableArray
|
|
14706
|
+
_onPress([].concat(_toConsumableArray(value), [opt.value]));
|
|
16775
14707
|
}
|
|
16776
14708
|
}
|
|
16777
14709
|
}));
|
|
@@ -16786,7 +14718,7 @@ function MultiSelect(_ref) {
|
|
|
16786
14718
|
label = _ref.label,
|
|
16787
14719
|
footerLabel = _ref.footerLabel,
|
|
16788
14720
|
_onPress = _ref.onPress;
|
|
16789
|
-
var theme = useTheme();
|
|
14721
|
+
var theme = useTheme$1();
|
|
16790
14722
|
|
|
16791
14723
|
var _useState = useState(false),
|
|
16792
14724
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -16907,7 +14839,7 @@ var Switch = function Switch(_ref) {
|
|
|
16907
14839
|
onPress = _ref.onPress,
|
|
16908
14840
|
style = _ref.style,
|
|
16909
14841
|
testID = _ref.testID;
|
|
16910
|
-
var theme = useTheme();
|
|
14842
|
+
var theme = useTheme$1();
|
|
16911
14843
|
var offset = checked ? theme.__hd__["switch"].widths[size] - theme.__hd__["switch"].thumbSizes[size] - theme.__hd__["switch"].spaces[size] * 2 : theme.__hd__["switch"].spaces.inactive;
|
|
16912
14844
|
|
|
16913
14845
|
var _useState = useState(function () {
|
|
@@ -16943,206 +14875,6 @@ var Switch = function Switch(_ref) {
|
|
|
16943
14875
|
}))));
|
|
16944
14876
|
};
|
|
16945
14877
|
|
|
16946
|
-
var childrenWithOverriddenStyle = function childrenWithOverriddenStyle(children) {
|
|
16947
|
-
return Children.map(children, function (child) {
|
|
16948
|
-
var element = child;
|
|
16949
|
-
return (
|
|
16950
|
-
/*#__PURE__*/
|
|
16951
|
-
// Add a wrapper to ensure layout is calculated correctly
|
|
16952
|
-
React.createElement(View, {
|
|
16953
|
-
style: StyleSheet$1.absoluteFill,
|
|
16954
|
-
collapsable: false
|
|
16955
|
-
}, /*#__PURE__*/React.cloneElement(element, _objectSpread2(_objectSpread2({}, element.props), {}, {
|
|
16956
|
-
// Override styles so that each page will fill the parent.
|
|
16957
|
-
style: [element.props.style, StyleSheet$1.absoluteFill]
|
|
16958
|
-
})))
|
|
16959
|
-
);
|
|
16960
|
-
});
|
|
16961
|
-
};
|
|
16962
|
-
|
|
16963
|
-
var VIEW_MANAGER_NAME = 'RNCViewPager';
|
|
16964
|
-
var PagerViewViewManager = requireNativeComponent(VIEW_MANAGER_NAME);
|
|
16965
|
-
function getViewManagerConfig() {
|
|
16966
|
-
var viewManagerName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : VIEW_MANAGER_NAME;
|
|
16967
|
-
return UIManager.getViewManagerConfig(viewManagerName);
|
|
16968
|
-
}
|
|
16969
|
-
|
|
16970
|
-
function _extends() {
|
|
16971
|
-
_extends = Object.assign || function (target) {
|
|
16972
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
16973
|
-
var source = arguments[i];
|
|
16974
|
-
|
|
16975
|
-
for (var key in source) {
|
|
16976
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
16977
|
-
target[key] = source[key];
|
|
16978
|
-
}
|
|
16979
|
-
}
|
|
16980
|
-
}
|
|
16981
|
-
|
|
16982
|
-
return target;
|
|
16983
|
-
};
|
|
16984
|
-
|
|
16985
|
-
return _extends.apply(this, arguments);
|
|
16986
|
-
}
|
|
16987
|
-
|
|
16988
|
-
function _defineProperty(obj, key, value) {
|
|
16989
|
-
if (key in obj) {
|
|
16990
|
-
Object.defineProperty(obj, key, {
|
|
16991
|
-
value: value,
|
|
16992
|
-
enumerable: true,
|
|
16993
|
-
configurable: true,
|
|
16994
|
-
writable: true
|
|
16995
|
-
});
|
|
16996
|
-
} else {
|
|
16997
|
-
obj[key] = value;
|
|
16998
|
-
}
|
|
16999
|
-
|
|
17000
|
-
return obj;
|
|
17001
|
-
}
|
|
17002
|
-
/**
|
|
17003
|
-
* Container that allows to flip left and right between child views. Each
|
|
17004
|
-
* child view of the `PagerView` will be treated as a separate page
|
|
17005
|
-
* and will be stretched to fill the `PagerView`.
|
|
17006
|
-
*
|
|
17007
|
-
* It is important all children are `<View>`s and not composite components.
|
|
17008
|
-
* You can set style properties like `padding` or `backgroundColor` for each
|
|
17009
|
-
* child. It is also important that each child have a `key` prop.
|
|
17010
|
-
*
|
|
17011
|
-
* Example:
|
|
17012
|
-
*
|
|
17013
|
-
* ```
|
|
17014
|
-
* render: function() {
|
|
17015
|
-
* return (
|
|
17016
|
-
* <PagerView
|
|
17017
|
-
* style={styles.PagerView}
|
|
17018
|
-
* initialPage={0}>
|
|
17019
|
-
* <View style={styles.pageStyle} key="1">
|
|
17020
|
-
* <Text>First page</Text>
|
|
17021
|
-
* </View>
|
|
17022
|
-
* <View style={styles.pageStyle} key="2">
|
|
17023
|
-
* <Text>Second page</Text>
|
|
17024
|
-
* </View>
|
|
17025
|
-
* </PagerView>
|
|
17026
|
-
* );
|
|
17027
|
-
* }
|
|
17028
|
-
*
|
|
17029
|
-
* ...
|
|
17030
|
-
*
|
|
17031
|
-
* var styles = {
|
|
17032
|
-
* ...
|
|
17033
|
-
* PagerView: {
|
|
17034
|
-
* flex: 1
|
|
17035
|
-
* },
|
|
17036
|
-
* pageStyle: {
|
|
17037
|
-
* alignItems: 'center',
|
|
17038
|
-
* padding: 20,
|
|
17039
|
-
* }
|
|
17040
|
-
* }
|
|
17041
|
-
* ```
|
|
17042
|
-
*/
|
|
17043
|
-
|
|
17044
|
-
var PagerView = /*#__PURE__*/function (_React$Component) {
|
|
17045
|
-
_inherits$1(PagerView, _React$Component);
|
|
17046
|
-
|
|
17047
|
-
var _super = _createSuper(PagerView);
|
|
17048
|
-
|
|
17049
|
-
function PagerView() {
|
|
17050
|
-
var _this;
|
|
17051
|
-
|
|
17052
|
-
_classCallCheck$1(this, PagerView);
|
|
17053
|
-
|
|
17054
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17055
|
-
args[_key] = arguments[_key];
|
|
17056
|
-
}
|
|
17057
|
-
|
|
17058
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
17059
|
-
|
|
17060
|
-
_defineProperty(_assertThisInitialized$1(_this), "isScrolling", false);
|
|
17061
|
-
|
|
17062
|
-
_defineProperty(_assertThisInitialized$1(_this), "PagerView", /*#__PURE__*/React.createRef());
|
|
17063
|
-
|
|
17064
|
-
_defineProperty(_assertThisInitialized$1(_this), "getInnerViewNode", function () {
|
|
17065
|
-
return _this.PagerView.current.getInnerViewNode();
|
|
17066
|
-
});
|
|
17067
|
-
|
|
17068
|
-
_defineProperty(_assertThisInitialized$1(_this), "_onPageScroll", function (e) {
|
|
17069
|
-
if (_this.props.onPageScroll) {
|
|
17070
|
-
_this.props.onPageScroll(e);
|
|
17071
|
-
} // Not implemented on iOS yet
|
|
17072
|
-
|
|
17073
|
-
|
|
17074
|
-
if (Platform.OS === 'android') {
|
|
17075
|
-
if (_this.props.keyboardDismissMode === 'on-drag') {
|
|
17076
|
-
Keyboard.dismiss();
|
|
17077
|
-
}
|
|
17078
|
-
}
|
|
17079
|
-
});
|
|
17080
|
-
|
|
17081
|
-
_defineProperty(_assertThisInitialized$1(_this), "_onPageScrollStateChanged", function (e) {
|
|
17082
|
-
if (_this.props.onPageScrollStateChanged) {
|
|
17083
|
-
_this.props.onPageScrollStateChanged(e);
|
|
17084
|
-
}
|
|
17085
|
-
|
|
17086
|
-
_this.isScrolling = e.nativeEvent.pageScrollState === 'dragging';
|
|
17087
|
-
});
|
|
17088
|
-
|
|
17089
|
-
_defineProperty(_assertThisInitialized$1(_this), "_onPageSelected", function (e) {
|
|
17090
|
-
if (_this.props.onPageSelected) {
|
|
17091
|
-
_this.props.onPageSelected(e);
|
|
17092
|
-
}
|
|
17093
|
-
});
|
|
17094
|
-
|
|
17095
|
-
_defineProperty(_assertThisInitialized$1(_this), "setPage", function (selectedPage) {
|
|
17096
|
-
UIManager.dispatchViewManagerCommand(ReactNative__default.findNodeHandle(_assertThisInitialized$1(_this)), getViewManagerConfig().Commands.setPage, [selectedPage]);
|
|
17097
|
-
});
|
|
17098
|
-
|
|
17099
|
-
_defineProperty(_assertThisInitialized$1(_this), "setPageWithoutAnimation", function (selectedPage) {
|
|
17100
|
-
UIManager.dispatchViewManagerCommand(ReactNative__default.findNodeHandle(_assertThisInitialized$1(_this)), getViewManagerConfig().Commands.setPageWithoutAnimation, [selectedPage]);
|
|
17101
|
-
});
|
|
17102
|
-
|
|
17103
|
-
_defineProperty(_assertThisInitialized$1(_this), "setScrollEnabled", function (scrollEnabled) {
|
|
17104
|
-
UIManager.dispatchViewManagerCommand(ReactNative__default.findNodeHandle(_assertThisInitialized$1(_this)), getViewManagerConfig().Commands.setScrollEnabled, [scrollEnabled]);
|
|
17105
|
-
});
|
|
17106
|
-
|
|
17107
|
-
_defineProperty(_assertThisInitialized$1(_this), "_onMoveShouldSetResponderCapture", function () {
|
|
17108
|
-
return _this.isScrolling;
|
|
17109
|
-
});
|
|
17110
|
-
|
|
17111
|
-
return _this;
|
|
17112
|
-
}
|
|
17113
|
-
|
|
17114
|
-
_createClass$1(PagerView, [{
|
|
17115
|
-
key: "deducedLayoutDirection",
|
|
17116
|
-
get: function get() {
|
|
17117
|
-
var shouldUseDeviceRtlSetup = !this.props.layoutDirection || this.props.layoutDirection === 'locale';
|
|
17118
|
-
|
|
17119
|
-
if (shouldUseDeviceRtlSetup) {
|
|
17120
|
-
return I18nManager.isRTL ? 'rtl' : 'ltr';
|
|
17121
|
-
} else {
|
|
17122
|
-
return this.props.layoutDirection;
|
|
17123
|
-
}
|
|
17124
|
-
}
|
|
17125
|
-
}, {
|
|
17126
|
-
key: "render",
|
|
17127
|
-
value: function render() {
|
|
17128
|
-
return /*#__PURE__*/React.createElement(PagerViewViewManager, _extends({}, this.props, {
|
|
17129
|
-
ref: this.PagerView
|
|
17130
|
-
/** TODO: Fix ref type */
|
|
17131
|
-
,
|
|
17132
|
-
style: this.props.style,
|
|
17133
|
-
layoutDirection: this.deducedLayoutDirection,
|
|
17134
|
-
onPageScroll: this._onPageScroll,
|
|
17135
|
-
onPageScrollStateChanged: this._onPageScrollStateChanged,
|
|
17136
|
-
onPageSelected: this._onPageSelected,
|
|
17137
|
-
onMoveShouldSetResponderCapture: this._onMoveShouldSetResponderCapture,
|
|
17138
|
-
children: childrenWithOverriddenStyle(this.props.children)
|
|
17139
|
-
}));
|
|
17140
|
-
}
|
|
17141
|
-
}]);
|
|
17142
|
-
|
|
17143
|
-
return PagerView;
|
|
17144
|
-
}(React.Component);
|
|
17145
|
-
|
|
17146
14878
|
var AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
|
|
17147
14879
|
var TabContainer$1 = index$2(View)({
|
|
17148
14880
|
flex: 1,
|
|
@@ -17309,7 +15041,7 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
17309
15041
|
var flatListRef = React.useRef(null);
|
|
17310
15042
|
var pagerViewRef = React.useRef(null);
|
|
17311
15043
|
var insets = useSafeAreaInsets();
|
|
17312
|
-
var theme = useTheme();
|
|
15044
|
+
var theme = useTheme$1();
|
|
17313
15045
|
var selectedTabIndex = tabs.findIndex(function (item) {
|
|
17314
15046
|
return item.key === selectedTabKey;
|
|
17315
15047
|
});
|
|
@@ -17326,7 +15058,7 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
17326
15058
|
});
|
|
17327
15059
|
}
|
|
17328
15060
|
|
|
17329
|
-
var animation = Animated.parallel(_toConsumableArray
|
|
15061
|
+
var animation = Animated.parallel(_toConsumableArray(tabs.map(function (_, i) {
|
|
17330
15062
|
return Animated.timing(tabsAnims[i], {
|
|
17331
15063
|
toValue: i === selectedTabIndex ? 1 : 0,
|
|
17332
15064
|
duration: 150,
|
|
@@ -17465,7 +15197,7 @@ var Tabs = function Tabs(_ref2) {
|
|
|
17465
15197
|
lazy = _ref2$lazy === void 0 ? false : _ref2$lazy,
|
|
17466
15198
|
_ref2$lazyPreloadDist = _ref2.lazyPreloadDistance,
|
|
17467
15199
|
lazyPreloadDistance = _ref2$lazyPreloadDist === void 0 ? 1 : _ref2$lazyPreloadDist;
|
|
17468
|
-
var theme = useTheme();
|
|
15200
|
+
var theme = useTheme$1();
|
|
17469
15201
|
var insets = useSafeAreaInsets();
|
|
17470
15202
|
var pagerViewRef = React.useRef(null);
|
|
17471
15203
|
var selectedTabIndex = tabs.findIndex(function (item) {
|
|
@@ -17602,9 +15334,9 @@ var Tag = function Tag(_ref) {
|
|
|
17602
15334
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
17603
15335
|
style = _ref.style,
|
|
17604
15336
|
testID = _ref.testID,
|
|
17605
|
-
nativeProps = _objectWithoutProperties
|
|
15337
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded);
|
|
17606
15338
|
|
|
17607
|
-
return /*#__PURE__*/React.createElement(StyledView, _extends$
|
|
15339
|
+
return /*#__PURE__*/React.createElement(StyledView, _extends$1({}, nativeProps, {
|
|
17608
15340
|
themeIntent: intent,
|
|
17609
15341
|
style: style,
|
|
17610
15342
|
testID: testID
|