var M = (i) => {
  if (i.suspense) {
    const c = (S) => S === "static" ? S : Math.max(S ?? 1e3, 1e3), s = i.staleTime;
    i.staleTime = typeof s == "function" ? (...S) => c(s(...S)) : c(s), typeof i.gcTime == "number" && (i.gcTime = Math.max(
      i.gcTime,
      1e3
    ));
  }
}, m = (i, e) => i.isLoading && i.isFetching && !e, t = (i, e) => i?.suspense && e.isPending, E = (i, e, c) => e.fetchOptimistic(i).catch(() => {
  c.clearReset();
});
export {
  M as ensureSuspenseTimers,
  E as fetchOptimistic,
  t as shouldSuspend,
  m as willFetch
};
