"use client"; // Adapted from Magic UI (MIT). See THIRD_PARTY_NOTICES.md. import { type ComponentProps } from "react"; export interface AnimatedCircularProgressBarProps extends Omit< ComponentProps<"div">, "children" > { value: number; min?: number; max?: number; } export function AnimatedCircularProgressBar({ value, min = 0, max = 100, className = "", "aria-label": label = "Progress", ...props }: AnimatedCircularProgressBarProps) { const low = Number.isFinite(min) ? min : 0; const high = Number.isFinite(max) && max > low ? max : low + 100; const current = Math.min( high, Math.max(low, Number.isFinite(value) ? value : low), ); const percent = ((current - low) / (high - low)) * 100; return (