function cleanupStyles(styles) {
	styles.forEach((style) => {
		let element = document.head.querySelector(
			`style[data-vite-dev-id="${style.attrs["data-vite-dev-id"]}"]`,
		);

		if (!element) {
			return;
		}

		if (Number(element.getAttribute("data-vite-ref")) == 1) {
			element.remove();
		} else {
			element.setAttribute(
				"data-vite-ref",
				`${Number(element.getAttribute("data-vite-ref")) - 1}`,
			);
		}
	});
}
@param {{ attrs: Record<string, string>}[]} styles