@konstructio/ui 0.1.2-alpha.109 → 0.1.2-alpha.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AdditionalOptions-Crcnz0_g.js → AdditionalOptions-D3SZ2WFJ.js} +1 -1
- package/dist/{AlertDialogTrigger-ouMGAlJW.js → AlertDialogTrigger-Cdw3C2Tv.js} +2 -2
- package/dist/AnimatePresence-V0yte2ER.js +186 -0
- package/dist/{Breadcrumb-MrF1Z6w2.js → Breadcrumb-CHi5-wVa.js} +2 -3
- package/dist/{Checkbox-8KnRLpQG.js → Checkbox-CrNxsm3G.js} +2 -3
- package/dist/{CommandInput-CGnqfudl.js → CommandInput-DiRv6fEA.js} +3 -4
- package/dist/{Counter-CDXdP1Af.js → Counter-DN50BVq6.js} +4 -5
- package/dist/{DayPicker-C22j0Y-u.js → DayPicker-BtpJg2q3.js} +355 -349
- package/dist/{DropdownButton-LEDrhn1j.js → DropdownButton-Blhkj-Oi.js} +114 -117
- package/dist/FlagSelectorList-ClKGwDpS.js +918 -0
- package/dist/{HamburgerTrigger-B_NGSZ2r.js → HamburgerTrigger-DjHmNEJD.js} +2 -3
- package/dist/{ImageUpload-D7HKSXK8.js → ImageUpload-BNZjCUTX.js} +2 -2
- package/dist/{Input-is8n7emP.js → Input-2M2I_H60.js} +3 -5
- package/dist/Loading-u8hXrFJR.js +25 -0
- package/dist/{Modal-DL4p692X.js → Modal-B6lSyPYQ.js} +3 -3
- package/dist/{Spinner-BJE79VTl.js → Spinner-smR3esbL.js} +28 -22
- package/dist/StepIndicatorContent-yB2HfOdY.js +36 -0
- package/dist/{Switch-C7286Bcu.js → Switch-CPE8v6Zh.js} +1 -1
- package/dist/Toast-DTb03cfB.js +76 -0
- package/dist/{Wrapper-a7RVCcrn.js → Wrapper-BxfB3BDa.js} +2 -2
- package/dist/{Wrapper-CyHxGs4E.js → Wrapper-JmStmade.js} +3 -4
- package/dist/{Wrapper-Bbaaa7YA.js → Wrapper-MmlrJppS.js} +76 -70
- package/dist/chevron-down-BODx0Q7h.js +14 -0
- package/dist/chevron-left-B1zWfqll.js +14 -0
- package/dist/chevron-right-D4OkgIIT.js +14 -0
- package/dist/chevron-up-B8hiVgxZ.js +14 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/components/List/List.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.js +2 -2
- package/dist/components/Breadcrumb/components/Item/Item.js +2 -2
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +2 -2
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +2 -2
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +2 -2
- package/dist/components/Command/components/CommandList.js +2 -2
- package/dist/components/Command/components/CommandSeparator.js +2 -2
- package/dist/components/Command/components/CommandShortcut.js +1 -1
- package/dist/components/Command/components/DialogContent.js +3 -3
- package/dist/components/Command/components/DialogOverlay.js +2 -2
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/CopyButton/CopyButton.js +2 -2
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +2 -2
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +2 -2
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +1 -1
- package/dist/components/DateRangePicker/components/RightPanel/RightPanel.js +3 -3
- package/dist/components/Datepicker/DatePicker.js +4 -4
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/Drawer/components/Body/Body.js +1 -1
- package/dist/components/Drawer/components/Footer/Footer.js +1 -1
- package/dist/components/Drawer/components/Header/Header.js +1 -1
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +3 -3
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Actions/Actions.js +3 -3
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Trigger/Trigger.js +2 -2
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +2 -2
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +2 -2
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +2 -2
- package/dist/components/Filter/components/ResetButton/ResetButton.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +3 -3
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +2 -2
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +2 -2
- package/dist/components/Loading/Loading.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +3 -3
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/PieChart.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioCard/RadioCard.js +1 -1
- package/dist/components/RadioCardGroup/RadioCardGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +2 -2
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +1 -1
- package/dist/components/Select/components/List/List.js +3 -3
- package/dist/components/Select/components/ListItem/ListItem.js +1 -1
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +1 -1
- package/dist/components/Sidebar/components/Footer/Footer.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Label/Label.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +1 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.js +1 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +2 -2
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +1 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Spinner/Spinner.js +3 -2
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +2 -2
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +1 -1
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +1 -1
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +2 -2
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/components/Body.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Table/components/Head.js +1 -1
- package/dist/components/Table/components/Row.js +1 -1
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/Tabs/components/Content.js +2 -2
- package/dist/components/Tabs/components/List.js +2 -2
- package/dist/components/Tabs/components/Trigger.js +2 -2
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Item/Item.js +1 -1
- package/dist/components/TagSelect/components/List/List.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TimePicker/components/HoursList/HoursList.js +1 -1
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +1 -1
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/Toast.variants.js +73 -41
- package/dist/components/Toast/ToastProvider.js +19 -0
- package/dist/components/Toast/components/ToastCard/ToastCard.js +103 -0
- package/dist/components/Toast/components/index.js +4 -0
- package/dist/components/Toast/constants/index.js +35 -0
- package/dist/components/Toast/contexts/index.js +4 -0
- package/dist/components/Toast/contexts/toast-store.context.js +5 -0
- package/dist/components/Toast/hooks/index.js +15 -0
- package/dist/components/Toast/hooks/useStackExpansion/useStackExpansion.js +29 -0
- package/dist/components/Toast/hooks/useToast/useToast.js +17 -0
- package/dist/components/Toast/hooks/useToastHeights/useToastHeights.js +23 -0
- package/dist/components/Toast/hooks/useToastSource/useToastSource.js +15 -0
- package/dist/components/Toast/hooks/useToastStore/useToastStore.js +11 -0
- package/dist/components/Toast/hooks/useToastTimer/useToastTimer.js +26 -0
- package/dist/components/Toast/store/create-toast-store.js +46 -0
- package/dist/components/Toast/store/default-toast-store.js +5 -0
- package/dist/components/Toast/store/index.js +6 -0
- package/dist/components/Toast/utils/compute-stack-layout/compute-stack-layout.js +24 -0
- package/dist/components/Toast/utils/index.js +4 -0
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +2 -2
- package/dist/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.js +1 -1
- package/dist/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.js +2 -2
- package/dist/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.js +1 -1
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.js +1 -1
- package/dist/components/VirtualizedTable/components/Body/Body.js +2 -2
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +3 -3
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +3 -3
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +2 -2
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +2 -2
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +1 -1
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +143 -130
- package/dist/{components-CaEW5ge4.js → components-z-LYRWfq.js} +3 -3
- package/dist/{constants-HQIXhj2t.js → constants-q2QnJrOb.js} +1 -1
- package/dist/contexts/index.js +1 -1
- package/dist/contexts/theme.provider.js +1 -1
- package/dist/createLucideIcon-C7E_xycG.js +119 -0
- package/dist/{dist-CszFjHAP.js → dist-Bi8Y5nEx.js} +7 -9
- package/dist/{dist-BIBFLVt1.js → dist-CNui_Egg.js} +9 -10
- package/dist/{dist-pxvIAJzo.js → dist-CR3FMRzF.js} +3 -3
- package/dist/{dist-BbX4Nrk2.js → dist-CgzF5_J6.js} +2 -2
- package/dist/{dist-AxOGvL82.js → dist-D5Q2IYuC.js} +3 -3
- package/dist/dist-D70ZJkHf.js +29 -0
- package/dist/{dist-DwxO2RoR.js → dist-DZ_SU77k.js} +82 -72
- package/dist/{dist-9WbMf_jT.js → dist-DcFwF4XM.js} +1 -1
- package/dist/{dist-iUAHw-3y.js → dist-Dg3vyTx9.js} +6 -6
- package/dist/{dist-ByCJijZd.js → dist-LRkZdylX.js} +4 -4
- package/dist/{dist-DO3apbIh.js → dist-f8EwfITY.js} +3 -3
- package/dist/dist-uerXivvM.js +178 -0
- package/dist/ellipsis-vertical-C_yX7aQe.js +31 -0
- package/dist/{es2015-CoHq2g4y.js → es2015-Hhb87ipX.js} +1 -1
- package/dist/hooks/index.js +8 -6
- package/dist/hooks/useIsHydrated/useIsHydrated.js +6 -0
- package/dist/hooks/useIsHydrated/utils/index.js +4 -0
- package/dist/hooks/useIsHydrated/utils/noop-subscribe/noop-subscribe.js +5 -0
- package/dist/hooks/useMediaQuery.js +1 -1
- package/dist/index.js +164 -149
- package/dist/lib/components/Command/components/CommandShortcut.d.ts +1 -1
- package/dist/lib/components/Command/contexts/Command.provider.d.ts +1 -1
- package/dist/lib/components/ImageUpload/ImageUpload.d.ts +1 -1
- package/dist/lib/components/Modal/contexts/Modal.provider.d.ts +1 -1
- package/dist/lib/components/Toast/Toast.d.ts +19 -14
- package/dist/lib/components/Toast/Toast.types.d.ts +62 -35
- package/dist/lib/components/Toast/Toast.variants.d.ts +16 -3
- package/dist/lib/components/Toast/ToastProvider.d.ts +11 -0
- package/dist/lib/components/Toast/ToastProvider.types.d.ts +17 -0
- package/dist/lib/components/Toast/components/ToastCard/ToastCard.d.ts +3 -0
- package/dist/lib/components/Toast/components/ToastCard/ToastCard.types.d.ts +17 -0
- package/dist/lib/components/Toast/components/index.d.ts +1 -0
- package/dist/lib/components/Toast/constants/index.d.ts +25 -0
- package/dist/lib/components/Toast/contexts/index.d.ts +1 -0
- package/dist/lib/components/Toast/contexts/toast-store.context.d.ts +2 -0
- package/dist/lib/components/Toast/hooks/index.d.ts +6 -0
- package/dist/lib/components/Toast/hooks/useStackExpansion/useStackExpansion.d.ts +2 -0
- package/dist/lib/components/Toast/hooks/useStackExpansion/useStackExpansion.types.d.ts +6 -0
- package/dist/lib/components/Toast/hooks/useToast/useToast.d.ts +2 -0
- package/dist/lib/components/Toast/hooks/useToastHeights/useToastHeights.d.ts +2 -0
- package/dist/lib/components/Toast/hooks/useToastHeights/useToastHeights.types.d.ts +6 -0
- package/dist/lib/components/Toast/hooks/useToastSource/useToastSource.d.ts +2 -0
- package/dist/lib/components/Toast/hooks/useToastSource/useToastSource.types.d.ts +11 -0
- package/dist/lib/components/Toast/hooks/useToastStore/useToastStore.d.ts +3 -0
- package/dist/lib/components/Toast/hooks/useToastTimer/useToastTimer.d.ts +2 -0
- package/dist/lib/components/Toast/hooks/useToastTimer/useToastTimer.types.d.ts +7 -0
- package/dist/lib/components/Toast/store/create-toast-store.d.ts +2 -0
- package/dist/lib/components/Toast/store/create-toast-store.types.d.ts +24 -0
- package/dist/lib/components/Toast/store/default-toast-store.d.ts +1 -0
- package/dist/lib/components/Toast/store/index.d.ts +2 -0
- package/dist/lib/components/Toast/utils/compute-stack-layout/compute-stack-layout.d.ts +2 -0
- package/dist/lib/components/Toast/utils/compute-stack-layout/compute-stack-layout.types.d.ts +12 -0
- package/dist/lib/components/Toast/utils/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/Actions.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/DotPaginate/DotPaginate.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/FormPaginate/FormPaginate.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/index.d.ts +8 -0
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/useIsHydrated/useIsHydrated.d.ts +1 -0
- package/dist/lib/hooks/useIsHydrated/utils/index.d.ts +1 -0
- package/dist/lib/hooks/useIsHydrated/utils/noop-subscribe/noop-subscribe.d.ts +1 -0
- package/dist/{libphonenumber-BMq3Thej.js → libphonenumber-DtibHRPP.js} +123 -114
- package/dist/package.json +28 -28
- package/dist/{phone-number.provider-Dkq_p1Gi.js → phone-number.provider-BASl9fGG.js} +2 -3
- package/dist/{react-DRLuFcbk.js → react-DpRKGbW_.js} +1935 -1841
- package/dist/styles.css +1 -1
- package/dist/{table.provider-CWzODR1t.js → table.provider-MQ4T5Xb5.js} +2 -2
- package/dist/{theme.provider-CSL1WCYG.js → theme.provider-CvL6sqHq.js} +1 -1
- package/dist/{useBreadcrumb-Ds_9BeFz.js → useBreadcrumb-BvP9cgD8.js} +580 -545
- package/dist/utils/index.js +1 -1
- package/dist/{utils-B-6R7kNE.js → utils-DnIJruo0.js} +208 -129
- package/dist/x-C8O1IsaM.js +17 -0
- package/dist/{x-Ierxf0uI.js → x-Vur_9PXW.js} +1 -2
- package/package.json +28 -28
- package/dist/AnimatePresence-C5PSMIZj.js +0 -186
- package/dist/FlagSelectorList-tYZNl-tz.js +0 -863
- package/dist/Loading-DO8JOWBV.js +0 -18
- package/dist/StepIndicatorContent-BGDvxLzV.js +0 -30
- package/dist/Toast-jSx3Lao8.js +0 -461
- package/dist/chevron-down-DNP-OOAQ.js +0 -8
- package/dist/chevron-left-DxGDBBKA.js +0 -8
- package/dist/chevron-right-CDwgDdp-.js +0 -8
- package/dist/chevron-up-Bjpvg6ui.js +0 -8
- package/dist/createLucideIcon-MbzNWCaI.js +0 -42
- package/dist/dist-D5XYRjmR.js +0 -15
- package/dist/dist-DGOjiAnB.js +0 -14
- package/dist/dist-DKryKPmP.js +0 -193
- package/dist/dist-DYIabsrY.js +0 -17
- package/dist/ellipsis-vertical-BBmhzIXn.js +0 -24
- package/dist/x-a_LpoXzG.js +0 -11
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as l from "react";
|
|
2
|
-
var
|
|
3
|
-
function
|
|
2
|
+
var he = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, rt = /^[\\/]{2}/;
|
|
3
|
+
function nt(e, t) {
|
|
4
4
|
return t + e.replace(/\\/g, "/");
|
|
5
5
|
}
|
|
6
6
|
function E(e, t) {
|
|
7
7
|
if (e === !1 || e === null || typeof e > "u") throw new Error(t);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function L(e, t) {
|
|
10
10
|
if (!e) {
|
|
11
11
|
typeof console < "u" && console.warn(t);
|
|
12
12
|
try {
|
|
@@ -15,7 +15,7 @@ function $(e, t) {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Z({ pathname: e = "/", search: t = "", hash: r = "" }) {
|
|
19
19
|
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
|
|
20
20
|
}
|
|
21
21
|
function B(e) {
|
|
@@ -28,19 +28,19 @@ function B(e) {
|
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
30
|
}
|
|
31
|
-
var
|
|
32
|
-
|
|
31
|
+
var at;
|
|
32
|
+
at = /* @__PURE__ */ new WeakMap();
|
|
33
33
|
function $e(e, t, r = "/") {
|
|
34
|
-
return
|
|
34
|
+
return ke(e, t, r, !1);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function ke(e, t, r, n, a) {
|
|
37
37
|
let o = _((typeof t == "string" ? B(t) : t).pathname || "/", r);
|
|
38
38
|
if (o == null) return null;
|
|
39
|
-
let i = a ??
|
|
40
|
-
for (let c = 0;
|
|
41
|
-
return
|
|
39
|
+
let i = a ?? lt(e), s = null, u = yt(o);
|
|
40
|
+
for (let c = 0; s == null && c < i.length; ++c) s = gt(i[c], u, n);
|
|
41
|
+
return s;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ot(e, t) {
|
|
44
44
|
let { route: r, pathname: n, params: a } = e;
|
|
45
45
|
return {
|
|
46
46
|
id: r.id,
|
|
@@ -51,128 +51,128 @@ function tt(e, t) {
|
|
|
51
51
|
handle: r.handle
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
let t =
|
|
56
|
-
return
|
|
54
|
+
function lt(e) {
|
|
55
|
+
let t = _e(e);
|
|
56
|
+
return it(t), t;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
let o = (i,
|
|
58
|
+
function _e(e, t = [], r = [], n = "", a = !1) {
|
|
59
|
+
let o = (i, s, u = a, c) => {
|
|
60
60
|
let f = {
|
|
61
61
|
relativePath: c === void 0 ? i.path || "" : c,
|
|
62
62
|
caseSensitive: i.caseSensitive === !0,
|
|
63
|
-
childrenIndex:
|
|
63
|
+
childrenIndex: s,
|
|
64
64
|
route: i
|
|
65
65
|
};
|
|
66
66
|
if (f.relativePath.startsWith("/")) {
|
|
67
|
-
if (!f.relativePath.startsWith(n) &&
|
|
67
|
+
if (!f.relativePath.startsWith(n) && u) return;
|
|
68
68
|
E(f.relativePath.startsWith(n), `Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), f.relativePath = f.relativePath.slice(n.length);
|
|
69
69
|
}
|
|
70
70
|
let d = k([n, f.relativePath]), h = r.concat(f);
|
|
71
|
-
i.children && i.children.length > 0 && (E(i.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${d}".`),
|
|
71
|
+
i.children && i.children.length > 0 && (E(i.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${d}".`), _e(i.children, t, h, d, u)), !(i.path == null && !i.index) && t.push({
|
|
72
72
|
path: d,
|
|
73
|
-
score:
|
|
74
|
-
routesMeta: h.map((p,
|
|
75
|
-
let [
|
|
73
|
+
score: mt(d, i.index),
|
|
74
|
+
routesMeta: h.map((p, y) => {
|
|
75
|
+
let [g, m] = Me(p.relativePath, p.caseSensitive, y === h.length - 1);
|
|
76
76
|
return {
|
|
77
77
|
...p,
|
|
78
|
-
matcher:
|
|
78
|
+
matcher: g,
|
|
79
79
|
compiledParams: m
|
|
80
80
|
};
|
|
81
81
|
})
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
|
-
return e.forEach((i,
|
|
85
|
-
if (i.path === "" || !i.path?.includes("?")) o(i,
|
|
86
|
-
else for (let
|
|
84
|
+
return e.forEach((i, s) => {
|
|
85
|
+
if (i.path === "" || !i.path?.includes("?")) o(i, s);
|
|
86
|
+
else for (let u of Oe(i.path)) o(i, s, !0, u);
|
|
87
87
|
}), t;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Oe(e) {
|
|
90
90
|
let t = e.split("/");
|
|
91
91
|
if (t.length === 0) return [];
|
|
92
92
|
let [r, ...n] = t, a = r.endsWith("?"), o = r.replace(/\?$/, "");
|
|
93
93
|
if (n.length === 0) return a ? [o, ""] : [o];
|
|
94
|
-
let i =
|
|
95
|
-
return
|
|
94
|
+
let i = Oe(n.join("/")), s = [];
|
|
95
|
+
return s.push(...i.map((u) => u === "" ? o : [o, u].join("/"))), a && s.push(...i), s.map((u) => e.startsWith("/") && u === "" ? "/" : u);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
e.sort((t, r) => t.score !== r.score ? r.score - t.score :
|
|
97
|
+
function it(e) {
|
|
98
|
+
e.sort((t, r) => t.score !== r.score ? r.score - t.score : pt(t.routesMeta.map((n) => n.childrenIndex), r.routesMeta.map((n) => n.childrenIndex)));
|
|
99
99
|
}
|
|
100
|
-
var
|
|
101
|
-
function
|
|
100
|
+
var st = /^:[\w-]+$/, ut = 3, ct = 2, dt = 1, ft = 10, ht = -2, Re = (e) => e === "*";
|
|
101
|
+
function mt(e, t) {
|
|
102
102
|
let r = e.split("/"), n = r.length;
|
|
103
|
-
return r.some(Re) && (n +=
|
|
103
|
+
return r.some(Re) && (n += ht), t && (n += ct), r.filter((a) => !Re(a)).reduce((a, o) => a + (st.test(o) ? ut : o === "" ? dt : ft), n);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function pt(e, t) {
|
|
106
106
|
return e.length === t.length && e.slice(0, -1).every((r, n) => r === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function gt(e, t, r = !1) {
|
|
109
109
|
let { routesMeta: n } = e, a = {}, o = "/", i = [];
|
|
110
|
-
for (let
|
|
111
|
-
let
|
|
112
|
-
path:
|
|
113
|
-
caseSensitive:
|
|
110
|
+
for (let s = 0; s < n.length; ++s) {
|
|
111
|
+
let u = n[s], c = s === n.length - 1, f = o === "/" ? t : t.slice(o.length) || "/", d = {
|
|
112
|
+
path: u.relativePath,
|
|
113
|
+
caseSensitive: u.caseSensitive,
|
|
114
114
|
end: c
|
|
115
|
-
}, h =
|
|
116
|
-
if (!h && c && r && !n[n.length - 1].route.index && (h =
|
|
117
|
-
path:
|
|
118
|
-
caseSensitive:
|
|
115
|
+
}, h = u.matcher && u.compiledParams ? Te(d, f, u.matcher, u.compiledParams) : ee(d, f), p = u.route;
|
|
116
|
+
if (!h && c && r && !n[n.length - 1].route.index && (h = ee({
|
|
117
|
+
path: u.relativePath,
|
|
118
|
+
caseSensitive: u.caseSensitive,
|
|
119
119
|
end: !1
|
|
120
120
|
}, f)), !h) return null;
|
|
121
121
|
Object.assign(a, h.params), i.push({
|
|
122
122
|
params: a,
|
|
123
123
|
pathname: k([o, h.pathname]),
|
|
124
|
-
pathnameBase:
|
|
124
|
+
pathnameBase: Rt(k([o, h.pathnameBase])),
|
|
125
125
|
route: p
|
|
126
126
|
}), h.pathnameBase !== "/" && (o = k([o, h.pathnameBase]));
|
|
127
127
|
}
|
|
128
128
|
return i;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function ee(e, t) {
|
|
131
131
|
typeof e == "string" && (e = {
|
|
132
132
|
path: e,
|
|
133
133
|
caseSensitive: !1,
|
|
134
134
|
end: !0
|
|
135
135
|
});
|
|
136
|
-
let [r, n] =
|
|
137
|
-
return
|
|
136
|
+
let [r, n] = Me(e.path, e.caseSensitive, e.end);
|
|
137
|
+
return Te(e, t, r, n);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Te(e, t, r, n) {
|
|
140
140
|
let a = t.match(r);
|
|
141
141
|
if (!a) return null;
|
|
142
|
-
let o = a[0], i = o
|
|
142
|
+
let o = a[0], i = W(o, 1), s = a.slice(1);
|
|
143
143
|
return {
|
|
144
|
-
params: n.reduce((
|
|
144
|
+
params: n.reduce((u, { paramName: c, isOptional: f }, d) => {
|
|
145
145
|
if (c === "*") {
|
|
146
|
-
let p =
|
|
147
|
-
i = o.slice(0, o.length - p.length)
|
|
146
|
+
let p = s[d] || "";
|
|
147
|
+
i = W(o.slice(0, o.length - p.length), 1);
|
|
148
148
|
}
|
|
149
|
-
const h =
|
|
150
|
-
return f && !h ?
|
|
149
|
+
const h = s[d];
|
|
150
|
+
return f && !h ? u[c] = void 0 : u[c] = (h || "").replace(/%2F/g, "/"), u;
|
|
151
151
|
}, {}),
|
|
152
152
|
pathname: o,
|
|
153
153
|
pathnameBase: i,
|
|
154
154
|
pattern: e
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
let n = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (o, i,
|
|
157
|
+
function Me(e, t = !1, r = !0) {
|
|
158
|
+
L(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
|
|
159
|
+
let n = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (o, i, s, u, c) => {
|
|
160
160
|
if (n.push({
|
|
161
161
|
paramName: i,
|
|
162
|
-
isOptional:
|
|
163
|
-
}),
|
|
164
|
-
let f = c.charAt(
|
|
162
|
+
isOptional: s != null
|
|
163
|
+
}), s) {
|
|
164
|
+
let f = c.charAt(u + o.length);
|
|
165
165
|
return f && f !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
|
|
166
166
|
}
|
|
167
167
|
return "/([^\\/]+)";
|
|
168
168
|
}).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
169
169
|
return e.endsWith("*") ? (n.push({ paramName: "*" }), a += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? a += "\\/*$" : e !== "" && e !== "/" && (a += "(?:(?=\\/|$))"), [new RegExp(a, t ? void 0 : "i"), n];
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function yt(e) {
|
|
172
172
|
try {
|
|
173
173
|
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
174
174
|
} catch (t) {
|
|
175
|
-
return
|
|
175
|
+
return L(!1, `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`), e;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
function _(e, t) {
|
|
@@ -181,35 +181,35 @@ function _(e, t) {
|
|
|
181
181
|
let r = t.endsWith("/") ? t.length - 1 : t.length, n = e.charAt(r);
|
|
182
182
|
return n && n !== "/" ? null : e.slice(r) || "/";
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function vt(e, t = "/") {
|
|
185
185
|
let { pathname: r, search: n = "", hash: a = "" } = typeof e == "string" ? B(e) : e, o;
|
|
186
|
-
return r ? (r =
|
|
186
|
+
return r ? (r = Ie(r), r.startsWith("/") || r.startsWith("\\") ? o = Ee(r.substring(1), "/") : o = Ee(r, t)) : o = t, {
|
|
187
187
|
pathname: o,
|
|
188
|
-
search:
|
|
189
|
-
hash:
|
|
188
|
+
search: Et(n),
|
|
189
|
+
hash: St(a)
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
let r =
|
|
192
|
+
function Ee(e, t) {
|
|
193
|
+
let r = W(t).split("/");
|
|
194
194
|
return e.split("/").forEach((n) => {
|
|
195
195
|
n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
|
|
196
196
|
}), r.length > 1 ? r.join("/") : "/";
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function le(e, t, r, n) {
|
|
199
199
|
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function wt(e) {
|
|
202
202
|
return e.filter((t, r) => r === 0 || t.route.path && t.route.path.length > 0);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
let t =
|
|
204
|
+
function Ne(e) {
|
|
205
|
+
let t = wt(e);
|
|
206
206
|
return t.map((r, n) => n === t.length - 1 ? r.pathname : r.pathnameBase);
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function me(e, t, r, n = !1) {
|
|
209
209
|
let a;
|
|
210
|
-
typeof e == "string" ? a = B(e) : (a = { ...e }, E(!a.pathname || !a.pathname.includes("?"),
|
|
211
|
-
let o = e === "" || a.pathname === "", i = o ? "/" : a.pathname,
|
|
212
|
-
if (i == null)
|
|
210
|
+
typeof e == "string" ? a = B(e) : (a = { ...e }, E(!a.pathname || !a.pathname.includes("?"), le("?", "pathname", "search", a)), E(!a.pathname || !a.pathname.includes("#"), le("#", "pathname", "hash", a)), E(!a.search || !a.search.includes("#"), le("#", "search", "hash", a)));
|
|
211
|
+
let o = e === "" || a.pathname === "", i = o ? "/" : a.pathname, s;
|
|
212
|
+
if (i == null) s = r;
|
|
213
213
|
else {
|
|
214
214
|
let d = t.length - 1;
|
|
215
215
|
if (!n && i.startsWith("..")) {
|
|
@@ -218,36 +218,42 @@ function he(e, t, r, n = !1) {
|
|
|
218
218
|
h.shift(), d -= 1;
|
|
219
219
|
a.pathname = h.join("/");
|
|
220
220
|
}
|
|
221
|
-
|
|
221
|
+
s = d >= 0 ? t[d] : "/";
|
|
222
222
|
}
|
|
223
|
-
let
|
|
224
|
-
return !
|
|
223
|
+
let u = vt(a, s), c = i && i !== "/" && i.endsWith("/"), f = (o || i === ".") && r.endsWith("/");
|
|
224
|
+
return !u.pathname.endsWith("/") && (c || f) && (u.pathname += "/"), u;
|
|
225
|
+
}
|
|
226
|
+
var Ie = (e) => e.replace(/[\\/]{2,}/g, "/"), k = (e) => Ie(e.join("/"));
|
|
227
|
+
function W(e, t = 0) {
|
|
228
|
+
let r = e.length;
|
|
229
|
+
for (; r > t && e.charCodeAt(r - 1) === 47; ) r--;
|
|
230
|
+
return r === e.length ? e : e.slice(0, r);
|
|
225
231
|
}
|
|
226
|
-
var
|
|
232
|
+
var Rt = (e) => W(e).replace(/^\/*/, "/"), Et = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, St = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, xt = class {
|
|
227
233
|
constructor(e, t, r, n = !1) {
|
|
228
234
|
this.status = e, this.statusText = t || "", this.internal = n, r instanceof Error ? (this.data = r.toString(), this.error = r) : this.data = r;
|
|
229
235
|
}
|
|
230
236
|
};
|
|
231
|
-
function
|
|
237
|
+
function De(e) {
|
|
232
238
|
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
233
239
|
}
|
|
234
|
-
function
|
|
240
|
+
function Ct(e) {
|
|
235
241
|
return k(e.map((t) => t.route.path).filter(Boolean)) || "/";
|
|
236
242
|
}
|
|
237
|
-
var
|
|
238
|
-
function
|
|
243
|
+
var Fe = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
244
|
+
function Ae(e, t) {
|
|
239
245
|
let r = e;
|
|
240
|
-
if (typeof r != "string" || !
|
|
246
|
+
if (typeof r != "string" || !he.test(r)) return {
|
|
241
247
|
absoluteURL: void 0,
|
|
242
248
|
isExternal: !1,
|
|
243
249
|
to: r
|
|
244
250
|
};
|
|
245
251
|
let n = r, a = !1;
|
|
246
|
-
if (
|
|
247
|
-
let o = new URL(window.location.href), i =
|
|
248
|
-
i.origin === o.origin &&
|
|
252
|
+
if (Fe) try {
|
|
253
|
+
let o = new URL(window.location.href), i = rt.test(r) ? new URL(nt(r, o.protocol)) : new URL(r), s = _(i.pathname, t);
|
|
254
|
+
i.origin === o.origin && s != null ? r = s + i.search + i.hash : a = !0;
|
|
249
255
|
} catch {
|
|
250
|
-
|
|
256
|
+
L(!1, `<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
|
|
251
257
|
}
|
|
252
258
|
return {
|
|
253
259
|
absoluteURL: n,
|
|
@@ -255,17 +261,46 @@ function De(e, t) {
|
|
|
255
261
|
to: r
|
|
256
262
|
};
|
|
257
263
|
}
|
|
258
|
-
var
|
|
264
|
+
var Vr = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"), Se = new URL("http://localhost");
|
|
265
|
+
function We(e) {
|
|
266
|
+
if (e.createURL) return e.createURL("/");
|
|
267
|
+
try {
|
|
268
|
+
return new URL(e.createHref("/"), Se);
|
|
269
|
+
} catch {
|
|
270
|
+
return Se;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function ie(e, t) {
|
|
274
|
+
return e.origin === t.origin && (e.origin !== "null" || e.protocol === t.protocol && e.host === t.host);
|
|
275
|
+
}
|
|
276
|
+
function bt(e, t) {
|
|
277
|
+
if (e.startsWith("//")) return !0;
|
|
278
|
+
let r = t.protocol.toLowerCase();
|
|
279
|
+
return e.toLowerCase().startsWith(r) ? t.host === "" || e.slice(r.length).startsWith("//") : !1;
|
|
280
|
+
}
|
|
281
|
+
function He(e, t, r, n) {
|
|
282
|
+
let a = null;
|
|
283
|
+
try {
|
|
284
|
+
a = e == null ? null : new URL(e, r);
|
|
285
|
+
} catch {
|
|
286
|
+
}
|
|
287
|
+
let o = new URL(t, r), i = a != null && !ie(a, r), s = !ie(o, r);
|
|
288
|
+
if (n === "reject") {
|
|
289
|
+
if (i || s) throw new Error("External navigation is not allowed");
|
|
290
|
+
} else if (s && (a == null || !bt(e, a) || !ie(a, o)))
|
|
291
|
+
throw new Error("External navigation is not allowed");
|
|
292
|
+
}
|
|
293
|
+
var Ue = [
|
|
259
294
|
"POST",
|
|
260
295
|
"PUT",
|
|
261
296
|
"PATCH",
|
|
262
297
|
"DELETE"
|
|
263
|
-
],
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
var
|
|
298
|
+
], zr = new Set(Ue), Lt = ["GET", ...Ue], Yr = new Set(Lt), Pt, $t, kt, _t;
|
|
299
|
+
Pt = /* @__PURE__ */ new WeakMap();
|
|
300
|
+
$t = /* @__PURE__ */ new WeakMap();
|
|
301
|
+
kt = /* @__PURE__ */ new WeakMap();
|
|
302
|
+
_t = /* @__PURE__ */ new WeakMap();
|
|
303
|
+
var Ot = [
|
|
269
304
|
"about:",
|
|
270
305
|
"blob:",
|
|
271
306
|
"chrome:",
|
|
@@ -277,90 +312,90 @@ var $t = [
|
|
|
277
312
|
"filesystem:",
|
|
278
313
|
"javascript:"
|
|
279
314
|
];
|
|
280
|
-
function
|
|
315
|
+
function Tt(e) {
|
|
281
316
|
try {
|
|
282
|
-
return
|
|
317
|
+
return Ot.includes(new URL(e).protocol);
|
|
283
318
|
} catch {
|
|
284
319
|
return !1;
|
|
285
320
|
}
|
|
286
321
|
}
|
|
287
|
-
var
|
|
288
|
-
|
|
289
|
-
var U = l.createContext(null);
|
|
290
|
-
U.displayName = "DataRouterState";
|
|
291
|
-
var Ae = l.createContext(!1);
|
|
292
|
-
function We() {
|
|
293
|
-
return l.useContext(Ae);
|
|
294
|
-
}
|
|
295
|
-
var He = l.createContext({ isTransitioning: !1 });
|
|
296
|
-
He.displayName = "ViewTransition";
|
|
297
|
-
var Lt = l.createContext(/* @__PURE__ */ new Map());
|
|
298
|
-
Lt.displayName = "Fetchers";
|
|
299
|
-
var se = l.createContext(null);
|
|
300
|
-
se.displayName = "Await";
|
|
301
|
-
var C = l.createContext(null);
|
|
302
|
-
C.displayName = "Navigation";
|
|
322
|
+
var H = l.createContext(null);
|
|
323
|
+
H.displayName = "DataRouter";
|
|
303
324
|
var j = l.createContext(null);
|
|
304
|
-
j.displayName = "
|
|
305
|
-
var
|
|
325
|
+
j.displayName = "DataRouterState";
|
|
326
|
+
var Be = l.createContext(!1);
|
|
327
|
+
function je() {
|
|
328
|
+
return l.useContext(Be);
|
|
329
|
+
}
|
|
330
|
+
var Je = l.createContext({ isTransitioning: !1 });
|
|
331
|
+
Je.displayName = "ViewTransition";
|
|
332
|
+
var Mt = l.createContext(/* @__PURE__ */ new Map());
|
|
333
|
+
Mt.displayName = "Fetchers";
|
|
334
|
+
var ce = l.createContext(null);
|
|
335
|
+
ce.displayName = "Await";
|
|
336
|
+
var b = l.createContext(null);
|
|
337
|
+
b.displayName = "Navigation";
|
|
338
|
+
var J = l.createContext(null);
|
|
339
|
+
J.displayName = "Location";
|
|
340
|
+
var T = l.createContext({
|
|
306
341
|
outlet: null,
|
|
307
342
|
matches: [],
|
|
308
343
|
isDataRoute: !1
|
|
309
344
|
});
|
|
310
|
-
|
|
311
|
-
var
|
|
312
|
-
|
|
313
|
-
var
|
|
314
|
-
function
|
|
315
|
-
if (e.startsWith(`${
|
|
345
|
+
T.displayName = "Route";
|
|
346
|
+
var pe = l.createContext(null);
|
|
347
|
+
pe.displayName = "RouteError";
|
|
348
|
+
var Ve = "REACT_ROUTER_ERROR", Nt = "REDIRECT", It = "ROUTE_ERROR_RESPONSE";
|
|
349
|
+
function Dt(e) {
|
|
350
|
+
if (e.startsWith(`${Ve}:${Nt}:{`)) try {
|
|
316
351
|
let t = JSON.parse(e.slice(28));
|
|
317
352
|
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
|
|
318
353
|
} catch {
|
|
319
354
|
}
|
|
320
355
|
}
|
|
321
|
-
function
|
|
322
|
-
if (e.startsWith(`${
|
|
356
|
+
function Ft(e) {
|
|
357
|
+
if (e.startsWith(`${Ve}:${It}:{`)) try {
|
|
323
358
|
let t = JSON.parse(e.slice(40));
|
|
324
|
-
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new
|
|
359
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new xt(t.status, t.statusText, t.data);
|
|
325
360
|
} catch {
|
|
326
361
|
}
|
|
327
362
|
}
|
|
328
|
-
function
|
|
329
|
-
E(
|
|
330
|
-
let { basename: r, navigator: n } = l.useContext(
|
|
331
|
-
return r !== "/" && (
|
|
332
|
-
pathname:
|
|
363
|
+
function At(e, { relative: t } = {}) {
|
|
364
|
+
E(V(), "useHref() may be used only in the context of a <Router> component.");
|
|
365
|
+
let { basename: r, navigator: n } = l.useContext(b), { hash: a, pathname: o, search: i } = z(e, { relative: t }), s = o;
|
|
366
|
+
return r !== "/" && (s = o === "/" ? r : k([r, o])), n.createHref({
|
|
367
|
+
pathname: s,
|
|
333
368
|
search: i,
|
|
334
369
|
hash: a
|
|
335
370
|
});
|
|
336
371
|
}
|
|
337
|
-
function
|
|
338
|
-
return l.useContext(
|
|
372
|
+
function V() {
|
|
373
|
+
return l.useContext(J) != null;
|
|
339
374
|
}
|
|
340
375
|
function P() {
|
|
341
|
-
return E(
|
|
376
|
+
return E(V(), "useLocation() may be used only in the context of a <Router> component."), l.useContext(J).location;
|
|
342
377
|
}
|
|
343
|
-
var
|
|
344
|
-
function
|
|
345
|
-
l.useContext(
|
|
378
|
+
var ze = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
379
|
+
function Ye(e) {
|
|
380
|
+
l.useContext(b).static || l.useLayoutEffect(e);
|
|
346
381
|
}
|
|
347
|
-
function
|
|
348
|
-
let { isDataRoute: e } = l.useContext(
|
|
349
|
-
return e ?
|
|
382
|
+
function Wt() {
|
|
383
|
+
let { isDataRoute: e } = l.useContext(T);
|
|
384
|
+
return e ? Qt() : Ht();
|
|
350
385
|
}
|
|
351
|
-
function
|
|
352
|
-
E(
|
|
353
|
-
let e = l.useContext(
|
|
354
|
-
return
|
|
386
|
+
function Ht() {
|
|
387
|
+
E(V(), "useNavigate() may be used only in the context of a <Router> component.");
|
|
388
|
+
let e = l.useContext(H), { basename: t, navigator: r } = l.useContext(b), { matches: n } = l.useContext(T), { pathname: a } = P(), o = JSON.stringify(Ne(n)), i = l.useRef(!1);
|
|
389
|
+
return Ye(() => {
|
|
355
390
|
i.current = !0;
|
|
356
|
-
}), l.useCallback((
|
|
357
|
-
if (
|
|
358
|
-
if (typeof
|
|
359
|
-
r.go(
|
|
391
|
+
}), l.useCallback((s, u = {}) => {
|
|
392
|
+
if (L(i.current, ze), !i.current) return;
|
|
393
|
+
if (typeof s == "number") {
|
|
394
|
+
r.go(s);
|
|
360
395
|
return;
|
|
361
396
|
}
|
|
362
|
-
let c =
|
|
363
|
-
e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : k([t, c.pathname])), (s.replace ? r.replace : r.push)(c,
|
|
397
|
+
let c = me(s, JSON.parse(o), a, u.relative === "path");
|
|
398
|
+
e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : k([t, c.pathname])), He(typeof s == "string" ? s : Z(s), r.createHref(c), We(r), "reject"), (u.replace ? r.replace : r.push)(c, u.state, u);
|
|
364
399
|
}, [
|
|
365
400
|
t,
|
|
366
401
|
r,
|
|
@@ -369,43 +404,43 @@ function It() {
|
|
|
369
404
|
e
|
|
370
405
|
]);
|
|
371
406
|
}
|
|
372
|
-
var
|
|
407
|
+
var Gr = l.createContext(null);
|
|
373
408
|
function z(e, { relative: t } = {}) {
|
|
374
|
-
let { matches: r } = l.useContext(
|
|
375
|
-
return l.useMemo(() =>
|
|
409
|
+
let { matches: r } = l.useContext(T), { pathname: n } = P(), a = JSON.stringify(Ne(r));
|
|
410
|
+
return l.useMemo(() => me(e, JSON.parse(a), n, t === "path"), [
|
|
376
411
|
e,
|
|
377
412
|
a,
|
|
378
413
|
n,
|
|
379
414
|
t
|
|
380
415
|
]);
|
|
381
416
|
}
|
|
382
|
-
function
|
|
383
|
-
E(
|
|
384
|
-
let { navigator: n } = l.useContext(
|
|
417
|
+
function Ut(e, t, r) {
|
|
418
|
+
E(V(), "useRoutes() may be used only in the context of a <Router> component.");
|
|
419
|
+
let { navigator: n } = l.useContext(b), { matches: a } = l.useContext(T), o = a[a.length - 1], i = o ? o.params : {}, s = o ? o.pathname : "/", u = o ? o.pathnameBase : "/", c = o && o.route;
|
|
385
420
|
{
|
|
386
421
|
let m = c && c.path || "";
|
|
387
|
-
|
|
422
|
+
Xe(s, !c || m.endsWith("*") || m.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
388
423
|
|
|
389
424
|
Please change the parent <Route path="${m}"> to <Route path="${m === "/" ? "*" : `${m}/*`}">.`);
|
|
390
425
|
}
|
|
391
426
|
let f = P(), d;
|
|
392
427
|
if (t) {
|
|
393
428
|
let m = typeof t == "string" ? B(t) : t;
|
|
394
|
-
E(
|
|
429
|
+
E(u === "/" || m.pathname?.startsWith(u), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${m.pathname}" was given in the \`location\` prop.`), d = m;
|
|
395
430
|
} else d = f;
|
|
396
431
|
let h = d.pathname || "/", p = h;
|
|
397
|
-
if (
|
|
398
|
-
let m =
|
|
432
|
+
if (u !== "/") {
|
|
433
|
+
let m = u.replace(/^\//, "").split("/");
|
|
399
434
|
p = "/" + h.replace(/^\//, "").split("/").slice(m.length).join("/");
|
|
400
435
|
}
|
|
401
|
-
let
|
|
402
|
-
|
|
403
|
-
let
|
|
436
|
+
let y = r && r.state.matches.length ? r.state.matches.map((m) => Object.assign(m, { route: r.manifest[m.route.id] || m.route })) : $e(e, { pathname: p });
|
|
437
|
+
L(c || y != null, `No routes matched location "${d.pathname}${d.search}${d.hash}" `), L(y == null || y[y.length - 1].route.element !== void 0 || y[y.length - 1].route.Component !== void 0 || y[y.length - 1].route.lazy !== void 0, `Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
|
|
438
|
+
let g = zt(y && y.map((m) => Object.assign({}, m, {
|
|
404
439
|
params: Object.assign({}, i, m.params),
|
|
405
|
-
pathname: k([
|
|
406
|
-
pathnameBase: m.pathnameBase === "/" ?
|
|
440
|
+
pathname: k([u, n.encodeLocation ? n.encodeLocation(m.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : m.pathname]),
|
|
441
|
+
pathnameBase: m.pathnameBase === "/" ? u : k([u, n.encodeLocation ? n.encodeLocation(m.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : m.pathnameBase])
|
|
407
442
|
})), a, r);
|
|
408
|
-
return t &&
|
|
443
|
+
return t && g ? /* @__PURE__ */ l.createElement(J.Provider, { value: {
|
|
409
444
|
location: {
|
|
410
445
|
pathname: "/",
|
|
411
446
|
search: "",
|
|
@@ -416,10 +451,10 @@ Please change the parent <Route path="${m}"> to <Route path="${m === "/" ? "*" :
|
|
|
416
451
|
...d
|
|
417
452
|
},
|
|
418
453
|
navigationType: "POP"
|
|
419
|
-
} },
|
|
454
|
+
} }, g) : g;
|
|
420
455
|
}
|
|
421
|
-
function
|
|
422
|
-
let e =
|
|
456
|
+
function Bt() {
|
|
457
|
+
let e = Kt(), t = De(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, n = "rgba(200,200,200, 0.5)", a = {
|
|
423
458
|
padding: "0.5rem",
|
|
424
459
|
backgroundColor: n
|
|
425
460
|
}, o = {
|
|
@@ -428,7 +463,7 @@ function Ft() {
|
|
|
428
463
|
}, i = null;
|
|
429
464
|
return console.error("Error handled by React Router default ErrorBoundary:", e), i = /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ l.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ l.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ l.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ l.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ l.createElement("pre", { style: a }, r) : null, i);
|
|
430
465
|
}
|
|
431
|
-
var
|
|
466
|
+
var jt = /* @__PURE__ */ l.createElement(Bt, null), Ge = class extends l.Component {
|
|
432
467
|
constructor(e) {
|
|
433
468
|
super(e), this.state = {
|
|
434
469
|
location: e.location,
|
|
@@ -456,46 +491,46 @@ var At = /* @__PURE__ */ l.createElement(Ft, null), Je = class extends l.Compone
|
|
|
456
491
|
render() {
|
|
457
492
|
let e = this.state.error;
|
|
458
493
|
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
459
|
-
const r =
|
|
494
|
+
const r = Ft(e.digest);
|
|
460
495
|
r && (e = r);
|
|
461
496
|
}
|
|
462
|
-
let t = e !== void 0 ? /* @__PURE__ */ l.createElement(
|
|
497
|
+
let t = e !== void 0 ? /* @__PURE__ */ l.createElement(T.Provider, { value: this.props.routeContext }, /* @__PURE__ */ l.createElement(pe.Provider, {
|
|
463
498
|
value: e,
|
|
464
499
|
children: this.props.component
|
|
465
500
|
})) : this.props.children;
|
|
466
|
-
return this.context ? /* @__PURE__ */ l.createElement(
|
|
501
|
+
return this.context ? /* @__PURE__ */ l.createElement(Jt, { error: e }, t) : t;
|
|
467
502
|
}
|
|
468
503
|
};
|
|
469
|
-
|
|
470
|
-
var
|
|
471
|
-
function
|
|
472
|
-
let { basename: r } = l.useContext(
|
|
504
|
+
Ge.contextType = Be;
|
|
505
|
+
var se = /* @__PURE__ */ new WeakMap();
|
|
506
|
+
function Jt({ children: e, error: t }) {
|
|
507
|
+
let { basename: r, navigator: n } = l.useContext(b);
|
|
473
508
|
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
474
|
-
let
|
|
475
|
-
if (
|
|
476
|
-
let
|
|
477
|
-
if (
|
|
478
|
-
let
|
|
479
|
-
if (
|
|
480
|
-
if (
|
|
481
|
-
if (
|
|
509
|
+
let a = Dt(t.digest);
|
|
510
|
+
if (a) {
|
|
511
|
+
let o = se.get(t);
|
|
512
|
+
if (o) throw o;
|
|
513
|
+
let i = Ae(a.location, r), s = i.absoluteURL || i.to;
|
|
514
|
+
if (He(a.location, s, We(n), "allow-explicit"), Tt(s)) throw new Error("Invalid redirect location");
|
|
515
|
+
if (Fe && !se.get(t))
|
|
516
|
+
if (i.isExternal || a.reloadDocument) window.location.href = s;
|
|
482
517
|
else {
|
|
483
|
-
const u = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(
|
|
484
|
-
throw
|
|
518
|
+
const u = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(i.to, { replace: a.replace }));
|
|
519
|
+
throw se.set(t, u), u;
|
|
485
520
|
}
|
|
486
521
|
return /* @__PURE__ */ l.createElement("meta", {
|
|
487
522
|
httpEquiv: "refresh",
|
|
488
|
-
content: `0;url=${
|
|
523
|
+
content: `0;url=${s}`
|
|
489
524
|
});
|
|
490
525
|
}
|
|
491
526
|
}
|
|
492
527
|
return e;
|
|
493
528
|
}
|
|
494
|
-
function
|
|
495
|
-
let n = l.useContext(
|
|
496
|
-
return n && n.static && n.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (n.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ l.createElement(
|
|
529
|
+
function Vt({ routeContext: e, match: t, children: r }) {
|
|
530
|
+
let n = l.useContext(H);
|
|
531
|
+
return n && n.static && n.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (n.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ l.createElement(T.Provider, { value: e }, r);
|
|
497
532
|
}
|
|
498
|
-
function
|
|
533
|
+
function zt(e, t = [], r) {
|
|
499
534
|
let n = r?.state;
|
|
500
535
|
if (e == null) {
|
|
501
536
|
if (!n) return null;
|
|
@@ -508,117 +543,117 @@ function Bt(e, t = [], r) {
|
|
|
508
543
|
let f = a.findIndex((d) => d.route.id && o?.[d.route.id] !== void 0);
|
|
509
544
|
E(f >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`), a = a.slice(0, Math.min(a.length, f + 1));
|
|
510
545
|
}
|
|
511
|
-
let i = !1,
|
|
546
|
+
let i = !1, s = -1;
|
|
512
547
|
if (r && n) {
|
|
513
548
|
i = n.renderFallback;
|
|
514
549
|
for (let f = 0; f < a.length; f++) {
|
|
515
550
|
let d = a[f];
|
|
516
|
-
if ((d.route.HydrateFallback || d.route.hydrateFallbackElement) && (
|
|
517
|
-
let { loaderData: h, errors: p } = n,
|
|
518
|
-
if (d.route.lazy ||
|
|
519
|
-
r.isStatic && (i = !0),
|
|
551
|
+
if ((d.route.HydrateFallback || d.route.hydrateFallbackElement) && (s = f), d.route.id) {
|
|
552
|
+
let { loaderData: h, errors: p } = n, y = d.route.loader && !h.hasOwnProperty(d.route.id) && (!p || p[d.route.id] === void 0);
|
|
553
|
+
if (d.route.lazy || y) {
|
|
554
|
+
r.isStatic && (i = !0), s >= 0 ? a = a.slice(0, s + 1) : a = [a[0]];
|
|
520
555
|
break;
|
|
521
556
|
}
|
|
522
557
|
}
|
|
523
558
|
}
|
|
524
559
|
}
|
|
525
|
-
let
|
|
526
|
-
|
|
560
|
+
let u = r?.onError, c = n && u ? (f, d) => {
|
|
561
|
+
u(f, {
|
|
527
562
|
location: n.location,
|
|
528
563
|
params: n.matches?.[0]?.params ?? {},
|
|
529
|
-
pattern:
|
|
564
|
+
pattern: Ct(n.matches),
|
|
530
565
|
errorInfo: d
|
|
531
566
|
});
|
|
532
567
|
} : void 0;
|
|
533
568
|
return a.reduceRight((f, d, h) => {
|
|
534
|
-
let p,
|
|
535
|
-
n && (p = o && d.route.id ? o[d.route.id] : void 0,
|
|
536
|
-
let
|
|
537
|
-
let
|
|
538
|
-
return p ?
|
|
569
|
+
let p, y = !1, g = null, m = null;
|
|
570
|
+
n && (p = o && d.route.id ? o[d.route.id] : void 0, g = d.route.errorElement || jt, i && (s < 0 && h === 0 ? (Xe("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), y = !0, m = null) : s === h && (y = !0, m = d.route.hydrateFallbackElement || null)));
|
|
571
|
+
let w = t.concat(a.slice(0, h + 1)), v = () => {
|
|
572
|
+
let R;
|
|
573
|
+
return p ? R = g : y ? R = m : d.route.Component ? R = /* @__PURE__ */ l.createElement(d.route.Component, null) : d.route.element ? R = d.route.element : R = f, /* @__PURE__ */ l.createElement(Vt, {
|
|
539
574
|
match: d,
|
|
540
575
|
routeContext: {
|
|
541
576
|
outlet: f,
|
|
542
|
-
matches:
|
|
577
|
+
matches: w,
|
|
543
578
|
isDataRoute: n != null
|
|
544
579
|
},
|
|
545
|
-
children:
|
|
580
|
+
children: R
|
|
546
581
|
});
|
|
547
582
|
};
|
|
548
|
-
return n && (d.route.ErrorBoundary || d.route.errorElement || h === 0) ? /* @__PURE__ */ l.createElement(
|
|
583
|
+
return n && (d.route.ErrorBoundary || d.route.errorElement || h === 0) ? /* @__PURE__ */ l.createElement(Ge, {
|
|
549
584
|
location: n.location,
|
|
550
585
|
revalidation: n.revalidation,
|
|
551
|
-
component:
|
|
586
|
+
component: g,
|
|
552
587
|
error: p,
|
|
553
588
|
children: v(),
|
|
554
589
|
routeContext: {
|
|
555
590
|
outlet: null,
|
|
556
|
-
matches:
|
|
591
|
+
matches: w,
|
|
557
592
|
isDataRoute: !0
|
|
558
593
|
},
|
|
559
594
|
onError: c
|
|
560
595
|
}) : v();
|
|
561
596
|
}, null);
|
|
562
597
|
}
|
|
563
|
-
function
|
|
598
|
+
function ge(e) {
|
|
564
599
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
565
600
|
}
|
|
566
|
-
function
|
|
567
|
-
let t = l.useContext(
|
|
568
|
-
return E(t,
|
|
601
|
+
function Yt(e) {
|
|
602
|
+
let t = l.useContext(H);
|
|
603
|
+
return E(t, ge(e)), t;
|
|
569
604
|
}
|
|
570
605
|
function ye(e) {
|
|
571
|
-
let t = l.useContext(
|
|
572
|
-
return E(t,
|
|
606
|
+
let t = l.useContext(j);
|
|
607
|
+
return E(t, ge(e)), t;
|
|
573
608
|
}
|
|
574
|
-
function
|
|
575
|
-
let t = l.useContext(
|
|
576
|
-
return E(t,
|
|
609
|
+
function Gt(e) {
|
|
610
|
+
let t = l.useContext(T);
|
|
611
|
+
return E(t, ge(e)), t;
|
|
577
612
|
}
|
|
578
|
-
function
|
|
579
|
-
let t =
|
|
613
|
+
function ve(e) {
|
|
614
|
+
let t = Gt(e), r = t.matches[t.matches.length - 1];
|
|
580
615
|
return E(r.route.id, `${e} can only be used on routes that contain a unique "id"`), r.route.id;
|
|
581
616
|
}
|
|
582
|
-
function
|
|
583
|
-
return
|
|
617
|
+
function qt() {
|
|
618
|
+
return ve("useRouteId");
|
|
584
619
|
}
|
|
585
|
-
function
|
|
620
|
+
function Xt() {
|
|
586
621
|
let e = ye("useNavigation");
|
|
587
622
|
return l.useMemo(() => {
|
|
588
623
|
let { matches: t, historyAction: r, ...n } = e.navigation;
|
|
589
624
|
return n;
|
|
590
625
|
}, [e.navigation]);
|
|
591
626
|
}
|
|
592
|
-
function
|
|
627
|
+
function qe() {
|
|
593
628
|
let { matches: e, loaderData: t } = ye("useMatches");
|
|
594
|
-
return l.useMemo(() => e.map((r) =>
|
|
629
|
+
return l.useMemo(() => e.map((r) => ot(r, t)), [e, t]);
|
|
595
630
|
}
|
|
596
|
-
function
|
|
597
|
-
let e = l.useContext(
|
|
631
|
+
function Kt() {
|
|
632
|
+
let e = l.useContext(pe), t = ye("useRouteError"), r = ve("useRouteError");
|
|
598
633
|
return e !== void 0 ? e : t.errors?.[r];
|
|
599
634
|
}
|
|
600
|
-
function
|
|
601
|
-
let { router: e } =
|
|
602
|
-
return
|
|
635
|
+
function Qt() {
|
|
636
|
+
let { router: e } = Yt("useNavigate"), t = ve("useNavigate"), r = l.useRef(!1);
|
|
637
|
+
return Ye(() => {
|
|
603
638
|
r.current = !0;
|
|
604
639
|
}), l.useCallback(async (n, a = {}) => {
|
|
605
|
-
|
|
640
|
+
L(r.current, ze), r.current && (typeof n == "number" ? await e.navigate(n) : await e.navigate(n, {
|
|
606
641
|
fromRouteId: t,
|
|
607
642
|
...a
|
|
608
643
|
}));
|
|
609
644
|
}, [e, t]);
|
|
610
645
|
}
|
|
611
|
-
var
|
|
612
|
-
function
|
|
613
|
-
!t && !
|
|
646
|
+
var xe = {};
|
|
647
|
+
function Xe(e, t, r) {
|
|
648
|
+
!t && !xe[e] && (xe[e] = !0, L(!1, r));
|
|
614
649
|
}
|
|
615
|
-
var
|
|
616
|
-
function
|
|
617
|
-
!e && !
|
|
650
|
+
var Ce = {};
|
|
651
|
+
function Zt(e, t) {
|
|
652
|
+
!e && !Ce[t] && (Ce[t] = !0, console.warn(t));
|
|
618
653
|
}
|
|
619
|
-
var
|
|
620
|
-
function
|
|
621
|
-
return
|
|
654
|
+
var qr = l.memo(er);
|
|
655
|
+
function er({ routes: e, manifest: t, future: r, state: n, isStatic: a, onError: o }) {
|
|
656
|
+
return Ut(e, void 0, {
|
|
622
657
|
manifest: t,
|
|
623
658
|
state: n,
|
|
624
659
|
isStatic: a,
|
|
@@ -626,23 +661,23 @@ function qt({ routes: e, manifest: t, future: r, state: n, isStatic: a, onError:
|
|
|
626
661
|
future: r
|
|
627
662
|
});
|
|
628
663
|
}
|
|
629
|
-
function
|
|
630
|
-
E(!
|
|
631
|
-
let
|
|
632
|
-
basename:
|
|
664
|
+
function tr({ basename: e = "/", children: t = null, location: r, navigationType: n = "POP", navigator: a, static: o = !1, useTransitions: i }) {
|
|
665
|
+
E(!V(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
|
|
666
|
+
let s = e.replace(/^\/*/, "/"), u = l.useMemo(() => ({
|
|
667
|
+
basename: s,
|
|
633
668
|
navigator: a,
|
|
634
669
|
static: o,
|
|
635
670
|
useTransitions: i,
|
|
636
671
|
future: {}
|
|
637
672
|
}), [
|
|
638
|
-
|
|
673
|
+
s,
|
|
639
674
|
a,
|
|
640
675
|
o,
|
|
641
676
|
i
|
|
642
677
|
]);
|
|
643
678
|
typeof r == "string" && (r = B(r));
|
|
644
|
-
let { pathname: c = "/", search: f = "", hash: d = "", state: h = null, key: p = "default", mask:
|
|
645
|
-
let m = _(c,
|
|
679
|
+
let { pathname: c = "/", search: f = "", hash: d = "", state: h = null, key: p = "default", mask: y } = r, g = l.useMemo(() => {
|
|
680
|
+
let m = _(c, s);
|
|
646
681
|
return m == null ? null : {
|
|
647
682
|
location: {
|
|
648
683
|
pathname: m,
|
|
@@ -650,26 +685,26 @@ function Xt({ basename: e = "/", children: t = null, location: r, navigationType
|
|
|
650
685
|
hash: d,
|
|
651
686
|
state: h,
|
|
652
687
|
key: p,
|
|
653
|
-
mask:
|
|
688
|
+
mask: y
|
|
654
689
|
},
|
|
655
690
|
navigationType: n
|
|
656
691
|
};
|
|
657
692
|
}, [
|
|
658
|
-
|
|
693
|
+
s,
|
|
659
694
|
c,
|
|
660
695
|
f,
|
|
661
696
|
d,
|
|
662
697
|
h,
|
|
663
698
|
p,
|
|
664
699
|
n,
|
|
665
|
-
|
|
700
|
+
y
|
|
666
701
|
]);
|
|
667
|
-
return
|
|
702
|
+
return L(g != null, `<Router basename="${s}"> is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the <Router> won't render anything.`), g == null ? null : /* @__PURE__ */ l.createElement(b.Provider, { value: u }, /* @__PURE__ */ l.createElement(J.Provider, {
|
|
668
703
|
children: t,
|
|
669
|
-
value:
|
|
704
|
+
value: g
|
|
670
705
|
}));
|
|
671
706
|
}
|
|
672
|
-
var
|
|
707
|
+
var Xr = class extends l.Component {
|
|
673
708
|
constructor(e) {
|
|
674
709
|
super(e), this.state = { error: null };
|
|
675
710
|
}
|
|
@@ -692,62 +727,62 @@ var zr = class extends l.Component {
|
|
|
692
727
|
this.props.onError?.(o), Object.defineProperty(r, "_error", { get: () => o });
|
|
693
728
|
}));
|
|
694
729
|
if (a === 2 && !t) throw n._error;
|
|
695
|
-
if (a === 2) return /* @__PURE__ */ l.createElement(
|
|
730
|
+
if (a === 2) return /* @__PURE__ */ l.createElement(ce.Provider, {
|
|
696
731
|
value: n,
|
|
697
732
|
children: t
|
|
698
733
|
});
|
|
699
|
-
if (a === 1) return /* @__PURE__ */ l.createElement(
|
|
734
|
+
if (a === 1) return /* @__PURE__ */ l.createElement(ce.Provider, {
|
|
700
735
|
value: n,
|
|
701
736
|
children: e
|
|
702
737
|
});
|
|
703
738
|
throw n;
|
|
704
739
|
}
|
|
705
|
-
},
|
|
706
|
-
function
|
|
740
|
+
}, K = "get", Q = "application/x-www-form-urlencoded";
|
|
741
|
+
function re(e) {
|
|
707
742
|
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
708
743
|
}
|
|
709
|
-
function
|
|
710
|
-
return
|
|
744
|
+
function rr(e) {
|
|
745
|
+
return re(e) && e.tagName.toLowerCase() === "button";
|
|
711
746
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
747
|
+
function nr(e) {
|
|
748
|
+
return re(e) && e.tagName.toLowerCase() === "form";
|
|
714
749
|
}
|
|
715
|
-
function
|
|
716
|
-
return
|
|
750
|
+
function ar(e) {
|
|
751
|
+
return re(e) && e.tagName.toLowerCase() === "input";
|
|
717
752
|
}
|
|
718
|
-
function
|
|
753
|
+
function or(e) {
|
|
719
754
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
720
755
|
}
|
|
721
|
-
function
|
|
722
|
-
return e.button === 0 && (!t || t === "_self") && !
|
|
756
|
+
function lr(e, t) {
|
|
757
|
+
return e.button === 0 && (!t || t === "_self") && !or(e);
|
|
723
758
|
}
|
|
724
|
-
var
|
|
725
|
-
function
|
|
726
|
-
if (
|
|
727
|
-
new FormData(document.createElement("form"), 0),
|
|
759
|
+
var q = null;
|
|
760
|
+
function ir() {
|
|
761
|
+
if (q === null) try {
|
|
762
|
+
new FormData(document.createElement("form"), 0), q = !1;
|
|
728
763
|
} catch {
|
|
729
|
-
|
|
764
|
+
q = !0;
|
|
730
765
|
}
|
|
731
|
-
return
|
|
766
|
+
return q;
|
|
732
767
|
}
|
|
733
|
-
var
|
|
768
|
+
var sr = /* @__PURE__ */ new Set([
|
|
734
769
|
"application/x-www-form-urlencoded",
|
|
735
770
|
"multipart/form-data",
|
|
736
771
|
"text/plain"
|
|
737
772
|
]);
|
|
738
|
-
function
|
|
739
|
-
return e != null && !
|
|
773
|
+
function ue(e) {
|
|
774
|
+
return e != null && !sr.has(e) ? (L(!1, `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Q}"`), null) : e;
|
|
740
775
|
}
|
|
741
|
-
function
|
|
776
|
+
function ur(e, t) {
|
|
742
777
|
let r, n, a, o, i;
|
|
743
|
-
if (
|
|
744
|
-
let
|
|
745
|
-
n =
|
|
746
|
-
} else if (
|
|
747
|
-
let
|
|
748
|
-
if (
|
|
749
|
-
let
|
|
750
|
-
if (n =
|
|
778
|
+
if (nr(e)) {
|
|
779
|
+
let s = e.getAttribute("action");
|
|
780
|
+
n = s ? _(s, t) : null, r = e.getAttribute("method") || K, a = ue(e.getAttribute("enctype")) || Q, o = new FormData(e);
|
|
781
|
+
} else if (rr(e) || ar(e) && (e.type === "submit" || e.type === "image")) {
|
|
782
|
+
let s = e.form;
|
|
783
|
+
if (s == null) throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
784
|
+
let u = e.getAttribute("formaction") || s.getAttribute("action");
|
|
785
|
+
if (n = u ? _(u, t) : null, r = e.getAttribute("formmethod") || s.getAttribute("method") || K, a = ue(e.getAttribute("formenctype")) || ue(s.getAttribute("enctype")) || Q, o = new FormData(s, e), !ir()) {
|
|
751
786
|
let { name: c, type: f, value: d } = e;
|
|
752
787
|
if (f === "image") {
|
|
753
788
|
let h = c ? `${c}.` : "";
|
|
@@ -755,8 +790,8 @@ function ar(e, t) {
|
|
|
755
790
|
} else c && o.append(c, d);
|
|
756
791
|
}
|
|
757
792
|
} else {
|
|
758
|
-
if (
|
|
759
|
-
r =
|
|
793
|
+
if (re(e)) throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
|
|
794
|
+
r = K, n = null, a = Q, i = e;
|
|
760
795
|
}
|
|
761
796
|
return o && a === "text/plain" && (i = o, o = void 0), {
|
|
762
797
|
action: n,
|
|
@@ -766,24 +801,24 @@ function ar(e, t) {
|
|
|
766
801
|
body: i
|
|
767
802
|
};
|
|
768
803
|
}
|
|
769
|
-
var
|
|
804
|
+
var Kr = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"), cr = {
|
|
770
805
|
"&": "\\u0026",
|
|
771
806
|
">": "\\u003e",
|
|
772
807
|
"<": "\\u003c",
|
|
773
808
|
"\u2028": "\\u2028",
|
|
774
809
|
"\u2029": "\\u2029"
|
|
775
|
-
},
|
|
810
|
+
}, dr = /[&><\u2028\u2029]/g;
|
|
776
811
|
function be(e) {
|
|
777
|
-
return e.replace(
|
|
812
|
+
return e.replace(dr, (t) => cr[t]);
|
|
778
813
|
}
|
|
779
|
-
function
|
|
814
|
+
function ne(e, t) {
|
|
780
815
|
if (e === !1 || e === null || typeof e > "u") throw new Error(t);
|
|
781
816
|
}
|
|
782
|
-
function
|
|
817
|
+
function Ke(e, t, r, n) {
|
|
783
818
|
let a = typeof e == "string" ? new URL(e, typeof window > "u" ? "server://singlefetch/" : window.location.origin) : e;
|
|
784
|
-
return r ? a.pathname.endsWith("/") ? a.pathname = `${a.pathname}_.${n}` : a.pathname = `${a.pathname}.${n}` : a.pathname === "/" ? a.pathname = `_root.${n}` : t && _(a.pathname, t) === "/" ? a.pathname = `${
|
|
819
|
+
return r ? a.pathname.endsWith("/") ? a.pathname = `${a.pathname}_.${n}` : a.pathname = `${a.pathname}.${n}` : a.pathname === "/" ? a.pathname = `_root.${n}` : t && _(a.pathname, t) === "/" ? a.pathname = `${W(t)}/_root.${n}` : a.pathname = `${W(a.pathname)}.${n}`, a;
|
|
785
820
|
}
|
|
786
|
-
async function
|
|
821
|
+
async function fr(e, t) {
|
|
787
822
|
if (e.id in t) return t[e.id];
|
|
788
823
|
try {
|
|
789
824
|
let r = await import(
|
|
@@ -797,21 +832,21 @@ async function ir(e, t) {
|
|
|
797
832
|
});
|
|
798
833
|
}
|
|
799
834
|
}
|
|
800
|
-
function
|
|
835
|
+
function hr(e) {
|
|
801
836
|
return e != null && typeof e.page == "string";
|
|
802
837
|
}
|
|
803
|
-
function
|
|
838
|
+
function mr(e) {
|
|
804
839
|
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
805
840
|
}
|
|
806
|
-
async function
|
|
807
|
-
return
|
|
841
|
+
async function pr(e, t, r) {
|
|
842
|
+
return vr((await Promise.all(e.map(async (n) => {
|
|
808
843
|
let a = t.routes[n.route.id];
|
|
809
844
|
if (a) {
|
|
810
|
-
let o = await
|
|
845
|
+
let o = await fr(a, r);
|
|
811
846
|
return o.links ? o.links() : [];
|
|
812
847
|
}
|
|
813
848
|
return [];
|
|
814
|
-
}))).flat(1).filter(
|
|
849
|
+
}))).flat(1).filter(mr).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map((n) => n.rel === "stylesheet" ? {
|
|
815
850
|
...n,
|
|
816
851
|
rel: "prefetch",
|
|
817
852
|
as: "style"
|
|
@@ -820,18 +855,18 @@ async function cr(e, t, r) {
|
|
|
820
855
|
rel: "prefetch"
|
|
821
856
|
}));
|
|
822
857
|
}
|
|
823
|
-
function
|
|
824
|
-
let i = (
|
|
825
|
-
return o === "assets" ? t.filter((
|
|
826
|
-
let f = n.routes[
|
|
858
|
+
function Le(e, t, r, n, a, o) {
|
|
859
|
+
let i = (u, c) => r[c] ? u.route.id !== r[c].route.id : !0, s = (u, c) => r[c].pathname !== u.pathname || r[c].route.path?.endsWith("*") && r[c].params["*"] !== u.params["*"];
|
|
860
|
+
return o === "assets" ? t.filter((u, c) => i(u, c) || s(u, c)) : o === "data" ? t.filter((u, c) => {
|
|
861
|
+
let f = n.routes[u.route.id];
|
|
827
862
|
if (!f || !f.hasLoader) return !1;
|
|
828
|
-
if (i(
|
|
829
|
-
if (
|
|
830
|
-
let d =
|
|
863
|
+
if (i(u, c) || s(u, c)) return !0;
|
|
864
|
+
if (u.route.shouldRevalidate) {
|
|
865
|
+
let d = u.route.shouldRevalidate({
|
|
831
866
|
currentUrl: new URL(a.pathname + a.search + a.hash, window.origin),
|
|
832
867
|
currentParams: r[0]?.params || {},
|
|
833
868
|
nextUrl: new URL(e, window.origin),
|
|
834
|
-
nextParams:
|
|
869
|
+
nextParams: u.params,
|
|
835
870
|
defaultShouldRevalidate: !0
|
|
836
871
|
});
|
|
837
872
|
if (typeof d == "boolean") return d;
|
|
@@ -839,91 +874,91 @@ function xe(e, t, r, n, a, o) {
|
|
|
839
874
|
return !0;
|
|
840
875
|
}) : [];
|
|
841
876
|
}
|
|
842
|
-
function
|
|
843
|
-
return
|
|
877
|
+
function Qe(e, t, { includeHydrateFallback: r } = {}) {
|
|
878
|
+
return gr(e.map((n) => {
|
|
844
879
|
let a = t.routes[n.route.id];
|
|
845
880
|
if (!a) return [];
|
|
846
881
|
let o = [a.module];
|
|
847
882
|
return a.clientActionModule && (o = o.concat(a.clientActionModule)), a.clientLoaderModule && (o = o.concat(a.clientLoaderModule)), r && a.hydrateFallbackModule && (o = o.concat(a.hydrateFallbackModule)), a.imports && (o = o.concat(a.imports)), o;
|
|
848
883
|
}).flat(1));
|
|
849
884
|
}
|
|
850
|
-
function
|
|
885
|
+
function gr(e) {
|
|
851
886
|
return [...new Set(e)];
|
|
852
887
|
}
|
|
853
|
-
function
|
|
888
|
+
function yr(e) {
|
|
854
889
|
let t = {}, r = Object.keys(e).sort();
|
|
855
890
|
for (let n of r) t[n] = e[n];
|
|
856
891
|
return t;
|
|
857
892
|
}
|
|
858
|
-
function
|
|
893
|
+
function vr(e, t) {
|
|
859
894
|
let r = /* @__PURE__ */ new Set(), n = new Set(t);
|
|
860
895
|
return e.reduce((a, o) => {
|
|
861
|
-
if (t && !
|
|
862
|
-
let i = JSON.stringify(
|
|
896
|
+
if (t && !hr(o) && o.as === "script" && o.href && n.has(o.href)) return a;
|
|
897
|
+
let i = JSON.stringify(yr(o));
|
|
863
898
|
return r.has(i) || (r.add(i), a.push({
|
|
864
899
|
key: i,
|
|
865
900
|
link: o
|
|
866
901
|
})), a;
|
|
867
902
|
}, []);
|
|
868
903
|
}
|
|
869
|
-
function
|
|
904
|
+
function wr(e, t) {
|
|
870
905
|
return e.mode === "lazy" && t === !0;
|
|
871
906
|
}
|
|
872
|
-
function
|
|
873
|
-
let n = new Set(r.state.matches.map((
|
|
907
|
+
function Rr({ sri: e, ...t }, r) {
|
|
908
|
+
let n = new Set(r.state.matches.map((s) => s.route.id)), a = r.state.location.pathname.split("/").filter(Boolean), o = ["/"];
|
|
874
909
|
for (a.pop(); a.length > 0; )
|
|
875
910
|
o.push(`/${a.join("/")}`), a.pop();
|
|
876
|
-
o.forEach((
|
|
877
|
-
let
|
|
878
|
-
|
|
911
|
+
o.forEach((s) => {
|
|
912
|
+
let u = ke(r.routes, s, r.basename || "/", !1, r.branches);
|
|
913
|
+
u && u.forEach((c) => n.add(c.route.id));
|
|
879
914
|
});
|
|
880
|
-
let i = [...n].reduce((
|
|
915
|
+
let i = [...n].reduce((s, u) => Object.assign(s, { [u]: t.routes[u] }), {});
|
|
881
916
|
return {
|
|
882
917
|
...t,
|
|
883
918
|
routes: i,
|
|
884
919
|
sri: e ? !0 : void 0
|
|
885
920
|
};
|
|
886
921
|
}
|
|
887
|
-
function
|
|
888
|
-
let e = l.useContext(
|
|
889
|
-
return
|
|
922
|
+
function ae() {
|
|
923
|
+
let e = l.useContext(H);
|
|
924
|
+
return ne(e, "You must render this element inside a <DataRouterContext.Provider> element"), e;
|
|
890
925
|
}
|
|
891
|
-
function
|
|
892
|
-
let e = l.useContext(
|
|
893
|
-
return
|
|
926
|
+
function Ze() {
|
|
927
|
+
let e = l.useContext(j);
|
|
928
|
+
return ne(e, "You must render this element inside a <DataRouterStateContext.Provider> element"), e;
|
|
894
929
|
}
|
|
895
|
-
var
|
|
896
|
-
|
|
930
|
+
var oe = l.createContext(void 0);
|
|
931
|
+
oe.displayName = "FrameworkContext";
|
|
897
932
|
function D() {
|
|
898
|
-
let e = l.useContext(
|
|
899
|
-
return
|
|
933
|
+
let e = l.useContext(oe);
|
|
934
|
+
return ne(e, "You must render this element inside a <HydratedRouter> element"), e;
|
|
900
935
|
}
|
|
901
|
-
function
|
|
902
|
-
let r = l.useContext(
|
|
936
|
+
function Er(e, t) {
|
|
937
|
+
let r = l.useContext(oe), [n, a] = l.useState(!1), [o, i] = l.useState(!1), { onFocus: s, onBlur: u, onMouseEnter: c, onMouseLeave: f, onTouchStart: d } = t, h = l.useRef(null);
|
|
903
938
|
l.useEffect(() => {
|
|
904
939
|
if (e === "render" && i(!0), e === "viewport") {
|
|
905
|
-
let
|
|
906
|
-
|
|
940
|
+
let g = (w) => {
|
|
941
|
+
w.forEach((v) => {
|
|
907
942
|
i(v.isIntersecting);
|
|
908
943
|
});
|
|
909
|
-
}, m = new IntersectionObserver(
|
|
944
|
+
}, m = new IntersectionObserver(g, { threshold: 0.5 });
|
|
910
945
|
return h.current && m.observe(h.current), () => {
|
|
911
946
|
m.disconnect();
|
|
912
947
|
};
|
|
913
948
|
}
|
|
914
949
|
}, [e]), l.useEffect(() => {
|
|
915
950
|
if (n) {
|
|
916
|
-
let
|
|
951
|
+
let g = setTimeout(() => {
|
|
917
952
|
i(!0);
|
|
918
953
|
}, 100);
|
|
919
954
|
return () => {
|
|
920
|
-
clearTimeout(
|
|
955
|
+
clearTimeout(g);
|
|
921
956
|
};
|
|
922
957
|
}
|
|
923
958
|
}, [n]);
|
|
924
959
|
let p = () => {
|
|
925
960
|
a(!0);
|
|
926
|
-
},
|
|
961
|
+
}, y = () => {
|
|
927
962
|
a(!1), i(!1);
|
|
928
963
|
};
|
|
929
964
|
return r ? e !== "intent" ? [
|
|
@@ -934,11 +969,11 @@ function yr(e, t) {
|
|
|
934
969
|
o,
|
|
935
970
|
h,
|
|
936
971
|
{
|
|
937
|
-
onFocus:
|
|
938
|
-
onBlur:
|
|
939
|
-
onMouseEnter:
|
|
940
|
-
onMouseLeave:
|
|
941
|
-
onTouchStart:
|
|
972
|
+
onFocus: U(s, p),
|
|
973
|
+
onBlur: U(u, y),
|
|
974
|
+
onMouseEnter: U(c, p),
|
|
975
|
+
onMouseLeave: U(f, y),
|
|
976
|
+
onTouchStart: U(d, p)
|
|
942
977
|
}
|
|
943
978
|
] : [
|
|
944
979
|
!1,
|
|
@@ -946,21 +981,21 @@ function yr(e, t) {
|
|
|
946
981
|
{}
|
|
947
982
|
];
|
|
948
983
|
}
|
|
949
|
-
function
|
|
984
|
+
function U(e, t) {
|
|
950
985
|
return (r) => {
|
|
951
986
|
e && e(r), r.defaultPrevented || t(r);
|
|
952
987
|
};
|
|
953
988
|
}
|
|
954
|
-
function
|
|
955
|
-
if (r && !
|
|
989
|
+
function Sr(e, t, r) {
|
|
990
|
+
if (r && !te) return [e[0]];
|
|
956
991
|
if (t) {
|
|
957
992
|
let n = e.findIndex((a) => t[a.route.id] !== void 0);
|
|
958
993
|
return e.slice(0, n + 1);
|
|
959
994
|
}
|
|
960
995
|
return e;
|
|
961
996
|
}
|
|
962
|
-
function
|
|
963
|
-
let r =
|
|
997
|
+
function xr({ page: e, ...t }) {
|
|
998
|
+
let r = je(), { nonce: n } = D(), { router: a } = ae(), o = l.useMemo(() => $e(a.routes, e, a.basename), [
|
|
964
999
|
a.routes,
|
|
965
1000
|
e,
|
|
966
1001
|
a.basename
|
|
@@ -968,21 +1003,21 @@ function vr({ page: e, ...t }) {
|
|
|
968
1003
|
return o ? (t.nonce == null && n && (t = {
|
|
969
1004
|
...t,
|
|
970
1005
|
nonce: n
|
|
971
|
-
}), r ? /* @__PURE__ */ l.createElement(
|
|
1006
|
+
}), r ? /* @__PURE__ */ l.createElement(br, {
|
|
972
1007
|
page: e,
|
|
973
1008
|
matches: o,
|
|
974
1009
|
...t
|
|
975
|
-
}) : /* @__PURE__ */ l.createElement(
|
|
1010
|
+
}) : /* @__PURE__ */ l.createElement(Lr, {
|
|
976
1011
|
page: e,
|
|
977
1012
|
matches: o,
|
|
978
1013
|
...t
|
|
979
1014
|
})) : null;
|
|
980
1015
|
}
|
|
981
|
-
function
|
|
1016
|
+
function Cr(e) {
|
|
982
1017
|
let { manifest: t, routeModules: r } = D(), [n, a] = l.useState([]);
|
|
983
1018
|
return l.useEffect(() => {
|
|
984
1019
|
let o = !1;
|
|
985
|
-
return
|
|
1020
|
+
return pr(e, t, r).then((i) => {
|
|
986
1021
|
o || a(i);
|
|
987
1022
|
}), () => {
|
|
988
1023
|
o = !0;
|
|
@@ -993,12 +1028,12 @@ function Rr(e) {
|
|
|
993
1028
|
r
|
|
994
1029
|
]), n;
|
|
995
1030
|
}
|
|
996
|
-
function
|
|
997
|
-
let n = P(), { future: a } = D(), { basename: o } =
|
|
1031
|
+
function br({ page: e, matches: t, ...r }) {
|
|
1032
|
+
let n = P(), { future: a } = D(), { basename: o } = ae(), i = l.useMemo(() => {
|
|
998
1033
|
if (e === n.pathname + n.search + n.hash) return [];
|
|
999
|
-
let
|
|
1000
|
-
for (let f of t) typeof f.route.shouldRevalidate == "function" ?
|
|
1001
|
-
return
|
|
1034
|
+
let s = Ke(e, o, a.v8_trailingSlashAwareDataRequests, "rsc"), u = !1, c = [];
|
|
1035
|
+
for (let f of t) typeof f.route.shouldRevalidate == "function" ? u = !0 : c.push(f.route.id);
|
|
1036
|
+
return u && c.length > 0 && s.searchParams.set("_routes", c.join(",")), [s.pathname + s.search];
|
|
1002
1037
|
}, [
|
|
1003
1038
|
o,
|
|
1004
1039
|
a.v8_trailingSlashAwareDataRequests,
|
|
@@ -1006,22 +1041,22 @@ function wr({ page: e, matches: t, ...r }) {
|
|
|
1006
1041
|
n,
|
|
1007
1042
|
t
|
|
1008
1043
|
]);
|
|
1009
|
-
return /* @__PURE__ */ l.createElement(l.Fragment, null, i.map((
|
|
1010
|
-
key:
|
|
1044
|
+
return /* @__PURE__ */ l.createElement(l.Fragment, null, i.map((s) => /* @__PURE__ */ l.createElement("link", {
|
|
1045
|
+
key: s,
|
|
1011
1046
|
rel: "prefetch",
|
|
1012
1047
|
as: "fetch",
|
|
1013
|
-
href:
|
|
1048
|
+
href: s,
|
|
1014
1049
|
...r
|
|
1015
1050
|
})));
|
|
1016
1051
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let n = P(), { future: a, manifest: o, routeModules: i } = D(), { basename:
|
|
1052
|
+
function Lr({ page: e, matches: t, ...r }) {
|
|
1053
|
+
let n = P(), { future: a, manifest: o, routeModules: i } = D(), { basename: s } = ae(), { loaderData: u, matches: c } = Ze(), f = l.useMemo(() => Le(e, t, c, o, n, "data"), [
|
|
1019
1054
|
e,
|
|
1020
1055
|
t,
|
|
1021
1056
|
c,
|
|
1022
1057
|
o,
|
|
1023
1058
|
n
|
|
1024
|
-
]), d = l.useMemo(() =>
|
|
1059
|
+
]), d = l.useMemo(() => Le(e, t, c, o, n, "assets"), [
|
|
1025
1060
|
e,
|
|
1026
1061
|
t,
|
|
1027
1062
|
c,
|
|
@@ -1029,91 +1064,91 @@ function Er({ page: e, matches: t, ...r }) {
|
|
|
1029
1064
|
n
|
|
1030
1065
|
]), h = l.useMemo(() => {
|
|
1031
1066
|
if (e === n.pathname + n.search + n.hash) return [];
|
|
1032
|
-
let
|
|
1067
|
+
let g = /* @__PURE__ */ new Set(), m = !1;
|
|
1033
1068
|
if (t.forEach((v) => {
|
|
1034
|
-
let
|
|
1035
|
-
!
|
|
1036
|
-
}),
|
|
1037
|
-
let
|
|
1038
|
-
return m &&
|
|
1069
|
+
let R = o.routes[v.route.id];
|
|
1070
|
+
!R || !R.hasLoader || (!f.some((C) => C.route.id === v.route.id) && v.route.id in u && i[v.route.id]?.shouldRevalidate || R.hasClientLoader ? m = !0 : g.add(v.route.id));
|
|
1071
|
+
}), g.size === 0) return [];
|
|
1072
|
+
let w = Ke(e, s, a.v8_trailingSlashAwareDataRequests, "data");
|
|
1073
|
+
return m && g.size > 0 && w.searchParams.set("_routes", t.filter((v) => g.has(v.route.id)).map((v) => v.route.id).join(",")), [w.pathname + w.search];
|
|
1039
1074
|
}, [
|
|
1040
|
-
u,
|
|
1041
|
-
a.v8_trailingSlashAwareDataRequests,
|
|
1042
1075
|
s,
|
|
1076
|
+
a.v8_trailingSlashAwareDataRequests,
|
|
1077
|
+
u,
|
|
1043
1078
|
n,
|
|
1044
1079
|
o,
|
|
1045
1080
|
f,
|
|
1046
1081
|
t,
|
|
1047
1082
|
e,
|
|
1048
1083
|
i
|
|
1049
|
-
]), p = l.useMemo(() =>
|
|
1050
|
-
return /* @__PURE__ */ l.createElement(l.Fragment, null, h.map((
|
|
1051
|
-
key:
|
|
1084
|
+
]), p = l.useMemo(() => Qe(d, o), [d, o]), y = Cr(d);
|
|
1085
|
+
return /* @__PURE__ */ l.createElement(l.Fragment, null, h.map((g) => /* @__PURE__ */ l.createElement("link", {
|
|
1086
|
+
key: g,
|
|
1052
1087
|
rel: "prefetch",
|
|
1053
1088
|
as: "fetch",
|
|
1054
|
-
href:
|
|
1089
|
+
href: g,
|
|
1055
1090
|
...r
|
|
1056
|
-
})), p.map((
|
|
1057
|
-
key:
|
|
1091
|
+
})), p.map((g) => /* @__PURE__ */ l.createElement("link", {
|
|
1092
|
+
key: g,
|
|
1058
1093
|
rel: "modulepreload",
|
|
1059
|
-
href:
|
|
1094
|
+
href: g,
|
|
1060
1095
|
...r
|
|
1061
|
-
})),
|
|
1062
|
-
key:
|
|
1096
|
+
})), y.map(({ key: g, link: m }) => /* @__PURE__ */ l.createElement("link", {
|
|
1097
|
+
key: g,
|
|
1063
1098
|
nonce: r.nonce,
|
|
1064
1099
|
...m,
|
|
1065
1100
|
crossOrigin: m.crossOrigin ?? r.crossOrigin
|
|
1066
1101
|
})));
|
|
1067
1102
|
}
|
|
1068
|
-
var
|
|
1069
|
-
function
|
|
1070
|
-
|
|
1103
|
+
var te = !1;
|
|
1104
|
+
function Pr() {
|
|
1105
|
+
te = !0;
|
|
1071
1106
|
}
|
|
1072
|
-
function
|
|
1073
|
-
let { manifest: t, serverHandoffString: r, isSpaMode: n, renderMeta: a, routeDiscovery: o, ssr: i, nonce:
|
|
1074
|
-
e.nonce == null &&
|
|
1107
|
+
function $r(e) {
|
|
1108
|
+
let { manifest: t, serverHandoffString: r, isSpaMode: n, renderMeta: a, routeDiscovery: o, ssr: i, nonce: s } = D(), { router: u, static: c, staticContext: f } = ae(), { matches: d } = Ze(), h = je(), p = wr(o, i);
|
|
1109
|
+
e.nonce == null && s && (e = {
|
|
1075
1110
|
...e,
|
|
1076
|
-
nonce:
|
|
1111
|
+
nonce: s
|
|
1077
1112
|
}), a && (a.didRenderScripts = !0);
|
|
1078
|
-
let
|
|
1113
|
+
let y = Sr(d, null, n);
|
|
1079
1114
|
l.useEffect(() => {
|
|
1080
|
-
|
|
1115
|
+
Pr();
|
|
1081
1116
|
}, []);
|
|
1082
|
-
let
|
|
1117
|
+
let g = l.useMemo(() => {
|
|
1083
1118
|
if (h) return null;
|
|
1084
|
-
let v = f ? `window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());` : " ",
|
|
1085
|
-
${
|
|
1086
|
-
let
|
|
1087
|
-
|
|
1088
|
-
let { clientActionModule: O, clientLoaderModule:
|
|
1119
|
+
let v = f ? `window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());` : " ", R = c ? `${t.hmr?.runtime ? `import ${JSON.stringify(t.hmr.runtime)};` : ""}${p ? "" : `import ${JSON.stringify(t.url)}`};
|
|
1120
|
+
${y.map((C, S) => {
|
|
1121
|
+
let x = `route${S}`, $ = t.routes[C.route.id];
|
|
1122
|
+
ne($, `Route ${C.route.id} not found in manifest`);
|
|
1123
|
+
let { clientActionModule: O, clientLoaderModule: M, clientMiddlewareModule: F, hydrateFallbackModule: Y, module: G } = $, A = [
|
|
1089
1124
|
...O ? [{
|
|
1090
1125
|
module: O,
|
|
1091
|
-
varName: `${
|
|
1126
|
+
varName: `${x}_clientAction`
|
|
1092
1127
|
}] : [],
|
|
1093
|
-
...
|
|
1094
|
-
module:
|
|
1095
|
-
varName: `${
|
|
1128
|
+
...M ? [{
|
|
1129
|
+
module: M,
|
|
1130
|
+
varName: `${x}_clientLoader`
|
|
1096
1131
|
}] : [],
|
|
1097
1132
|
...F ? [{
|
|
1098
1133
|
module: F,
|
|
1099
|
-
varName: `${
|
|
1134
|
+
varName: `${x}_clientMiddleware`
|
|
1100
1135
|
}] : [],
|
|
1101
|
-
...
|
|
1102
|
-
module:
|
|
1103
|
-
varName: `${
|
|
1136
|
+
...Y ? [{
|
|
1137
|
+
module: Y,
|
|
1138
|
+
varName: `${x}_HydrateFallback`
|
|
1104
1139
|
}] : [],
|
|
1105
1140
|
{
|
|
1106
|
-
module:
|
|
1107
|
-
varName: `${
|
|
1141
|
+
module: G,
|
|
1142
|
+
varName: `${x}_main`
|
|
1108
1143
|
}
|
|
1109
1144
|
];
|
|
1110
|
-
return A.length === 1 ? `import * as ${
|
|
1111
|
-
`), `const ${
|
|
1145
|
+
return A.length === 1 ? `import * as ${x} from ${JSON.stringify(G)};` : [A.map((I) => `import * as ${I.varName} from "${I.module}";`).join(`
|
|
1146
|
+
`), `const ${x} = {${A.map((I) => `...${I.varName}`).join(",")}};`].join(`
|
|
1112
1147
|
`);
|
|
1113
1148
|
}).join(`
|
|
1114
1149
|
`)}
|
|
1115
|
-
${p ? `window.__reactRouterManifest = ${JSON.stringify(
|
|
1116
|
-
window.__reactRouterRouteModules = {${
|
|
1150
|
+
${p ? `window.__reactRouterManifest = ${JSON.stringify(Rr(t, u), null, 2)};` : ""}
|
|
1151
|
+
window.__reactRouterRouteModules = {${y.map((C, S) => `${JSON.stringify(C.route.id)}:route${S}`).join(",")}};
|
|
1117
1152
|
|
|
1118
1153
|
import(${JSON.stringify(t.entry.module)});` : " ";
|
|
1119
1154
|
return /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("script", {
|
|
@@ -1124,29 +1159,29 @@ import(${JSON.stringify(t.entry.module)});` : " ";
|
|
|
1124
1159
|
}), /* @__PURE__ */ l.createElement("script", {
|
|
1125
1160
|
...e,
|
|
1126
1161
|
suppressHydrationWarning: !0,
|
|
1127
|
-
dangerouslySetInnerHTML: { __html:
|
|
1162
|
+
dangerouslySetInnerHTML: { __html: R },
|
|
1128
1163
|
type: "module",
|
|
1129
1164
|
async: !0
|
|
1130
1165
|
}));
|
|
1131
|
-
}, []), m =
|
|
1132
|
-
return
|
|
1166
|
+
}, []), m = te || h ? [] : [...new Set(t.entry.imports.concat(Qe(y, t, { includeHydrateFallback: !0 })))], w = typeof t.sri == "object" ? t.sri : {};
|
|
1167
|
+
return Zt(!h, "The <Scripts /> element is a no-op when using RSC and can be safely removed."), te || h ? null : /* @__PURE__ */ l.createElement(l.Fragment, null, typeof t.sri == "object" ? /* @__PURE__ */ l.createElement("script", {
|
|
1133
1168
|
...e,
|
|
1134
1169
|
"rr-importmap": "",
|
|
1135
1170
|
type: "importmap",
|
|
1136
1171
|
suppressHydrationWarning: !0,
|
|
1137
|
-
dangerouslySetInnerHTML: { __html: JSON.stringify({ integrity:
|
|
1172
|
+
dangerouslySetInnerHTML: { __html: JSON.stringify({ integrity: w }) }
|
|
1138
1173
|
}) : null, p ? null : /* @__PURE__ */ l.createElement("link", {
|
|
1139
1174
|
rel: "modulepreload",
|
|
1140
1175
|
href: t.url,
|
|
1141
1176
|
crossOrigin: e.crossOrigin,
|
|
1142
|
-
integrity:
|
|
1177
|
+
integrity: w[t.url],
|
|
1143
1178
|
nonce: e.nonce,
|
|
1144
1179
|
suppressHydrationWarning: !0
|
|
1145
1180
|
}), /* @__PURE__ */ l.createElement("link", {
|
|
1146
1181
|
rel: "modulepreload",
|
|
1147
1182
|
href: t.entry.module,
|
|
1148
1183
|
crossOrigin: e.crossOrigin,
|
|
1149
|
-
integrity:
|
|
1184
|
+
integrity: w[t.entry.module],
|
|
1150
1185
|
nonce: e.nonce,
|
|
1151
1186
|
suppressHydrationWarning: !0
|
|
1152
1187
|
}), m.map((v) => /* @__PURE__ */ l.createElement("link", {
|
|
@@ -1154,19 +1189,19 @@ import(${JSON.stringify(t.entry.module)});` : " ";
|
|
|
1154
1189
|
rel: "modulepreload",
|
|
1155
1190
|
href: v,
|
|
1156
1191
|
crossOrigin: e.crossOrigin,
|
|
1157
|
-
integrity:
|
|
1192
|
+
integrity: w[v],
|
|
1158
1193
|
nonce: e.nonce,
|
|
1159
1194
|
suppressHydrationWarning: !0
|
|
1160
|
-
})),
|
|
1195
|
+
})), g);
|
|
1161
1196
|
}
|
|
1162
|
-
function
|
|
1197
|
+
function kr(...e) {
|
|
1163
1198
|
return (t) => {
|
|
1164
1199
|
e.forEach((r) => {
|
|
1165
1200
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
1166
1201
|
});
|
|
1167
1202
|
};
|
|
1168
1203
|
}
|
|
1169
|
-
var
|
|
1204
|
+
var Qr = class extends l.Component {
|
|
1170
1205
|
constructor(e) {
|
|
1171
1206
|
super(e), this.state = {
|
|
1172
1207
|
error: e.error || null,
|
|
@@ -1186,13 +1221,13 @@ var Yr = class extends l.Component {
|
|
|
1186
1221
|
};
|
|
1187
1222
|
}
|
|
1188
1223
|
render() {
|
|
1189
|
-
return this.state.error ? /* @__PURE__ */ l.createElement(
|
|
1224
|
+
return this.state.error ? /* @__PURE__ */ l.createElement(_r, {
|
|
1190
1225
|
error: this.state.error,
|
|
1191
1226
|
isOutsideRemixApp: !0
|
|
1192
1227
|
}) : this.props.children;
|
|
1193
1228
|
}
|
|
1194
1229
|
};
|
|
1195
|
-
function
|
|
1230
|
+
function _r({ error: e, isOutsideRemixApp: t }) {
|
|
1196
1231
|
let { nonce: r } = D();
|
|
1197
1232
|
console.error(e);
|
|
1198
1233
|
let n = /* @__PURE__ */ l.createElement("script", {
|
|
@@ -1203,14 +1238,14 @@ function Cr({ error: e, isOutsideRemixApp: t }) {
|
|
|
1203
1238
|
);
|
|
1204
1239
|
` }
|
|
1205
1240
|
});
|
|
1206
|
-
if (
|
|
1241
|
+
if (De(e)) return /* @__PURE__ */ l.createElement(Pe, { title: "Unhandled Thrown Response!" }, /* @__PURE__ */ l.createElement("h1", { style: { fontSize: "24px" } }, e.status, " ", e.statusText), n);
|
|
1207
1242
|
let a;
|
|
1208
1243
|
if (e instanceof Error) a = e;
|
|
1209
1244
|
else {
|
|
1210
1245
|
let o = e == null ? "Unknown Error" : typeof e == "object" && "toString" in e ? e.toString() : JSON.stringify(e);
|
|
1211
1246
|
a = new Error(o);
|
|
1212
1247
|
}
|
|
1213
|
-
return /* @__PURE__ */ l.createElement(
|
|
1248
|
+
return /* @__PURE__ */ l.createElement(Pe, {
|
|
1214
1249
|
title: "Application Error!",
|
|
1215
1250
|
isOutsideRemixApp: t
|
|
1216
1251
|
}, /* @__PURE__ */ l.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ l.createElement("pre", { style: {
|
|
@@ -1220,7 +1255,7 @@ function Cr({ error: e, isOutsideRemixApp: t }) {
|
|
|
1220
1255
|
overflow: "auto"
|
|
1221
1256
|
} }, a.stack), n);
|
|
1222
1257
|
}
|
|
1223
|
-
function
|
|
1258
|
+
function Pe({ title: e, renderScripts: t, isOutsideRemixApp: r, children: n }) {
|
|
1224
1259
|
let { routeModules: a } = D();
|
|
1225
1260
|
return a.root?.Layout && !r ? n : /* @__PURE__ */ l.createElement("html", { lang: "en" }, /* @__PURE__ */ l.createElement("head", null, /* @__PURE__ */ l.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ l.createElement("meta", {
|
|
1226
1261
|
name: "viewport",
|
|
@@ -1228,21 +1263,21 @@ function Ce({ title: e, renderScripts: t, isOutsideRemixApp: r, children: n }) {
|
|
|
1228
1263
|
}), /* @__PURE__ */ l.createElement("title", null, e)), /* @__PURE__ */ l.createElement("body", null, /* @__PURE__ */ l.createElement("main", { style: {
|
|
1229
1264
|
fontFamily: "system-ui, sans-serif",
|
|
1230
1265
|
padding: "2rem"
|
|
1231
|
-
} }, n, t ? /* @__PURE__ */ l.createElement(
|
|
1266
|
+
} }, n, t ? /* @__PURE__ */ l.createElement($r, null) : null)));
|
|
1232
1267
|
}
|
|
1233
|
-
var
|
|
1268
|
+
var Or = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1234
1269
|
try {
|
|
1235
|
-
|
|
1270
|
+
Or && (window.__reactRouterVersion = "7.18.4");
|
|
1236
1271
|
} catch {
|
|
1237
1272
|
}
|
|
1238
|
-
function
|
|
1273
|
+
function Tr({ basename: e, children: t, history: r, useTransitions: n }) {
|
|
1239
1274
|
let [a, o] = l.useState({
|
|
1240
1275
|
action: r.action,
|
|
1241
1276
|
location: r.location
|
|
1242
|
-
}), i = l.useCallback((
|
|
1243
|
-
n === !1 ? o(
|
|
1277
|
+
}), i = l.useCallback((s) => {
|
|
1278
|
+
n === !1 ? o(s) : l.startTransition(() => o(s));
|
|
1244
1279
|
}, [n]);
|
|
1245
|
-
return l.useLayoutEffect(() => r.listen(i), [r, i]), /* @__PURE__ */ l.createElement(
|
|
1280
|
+
return l.useLayoutEffect(() => r.listen(i), [r, i]), /* @__PURE__ */ l.createElement(tr, {
|
|
1246
1281
|
basename: e,
|
|
1247
1282
|
children: t,
|
|
1248
1283
|
location: a.location,
|
|
@@ -1251,19 +1286,19 @@ function Pr({ basename: e, children: t, history: r, useTransitions: n }) {
|
|
|
1251
1286
|
useTransitions: n
|
|
1252
1287
|
});
|
|
1253
1288
|
}
|
|
1254
|
-
|
|
1255
|
-
var
|
|
1256
|
-
let { basename: m, navigator:
|
|
1257
|
-
f =
|
|
1258
|
-
let S =
|
|
1259
|
-
if (
|
|
1260
|
-
let N =
|
|
1261
|
-
m !== "/" && (N.pathname = N.pathname === "/" ? m : k([m, N.pathname])),
|
|
1289
|
+
Tr.displayName = "unstable_HistoryRouter";
|
|
1290
|
+
var et = l.forwardRef(function({ onClick: t, discover: r = "render", prefetch: n = "none", relative: a, reloadDocument: o, replace: i, mask: s, state: u, target: c, to: f, preventScrollReset: d, viewTransition: h, defaultShouldRevalidate: p, ...y }, g) {
|
|
1291
|
+
let { basename: m, navigator: w, useTransitions: v } = l.useContext(b), R = typeof f == "string" && he.test(f), C = Ae(f, m);
|
|
1292
|
+
f = C.to;
|
|
1293
|
+
let S = At(f, { relative: a }), x = P(), $ = null;
|
|
1294
|
+
if (s) {
|
|
1295
|
+
let N = me(s, [], x.mask ? x.mask.pathname : "/", !0);
|
|
1296
|
+
m !== "/" && (N.pathname = N.pathname === "/" ? m : k([m, N.pathname])), $ = w.createHref(N);
|
|
1262
1297
|
}
|
|
1263
|
-
let [O,
|
|
1298
|
+
let [O, M, F] = Er(n, y), Y = Fr(f, {
|
|
1264
1299
|
replace: i,
|
|
1265
|
-
mask:
|
|
1266
|
-
state:
|
|
1300
|
+
mask: s,
|
|
1301
|
+
state: u,
|
|
1267
1302
|
target: c,
|
|
1268
1303
|
preventScrollReset: d,
|
|
1269
1304
|
relative: a,
|
|
@@ -1271,55 +1306,55 @@ var Xe = l.forwardRef(function({ onClick: t, discover: r = "render", prefetch: n
|
|
|
1271
1306
|
defaultShouldRevalidate: p,
|
|
1272
1307
|
useTransitions: v
|
|
1273
1308
|
});
|
|
1274
|
-
function
|
|
1275
|
-
t && t(N), N.defaultPrevented ||
|
|
1309
|
+
function G(N) {
|
|
1310
|
+
t && t(N), N.defaultPrevented || Y(N);
|
|
1276
1311
|
}
|
|
1277
|
-
let A = !(
|
|
1278
|
-
...
|
|
1312
|
+
let A = !(C.isExternal || o), I = /* @__PURE__ */ l.createElement("a", {
|
|
1313
|
+
...y,
|
|
1279
1314
|
...F,
|
|
1280
|
-
href: (A ?
|
|
1281
|
-
onClick: A ?
|
|
1282
|
-
ref:
|
|
1315
|
+
href: (A ? $ : void 0) || C.absoluteURL || S,
|
|
1316
|
+
onClick: A ? G : t,
|
|
1317
|
+
ref: kr(g, M),
|
|
1283
1318
|
target: c,
|
|
1284
|
-
"data-discover": !
|
|
1319
|
+
"data-discover": !R && r === "render" ? "true" : void 0
|
|
1285
1320
|
});
|
|
1286
|
-
return O && !
|
|
1321
|
+
return O && !R ? /* @__PURE__ */ l.createElement(l.Fragment, null, I, /* @__PURE__ */ l.createElement(xr, { page: S })) : I;
|
|
1287
1322
|
});
|
|
1288
|
-
|
|
1289
|
-
var
|
|
1290
|
-
let d = z(i, { relative: c.relative }), h = P(), p = l.useContext(
|
|
1291
|
-
r || (v = v.toLowerCase(),
|
|
1292
|
-
const
|
|
1293
|
-
let S = v ===
|
|
1323
|
+
et.displayName = "Link";
|
|
1324
|
+
var Mr = l.forwardRef(function({ "aria-current": t = "page", caseSensitive: r = !1, className: n = "", end: a = !1, style: o, to: i, viewTransition: s, children: u, ...c }, f) {
|
|
1325
|
+
let d = z(i, { relative: c.relative }), h = P(), p = l.useContext(j), { navigator: y, basename: g } = l.useContext(b), m = p != null && Jr(d) && s === !0, w = y.encodeLocation ? y.encodeLocation(d).pathname : d.pathname, v = h.pathname, R = p && p.navigation && p.navigation.location ? p.navigation.location.pathname : null;
|
|
1326
|
+
r || (v = v.toLowerCase(), R = R ? R.toLowerCase() : null, w = w.toLowerCase()), R && g && (R = _(R, g) || R);
|
|
1327
|
+
const C = w !== "/" && w.endsWith("/") ? w.length - 1 : w.length;
|
|
1328
|
+
let S = v === w || !a && v.startsWith(w) && v.charAt(C) === "/", x = R != null && (R === w || !a && R.startsWith(w) && R.charAt(w.length) === "/"), $ = {
|
|
1294
1329
|
isActive: S,
|
|
1295
|
-
isPending:
|
|
1330
|
+
isPending: x,
|
|
1296
1331
|
isTransitioning: m
|
|
1297
|
-
}, O = S ? t : void 0,
|
|
1298
|
-
typeof n == "function" ?
|
|
1332
|
+
}, O = S ? t : void 0, M;
|
|
1333
|
+
typeof n == "function" ? M = n($) : M = [
|
|
1299
1334
|
n,
|
|
1300
1335
|
S ? "active" : null,
|
|
1301
|
-
|
|
1336
|
+
x ? "pending" : null,
|
|
1302
1337
|
m ? "transitioning" : null
|
|
1303
1338
|
].filter(Boolean).join(" ");
|
|
1304
|
-
let F = typeof o == "function" ? o(
|
|
1305
|
-
return /* @__PURE__ */ l.createElement(
|
|
1339
|
+
let F = typeof o == "function" ? o($) : o;
|
|
1340
|
+
return /* @__PURE__ */ l.createElement(et, {
|
|
1306
1341
|
...c,
|
|
1307
1342
|
"aria-current": O,
|
|
1308
|
-
className:
|
|
1343
|
+
className: M,
|
|
1309
1344
|
ref: f,
|
|
1310
1345
|
style: F,
|
|
1311
1346
|
to: i,
|
|
1312
|
-
viewTransition:
|
|
1313
|
-
}, typeof
|
|
1347
|
+
viewTransition: s
|
|
1348
|
+
}, typeof u == "function" ? u($) : u);
|
|
1314
1349
|
});
|
|
1315
|
-
|
|
1316
|
-
var
|
|
1317
|
-
let { useTransitions:
|
|
1318
|
-
if (
|
|
1350
|
+
Mr.displayName = "NavLink";
|
|
1351
|
+
var Nr = l.forwardRef(({ discover: e = "render", fetcherKey: t, navigate: r, reloadDocument: n, replace: a, state: o, method: i = K, action: s, onSubmit: u, relative: c, preventScrollReset: f, viewTransition: d, defaultShouldRevalidate: h, ...p }, y) => {
|
|
1352
|
+
let { useTransitions: g } = l.useContext(b), m = Hr(), w = Ur(s, { relative: c }), v = i.toLowerCase() === "get" ? "get" : "post", R = typeof s == "string" && he.test(s), C = (S) => {
|
|
1353
|
+
if (u && u(S), S.defaultPrevented) return;
|
|
1319
1354
|
S.preventDefault();
|
|
1320
|
-
let
|
|
1355
|
+
let x = S.nativeEvent.submitter, $ = x?.getAttribute("formmethod") || i, O = () => m(x || S.currentTarget, {
|
|
1321
1356
|
fetcherKey: t,
|
|
1322
|
-
method:
|
|
1357
|
+
method: $,
|
|
1323
1358
|
navigate: r,
|
|
1324
1359
|
replace: a,
|
|
1325
1360
|
state: o,
|
|
@@ -1328,31 +1363,31 @@ var kr = l.forwardRef(({ discover: e = "render", fetcherKey: t, navigate: r, rel
|
|
|
1328
1363
|
viewTransition: d,
|
|
1329
1364
|
defaultShouldRevalidate: h
|
|
1330
1365
|
});
|
|
1331
|
-
|
|
1366
|
+
g && r !== !1 ? l.startTransition(() => O()) : O();
|
|
1332
1367
|
};
|
|
1333
1368
|
return /* @__PURE__ */ l.createElement("form", {
|
|
1334
|
-
ref:
|
|
1369
|
+
ref: y,
|
|
1335
1370
|
method: v,
|
|
1336
|
-
action:
|
|
1337
|
-
onSubmit: n ?
|
|
1371
|
+
action: w,
|
|
1372
|
+
onSubmit: n ? u : C,
|
|
1338
1373
|
...p,
|
|
1339
|
-
"data-discover": !
|
|
1374
|
+
"data-discover": !R && e === "render" ? "true" : void 0
|
|
1340
1375
|
});
|
|
1341
1376
|
});
|
|
1342
|
-
|
|
1343
|
-
function
|
|
1344
|
-
let n = l.useContext(
|
|
1345
|
-
|
|
1377
|
+
Nr.displayName = "Form";
|
|
1378
|
+
function Ir({ getKey: e, storageKey: t, ...r }) {
|
|
1379
|
+
let n = l.useContext(oe), { basename: a } = l.useContext(b), o = P(), i = qe();
|
|
1380
|
+
Br({
|
|
1346
1381
|
getKey: e,
|
|
1347
1382
|
storageKey: t
|
|
1348
1383
|
});
|
|
1349
|
-
let
|
|
1384
|
+
let s = l.useMemo(() => {
|
|
1350
1385
|
if (!n || !e) return null;
|
|
1351
|
-
let c =
|
|
1386
|
+
let c = fe(o, i, a, e);
|
|
1352
1387
|
return c !== o.key ? c : null;
|
|
1353
1388
|
}, []);
|
|
1354
1389
|
if (!n || n.isSpaMode) return null;
|
|
1355
|
-
let
|
|
1390
|
+
let u = ((c, f) => {
|
|
1356
1391
|
if (!window.history.state || !window.history.state.key) {
|
|
1357
1392
|
let d = Math.random().toString(32).slice(2);
|
|
1358
1393
|
window.history.replaceState({ key: d }, "");
|
|
@@ -1367,36 +1402,36 @@ function _r({ getKey: e, storageKey: t, ...r }) {
|
|
|
1367
1402
|
return r.nonce == null && n?.nonce && (r.nonce = n.nonce), /* @__PURE__ */ l.createElement("script", {
|
|
1368
1403
|
...r,
|
|
1369
1404
|
suppressHydrationWarning: !0,
|
|
1370
|
-
dangerouslySetInnerHTML: { __html: `(${
|
|
1405
|
+
dangerouslySetInnerHTML: { __html: `(${u})(${be(JSON.stringify(t || de))}, ${be(JSON.stringify(s))})` }
|
|
1371
1406
|
});
|
|
1372
1407
|
}
|
|
1373
|
-
|
|
1374
|
-
function
|
|
1408
|
+
Ir.displayName = "ScrollRestoration";
|
|
1409
|
+
function tt(e) {
|
|
1375
1410
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1376
1411
|
}
|
|
1377
|
-
function
|
|
1378
|
-
let t = l.useContext(
|
|
1379
|
-
return E(t,
|
|
1412
|
+
function we(e) {
|
|
1413
|
+
let t = l.useContext(H);
|
|
1414
|
+
return E(t, tt(e)), t;
|
|
1380
1415
|
}
|
|
1381
|
-
function
|
|
1382
|
-
let t = l.useContext(
|
|
1383
|
-
return E(t,
|
|
1416
|
+
function Dr(e) {
|
|
1417
|
+
let t = l.useContext(j);
|
|
1418
|
+
return E(t, tt(e)), t;
|
|
1384
1419
|
}
|
|
1385
|
-
function
|
|
1386
|
-
let f =
|
|
1420
|
+
function Fr(e, { target: t, replace: r, mask: n, state: a, preventScrollReset: o, relative: i, viewTransition: s, defaultShouldRevalidate: u, useTransitions: c } = {}) {
|
|
1421
|
+
let f = Wt(), d = P(), h = z(e, { relative: i });
|
|
1387
1422
|
return l.useCallback((p) => {
|
|
1388
|
-
if (
|
|
1423
|
+
if (lr(p, t)) {
|
|
1389
1424
|
p.preventDefault();
|
|
1390
|
-
let
|
|
1391
|
-
replace:
|
|
1425
|
+
let y = r !== void 0 ? r : Z(d) === Z(h), g = () => f(e, {
|
|
1426
|
+
replace: y,
|
|
1392
1427
|
mask: n,
|
|
1393
1428
|
state: a,
|
|
1394
1429
|
preventScrollReset: o,
|
|
1395
1430
|
relative: i,
|
|
1396
|
-
viewTransition:
|
|
1397
|
-
defaultShouldRevalidate:
|
|
1431
|
+
viewTransition: s,
|
|
1432
|
+
defaultShouldRevalidate: u
|
|
1398
1433
|
});
|
|
1399
|
-
c ? l.startTransition(() =>
|
|
1434
|
+
c ? l.startTransition(() => g()) : g();
|
|
1400
1435
|
}
|
|
1401
1436
|
}, [
|
|
1402
1437
|
d,
|
|
@@ -1409,33 +1444,33 @@ function Mr(e, { target: t, replace: r, mask: n, state: a, preventScrollReset: o
|
|
|
1409
1444
|
e,
|
|
1410
1445
|
o,
|
|
1411
1446
|
i,
|
|
1412
|
-
u,
|
|
1413
1447
|
s,
|
|
1448
|
+
u,
|
|
1414
1449
|
c
|
|
1415
1450
|
]);
|
|
1416
1451
|
}
|
|
1417
|
-
var
|
|
1418
|
-
function
|
|
1419
|
-
let { router: e } =
|
|
1452
|
+
var Ar = 0, Wr = () => `__${String(++Ar)}__`;
|
|
1453
|
+
function Hr() {
|
|
1454
|
+
let { router: e } = we("useSubmit"), { basename: t } = l.useContext(b), r = qt(), n = e.fetch, a = e.navigate;
|
|
1420
1455
|
return l.useCallback(async (o, i = {}) => {
|
|
1421
|
-
let { action:
|
|
1456
|
+
let { action: s, method: u, encType: c, formData: f, body: d } = ur(o, t);
|
|
1422
1457
|
if (i.navigate === !1) {
|
|
1423
|
-
let h = i.fetcherKey ||
|
|
1424
|
-
await n(h, r, i.action ||
|
|
1458
|
+
let h = i.fetcherKey || Wr();
|
|
1459
|
+
await n(h, r, i.action || s, {
|
|
1425
1460
|
defaultShouldRevalidate: i.defaultShouldRevalidate,
|
|
1426
1461
|
preventScrollReset: i.preventScrollReset,
|
|
1427
1462
|
formData: f,
|
|
1428
1463
|
body: d,
|
|
1429
|
-
formMethod: i.method ||
|
|
1464
|
+
formMethod: i.method || u,
|
|
1430
1465
|
formEncType: i.encType || c,
|
|
1431
1466
|
flushSync: i.flushSync
|
|
1432
1467
|
});
|
|
1433
|
-
} else await a(i.action ||
|
|
1468
|
+
} else await a(i.action || s, {
|
|
1434
1469
|
defaultShouldRevalidate: i.defaultShouldRevalidate,
|
|
1435
1470
|
preventScrollReset: i.preventScrollReset,
|
|
1436
1471
|
formData: f,
|
|
1437
1472
|
body: d,
|
|
1438
|
-
formMethod: i.method ||
|
|
1473
|
+
formMethod: i.method || u,
|
|
1439
1474
|
formEncType: i.encType || c,
|
|
1440
1475
|
replace: i.replace,
|
|
1441
1476
|
state: i.state,
|
|
@@ -1450,59 +1485,59 @@ function Ir() {
|
|
|
1450
1485
|
r
|
|
1451
1486
|
]);
|
|
1452
1487
|
}
|
|
1453
|
-
function
|
|
1454
|
-
let { basename: r } = l.useContext(
|
|
1488
|
+
function Ur(e, { relative: t } = {}) {
|
|
1489
|
+
let { basename: r } = l.useContext(b), n = l.useContext(T);
|
|
1455
1490
|
E(n, "useFormAction must be used inside a RouteContext");
|
|
1456
1491
|
let [a] = n.matches.slice(-1), o = { ...z(e || ".", { relative: t }) }, i = P();
|
|
1457
1492
|
if (e == null) {
|
|
1458
1493
|
o.search = i.search;
|
|
1459
|
-
let
|
|
1460
|
-
if (
|
|
1461
|
-
|
|
1462
|
-
let c =
|
|
1494
|
+
let s = new URLSearchParams(o.search), u = s.getAll("index");
|
|
1495
|
+
if (u.some((c) => c === "")) {
|
|
1496
|
+
s.delete("index"), u.filter((f) => f).forEach((f) => s.append("index", f));
|
|
1497
|
+
let c = s.toString();
|
|
1463
1498
|
o.search = c ? `?${c}` : "";
|
|
1464
1499
|
}
|
|
1465
1500
|
}
|
|
1466
|
-
return (!e || e === ".") && a.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : k([r, o.pathname])),
|
|
1501
|
+
return (!e || e === ".") && a.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : k([r, o.pathname])), Z(o);
|
|
1467
1502
|
}
|
|
1468
|
-
var
|
|
1469
|
-
function
|
|
1503
|
+
var de = "react-router-scroll-positions", X = {};
|
|
1504
|
+
function fe(e, t, r, n) {
|
|
1470
1505
|
let a = null;
|
|
1471
1506
|
return n && (r !== "/" ? a = n({
|
|
1472
1507
|
...e,
|
|
1473
1508
|
pathname: _(e.pathname, r) || e.pathname
|
|
1474
1509
|
}, t) : a = n(e, t)), a == null && (a = e.key), a;
|
|
1475
1510
|
}
|
|
1476
|
-
function
|
|
1477
|
-
let { router: r } =
|
|
1511
|
+
function Br({ getKey: e, storageKey: t } = {}) {
|
|
1512
|
+
let { router: r } = we("useScrollRestoration"), { restoreScrollPosition: n, preventScrollReset: a } = Dr("useScrollRestoration"), { basename: o } = l.useContext(b), i = P(), s = qe(), u = Xt();
|
|
1478
1513
|
l.useEffect(() => (window.history.scrollRestoration = "manual", () => {
|
|
1479
1514
|
window.history.scrollRestoration = "auto";
|
|
1480
|
-
}), []),
|
|
1481
|
-
if (
|
|
1482
|
-
let c =
|
|
1483
|
-
|
|
1515
|
+
}), []), jr(l.useCallback(() => {
|
|
1516
|
+
if (u.state === "idle") {
|
|
1517
|
+
let c = fe(i, s, o, e);
|
|
1518
|
+
X[c] = window.scrollY;
|
|
1484
1519
|
}
|
|
1485
1520
|
try {
|
|
1486
|
-
sessionStorage.setItem(t ||
|
|
1521
|
+
sessionStorage.setItem(t || de, JSON.stringify(X));
|
|
1487
1522
|
} catch (c) {
|
|
1488
|
-
|
|
1523
|
+
L(!1, `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${c}).`);
|
|
1489
1524
|
}
|
|
1490
1525
|
window.history.scrollRestoration = "auto";
|
|
1491
1526
|
}, [
|
|
1492
|
-
|
|
1527
|
+
u.state,
|
|
1493
1528
|
e,
|
|
1494
1529
|
o,
|
|
1495
1530
|
i,
|
|
1496
|
-
|
|
1531
|
+
s,
|
|
1497
1532
|
t
|
|
1498
1533
|
])), typeof document < "u" && (l.useLayoutEffect(() => {
|
|
1499
1534
|
try {
|
|
1500
|
-
let c = sessionStorage.getItem(t ||
|
|
1501
|
-
c && (
|
|
1535
|
+
let c = sessionStorage.getItem(t || de);
|
|
1536
|
+
c && (X = JSON.parse(c));
|
|
1502
1537
|
} catch {
|
|
1503
1538
|
}
|
|
1504
1539
|
}, [t]), l.useLayoutEffect(() => {
|
|
1505
|
-
let c = r?.enableScrollRestoration(
|
|
1540
|
+
let c = r?.enableScrollRestoration(X, () => window.scrollY, e ? (f, d) => fe(f, d, o, e) : void 0);
|
|
1506
1541
|
return () => c && c();
|
|
1507
1542
|
}, [
|
|
1508
1543
|
r,
|
|
@@ -1523,7 +1558,7 @@ function Fr({ getKey: e, storageKey: t } = {}) {
|
|
|
1523
1558
|
}
|
|
1524
1559
|
}
|
|
1525
1560
|
} catch {
|
|
1526
|
-
|
|
1561
|
+
L(!1, `"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`);
|
|
1527
1562
|
}
|
|
1528
1563
|
a !== !0 && window.scrollTo(0, 0);
|
|
1529
1564
|
}
|
|
@@ -1533,7 +1568,7 @@ function Fr({ getKey: e, storageKey: t } = {}) {
|
|
|
1533
1568
|
a
|
|
1534
1569
|
]));
|
|
1535
1570
|
}
|
|
1536
|
-
function
|
|
1571
|
+
function jr(e, t) {
|
|
1537
1572
|
let { capture: r } = t || {};
|
|
1538
1573
|
l.useEffect(() => {
|
|
1539
1574
|
let n = r != null ? { capture: r } : void 0;
|
|
@@ -1542,15 +1577,15 @@ function Ar(e, t) {
|
|
|
1542
1577
|
};
|
|
1543
1578
|
}, [e, r]);
|
|
1544
1579
|
}
|
|
1545
|
-
function
|
|
1546
|
-
let r = l.useContext(
|
|
1580
|
+
function Jr(e, { relative: t } = {}) {
|
|
1581
|
+
let r = l.useContext(Je);
|
|
1547
1582
|
E(r != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
|
|
1548
|
-
let { basename: n } =
|
|
1583
|
+
let { basename: n } = we("useViewTransitionState"), a = z(e, { relative: t });
|
|
1549
1584
|
if (!r.isTransitioning) return !1;
|
|
1550
1585
|
let o = _(r.currentLocation.pathname, n) || r.currentLocation.pathname, i = _(r.nextLocation.pathname, n) || r.nextLocation.pathname;
|
|
1551
|
-
return
|
|
1586
|
+
return ee(a.pathname, i) != null || ee(a.pathname, o) != null;
|
|
1552
1587
|
}
|
|
1553
|
-
var
|
|
1588
|
+
var Zr = () => {
|
|
1554
1589
|
try {
|
|
1555
1590
|
return P(), { isInsideRouter: !0 };
|
|
1556
1591
|
} catch {
|
|
@@ -1558,6 +1593,6 @@ var Gr = () => {
|
|
|
1558
1593
|
}
|
|
1559
1594
|
};
|
|
1560
1595
|
export {
|
|
1561
|
-
|
|
1562
|
-
|
|
1596
|
+
et as n,
|
|
1597
|
+
Zr as t
|
|
1563
1598
|
};
|