@gen-epix/ui-client-common 4.3.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -10
- package/dist/@types/mui.d.ts +1 -1
- package/dist/_chunks/ApplicationFooter.js +49 -49
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +23 -22
- package/dist/_chunks/Breadcrumbs.js.map +1 -1
- package/dist/_chunks/CrudPage.js +211 -210
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/GeoFilter.js.map +1 -1
- package/dist/_chunks/Notifications.js +67 -66
- package/dist/_chunks/Notifications.js.map +1 -1
- package/dist/_chunks/OutageList.js +30 -30
- package/dist/_chunks/OutageList.js.map +1 -1
- package/dist/_chunks/OutageUtil.js +2 -2
- package/dist/_chunks/OutageUtil.js.map +1 -1
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +406 -117
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Reflect.js +642 -0
- package/dist/_chunks/Reflect.js.map +1 -0
- package/dist/_chunks/Table.js +572 -574
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +5 -5
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +1 -1
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +109 -107
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/UserManagerUtil.js +7 -15
- package/dist/_chunks/UserManagerUtil.js.map +1 -1
- package/dist/_chunks/_baseAssignValue.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +8 -8
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseUnset.js +299 -22
- package/dist/_chunks/_baseUnset.js.map +1 -1
- package/dist/_chunks/_cacheHas.js.map +1 -1
- package/dist/_chunks/_setToString.js.map +1 -1
- package/dist/_chunks/decorate.js +9 -0
- package/dist/_chunks/decorateParam.js +8 -0
- package/dist/_chunks/format.js.map +1 -1
- package/dist/_chunks/isArrayLike.js.map +1 -1
- package/dist/_chunks/isObject.js.map +1 -1
- package/dist/_chunks/isSymbol.js.map +1 -1
- package/dist/_chunks/middleware.js +1 -1
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +39 -40
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +13 -17
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/tableStore.js +40 -54
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/toDate.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +2 -2
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +31 -30
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +5 -5
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/TableEventBus/TableEventBus.d.ts +1 -1
- package/dist/classes/TableEventBus/index.js.map +1 -1
- package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
- package/dist/classes/containers/UiClientCommonContainer/UiClientCommonContainer.d.ts +5 -0
- package/dist/classes/containers/UiClientCommonContainer/index.d.ts +1 -0
- package/dist/classes/containers/UiClientCommonContainer/index.js +17 -0
- package/dist/classes/containers/UiClientCommonContainer/index.js.map +1 -0
- package/dist/classes/filters/BooleanFilter.d.ts +1 -1
- package/dist/classes/filters/DateFilter.d.ts +2 -2
- package/dist/classes/filters/GeoFilter.d.ts +2 -2
- package/dist/classes/filters/MultiSelectFilter.d.ts +2 -2
- package/dist/classes/filters/NumberRangeFilter.d.ts +1 -1
- package/dist/classes/filters/TextFilter.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +5 -3
- package/dist/classes/services/AuthenticationService/index.js +34 -661
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/AuthorizationService/AuthorizationService.d.ts +4 -4
- package/dist/classes/services/AuthorizationService/index.js +12 -10
- package/dist/classes/services/AuthorizationService/index.js.map +1 -1
- package/dist/classes/services/BackendVersionService/BackendVersionService.d.ts +0 -3
- package/dist/classes/services/BackendVersionService/index.js +5 -8
- package/dist/classes/services/BackendVersionService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/BreadcrumbService.d.ts +1 -3
- package/dist/classes/services/BreadcrumbService/index.js +19 -21
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/EmotionCacheService.d.ts +4 -4
- package/dist/classes/services/EmotionCacheService/index.js +17 -14
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/FeatureFlagsService/FeatureFlagsService.d.ts +0 -3
- package/dist/classes/services/FeatureFlagsService/index.js +5 -8
- package/dist/classes/services/FeatureFlagsService/index.js.map +1 -1
- package/dist/classes/services/I18nService/I18nService.d.ts +3 -3
- package/dist/classes/services/I18nService/index.js +25 -29
- package/dist/classes/services/I18nService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/InactivityService.d.ts +6 -3
- package/dist/classes/services/InactivityService/index.js +42 -36
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/LogService.d.ts +7 -4
- package/dist/classes/services/LogService/index.js +39 -32
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/NavigationHistoryService/NavigationHistoryService.d.ts +0 -3
- package/dist/classes/services/NavigationHistoryService/index.js +5 -8
- package/dist/classes/services/NavigationHistoryService/index.js.map +1 -1
- package/dist/classes/services/NotificationService/NotificationService.d.ts +4 -4
- package/dist/classes/services/NotificationService/index.js +21 -21
- package/dist/classes/services/NotificationService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/PageEventBusService.d.ts +4 -3
- package/dist/classes/services/PageEventBusService/index.js +18 -15
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/classes/services/QueryClientService/QueryClientService.d.ts +6 -7
- package/dist/classes/services/QueryClientService/index.js +1 -2
- package/dist/classes/services/RouterService/RouterService.d.ts +6 -9
- package/dist/classes/services/RouterService/index.js +8 -12
- package/dist/classes/services/RouterService/index.js.map +1 -1
- package/dist/classes/services/UserSettingsService/UserSettingsService.d.ts +0 -3
- package/dist/classes/services/UserSettingsService/index.js +5 -8
- package/dist/classes/services/UserSettingsService/index.js.map +1 -1
- package/dist/components/app/App/App.d.ts +5 -1
- package/dist/components/app/App/index.js +31 -37
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/AppRouterProvider/AppRouterProvider.d.ts +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +50 -49
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +42 -41
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/AuthenticationWrapper.d.ts +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +68 -67
- package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
- package/dist/components/app/AuthorizationWrapper/index.js +33 -32
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/RouterRoot.d.ts +1 -1
- package/dist/components/app/RouterRoot/index.js +62 -61
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +38 -37
- package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
- package/dist/components/filters/BooleanFilterField/BooleanFilterField.d.ts +1 -1
- package/dist/components/filters/BooleanFilterField/index.js +5 -5
- package/dist/components/filters/BooleanFilterField/index.js.map +1 -1
- package/dist/components/filters/DateFilterField/DateFilterField.d.ts +1 -1
- package/dist/components/filters/DateFilterField/index.js +3 -3
- package/dist/components/filters/DateFilterField/index.js.map +1 -1
- package/dist/components/filters/GeoFilterField/GeoFilterField.d.ts +1 -1
- package/dist/components/filters/GeoFilterField/index.js +4 -4
- package/dist/components/filters/GeoFilterField/index.js.map +1 -1
- package/dist/components/filters/MultiSelectFilterField/MultiSelectFilterField.d.ts +1 -1
- package/dist/components/filters/MultiSelectFilterField/index.js +4 -4
- package/dist/components/filters/MultiSelectFilterField/index.js.map +1 -1
- package/dist/components/filters/NumberRangeFilterField/NumberRangeFilterField.d.ts +1 -1
- package/dist/components/filters/NumberRangeFilterField/index.js +3 -3
- package/dist/components/filters/NumberRangeFilterField/index.js.map +1 -1
- package/dist/components/filters/TextFilterField/TextFilterField.d.ts +1 -1
- package/dist/components/filters/TextFilterField/index.js +3 -3
- package/dist/components/filters/TextFilterField/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBar.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBarActions.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBarActionsFeedbackItem.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBarActionsInfotem.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBarActionsNotificationsItem.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBarActionsOrganizationSwitcherItem.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBarActionsOutagesItem.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBarActionsUserItem.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBarNavigationMenu.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/UserOrganizationAdminMenuItem.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/UserOwnOrganizationMenuItem.d.ts +1 -1
- package/dist/components/ui/ApplicationBar/index.js +242 -241
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/ApplicationFooter/ApplicationFooter.d.ts +1 -1
- package/dist/components/ui/ApplicationFooter/ApplicationFooterLink.d.ts +1 -1
- package/dist/components/ui/ApplicationFooter/ApplicationFooterLinkSection.d.ts +1 -1
- package/dist/components/ui/ApplicationFooter/index.js +1 -2
- package/dist/components/ui/Breadcrumbs/Breadcrumb.d.ts +1 -1
- package/dist/components/ui/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/ui/Breadcrumbs/index.js +1 -2
- package/dist/components/ui/ConsentDialog/index.js +11 -6
- package/dist/components/ui/ConsentDialog/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/GenericErrorMessage.d.ts +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +51 -50
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/LicensesDialog/index.js +66 -69
- package/dist/components/ui/LicensesDialog/index.js.map +1 -1
- package/dist/components/ui/MyPermissionsDialog/index.js +26 -25
- package/dist/components/ui/MyPermissionsDialog/index.js.map +1 -1
- package/dist/components/ui/NavLink/NavLink.d.ts +1 -1
- package/dist/components/ui/NavLink/index.js +6 -6
- package/dist/components/ui/NavLink/index.js.map +1 -1
- package/dist/components/ui/Notifications/NotificationItem.d.ts +2 -2
- package/dist/components/ui/Notifications/NotificationsDrawer.d.ts +1 -1
- package/dist/components/ui/Notifications/index.js +1 -2
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +69 -76
- package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
- package/dist/components/ui/OutageList/OutageItem.d.ts +1 -1
- package/dist/components/ui/OutageList/OutageList.d.ts +1 -1
- package/dist/components/ui/OutageList/OutageSection.d.ts +1 -1
- package/dist/components/ui/OutageList/index.js +1 -2
- package/dist/components/ui/OutagesDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/PageContainer.d.ts +1 -1
- package/dist/components/ui/PageContainer/index.js +57 -52
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/ResponseHandler/ResponseHandler.d.ts +1 -1
- package/dist/components/ui/ResponseHandler/index.js.map +1 -1
- package/dist/components/ui/Sidebar/SidebarItem.d.ts +2 -2
- package/dist/components/ui/Sidebar/SidebarMenu.d.ts +1 -1
- package/dist/components/ui/Sidebar/SidebarMenuItem.d.ts +2 -2
- package/dist/components/ui/Sidebar/index.js +45 -45
- package/dist/components/ui/Sidebar/index.js.map +1 -1
- package/dist/components/ui/SortableList/SortableList.d.ts +1 -1
- package/dist/components/ui/SortableList/SortableListItem.d.ts +1 -1
- package/dist/components/ui/SortableList/SortableListItemDragHandle.d.ts +1 -1
- package/dist/components/ui/SortableList/SortableOverlay.d.ts +1 -1
- package/dist/components/ui/SortableList/context/SortableListItemContextProvider.d.ts +1 -1
- package/dist/components/ui/Table/Table.d.ts +2 -2
- package/dist/components/ui/Table/TableActionsCell.d.ts +2 -2
- package/dist/components/ui/Table/TableCaption.d.ts +1 -1
- package/dist/components/ui/Table/TableCell.d.ts +2 -2
- package/dist/components/ui/Table/TableCellAsyncContent.d.ts +1 -1
- package/dist/components/ui/Table/TableCheckboxCell.d.ts +2 -2
- package/dist/components/ui/Table/TableCheckboxHeader.d.ts +2 -2
- package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +1 -1
- package/dist/components/ui/Table/TableFilter.d.ts +3 -3
- package/dist/components/ui/Table/TableFiltersSidebarItem.d.ts +2 -2
- package/dist/components/ui/Table/TableHeader.d.ts +1 -1
- package/dist/components/ui/Table/TableHeaderCell.d.ts +2 -2
- package/dist/components/ui/Table/TableHeaderFilter.d.ts +3 -3
- package/dist/components/ui/Table/TableMenu.d.ts +1 -1
- package/dist/components/ui/Table/TableReadableIndexCell.d.ts +2 -2
- package/dist/components/ui/Table/TableSidebarMenu.d.ts +1 -1
- package/dist/components/ui/Table/index.js +1 -2
- package/dist/components/ui/UserFeedbackDialog/index.js +65 -64
- package/dist/components/ui/UserFeedbackDialog/index.js.map +1 -1
- package/dist/components/ui/UserInactivityConfirmation/UserInactivityConfirmation.d.ts +1 -1
- package/dist/components/ui/UserInactivityConfirmation/index.js +26 -25
- package/dist/components/ui/UserInactivityConfirmation/index.js.map +1 -1
- package/dist/constants/config.constants.d.ts +5 -0
- package/dist/constants/config.constants.js +6 -0
- package/dist/constants/config.constants.js.map +1 -0
- package/dist/constants/{query.js → query.constants.js} +2 -2
- package/dist/constants/query.constants.js.map +1 -0
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContext.d.ts +6 -2
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContextProvider.d.ts +3 -3
- package/dist/context/uiClientCommonConfigContext/index.js +28 -12
- package/dist/context/uiClientCommonConfigContext/index.js.map +1 -1
- package/dist/context/uiClientCommonConfigContext/useUiClientCommonConfigContext.d.ts +2 -1
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +17 -16
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/useIdentifierIssuerOwnOrganizationQuery.d.ts +1 -1
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +18 -17
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerQuery/useIdentifierIssuerQuery.d.ts +1 -1
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +11 -10
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +22 -21
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/useOrganizationAdminPoliciesQuery.d.ts +1 -1
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +8 -7
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationsQuery/index.js +17 -16
- package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationsQuery/useOrganizationsQuery.d.ts +1 -1
- package/dist/dataHooks/useUsersQuery/index.js +18 -17
- package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
- package/dist/dataHooks/useUsersQuery/useUsersQuery.d.ts +1 -1
- package/dist/hoc/withPermissions/index.js +12 -11
- package/dist/hoc/withPermissions/index.js.map +1 -1
- package/dist/hoc/withPermissions/withPermissions.d.ts +1 -1
- package/dist/hooks/useColumnsMenu/index.js +1 -2
- package/dist/hooks/useColumnsMenu/useColumnsMenu.d.ts +2 -2
- package/dist/hooks/useConfig/index.d.ts +1 -0
- package/dist/hooks/useConfig/index.js +7 -0
- package/dist/hooks/useConfig/index.js.map +1 -0
- package/dist/hooks/useConfig/useConfig.d.ts +2 -0
- package/dist/hooks/useCreateMutation/index.js +25 -24
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useCreateMutation/useCreateMutation.d.ts +1 -1
- package/dist/hooks/useDeleteMutation/index.js +24 -23
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/useDeleteMutation.d.ts +1 -1
- package/dist/hooks/useEditMutation/index.js +33 -32
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -1
- package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
- package/dist/hooks/useInitializeTableStore/useInitializeTableStore.d.ts +1 -1
- package/dist/hooks/useItemQuery/index.js +36 -35
- package/dist/hooks/useItemQuery/index.js.map +1 -1
- package/dist/hooks/useItemQuery/useItemQuery.d.ts +1 -1
- package/dist/hooks/useQueryMemo/index.js +1 -2
- package/dist/hooks/useUpdateBreadcrumb/index.js +10 -9
- package/dist/hooks/useUpdateBreadcrumb/index.js.map +1 -1
- package/dist/hooks/useUpdateDocumentTitle/index.js +4 -3
- package/dist/hooks/useUpdateDocumentTitle/index.js.map +1 -1
- package/dist/models/{admin.js → admin.models.js} +2 -2
- package/dist/models/admin.models.js.map +1 -0
- package/dist/models/api.models.d.ts +16 -0
- package/dist/models/api.models.js +6 -0
- package/dist/models/api.models.js.map +1 -0
- package/dist/models/{dataHooks.d.ts → data-hooks.models.d.ts} +1 -1
- package/dist/models/{table.d.ts → table.models.d.ts} +2 -2
- package/dist/models/{table.js → table.models.js} +2 -2
- package/dist/models/table.models.js.map +1 -0
- package/dist/pages/AcceptInvitationPage/AcceptInvitationPage.d.ts +1 -1
- package/dist/pages/AcceptInvitationPage/index.js +40 -39
- package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
- package/dist/pages/AdminPage/AdminPage.d.ts +1 -1
- package/dist/pages/AdminPage/index.js +39 -38
- package/dist/pages/AdminPage/index.js.map +1 -1
- package/dist/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.d.ts +2 -2
- package/dist/pages/ChooseIdentityProviderPage/index.js +38 -37
- package/dist/pages/ChooseIdentityProviderPage/index.js.map +1 -1
- package/dist/pages/CrudPage/CrudPage.d.ts +7 -7
- package/dist/pages/CrudPage/CrudPageDeleteDialog.d.ts +1 -1
- package/dist/pages/CrudPage/CrudPageEditDialog.d.ts +2 -2
- package/dist/pages/CrudPage/index.js +1 -2
- package/dist/pages/ErrorPage/ErrorPage.d.ts +1 -1
- package/dist/pages/ErrorPage/index.js.map +1 -1
- package/dist/pages/IdentifierIssuersAdminPage/IdentifierIssuersAdminPage.d.ts +1 -1
- package/dist/pages/IdentifierIssuersAdminPage/index.js +41 -40
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/OrganizationAdminPoliciesAdminPage.d.ts +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +58 -57
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationContactsAdminPage/OrganizationContactsAdminPage.d.ts +1 -1
- package/dist/pages/OrganizationContactsAdminPage/index.js +49 -48
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/OrganizationSitesAdminPage.d.ts +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +44 -43
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/OrganizationsAdminPage.d.ts +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +57 -56
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/OutagesAdminPage.d.ts +1 -1
- package/dist/pages/OutagesAdminPage/index.js +63 -62
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/PostLoginPage/PostLoginPage.d.ts +1 -1
- package/dist/pages/PostLoginPage/index.js +14 -13
- package/dist/pages/PostLoginPage/index.js.map +1 -1
- package/dist/pages/PostLogoutPage/PostLogoutPage.d.ts +1 -1
- package/dist/pages/PostLogoutPage/index.js +19 -18
- package/dist/pages/PostLogoutPage/index.js.map +1 -1
- package/dist/pages/RouterErrorPage/RouterErrorPage.d.ts +1 -1
- package/dist/pages/RouterErrorPage/index.js.map +1 -1
- package/dist/pages/UserInvitationsAdminPage/UserInvitationsAdminPage.d.ts +1 -1
- package/dist/pages/UserInvitationsAdminPage/index.js +1 -2
- package/dist/pages/UsersAdminPage/UsersAdminPage.d.ts +2 -2
- package/dist/pages/UsersAdminPage/index.js +110 -109
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/routes/adminRoutes.d.ts +1 -1
- package/dist/routes/index.js +1 -1
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/routes.d.ts +1 -1
- package/dist/setup/setup.js.map +1 -1
- package/dist/stores/oidcStore/index.js.map +1 -1
- package/dist/stores/outagesStore/index.js.map +1 -1
- package/dist/stores/outagesStore/outagesStore.d.ts +1 -1
- package/dist/stores/tableStore/TableStoreContextProvider.d.ts +1 -1
- package/dist/stores/tableStore/index.js +1 -2
- package/dist/stores/tableStore/tableStore.d.ts +2 -2
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/AxiosUtil/index.js.map +1 -1
- package/dist/utils/DataHookUtil/DataHookUtil.d.ts +1 -1
- package/dist/utils/DataHookUtil/index.js.map +1 -1
- package/dist/utils/LoadableUtil/LoadableUtil.d.ts +1 -1
- package/dist/utils/LoadableUtil/index.js.map +1 -1
- package/dist/utils/MenuDataUtil/MenuDataUtil.d.ts +1 -1
- package/dist/utils/MenuDataUtil/index.js.map +1 -1
- package/dist/utils/NotificationUtil/index.js.map +1 -1
- package/dist/utils/OutageUtil/OutageUtil.d.ts +1 -1
- package/dist/utils/OutageUtil/index.js +1 -2
- package/dist/utils/StandardConfigUtil/StandardConfigUtil.d.ts +1 -1
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/TableUtil/TableUtil.d.ts +4 -4
- package/dist/utils/TableUtil/index.js +1 -2
- package/dist/utils/TimeUtil/index.js.map +1 -1
- package/dist/utils/UserManagerUtil/index.js +1 -2
- package/dist/utils/UserUtil/index.js.map +1 -1
- package/package.json +93 -87
- package/dist/_chunks/_baseGet.js +0 -280
- package/dist/_chunks/_baseGet.js.map +0 -1
- package/dist/_chunks/_baseIteratee.js +0 -274
- package/dist/_chunks/_baseIteratee.js.map +0 -1
- package/dist/_chunks/last.js +0 -13
- package/dist/_chunks/last.js.map +0 -1
- package/dist/_chunks/uniq.js +0 -44
- package/dist/_chunks/uniq.js.map +0 -1
- package/dist/classes/services/ApiService/ApiService.d.ts +0 -19
- package/dist/classes/services/ApiService/index.d.ts +0 -1
- package/dist/classes/services/ApiService/index.js +0 -21
- package/dist/classes/services/ApiService/index.js.map +0 -1
- package/dist/classes/services/ConfigService/ConfigService.d.ts +0 -9
- package/dist/classes/services/ConfigService/index.d.ts +0 -1
- package/dist/classes/services/ConfigService/index.js +0 -21
- package/dist/classes/services/ConfigService/index.js.map +0 -1
- package/dist/constants/query.js.map +0 -1
- package/dist/models/admin.js.map +0 -1
- package/dist/models/api.d.ts +0 -9
- package/dist/models/table.js.map +0 -1
- package/dist/models/theme.js +0 -0
- /package/dist/constants/{query.d.ts → query.constants.d.ts} +0 -0
- /package/dist/models/{admin.d.ts → admin.models.d.ts} +0 -0
- /package/dist/models/{auth.d.ts → auth.models.d.ts} +0 -0
- /package/dist/models/{api.js → auth.models.js} +0 -0
- /package/dist/models/{config.d.ts → config.models.d.ts} +0 -0
- /package/dist/models/{auth.js → config.models.js} +0 -0
- /package/dist/models/{config.js → data-hooks.models.js} +0 -0
- /package/dist/models/{data.d.ts → data.models.d.ts} +0 -0
- /package/dist/models/{data.js → data.models.js} +0 -0
- /package/dist/models/{filter.d.ts → filter.models.d.ts} +0 -0
- /package/dist/models/{dataHooks.js → filter.models.js} +0 -0
- /package/dist/models/{notification.d.ts → notification.models.d.ts} +0 -0
- /package/dist/models/{filter.js → notification.models.js} +0 -0
- /package/dist/models/{outage.d.ts → outage.models.d.ts} +0 -0
- /package/dist/models/{notification.js → outage.models.js} +0 -0
- /package/dist/models/{reactRouter.d.ts → react-router.models.d.ts} +0 -0
- /package/dist/models/{outage.js → react-router.models.js} +0 -0
- /package/dist/models/{theme.d.ts → theme.models.d.ts} +0 -0
- /package/dist/models/{reactRouter.js → theme.models.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientService.js","names":[],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/mutation.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_basePullAt.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/remove.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/uniqBy.js","../../src/classes/services/QueryClientService/QueryClientService.ts"],"sourcesContent":["import { notifyManager } from \"./notifyManager.js\";\nimport { createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\n//#region src/mutation.ts\n/**\n* Represents a single mutation attempt. A `Mutation` holds the mutation's\n* options, state (data/error/status), and the `MutationObserver`s currently\n* subscribed to it.\n*\n* Instances are created and managed internally by `MutationCache`; application\n* code typically interacts with mutations indirectly through `QueryClient` or\n* a framework hook like `useMutation`. Direct access to a `Mutation` instance\n* is possible via `mutationCache.find()`/`getAll()` for inspecting cache state.\n*\n* @example\n* ```ts\n* const mutationCache = queryClient.getMutationCache()\n*\n* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n* ```\n*/\nvar Mutation = class extends Removable {\n\t#client;\n\t#observers;\n\t#mutationCache;\n\t#retryer;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.#client = config.client;\n\t\tthis.mutationId = config.mutationId;\n\t\tthis.#mutationCache = config.mutationCache;\n\t\tthis.#observers = [];\n\t\tthis.state = config.state || getDefaultState();\n\t\tthis.setOptions(config.options);\n\t\tthis.scheduleGc();\n\t}\n\t/** @internal */\n\tsetOptions(options) {\n\t\tthis.options = options;\n\t\tthis.updateGcTime(this.options.gcTime);\n\t}\n\t/**\n\t* The `meta` object passed in the mutation's options, if any.\n\t*/\n\tget meta() {\n\t\treturn this.options.meta;\n\t}\n\t/** @internal */\n\taddObserver(observer) {\n\t\tif (!this.#observers.includes(observer)) {\n\t\t\tthis.#observers.push(observer);\n\t\t\tthis.clearGcTimeout();\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\ttype: \"observerAdded\",\n\t\t\t\tmutation: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\t/** @internal */\n\tremoveObserver(observer) {\n\t\tthis.#observers = this.#observers.filter((x) => x !== observer);\n\t\tthis.scheduleGc();\n\t\tthis.#mutationCache.notify({\n\t\t\ttype: \"observerRemoved\",\n\t\t\tmutation: this,\n\t\t\tobserver\n\t\t});\n\t}\n\toptionalRemove() {\n\t\tif (!this.#observers.length) {\n\t\t\tif (this.state.status === \"pending\") this.scheduleGc();\n\t\t\telse this.#mutationCache.remove(this);\n\t\t}\n\t}\n\t/**\n\t* Resumes a mutation that is currently paused or was restored from a\n\t* dehydrated, still-`pending` state.\n\t*\n\t* - If this mutation has an active retryer (it paused mid-attempt, e.g. due\n\t* to the network mode or scope-based queuing), its retryer is resumed.\n\t* - Otherwise, if the mutation's status is still `pending` (e.g. it was\n\t* dehydrated while an attempt was in flight and never got a retryer in\n\t* this instance), `execute` is called again with the last known variables.\n\t* - Otherwise the mutation has already settled and this resolves immediately\n\t* without running anything again.\n\t*\n\t* @example\n\t* ```ts\n\t* // typically driven by reconnect handling, e.g. queryClient.resumePausedMutations()\n\t* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n\t* await mutation?.continue()\n\t* ```\n\t*\n\t* @see {@link Mutation#execute}\n\t*/\n\tcontinue() {\n\t\treturn this.#retryer?.continue() ?? (this.state.status === \"pending\" ? this.execute(this.state.variables) : Promise.resolve());\n\t}\n\t/**\n\t* Runs the mutation function for the given variables through a retryer, and\n\t* drives the mutation's state and lifecycle callbacks through to settlement.\n\t*\n\t* If this mutation's state is already `pending` when `execute` is called\n\t* (i.e. it was restored, still in-flight, from a dehydrated state), the\n\t* `onMutate` step is skipped and a `continue` action is dispatched to\n\t* unpause it; otherwise a `pending` action is dispatched first, then the\n\t* mutation cache's `onMutate` and the mutation's own `onMutate` option are\n\t* awaited in that order, and the resulting context is stored.\n\t*\n\t* The mutation function is then run (subject to `retry`/`retryDelay`/\n\t* `networkMode`, and to the mutation cache's scope-based serialization).\n\t* On success, the cache's `onSuccess`/`onSettled` callbacks run before the\n\t* mutation's own `onSuccess`/`onSettled` options, a `success` action is\n\t* dispatched, and the resolved data is returned. On failure, the same\n\t* cache-then-option ordering is used for `onError`/`onSettled`, but each of\n\t* those four callbacks is individually caught so that a throwing callback\n\t* cannot mask the original error; an `error` action is then dispatched and\n\t* the original error is re-thrown.\n\t*\n\t* @example\n\t* ```ts\n\t* // Called internally by `MutationObserver.mutate` and `Mutation.continue` —\n\t* // applications normally trigger mutations through those, not this method.\n\t* const data = await mutation.execute(variables)\n\t* ```\n\t*\n\t* @see {@link Mutation#continue}\n\t*/\n\tasync execute(variables) {\n\t\tconst onContinue = () => {\n\t\t\tthis.#dispatch({ type: \"continue\" });\n\t\t};\n\t\tconst mutationFnContext = {\n\t\t\tclient: this.#client,\n\t\t\tmeta: this.options.meta,\n\t\t\tmutationKey: this.options.mutationKey\n\t\t};\n\t\tconst retryer = this.#retryer = createRetryer({\n\t\t\tfn: () => {\n\t\t\t\tif (!this.options.mutationFn) return Promise.reject(/* @__PURE__ */ new Error(\"No mutationFn found\"));\n\t\t\t\treturn this.options.mutationFn(variables, mutationFnContext);\n\t\t\t},\n\t\t\tonFail: (failureCount, error) => {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\tfailureCount,\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t},\n\t\t\tonPause: () => {\n\t\t\t\tthis.#dispatch({ type: \"pause\" });\n\t\t\t},\n\t\t\tonContinue,\n\t\t\tretry: this.options.retry ?? 0,\n\t\t\tretryDelay: this.options.retryDelay,\n\t\t\tnetworkMode: this.options.networkMode,\n\t\t\tcanRun: () => this.#mutationCache.canRun(this)\n\t\t});\n\t\tconst restored = this.state.status === \"pending\";\n\t\tconst isPaused = !retryer.canStart();\n\t\ttry {\n\t\t\tif (restored) onContinue();\n\t\t\telse {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t\tif (this.#mutationCache.config.onMutate) await this.#mutationCache.config.onMutate(variables, this, mutationFnContext);\n\t\t\t\tconst context = await this.options.onMutate?.(variables, mutationFnContext);\n\t\t\t\tif (context !== this.state.context) this.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst data = await retryer.start();\n\t\t\tawait this.#mutationCache.config.onSuccess?.(data, variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSuccess?.(data, variables, this.state.context, mutationFnContext);\n\t\t\tawait this.#mutationCache.config.onSettled?.(data, null, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSettled?.(data, null, variables, this.state.context, mutationFnContext);\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"success\",\n\t\t\t\tdata\n\t\t\t});\n\t\t\treturn data;\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onError?.(error, variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onError?.(error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onSettled?.(void 0, error, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onSettled?.(void 0, error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t});\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (this.#retryer === retryer) this.#retryer = void 0;\n\t\t\tthis.#mutationCache.runNext(this);\n\t\t}\n\t}\n\t#dispatch(action) {\n\t\tconst reducer = (state) => {\n\t\t\tswitch (action.type) {\n\t\t\t\tcase \"failed\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfailureCount: action.failureCount,\n\t\t\t\t\tfailureReason: action.error\n\t\t\t\t};\n\t\t\t\tcase \"pause\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: true\n\t\t\t\t};\n\t\t\t\tcase \"continue\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"pending\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tcontext: action.context,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tisPaused: action.isPaused,\n\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\tvariables: action.variables,\n\t\t\t\t\tsubmittedAt: Date.now()\n\t\t\t\t};\n\t\t\t\tcase \"success\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: action.data,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"error\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\terror: action.error,\n\t\t\t\t\tfailureCount: state.failureCount + 1,\n\t\t\t\t\tfailureReason: action.error,\n\t\t\t\t\tisPaused: false,\n\t\t\t\t\tstatus: \"error\"\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tthis.state = reducer(this.state);\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#observers.forEach((observer) => {\n\t\t\t\tobserver.onMutationUpdate(action);\n\t\t\t});\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\tmutation: this,\n\t\t\t\ttype: \"updated\",\n\t\t\t\taction\n\t\t\t});\n\t\t});\n\t}\n};\nfunction getDefaultState() {\n\treturn {\n\t\tcontext: void 0,\n\t\tdata: void 0,\n\t\terror: null,\n\t\tfailureCount: 0,\n\t\tfailureReason: null,\n\t\tisPaused: false,\n\t\tstatus: \"idle\",\n\t\tvariables: void 0,\n\t\tsubmittedAt: 0\n\t};\n}\n//#endregion\nexport { Mutation, getDefaultState };\n\n//# sourceMappingURL=mutation.js.map","import { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\n//#region src/mutationCache.ts\n/**\n* The `MutationCache` is the storage for mutations.\n*\n* Normally, you will not interact with the `MutationCache` directly and instead use a\n* `QueryClient`. You can subscribe to it (inherited from `Subscribable`) to be informed of\n* safe/known updates to the cache, such as mutations being added, removed, or updated.\n*\n* @example\n* ```ts\n* const unsubscribe = mutationCache.subscribe((event) => {\n* console.log(event.type, event.mutation)\n* })\n* ```\n*/\nvar MutationCache = class extends Subscribable {\n\t#mutations;\n\t#scopes;\n\t#mutationId;\n\tconstructor(config = {}) {\n\t\tsuper();\n\t\tthis.config = config;\n\t\tthis.#mutations = /* @__PURE__ */ new Set();\n\t\tthis.#scopes = /* @__PURE__ */ new Map();\n\t\tthis.#mutationId = 0;\n\t}\n\t/** @internal */\n\tbuild(client, options, state) {\n\t\tconst mutation = new Mutation({\n\t\t\tclient,\n\t\t\tmutationCache: this,\n\t\t\tmutationId: ++this.#mutationId,\n\t\t\toptions: client.defaultMutationOptions(options),\n\t\t\tstate\n\t\t});\n\t\tthis.add(mutation);\n\t\treturn mutation;\n\t}\n\t/** @internal */\n\tadd(mutation) {\n\t\tthis.#mutations.add(mutation);\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") {\n\t\t\tconst scopedMutations = this.#scopes.get(scope);\n\t\t\tif (scopedMutations) scopedMutations.push(mutation);\n\t\t\telse this.#scopes.set(scope, [mutation]);\n\t\t}\n\t\tthis.notify({\n\t\t\ttype: \"added\",\n\t\t\tmutation\n\t\t});\n\t}\n\t/** @internal */\n\tremove(mutation) {\n\t\tif (this.#mutations.delete(mutation)) {\n\t\t\tconst scope = scopeFor(mutation);\n\t\t\tif (typeof scope === \"string\") {\n\t\t\t\tconst scopedMutations = this.#scopes.get(scope);\n\t\t\t\tif (scopedMutations) {\n\t\t\t\t\tif (scopedMutations.length > 1) {\n\t\t\t\t\t\tconst index = scopedMutations.indexOf(mutation);\n\t\t\t\t\t\tif (index !== -1) scopedMutations.splice(index, 1);\n\t\t\t\t\t} else if (scopedMutations[0] === mutation) this.#scopes.delete(scope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.notify({\n\t\t\ttype: \"removed\",\n\t\t\tmutation\n\t\t});\n\t}\n\t/** @internal */\n\tcanRun(mutation) {\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") {\n\t\t\tconst firstPendingMutation = this.#scopes.get(scope)?.find((m) => m.state.status === \"pending\");\n\t\t\treturn !firstPendingMutation || firstPendingMutation === mutation;\n\t\t} else return true;\n\t}\n\t/** @internal */\n\trunNext(mutation) {\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") return (this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused))?.continue() ?? Promise.resolve();\n\t\telse return Promise.resolve();\n\t}\n\t/**\n\t* Removes all mutations from the cache.\n\t*\n\t* @example\n\t* ```ts\n\t* const mutationCache = queryClient.getMutationCache()\n\t*\n\t* mutationCache.clear()\n\t* ```\n\t*/\n\tclear() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#mutations.forEach((mutation) => {\n\t\t\t\tthis.notify({\n\t\t\t\t\ttype: \"removed\",\n\t\t\t\t\tmutation\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis.#mutations.clear();\n\t\t\tthis.#scopes.clear();\n\t\t});\n\t}\n\t/**\n\t* Returns all mutations within the cache.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about a mutation in rare scenarios.\n\t*\n\t* @example\n\t* ```ts\n\t* const mutationCache = queryClient.getMutationCache()\n\t*\n\t* const mutations = mutationCache.getAll()\n\t* ```\n\t*/\n\tgetAll() {\n\t\treturn Array.from(this.#mutations);\n\t}\n\t/**\n\t* A slightly more advanced method that can be used to get an existing mutation instance from\n\t* the cache. If the mutation does not exist, `undefined` is returned.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about a mutation in rare scenarios.\n\t*\n\t* @see {@link MutationCache#findAll}\n\t* @example\n\t* ```ts\n\t* const mutationCache = queryClient.getMutationCache()\n\t*\n\t* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n\t* ```\n\t*/\n\tfind(filters) {\n\t\tconst defaultedFilters = {\n\t\t\texact: true,\n\t\t\t...filters\n\t\t};\n\t\treturn this.getAll().find((mutation) => matchMutation(defaultedFilters, mutation));\n\t}\n\t/**\n\t* An even more advanced method that can be used to get existing mutation instances from the\n\t* cache that match the given filters. If no mutations match, an empty array is returned.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about mutations in rare scenarios.\n\t*\n\t* @see {@link MutationCache#find}\n\t* @example\n\t* ```ts\n\t* const mutationCache = queryClient.getMutationCache()\n\t*\n\t* const mutations = mutationCache.findAll({ mutationKey: ['addPost'] })\n\t* ```\n\t*/\n\tfindAll(filters = {}) {\n\t\treturn this.getAll().filter((mutation) => matchMutation(filters, mutation));\n\t}\n\t/** @internal */\n\tnotify(event) {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(event);\n\t\t\t});\n\t\t});\n\t}\n\t/** @internal */\n\tresumePausedMutations() {\n\t\tconst pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n\t\treturn notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop))));\n\t}\n};\nfunction scopeFor(mutation) {\n\treturn mutation.options.scope?.id;\n}\n//#endregion\nexport { MutationCache };\n\n//# sourceMappingURL=mutationCache.js.map","import { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Query } from \"./query.js\";\n//#region src/queryCache.ts\n/**\n* The `QueryCache` is the storage mechanism for TanStack Query. It stores all the data, meta\n* information, and state of the queries it contains.\n*\n* Normally, you will not interact with the `QueryCache` directly and instead use a `QueryClient`\n* for a specific cache. You can subscribe to it (inherited from `Subscribable`) to be informed of\n* safe/known updates to the cache, such as queries being added, removed, or updated — updates made\n* outside of the cache's own tracked mechanisms (e.g. mutating a query's state object directly) do\n* not notify subscribers.\n*\n* @example\n* ```ts\n* const unsubscribe = queryCache.subscribe((event) => {\n* console.log(event.type, event.query)\n* })\n* ```\n*/\nvar QueryCache = class extends Subscribable {\n\t#queries;\n\tconstructor(config = {}) {\n\t\tsuper();\n\t\tthis.config = config;\n\t\tthis.#queries = /* @__PURE__ */ new Map();\n\t}\n\t/**\n\t* Returns the existing `Query` instance for the given options' `queryKey`/`queryHash`, or\n\t* builds and adds a new one to the cache if none exists yet. Used by framework adapters and\n\t* plugins (e.g. broadcast/persistence) that need to get-or-create a `Query` directly, bypassing\n\t* the reactive `QueryObserver` machinery.\n\t*\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* const query = queryCache.build(queryClient, {\n\t* queryKey: ['posts'],\n\t* queryFn: fetchPosts,\n\t* })\n\t* ```\n\t*/\n\tbuild(client, options, state) {\n\t\tconst queryKey = options.queryKey;\n\t\tconst queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n\t\tlet query = this.get(queryHash);\n\t\tif (!query) {\n\t\t\tquery = new Query({\n\t\t\t\tclient,\n\t\t\t\tqueryKey,\n\t\t\t\tqueryHash,\n\t\t\t\toptions: client.defaultQueryOptions(options),\n\t\t\t\tstate,\n\t\t\t\tdefaultOptions: client.getQueryDefaults(queryKey)\n\t\t\t});\n\t\t\tthis.add(query);\n\t\t}\n\t\treturn query;\n\t}\n\t/** @internal */\n\tadd(query) {\n\t\tif (!this.#queries.has(query.queryHash)) {\n\t\t\tthis.#queries.set(query.queryHash, query);\n\t\t\tthis.notify({\n\t\t\t\ttype: \"added\",\n\t\t\t\tquery\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Destroys the given `Query` and removes it from the cache, notifying subscribers with a\n\t* `'removed'` event. A no-op if the query is no longer the one currently stored under its hash\n\t* (e.g. it was already replaced). Used by plugins (e.g. the broadcast client) that mirror\n\t* removals across `QueryCache` instances.\n\t*\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t* const query = queryCache.find({ queryKey: ['posts'] })\n\t*\n\t* if (query) {\n\t* queryCache.remove(query)\n\t* }\n\t* ```\n\t*/\n\tremove(query) {\n\t\tconst queryInMap = this.#queries.get(query.queryHash);\n\t\tif (queryInMap) {\n\t\t\tquery.destroy();\n\t\t\tif (queryInMap === query) this.#queries.delete(query.queryHash);\n\t\t\tthis.notify({\n\t\t\t\ttype: \"removed\",\n\t\t\t\tquery\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Removes all queries from the cache.\n\t*\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* queryCache.clear()\n\t* ```\n\t*/\n\tclear() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tthis.remove(query);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Returns the `Query` instance stored under the given `queryHash`, or `undefined` if none\n\t* exists. Unlike {@link QueryCache#find}, this looks up by the already-computed hash rather\n\t* than by `QueryFilters`. Used by plugins (e.g. broadcast/hydration) that already have a hash\n\t* to look up directly.\n\t*\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t* const queryHash = hashKey(['posts'])\n\t*\n\t* const query = queryCache.get(queryHash)\n\t* ```\n\t*/\n\tget(queryHash) {\n\t\treturn this.#queries.get(queryHash);\n\t}\n\t/**\n\t* Returns all queries within the cache.\n\t*\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* const queries = queryCache.getAll()\n\t* ```\n\t*/\n\tgetAll() {\n\t\treturn [...this.#queries.values()];\n\t}\n\t/**\n\t* A slightly more advanced method that can be used to get an existing query instance from the\n\t* cache. This instance not only contains all the state for the query, but all of the instances,\n\t* and underlying guts of the query as well. If the query does not exist, `undefined` is\n\t* returned.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about a query in rare scenarios (e.g. looking at `query.state.dataUpdatedAt` to\n\t* decide whether a query is fresh enough to be used as an initial value).\n\t*\n\t* @see {@link QueryCache#findAll}\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* const query = queryCache.find({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tfind(filters) {\n\t\tconst defaultedFilters = {\n\t\t\texact: true,\n\t\t\t...filters\n\t\t};\n\t\treturn this.getAll().find((query) => matchQuery(defaultedFilters, query));\n\t}\n\t/**\n\t* An even more advanced method that can be used to get existing query instances from the cache\n\t* that partially match a query key. If no queries match, an empty array is returned.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about queries in rare scenarios.\n\t*\n\t* @see {@link QueryCache#find}\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* const queries = queryCache.findAll({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tfindAll(filters = {}) {\n\t\tconst queries = this.getAll();\n\t\treturn Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n\t}\n\t/** @internal */\n\tnotify(event) {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(event);\n\t\t\t});\n\t\t});\n\t}\n\t/** @internal */\n\tonFocus() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tquery.onFocus();\n\t\t\t});\n\t\t});\n\t}\n\t/** @internal */\n\tonOnline() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tquery.onOnline();\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { QueryCache };\n\n//# sourceMappingURL=queryCache.js.map","import { functionalUpdate, hashKey, hashQueryKeyByOptions, noop, partialMatchKey, resolveQueryValue, skipToken } from \"./utils.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { QueryCache } from \"./queryCache.js\";\n//#region src/queryClient.ts\n/**\n* `QueryClient` is used to interact with a cache of queries and mutations. It owns a\n* `QueryCache` and a `MutationCache` (creating default ones if none are passed in) and holds\n* the default options that are applied to queries and mutations created through it.\n*\n* @example\n* ```ts\n* const queryClient = new QueryClient({\n* defaultOptions: {\n* queries: {\n* staleTime: Infinity,\n* },\n* },\n* })\n*\n* await queryClient.query({ queryKey: ['posts'], queryFn: fetchPosts })\n* ```\n*/\nvar QueryClient = class {\n\t#queryCache;\n\t#mutationCache;\n\t#defaultOptions;\n\t#queryDefaults;\n\t#mutationDefaults;\n\t#mountCount;\n\t#unsubscribeFocus;\n\t#unsubscribeOnline;\n\tconstructor(config = {}) {\n\t\tthis.#queryCache = config.queryCache || new QueryCache();\n\t\tthis.#mutationCache = config.mutationCache || new MutationCache();\n\t\tthis.#defaultOptions = config.defaultOptions || {};\n\t\tthis.#queryDefaults = /* @__PURE__ */ new Map();\n\t\tthis.#mutationDefaults = /* @__PURE__ */ new Map();\n\t\tthis.#mountCount = 0;\n\t}\n\t/**\n\t* Called by a framework adapter's `QueryClientProvider`-equivalent when it mounts, to start\n\t* listening for focus/online events and resume paused mutations. Ref-counted via an internal\n\t* mount count, so nested or multiple providers sharing the same `QueryClient` don't tear down\n\t* the shared listeners until the last one unmounts.\n\t*/\n\tmount() {\n\t\tthis.#mountCount++;\n\t\tif (this.#mountCount !== 1) return;\n\t\tthis.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n\t\t\tif (focused) {\n\t\t\t\tawait this.resumePausedMutations();\n\t\t\t\tthis.#queryCache.onFocus();\n\t\t\t}\n\t\t});\n\t\tthis.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n\t\t\tif (online) {\n\t\t\t\tawait this.resumePausedMutations();\n\t\t\t\tthis.#queryCache.onOnline();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* The inverse of {@link QueryClient#mount} — called by a framework adapter's\n\t* `QueryClientProvider`-equivalent when it unmounts. Only tears down the focus/online\n\t* listeners once the mount count returns to `0`.\n\t*/\n\tunmount() {\n\t\tthis.#mountCount--;\n\t\tif (this.#mountCount !== 0) return;\n\t\tthis.#unsubscribeFocus?.();\n\t\tthis.#unsubscribeFocus = void 0;\n\t\tthis.#unsubscribeOnline?.();\n\t\tthis.#unsubscribeOnline = void 0;\n\t}\n\t/**\n\t* Returns the number of queries in the cache that are currently fetching, optionally\n\t* matching a set of filters. This includes background-fetching, loading new pages, and\n\t* loading more infinite query results.\n\t*\n\t* @example\n\t* ```ts\n\t* if (queryClient.isFetching()) {\n\t* console.log('At least one query is fetching!')\n\t* }\n\t* ```\n\t*/\n\tisFetching(filters) {\n\t\treturn this.#queryCache.findAll({\n\t\t\t...filters,\n\t\t\tfetchStatus: \"fetching\"\n\t\t}).length;\n\t}\n\t/**\n\t* Returns the number of mutations in the cache that are currently pending, optionally\n\t* matching a set of filters.\n\t*\n\t* @example\n\t* ```ts\n\t* if (queryClient.isMutating()) {\n\t* console.log('At least one mutation is pending!')\n\t* }\n\t* ```\n\t*/\n\tisMutating(filters) {\n\t\treturn this.#mutationCache.findAll({\n\t\t\t...filters,\n\t\t\tstatus: \"pending\"\n\t\t}).length;\n\t}\n\t/**\n\t* Imperative (non-reactive) way to retrieve data for a QueryKey.\n\t* Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.\n\t*\n\t* Hint: Do not use this function inside a component, because it won't receive updates.\n\t* Use `useQuery` to create a `QueryObserver` that subscribes to changes.\n\t*\n\t* @see {@link QueryClient#getQueriesData}\n\t*/\n\tgetQueryData(queryKey) {\n\t\tconst options = this.defaultQueryOptions({ queryKey });\n\t\treturn this.#queryCache.get(options.queryHash)?.state.data;\n\t}\n\t/**\n\t* @deprecated Use queryClient.query({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.\n\t*/\n\tensureQueryData(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\tconst cachedData = query.state.data;\n\t\tif (cachedData === void 0) return this.fetchQuery(options);\n\t\tif (options.revalidateIfStale && query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query))) this.prefetchQuery(defaultedOptions);\n\t\treturn Promise.resolve(cachedData);\n\t}\n\t/**\n\t* Imperative (non-reactive) way to retrieve the cached data of multiple queries at once.\n\t* Only queries matching the given filters are returned; if none match, an empty array is\n\t* returned.\n\t*\n\t* Because the matched queries can hold data of different shapes (e.g. a broad filter can match\n\t* queries with unrelated data types), the `TQueryFnData` generic defaults to `unknown` rather\n\t* than being inferred. Passing a more specific type is a convenience for call sites that know\n\t* every matched query holds the same shape — it is not checked against the actual cache\n\t* contents.\n\t*\n\t* @see {@link QueryClient#getQueryData}\n\t* @example\n\t* ```ts\n\t* const data = queryClient.getQueriesData({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tgetQueriesData(filters) {\n\t\treturn this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n\t\t\treturn [queryKey, state.data];\n\t\t});\n\t}\n\t/**\n\t* Synchronous way to immediately update a query's cached data. If the updater (or the value\n\t* passed) resolves to `undefined`, the cache is left untouched and no query is created;\n\t* otherwise, if the query does not exist yet, it will be created. To update multiple queries\n\t* at once by partially matching query keys, use {@link QueryClient#setQueriesData} instead.\n\t*\n\t* Updates must be performed immutably: do not mutate `oldData`, or data previously retrieved\n\t* via {@link QueryClient#getQueryData}, in place.\n\t*\n\t* @param queryKey - The query key to set data for.\n\t* @param updater - Either the new data, or a function that receives the current data (which\n\t* may be `undefined`) and returns the new data.\n\t*\n\t* @example\n\t* ```ts\n\t* queryClient.setQueryData(['posts'], newPosts)\n\t*\n\t* // Or, using an updater function that receives the current data:\n\t* queryClient.setQueryData(['posts'], (oldPosts) => [...oldPosts, newPost])\n\t* ```\n\t*/\n\tsetQueryData(queryKey, updater, options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions({ queryKey });\n\t\tconst prevData = this.#queryCache.get(defaultedOptions.queryHash)?.state.data;\n\t\tconst data = functionalUpdate(updater, prevData);\n\t\tif (data === void 0) return;\n\t\treturn this.#queryCache.build(this, defaultedOptions).setData(data, {\n\t\t\t...options,\n\t\t\tmanual: true\n\t\t});\n\t}\n\t/**\n\t* Synchronous way to immediately update the cached data of multiple queries at once, using\n\t* filters or partial query key matching. Only queries that already exist and match the given\n\t* filters are updated; no new cache entries are created. Internally this calls\n\t* {@link QueryClient#setQueryData} for each matching query.\n\t*\n\t* @example\n\t* ```ts\n\t* queryClient.setQueriesData({ queryKey: ['posts'] }, (oldPosts) =>\n\t* oldPosts ? oldPosts.filter((post) => post.id !== deletedId) : oldPosts,\n\t* )\n\t* ```\n\t*/\n\tsetQueriesData(filters, updater, options) {\n\t\treturn notifyManager.batch(() => this.#queryCache.findAll(filters).map(({ queryKey }) => [queryKey, this.setQueryData(queryKey, updater, options)]));\n\t}\n\t/**\n\t* Imperative (non-reactive) way to retrieve an existing query's state. If the query does not\n\t* exist, `undefined` is returned.\n\t*\n\t* @example\n\t* ```ts\n\t* const state = queryClient.getQueryState(['posts'])\n\t* console.log(state?.dataUpdatedAt)\n\t* ```\n\t*/\n\tgetQueryState(queryKey) {\n\t\tconst options = this.defaultQueryOptions({ queryKey });\n\t\treturn this.#queryCache.get(options.queryHash)?.state;\n\t}\n\t/**\n\t* Removes queries from the cache that match the given filters. Unlike\n\t* {@link QueryClient#invalidateQueries} or {@link QueryClient#refetchQueries}, this removes\n\t* matching queries from the cache instead of refetching them. Without filters, every query in\n\t* the cache is removed.\n\t*\n\t* @example\n\t* ```ts\n\t* queryClient.removeQueries({ queryKey: ['posts'], exact: true })\n\t* ```\n\t*/\n\tremoveQueries(filters) {\n\t\tconst queryCache = this.#queryCache;\n\t\tnotifyManager.batch(() => {\n\t\t\tqueryCache.findAll(filters).forEach((query) => {\n\t\t\t\tqueryCache.remove(query);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Resets queries matching the given filters back to their initial state (e.g. any\n\t* `initialData`), notifying subscribers rather than removing them. Active queries among the\n\t* matched set are then refetched, and the returned promise resolves once that refetch settles.\n\t*\n\t* @example\n\t* ```ts\n\t* await queryClient.resetQueries({ queryKey: ['posts'], exact: true })\n\t* ```\n\t*/\n\tresetQueries(filters, options) {\n\t\tconst queryCache = this.#queryCache;\n\t\treturn notifyManager.batch(() => {\n\t\t\tconst matched = queryCache.findAll(filters);\n\t\t\tconst queriesToRefetch = new Set(matched);\n\t\t\tmatched.forEach((query) => {\n\t\t\t\tquery.reset();\n\t\t\t});\n\t\t\treturn this.refetchQueries({\n\t\t\t\ttype: \"active\",\n\t\t\t\tpredicate: (query) => queriesToRefetch.has(query)\n\t\t\t}, options);\n\t\t});\n\t}\n\t/**\n\t* Cancels outgoing fetches for queries matching the given filters. Most useful when performing\n\t* optimistic updates, since any outgoing refetch that resolves afterwards would otherwise\n\t* overwrite the optimistic update. By default (`revert: true`), a cancelled query's data is\n\t* reverted to its state before the outgoing fetch started.\n\t*\n\t* The returned promise never rejects, even if individual cancellations fail.\n\t*\n\t* @example\n\t* ```ts\n\t* await queryClient.cancelQueries({ queryKey: ['posts'], exact: true })\n\t* ```\n\t*/\n\tcancelQueries(filters, cancelOptions = {}) {\n\t\tconst defaultedCancelOptions = {\n\t\t\trevert: true,\n\t\t\t...cancelOptions\n\t\t};\n\t\tconst promises = notifyManager.batch(() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));\n\t\treturn Promise.all(promises).then(noop).catch(noop);\n\t}\n\t/**\n\t* Marks queries matching the given filters as invalidated. Unlike\n\t* {@link QueryClient#removeQueries}, invalidated queries stay in the cache.\n\t*\n\t* Unless `filters.refetchType` is `'none'`, matching queries are then refetched via\n\t* {@link QueryClient#refetchQueries}, using `filters.refetchType` if set, otherwise\n\t* `filters.type`, otherwise `'active'`.\n\t*\n\t* @example\n\t* ```ts\n\t* await queryClient.invalidateQueries({ queryKey: ['posts'], refetchType: 'active' })\n\t* ```\n\t*/\n\tinvalidateQueries(filters, options = {}) {\n\t\treturn notifyManager.batch(() => {\n\t\t\tthis.#queryCache.findAll(filters).forEach((query) => {\n\t\t\t\tquery.invalidate();\n\t\t\t});\n\t\t\tif (filters?.refetchType === \"none\") return Promise.resolve();\n\t\t\treturn this.refetchQueries({\n\t\t\t\t...filters,\n\t\t\t\ttype: filters?.refetchType ?? filters?.type ?? \"active\"\n\t\t\t}, options);\n\t\t});\n\t}\n\t/**\n\t* Refetches queries matching the given filters, regardless of whether they are stale. Without\n\t* filters, every query in the cache is refetched. Queries that are disabled, or static (only\n\t* have observers with a static `staleTime`), are never refetched.\n\t*\n\t* By default (`cancelRefetch: true`), a currently running fetch is cancelled before the new\n\t* one starts. The returned promise resolves once all matching queries have settled; it does\n\t* not reject on individual query failures unless `throwOnError` is set.\n\t*\n\t* @example\n\t* ```ts\n\t* // refetch all active queries partially matching a query key:\n\t* await queryClient.refetchQueries({ queryKey: ['posts'], type: 'active' })\n\t* ```\n\t*/\n\trefetchQueries(filters, options = {}) {\n\t\tconst fetchOptions = {\n\t\t\t...options,\n\t\t\tcancelRefetch: options.cancelRefetch ?? true\n\t\t};\n\t\tconst promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {\n\t\t\tlet promise = query.fetch(void 0, fetchOptions);\n\t\t\tif (!fetchOptions.throwOnError) promise = promise.catch(noop);\n\t\t\treturn query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n\t\t}));\n\t\treturn Promise.all(promises).then(noop);\n\t}\n\t/**\n\t* Asynchronous method to fetch and cache a query, resolving with the data or throwing with\n\t* the error.\n\t*\n\t* If the query already exists in the cache and its data is not stale (per the given\n\t* `staleTime`), the cached data is returned without fetching. Otherwise, the query is fetched\n\t* and the promise resolves once the fetch settles. If a `select` function is provided, it is\n\t* applied to the data in both cases (cached or freshly fetched) before it is returned.\n\t*\n\t* Unlike a reactive observer, retries are disabled by default here (`retry: false`) unless\n\t* explicitly configured, since there is no component to catch a thrown error and retry through\n\t* re-render.\n\t*\n\t* The accepted options are `QueryObserverOptions` minus the fields that only make sense for a\n\t* reactive observer — `enabled`, `refetchInterval`, `refetchIntervalInBackground`,\n\t* `refetchOnWindowFocus`, `refetchOnReconnect`, `refetchOnMount`, `retryOnMount`,\n\t* `notifyOnChangeProps`, `throwOnError`, `suspense`, and `placeholderData` are not part of this\n\t* method's options.\n\t*\n\t* This method replaces the deprecated `fetchQuery`, and — combined with\n\t* `{ staleTime: 'static' }` — the deprecated `ensureQueryData`.\n\t*\n\t* @example\n\t* ```ts\n\t* try {\n\t* const data = await queryClient.query({ queryKey, queryFn, staleTime: 10000 })\n\t* } catch (error) {\n\t* console.log(error)\n\t* }\n\t* ```\n\t*/\n\tasync query(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tif (defaultedOptions.retry === void 0) defaultedOptions.retry = false;\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\tconst queryData = query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query)) ? await query.fetch(defaultedOptions) : query.state.data;\n\t\tconst select = defaultedOptions.select;\n\t\tif (select) return select(queryData);\n\t\treturn queryData;\n\t}\n\t/**\n\t* @deprecated Use queryClient.query(options) instead. This method will be removed in the next major version.\n\t*/\n\tfetchQuery(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tif (defaultedOptions.retry === void 0) defaultedOptions.retry = false;\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\treturn query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query)) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n\t}\n\t/**\n\t* @deprecated Use queryClient.query(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.\n\t*/\n\tprefetchQuery(options) {\n\t\treturn this.fetchQuery(options).then(noop).catch(noop);\n\t}\n\t/**\n\t* Asynchronous method to fetch and cache an infinite query, resolving with an\n\t* {@link InfiniteData} object or throwing with the error.\n\t*\n\t* Behaves like {@link QueryClient#query}, accepting the same options (minus\n\t* `initialPageParam`), plus the required `initialPageParam`, and an optional `pages` /\n\t* `getNextPageParam` pair used to refetch a fixed number of pages from the start.\n\t*\n\t* This method replaces the deprecated `fetchInfiniteQuery`, and — combined with\n\t* `{ staleTime: 'static' }` — the deprecated `ensureInfiniteQueryData`.\n\t*\n\t* @example\n\t* ```ts\n\t* try {\n\t* const data = await queryClient.infiniteQuery({ queryKey, queryFn, initialPageParam: 0 })\n\t* console.log(data.pages)\n\t* } catch (error) {\n\t* console.log(error)\n\t* }\n\t* ```\n\t*/\n\tinfiniteQuery(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.query(options);\n\t}\n\t/**\n\t* @deprecated Use queryClient.infiniteQuery(options) instead. This method will be removed in the next major version.\n\t*/\n\tfetchInfiniteQuery(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.fetchQuery(options);\n\t}\n\t/**\n\t* @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.\n\t*/\n\tprefetchInfiniteQuery(options) {\n\t\treturn this.fetchInfiniteQuery(options).then(noop).catch(noop);\n\t}\n\t/**\n\t* @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.\n\t*/\n\tensureInfiniteQueryData(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.ensureQueryData(options);\n\t}\n\t/**\n\t* Resumes mutations that were paused because there was no network connection. Does nothing\n\t* (resolving immediately) if the client is currently offline.\n\t*\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* await queryClient.resumePausedMutations()\n\t* ```\n\t*/\n\tresumePausedMutations() {\n\t\tif (onlineManager.isOnline()) return this.#mutationCache.resumePausedMutations();\n\t\treturn Promise.resolve();\n\t}\n\t/**\n\t* Returns the query cache this client is connected to.\n\t*\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* const queryCache = queryClient.getQueryCache()\n\t* const queries = queryCache.findAll({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tgetQueryCache() {\n\t\treturn this.#queryCache;\n\t}\n\t/**\n\t* Returns the mutation cache this client is connected to.\n\t*\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* const mutationCache = queryClient.getMutationCache()\n\t* const mutations = mutationCache.findAll({ status: 'pending' })\n\t* ```\n\t*/\n\tgetMutationCache() {\n\t\treturn this.#mutationCache;\n\t}\n\t/**\n\t* Returns the default options that were set when creating the client, or via\n\t* {@link QueryClient#setDefaultOptions}.\n\t*\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* const defaultOptions = queryClient.getDefaultOptions()\n\t* ```\n\t*/\n\tgetDefaultOptions() {\n\t\treturn this.#defaultOptions;\n\t}\n\t/**\n\t* Dynamically sets the default options for this client, overwriting any previously defined\n\t* default options.\n\t*\n\t* @see {@link QueryClient#getDefaultOptions}\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* queryClient.setDefaultOptions({\n\t* queries: {\n\t* staleTime: Infinity,\n\t* },\n\t* })\n\t* ```\n\t*/\n\tsetDefaultOptions(options) {\n\t\tthis.#defaultOptions = options;\n\t}\n\t/**\n\t* Sets default options for queries whose query key partially matches the given `queryKey`.\n\t*\n\t* If several registered query defaults match a given query key, they are merged together in\n\t* registration order by {@link QueryClient#getQueryDefaults}, so register defaults from the\n\t* most generic key to the least generic one — more specific defaults should be registered\n\t* after more generic ones so they take precedence.\n\t*\n\t* @example\n\t* ```ts\n\t* queryClient.setQueryDefaults(['posts'], { queryFn: fetchPosts })\n\t*\n\t* await queryClient.query({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tsetQueryDefaults(queryKey, options) {\n\t\tthis.#queryDefaults.set(hashKey(queryKey), {\n\t\t\tqueryKey,\n\t\t\tdefaultOptions: options\n\t\t});\n\t}\n\t/**\n\t* Returns the default options registered for queries whose query key partially matches the\n\t* given `queryKey`, via {@link QueryClient#setQueryDefaults}. If multiple registered defaults\n\t* match, they are merged together in registration order.\n\t*\n\t* @example\n\t* ```ts\n\t* const defaultOptions = queryClient.getQueryDefaults(['posts'])\n\t* ```\n\t*/\n\tgetQueryDefaults(queryKey) {\n\t\tconst defaults = [...this.#queryDefaults.values()];\n\t\tconst result = {};\n\t\tdefaults.forEach((queryDefault) => {\n\t\t\tif (partialMatchKey(queryKey, queryDefault.queryKey)) Object.assign(result, queryDefault.defaultOptions);\n\t\t});\n\t\treturn result;\n\t}\n\t/**\n\t* Sets default options for mutations whose mutation key partially matches the given\n\t* `mutationKey`. As with {@link QueryClient#setQueryDefaults}, the order of registration\n\t* matters when several registered defaults match the same mutation key.\n\t*\n\t* @see {@link QueryClient#getMutationDefaults}\n\t* @example\n\t* ```ts\n\t* queryClient.setMutationDefaults(['addPost'], { mutationFn: addPost })\n\t* ```\n\t*/\n\tsetMutationDefaults(mutationKey, options) {\n\t\tthis.#mutationDefaults.set(hashKey(mutationKey), {\n\t\t\tmutationKey,\n\t\t\tdefaultOptions: options\n\t\t});\n\t}\n\t/**\n\t* Returns the default options registered for mutations whose mutation key partially matches\n\t* the given `mutationKey`, via {@link QueryClient#setMutationDefaults}. If multiple registered\n\t* defaults match, they are merged together in registration order.\n\t*\n\t* @example\n\t* ```ts\n\t* const defaultOptions = queryClient.getMutationDefaults(['addPost'])\n\t* ```\n\t*/\n\tgetMutationDefaults(mutationKey) {\n\t\tconst defaults = [...this.#mutationDefaults.values()];\n\t\tconst result = {};\n\t\tdefaults.forEach((queryDefault) => {\n\t\t\tif (partialMatchKey(mutationKey, queryDefault.mutationKey)) Object.assign(result, queryDefault.defaultOptions);\n\t\t});\n\t\treturn result;\n\t}\n\t/**\n\t* Called by framework adapters (e.g. inside `useQuery`) to resolve the options passed by the\n\t* caller into their final, defaulted form: merging `queryClient.setQueryDefaults` for the\n\t* given `queryKey`, then the client's own `defaultOptions.queries`, then the caller's options\n\t* on top. A no-op if the options are already defaulted (`_defaulted: true`).\n\t*/\n\tdefaultQueryOptions(options) {\n\t\tif (options._defaulted) return options;\n\t\tconst defaultedOptions = {\n\t\t\t...this.#defaultOptions.queries,\n\t\t\t...this.getQueryDefaults(options.queryKey),\n\t\t\t...options,\n\t\t\t_defaulted: true\n\t\t};\n\t\tif (!defaultedOptions.queryHash) defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n\t\tif (defaultedOptions.refetchOnReconnect === void 0) defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n\t\tif (defaultedOptions.throwOnError === void 0) defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n\t\tif (!defaultedOptions.networkMode && defaultedOptions.persister) defaultedOptions.networkMode = \"offlineFirst\";\n\t\tif (defaultedOptions.queryFn === skipToken) defaultedOptions.enabled = false;\n\t\treturn defaultedOptions;\n\t}\n\t/**\n\t* The mutation counterpart of {@link QueryClient#defaultQueryOptions}. Called by framework\n\t* adapters (e.g. inside `useMutation`) to merge `queryClient.setMutationDefaults` for the\n\t* given `mutationKey`, then the client's `defaultOptions.mutations`, then the caller's options\n\t* on top. A no-op if the options are already defaulted (`_defaulted: true`).\n\t*/\n\tdefaultMutationOptions(options) {\n\t\tif (options?._defaulted) return options;\n\t\treturn {\n\t\t\t...this.#defaultOptions.mutations,\n\t\t\t...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n\t\t\t...options,\n\t\t\t_defaulted: true\n\t\t};\n\t}\n\t/**\n\t* Clears both the query cache and the mutation cache this client is connected to.\n\t*\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* queryClient.clear()\n\t* ```\n\t*/\n\tclear() {\n\t\tthis.#queryCache.clear();\n\t\tthis.#mutationCache.clear();\n\t}\n};\n//#endregion\nexport { QueryClient };\n\n//# sourceMappingURL=queryClient.js.map","var baseUnset = require('./_baseUnset'),\n isIndex = require('./_isIndex');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n}\n\nmodule.exports = basePullAt;\n","var baseIteratee = require('./_baseIteratee'),\n basePullAt = require('./_basePullAt');\n\n/**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\nfunction remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = baseIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n}\n\nmodule.exports = remove;\n","var baseIteratee = require('./_baseIteratee'),\n baseUniq = require('./_baseUniq');\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nmodule.exports = uniqBy;\n","import {\n MutationCache,\n QueryCache,\n QueryClient,\n} from '@tanstack/react-query';\nimport remove from 'lodash/remove';\nimport uniq from 'lodash/uniq';\nimport uniqBy from 'lodash/uniqBy';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\n\nimport { ConfigService } from '../ConfigService';\nimport type { GenericData } from '../../../models/data';\n\nexport class QueryClientService<TQueryKey extends string = string> {\n private static __instance: QueryClientService;\n public mutationCache: MutationCache;\n public queryCache: QueryCache;\n public queryClient: QueryClient;\n\n public queryKeyDependencies: Record<TQueryKey, TQueryKey[]>;\n\n private constructor() {\n\n }\n\n public static getInstance<TQueryKey extends string>(): QueryClientService<TQueryKey> {\n const instance = HmrUtil.getHmrSingleton<QueryClientService<TQueryKey>>(\n 'queryManager',\n QueryClientService.__instance as QueryClientService<TQueryKey> | undefined,\n () => new QueryClientService<TQueryKey>(),\n );\n QueryClientService.__instance = instance;\n return instance;\n }\n\n private static mergeQueryKeyDependencies<TQueryKey extends string>(dependencies: Array<Record<TQueryKey, TQueryKey[]>>): Record<TQueryKey, TQueryKey[]> {\n const merged: Record<TQueryKey, TQueryKey[]> = {} as Record<TQueryKey, TQueryKey[]>;\n dependencies.forEach(dependency => {\n Object.entries<TQueryKey[]>(dependency).forEach(([key, value]) => {\n if (!merged[key as TQueryKey]) {\n merged[key as TQueryKey] = [];\n }\n merged[key as TQueryKey].push(...value);\n });\n });\n Object.keys(merged).forEach(key => {\n merged[key as TQueryKey] = uniq(merged[key as TQueryKey]);\n });\n return merged;\n }\n\n public async cancelQueries(queryKeys: string[][]) {\n const queryClient = QueryClientService.getInstance().queryClient;\n for (const queryKey of this.getUniqueQueryKeys(queryKeys ?? [])) {\n await queryClient.cancelQueries({ queryKey });\n }\n }\n\n public getGenericKey(key: TQueryKey, arg?: unknown) {\n const keyArray: string[] = [key];\n if (arg) {\n if (typeof arg === 'string') {\n keyArray.push(arg);\n } else {\n keyArray.push(JSON.stringify(arg));\n }\n }\n return keyArray;\n }\n\n public getItemFromCache<T extends GenericData>(queryKey: TQueryKey, itemId: string): T {\n const items = this.getValidQueryData<T[]>([queryKey]);\n return items?.find(item => item.id === itemId);\n }\n\n public getQueryKeyDependencies(queryKeys: TQueryKey[], includeSelf = false): string[][] {\n const keys: TQueryKey[][] = [];\n\n queryKeys.forEach(key => {\n keys.push(...this.getQueryKeyDependenciesInternal(key).map(k => [k]));\n if (includeSelf) {\n keys.unshift([key]);\n }\n });\n return this.getUniqueQueryKeys(keys);\n }\n\n public getUniqueQueryKeys<T>(queryKeys: T[][]): T[][] {\n return uniqBy(queryKeys, x => x.join('-'));\n }\n\n public getValidQueryData<T>(queryKey: string[]): T {\n const { queryCache, queryClient } = QueryClientService.getInstance();\n const cache = queryCache.find({\n queryKey,\n });\n if (cache?.state?.isInvalidated) {\n return undefined;\n }\n return queryClient.getQueryData<T>(queryKey);\n }\n\n public initialize(kwArgs: { queryKeyDependencies: Array<Record<TQueryKey, TQueryKey[]>> }) {\n if (this.queryKeyDependencies) {\n throw new Error('QueryClientService already initialized');\n }\n this.queryKeyDependencies = QueryClientService.mergeQueryKeyDependencies<TQueryKey>(kwArgs.queryKeyDependencies);\n const queryCache = new QueryCache({});\n const mutationCache = new MutationCache({});\n const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n gcTime: Infinity,\n retry: ConfigService.getInstance().config.queryClient.retry,\n retryDelay: ConfigService.getInstance().config.queryClient.retryDelay,\n staleTime: Infinity,\n },\n },\n mutationCache,\n queryCache,\n });\n\n this.queryCache = queryCache;\n this.mutationCache = mutationCache;\n this.queryClient = queryClient;\n }\n\n public async invalidateQueryKeys(queryKeys: string[][]) {\n for (const queryKey of this.getUniqueQueryKeys(queryKeys ?? [])) {\n await this.queryClient.cancelQueries({ queryKey });\n await this.queryClient.invalidateQueries({ queryKey });\n }\n }\n\n public removeQueries(queryKeys: string[][]) {\n for (const queryKey of this.getUniqueQueryKeys(queryKeys ?? [])) {\n this.queryClient.removeQueries({ queryKey });\n }\n }\n\n private getDirectQueryKeyDependents(key: TQueryKey): TQueryKey[] {\n return Object.entries<TQueryKey[]>(this.queryKeyDependencies)\n .filter(([, dependencyKeys]) => dependencyKeys.includes(key))\n .map(([dependentKey]) => dependentKey as TQueryKey);\n }\n\n private getQueryKeyDependenciesInternal(key: TQueryKey, currentKeys: TQueryKey[] = [], originalKey?: TQueryKey): TQueryKey[] {\n const keys: TQueryKey[] = [...currentKeys];\n this.getDirectQueryKeyDependents(key).forEach(dependentKey => {\n if (!keys.includes(dependentKey)) {\n keys.push(dependentKey);\n keys.push(...this.getQueryKeyDependenciesInternal(dependentKey, [...keys], originalKey ?? key));\n }\n });\n return remove(uniq(keys), x => x !== originalKey);\n }\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;;;;AAqBA,IAAI,IAAW,cAAc,EAAU;CACtC;CACA;CACA;CACA;CACA,YAAY,GAAQ;EAQnB,AAPA,MAAM,GACN,KAAK,KAAU,EAAO,QACtB,KAAK,aAAa,EAAO,YACzB,KAAK,KAAiB,EAAO,eAC7B,KAAK,KAAa,CAAC,GACnB,KAAK,QAAQ,EAAO,SAAS,EAAgB,GAC7C,KAAK,WAAW,EAAO,OAAO,GAC9B,KAAK,WAAW;CACjB;CAEA,WAAW,GAAS;EAEnB,AADA,KAAK,UAAU,GACf,KAAK,aAAa,KAAK,QAAQ,MAAM;CACtC;CAIA,IAAI,OAAO;EACV,OAAO,KAAK,QAAQ;CACrB;CAEA,YAAY,GAAU;EACrB,AAAK,KAAK,GAAW,SAAS,CAAQ,MACrC,KAAK,GAAW,KAAK,CAAQ,GAC7B,KAAK,eAAe,GACpB,KAAK,GAAe,OAAO;GAC1B,MAAM;GACN,UAAU;GACV;EACD,CAAC;CAEH;CAEA,eAAe,GAAU;EAGxB,AAFA,KAAK,KAAa,KAAK,GAAW,QAAQ,MAAM,MAAM,CAAQ,GAC9D,KAAK,WAAW,GAChB,KAAK,GAAe,OAAO;GAC1B,MAAM;GACN,UAAU;GACV;EACD,CAAC;CACF;CACA,iBAAiB;EAChB,AAAK,KAAK,GAAW,WAChB,KAAK,MAAM,WAAW,YAAW,KAAK,WAA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AAS,CAAC;CAE/C;CAEA,4BAAoC,GAA6B;EAC/D,OAAO,OAAO,QAAqB,KAAK,oBAAoB,CAAC,CAC1D,QAAQ,GAAG,OAAoB,EAAe,SAAS,CAAG,CAAC,CAAC,CAC5D,KAAK,CAAC,OAAkB,CAAyB;CACtD;CAEA,gCAAwC,GAAgB,IAA2B,CAAC,GAAG,GAAsC;EAC3H,IAAM,IAAoB,CAAC,GAAG,CAAW;EAOzC,OANA,KAAK,4BAA4B,CAAG,CAAC,CAAC,SAAQ,MAAgB;GAC5D,AAAK,EAAK,SAAS,CAAY,MAC7B,EAAK,KAAK,CAAY,GACtB,EAAK,KAAK,GAAG,KAAK,gCAAgC,GAAc,CAAC,GAAG,CAAI,GAAG,KAAe,CAAG,CAAC;EAElG,CAAC,IACD,GAAO,EAAA,QAAA,EAAA,GAAO,EAAA,QAAA,CAAK,CAAI,IAAG,MAAK,MAAM,CAAW;CAClD;AACF"}
|
|
1
|
+
{"version":3,"file":"QueryClientService.js","names":["uniq","uniqBy","remove","_decorate","__toESM","require__Symbol","require_isObjectLike","require_isObject","require_identity","require_eq","require_isLength","require_isArray","require__SetCache","require__arrayIncludesWith","require__arrayIncludes","require__cacheHas","require_isArguments","require__Stack","require_isBuffer","require__castPath","require__Set","require__isIndex","require__toKey","require__getAllKeys","require_isTypedArray","require__isKey","require__baseGet","require__getTag","require__baseUnset","require_keys","require__Uint8Array","skipToken","partialMatchKey","onlineManager","Subscribable","hashKey","hashQueryKeyByOptions","noop","matchQuery","createRetryer","matchMutation","notifyManager","Removable","focusManager","Query","functionalUpdate","resolveQueryValue","__decorate","require__arraySome","arraySome","index","length","array","predicate","require__equalArrays","SetCache","cacheHas","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","equalArrays","isPartial","bitmask","arrLength","othLength","other","arrStacked","stack","othStacked","result","seen","arrValue","othValue","customizer","compared","othIndex","equalFunc","\"delete\"","require__mapToArray","mapToArray","map","key","value","require__setToArray","setToArray","set","require__equalByTag","Symbol","Uint8Array","eq","boolTag","dateTag","errorTag","mapTag","numberTag","regexpTag","setTag","stringTag","symbolTag","arrayBufferTag","dataViewTag","symbolProto","symbolValueOf","equalByTag","tag","object","convert","stacked","require__equalObjects","getAllKeys","hasOwnProperty","equalObjects","objProps","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","require__baseIsEqualDeep","Stack","getTag","isArray","isBuffer","isTypedArray","argsTag","arrayTag","objectTag","baseIsEqualDeep","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","require__baseIsEqual","isObjectLike","baseIsEqual","require__baseIsMatch","baseIsMatch","matchData","noCustomizer","data","srcValue","source","require__isStrictComparable","isObject","isStrictComparable","require__getMatchData","keys","getMatchData","require__matchesStrictComparable","matchesStrictComparable","require__baseMatches","baseMatches","require_get","baseGet","get","path","defaultValue","require__baseHasIn","baseHasIn","require__hasPath","castPath","isArguments","isIndex","isLength","toKey","hasPath","hasFunc","require_hasIn","hasIn","require__baseMatchesProperty","isKey","baseMatchesProperty","require__baseProperty","baseProperty","require__basePropertyDeep","basePropertyDeep","require_property","property","require__baseIteratee","identity","baseIteratee","Mutation","#client","config","#mutationCache","#observers","getDefaultState","options","observer","x","#retryer","onContinue","#dispatch","mutationFnContext","retryer","variables","restored","isPaused","context","error","reducer","action","state","MutationCache","#mutations","#scopes","#mutationId","mutation","client","scope","scopeFor","scopedMutations","firstPendingMutation","m","defaultedFilters","filters","event","pausedMutations","QueryCache","#queries","queryKey","queryHash","query","queries","QueryClient","#queryCache","#defaultOptions","#queryDefaults","#mutationDefaults","#mountCount","#unsubscribeFocus","focused","#unsubscribeOnline","online","defaultedOptions","cachedData","prevData","updater","queryCache","matched","queriesToRefetch","defaultedCancelOptions","cancelOptions","promises","fetchOptions","promise","queryData","select","defaults","queryDefault","mutationKey","require__basePullAt","baseUnset","splice","basePullAt","indexes","lastIndex","previous","require_remove","remove","require_noop","require__createSet","Set","values","require__baseUniq","arrayIncludes","arrayIncludesWith","createSet","LARGE_ARRAY_SIZE","baseUniq","includes","isCommon","comparator","iteratee","computed","seenIndex","require_uniq","uniq","require_uniqBy","uniqBy","import_remove","import_uniq","import_uniqBy","_QueryClientService","QueryClientService","kwArgs","mutationCache","queryClient","merged","dependencies","dependency","queryKeys","keyArray","arg","item","itemId","k","includeSelf","dependencyKeys","dependentKey","currentKeys","originalKey","singleton"],"sources":["../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arraySome.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalArrays.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapToArray.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToArray.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalByTag.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalObjects.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsEqualDeep.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsEqual.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsMatch.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isStrictComparable.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getMatchData.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_matchesStrictComparable.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMatches.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/get.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseHasIn.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hasPath.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/hasIn.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMatchesProperty.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseProperty.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_basePropertyDeep.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/property.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIteratee.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.2/node_modules/@tanstack/query-core/build/modern/mutation.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.2/node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.2/node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.2/node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_basePullAt.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/remove.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/noop.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_createSet.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseUniq.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/uniq.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/uniqBy.js","../../src/classes/services/QueryClientService/QueryClientService.ts"],"sourcesContent":["/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","import { notifyManager } from \"./notifyManager.js\";\nimport { createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\n//#region src/mutation.ts\n/**\n* Represents a single mutation attempt. A `Mutation` holds the mutation's\n* options, state (data/error/status), and the `MutationObserver`s currently\n* subscribed to it.\n*\n* Instances are created and managed internally by `MutationCache`; application\n* code typically interacts with mutations indirectly through `QueryClient` or\n* a framework hook like `useMutation`. Direct access to a `Mutation` instance\n* is possible via `mutationCache.find()`/`getAll()` for inspecting cache state.\n* @example\n* ```ts\n* const mutationCache = queryClient.getMutationCache()\n*\n* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n* ```\n*/\nvar Mutation = class extends Removable {\n\t#client;\n\t#observers;\n\t#mutationCache;\n\t#retryer;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.#client = config.client;\n\t\tthis.mutationId = config.mutationId;\n\t\tthis.#mutationCache = config.mutationCache;\n\t\tthis.#observers = [];\n\t\tthis.state = config.state || getDefaultState();\n\t\tthis.setOptions(config.options);\n\t\tthis.scheduleGc();\n\t}\n\t/**\n\t* Replaces the mutation's options and applies their `gcTime`.\n\t* @internal\n\t* @param options - The new mutation options.\n\t*/\n\tsetOptions(options) {\n\t\tthis.options = options;\n\t\tthis.updateGcTime(this.options.gcTime);\n\t}\n\t/**\n\t* The `meta` object passed in the mutation's options, if any.\n\t* @returns The mutation's `meta`, or `undefined` if none was set.\n\t*/\n\tget meta() {\n\t\treturn this.options.meta;\n\t}\n\t/**\n\t* Subscribes an observer to the mutation and stops its garbage collection.\n\t* @internal\n\t* @param observer - The observer to add. Adding an observer that is already subscribed does\n\t* nothing.\n\t*/\n\taddObserver(observer) {\n\t\tif (!this.#observers.includes(observer)) {\n\t\t\tthis.#observers.push(observer);\n\t\t\tthis.clearGcTimeout();\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\ttype: \"observerAdded\",\n\t\t\t\tmutation: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Unsubscribes an observer from the mutation.\n\t* @internal\n\t* @param observer - The observer to remove. Garbage collection is scheduled afterwards.\n\t*/\n\tremoveObserver(observer) {\n\t\tthis.#observers = this.#observers.filter((x) => x !== observer);\n\t\tthis.scheduleGc();\n\t\tthis.#mutationCache.notify({\n\t\t\ttype: \"observerRemoved\",\n\t\t\tmutation: this,\n\t\t\tobserver\n\t\t});\n\t}\n\toptionalRemove() {\n\t\tif (!this.#observers.length) {\n\t\t\tif (this.state.status === \"pending\") this.scheduleGc();\n\t\t\telse this.#mutationCache.remove(this);\n\t\t}\n\t}\n\t/**\n\t* Resumes a mutation that is currently paused or was restored from a\n\t* dehydrated, still-`pending` state.\n\t*\n\t* - If this mutation has an active retryer (it paused mid-attempt, e.g. due\n\t* to the network mode or scope-based queuing), its retryer is resumed.\n\t* - Otherwise, if the mutation's status is still `pending` (e.g. it was\n\t* dehydrated while an attempt was in flight and never got a retryer in\n\t* this instance), `execute` is called again with the last known variables.\n\t* - Otherwise the mutation has already settled and this resolves immediately\n\t* without running anything again.\n\t* @returns A promise that settles with the resumed mutation: it rejects if the mutation fails.\n\t* It resolves immediately if the mutation has already settled.\n\t* @see {@link Mutation#execute}\n\t* @example\n\t* ```ts\n\t* // typically driven by reconnect handling, e.g. queryClient.resumePausedMutations()\n\t* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n\t* await mutation?.continue()\n\t* ```\n\t*/\n\tcontinue() {\n\t\treturn this.#retryer?.continue() ?? (this.state.status === \"pending\" ? this.execute(this.state.variables) : Promise.resolve());\n\t}\n\t/**\n\t* Runs the mutation function for the given variables through a retryer, and\n\t* drives the mutation's state and lifecycle callbacks through to settlement.\n\t*\n\t* If this mutation's state is already `pending` when `execute` is called\n\t* (i.e. it was restored, still in-flight, from a dehydrated state), the\n\t* `onMutate` step is skipped and a `continue` action is dispatched to\n\t* unpause it; otherwise a `pending` action is dispatched first, then the\n\t* mutation cache's `onMutate` and the mutation's own `onMutate` option are\n\t* awaited in that order, and the resulting context is stored.\n\t*\n\t* The mutation function is then run (subject to `retry`/`retryDelay`/\n\t* `networkMode`, and to the mutation cache's scope-based serialization).\n\t* On success, the cache's `onSuccess`/`onSettled` callbacks run before the\n\t* mutation's own `onSuccess`/`onSettled` options, a `success` action is\n\t* dispatched, and the resolved data is returned. On failure, the same\n\t* cache-then-option ordering is used for `onError`/`onSettled`, but each of\n\t* those four callbacks is individually caught so that a throwing callback\n\t* cannot mask the original error; an `error` action is then dispatched and\n\t* the original error is re-thrown.\n\t* @param variables - The variables passed to the `mutationFn`.\n\t* @returns A promise that resolves with the mutation's data, or rejects with its error.\n\t* @see {@link Mutation#continue}\n\t* @example\n\t* ```ts\n\t* // Called internally by `MutationObserver.mutate` and `Mutation.continue` —\n\t* // applications normally trigger mutations through those, not this method.\n\t* const data = await mutation.execute(variables)\n\t* ```\n\t*/\n\tasync execute(variables) {\n\t\tconst onContinue = () => {\n\t\t\tthis.#dispatch({ type: \"continue\" });\n\t\t};\n\t\tconst mutationFnContext = {\n\t\t\tclient: this.#client,\n\t\t\tmeta: this.options.meta,\n\t\t\tmutationKey: this.options.mutationKey\n\t\t};\n\t\tconst retryer = this.#retryer = createRetryer({\n\t\t\tfn: () => {\n\t\t\t\tif (!this.options.mutationFn) return Promise.reject(/* @__PURE__ */ new Error(\"No mutationFn found\"));\n\t\t\t\treturn this.options.mutationFn(variables, mutationFnContext);\n\t\t\t},\n\t\t\tonFail: (failureCount, error) => {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\tfailureCount,\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t},\n\t\t\tonPause: () => {\n\t\t\t\tthis.#dispatch({ type: \"pause\" });\n\t\t\t},\n\t\t\tonContinue,\n\t\t\tretry: this.options.retry ?? 0,\n\t\t\tretryDelay: this.options.retryDelay,\n\t\t\tnetworkMode: this.options.networkMode,\n\t\t\tcanRun: () => this.#mutationCache.canRun(this)\n\t\t});\n\t\tconst restored = this.state.status === \"pending\";\n\t\tconst isPaused = !retryer.canStart();\n\t\ttry {\n\t\t\tif (restored) onContinue();\n\t\t\telse {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t\tif (this.#mutationCache.config.onMutate) await this.#mutationCache.config.onMutate(variables, this, mutationFnContext);\n\t\t\t\tconst context = await this.options.onMutate?.(variables, mutationFnContext);\n\t\t\t\tif (context !== this.state.context) this.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst data = await retryer.start();\n\t\t\tawait this.#mutationCache.config.onSuccess?.(data, variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSuccess?.(data, variables, this.state.context, mutationFnContext);\n\t\t\tawait this.#mutationCache.config.onSettled?.(data, null, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSettled?.(data, null, variables, this.state.context, mutationFnContext);\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"success\",\n\t\t\t\tdata\n\t\t\t});\n\t\t\treturn data;\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onError?.(error, variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onError?.(error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onSettled?.(void 0, error, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onSettled?.(void 0, error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t});\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (this.#retryer === retryer) this.#retryer = void 0;\n\t\t\tthis.#mutationCache.runNext(this);\n\t\t}\n\t}\n\t#dispatch(action) {\n\t\tconst reducer = (state) => {\n\t\t\tswitch (action.type) {\n\t\t\t\tcase \"failed\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfailureCount: action.failureCount,\n\t\t\t\t\tfailureReason: action.error\n\t\t\t\t};\n\t\t\t\tcase \"pause\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: true\n\t\t\t\t};\n\t\t\t\tcase \"continue\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"pending\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tcontext: action.context,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tisPaused: action.isPaused,\n\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\tvariables: action.variables,\n\t\t\t\t\tsubmittedAt: Date.now()\n\t\t\t\t};\n\t\t\t\tcase \"success\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: action.data,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"error\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\terror: action.error,\n\t\t\t\t\tfailureCount: state.failureCount + 1,\n\t\t\t\t\tfailureReason: action.error,\n\t\t\t\t\tisPaused: false,\n\t\t\t\t\tstatus: \"error\"\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tthis.state = reducer(this.state);\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#observers.forEach((observer) => {\n\t\t\t\tobserver.onMutationUpdate(action);\n\t\t\t});\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\tmutation: this,\n\t\t\t\ttype: \"updated\",\n\t\t\t\taction\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* Returns the initial state of a mutation: `'idle'`, with no data, error, or variables.\n* @returns The initial mutation state.\n*/\nfunction getDefaultState() {\n\treturn {\n\t\tcontext: void 0,\n\t\tdata: void 0,\n\t\terror: null,\n\t\tfailureCount: 0,\n\t\tfailureReason: null,\n\t\tisPaused: false,\n\t\tstatus: \"idle\",\n\t\tvariables: void 0,\n\t\tsubmittedAt: 0\n\t};\n}\n//#endregion\nexport { Mutation, getDefaultState };\n\n//# sourceMappingURL=mutation.js.map","import { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\n//#region src/mutationCache.ts\n/**\n* The `MutationCache` is the storage for mutations.\n*\n* Normally, you will not interact with the `MutationCache` directly and instead use a\n* `QueryClient`. You can subscribe to it (inherited from `Subscribable`) to be informed of\n* safe/known updates to the cache, such as mutations being added, removed, or updated.\n* @example\n* ```ts\n* const unsubscribe = mutationCache.subscribe((event) => {\n* console.log(event.type, event.mutation)\n* })\n* ```\n*/\nvar MutationCache = class extends Subscribable {\n\t#mutations;\n\t#scopes;\n\t#mutationId;\n\tconstructor(config = {}) {\n\t\tsuper();\n\t\tthis.config = config;\n\t\tthis.#mutations = /* @__PURE__ */ new Set();\n\t\tthis.#scopes = /* @__PURE__ */ new Map();\n\t\tthis.#mutationId = 0;\n\t}\n\t/**\n\t* Creates a mutation and adds it to the cache.\n\t* @internal\n\t* @param client - The client the mutation belongs to, used to default its options.\n\t* @param options - The mutation options. They are defaulted with {@link\n\t* QueryClient#defaultMutationOptions}.\n\t* @param state - The initial state of the mutation, e.g. when restoring a dehydrated mutation.\n\t* @returns The new mutation, already added to the cache.\n\t*/\n\tbuild(client, options, state) {\n\t\tconst mutation = new Mutation({\n\t\t\tclient,\n\t\t\tmutationCache: this,\n\t\t\tmutationId: ++this.#mutationId,\n\t\t\toptions: client.defaultMutationOptions(options),\n\t\t\tstate\n\t\t});\n\t\tthis.add(mutation);\n\t\treturn mutation;\n\t}\n\t/**\n\t* Adds a mutation to the cache.\n\t* @internal\n\t* @param mutation - The mutation to add. If it has a `scope`, it is queued in that scope.\n\t*/\n\tadd(mutation) {\n\t\tthis.#mutations.add(mutation);\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") {\n\t\t\tconst scopedMutations = this.#scopes.get(scope);\n\t\t\tif (scopedMutations) scopedMutations.push(mutation);\n\t\t\telse this.#scopes.set(scope, [mutation]);\n\t\t}\n\t\tthis.notify({\n\t\t\ttype: \"added\",\n\t\t\tmutation\n\t\t});\n\t}\n\t/**\n\t* Removes a mutation from the cache.\n\t* @internal\n\t* @param mutation - The mutation to remove, also from its scope's queue.\n\t*/\n\tremove(mutation) {\n\t\tif (this.#mutations.delete(mutation)) {\n\t\t\tconst scope = scopeFor(mutation);\n\t\t\tif (typeof scope === \"string\") {\n\t\t\t\tconst scopedMutations = this.#scopes.get(scope);\n\t\t\t\tif (scopedMutations) {\n\t\t\t\t\tif (scopedMutations.length > 1) {\n\t\t\t\t\t\tconst index = scopedMutations.indexOf(mutation);\n\t\t\t\t\t\tif (index !== -1) scopedMutations.splice(index, 1);\n\t\t\t\t\t} else if (scopedMutations[0] === mutation) this.#scopes.delete(scope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.notify({\n\t\t\ttype: \"removed\",\n\t\t\tmutation\n\t\t});\n\t}\n\t/**\n\t* Checks whether a mutation can run now, given the other mutations in its `scope`.\n\t* @internal\n\t* @param mutation - The mutation to check.\n\t* @returns `true` if the mutation has no `scope`, or no other mutation in its scope is pending\n\t* ahead of it.\n\t*/\n\tcanRun(mutation) {\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") {\n\t\t\tconst firstPendingMutation = this.#scopes.get(scope)?.find((m) => m.state.status === \"pending\");\n\t\t\treturn !firstPendingMutation || firstPendingMutation === mutation;\n\t\t} else return true;\n\t}\n\t/**\n\t* Continues the next paused mutation in the same `scope` after a mutation finishes.\n\t* @internal\n\t* @param mutation - The mutation that finished.\n\t* @returns A promise that resolves once the next paused mutation in the same scope has continued,\n\t* or immediately if there is none.\n\t*/\n\trunNext(mutation) {\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") return (this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused))?.continue() ?? Promise.resolve();\n\t\telse return Promise.resolve();\n\t}\n\t/**\n\t* Removes all mutations from the cache.\n\t* @example\n\t* ```ts\n\t* const mutationCache = queryClient.getMutationCache()\n\t*\n\t* mutationCache.clear()\n\t* ```\n\t*/\n\tclear() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#mutations.forEach((mutation) => {\n\t\t\t\tthis.notify({\n\t\t\t\t\ttype: \"removed\",\n\t\t\t\t\tmutation\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis.#mutations.clear();\n\t\t\tthis.#scopes.clear();\n\t\t});\n\t}\n\t/**\n\t* Returns all mutations within the cache.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about a mutation in rare scenarios.\n\t* @returns Every mutation in the cache.\n\t* @example\n\t* ```ts\n\t* const mutationCache = queryClient.getMutationCache()\n\t*\n\t* const mutations = mutationCache.getAll()\n\t* ```\n\t*/\n\tgetAll() {\n\t\treturn Array.from(this.#mutations);\n\t}\n\t/**\n\t* A slightly more advanced method that can be used to get an existing mutation instance from\n\t* the cache. If the mutation does not exist, `undefined` is returned.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about a mutation in rare scenarios.\n\t* @param filters - The filters to match. `exact` defaults to `true`.\n\t* @returns The first matching mutation, or `undefined`.\n\t* @see {@link MutationCache#findAll}\n\t* @example\n\t* ```ts\n\t* const mutationCache = queryClient.getMutationCache()\n\t*\n\t* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n\t* ```\n\t*/\n\tfind(filters) {\n\t\tconst defaultedFilters = {\n\t\t\texact: true,\n\t\t\t...filters\n\t\t};\n\t\treturn this.getAll().find((mutation) => matchMutation(defaultedFilters, mutation));\n\t}\n\t/**\n\t* An even more advanced method that can be used to get existing mutation instances from the\n\t* cache that match the given filters. If no mutations match, an empty array is returned.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about mutations in rare scenarios.\n\t* @param filters - The filters to match. Without filters, every mutation is returned.\n\t* @returns The matching mutations.\n\t* @see {@link MutationCache#find}\n\t* @example\n\t* ```ts\n\t* const mutationCache = queryClient.getMutationCache()\n\t*\n\t* const mutations = mutationCache.findAll({ mutationKey: ['addPost'] })\n\t* ```\n\t*/\n\tfindAll(filters = {}) {\n\t\treturn this.getAll().filter((mutation) => matchMutation(filters, mutation));\n\t}\n\t/**\n\t* Notifies every cache listener of an event, in one batch.\n\t* @internal\n\t* @param event - The event passed to every listener.\n\t*/\n\tnotify(event) {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(event);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Continues every paused mutation, e.g. when the app comes back online.\n\t* @internal\n\t* @returns A promise that resolves once every paused mutation has continued and settled.\n\t*/\n\tresumePausedMutations() {\n\t\tconst pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n\t\treturn notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop))));\n\t}\n};\n/**\n* Returns the scope id of a mutation, used to run mutations with the same scope one after another.\n* @param mutation - The mutation to read the scope of.\n* @returns The mutation's `scope.id`, or `undefined` if it has no scope.\n*/\nfunction scopeFor(mutation) {\n\treturn mutation.options.scope?.id;\n}\n//#endregion\nexport { MutationCache };\n\n//# sourceMappingURL=mutationCache.js.map","import { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Query } from \"./query.js\";\n//#region src/queryCache.ts\n/**\n* The `QueryCache` is the storage mechanism for TanStack Query. It stores all the data, meta\n* information, and state of the queries it contains.\n*\n* Normally, you will not interact with the `QueryCache` directly and instead use a `QueryClient`\n* for a specific cache. You can subscribe to it (inherited from `Subscribable`) to be informed of\n* safe/known updates to the cache, such as queries being added, removed, or updated — updates made\n* outside of the cache's own tracked mechanisms (e.g. mutating a query's state object directly) do\n* not notify subscribers.\n* @example\n* ```ts\n* const unsubscribe = queryCache.subscribe((event) => {\n* console.log(event.type, event.query)\n* })\n* ```\n*/\nvar QueryCache = class extends Subscribable {\n\t#queries;\n\tconstructor(config = {}) {\n\t\tsuper();\n\t\tthis.config = config;\n\t\tthis.#queries = /* @__PURE__ */ new Map();\n\t}\n\t/**\n\t* Returns the existing `Query` instance for the given options' `queryKey`/`queryHash`, or\n\t* builds and adds a new one to the cache if none exists yet. Used by framework adapters and\n\t* plugins (e.g. broadcast/persistence) that need to get-or-create a `Query` directly, bypassing\n\t* the reactive `QueryObserver` machinery.\n\t* @param client - The client the query belongs to, used to default its options.\n\t* @param options - The query options, including the `queryKey`. A new query is created with the\n\t* options defaulted by {@link QueryClient#defaultQueryOptions}.\n\t* @param state - The initial state of a newly created query, e.g. when hydrating. Ignored if the\n\t* query already exists.\n\t* @returns The existing or newly created query.\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* const query = queryCache.build(queryClient, {\n\t* queryKey: ['posts'],\n\t* queryFn: fetchPosts,\n\t* })\n\t* ```\n\t*/\n\tbuild(client, options, state) {\n\t\tconst queryKey = options.queryKey;\n\t\tconst queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n\t\tlet query = this.get(queryHash);\n\t\tif (!query) {\n\t\t\tquery = new Query({\n\t\t\t\tclient,\n\t\t\t\tqueryKey,\n\t\t\t\tqueryHash,\n\t\t\t\toptions: client.defaultQueryOptions(options),\n\t\t\t\tstate,\n\t\t\t\tdefaultOptions: client.getQueryDefaults(queryKey)\n\t\t\t});\n\t\t\tthis.add(query);\n\t\t}\n\t\treturn query;\n\t}\n\t/**\n\t* Adds a query to the cache.\n\t* @internal\n\t* @param query - The query to add. If a query with the same hash is already cached, nothing\n\t* happens.\n\t*/\n\tadd(query) {\n\t\tif (!this.#queries.has(query.queryHash)) {\n\t\t\tthis.#queries.set(query.queryHash, query);\n\t\t\tthis.notify({\n\t\t\t\ttype: \"added\",\n\t\t\t\tquery\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Destroys the given `Query` and removes it from the cache, notifying subscribers with a\n\t* `'removed'` event. A no-op if the query is no longer the one currently stored under its hash\n\t* (e.g. it was already replaced). Used by plugins (e.g. the broadcast client) that mirror\n\t* removals across `QueryCache` instances.\n\t* @param query - The query to remove.\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t* const query = queryCache.find({ queryKey: ['posts'] })\n\t*\n\t* if (query) {\n\t* queryCache.remove(query)\n\t* }\n\t* ```\n\t*/\n\tremove(query) {\n\t\tif (this.#queries.get(query.queryHash) === query) {\n\t\t\tquery.destroy();\n\t\t\tthis.#queries.delete(query.queryHash);\n\t\t\tthis.notify({\n\t\t\t\ttype: \"removed\",\n\t\t\t\tquery\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Removes all queries from the cache.\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* queryCache.clear()\n\t* ```\n\t*/\n\tclear() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tthis.remove(query);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Returns the `Query` instance stored under the given `queryHash`, or `undefined` if none\n\t* exists. Unlike {@link QueryCache#find}, this looks up by the already-computed hash rather\n\t* than by `QueryFilters`. Used by plugins (e.g. broadcast/hydration) that already have a hash\n\t* to look up directly.\n\t* @param queryHash - The hash of the query to look up.\n\t* @returns The query stored under the hash, or `undefined`.\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t* const queryHash = hashKey(['posts'])\n\t*\n\t* const query = queryCache.get(queryHash)\n\t* ```\n\t*/\n\tget(queryHash) {\n\t\treturn this.#queries.get(queryHash);\n\t}\n\t/**\n\t* Returns all queries within the cache.\n\t* @returns Every query in the cache.\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* const queries = queryCache.getAll()\n\t* ```\n\t*/\n\tgetAll() {\n\t\treturn [...this.#queries.values()];\n\t}\n\t/**\n\t* A slightly more advanced method that can be used to get an existing query instance from the\n\t* cache. This instance not only contains all the state for the query, but all of the instances,\n\t* and underlying guts of the query as well. If the query does not exist, `undefined` is\n\t* returned.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about a query in rare scenarios (e.g. looking at `query.state.dataUpdatedAt` to\n\t* decide whether a query is fresh enough to be used as an initial value).\n\t* @param filters - The filters to match, including the required `queryKey`. `exact` defaults to\n\t* `true`.\n\t* @returns The first matching query, or `undefined`.\n\t* @see {@link QueryCache#findAll}\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* const query = queryCache.find({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tfind(filters) {\n\t\tconst defaultedFilters = {\n\t\t\texact: true,\n\t\t\t...filters\n\t\t};\n\t\treturn this.getAll().find((query) => matchQuery(defaultedFilters, query));\n\t}\n\t/**\n\t* An even more advanced method that can be used to get existing query instances from the cache\n\t* that partially match a query key. If no queries match, an empty array is returned.\n\t*\n\t* This is not typically needed for most applications, but can come in handy when needing more\n\t* information about queries in rare scenarios.\n\t* @param filters - The filters to match. Without filters, every query is returned.\n\t* @returns The matching queries.\n\t* @see {@link QueryCache#find}\n\t* @example\n\t* ```ts\n\t* const queryCache = queryClient.getQueryCache()\n\t*\n\t* const queries = queryCache.findAll({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tfindAll(filters = {}) {\n\t\tconst queries = this.getAll();\n\t\treturn Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n\t}\n\t/**\n\t* Notifies every cache listener of an event, in one batch.\n\t* @internal\n\t* @param event - The event passed to every listener.\n\t*/\n\tnotify(event) {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(event);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Calls {@link Query#onFocus} on every cached query, in one batch.\n\t* @internal\n\t*/\n\tonFocus() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tquery.onFocus();\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Calls {@link Query#onOnline} on every cached query, in one batch.\n\t* @internal\n\t*/\n\tonOnline() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tquery.onOnline();\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { QueryCache };\n\n//# sourceMappingURL=queryCache.js.map","import { functionalUpdate, hashKey, hashQueryKeyByOptions, noop, partialMatchKey, resolveQueryValue, skipToken } from \"./utils.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { QueryCache } from \"./queryCache.js\";\n//#region src/queryClient.ts\n/**\n* `QueryClient` is used to interact with a cache of queries and mutations. It owns a\n* `QueryCache` and a `MutationCache` (creating default ones if none are passed in) and holds\n* the default options that are applied to queries and mutations created through it.\n* @example\n* ```ts\n* const queryClient = new QueryClient({\n* defaultOptions: {\n* queries: {\n* staleTime: Infinity,\n* },\n* },\n* })\n*\n* await queryClient.query({ queryKey: ['posts'], queryFn: fetchPosts })\n* ```\n*/\nvar QueryClient = class {\n\t#queryCache;\n\t#mutationCache;\n\t#defaultOptions;\n\t#queryDefaults;\n\t#mutationDefaults;\n\t#mountCount;\n\t#unsubscribeFocus;\n\t#unsubscribeOnline;\n\tconstructor(config = {}) {\n\t\tthis.#queryCache = config.queryCache || new QueryCache();\n\t\tthis.#mutationCache = config.mutationCache || new MutationCache();\n\t\tthis.#defaultOptions = config.defaultOptions || {};\n\t\tthis.#queryDefaults = /* @__PURE__ */ new Map();\n\t\tthis.#mutationDefaults = /* @__PURE__ */ new Map();\n\t\tthis.#mountCount = 0;\n\t}\n\t/**\n\t* Called by a framework adapter's `QueryClientProvider`-equivalent when it mounts, to start\n\t* listening for focus/online events and resume paused mutations. Ref-counted via an internal\n\t* mount count, so nested or multiple providers sharing the same `QueryClient` don't tear down\n\t* the shared listeners until the last one unmounts.\n\t*/\n\tmount() {\n\t\tthis.#mountCount++;\n\t\tif (this.#mountCount !== 1) return;\n\t\tthis.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n\t\t\tif (focused) {\n\t\t\t\tawait this.resumePausedMutations();\n\t\t\t\tthis.#queryCache.onFocus();\n\t\t\t}\n\t\t});\n\t\tthis.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n\t\t\tif (online) {\n\t\t\t\tawait this.resumePausedMutations();\n\t\t\t\tthis.#queryCache.onOnline();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* The inverse of {@link QueryClient#mount} — called by a framework adapter's\n\t* `QueryClientProvider`-equivalent when it unmounts. Only tears down the focus/online\n\t* listeners once the mount count returns to `0`.\n\t*/\n\tunmount() {\n\t\tthis.#mountCount--;\n\t\tif (this.#mountCount !== 0) return;\n\t\tthis.#unsubscribeFocus?.();\n\t\tthis.#unsubscribeFocus = void 0;\n\t\tthis.#unsubscribeOnline?.();\n\t\tthis.#unsubscribeOnline = void 0;\n\t}\n\t/**\n\t* Returns the number of queries in the cache that are currently fetching, optionally\n\t* matching a set of filters. This includes background-fetching, loading new pages, and\n\t* loading more infinite query results.\n\t* @param filters - Narrows down which fetching queries are counted. Without filters, every\n\t* fetching query is counted.\n\t* @returns The number of matching queries whose `fetchStatus` is `'fetching'`.\n\t* @example\n\t* ```ts\n\t* if (queryClient.isFetching()) {\n\t* console.log('At least one query is fetching!')\n\t* }\n\t* ```\n\t*/\n\tisFetching(filters) {\n\t\treturn this.#queryCache.findAll({\n\t\t\t...filters,\n\t\t\tfetchStatus: \"fetching\"\n\t\t}).length;\n\t}\n\t/**\n\t* Returns the number of mutations in the cache that are currently pending, optionally\n\t* matching a set of filters.\n\t* @param filters - Narrows down which pending mutations are counted. Without filters, every\n\t* pending mutation is counted.\n\t* @returns The number of matching mutations whose `status` is `'pending'`.\n\t* @example\n\t* ```ts\n\t* if (queryClient.isMutating()) {\n\t* console.log('At least one mutation is pending!')\n\t* }\n\t* ```\n\t*/\n\tisMutating(filters) {\n\t\treturn this.#mutationCache.findAll({\n\t\t\t...filters,\n\t\t\tstatus: \"pending\"\n\t\t}).length;\n\t}\n\t/**\n\t* Imperative (non-reactive) way to retrieve data for a QueryKey.\n\t* Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.\n\t*\n\t* Hint: Do not use this function inside a component, because it won't receive updates.\n\t* Use `useQuery` to create a `QueryObserver` that subscribes to changes.\n\t* @param queryKey - The query key of the query to read.\n\t* @returns The cached data for the query, or `undefined` if no query with this key has been observed yet.\n\t* @see {@link QueryClient#getQueriesData}\n\t*/\n\tgetQueryData(queryKey) {\n\t\tconst options = this.defaultQueryOptions({ queryKey });\n\t\treturn this.#queryCache.get(options.queryHash)?.state.data;\n\t}\n\t/**\n\t* Returns the cached data of a query, or fetches it if there is none. With `revalidateIfStale`,\n\t* stale cached data is also refetched in the background.\n\t* @param options - The query options. If the query has no cached data yet, it is fetched with\n\t* these options.\n\t* @returns A promise that resolves to the cached data, or to the fetched data if nothing was\n\t* cached yet.\n\t* @deprecated Use queryClient.query({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.\n\t*/\n\tensureQueryData(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\tconst cachedData = query.state.data;\n\t\tif (cachedData === void 0) return this.fetchQuery(options);\n\t\tif (options.revalidateIfStale && query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query))) this.prefetchQuery(defaultedOptions);\n\t\treturn Promise.resolve(cachedData);\n\t}\n\t/**\n\t* Imperative (non-reactive) way to retrieve the cached data of multiple queries at once.\n\t* Only queries matching the given filters are returned; if none match, an empty array is\n\t* returned.\n\t*\n\t* Because the matched queries can hold data of different shapes (e.g. a broad filter can match\n\t* queries with unrelated data types), the `TQueryFnData` generic defaults to `unknown` rather\n\t* than being inferred. Passing a more specific type is a convenience for call sites that know\n\t* every matched query holds the same shape — it is not checked against the actual cache\n\t* contents.\n\t* @param filters - The filters that select which queries to read.\n\t* @returns An array of query key and data pairs. The data is `undefined` for a query with no cached data.\n\t* @see {@link QueryClient#getQueryData}\n\t* @example\n\t* ```ts\n\t* const data = queryClient.getQueriesData({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tgetQueriesData(filters) {\n\t\treturn this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n\t\t\treturn [queryKey, state.data];\n\t\t});\n\t}\n\t/**\n\t* Synchronous way to immediately update a query's cached data. If the updater (or the value\n\t* passed) resolves to `undefined`, the cache is left untouched and no query is created;\n\t* otherwise, if the query does not exist yet, it will be created. To update multiple queries\n\t* at once by partially matching query keys, use {@link QueryClient#setQueriesData} instead.\n\t*\n\t* Updates must be performed immutably: do not mutate `oldData`, or data previously retrieved\n\t* via {@link QueryClient#getQueryData}, in place.\n\t* @param queryKey - The query key to set data for.\n\t* @param updater - Either the new data, or a function that receives the current data (which\n\t* may be `undefined`) and returns the new data.\n\t* @param options - Set `updatedAt` to override the timestamp the written data is recorded with.\n\t* @returns The data that was written, or `undefined` if the updater returned `undefined` — in that case\n\t* the write is skipped and the cache is left unchanged.\n\t* @example\n\t* ```ts\n\t* queryClient.setQueryData(['posts'], newPosts)\n\t*\n\t* // Or, using an updater function that receives the current data:\n\t* queryClient.setQueryData(['posts'], (oldPosts) => [...oldPosts, newPost])\n\t* ```\n\t*/\n\tsetQueryData(queryKey, updater, options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions({ queryKey });\n\t\tconst prevData = this.#queryCache.get(defaultedOptions.queryHash)?.state.data;\n\t\tconst data = functionalUpdate(updater, prevData);\n\t\tif (data === void 0) return;\n\t\treturn this.#queryCache.build(this, defaultedOptions).setData(data, {\n\t\t\t...options,\n\t\t\tmanual: true\n\t\t});\n\t}\n\t/**\n\t* Synchronous way to immediately update the cached data of multiple queries at once, using\n\t* filters or partial query key matching. Only queries that already exist and match the given\n\t* filters are updated; no new cache entries are created. Internally this calls\n\t* {@link QueryClient#setQueryData} for each matching query.\n\t* @param filters - The filters that select which existing queries to update.\n\t* @param updater - Either the new data, or a function that receives each matched query's current\n\t* data (which may be `undefined`) and returns the new data.\n\t* @param options - Set `updatedAt` to override the timestamp the written data is recorded with.\n\t* @returns One `[queryKey, data]` tuple per matched query, in the same shape and with the same\n\t* `undefined` case as {@link QueryClient#setQueryData}.\n\t* @example\n\t* ```ts\n\t* queryClient.setQueriesData({ queryKey: ['posts'] }, (oldPosts) =>\n\t* oldPosts ? oldPosts.filter((post) => post.id !== deletedId) : oldPosts,\n\t* )\n\t* ```\n\t*/\n\tsetQueriesData(filters, updater, options) {\n\t\treturn notifyManager.batch(() => this.#queryCache.findAll(filters).map(({ queryKey }) => [queryKey, this.setQueryData(queryKey, updater, options)]));\n\t}\n\t/**\n\t* Imperative (non-reactive) way to retrieve an existing query's state. If the query does not\n\t* exist, `undefined` is returned.\n\t* @param queryKey - The query key of the query to read.\n\t* @returns The query's state, or `undefined` if no query with this key exists.\n\t* @example\n\t* ```ts\n\t* const state = queryClient.getQueryState(['posts'])\n\t* console.log(state?.dataUpdatedAt)\n\t* ```\n\t*/\n\tgetQueryState(queryKey) {\n\t\tconst options = this.defaultQueryOptions({ queryKey });\n\t\treturn this.#queryCache.get(options.queryHash)?.state;\n\t}\n\t/**\n\t* Removes queries from the cache that match the given filters. Unlike\n\t* {@link QueryClient#invalidateQueries} or {@link QueryClient#refetchQueries}, this removes\n\t* matching queries from the cache instead of refetching them. Without filters, every query in\n\t* the cache is removed.\n\t* @param filters - The filters that select which queries to remove. Without filters, every query\n\t* is removed.\n\t* @example\n\t* ```ts\n\t* queryClient.removeQueries({ queryKey: ['posts'], exact: true })\n\t* ```\n\t*/\n\tremoveQueries(filters) {\n\t\tconst queryCache = this.#queryCache;\n\t\tnotifyManager.batch(() => {\n\t\t\tqueryCache.findAll(filters).forEach((query) => {\n\t\t\t\tqueryCache.remove(query);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Resets queries matching the given filters back to their initial state (e.g. any\n\t* `initialData`), notifying subscribers rather than removing them. Active queries among the\n\t* matched set are then refetched, and the returned promise resolves once that refetch settles.\n\t* @param filters - The filters that select which queries to reset. Without filters, every query\n\t* is reset.\n\t* @param options - Passed to the refetch of the active matched queries, e.g. `cancelRefetch` and\n\t* `throwOnError`.\n\t* @returns A promise that resolves once the refetch of the active matched queries settles.\n\t* @example\n\t* ```ts\n\t* await queryClient.resetQueries({ queryKey: ['posts'], exact: true })\n\t* ```\n\t*/\n\tresetQueries(filters, options) {\n\t\tconst queryCache = this.#queryCache;\n\t\treturn notifyManager.batch(() => {\n\t\t\tconst matched = queryCache.findAll(filters);\n\t\t\tconst queriesToRefetch = new Set(matched);\n\t\t\tmatched.forEach((query) => {\n\t\t\t\tquery.reset();\n\t\t\t});\n\t\t\treturn this.refetchQueries({\n\t\t\t\ttype: \"active\",\n\t\t\t\tpredicate: (query) => queriesToRefetch.has(query)\n\t\t\t}, options);\n\t\t});\n\t}\n\t/**\n\t* Cancels outgoing fetches for queries matching the given filters. Most useful when performing\n\t* optimistic updates, since any outgoing refetch that resolves afterwards would otherwise\n\t* overwrite the optimistic update. By default (`revert: true`), a cancelled query's data is\n\t* reverted to its state before the outgoing fetch started.\n\t*\n\t* The returned promise never rejects, even if individual cancellations fail.\n\t* @param filters - The filters that select which queries to cancel. Without filters, every query\n\t* is cancelled.\n\t* @param cancelOptions - Passed to each matched query's cancellation. `revert` defaults to\n\t* `true`.\n\t* @returns A promise that resolves once every cancellation has settled.\n\t* @example\n\t* ```ts\n\t* await queryClient.cancelQueries({ queryKey: ['posts'], exact: true })\n\t* ```\n\t*/\n\tcancelQueries(filters, cancelOptions = {}) {\n\t\tconst defaultedCancelOptions = {\n\t\t\trevert: true,\n\t\t\t...cancelOptions\n\t\t};\n\t\tconst promises = notifyManager.batch(() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));\n\t\treturn Promise.all(promises).then(noop).catch(noop);\n\t}\n\t/**\n\t* Marks queries matching the given filters as invalidated. Unlike\n\t* {@link QueryClient#removeQueries}, invalidated queries stay in the cache.\n\t*\n\t* Unless `filters.refetchType` is `'none'`, matching queries are then refetched via\n\t* {@link QueryClient#refetchQueries}, using `filters.refetchType` if set, otherwise\n\t* `filters.type`, otherwise `'active'`.\n\t* @param filters - The filters that select which queries to invalidate, plus `refetchType` to\n\t* control which of them to refetch afterwards. Without filters, every query is invalidated.\n\t* @param options - Passed to {@link QueryClient#refetchQueries}, e.g. `cancelRefetch` and\n\t* `throwOnError`.\n\t* @returns A promise that resolves once the refetch settles, or immediately if `refetchType` is\n\t* `'none'`.\n\t* @example\n\t* ```ts\n\t* await queryClient.invalidateQueries({ queryKey: ['posts'], refetchType: 'active' })\n\t* ```\n\t*/\n\tinvalidateQueries(filters, options = {}) {\n\t\treturn notifyManager.batch(() => {\n\t\t\tthis.#queryCache.findAll(filters).forEach((query) => {\n\t\t\t\tquery.invalidate();\n\t\t\t});\n\t\t\tif (filters?.refetchType === \"none\") return Promise.resolve();\n\t\t\treturn this.refetchQueries({\n\t\t\t\t...filters,\n\t\t\t\ttype: filters?.refetchType ?? filters?.type ?? \"active\"\n\t\t\t}, options);\n\t\t});\n\t}\n\t/**\n\t* Refetches queries matching the given filters, regardless of whether they are stale. Without\n\t* filters, every query in the cache is refetched. Queries that are disabled, or static (only\n\t* have observers with a static `staleTime`), are never refetched.\n\t*\n\t* By default (`cancelRefetch: true`), a currently running fetch is cancelled before the new\n\t* one starts. The returned promise resolves once all matching queries have settled; it does\n\t* not reject on individual query failures unless `throwOnError` is set.\n\t* @param filters - The filters that select which queries to refetch. Without filters, every query\n\t* in the cache is included.\n\t* @param options - Set `cancelRefetch` to `false` to keep a running fetch instead of cancelling\n\t* it, and `throwOnError` to `true` to reject when a refetch fails.\n\t* @returns A promise that resolves once every matched query has settled.\n\t* @example\n\t* ```ts\n\t* // refetch all active queries partially matching a query key:\n\t* await queryClient.refetchQueries({ queryKey: ['posts'], type: 'active' })\n\t* ```\n\t*/\n\trefetchQueries(filters, options = {}) {\n\t\tconst fetchOptions = {\n\t\t\t...options,\n\t\t\tcancelRefetch: options.cancelRefetch ?? true\n\t\t};\n\t\tconst promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {\n\t\t\tlet promise = query.fetch(void 0, fetchOptions);\n\t\t\tif (!fetchOptions.throwOnError) promise = promise.catch(noop);\n\t\t\treturn query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n\t\t}));\n\t\treturn Promise.all(promises).then(noop);\n\t}\n\t/**\n\t* Asynchronous method to fetch and cache a query, resolving with the data or throwing with\n\t* the error.\n\t*\n\t* If the query already exists in the cache and its data is not stale (per the given\n\t* `staleTime`), the cached data is returned without fetching. Otherwise, the query is fetched\n\t* and the promise resolves once the fetch settles. If a `select` function is provided, it is\n\t* applied to the data in both cases (cached or freshly fetched) before it is returned.\n\t*\n\t* Unlike a reactive observer, retries are disabled by default here (`retry: false`) unless\n\t* explicitly configured, since there is no component to catch a thrown error and retry through\n\t* re-render.\n\t*\n\t* The accepted options are `QueryObserverOptions` minus the fields that only make sense for a\n\t* reactive observer — `enabled`, `refetchInterval`, `refetchIntervalInBackground`,\n\t* `refetchOnWindowFocus`, `refetchOnReconnect`, `refetchOnMount`, `retryOnMount`,\n\t* `notifyOnChangeProps`, `throwOnError`, `suspense`, and `placeholderData` are not part of this\n\t* method's options.\n\t*\n\t* This method replaces the deprecated `fetchQuery`, and — combined with\n\t* `{ staleTime: 'static' }` — the deprecated `ensureQueryData`.\n\t* @param options - The query options, including the `queryKey` and the `queryFn` used if the\n\t* query needs to fetch.\n\t* @returns A promise that resolves to the data, or to the result of `select` if provided. It\n\t* rejects with the error from the fetch or from `select`.\n\t* @example\n\t* ```ts\n\t* try {\n\t* const data = await queryClient.query({ queryKey, queryFn, staleTime: 10000 })\n\t* } catch (error) {\n\t* console.log(error)\n\t* }\n\t* ```\n\t*/\n\tasync query(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tif (defaultedOptions.retry === void 0) defaultedOptions.retry = false;\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\tconst queryData = query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query)) ? await query.fetch(defaultedOptions) : query.state.data;\n\t\tconst select = defaultedOptions.select;\n\t\tif (select) return select(queryData);\n\t\treturn queryData;\n\t}\n\t/**\n\t* Fetches and caches a query, or returns its cached data if it isn't stale. Unlike in observers,\n\t* the fetch isn't retried unless `retry` is set.\n\t* @param options - The query options, including the `queryKey` and the `queryFn` used if the\n\t* query needs to fetch.\n\t* @returns A promise that resolves to the cached or fetched data, or rejects with the fetch\n\t* error.\n\t* @deprecated Use queryClient.query(options) instead. This method will be removed in the next major version.\n\t*/\n\tfetchQuery(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tif (defaultedOptions.retry === void 0) defaultedOptions.retry = false;\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\treturn query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query)) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n\t}\n\t/**\n\t* Fetches and caches a query like {@link QueryClient#fetchQuery}, but ignores the result and any\n\t* error.\n\t* @param options - The query options, including the `queryKey` and the `queryFn` used if the\n\t* query needs to fetch.\n\t* @returns A promise that resolves once the fetch settles. It never rejects.\n\t* @deprecated Use queryClient.query(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.\n\t*/\n\tprefetchQuery(options) {\n\t\treturn this.fetchQuery(options).then(noop).catch(noop);\n\t}\n\t/**\n\t* Asynchronous method to fetch and cache an infinite query, resolving with an\n\t* {@link InfiniteData} object or throwing with the error.\n\t*\n\t* Behaves like {@link QueryClient#query}, accepting the same options (minus\n\t* `initialPageParam`), plus the required `initialPageParam`, and an optional `pages` /\n\t* `getNextPageParam` pair used to refetch a fixed number of pages from the start.\n\t*\n\t* This method replaces the deprecated `fetchInfiniteQuery`, and — combined with\n\t* `{ staleTime: 'static' }` — the deprecated `ensureInfiniteQueryData`.\n\t* @param options - The infinite query options, including the `queryKey`, the `queryFn`, and the\n\t* `initialPageParam`.\n\t* @returns A promise that resolves to the {@link InfiniteData}, or to the result of `select` if\n\t* provided. It rejects with the error from the fetch or from `select`.\n\t* @example\n\t* ```ts\n\t* try {\n\t* const data = await queryClient.infiniteQuery({ queryKey, queryFn, initialPageParam: 0 })\n\t* console.log(data.pages)\n\t* } catch (error) {\n\t* console.log(error)\n\t* }\n\t* ```\n\t*/\n\tinfiniteQuery(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.query(options);\n\t}\n\t/**\n\t* Fetches and caches an infinite query, or returns its cached data if it isn't stale.\n\t* @param options - The infinite query options, including the `queryKey`, the `queryFn`, and the\n\t* `initialPageParam`.\n\t* @returns A promise that resolves to the cached or fetched {@link InfiniteData}, or rejects with\n\t* the fetch error.\n\t* @deprecated Use queryClient.infiniteQuery(options) instead. This method will be removed in the next major version.\n\t*/\n\tfetchInfiniteQuery(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.fetchQuery(options);\n\t}\n\t/**\n\t* Fetches and caches an infinite query like {@link QueryClient#fetchInfiniteQuery}, but ignores\n\t* the result and any error.\n\t* @param options - The infinite query options, including the `queryKey`, the `queryFn`, and the\n\t* `initialPageParam`.\n\t* @returns A promise that resolves once the fetch settles. It never rejects.\n\t* @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.\n\t*/\n\tprefetchInfiniteQuery(options) {\n\t\treturn this.fetchInfiniteQuery(options).then(noop).catch(noop);\n\t}\n\t/**\n\t* Returns the cached data of an infinite query, or fetches it if there is none. With\n\t* `revalidateIfStale`, stale cached data is also refetched in the background.\n\t* @param options - The infinite query options. If the query has no cached data yet, it is fetched\n\t* with these options.\n\t* @returns A promise that resolves to the cached {@link InfiniteData}, or to the fetched data if\n\t* nothing was cached yet.\n\t* @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.\n\t*/\n\tensureInfiniteQueryData(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.ensureQueryData(options);\n\t}\n\t/**\n\t* Resumes mutations that were paused because there was no network connection. Does nothing\n\t* (resolving immediately) if the client is currently offline.\n\t* @returns A promise that resolves once the resumed mutations have settled.\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* await queryClient.resumePausedMutations()\n\t* ```\n\t*/\n\tresumePausedMutations() {\n\t\tif (onlineManager.isOnline()) return this.#mutationCache.resumePausedMutations();\n\t\treturn Promise.resolve();\n\t}\n\t/**\n\t* Returns the query cache this client is connected to.\n\t* @returns The {@link QueryCache} instance.\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* const queryCache = queryClient.getQueryCache()\n\t* const queries = queryCache.findAll({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tgetQueryCache() {\n\t\treturn this.#queryCache;\n\t}\n\t/**\n\t* Returns the mutation cache this client is connected to.\n\t* @returns The {@link MutationCache} instance.\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* const mutationCache = queryClient.getMutationCache()\n\t* const mutations = mutationCache.findAll({ status: 'pending' })\n\t* ```\n\t*/\n\tgetMutationCache() {\n\t\treturn this.#mutationCache;\n\t}\n\t/**\n\t* Returns the default options that were set when creating the client, or via\n\t* {@link QueryClient#setDefaultOptions}.\n\t* @returns The client's current default options.\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* const defaultOptions = queryClient.getDefaultOptions()\n\t* ```\n\t*/\n\tgetDefaultOptions() {\n\t\treturn this.#defaultOptions;\n\t}\n\t/**\n\t* Dynamically sets the default options for this client, overwriting any previously defined\n\t* default options.\n\t* @param options - The new default options for queries and mutations.\n\t* @see {@link QueryClient#getDefaultOptions}\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* queryClient.setDefaultOptions({\n\t* queries: {\n\t* staleTime: Infinity,\n\t* },\n\t* })\n\t* ```\n\t*/\n\tsetDefaultOptions(options) {\n\t\tthis.#defaultOptions = options;\n\t}\n\t/**\n\t* Sets default options for queries whose query key partially matches the given `queryKey`.\n\t*\n\t* If several registered query defaults match a given query key, they are merged together in\n\t* registration order by {@link QueryClient#getQueryDefaults}, so register defaults from the\n\t* most generic key to the least generic one — more specific defaults should be registered\n\t* after more generic ones so they take precedence.\n\t* @param queryKey - The query key that query keys are partially matched against.\n\t* @param options - The default options applied to matching queries.\n\t* @example\n\t* ```ts\n\t* queryClient.setQueryDefaults(['posts'], { queryFn: fetchPosts })\n\t*\n\t* await queryClient.query({ queryKey: ['posts'] })\n\t* ```\n\t*/\n\tsetQueryDefaults(queryKey, options) {\n\t\tthis.#queryDefaults.set(hashKey(queryKey), {\n\t\t\tqueryKey,\n\t\t\tdefaultOptions: options\n\t\t});\n\t}\n\t/**\n\t* Returns the default options registered for queries whose query key partially matches the\n\t* given `queryKey`, via {@link QueryClient#setQueryDefaults}. If multiple registered defaults\n\t* match, they are merged together in registration order.\n\t* @param queryKey - The query key to look up registered defaults for.\n\t* @returns The merged default options of every registration that matches, or an empty object if\n\t* none match.\n\t* @example\n\t* ```ts\n\t* const defaultOptions = queryClient.getQueryDefaults(['posts'])\n\t* ```\n\t*/\n\tgetQueryDefaults(queryKey) {\n\t\tconst defaults = [...this.#queryDefaults.values()];\n\t\tconst result = {};\n\t\tdefaults.forEach((queryDefault) => {\n\t\t\tif (partialMatchKey(queryKey, queryDefault.queryKey)) Object.assign(result, queryDefault.defaultOptions);\n\t\t});\n\t\treturn result;\n\t}\n\t/**\n\t* Sets default options for mutations whose mutation key partially matches the given\n\t* `mutationKey`. As with {@link QueryClient#setQueryDefaults}, the order of registration\n\t* matters when several registered defaults match the same mutation key.\n\t* @param mutationKey - The mutation key that mutation keys are partially matched against.\n\t* @param options - The default options applied to matching mutations.\n\t* @see {@link QueryClient#getMutationDefaults}\n\t* @example\n\t* ```ts\n\t* queryClient.setMutationDefaults(['addPost'], { mutationFn: addPost })\n\t* ```\n\t*/\n\tsetMutationDefaults(mutationKey, options) {\n\t\tthis.#mutationDefaults.set(hashKey(mutationKey), {\n\t\t\tmutationKey,\n\t\t\tdefaultOptions: options\n\t\t});\n\t}\n\t/**\n\t* Returns the default options registered for mutations whose mutation key partially matches\n\t* the given `mutationKey`, via {@link QueryClient#setMutationDefaults}. If multiple registered\n\t* defaults match, they are merged together in registration order.\n\t* @param mutationKey - The mutation key to look up registered defaults for.\n\t* @returns The merged default options of every registration that matches, or an empty object if\n\t* none match.\n\t* @example\n\t* ```ts\n\t* const defaultOptions = queryClient.getMutationDefaults(['addPost'])\n\t* ```\n\t*/\n\tgetMutationDefaults(mutationKey) {\n\t\tconst defaults = [...this.#mutationDefaults.values()];\n\t\tconst result = {};\n\t\tdefaults.forEach((queryDefault) => {\n\t\t\tif (partialMatchKey(mutationKey, queryDefault.mutationKey)) Object.assign(result, queryDefault.defaultOptions);\n\t\t});\n\t\treturn result;\n\t}\n\t/**\n\t* Called by framework adapters (e.g. inside `useQuery`) to resolve the options passed by the\n\t* caller into their final, defaulted form: merging the client's own `defaultOptions.queries`,\n\t* then `queryClient.setQueryDefaults` for the given `queryKey`, then the caller's options on\n\t* top. A no-op if the options are already defaulted (`_defaulted: true`).\n\t* @param options - The query options passed by the caller.\n\t* @returns The defaulted options, with `queryHash` and dependent defaults (e.g.\n\t* `refetchOnReconnect`) filled in.\n\t*/\n\tdefaultQueryOptions(options) {\n\t\tif (options._defaulted) return options;\n\t\tconst defaultedOptions = {\n\t\t\t...this.#defaultOptions.queries,\n\t\t\t...this.getQueryDefaults(options.queryKey),\n\t\t\t...options,\n\t\t\t_defaulted: true\n\t\t};\n\t\tif (!defaultedOptions.queryHash) defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n\t\tif (defaultedOptions.refetchOnReconnect === void 0) defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n\t\tif (defaultedOptions.throwOnError === void 0) defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n\t\tif (!defaultedOptions.networkMode && defaultedOptions.persister) defaultedOptions.networkMode = \"offlineFirst\";\n\t\tif (defaultedOptions.queryFn === skipToken) defaultedOptions.enabled = false;\n\t\treturn defaultedOptions;\n\t}\n\t/**\n\t* The mutation counterpart of {@link QueryClient#defaultQueryOptions}. Called by framework\n\t* adapters (e.g. inside `useMutation`) to merge the client's `defaultOptions.mutations`, then\n\t* `queryClient.setMutationDefaults` for the given `mutationKey`, then the caller's options on\n\t* top. A no-op if the options are already defaulted (`_defaulted: true`).\n\t* @param options - The mutation options passed by the caller.\n\t* @returns The defaulted options.\n\t*/\n\tdefaultMutationOptions(options) {\n\t\tif (options?._defaulted) return options;\n\t\treturn {\n\t\t\t...this.#defaultOptions.mutations,\n\t\t\t...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n\t\t\t...options,\n\t\t\t_defaulted: true\n\t\t};\n\t}\n\t/**\n\t* Clears both the query cache and the mutation cache this client is connected to.\n\t* @example\n\t* ```ts\n\t* import { QueryClient } from '@tanstack/query-core'\n\t*\n\t* const queryClient = new QueryClient()\n\t* queryClient.clear()\n\t* ```\n\t*/\n\tclear() {\n\t\tthis.#queryCache.clear();\n\t\tthis.#mutationCache.clear();\n\t}\n};\n//#endregion\nexport { QueryClient };\n\n//# sourceMappingURL=queryClient.js.map","var baseUnset = require('./_baseUnset'),\n isIndex = require('./_isIndex');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n}\n\nmodule.exports = basePullAt;\n","var baseIteratee = require('./_baseIteratee'),\n basePullAt = require('./_basePullAt');\n\n/**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\nfunction remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = baseIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n}\n\nmodule.exports = remove;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n","var baseIteratee = require('./_baseIteratee'),\n baseUniq = require('./_baseUniq');\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nmodule.exports = uniqBy;\n","import {\n MutationCache,\n QueryCache,\n QueryClient,\n} from '@tanstack/react-query';\nimport remove from 'lodash/remove';\nimport uniq from 'lodash/uniq';\nimport uniqBy from 'lodash/uniqBy';\nimport { singleton } from 'tsyringe';\n\nimport type { GenericData } from '../../../models/data.models';\nimport type { ConfigBase } from '../../../models/config.models';\n\n@singleton()\nexport class QueryClientService<TQueryKey extends string = string> {\n public mutationCache: MutationCache;\n public queryCache: QueryCache;\n public queryClient: QueryClient;\n\n public queryKeyDependencies: Record<TQueryKey, TQueryKey[]>;\n\n public constructor(kwArgs: { config: Pick<ConfigBase, 'queryClient'>; queryKeyDependencies: Array<Record<TQueryKey, TQueryKey[]>> }) {\n this.queryKeyDependencies = QueryClientService.mergeQueryKeyDependencies<TQueryKey>(kwArgs.queryKeyDependencies);\n const queryCache = new QueryCache({});\n const mutationCache = new MutationCache({});\n const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n gcTime: Infinity,\n retry: kwArgs.config.queryClient.retry,\n retryDelay: kwArgs.config.queryClient.retryDelay,\n staleTime: Infinity,\n },\n },\n mutationCache,\n queryCache,\n });\n\n this.queryCache = queryCache;\n this.mutationCache = mutationCache;\n this.queryClient = queryClient;\n }\n\n private static mergeQueryKeyDependencies<TQueryKey extends string>(dependencies: Array<Record<TQueryKey, TQueryKey[]>>): Record<TQueryKey, TQueryKey[]> {\n const merged: Record<TQueryKey, TQueryKey[]> = {} as Record<TQueryKey, TQueryKey[]>;\n dependencies.forEach(dependency => {\n Object.entries<TQueryKey[]>(dependency).forEach(([key, value]) => {\n if (!merged[key as TQueryKey]) {\n merged[key as TQueryKey] = [];\n }\n merged[key as TQueryKey].push(...value);\n });\n });\n Object.keys(merged).forEach(key => {\n merged[key as TQueryKey] = uniq(merged[key as TQueryKey]);\n });\n return merged;\n }\n\n public async cancelQueries(queryKeys: string[][]) {\n const queryClient = this.queryClient;\n for (const queryKey of this.getUniqueQueryKeys(queryKeys ?? [])) {\n await queryClient.cancelQueries({ queryKey });\n }\n }\n\n public getGenericKey(key: TQueryKey, arg?: unknown) {\n const keyArray: string[] = [key];\n if (arg) {\n if (typeof arg === 'string') {\n keyArray.push(arg);\n } else {\n keyArray.push(JSON.stringify(arg));\n }\n }\n return keyArray;\n }\n\n public getItemFromCache<T extends GenericData>(queryKey: TQueryKey, itemId: string): T {\n const items = this.getValidQueryData<T[]>([queryKey]);\n return items?.find(item => item.id === itemId);\n }\n\n public getQueryKeyDependencies(queryKeys: TQueryKey[], includeSelf = false): string[][] {\n const keys: TQueryKey[][] = [];\n\n queryKeys.forEach(key => {\n keys.push(...this.getQueryKeyDependenciesInternal(key).map(k => [k]));\n if (includeSelf) {\n keys.unshift([key]);\n }\n });\n return this.getUniqueQueryKeys(keys);\n }\n\n public getUniqueQueryKeys<T>(queryKeys: T[][]): T[][] {\n return uniqBy(queryKeys, x => x.join('-'));\n }\n\n public getValidQueryData<T>(queryKey: string[]): T {\n const cache = this.queryCache.find({\n queryKey,\n });\n if (cache?.state?.isInvalidated) {\n return undefined;\n }\n return this.queryClient.getQueryData<T>(queryKey);\n }\n\n public async invalidateQueryKeys(queryKeys: string[][]) {\n for (const queryKey of this.getUniqueQueryKeys(queryKeys ?? [])) {\n await this.queryClient.cancelQueries({ queryKey });\n await this.queryClient.invalidateQueries({ queryKey });\n }\n }\n\n public removeQueries(queryKeys: string[][]) {\n for (const queryKey of this.getUniqueQueryKeys(queryKeys ?? [])) {\n this.queryClient.removeQueries({ queryKey });\n }\n }\n\n private getDirectQueryKeyDependents(key: TQueryKey): TQueryKey[] {\n return Object.entries<TQueryKey[]>(this.queryKeyDependencies)\n .filter(([, dependencyKeys]) => dependencyKeys.includes(key))\n .map(([dependentKey]) => dependentKey as TQueryKey);\n }\n\n private getQueryKeyDependenciesInternal(key: TQueryKey, currentKeys: TQueryKey[] = [], originalKey?: TQueryKey): TQueryKey[] {\n const keys: TQueryKey[] = [...currentKeys];\n this.getDirectQueryKeyDependents(key).forEach(dependentKey => {\n if (!keys.includes(dependentKey)) {\n keys.push(dependentKey);\n keys.push(...this.getQueryKeyDependenciesInternal(dependentKey, [...keys], originalKey ?? key));\n }\n });\n return remove(uniq(keys), x => x !== originalKey);\n }\n}\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"mappings":";;;;;;;;;;CAUA,SAASiD,EAAU,GAAO,GAAW;EAInC,KAHA,IAAIC,IAAQ,IACRC,IAASC,KAAS,OAAO,IAAIA,EAAM,QAEhC,EAAEF,IAAQC,IACf,IAAIE,EAAUD,EAAMF,IAAQA,GAAOE,CAAK,GACtC,OAAO;EAGX,OAAO;CACT;CAEA,EAAO,UAAUH;;CCtBjB,IAAIM,IAAA3C,EAAA,GACAqC,IAAAD,GAAA,GACAQ,IAAAzC,EAAA,GAGA0C,IAAuB,GACvBC,IAAyB;CAe7B,SAASC,EAAY,GAAO,GAAO,GAAS,GAAY,GAAW,GAAO;EACxE,IAAIC,IAAYC,IAAUJ,GACtBK,IAAYV,EAAM,QAClBW,IAAYC,EAAM;EAEtB,IAAIF,KAAaC,KAAa,EAAEH,KAAaG,IAAYD,IACvD,OAAO;EAGT,IAAIG,IAAaC,EAAM,IAAId,CAAK,GAC5Be,IAAaD,EAAM,IAAIF,CAAK;EAChC,IAAIC,KAAcE,GAChB,OAAOF,KAAcD,KAAS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