{"version":3,"sources":["../node_modules/react-query/es/core/infiniteQueryBehavior.js","../node_modules/react-query/es/core/queryClient.js","../node_modules/react-query/es/index.js","../node_modules/react-query/es/react/reactBatchedUpdates.js","../node_modules/react-query/es/react/setBatchUpdatesFn.js","../node_modules/react-query/es/react/logger.js","../node_modules/react-query/es/react/setLogger.js","../node_modules/react-query/es/core/utils.js","../node_modules/react-query/es/core/retryer.js","../node_modules/react-query/es/core/notifyManager.js","../node_modules/react-query/es/core/index.js","../node_modules/react-query/es/core/focusManager.js","../node_modules/react-query/es/core/subscribable.js","../node_modules/react-query/es/core/onlineManager.js","../node_modules/react-query/es/core/logger.js","../node_modules/react-query/es/react/QueryClientProvider.js","../node_modules/react-query/es/core/query.js","../node_modules/react-query/es/core/queryCache.js","../node_modules/react-query/es/core/mutation.js","../node_modules/react-query/es/core/mutationCache.js","../node_modules/react-query/es/react/index.js"],"names":["getNextPageParam","options","pages","length","getPreviousPageParam","QueryClient","config","this","queryCache","QueryCache","mutationCache","MutationCache","defaultOptions","queryDefaults","mutationDefaults","_proto","prototype","mount","_this","unsubscribeFocus","focusManager","subscribe","isFocused","onlineManager","isOnline","onFocus","unsubscribeOnline","onOnline","unmount","_this$unsubscribeFocu","_this$unsubscribeOnli","call","isFetching","arg1","arg2","filters","parseFilterArgs","fetching","findAll","isMutating","_extends","getQueryData","queryKey","_this$queryCache$find","find","state","data","getQueriesData","queryKeyOrFilters","getQueryCache","map","_ref","setQueryData","updater","parsedOptions","parseQueryArgs","defaultedOptions","defaultQueryOptions","build","setData","setQueriesData","_this2","notifyManager","batch","_ref2","getQueryState","_this$queryCache$find2","removeQueries","forEach","query","remove","resetQueries","arg3","_this3","_parseFilterArgs3","refetchFilters","active","reset","refetchQueries","cancelQueries","_this4","_parseFilterArgs4","_parseFilterArgs4$","cancelOptions","revert","promises","cancel","Promise","all","then","noop","catch","invalidateQueries","_ref3","_filters$refetchActiv","_filters$refetchInact","_this5","_parseFilterArgs5","refetchActive","inactive","refetchInactive","invalidate","_this6","_parseFilterArgs6","fetch","undefined","meta","refetchPage","promise","throwOnError","fetchQuery","retry","isStaleByTime","staleTime","resolve","prefetchQuery","fetchInfiniteQuery","behavior","onFetch","context","fetchFn","_context$fetchOptions","_context$fetchOptions2","_context$fetchOptions3","_context$fetchOptions4","_context$state$data","_context$state$data2","fetchOptions","fetchMore","pageParam","isFetchingNextPage","direction","isFetchingPreviousPage","oldPages","oldPageParams","pageParams","abortController","getAbortController","abortSignal","signal","newPageParams","cancelled","queryFn","reject","buildNewPages","param","page","previous","concat","fetchPage","manual","queryFnContext","queryFnResult","isCancelable","_manual","_param","shouldFetchFirstPage","_loop","i","_param2","finalPromise","abort","prefetchInfiniteQuery","cancelMutations","_this7","getAll","mutation","resumePausedMutations","getMutationCache","executeMutation","execute","getDefaultOptions","setDefaultOptions","setQueryDefaults","result","x","hashQueryKey","push","getQueryDefaults","_this$queryDefaults$f","partialMatchKey","setMutationDefaults","mutationKey","getMutationDefaults","_this$mutationDefault","_defaulted","queries","queryHash","hashQueryKeyByOptions","defaultQueryObserverOptions","defaultMutationOptions","mutations","clear","unstable_batchedUpdates","ReactDOM","setBatchNotifyFunction","logger","console","setLogger","isServer","window","functionalUpdate","input","isValidTimeout","value","Infinity","ensureQueryKeyArray","Array","isArray","timeUntilStale","updatedAt","Math","max","Date","now","isQueryKey","matchQuery","exact","predicate","stale","queryStatusFilter","mapQueryStatusFilter","isActive","isStale","matchMutation","status","queryKeyHashFn","asArray","JSON","stringify","_","val","isPlainObject","Object","keys","sort","reduce","key","a","b","partialDeepEqual","some","replaceEqualDeep","array","aSize","bItems","bSize","copy","equalItems","o","hasObjectPrototype","ctor","constructor","prot","hasOwnProperty","toString","sleep","timeout","setTimeout","scheduleMicrotask","callback","error","AbortController","defaultRetryDelay","failureCount","min","pow","CancelledError","silent","isCancelledError","Retryer","cancelFn","continueFn","promiseResolve","promiseReject","cancelRetry","continueRetry","continue","isPaused","isResolved","isTransportCancelable","outerResolve","outerReject","onSuccess","onError","run","promiseOrValue","fn","_unused","_config$retry","_config$retryDelay","retryDelay","delay","shouldRetry","onFail","continueResolve","onPause","onContinue","NotifyManager","queue","transactions","notifyFn","batchNotifyFn","flush","schedule","batchCalls","_len","arguments","args","_key","apply","setNotifyFunction","_Subscribable","FocusManager","setup","_window","addEventListener","listener","removeEventListener","_inheritsLoose","onSubscribe","cleanup","setEventListener","onUnsubscribe","_this$cleanup","hasListeners","_this$cleanup2","focused","setFocused","listeners","document","includes","visibilityState","Subscribable","filter","OnlineManager","online","setOnline","navigator","onLine","getLogger","newLogger","defaultContext","React","createContext","QueryClientSharingContext","getQueryClientContext","contextSharing","ReactQueryClientContext","QueryClientProvider","client","_ref$contextSharing","children","useEffect","Context","createElement","Provider","Query","abortSignalConsumed","hadObservers","setOptions","observers","cache","initialState","getDefaultState","scheduleGc","_this$options$cacheTi","cacheTime","clearGcTimeout","gcTimeout","optionalRemove","clearTimeout","_this$options$isDataE","_this$options","prevData","isDataEqual","structuralSharing","dispatch","type","dataUpdatedAt","setState","setStateOptions","_this$retryer","retryer","destroy","observer","enabled","isInvalidated","getCurrentResult","_this$retryer2","shouldFetchOnWindowFocus","refetch","_this$retryer3","shouldFetchOnReconnect","addObserver","indexOf","notify","removeObserver","getObserversCount","_this$options$behavio","_abortController$abor","cancelRefetch","_this$retryer4","defineProperty","enumerable","get","_this$options$behavio2","revertState","fetchMeta","bind","action","reducer","onQueryUpdate","initialData","initialDataUpdatedAt","hasData","dataUpdateCount","errorUpdateCount","errorUpdatedAt","fetchFailureCount","_action$meta","_action$dataUpdatedAt","queriesMap","_options$queryHash","add","queryInMap","event","Mutation","mutationId","variables","restored","onMutate","onSettled","_this$options$retry","mutationFn","onMutationUpdate","pausedMutations"],"mappings":"6PA6HO,SAASA,EAAiBC,EAASC,GACxC,OAAmC,MAA5BD,EAAQD,sBAA2B,EAASC,EAAQD,iBAAiBE,EAAMA,EAAMC,OAAS,GAAID,GAEhG,SAASE,EAAqBH,EAASC,GAC5C,OAA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J,KAAKwL,UAAYxL,KAAKwL,UAAU+I,QAAO,SAAU/J,GAC/C,OAAOA,IAAMT,KAEfA,EAAShF,SACT/E,KAAKqY,OAAOtO,IAGdvJ,EAAOiL,MAAQ,WACb,IAAInI,EAAStD,KAEbuD,IAAcC,OAAM,WAClBF,EAAOkI,UAAU3H,SAAQ,SAAUkG,GACjCzG,EAAOS,OAAOgG,UAKpBvJ,EAAOsJ,OAAS,WACd,OAAO9J,KAAKwL,WAGdhL,EAAO6B,KAAO,SAAcT,GAK1B,MAJ6B,qBAAlBA,EAAQsL,QACjBtL,EAAQsL,OAAQ,GAGXlN,KAAKwL,UAAUnJ,MAAK,SAAU0H,GACnC,OAAO0D,YAAc7L,EAASmI,OAIlCvJ,EAAOuB,QAAU,SAAiBH,GAChC,OAAO5B,KAAKwL,UAAU+I,QAAO,SAAUxK,GACrC,OAAO0D,YAAc7L,EAASmI,OAIlCvJ,EAAO6X,OAAS,SAAgBtO,GAC9B,IAAI7F,EAASlE,KAEbuD,IAAcC,OAAM,WAClBU,EAAOgQ,UAAUrQ,SAAQ,SAAUyP,GACjCA,EAASvJ,UAKfvJ,EAAOU,QAAU,WACflB,KAAKgK,yBAGPxJ,EAAOY,SAAW,WAChBpB,KAAKgK,yBAGPxJ,EAAOwJ,sBAAwB,WAC7B,IAAI6Q,EAAkB7a,KAAKwL,UAAU+I,QAAO,SAAU/J,GACpD,OAAOA,EAAElI,MAAMyO,YAEjB,OAAOxN,IAAcC,OAAM,WACzB,OAAOqX,EAAgBxM,QAAO,SAAUhI,EAAS0D,GAC/C,OAAO1D,EAAQnB,MAAK,WAClB,OAAO6E,EAAS+G,WAAW1L,MAAMD,UAElCH,QAAQ2B,eAIRvG,EAtG+B,C,OAuGtCkU,I,qDC9GF,+K","file":"static/js/15.db1c6d6a.chunk.js","sourcesContent":["import { isCancelable } from './retryer';\nimport { getAbortController } from './utils';\nexport function infiniteQueryBehavior() {\n return {\n onFetch: function onFetch(context) {\n context.fetchFn = function () {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n var refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n var fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n var pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n var isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n var isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n var oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n var oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n var abortController = getAbortController();\n var abortSignal = abortController == null ? void 0 : abortController.signal;\n var newPageParams = oldPageParams;\n var cancelled = false; // Get query function\n\n var queryFn = context.options.queryFn || function () {\n return Promise.reject('Missing queryFn');\n };\n\n var buildNewPages = function buildNewPages(pages, param, page, previous) {\n newPageParams = previous ? [param].concat(newPageParams) : [].concat(newPageParams, [param]);\n return previous ? [page].concat(pages) : [].concat(pages, [page]);\n }; // Create function to fetch a page\n\n\n var fetchPage = function fetchPage(pages, manual, param, previous) {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n var queryFnContext = {\n queryKey: context.queryKey,\n signal: abortSignal,\n pageParam: param,\n meta: context.meta\n };\n var queryFnResult = queryFn(queryFnContext);\n var promise = Promise.resolve(queryFnResult).then(function (page) {\n return buildNewPages(pages, param, page, previous);\n });\n\n if (isCancelable(queryFnResult)) {\n var promiseAsAny = promise;\n promiseAsAny.cancel = queryFnResult.cancel;\n }\n\n return promise;\n };\n\n var promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n var manual = typeof pageParam !== 'undefined';\n var param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n var _manual = typeof pageParam !== 'undefined';\n\n var _param = _manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n\n promise = fetchPage(oldPages, _manual, _param, true);\n } // Refetch pages\n else {\n (function () {\n newPageParams = [];\n var manual = typeof context.options.getNextPageParam === 'undefined';\n var shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n var _loop = function _loop(i) {\n promise = promise.then(function (pages) {\n var shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n var _param2 = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n\n return fetchPage(pages, manual, _param2);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n };\n\n for (var i = 1; i < oldPages.length; i++) {\n _loop(i);\n }\n })();\n }\n\n var finalPromise = promise.then(function (pages) {\n return {\n pages: pages,\n pageParams: newPageParams\n };\n });\n var finalPromiseAsAny = finalPromise;\n\n finalPromiseAsAny.cancel = function () {\n cancelled = true;\n abortController == null ? void 0 : abortController.abort();\n\n if (isCancelable(promise)) {\n promise.cancel();\n }\n };\n\n return finalPromise;\n };\n }\n };\n}\nexport function getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nexport function getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n var nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n var previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { hashQueryKey, noop, parseFilterArgs, parseQueryArgs, partialMatchKey, hashQueryKeyByOptions } from './utils';\nimport { QueryCache } from './queryCache';\nimport { MutationCache } from './mutationCache';\nimport { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { notifyManager } from './notifyManager';\nimport { infiniteQueryBehavior } from './infiniteQueryBehavior';\n// CLASS\nexport var QueryClient = /*#__PURE__*/function () {\n function QueryClient(config) {\n if (config === void 0) {\n config = {};\n }\n\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n }\n\n var _proto = QueryClient.prototype;\n\n _proto.mount = function mount() {\n var _this = this;\n\n this.unsubscribeFocus = focusManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onFocus();\n\n _this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onOnline();\n\n _this.queryCache.onOnline();\n }\n });\n };\n\n _proto.unmount = function unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n };\n\n _proto.isFetching = function isFetching(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n filters.fetching = true;\n return this.queryCache.findAll(filters).length;\n };\n\n _proto.isMutating = function isMutating(filters) {\n return this.mutationCache.findAll(_extends({}, filters, {\n fetching: true\n })).length;\n };\n\n _proto.getQueryData = function getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n };\n\n _proto.getQueriesData = function getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref) {\n var queryKey = _ref.queryKey,\n state = _ref.state;\n var data = state.data;\n return [queryKey, data];\n });\n };\n\n _proto.setQueryData = function setQueryData(queryKey, updater, options) {\n var parsedOptions = parseQueryArgs(queryKey);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(updater, options);\n };\n\n _proto.setQueriesData = function setQueriesData(queryKeyOrFilters, updater, options) {\n var _this2 = this;\n\n return notifyManager.batch(function () {\n return _this2.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref2) {\n var queryKey = _ref2.queryKey;\n return [queryKey, _this2.setQueryData(queryKey, updater, options)];\n });\n });\n };\n\n _proto.getQueryState = function getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n };\n\n _proto.removeQueries = function removeQueries(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n var queryCache = this.queryCache;\n notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n queryCache.remove(query);\n });\n });\n };\n\n _proto.resetQueries = function resetQueries(arg1, arg2, arg3) {\n var _this3 = this;\n\n var _parseFilterArgs3 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs3[0],\n options = _parseFilterArgs3[1];\n\n var queryCache = this.queryCache;\n\n var refetchFilters = _extends({}, filters, {\n active: true\n });\n\n return notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n query.reset();\n });\n return _this3.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.cancelQueries = function cancelQueries(arg1, arg2, arg3) {\n var _this4 = this;\n\n var _parseFilterArgs4 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs4[0],\n _parseFilterArgs4$ = _parseFilterArgs4[1],\n cancelOptions = _parseFilterArgs4$ === void 0 ? {} : _parseFilterArgs4$;\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n var promises = notifyManager.batch(function () {\n return _this4.queryCache.findAll(filters).map(function (query) {\n return query.cancel(cancelOptions);\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {\n var _ref3,\n _filters$refetchActiv,\n _filters$refetchInact,\n _this5 = this;\n\n var _parseFilterArgs5 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs5[0],\n options = _parseFilterArgs5[1];\n\n var refetchFilters = _extends({}, filters, {\n // if filters.refetchActive is not provided and filters.active is explicitly false,\n // e.g. invalidateQueries({ active: false }), we don't want to refetch active queries\n active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,\n inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false\n });\n\n return notifyManager.batch(function () {\n _this5.queryCache.findAll(filters).forEach(function (query) {\n query.invalidate();\n });\n\n return _this5.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.refetchQueries = function refetchQueries(arg1, arg2, arg3) {\n var _this6 = this;\n\n var _parseFilterArgs6 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs6[0],\n options = _parseFilterArgs6[1];\n\n var promises = notifyManager.batch(function () {\n return _this6.queryCache.findAll(filters).map(function (query) {\n return query.fetch(undefined, _extends({}, options, {\n meta: {\n refetchPage: filters == null ? void 0 : filters.refetchPage\n }\n }));\n });\n });\n var promise = Promise.all(promises).then(noop);\n\n if (!(options == null ? void 0 : options.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.fetchQuery = function fetchQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n var query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n };\n\n _proto.prefetchQuery = function prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.fetchInfiniteQuery = function fetchInfiniteQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n };\n\n _proto.prefetchInfiniteQuery = function prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.cancelMutations = function cancelMutations() {\n var _this7 = this;\n\n var promises = notifyManager.batch(function () {\n return _this7.mutationCache.getAll().map(function (mutation) {\n return mutation.cancel();\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n return this.getMutationCache().resumePausedMutations();\n };\n\n _proto.executeMutation = function executeMutation(options) {\n return this.mutationCache.build(this, options).execute();\n };\n\n _proto.getQueryCache = function getQueryCache() {\n return this.queryCache;\n };\n\n _proto.getMutationCache = function getMutationCache() {\n return this.mutationCache;\n };\n\n _proto.getDefaultOptions = function getDefaultOptions() {\n return this.defaultOptions;\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.setQueryDefaults = function setQueryDefaults(queryKey, options) {\n var result = this.queryDefaults.find(function (x) {\n return hashQueryKey(queryKey) === hashQueryKey(x.queryKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey: queryKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getQueryDefaults = function getQueryDefaults(queryKey) {\n var _this$queryDefaults$f;\n\n return queryKey ? (_this$queryDefaults$f = this.queryDefaults.find(function (x) {\n return partialMatchKey(queryKey, x.queryKey);\n })) == null ? void 0 : _this$queryDefaults$f.defaultOptions : undefined;\n };\n\n _proto.setMutationDefaults = function setMutationDefaults(mutationKey, options) {\n var result = this.mutationDefaults.find(function (x) {\n return hashQueryKey(mutationKey) === hashQueryKey(x.mutationKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey: mutationKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getMutationDefaults = function getMutationDefaults(mutationKey) {\n var _this$mutationDefault;\n\n return mutationKey ? (_this$mutationDefault = this.mutationDefaults.find(function (x) {\n return partialMatchKey(mutationKey, x.mutationKey);\n })) == null ? void 0 : _this$mutationDefault.defaultOptions : undefined;\n };\n\n _proto.defaultQueryOptions = function defaultQueryOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n var defaultedOptions = _extends({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {\n _defaulted: true\n });\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n }\n\n return defaultedOptions;\n };\n\n _proto.defaultQueryObserverOptions = function defaultQueryObserverOptions(options) {\n return this.defaultQueryOptions(options);\n };\n\n _proto.defaultMutationOptions = function defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n return _extends({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {\n _defaulted: true\n });\n };\n\n _proto.clear = function clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n };\n\n return QueryClient;\n}();","export * from './core';\nexport * from './react';","import ReactDOM from 'react-dom';\nexport var unstable_batchedUpdates = ReactDOM.unstable_batchedUpdates;","import { notifyManager } from '../core';\nimport { unstable_batchedUpdates } from './reactBatchedUpdates';\nnotifyManager.setBatchNotifyFunction(unstable_batchedUpdates);","export var logger = console;","import { setLogger } from '../core';\nimport { logger } from './logger';\nsetLogger(logger);","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// TYPES\n// UTILS\nexport var isServer = typeof window === 'undefined';\nexport function noop() {\n return undefined;\n}\nexport function functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nexport function isValidTimeout(value) {\n return typeof value === 'number' && value >= 0 && value !== Infinity;\n}\nexport function ensureQueryKeyArray(value) {\n return Array.isArray(value) ? value : [value];\n}\nexport function difference(array1, array2) {\n return array1.filter(function (x) {\n return array2.indexOf(x) === -1;\n });\n}\nexport function replaceAt(array, index, value) {\n var copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nexport function timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nexport function parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n queryKey: arg1,\n queryFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n queryKey: arg1\n });\n}\nexport function parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n mutationKey: arg1,\n mutationFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n mutationKey: arg1\n });\n }\n\n if (typeof arg1 === 'function') {\n return _extends({}, arg2, {\n mutationFn: arg1\n });\n }\n\n return _extends({}, arg1);\n}\nexport function parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [_extends({}, arg2, {\n queryKey: arg1\n }), arg3] : [arg1 || {}, arg2];\n}\nexport function parseMutationFilterArgs(arg1, arg2) {\n return isQueryKey(arg1) ? _extends({}, arg2, {\n mutationKey: arg1\n }) : arg1;\n}\nexport function mapQueryStatusFilter(active, inactive) {\n if (active === true && inactive === true || active == null && inactive == null) {\n return 'all';\n } else if (active === false && inactive === false) {\n return 'none';\n } else {\n // At this point, active|inactive can only be true|false or false|true\n // so, when only one value is provided, the missing one has to be the negated value\n var isActive = active != null ? active : !inactive;\n return isActive ? 'active' : 'inactive';\n }\n}\nexport function matchQuery(filters, query) {\n var active = filters.active,\n exact = filters.exact,\n fetching = filters.fetching,\n inactive = filters.inactive,\n predicate = filters.predicate,\n queryKey = filters.queryKey,\n stale = filters.stale;\n\n if (isQueryKey(queryKey)) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n\n var queryStatusFilter = mapQueryStatusFilter(active, inactive);\n\n if (queryStatusFilter === 'none') {\n return false;\n } else if (queryStatusFilter !== 'all') {\n var isActive = query.isActive();\n\n if (queryStatusFilter === 'active' && !isActive) {\n return false;\n }\n\n if (queryStatusFilter === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetching === 'boolean' && query.isFetching() !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nexport function matchMutation(filters, mutation) {\n var exact = filters.exact,\n fetching = filters.fetching,\n predicate = filters.predicate,\n mutationKey = filters.mutationKey;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nexport function hashQueryKeyByOptions(queryKey, options) {\n var hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n */\n\nexport function hashQueryKey(queryKey) {\n var asArray = ensureQueryKeyArray(queryKey);\n return stableValueHash(asArray);\n}\n/**\n * Hashes the value into a stable hash.\n */\n\nexport function stableValueHash(value) {\n return JSON.stringify(value, function (_, val) {\n return isPlainObject(val) ? Object.keys(val).sort().reduce(function (result, key) {\n result[key] = val[key];\n return result;\n }, {}) : val;\n });\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nexport function partialMatchKey(a, b) {\n return partialDeepEqual(ensureQueryKeyArray(a), ensureQueryKeyArray(b));\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nexport function partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return !Object.keys(b).some(function (key) {\n return !partialDeepEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nexport function replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n var array = Array.isArray(a) && Array.isArray(b);\n\n if (array || isPlainObject(a) && isPlainObject(b)) {\n var aSize = array ? a.length : Object.keys(a).length;\n var bItems = array ? b : Object.keys(b);\n var bSize = bItems.length;\n var copy = array ? [] : {};\n var equalItems = 0;\n\n for (var i = 0; i < bSize; i++) {\n var key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nexport function shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (var key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nexport function isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n var ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n var prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nexport function isQueryKey(value) {\n return typeof value === 'string' || Array.isArray(value);\n}\nexport function isError(value) {\n return value instanceof Error;\n}\nexport function sleep(timeout) {\n return new Promise(function (resolve) {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nexport function scheduleMicrotask(callback) {\n Promise.resolve().then(callback).catch(function (error) {\n return setTimeout(function () {\n throw error;\n });\n });\n}\nexport function getAbortController() {\n if (typeof AbortController === 'function') {\n return new AbortController();\n }\n}","import { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { sleep } from './utils';\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * Math.pow(2, failureCount), 30000);\n}\n\nexport function isCancelable(value) {\n return typeof (value == null ? void 0 : value.cancel) === 'function';\n}\nexport var CancelledError = function CancelledError(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n};\nexport function isCancelledError(value) {\n return value instanceof CancelledError;\n} // CLASS\n\nexport var Retryer = function Retryer(config) {\n var _this = this;\n\n var cancelRetry = false;\n var cancelFn;\n var continueFn;\n var promiseResolve;\n var promiseReject;\n this.abort = config.abort;\n\n this.cancel = function (cancelOptions) {\n return cancelFn == null ? void 0 : cancelFn(cancelOptions);\n };\n\n this.cancelRetry = function () {\n cancelRetry = true;\n };\n\n this.continueRetry = function () {\n cancelRetry = false;\n };\n\n this.continue = function () {\n return continueFn == null ? void 0 : continueFn();\n };\n\n this.failureCount = 0;\n this.isPaused = false;\n this.isResolved = false;\n this.isTransportCancelable = false;\n this.promise = new Promise(function (outerResolve, outerReject) {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n\n var resolve = function resolve(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n var reject = function reject(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n var pause = function pause() {\n return new Promise(function (continueResolve) {\n continueFn = continueResolve;\n _this.isPaused = true;\n config.onPause == null ? void 0 : config.onPause();\n }).then(function () {\n continueFn = undefined;\n _this.isPaused = false;\n config.onContinue == null ? void 0 : config.onContinue();\n });\n }; // Create loop function\n\n\n var run = function run() {\n // Do nothing if already resolved\n if (_this.isResolved) {\n return;\n }\n\n var promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n } // Create callback to cancel this fetch\n\n\n cancelFn = function cancelFn(cancelOptions) {\n if (!_this.isResolved) {\n reject(new CancelledError(cancelOptions));\n _this.abort == null ? void 0 : _this.abort(); // Cancel transport if supported\n\n if (isCancelable(promiseOrValue)) {\n try {\n promiseOrValue.cancel();\n } catch (_unused) {}\n }\n }\n }; // Check if the transport layer support cancellation\n\n\n _this.isTransportCancelable = isCancelable(promiseOrValue);\n Promise.resolve(promiseOrValue).then(resolve).catch(function (error) {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (_this.isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n var retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n var retryDelay = (_config$retryDelay = config.retryDelay) != null ? _config$retryDelay : defaultRetryDelay;\n var delay = typeof retryDelay === 'function' ? retryDelay(_this.failureCount, error) : retryDelay;\n var shouldRetry = retry === true || typeof retry === 'number' && _this.failureCount < retry || typeof retry === 'function' && retry(_this.failureCount, error);\n\n if (cancelRetry || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n _this.failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(_this.failureCount, error); // Delay\n\n sleep(delay) // Pause if the document is not visible or when the device is offline\n .then(function () {\n if (!focusManager.isFocused() || !onlineManager.isOnline()) {\n return pause();\n }\n }).then(function () {\n if (cancelRetry) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n run();\n};","import { scheduleMicrotask } from './utils'; // TYPES\n\n// CLASS\nexport var NotifyManager = /*#__PURE__*/function () {\n function NotifyManager() {\n this.queue = [];\n this.transactions = 0;\n\n this.notifyFn = function (callback) {\n callback();\n };\n\n this.batchNotifyFn = function (callback) {\n callback();\n };\n }\n\n var _proto = NotifyManager.prototype;\n\n _proto.batch = function batch(callback) {\n var result;\n this.transactions++;\n\n try {\n result = callback();\n } finally {\n this.transactions--;\n\n if (!this.transactions) {\n this.flush();\n }\n }\n\n return result;\n };\n\n _proto.schedule = function schedule(callback) {\n var _this = this;\n\n if (this.transactions) {\n this.queue.push(callback);\n } else {\n scheduleMicrotask(function () {\n _this.notifyFn(callback);\n });\n }\n }\n /**\n * All calls to the wrapped function will be batched.\n */\n ;\n\n _proto.batchCalls = function batchCalls(callback) {\n var _this2 = this;\n\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2.schedule(function () {\n callback.apply(void 0, args);\n });\n };\n };\n\n _proto.flush = function flush() {\n var _this3 = this;\n\n var queue = this.queue;\n this.queue = [];\n\n if (queue.length) {\n scheduleMicrotask(function () {\n _this3.batchNotifyFn(function () {\n queue.forEach(function (callback) {\n _this3.notifyFn(callback);\n });\n });\n });\n }\n }\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n ;\n\n _proto.setNotifyFunction = function setNotifyFunction(fn) {\n this.notifyFn = fn;\n }\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n ;\n\n _proto.setBatchNotifyFunction = function setBatchNotifyFunction(fn) {\n this.batchNotifyFn = fn;\n };\n\n return NotifyManager;\n}(); // SINGLETON\n\nexport var notifyManager = new NotifyManager();","export { CancelledError } from './retryer';\nexport { QueryCache } from './queryCache';\nexport { QueryClient } from './queryClient';\nexport { QueryObserver } from './queryObserver';\nexport { QueriesObserver } from './queriesObserver';\nexport { InfiniteQueryObserver } from './infiniteQueryObserver';\nexport { MutationCache } from './mutationCache';\nexport { MutationObserver } from './mutationObserver';\nexport { setLogger } from './logger';\nexport { notifyManager } from './notifyManager';\nexport { focusManager } from './focusManager';\nexport { onlineManager } from './onlineManager';\nexport { hashQueryKey, isError } from './utils';\nexport { isCancelledError } from './retryer';\nexport { dehydrate, hydrate } from './hydration'; // Types\n\nexport * from './types';","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var FocusManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(FocusManager, _Subscribable);\n\n function FocusManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onFocus) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onFocus();\n }; // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = FocusManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (focused) {\n if (typeof focused === 'boolean') {\n _this2.setFocused(focused);\n } else {\n _this2.onFocus();\n }\n });\n };\n\n _proto.setFocused = function setFocused(focused) {\n this.focused = focused;\n\n if (focused) {\n this.onFocus();\n }\n };\n\n _proto.onFocus = function onFocus() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isFocused = function isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n };\n\n return FocusManager;\n}(Subscribable);\nexport var focusManager = new FocusManager();","export var Subscribable = /*#__PURE__*/function () {\n function Subscribable() {\n this.listeners = [];\n }\n\n var _proto = Subscribable.prototype;\n\n _proto.subscribe = function subscribe(listener) {\n var _this = this;\n\n var callback = listener || function () {\n return undefined;\n };\n\n this.listeners.push(callback);\n this.onSubscribe();\n return function () {\n _this.listeners = _this.listeners.filter(function (x) {\n return x !== callback;\n });\n\n _this.onUnsubscribe();\n };\n };\n\n _proto.hasListeners = function hasListeners() {\n return this.listeners.length > 0;\n };\n\n _proto.onSubscribe = function onSubscribe() {// Do nothing\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {// Do nothing\n };\n\n return Subscribable;\n}();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var OnlineManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(OnlineManager, _Subscribable);\n\n function OnlineManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onOnline) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onOnline();\n }; // Listen to online\n\n\n window.addEventListener('online', listener, false);\n window.addEventListener('offline', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', listener);\n window.removeEventListener('offline', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = OnlineManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (online) {\n if (typeof online === 'boolean') {\n _this2.setOnline(online);\n } else {\n _this2.onOnline();\n }\n });\n };\n\n _proto.setOnline = function setOnline(online) {\n this.online = online;\n\n if (online) {\n this.onOnline();\n }\n };\n\n _proto.onOnline = function onOnline() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isOnline = function isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n };\n\n return OnlineManager;\n}(Subscribable);\nexport var onlineManager = new OnlineManager();","// TYPES\n// FUNCTIONS\nvar logger = console;\nexport function getLogger() {\n return logger;\n}\nexport function setLogger(newLogger) {\n logger = newLogger;\n}","import React from 'react';\nvar defaultContext = /*#__PURE__*/React.createContext(undefined);\nvar QueryClientSharingContext = /*#__PURE__*/React.createContext(false); // if contextSharing is on, we share the first and at least one\n// instance of the context across the window\n// to ensure that if React Query is used across\n// different bundles or microfrontends they will\n// all use the same **instance** of context, regardless\n// of module scoping.\n\nfunction getQueryClientContext(contextSharing) {\n if (contextSharing && typeof window !== 'undefined') {\n if (!window.ReactQueryClientContext) {\n window.ReactQueryClientContext = defaultContext;\n }\n\n return window.ReactQueryClientContext;\n }\n\n return defaultContext;\n}\n\nexport var useQueryClient = function useQueryClient() {\n var queryClient = React.useContext(getQueryClientContext(React.useContext(QueryClientSharingContext)));\n\n if (!queryClient) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one');\n }\n\n return queryClient;\n};\nexport var QueryClientProvider = function QueryClientProvider(_ref) {\n var client = _ref.client,\n _ref$contextSharing = _ref.contextSharing,\n contextSharing = _ref$contextSharing === void 0 ? false : _ref$contextSharing,\n children = _ref.children;\n React.useEffect(function () {\n client.mount();\n return function () {\n client.unmount();\n };\n }, [client]);\n var Context = getQueryClientContext(contextSharing);\n return /*#__PURE__*/React.createElement(QueryClientSharingContext.Provider, {\n value: contextSharing\n }, /*#__PURE__*/React.createElement(Context.Provider, {\n value: client\n }, children));\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getAbortController, functionalUpdate, isValidTimeout, noop, replaceEqualDeep, timeUntilStale, ensureQueryKeyArray } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { getLogger } from './logger';\nimport { Retryer, isCancelledError } from './retryer'; // TYPES\n\n// CLASS\nexport var Query = /*#__PURE__*/function () {\n function Query(config) {\n this.abortSignalConsumed = false;\n this.hadObservers = false;\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || this.getDefaultState(this.options);\n this.state = this.initialState;\n this.meta = config.meta;\n this.scheduleGc();\n }\n\n var _proto = Query.prototype;\n\n _proto.setOptions = function setOptions(options) {\n var _this$options$cacheTi;\n\n this.options = _extends({}, this.defaultOptions, options);\n this.meta = options == null ? void 0 : options.meta; // Default to 5 minutes if not cache time is set\n\n this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1000);\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.scheduleGc = function scheduleGc() {\n var _this = this;\n\n this.clearGcTimeout();\n\n if (isValidTimeout(this.cacheTime)) {\n this.gcTimeout = setTimeout(function () {\n _this.optionalRemove();\n }, this.cacheTime);\n }\n };\n\n _proto.clearGcTimeout = function clearGcTimeout() {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n };\n\n _proto.optionalRemove = function optionalRemove() {\n if (!this.observers.length) {\n if (this.state.isFetching) {\n if (this.hadObservers) {\n this.scheduleGc();\n }\n } else {\n this.cache.remove(this);\n }\n }\n };\n\n _proto.setData = function setData(updater, options) {\n var _this$options$isDataE, _this$options;\n\n var prevData = this.state.data; // Get the new data\n\n var data = functionalUpdate(updater, prevData); // Use prev data if an isDataEqual function is defined and returns `true`\n\n if ((_this$options$isDataE = (_this$options = this.options).isDataEqual) == null ? void 0 : _this$options$isDataE.call(_this$options, prevData, data)) {\n data = prevData;\n } else if (this.options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n data = replaceEqualDeep(prevData, data);\n } // Set data and mark it as cached\n\n\n this.dispatch({\n data: data,\n type: 'success',\n dataUpdatedAt: options == null ? void 0 : options.updatedAt\n });\n return data;\n };\n\n _proto.setState = function setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state: state,\n setStateOptions: setStateOptions\n });\n };\n\n _proto.cancel = function cancel(options) {\n var _this$retryer;\n\n var promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n };\n\n _proto.destroy = function destroy() {\n this.clearGcTimeout();\n this.cancel({\n silent: true\n });\n };\n\n _proto.reset = function reset() {\n this.destroy();\n this.setState(this.initialState);\n };\n\n _proto.isActive = function isActive() {\n return this.observers.some(function (observer) {\n return observer.options.enabled !== false;\n });\n };\n\n _proto.isFetching = function isFetching() {\n return this.state.isFetching;\n };\n\n _proto.isStale = function isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(function (observer) {\n return observer.getCurrentResult().isStale;\n });\n };\n\n _proto.isStaleByTime = function isStaleByTime(staleTime) {\n if (staleTime === void 0) {\n staleTime = 0;\n }\n\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n };\n\n _proto.onFocus = function onFocus() {\n var _this$retryer2;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnWindowFocus();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n };\n\n _proto.onOnline = function onOnline() {\n var _this$retryer3;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnReconnect();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n this.hadObservers = true; // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n if (this.observers.indexOf(observer) !== -1) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.retryer.isTransportCancelable || this.abortSignalConsumed) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n if (this.cacheTime) {\n this.scheduleGc();\n } else {\n this.cache.remove(this);\n }\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.getObserversCount = function getObserversCount() {\n return this.observers.length;\n };\n\n _proto.invalidate = function invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n };\n\n _proto.fetch = function fetch(options, fetchOptions) {\n var _this2 = this,\n _this$options$behavio,\n _context$fetchOptions,\n _abortController$abor;\n\n if (this.state.isFetching) {\n if (this.state.dataUpdatedAt && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n var _this$retryer4;\n\n // make sure that retries that were potentially cancelled due to unmounts can continue\n (_this$retryer4 = this.retryer) == null ? void 0 : _this$retryer4.continueRetry(); // Return current promise if we are already fetching\n\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n var observer = this.observers.find(function (x) {\n return x.options.queryFn;\n });\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n var queryKey = ensureQueryKeyArray(this.queryKey);\n var abortController = getAbortController(); // Create query function context\n\n var queryFnContext = {\n queryKey: queryKey,\n pageParam: undefined,\n meta: this.meta\n };\n Object.defineProperty(queryFnContext, 'signal', {\n enumerable: true,\n get: function get() {\n if (abortController) {\n _this2.abortSignalConsumed = true;\n return abortController.signal;\n }\n\n return undefined;\n }\n }); // Create fetch function\n\n var fetchFn = function fetchFn() {\n if (!_this2.options.queryFn) {\n return Promise.reject('Missing queryFn');\n }\n\n _this2.abortSignalConsumed = false;\n return _this2.options.queryFn(queryFnContext);\n }; // Trigger behavior hook\n\n\n var context = {\n fetchOptions: fetchOptions,\n options: this.options,\n queryKey: queryKey,\n state: this.state,\n fetchFn: fetchFn,\n meta: this.meta\n };\n\n if ((_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch) {\n var _this$options$behavio2;\n\n (_this$options$behavio2 = this.options.behavior) == null ? void 0 : _this$options$behavio2.onFetch(context);\n } // Store state in case the current fetch needs to be reverted\n\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (!this.state.isFetching || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n } // Try to fetch the data\n\n\n this.retryer = new Retryer({\n fn: context.fetchFn,\n abort: abortController == null ? void 0 : (_abortController$abor = abortController.abort) == null ? void 0 : _abortController$abor.bind(abortController),\n onSuccess: function onSuccess(data) {\n _this2.setData(data); // Notify cache callback\n\n\n _this2.cache.config.onSuccess == null ? void 0 : _this2.cache.config.onSuccess(data, _this2); // Remove query after fetching if cache time is 0\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onError: function onError(error) {\n // Optimistically update state if needed\n if (!(isCancelledError(error) && error.silent)) {\n _this2.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!isCancelledError(error)) {\n // Notify cache callback\n _this2.cache.config.onError == null ? void 0 : _this2.cache.config.onError(error, _this2); // Log error\n\n getLogger().error(error);\n } // Remove query after fetching if cache time is 0\n\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay\n });\n this.promise = this.retryer.promise;\n return this.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = this.reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onQueryUpdate(action);\n });\n\n _this3.cache.notify({\n query: _this3,\n type: 'queryUpdated',\n action: action\n });\n });\n };\n\n _proto.getDefaultState = function getDefaultState(options) {\n var data = typeof options.initialData === 'function' ? options.initialData() : options.initialData;\n var hasInitialData = typeof options.initialData !== 'undefined';\n var initialDataUpdatedAt = hasInitialData ? typeof options.initialDataUpdatedAt === 'function' ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n var hasData = typeof data !== 'undefined';\n return {\n data: data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchMeta: null,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: hasData ? 'success' : 'idle'\n };\n };\n\n _proto.reducer = function reducer(state, action) {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n fetchFailureCount: state.fetchFailureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'fetch':\n return _extends({}, state, {\n fetchFailureCount: 0,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n isFetching: true,\n isPaused: false\n }, !state.dataUpdatedAt && {\n error: null,\n status: 'loading'\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),\n error: null,\n fetchFailureCount: 0,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: 'success'\n });\n\n case 'error':\n var error = action.error;\n\n if (isCancelledError(error) && error.revert && this.revertState) {\n return _extends({}, this.revertState);\n }\n\n return _extends({}, state, {\n error: error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n isFetching: false,\n isPaused: false,\n status: 'error'\n });\n\n case 'invalidate':\n return _extends({}, state, {\n isInvalidated: true\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n };\n\n return Query;\n}();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { hashQueryKeyByOptions, matchQuery, parseFilterArgs } from './utils';\nimport { Query } from './query';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var QueryCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryCache, _Subscribable);\n\n function QueryCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.queries = [];\n _this.queriesMap = {};\n return _this;\n }\n\n var _proto = QueryCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var _options$queryHash;\n\n var queryKey = options.queryKey;\n var queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);\n var query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n queryKey: queryKey,\n queryHash: queryHash,\n options: client.defaultQueryOptions(options),\n state: state,\n defaultOptions: client.getQueryDefaults(queryKey),\n meta: options.meta\n });\n this.add(query);\n }\n\n return query;\n };\n\n _proto.add = function add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'queryAdded',\n query: query\n });\n }\n };\n\n _proto.remove = function remove(query) {\n var queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(function (x) {\n return x !== query;\n });\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'queryRemoved',\n query: query\n });\n }\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.queries.forEach(function (query) {\n _this2.remove(query);\n });\n });\n };\n\n _proto.get = function get(queryHash) {\n return this.queriesMap[queryHash];\n };\n\n _proto.getAll = function getAll() {\n return this.queries;\n };\n\n _proto.find = function find(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(function (query) {\n return matchQuery(filters, query);\n });\n };\n\n _proto.findAll = function findAll(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n return Object.keys(filters).length > 0 ? this.queries.filter(function (query) {\n return matchQuery(filters, query);\n }) : this.queries;\n };\n\n _proto.notify = function notify(event) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(event);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n var _this4 = this;\n\n notifyManager.batch(function () {\n _this4.queries.forEach(function (query) {\n query.onFocus();\n });\n });\n };\n\n _proto.onOnline = function onOnline() {\n var _this5 = this;\n\n notifyManager.batch(function () {\n _this5.queries.forEach(function (query) {\n query.onOnline();\n });\n });\n };\n\n return QueryCache;\n}(Subscribable);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getLogger } from './logger';\nimport { notifyManager } from './notifyManager';\nimport { Retryer } from './retryer';\nimport { noop } from './utils'; // TYPES\n\n// CLASS\nexport var Mutation = /*#__PURE__*/function () {\n function Mutation(config) {\n this.options = _extends({}, config.defaultOptions, config.options);\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.observers = [];\n this.state = config.state || getDefaultState();\n this.meta = config.meta;\n }\n\n var _proto = Mutation.prototype;\n\n _proto.setState = function setState(state) {\n this.dispatch({\n type: 'setState',\n state: state\n });\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n };\n\n _proto.cancel = function cancel() {\n if (this.retryer) {\n this.retryer.cancel();\n return this.retryer.promise.then(noop).catch(noop);\n }\n\n return Promise.resolve();\n };\n\n _proto.continue = function _continue() {\n if (this.retryer) {\n this.retryer.continue();\n return this.retryer.promise;\n }\n\n return this.execute();\n };\n\n _proto.execute = function execute() {\n var _this = this;\n\n var data;\n var restored = this.state.status === 'loading';\n var promise = Promise.resolve();\n\n if (!restored) {\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n });\n promise = promise.then(function () {\n // Notify cache callback\n _this.mutationCache.config.onMutate == null ? void 0 : _this.mutationCache.config.onMutate(_this.state.variables, _this);\n }).then(function () {\n return _this.options.onMutate == null ? void 0 : _this.options.onMutate(_this.state.variables);\n }).then(function (context) {\n if (context !== _this.state.context) {\n _this.dispatch({\n type: 'loading',\n context: context,\n variables: _this.state.variables\n });\n }\n });\n }\n\n return promise.then(function () {\n return _this.executeMutation();\n }).then(function (result) {\n data = result; // Notify cache callback\n\n _this.mutationCache.config.onSuccess == null ? void 0 : _this.mutationCache.config.onSuccess(data, _this.state.variables, _this.state.context, _this);\n }).then(function () {\n return _this.options.onSuccess == null ? void 0 : _this.options.onSuccess(data, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(data, null, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'success',\n data: data\n });\n\n return data;\n }).catch(function (error) {\n // Notify cache callback\n _this.mutationCache.config.onError == null ? void 0 : _this.mutationCache.config.onError(error, _this.state.variables, _this.state.context, _this); // Log error\n\n getLogger().error(error);\n return Promise.resolve().then(function () {\n return _this.options.onError == null ? void 0 : _this.options.onError(error, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(undefined, error, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'error',\n error: error\n });\n\n throw error;\n });\n });\n };\n\n _proto.executeMutation = function executeMutation() {\n var _this2 = this,\n _this$options$retry;\n\n this.retryer = new Retryer({\n fn: function fn() {\n if (!_this2.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return _this2.options.mutationFn(_this2.state.variables);\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay\n });\n return this.retryer.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onMutationUpdate(action);\n });\n\n _this3.mutationCache.notify(_this3);\n });\n };\n\n return Mutation;\n}();\nexport function getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nfunction reducer(state, action) {\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n failureCount: state.failureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'loading':\n return _extends({}, state, {\n context: action.context,\n data: undefined,\n error: null,\n isPaused: false,\n status: 'loading',\n variables: action.variables\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n error: null,\n status: 'success',\n isPaused: false\n });\n\n case 'error':\n return _extends({}, state, {\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n isPaused: false,\n status: 'error'\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n}","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { notifyManager } from './notifyManager';\nimport { Mutation } from './mutation';\nimport { matchMutation, noop } from './utils';\nimport { Subscribable } from './subscribable'; // TYPES\n\n// CLASS\nexport var MutationCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationCache, _Subscribable);\n\n function MutationCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.mutations = [];\n _this.mutationId = 0;\n return _this;\n }\n\n var _proto = MutationCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state: state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined,\n meta: options.meta\n });\n this.add(mutation);\n return mutation;\n };\n\n _proto.add = function add(mutation) {\n this.mutations.push(mutation);\n this.notify(mutation);\n };\n\n _proto.remove = function remove(mutation) {\n this.mutations = this.mutations.filter(function (x) {\n return x !== mutation;\n });\n mutation.cancel();\n this.notify(mutation);\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.mutations.forEach(function (mutation) {\n _this2.remove(mutation);\n });\n });\n };\n\n _proto.getAll = function getAll() {\n return this.mutations;\n };\n\n _proto.find = function find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.findAll = function findAll(filters) {\n return this.mutations.filter(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.notify = function notify(mutation) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(mutation);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n this.resumePausedMutations();\n };\n\n _proto.onOnline = function onOnline() {\n this.resumePausedMutations();\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n var pausedMutations = this.mutations.filter(function (x) {\n return x.state.isPaused;\n });\n return notifyManager.batch(function () {\n return pausedMutations.reduce(function (promise, mutation) {\n return promise.then(function () {\n return mutation.continue().catch(noop);\n });\n }, Promise.resolve());\n });\n };\n\n return MutationCache;\n}(Subscribable);","// Side effects\nimport './setBatchUpdatesFn';\nimport './setLogger';\nexport { QueryClientProvider, useQueryClient } from './QueryClientProvider';\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nexport { useIsFetching } from './useIsFetching';\nexport { useIsMutating } from './useIsMutating';\nexport { useMutation } from './useMutation';\nexport { useQuery } from './useQuery';\nexport { useQueries } from './useQueries';\nexport { useInfiniteQuery } from './useInfiniteQuery';\nexport { useHydrate, Hydrate } from './Hydrate'; // Types\n\nexport * from './types';"],"sourceRoot":""}