From eae5d24d9e79e59a19d4721caaeaa0ca650ecb33 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Sun, 1 Mar 2026 16:20:51 -0800
Subject: chore(biome): drop formatter style overrides

---
 src/lib/Tools/Birthdays.svelte | 168 +++++++++++++++++++++--------------------
 1 file changed, 88 insertions(+), 80 deletions(-)

(limited to 'src/lib/Tools/Birthdays.svelte')

diff --git a/src/lib/Tools/Birthdays.svelte b/src/lib/Tools/Birthdays.svelte
index 49d72cfa..a41064f9 100644
--- a/src/lib/Tools/Birthdays.svelte
+++ b/src/lib/Tools/Birthdays.svelte
@@ -1,110 +1,118 @@
 <script lang="ts">
-import { browser } from '$app/environment';
-import { page } from '$app/stores';
-import { ACDBBirthdays, type ACDBBirthday } from '$lib/Data/Birthday/secondary';
-import { aniSearchBirthdays, type aniSearchBirthday } from '$lib/Data/Birthday/primary';
-import RateLimitedError from '$lib/Error/RateLimited.svelte';
-import { onMount } from 'svelte';
-import { clearAllParameters, parseOrDefault } from '../Utility/parameters';
-import Skeleton from '$lib/Loading/Skeleton.svelte';
-import Message from '$lib/Loading/Message.svelte';
-import tooltip from '$lib/Tooltip/tooltip';
+import { browser } from "$app/environment";
+import { page } from "$app/stores";
+import { ACDBBirthdays, type ACDBBirthday } from "$lib/Data/Birthday/secondary";
+import {
+	aniSearchBirthdays,
+	type aniSearchBirthday,
+} from "$lib/Data/Birthday/primary";
+import RateLimitedError from "$lib/Error/RateLimited.svelte";
+import { onMount } from "svelte";
+import { clearAllParameters, parseOrDefault } from "../Utility/parameters";
+import Skeleton from "$lib/Loading/Skeleton.svelte";
+import Message from "$lib/Loading/Message.svelte";
+import tooltip from "$lib/Tooltip/tooltip";
 
 interface Birthday {
-  name: string;
-  image: string;
-  origin?: string;
+	name: string;
+	image: string;
+	origin?: string;
 }
 
-const urlParameters = browser ? new URLSearchParams(window.location.search) : null;
+const urlParameters = browser
+	? new URLSearchParams(window.location.search)
+	: null;
 let date = new Date();
-let month = parseOrDefault(urlParameters, 'month', date.getMonth() + 1);
-let day = parseOrDefault(urlParameters, 'day', date.getDate());
+let month = parseOrDefault(urlParameters, "month", date.getMonth() + 1);
+let day = parseOrDefault(urlParameters, "day", date.getDate());
 let birthdays: Promise<{ birthdays: Birthday[]; allSourcesFailed: boolean }>;
 
 $: {
-  month = Math.min(month, 12);
-  month = Math.max(month, 1);
-  day = Math.min(day, new Date(2024, month, 0).getDate());
-  day = Math.max(day, 1);
-
-  birthdays = resolveBirthdays(month, day);
-
-  if (browser) {
-    $page.url.searchParams.set('month', month.toString());
-    $page.url.searchParams.set('day', day.toString());
-    clearAllParameters(['month', 'day']);
-    history.replaceState(null, '', `?${$page.url.searchParams.toString()}`);
-  }
+	month = Math.min(month, 12);
+	month = Math.max(month, 1);
+	day = Math.min(day, new Date(2024, month, 0).getDate());
+	day = Math.max(day, 1);
+
+	birthdays = resolveBirthdays(month, day);
+
+	if (browser) {
+		$page.url.searchParams.set("month", month.toString());
+		$page.url.searchParams.set("day", day.toString());
+		clearAllParameters(["month", "day"]);
+		history.replaceState(null, "", `?${$page.url.searchParams.toString()}`);
+	}
 }
 
-onMount(() => clearAllParameters(['month', 'day']));
+onMount(() => clearAllParameters(["month", "day"]));
 
-const normaliseName = (name: string): string => name.toLowerCase().split(' ').sort().join(' ');
+const normaliseName = (name: string): string =>
+	name.toLowerCase().split(" ").sort().join(" ");
 
 const fixName = (name: string): string => {
-  const split = name.split(' ');
-  const last = split[split.length - 1];
+	const split = name.split(" ");
+	const last = split[split.length - 1];
 
-  if (last === last.toUpperCase()) {
-    split[split.length - 1] = last[0] + last.slice(1).toLowerCase();
+	if (last === last.toUpperCase()) {
+		split[split.length - 1] = last[0] + last.slice(1).toLowerCase();
 
-    return split.join(' ');
-  }
+		return split.join(" ");
+	}
 
-  const bracketIndex = name.indexOf('[');
+	const bracketIndex = name.indexOf("[");
 
-  if (bracketIndex !== -1) return name.slice(0, bracketIndex).trim();
+	if (bracketIndex !== -1) return name.slice(0, bracketIndex).trim();
 
-  return name;
+	return name;
 };
 
 const combineBirthdaySources = (
-  acdb: ACDBBirthday[],
-  aniSearch: aniSearchBirthday[]
+	acdb: ACDBBirthday[],
+	aniSearch: aniSearchBirthday[],
 ): Birthday[] => {
-  const nameMap = new Map<string, Birthday>();
-
-  for (const entry of aniSearch.map((entry) => ({
-    ...entry,
-    normalisedName: normaliseName(fixName(entry.name))
-  }))) {
-    if (!nameMap.has(entry.normalisedName))
-      nameMap.set(entry.normalisedName, {
-        name: fixName(entry.name),
-        image: entry.image
-      });
-  }
-
-  for (const entry of acdb) {
-    const normalisedName = normaliseName(fixName(entry.name));
-
-    if (!nameMap.has(normalisedName))
-      nameMap.set(normalisedName, {
-        name: entry.name,
-        image: entry.character_image,
-        origin: entry.origin
-      });
-  }
-
-  return Array.from(nameMap.values());
+	const nameMap = new Map<string, Birthday>();
+
+	for (const entry of aniSearch.map((entry) => ({
+		...entry,
+		normalisedName: normaliseName(fixName(entry.name)),
+	}))) {
+		if (!nameMap.has(entry.normalisedName))
+			nameMap.set(entry.normalisedName, {
+				name: fixName(entry.name),
+				image: entry.image,
+			});
+	}
+
+	for (const entry of acdb) {
+		const normalisedName = normaliseName(fixName(entry.name));
+
+		if (!nameMap.has(normalisedName))
+			nameMap.set(normalisedName, {
+				name: entry.name,
+				image: entry.character_image,
+				origin: entry.origin,
+			});
+	}
+
+	return Array.from(nameMap.values());
 };
 
 async function resolveBirthdays(
-  month: number,
-  day: number
+	month: number,
+	day: number,
 ): Promise<{ birthdays: Birthday[]; allSourcesFailed: boolean }> {
-  const [acdbResult, aniSearchResult] = await Promise.allSettled([
-    ACDBBirthdays(month, day),
-    browser ? aniSearchBirthdays(month, day) : Promise.resolve([])
-  ]);
-  const acdb = acdbResult.status === 'fulfilled' ? acdbResult.value : [];
-  const aniSearch = aniSearchResult.status === 'fulfilled' ? aniSearchResult.value : [];
-
-  return {
-    birthdays: combineBirthdaySources(acdb, aniSearch),
-    allSourcesFailed: acdbResult.status === 'rejected' && aniSearchResult.status === 'rejected'
-  };
+	const [acdbResult, aniSearchResult] = await Promise.allSettled([
+		ACDBBirthdays(month, day),
+		browser ? aniSearchBirthdays(month, day) : Promise.resolve([]),
+	]);
+	const acdb = acdbResult.status === "fulfilled" ? acdbResult.value : [];
+	const aniSearch =
+		aniSearchResult.status === "fulfilled" ? aniSearchResult.value : [];
+
+	return {
+		birthdays: combineBirthdaySources(acdb, aniSearch),
+		allSourcesFailed:
+			acdbResult.status === "rejected" && aniSearchResult.status === "rejected",
+	};
 }
 </script>
 
-- 
cgit v1.2.3

