diff --git a/.svelte-kit/ambient.d.ts b/.svelte-kit/ambient.d.ts
deleted file mode 100644
index a5cad36..0000000
--- a/.svelte-kit/ambient.d.ts
+++ /dev/null
@@ -1,334 +0,0 @@
-
-// this file is generated — do not edit it
-
-
-///
-
-/**
- * This module provides access to environment variables that are injected _statically_ into your bundle at build time and are limited to _private_ access.
- *
- * | | Runtime | Build time |
- * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
- * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
- * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
- *
- * Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination.
- *
- * **_Private_ access:**
- *
- * - This module cannot be imported into client-side code
- * - This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured)
- *
- * For example, given the following build time environment:
- *
- * ```env
- * ENVIRONMENT=production
- * PUBLIC_BASE_URL=http://site.com
- * ```
- *
- * With the default `publicPrefix` and `privatePrefix`:
- *
- * ```ts
- * import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/private';
- *
- * console.log(ENVIRONMENT); // => "production"
- * console.log(PUBLIC_BASE_URL); // => throws error during build
- * ```
- *
- * The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values.
- */
-declare module '$env/static/private' {
- export const ROOT_ADMIN_EMAIL: string;
- export const DATABASE_URL: string;
- export const ORIGIN: string;
- export const BETTER_AUTH_SECRET: string;
- export const OSU_CLIENT_ID: string;
- export const OSU_CLIENT_SECRET: string;
- export const OSU_IRC_USERNAME: string;
- export const OSU_IRC_PASSWORD: string;
- export const NVM_INC: string;
- export const TERM_PROGRAM: string;
- export const NODE: string;
- export const NVM_CD_FLAGS: string;
- export const TERM: string;
- export const SHELL: string;
- export const HOMEBREW_REPOSITORY: string;
- export const TMPDIR: string;
- export const VSCODE_PYTHON_AUTOACTIVATE_GUARD: string;
- export const TERM_PROGRAM_VERSION: string;
- export const ZDOTDIR: string;
- export const MallocNanoZone: string;
- export const npm_config_local_prefix: string;
- export const LC_ALL: string;
- export const ZSH: string;
- export const NVM_DIR: string;
- export const USER: string;
- export const LS_COLORS: string;
- export const COMMAND_MODE: string;
- export const CLAUDE_CODE_SSE_PORT: string;
- export const SSH_AUTH_SOCK: string;
- export const VSCODE_PROFILE_INITIALIZED: string;
- export const __CF_USER_TEXT_ENCODING: string;
- export const npm_execpath: string;
- export const PAGER: string;
- export const LSCOLORS: string;
- export const PATH: string;
- export const npm_package_json: string;
- export const _: string;
- export const LaunchInstanceID: string;
- export const USER_ZDOTDIR: string;
- export const __CFBundleIdentifier: string;
- export const npm_command: string;
- export const PWD: string;
- export const npm_lifecycle_event: string;
- export const EDITOR: string;
- export const npm_package_name: string;
- export const LANG: string;
- export const PYTHONSTARTUP: string;
- export const AWS_REGION: string;
- export const BUN_INSPECT_CONNECT_TO: string;
- export const VSCODE_GIT_ASKPASS_EXTRA_ARGS: string;
- export const XPC_FLAGS: string;
- export const npm_package_version: string;
- export const XPC_SERVICE_NAME: string;
- export const VSCODE_INJECTION: string;
- export const SHLVL: string;
- export const HOME: string;
- export const VSCODE_GIT_ASKPASS_MAIN: string;
- export const PYTHON_BASIC_REPL: string;
- export const HOMEBREW_PREFIX: string;
- export const LESS: string;
- export const LOGNAME: string;
- export const npm_lifecycle_script: string;
- export const VSCODE_GIT_IPC_HANDLE: string;
- export const NVM_BIN: string;
- export const npm_config_user_agent: string;
- export const INFOPATH: string;
- export const HOMEBREW_CELLAR: string;
- export const VSCODE_GIT_ASKPASS_NODE: string;
- export const GIT_ASKPASS: string;
- export const OSLogRateLimit: string;
- export const SECURITYSESSIONID: string;
- export const npm_node_execpath: string;
- export const COLORTERM: string;
- export const NODE_ENV: string;
- export const PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS: string;
-}
-
-/**
- * This module provides access to environment variables that are injected _statically_ into your bundle at build time and are _publicly_ accessible.
- *
- * | | Runtime | Build time |
- * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
- * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
- * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
- *
- * Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination.
- *
- * **_Public_ access:**
- *
- * - This module _can_ be imported into client-side code
- * - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included
- *
- * For example, given the following build time environment:
- *
- * ```env
- * ENVIRONMENT=production
- * PUBLIC_BASE_URL=http://site.com
- * ```
- *
- * With the default `publicPrefix` and `privatePrefix`:
- *
- * ```ts
- * import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/public';
- *
- * console.log(ENVIRONMENT); // => throws error during build
- * console.log(PUBLIC_BASE_URL); // => "http://site.com"
- * ```
- *
- * The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values.
- */
-declare module '$env/static/public' {
-
-}
-
-/**
- * This module provides access to environment variables set _dynamically_ at runtime and that are limited to _private_ access.
- *
- * | | Runtime | Build time |
- * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
- * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
- * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
- *
- * Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`.
- *
- * **_Private_ access:**
- *
- * - This module cannot be imported into client-side code
- * - This module includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured)
- *
- * > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
- *
- * > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
- * >
- * > ```env
- * > MY_FEATURE_FLAG=
- * > ```
- * >
- * > You can override `.env` values from the command line like so:
- * >
- * > ```sh
- * > MY_FEATURE_FLAG="enabled" npm run dev
- * > ```
- *
- * For example, given the following runtime environment:
- *
- * ```env
- * ENVIRONMENT=production
- * PUBLIC_BASE_URL=http://site.com
- * ```
- *
- * With the default `publicPrefix` and `privatePrefix`:
- *
- * ```ts
- * import { env } from '$env/dynamic/private';
- *
- * console.log(env.ENVIRONMENT); // => "production"
- * console.log(env.PUBLIC_BASE_URL); // => undefined
- * ```
- */
-declare module '$env/dynamic/private' {
- export const env: {
- ROOT_ADMIN_EMAIL: string;
- DATABASE_URL: string;
- ORIGIN: string;
- BETTER_AUTH_SECRET: string;
- OSU_CLIENT_ID: string;
- OSU_CLIENT_SECRET: string;
- OSU_IRC_USERNAME: string;
- OSU_IRC_PASSWORD: string;
- NVM_INC: string;
- TERM_PROGRAM: string;
- NODE: string;
- NVM_CD_FLAGS: string;
- TERM: string;
- SHELL: string;
- HOMEBREW_REPOSITORY: string;
- TMPDIR: string;
- VSCODE_PYTHON_AUTOACTIVATE_GUARD: string;
- TERM_PROGRAM_VERSION: string;
- ZDOTDIR: string;
- MallocNanoZone: string;
- npm_config_local_prefix: string;
- LC_ALL: string;
- ZSH: string;
- NVM_DIR: string;
- USER: string;
- LS_COLORS: string;
- COMMAND_MODE: string;
- CLAUDE_CODE_SSE_PORT: string;
- SSH_AUTH_SOCK: string;
- VSCODE_PROFILE_INITIALIZED: string;
- __CF_USER_TEXT_ENCODING: string;
- npm_execpath: string;
- PAGER: string;
- LSCOLORS: string;
- PATH: string;
- npm_package_json: string;
- _: string;
- LaunchInstanceID: string;
- USER_ZDOTDIR: string;
- __CFBundleIdentifier: string;
- npm_command: string;
- PWD: string;
- npm_lifecycle_event: string;
- EDITOR: string;
- npm_package_name: string;
- LANG: string;
- PYTHONSTARTUP: string;
- AWS_REGION: string;
- BUN_INSPECT_CONNECT_TO: string;
- VSCODE_GIT_ASKPASS_EXTRA_ARGS: string;
- XPC_FLAGS: string;
- npm_package_version: string;
- XPC_SERVICE_NAME: string;
- VSCODE_INJECTION: string;
- SHLVL: string;
- HOME: string;
- VSCODE_GIT_ASKPASS_MAIN: string;
- PYTHON_BASIC_REPL: string;
- HOMEBREW_PREFIX: string;
- LESS: string;
- LOGNAME: string;
- npm_lifecycle_script: string;
- VSCODE_GIT_IPC_HANDLE: string;
- NVM_BIN: string;
- npm_config_user_agent: string;
- INFOPATH: string;
- HOMEBREW_CELLAR: string;
- VSCODE_GIT_ASKPASS_NODE: string;
- GIT_ASKPASS: string;
- OSLogRateLimit: string;
- SECURITYSESSIONID: string;
- npm_node_execpath: string;
- COLORTERM: string;
- NODE_ENV: string;
- PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS: string;
- [key: `PUBLIC_${string}`]: undefined;
- [key: `${string}`]: string | undefined;
- }
-}
-
-/**
- * This module provides access to environment variables set _dynamically_ at runtime and that are _publicly_ accessible.
- *
- * | | Runtime | Build time |
- * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
- * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
- * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
- *
- * Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`.
- *
- * **_Public_ access:**
- *
- * - This module _can_ be imported into client-side code
- * - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included
- *
- * > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
- *
- * > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
- * >
- * > ```env
- * > MY_FEATURE_FLAG=
- * > ```
- * >
- * > You can override `.env` values from the command line like so:
- * >
- * > ```sh
- * > MY_FEATURE_FLAG="enabled" npm run dev
- * > ```
- *
- * For example, given the following runtime environment:
- *
- * ```env
- * ENVIRONMENT=production
- * PUBLIC_BASE_URL=http://example.com
- * ```
- *
- * With the default `publicPrefix` and `privatePrefix`:
- *
- * ```ts
- * import { env } from '$env/dynamic/public';
- * console.log(env.ENVIRONMENT); // => undefined, not public
- * console.log(env.PUBLIC_BASE_URL); // => "http://example.com"
- * ```
- *
- * ```
- *
- * ```
- */
-declare module '$env/dynamic/public' {
- export const env: {
- [key: `PUBLIC_${string}`]: string | undefined;
- }
-}
diff --git a/.svelte-kit/types/route_meta_data.json b/.svelte-kit/types/route_meta_data.json
deleted file mode 100644
index 054fee4..0000000
--- a/.svelte-kit/types/route_meta_data.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "/(app)": [
- "src/routes/(app)/+page.server.ts",
- "src/routes/(app)/+layout.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/": [],
- "/(app)/admin": [
- "src/routes/(app)/admin/+page.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/api/health": [
- "src/routes/api/health/+server.ts"
- ],
- "/api/mappools": [
- "src/routes/api/mappools/+server.ts"
- ],
- "/api/mappools/[id]": [
- "src/routes/api/mappools/[id]/+server.ts"
- ],
- "/api/mappools/[id]/slots": [
- "src/routes/api/mappools/[id]/slots/+server.ts"
- ],
- "/api/mappools/[id]/slots/[slotId]": [
- "src/routes/api/mappools/[id]/slots/[slotId]/+server.ts"
- ],
- "/api/matches": [
- "src/routes/api/matches/+server.ts"
- ],
- "/api/matches/[id]": [
- "src/routes/api/matches/[id]/+server.ts"
- ],
- "/api/matches/[id]/lobby": [
- "src/routes/api/matches/[id]/lobby/+server.ts"
- ],
- "/api/matches/[id]/pick": [
- "src/routes/api/matches/[id]/pick/+server.ts"
- ],
- "/api/matches/[id]/rolling": [
- "src/routes/api/matches/[id]/rolling/+server.ts"
- ],
- "/api/matches/[id]/roll": [
- "src/routes/api/matches/[id]/roll/+server.ts"
- ],
- "/api/matches/[id]/score": [
- "src/routes/api/matches/[id]/score/+server.ts"
- ],
- "/api/osu/beatmap/[id]": [
- "src/routes/api/osu/beatmap/[id]/+server.ts"
- ],
- "/api/queue": [
- "src/routes/api/queue/+server.ts"
- ],
- "/demo": [],
- "/demo/better-auth": [
- "src/routes/demo/better-auth/+page.server.ts"
- ],
- "/demo/better-auth/login": [
- "src/routes/demo/better-auth/login/+page.server.ts"
- ],
- "/(app)/leaderboard": [
- "src/routes/(app)/leaderboard/+page.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/login": [
- "src/routes/login/+page.server.ts"
- ],
- "/(app)/mappools": [
- "src/routes/(app)/mappools/+page.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/(app)/mappools/[id]": [
- "src/routes/(app)/mappools/[id]/+page.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/(app)/matches": [
- "src/routes/(app)/matches/+page.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/(app)/matches/[id]": [
- "src/routes/(app)/matches/[id]/+page.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/(app)/privacy": [
- "src/routes/(app)/+layout.server.ts"
- ],
- "/(app)/settings": [
- "src/routes/(app)/settings/+page.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/sitemap.xml": [
- "src/routes/sitemap.xml/+server.ts"
- ],
- "/(app)/teams": [
- "src/routes/(app)/teams/+page.server.ts",
- "src/routes/(app)/+layout.server.ts"
- ],
- "/(app)/terms": [
- "src/routes/(app)/+layout.server.ts"
- ]
-}
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/$types.d.ts b/.svelte-kit/types/src/routes/$types.d.ts
deleted file mode 100644
index 9856c17..0000000
--- a/.svelte-kit/types/src/routes/$types.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-// @ts-ignore
-type MatcherParam = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
-type RouteParams = { };
-type RouteId = '/';
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;
-export type Snapshot = Kit.Snapshot;
-type LayoutRouteId = RouteId | "/(app)" | "/(app)/admin" | "/(app)/leaderboard" | "/(app)/mappools" | "/(app)/mappools/[id]" | "/(app)/matches" | "/(app)/matches/[id]" | "/(app)/privacy" | "/(app)/settings" | "/(app)/teams" | "/(app)/terms" | "/demo" | "/demo/better-auth" | "/demo/better-auth/login" | "/login" | null
-type LayoutParams = RouteParams & { id?: string }
-type LayoutParentData = EnsureDefined<{}>;
-
-export type LayoutServerData = null;
-export type LayoutData = Expand;
-export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/$types.d.ts b/.svelte-kit/types/src/routes/(app)/$types.d.ts
deleted file mode 100644
index b123a2a..0000000
--- a/.svelte-kit/types/src/routes/(app)/$types.d.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-// @ts-ignore
-type MatcherParam = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
-type RouteParams = { };
-type RouteId = '/(app)';
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;
-export type Snapshot = Kit.Snapshot;
-type PageServerParentData = Omit, keyof LayoutServerData> & EnsureDefined;
-type PageParentData = Omit, keyof LayoutData> & EnsureDefined;
-type LayoutRouteId = RouteId | "/(app)" | "/(app)/admin" | "/(app)/leaderboard" | "/(app)/mappools" | "/(app)/mappools/[id]" | "/(app)/matches" | "/(app)/matches/[id]" | "/(app)/privacy" | "/(app)/settings" | "/(app)/teams" | "/(app)/terms"
-type LayoutParams = RouteParams & { id?: string }
-type LayoutServerParentData = EnsureDefined;
-type LayoutParentData = EnsureDefined;
-
-export type PageServerLoad = OutputDataShape> = Kit.ServerLoad;
-export type PageServerLoadEvent = Parameters[0];
-export type ActionData = unknown;
-export type PageServerData = Expand>>>>>;
-export type PageData = Expand & EnsureDefined>;
-export type Action | void = Record | void> = Kit.Action
-export type Actions | void = Record | void> = Kit.Actions
-export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
-export type LayoutServerLoad = OutputDataShape> = Kit.ServerLoad;
-export type LayoutServerLoadEvent = Parameters[0];
-export type LayoutServerData = Expand>>>>>;
-export type LayoutData = Expand & EnsureDefined>;
-export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
-export type RequestEvent = Kit.RequestEvent;
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/admin/$types.d.ts b/.svelte-kit/types/src/routes/(app)/admin/$types.d.ts
deleted file mode 100644
index 87ce2c6..0000000
--- a/.svelte-kit/types/src/routes/(app)/admin/$types.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-// @ts-ignore
-type MatcherParam = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
-type RouteParams = { };
-type RouteId = '/(app)/admin';
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;
-export type Snapshot = Kit.Snapshot;
-type PageServerParentData = Omit, keyof import('../$types.js').LayoutServerData> & EnsureDefined;
-type PageParentData = Omit, keyof import('../$types.js').LayoutData> & EnsureDefined;
-
-export type PageServerLoad = OutputDataShape> = Kit.ServerLoad;
-export type PageServerLoadEvent = Parameters[0];
-type ExcludeActionFailure = T extends Kit.ActionFailure ? never : T extends void ? never : T;
-type ActionsSuccess any>> = { [Key in keyof T]: ExcludeActionFailure>>; }[keyof T];
-type ExtractActionFailure = T extends Kit.ActionFailure ? X extends void ? never : X : never;
-type ActionsFailure any>> = { [Key in keyof T]: Exclude>>, void>; }[keyof T];
-type ActionsExport = typeof import('./proxy+page.server.js').actions
-export type SubmitFunction = Kit.SubmitFunction>, Expand>>
-export type ActionData = Expand> | null;
-export type PageServerData = Expand>>>>>;
-export type PageData = Expand & EnsureDefined>;
-export type Action | void = Record | void> = Kit.Action
-export type Actions | void = Record | void> = Kit.Actions
-export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
-export type RequestEvent = Kit.RequestEvent;
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/admin/proxy+page.server.ts b/.svelte-kit/types/src/routes/(app)/admin/proxy+page.server.ts
deleted file mode 100644
index f88aca3..0000000
--- a/.svelte-kit/types/src/routes/(app)/admin/proxy+page.server.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-// @ts-nocheck
-// src/routes/(app)/admin/+page.server.ts
-import { db } from '$lib/server/db';
-import { user } from '$lib/server/db/auth.schema';
-import { playerRating } from '$lib/server/db/schema';
-import { eq, desc } from 'drizzle-orm';
-import { requireRole, setUserRole, isRootAdmin } from '$lib/server/permissions';
-import type { PageServerLoad, Actions } from './$types';
-
-export const load = async ({ locals }: Parameters[0]) => {
- requireRole(locals, 'admin');
-
- const users = await db.query.user.findMany({
- orderBy: desc(user.createdAt)
- });
-
- const usersWithRatings = await Promise.all(
- users.map(async (u) => {
- const rating = await db.query.playerRating.findFirst({
- where: eq(playerRating.userId, u.id)
- });
- return {
- id: u.id,
- name: u.name,
- email: u.email,
- image: u.image,
- role: u.role ?? 'player',
- createdAt: u.createdAt,
- elo: rating?.elo ?? 1000,
- wins: rating?.wins ?? 0,
- losses: rating?.losses ?? 0,
- isRootAdmin: isRootAdmin(u.email)
- };
- })
- );
-
- return {
- users: usersWithRatings,
- actorIsRootAdmin: isRootAdmin(locals.user!.email)
- };
-};
-
-export const actions = {
- setRole: async ({ request, locals }: import('./$types').RequestEvent) => {
- requireRole(locals, 'admin');
-
- const form = await request.formData();
- const userId = form.get('userId')?.toString();
- const role = form.get('role')?.toString();
-
- if (!userId || !role) return { error: 'User ID and role are required' };
- if (!['player', 'referee', 'admin'].includes(role)) {
- return { error: 'Invalid role' };
- }
-
- try {
- await setUserRole(locals, userId, role as any);
- } catch (e: any) {
- // setUserRole throws SvelteKit errors; extract the message
- return { error: e.body?.message ?? e.message ?? 'Failed to update role' };
- }
-
- return { success: true };
- }
-};
-;null as any as Actions;
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/mappools/$types.d.ts b/.svelte-kit/types/src/routes/(app)/mappools/$types.d.ts
deleted file mode 100644
index d32009b..0000000
--- a/.svelte-kit/types/src/routes/(app)/mappools/$types.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-// @ts-ignore
-type MatcherParam = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
-type RouteParams = { };
-type RouteId = '/(app)/mappools';
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;
-export type Snapshot = Kit.Snapshot;
-type PageServerParentData = Omit, keyof import('../$types.js').LayoutServerData> & EnsureDefined;
-type PageParentData = Omit, keyof import('../$types.js').LayoutData> & EnsureDefined;
-
-export type PageServerLoad = OutputDataShape> = Kit.ServerLoad;
-export type PageServerLoadEvent = Parameters[0];
-type ExcludeActionFailure = T extends Kit.ActionFailure ? never : T extends void ? never : T;
-type ActionsSuccess any>> = { [Key in keyof T]: ExcludeActionFailure>>; }[keyof T];
-type ExtractActionFailure = T extends Kit.ActionFailure ? X extends void ? never : X : never;
-type ActionsFailure any>> = { [Key in keyof T]: Exclude>>, void>; }[keyof T];
-type ActionsExport = typeof import('./proxy+page.server.js').actions
-export type SubmitFunction = Kit.SubmitFunction>, Expand>>
-export type ActionData = Expand> | null;
-export type PageServerData = Expand>>>>>;
-export type PageData = Expand & EnsureDefined>;
-export type Action | void = Record | void> = Kit.Action
-export type Actions | void = Record | void> = Kit.Actions
-export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
-export type RequestEvent = Kit.RequestEvent;
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/mappools/[id]/$types.d.ts b/.svelte-kit/types/src/routes/(app)/mappools/[id]/$types.d.ts
deleted file mode 100644
index 9d04193..0000000
--- a/.svelte-kit/types/src/routes/(app)/mappools/[id]/$types.d.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-// @ts-ignore
-type MatcherParam = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
-type RouteParams = { id: string };
-type RouteId = '/(app)/mappools/[id]';
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;
-export type Snapshot = Kit.Snapshot;
-type PageServerParentData = Omit, keyof import('../../$types.js').LayoutServerData> & EnsureDefined;
-type PageParentData = Omit, keyof import('../../$types.js').LayoutData> & EnsureDefined;
-
-export type EntryGenerator = () => Promise> | Array;
-export type PageServerLoad = OutputDataShape> = Kit.ServerLoad;
-export type PageServerLoadEvent = Parameters[0];
-type ExcludeActionFailure = T extends Kit.ActionFailure ? never : T extends void ? never : T;
-type ActionsSuccess any>> = { [Key in keyof T]: ExcludeActionFailure>>; }[keyof T];
-type ExtractActionFailure = T extends Kit.ActionFailure ? X extends void ? never : X : never;
-type ActionsFailure any>> = { [Key in keyof T]: Exclude>>, void>; }[keyof T];
-type ActionsExport = typeof import('./proxy+page.server.js').actions
-export type SubmitFunction = Kit.SubmitFunction>, Expand>>
-export type ActionData = Expand> | null;
-export type PageServerData = Expand>>>>>;
-export type PageData = Expand & EnsureDefined>;
-export type Action | void = Record | void> = Kit.Action
-export type Actions | void = Record | void> = Kit.Actions
-export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
-export type RequestEvent = Kit.RequestEvent;
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/mappools/[id]/proxy+page.server.ts b/.svelte-kit/types/src/routes/(app)/mappools/[id]/proxy+page.server.ts
deleted file mode 100644
index 0077870..0000000
--- a/.svelte-kit/types/src/routes/(app)/mappools/[id]/proxy+page.server.ts
+++ /dev/null
@@ -1,146 +0,0 @@
-// @ts-nocheck
-import { db } from '$lib/server/db';
-import { mappool, mappoolSlot } from '$lib/server/db/schema';
-import { eq, and } from 'drizzle-orm';
-import { error, redirect } from '@sveltejs/kit';
-import { getBeatmap } from '$lib/server/osu/api';
-import { requireAuth, requireOwnerOrAdmin } from '$lib/server/permissions';
-import type { PageServerLoad, Actions } from './$types';
-
-export const load = async ({ params, locals }: Parameters[0]) => {
- requireAuth(locals);
-
- const pool = await db.query.mappool.findFirst({
- where: eq(mappool.id, params.id),
- with: {
- slots: {
- orderBy: (s, { asc }) => [asc(s.category), asc(s.orderInCategory)]
- }
- }
- });
-
- if (!pool) error(404, 'Mappool not found');
-
- // Fetch beatmap metadata for all slots
- const slotsWithBeatmaps = await Promise.all(
- pool.slots.map(async (slot) => {
- try {
- const beatmap = await getBeatmap(slot.beatmapId);
- return {
- ...slot,
- beatmap: {
- title: beatmap.beatmapset.title,
- artist: beatmap.beatmapset.artist,
- version: beatmap.version,
- starRating: beatmap.difficulty_rating,
- bpm: beatmap.bpm,
- totalLength: beatmap.total_length,
- coverUrl: beatmap.beatmapset.covers['card@2x'],
- url: beatmap.url
- }
- };
- } catch {
- return { ...slot, beatmap: null };
- }
- })
- );
-
- const isOwner = pool.createdBy === locals.user!.id;
- const isAdmin = locals.user!.role === 'admin';
-
- return {
- pool: { ...pool, slots: slotsWithBeatmaps },
- canEdit: isOwner || isAdmin
- };
-};
-
-export const actions = {
- rename: async ({ params, request, locals }: import('./$types').RequestEvent) => {
- const pool = await db.query.mappool.findFirst({
- where: eq(mappool.id, params.id)
- });
- if (!pool) error(404, 'Mappool not found');
- requireOwnerOrAdmin(locals, pool.createdBy);
-
- const form = await request.formData();
- const name = form.get('name')?.toString()?.trim();
- if (!name) return { error: 'Name is required' };
-
- await db.update(mappool).set({ name }).where(eq(mappool.id, params.id));
- return { success: true };
- },
-
- addSlot: async ({ params, request, locals }: import('./$types').RequestEvent) => {
- const pool = await db.query.mappool.findFirst({
- where: eq(mappool.id, params.id)
- });
- if (!pool) error(404, 'Mappool not found');
- requireOwnerOrAdmin(locals, pool.createdBy);
-
- const form = await request.formData();
- let beatmapId = form.get('beatmapId')?.toString()?.trim();
- const category = form.get('category')?.toString()?.trim()?.toUpperCase();
-
- if (!beatmapId || !category) {
- return { error: 'Beatmap ID and category are required' };
- }
-
- const urlMatch = beatmapId.match(/beatmaps\/(\d+)/);
- const setMatch = beatmapId.match(/beatmapsets\/\d+#\w+\/(\d+)/);
- if (urlMatch) beatmapId = urlMatch[1];
- else if (setMatch) beatmapId = setMatch[1];
-
- if (!/^\d+$/.test(beatmapId)) {
- return { error: 'Invalid beatmap ID' };
- }
-
- let beatmap;
- try {
- beatmap = await getBeatmap(beatmapId);
- } catch {
- return { error: 'Beatmap not found on osu!' };
- }
-
- const existing = await db.query.mappoolSlot.findMany({
- where: and(eq(mappoolSlot.mappoolId, params.id), eq(mappoolSlot.category, category))
- });
-
- await db.insert(mappoolSlot).values({
- mappoolId: params.id,
- beatmapId,
- category,
- orderInCategory: existing.length + 1,
- starRating: beatmap.difficulty_rating,
- mods: category === 'NM' || category === 'TB' || category === 'FM' ? [] : [category]
- });
-
- return { success: true };
- },
-
- removeSlot: async ({ params, request, locals }: import('./$types').RequestEvent) => {
- const pool = await db.query.mappool.findFirst({
- where: eq(mappool.id, params.id)
- });
- if (!pool) error(404, 'Mappool not found');
- requireOwnerOrAdmin(locals, pool.createdBy);
-
- const form = await request.formData();
- const slotId = form.get('slotId')?.toString();
- if (!slotId) return { error: 'Missing slot ID' };
-
- await db.delete(mappoolSlot).where(eq(mappoolSlot.id, slotId));
- return { success: true };
- },
-
- deletePool: async ({ params, locals }: import('./$types').RequestEvent) => {
- const pool = await db.query.mappool.findFirst({
- where: eq(mappool.id, params.id)
- });
- if (!pool) error(404, 'Mappool not found');
- requireOwnerOrAdmin(locals, pool.createdBy);
-
- await db.delete(mappool).where(eq(mappool.id, params.id));
- redirect(303, '/mappools');
- }
-};
-;null as any as Actions;
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/mappools/proxy+page.server.ts b/.svelte-kit/types/src/routes/(app)/mappools/proxy+page.server.ts
deleted file mode 100644
index 94976e2..0000000
--- a/.svelte-kit/types/src/routes/(app)/mappools/proxy+page.server.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-// @ts-nocheck
-import { db } from '$lib/server/db';
-import { redirect } from '@sveltejs/kit';
-import type { PageServerLoad, Actions } from './$types';
-import { mappool } from '$lib/server/db/schema';
-
-export const load = async ({ locals }: Parameters[0]) => {
- if (!locals.user) redirect(302, '/');
-
- const mappools = await db.query.mappool.findMany({
- with: { slots: true },
- orderBy: (m, { desc }) => [desc(m.createdAt)]
- });
-
- return { mappools };
-};
-
-export const actions = {
- create: async ({ request, locals }: import('./$types').RequestEvent) => {
- if (!locals.user) redirect(302, '/');
-
- const form = await request.formData();
- const name = form.get('name')?.toString()?.trim();
- if (!name) return { error: 'Name is required' };
-
- const [created] = await db
- .insert(mappool)
- .values({ name, createdBy: locals.user.id })
- .returning();
-
- redirect(303, `/mappools/${created.id}`);
- }
-};
-;null as any as Actions;
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/matches/$types.d.ts b/.svelte-kit/types/src/routes/(app)/matches/$types.d.ts
deleted file mode 100644
index 9681896..0000000
--- a/.svelte-kit/types/src/routes/(app)/matches/$types.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-// @ts-ignore
-type MatcherParam = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
-type RouteParams = { };
-type RouteId = '/(app)/matches';
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;
-export type Snapshot = Kit.Snapshot;
-type PageServerParentData = Omit, keyof import('../$types.js').LayoutServerData> & EnsureDefined;
-type PageParentData = Omit, keyof import('../$types.js').LayoutData> & EnsureDefined;
-
-export type PageServerLoad = OutputDataShape> = Kit.ServerLoad;
-export type PageServerLoadEvent = Parameters[0];
-type ExcludeActionFailure = T extends Kit.ActionFailure ? never : T extends void ? never : T;
-type ActionsSuccess any>> = { [Key in keyof T]: ExcludeActionFailure>>; }[keyof T];
-type ExtractActionFailure = T extends Kit.ActionFailure ? X extends void ? never : X : never;
-type ActionsFailure any>> = { [Key in keyof T]: Exclude>>, void>; }[keyof T];
-type ActionsExport = typeof import('./proxy+page.server.js').actions
-export type SubmitFunction = Kit.SubmitFunction>, Expand>>
-export type ActionData = Expand> | null;
-export type PageServerData = Expand>>>>>;
-export type PageData = Expand & EnsureDefined>;
-export type Action | void = Record | void> = Kit.Action
-export type Actions | void = Record | void> = Kit.Actions
-export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
-export type RequestEvent = Kit.RequestEvent;
\ No newline at end of file
diff --git a/.svelte-kit/types/src/routes/(app)/matches/[id]/$types.d.ts b/.svelte-kit/types/src/routes/(app)/matches/[id]/$types.d.ts
deleted file mode 100644
index 7316760..0000000
--- a/.svelte-kit/types/src/routes/(app)/matches/[id]/$types.d.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-// @ts-ignore
-type MatcherParam = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
-type RouteParams = { id: string };
-type RouteId = '/(app)/matches/[id]';
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;
-export type Snapshot = Kit.Snapshot;
-type PageServerParentData = Omit, keyof import('../../$types.js').LayoutServerData> & EnsureDefined;
-type PageParentData = Omit, keyof import('../../$types.js').LayoutData> & EnsureDefined;
-
-export type EntryGenerator = () => Promise> | Array;
-export type PageServerLoad = OutputDataShape> = Kit.ServerLoad;
-export type PageServerLoadEvent = Parameters[0];
-type ExcludeActionFailure = T extends Kit.ActionFailure ? never : T extends void ? never : T;
-type ActionsSuccess any>> = { [Key in keyof T]: ExcludeActionFailure>>; }[keyof T];
-type ExtractActionFailure