Dashboard 1.0

This commit is contained in:
1tzEmerald committed 2026-07-26 15:02:50 +01:00
1 parent 51ffafeeda
commit 24ccc179a6
12 files changed
+384 -206

No files matched your search

+83 -42
View File
@@ -10,6 +10,7 @@
"dependencies": {
"@hugeicons/core-free-icons": "^4.1.4",
"@hugeicons/react": "^1.1.6",
"@monaco-editor/react": "^4.7.0",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
@@ -91,6 +92,7 @@
"integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.29.0",
"@babel/generator": "^7.29.0",
@@ -883,6 +885,29 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@monaco-editor/loader": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.7.0.tgz",
"integrity": "sha512-gIwR1HrJrrx+vfyOhYmCZ0/JcWqG5kbfG7+d3f/C1LXk2EvzAbHSg3MQ5lO2sMlo9izoAZ04shohfKLVT6crVA==",
"license": "MIT",
"dependencies": {
"state-local": "^1.0.6"
}
},
"node_modules/@monaco-editor/react": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/@monaco-editor/react/-/react-4.7.0.tgz",
"integrity": "sha512-cyzXQCtO47ydzxpQtCGSQGOC8Gk3ZUeBXFAxD+CWXYFo5OqZyZUonFl0DwUlTyAfRHntBfw2p3w4s9R6oe1eCA==",
"license": "MIT",
"dependencies": {
"@monaco-editor/loader": "^1.5.0"
},
"peerDependencies": {
"monaco-editor": ">= 0.25.0 < 1",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -2888,9 +2913,6 @@
"arm"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -2905,9 +2927,6 @@
"arm"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -2922,9 +2941,6 @@
"arm64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -2939,9 +2955,6 @@
"arm64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -2956,9 +2969,6 @@
"loong64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -2973,9 +2983,6 @@
"loong64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -2990,9 +2997,6 @@
"ppc64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3007,9 +3011,6 @@
"ppc64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3024,9 +3025,6 @@
"riscv64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3041,9 +3039,6 @@
"riscv64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3058,9 +3053,6 @@
"s390x"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3075,9 +3067,6 @@
"x64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3092,9 +3081,6 @@
"x64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3243,6 +3229,7 @@
"integrity": "sha512-TCFSk8IZh+iLX1xtksoBVtdmgL+1IX0fC9BeU4QqFSuNdN/K+HUlhqOzEmSYYpZUVsLYcPqc9KX+60iDuninSQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"undici-types": ">=7.24.0 <7.24.7"
}
@@ -3251,8 +3238,9 @@
"version": "19.2.14",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",
"integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
"dev": true,
"devOptional": true,
"license": "MIT",
"peer": true,
"dependencies": {
"csstype": "^3.2.2"
}
@@ -3261,12 +3249,20 @@
"version": "19.2.3",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",
"integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
"dev": true,
"devOptional": true,
"license": "MIT",
"peer": true,
"peerDependencies": {
"@types/react": "^19.2.0"
}
},
"node_modules/@types/trusted-types": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
"license": "MIT",
"optional": true
},
"node_modules/@vitejs/plugin-react": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz",
@@ -3428,6 +3424,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.10.12",
"caniuse-lite": "^1.0.30001782",
@@ -3589,7 +3586,7 @@
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
"dev": true,
"devOptional": true,
"license": "MIT"
},
"node_modules/debug": {
@@ -3628,6 +3625,15 @@
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
"license": "MIT"
},
"node_modules/dompurify": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.8.tgz",
"integrity": "sha512-yb1cEmaOum7wFvOCSQxyfgVlv5D47Rc30iZWoMpbDIWTnJ6grDDQyu2KFJzB2k7u0pMuJcQ1zphH//fFnw2tjQ==",
"license": "(MPL-2.0 OR Apache-2.0)",
"optionalDependencies": {
"@types/trusted-types": "^2.0.7"
}
},
"node_modules/electron-to-chromium": {
"version": "1.5.357",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.357.tgz",
@@ -3981,6 +3987,18 @@
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
"node_modules/marked": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz",
"integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==",
"license": "MIT",
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -4015,6 +4033,17 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/monaco-editor": {
"version": "0.56.0",
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.56.0.tgz",
"integrity": "sha512-sXboRm3BeBeLm938eaiyLMe0OxzfXIlZvbv4ir/jVgQy1zDhWjgmny0WoN45fuDKhCCQsYMbBJrv/A6jd8aCUg==",
"license": "MIT",
"peer": true,
"dependencies": {
"dompurify": "3.4.8",
"marked": "14.0.0"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -4101,6 +4130,7 @@
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
"integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=12"
},
@@ -4145,6 +4175,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
@@ -4300,6 +4331,7 @@
"resolved": "https://registry.npmjs.org/react/-/react-19.2.6.tgz",
"integrity": "sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -4319,6 +4351,7 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.6.tgz",
"integrity": "sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g==",
"license": "MIT",
"peer": true,
"dependencies": {
"scheduler": "^0.27.0"
},
@@ -4616,6 +4649,12 @@
"node": ">=0.10.0"
}
},
"node_modules/state-local": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz",
"integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==",
"license": "MIT"
},
"node_modules/sucrase": {
"version": "3.35.1",
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz",
@@ -4665,6 +4704,7 @@
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz",
"integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==",
"license": "MIT",
"peer": true,
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2",
@@ -4882,6 +4922,7 @@
"integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.4.4",
+1
View File
@@ -11,6 +11,7 @@
"dependencies": {
"@hugeicons/core-free-icons": "^4.1.4",
"@hugeicons/react": "^1.1.6",
"@monaco-editor/react": "^4.7.0",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

+26 -44
View File
@@ -54,56 +54,41 @@ const mainNav: {
permission?: string;
}[] = [
{ title: "Dashboard", url: "/", icon: DashboardSquare02Icon, end: true, permission: "overview" },
{ title: "Logs", url: "/logs", icon: ComputerTerminal01Icon, permission: "logs" },
{ title: "Settings", url: "/settings", icon: Settings02Icon, permission: "settings.view" },
{ title: "Addons", url: "/addons", icon: PackageIcon, permission: "settings.view" },
{ title: "Users", url: "/users", icon: UserMultiple02Icon, permission: "users.view" },
];
const sections: {
label: string;
items: { title: string; url: string; icon: IconSvgElement }[];
items: { title: string; url: string; icon: IconSvgElement; permission?: string }[];
}[] = [
{
label: "Tickets & support",
label: "Configuration",
items: [
{
title: "Ticket system",
url: "/configs?file=ticket-panel",
icon: Ticket01Icon,
},
{
title: "Bot config",
url: "/configs?file=supportbot",
icon: BotIcon,
},
{ title: "Transcripts", url: "/transcripts", icon: File02Icon },
{ title: "Bot Settings", url: "/configs?file=supportbot", icon: BotIcon },
{ title: "Commands", url: "/configs?file=commands", icon: CommandIcon },
{ title: "Messages", url: "/configs?file=messages", icon: Message01Icon },
],
},
{
label: "Community",
label: "Features",
items: [
{
title: "Messages",
url: "/configs?file=messages",
icon: Message01Icon,
},
{
title: "AI assistant",
url: "/configs?file=supportbot-ai",
icon: AiBrain01Icon,
},
{ title: "Ticket System", url: "/configs?file=ticket-panel", icon: Ticket01Icon },
{ title: "AI Assistant", url: "/configs?file=supportbot-ai", icon: AiBrain01Icon },
{ title: "Transcripts", url: "/transcripts", icon: File02Icon, permission: "transcripts" },
],
},
{
label: "Server control",
label: "Management",
items: [
{ title: "commands.yml", url: "/configs?file=commands", icon: CommandIcon },
{
title: "Staff roles",
url: "/configs?file=supportbot",
icon: UserMultiple02Icon,
},
{ title: "Users", url: "/users", icon: UserMultiple02Icon, permission: "users.view" },
{ title: "Staff Roles", url: "/configs?file=supportbot", icon: UserMultiple02Icon },
{ title: "Console Logs", url: "/logs", icon: ComputerTerminal01Icon, permission: "logs" },
],
},
{
label: "System",
items: [
{ title: "Addon Manager", url: "/addons", icon: PackageIcon, permission: "settings.view" },
{ title: "Dashboard Settings", url: "/settings", icon: Settings02Icon, permission: "settings.view" },
],
},
];
@@ -140,16 +125,13 @@ export function AppSidebar() {
.map((section) => ({
...section,
items: section.items.filter((item) => {
if (item.permission) {
return hasPermission(permissions, item.permission);
}
const file = configFileFromUrl(item.url);
if (file && item.url.includes("/configs")) {
return canViewConfig(permissions, file);
}
if (item.url === "/transcripts") {
return hasPermission(permissions, "transcripts");
}
if (item.url === "/commands") {
return canViewConfig(permissions, "commands");
}
return true;
}),
}))
@@ -236,7 +218,7 @@ export function AppSidebar() {
<SidebarMenu>
{section.items.map((item) => {
const file = configFileFromUrl(item.url);
const isActive =
const isConfigActive =
Boolean(file) &&
activeFile === file &&
item.url.includes("/configs");
@@ -245,8 +227,8 @@ export function AppSidebar() {
<SidebarMenuButton asChild tooltip={item.title}>
<NavLink
to={item.url}
className={cn(
isActive && "bg-sidebar-accent font-medium",
className={({ isActive }) => cn(
(isActive || isConfigActive) && "bg-sidebar-accent font-medium",
)}
>
<Icon icon={item.icon} size={18} />
@@ -18,6 +18,7 @@ import { mergeSchemaWithData } from "@/lib/merge-config-schema";
import { useAuth } from "@/context/AuthContext";
import { notifyConfigSave } from "@/lib/notify-config-save";
import { Textarea } from "@/components/ui/textarea";
import Editor from "@monaco-editor/react";
import { ConfigFieldInput } from "./config-field";
import { CommandsEditor } from "./commands-editor";
@@ -295,13 +296,22 @@ export function ConfigVisualEditor({ configFile }: ConfigVisualEditorProps) {
or any option not in Visual mode.
</CardDescription>
</CardHeader>
<CardContent>
<Textarea
<CardContent className="h-[min(520px,60vh)] overflow-hidden rounded-b-xl border-t border-border p-0">
<Editor
height="100%"
language="yaml"
theme="vs-dark"
value={rawYaml}
disabled={readOnly}
onChange={(e) => setRawYaml(e.target.value)}
className="min-h-[min(520px,60vh)] font-mono text-xs leading-relaxed"
spellCheck={false}
onChange={(value) => setRawYaml(value || "")}
options={{
readOnly: readOnly,
minimap: { enabled: false },
fontSize: 13,
wordWrap: "on",
scrollBeyondLastLine: false,
padding: { top: 16 },
tabSize: 2,
}}
/>
</CardContent>
</Card>
+9 -79
View File
@@ -107,85 +107,15 @@ export default function Configs() {
</p>
</div>
<div className="grid gap-4 lg:grid-cols-[220px_1fr]">
<Card className="h-fit border-border bg-card">
<CardHeader className="pb-2">
<CardTitle className="text-sm font-medium text-muted-foreground">
Configuration files
</CardTitle>
</CardHeader>
<CardContent className="p-0">
<ScrollArea className="h-[min(400px,50vh)]">
<ul className="space-y-3 p-2">
{allowedMainFiles.length > 0 ? (
<li>
<p className="px-3 pb-1 text-[10px] font-semibold uppercase tracking-widest text-muted-foreground/80">
Core
</p>
<ul className="space-y-0.5">
{allowedMainFiles.map((file) => (
<li key={file}>
<button
type="button"
onClick={() => selectFile(file)}
className={cn(
"w-full rounded-lg px-3 py-2.5 text-left text-sm transition-colors",
file === active
? "bg-primary/15 font-medium text-primary"
: "text-muted-foreground hover:bg-secondary hover:text-foreground",
)}
>
{file}.yml
</button>
</li>
))}
</ul>
</li>
) : null}
{allowedAddonFiles.length > 0 ? (
<li>
<p className="px-3 pb-1 text-[10px] font-semibold uppercase tracking-widest text-muted-foreground/80">
Addons
</p>
<ul className="space-y-0.5">
{allowedAddonFiles.map((file) => {
const key = addonConfigFileParam(file);
return (
<li key={file}>
<button
type="button"
onClick={() => selectFile(key)}
className={cn(
"w-full rounded-lg px-3 py-2.5 text-left text-sm transition-colors",
key === active
? "bg-primary/15 font-medium text-primary"
: "text-muted-foreground hover:bg-secondary hover:text-foreground",
)}
>
{file}
</button>
</li>
);
})}
</ul>
</li>
) : null}
</ul>
</ScrollArea>
</CardContent>
</Card>
<div className="min-w-0">
{isAddonActive && activeAddonFilename ? (
<AddonConfigEditor
key={activeAddonFilename}
filename={activeAddonFilename}
/>
) : (
<ConfigVisualEditor key={active} configFile={active} />
)}
</div>
<div className="mt-6">
{isAddonActive && activeAddonFilename ? (
<AddonConfigEditor
key={activeAddonFilename}
filename={activeAddonFilename}
/>
) : (
<ConfigVisualEditor key={active} configFile={active} />
)}
</div>
</div>
);
+37 -34
View File
@@ -1,7 +1,5 @@
import { useMemo } from "react";
import { BotIcon } from "@hugeicons/core-free-icons";
import { Navigate, useSearchParams } from "react-router-dom";
import { Icon } from "@/components/icon";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import {
@@ -42,48 +40,53 @@ export default function Login() {
if (!loading && isAuthenticated) return <Navigate to="/" replace />;
return (
<div className="flex min-h-svh items-center justify-center bg-background p-4">
<Card className="w-full max-w-md border-border bg-card">
<CardHeader className="space-y-4">
<div className="flex items-center gap-3">
{branding.hasFavicon && branding.faviconUrl ? (
<img
src={`${branding.faviconUrl}${branding.updatedAt ? `?v=${branding.updatedAt}` : ""}`}
alt=""
className="size-11 rounded-xl object-contain"
/>
) : (
<div className="flex size-11 items-center justify-center rounded-xl bg-primary text-primary-foreground">
<Icon icon={BotIcon} size={22} />
</div>
)}
<div>
<CardTitle className="text-xl">{branding.title}</CardTitle>
<CardDescription>Sign in to your dashboard</CardDescription>
</div>
<div className="relative flex min-h-svh items-center justify-center bg-[#0c0c10] p-4 overflow-hidden">
<Card className="relative z-10 w-full max-w-md overflow-hidden rounded-3xl border border-white/10 bg-card/30 p-2 shadow-2xl backdrop-blur-2xl">
<div className="absolute inset-0 bg-gradient-to-br from-white/5 to-transparent pointer-events-none"></div>
<CardHeader className="space-y-6 pt-10 pb-4 text-center">
<div className="mx-auto flex size-28 items-center justify-center overflow-hidden rounded-3xl bg-white/5 p-4 shadow-inner ring-1 ring-white/10 transition-transform duration-500 hover:scale-105">
<img
src="/logo.png"
alt="SupportBot Logo"
className="h-full w-full object-contain drop-shadow-xl"
/>
</div>
<div>
<CardTitle className="bg-gradient-to-br from-white to-white/50 bg-clip-text text-3xl font-extrabold tracking-tight text-transparent">
{branding.title || "SupportBot"}
</CardTitle>
<CardDescription className="mt-2 text-base font-medium text-white/50">
Sign in to your dashboard
</CardDescription>
</div>
</CardHeader>
<CardContent className="space-y-4">
<p className="text-sm text-muted-foreground">
Sign in with Discord. Your application credentials and allowed user
IDs are configured in{" "}
<code className="rounded-md bg-secondary px-1.5 py-0.5 text-xs text-foreground">
Configs/api.yml
</code>
.
</p>
<CardContent className="space-y-6 pb-10">
<div className="text-center space-y-1">
<p className="text-sm font-medium text-white/50">
Securely authenticate using your Discord account.
</p>
<p className="text-xs text-white/30">
Credentials are configured in <code className="rounded bg-white/5 px-1 py-0.5 text-white/40">Configs/api.yml</code>
</p>
</div>
{error ? (
<Alert variant="destructive">
<AlertDescription>{error}</AlertDescription>
<Alert variant="destructive" className="border-red-500/50 bg-red-500/10 text-red-200 backdrop-blur-md">
<AlertDescription className="font-medium">{error}</AlertDescription>
</Alert>
) : null}
<Button
type="button"
className="w-full"
className="group relative w-full overflow-hidden rounded-2xl bg-primary px-8 py-6 text-base font-bold text-primary-foreground shadow-[0_0_20px_rgba(var(--primary),0.3)] transition-all duration-300 hover:scale-[1.02] hover:shadow-[0_0_30px_rgba(var(--primary),0.5)] active:scale-95"
disabled={loading}
onClick={loginWithDiscord}
>
{loading ? "Checking session…" : "Continue with Discord"}
<div className="absolute inset-0 translate-x-[-100%] bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-1000 group-hover:translate-x-[100%]"></div>
<span className="relative flex items-center justify-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 127.14 96.36" fill="currentColor">
<path d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1,105.25,105.25,0,0,0,32.19-16.14c2.64-27.38-4.51-51.11-19.32-72.15ZM42.68,68.22c-5.28,0-9.66-4.9-9.66-10.89s4.29-10.89,9.66-10.89c5.41,0,9.75,4.9,9.66,10.89C52.34,63.32,48.09,68.22,42.68,68.22Zm41.76,0c-5.28,0-9.66-4.9-9.66-10.89s4.29-10.89,9.66-10.89c5.41,0,9.75,4.9,9.66,10.89C84.44,63.32,80.19,68.22,84.44,68.22Z"/>
</svg>
{loading ? "Authenticating..." : "Continue with Discord"}
</span>
</Button>
</CardContent>
</Card>
+1 -1
View File
@@ -11,7 +11,7 @@ export default defineConfig({
},
base: "/",
build: {
outDir: path.resolve(__dirname, "../public/dashboard"),
outDir: path.resolve(__dirname, "../../SupportBot/public/dashboard"),
emptyOutDir: true,
},
server: {
+191
View File
@@ -0,0 +1,191 @@
var R3=Object.defineProperty;var A3=(e,n,a)=>n in e?R3(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;var m1=(e,n,a)=>A3(e,typeof n!="symbol"?n+"":n,a);function _3(e,n){for(var a=0;a<n.length;a++){const o=n[a];if(typeof o!="string"&&!Array.isArray(o)){for(const l in o)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(o,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>o[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const d of i.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function a(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(l){if(l.ep)return;l.ep=!0;const i=a(l);fetch(l.href,i)}})();function Xx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tm={exports:{}},Nl={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var p1;function M3(){if(p1)return Nl;p1=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(o,l,i){var d=null;if(i!==void 0&&(d=""+i),l.key!==void 0&&(d=""+l.key),"key"in l){i={};for(var m in l)m!=="key"&&(i[m]=l[m])}else i=l;return l=i.ref,{$$typeof:e,type:o,key:d,ref:l!==void 0?l:null,props:i}}return Nl.Fragment=n,Nl.jsx=a,Nl.jsxs=a,Nl}var h1;function O3(){return h1||(h1=1,Tm.exports=M3()),Tm.exports}var c=O3(),Rm={exports:{}},_e={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var g1;function D3(){if(g1)return _e;g1=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function S(_){return _===null||typeof _!="object"?null:(_=x&&_[x]||_["@@iterator"],typeof _=="function"?_:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,N={};function E(_,O,H){this.props=_,this.context=O,this.refs=N,this.updater=H||j}E.prototype.isReactComponent={},E.prototype.setState=function(_,O){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,O,"setState")},E.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function k(){}k.prototype=E.prototype;function A(_,O,H){this.props=_,this.context=O,this.refs=N,this.updater=H||j}var R=A.prototype=new k;R.constructor=A,C(R,E.prototype),R.isPureReactComponent=!0;var L=Array.isArray;function z(){}var B={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function q(_,O,H){var I=H.ref;return{$$typeof:e,type:_,key:O,ref:I!==void 0?I:null,props:H}}function Z(_,O){return q(_.type,O,_.props)}function Q(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function fe(_){var O={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(H){return O[H]})}var de=/\/+/g;function ce(_,O){return typeof _=="object"&&_!==null&&_.key!=null?fe(""+_.key):O.toString(36)}function he(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(z,z):(_.status="pending",_.then(function(O){_.status==="pending"&&(_.status="fulfilled",_.value=O)},function(O){_.status==="pending"&&(_.status="rejected",_.reason=O)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,O,H,I,V){var ne=typeof _;(ne==="undefined"||ne==="boolean")&&(_=null);var J=!1;if(_===null)J=!0;else switch(ne){case"bigint":case"string":case"number":J=!0;break;case"object":switch(_.$$typeof){case e:case n:J=!0;break;case y:return J=_._init,M(J(_._payload),O,H,I,V)}}if(J)return V=V(_),J=I===""?"."+ce(_,0):I,L(V)?(H="",J!=null&&(H=J.replace(de,"$&/")+"/"),M(V,O,H,"",function(G){return G})):V!=null&&(Q(V)&&(V=Z(V,H+(V.key==null||_&&_.key===V.key?"":(""+V.key).replace(de,"$&/")+"/")+J)),O.push(V)),1;J=0;var me=I===""?".":I+":";if(L(_))for(var pe=0;pe<_.length;pe++)I=_[pe],ne=me+ce(I,pe),J+=M(I,O,H,ne,V);else if(pe=S(_),typeof pe=="function")for(_=pe.call(_),pe=0;!(I=_.next()).done;)I=I.value,ne=me+ce(I,pe++),J+=M(I,O,H,ne,V);else if(ne==="object"){if(typeof _.then=="function")return M(he(_),O,H,I,V);throw O=String(_),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return J}function K(_,O,H){if(_==null)return _;var I=[],V=0;return M(_,I,"","",function(ne){return O.call(H,ne,V++)}),I}function re(_){if(_._status===-1){var O=_._result;O=O(),O.then(function(H){(_._status===0||_._status===-1)&&(_._status=1,_._result=H)},function(H){(_._status===0||_._status===-1)&&(_._status=2,_._result=H)}),_._status===-1&&(_._status=0,_._result=O)}if(_._status===1)return _._result.default;throw _._result}var oe=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ee={map:K,forEach:function(_,O,H){K(_,function(){O.apply(this,arguments)},H)},count:function(_){var O=0;return K(_,function(){O++}),O},toArray:function(_){return K(_,function(O){return O})||[]},only:function(_){if(!Q(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return _e.Activity=v,_e.Children=ee,_e.Component=E,_e.Fragment=a,_e.Profiler=l,_e.PureComponent=A,_e.StrictMode=o,_e.Suspense=h,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,_e.__COMPILER_RUNTIME={__proto__:null,c:function(_){return B.H.useMemoCache(_)}},_e.cache=function(_){return function(){return _.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(_,O,H){if(_==null)throw Error("The argument must be a React element, bLine truncated
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var b1;function L3(){return b1||(b1=1,(function(e){function n(M,K){var re=M.length;M.push(K);e:for(;0<re;){var oe=re-1>>>1,ee=M[oe];if(0<l(ee,K))M[oe]=K,M[re]=ee,re=oe;else break e}}function a(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var K=M[0],re=M.pop();if(re!==K){M[0]=re;e:for(var oe=0,ee=M.length,_=ee>>>1;oe<_;){var O=2*(oe+1)-1,H=M[O],I=O+1,V=M[I];if(0>l(H,re))I<ee&&0>l(V,H)?(M[oe]=V,M[I]=re,oe=I):(M[oe]=H,M[O]=re,oe=O);else if(I<ee&&0>l(V,re))M[oe]=V,M[I]=re,oe=I;else break e}}return K}function l(M,K){var re=M.sortIndex-K.sortIndex;return re!==0?re:M.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var d=Date,m=d.now();e.unstable_now=function(){return d.now()-m}}var h=[],p=[],y=1,v=null,x=3,S=!1,j=!1,C=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function R(M){for(var K=a(p);K!==null;){if(K.callback===null)o(p);else if(K.startTime<=M)o(p),K.sortIndex=K.expirationTime,n(h,K);else break;K=a(p)}}function L(M){if(C=!1,R(M),!j)if(a(h)!==null)j=!0,z||(z=!0,fe());else{var K=a(p);K!==null&&he(L,K.startTime-M)}}var z=!1,B=-1,U=5,q=-1;function Z(){return N?!0:!(e.unstable_now()-q<U)}function Q(){if(N=!1,z){var M=e.unstable_now();q=M;var K=!0;try{e:{j=!1,C&&(C=!1,k(B),B=-1),S=!0;var re=x;try{t:{for(R(M),v=a(h);v!==null&&!(v.expirationTime>M&&Z());){var oe=v.callback;if(typeof oe=="function"){v.callback=null,x=v.priorityLevel;var ee=oe(v.expirationTime<=M);if(M=e.unstable_now(),typeof ee=="function"){v.callback=ee,R(M),K=!0;break t}v===a(h)&&o(h),R(M)}else o(h);v=a(h)}if(v!==null)K=!0;else{var _=a(p);_!==null&&he(L,_.startTime-M),K=!1}}break e}finally{v=null,x=re,S=!1}K=void 0}}finally{K?fe():z=!1}}}var fe;if(typeof A=="function")fe=function(){A(Q)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ce=de.port2;de.port1.onmessage=Q,fe=function(){ce.postMessage(null)}}else fe=function(){E(Q,0)};function he(M,K){B=E(function(){M(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(M){switch(x){case 1:case 2:case 3:var K=3;break;default:K=x}var re=x;x=K;try{return M()}finally{x=re}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(M,K){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var re=x;x=M;try{return K()}finally{x=re}},e.unstable_scheduleCallback=function(M,K,re){var oe=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?oe+re:oe):re=oe,M){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=re+ee,M={id:y++,callback:K,priorityLevel:M,startTime:re,expirationTime:ee,sortIndex:-1},re>oe?(M.sortIndex=re,n(p,M),a(h)===null&&M===a(p)&&(C?(k(B),B=-1):C=!0,he(L,re-oe))):(M.sortIndex=ee,n(h,M),j||S||(j=!0,z||(z=!0,fe()))),M},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(M){var K=x;return function(){var re=x;x=K;try{return M.apply(this,arguments)}finally{x=re}}}})(Mm)),Mm}var y1;function z3(){return y1||(y1=1,_m.exports=L3()),_m.exports}var Om={exports:{}},Gt={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var x1;function P3(){if(x1)return Gt;x1=1;var e=Cu();function n(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},l=Symbol.for("react.portal");function i(h,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:h,containerInfo:p,implementation:y}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Gt.createPortal=function(h,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return i(h,p,null,y)},Gt.flushSync=function(h){var p=d.T,y=o.p;try{if(d.T=null,o.p=2,h)return h()}finally{d.T=p,o.p=y,o.d.f()}},Gt.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(h,p))},Gt.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},Gt.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var y=p.as,v=m(y,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?o.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:S}):y==="script"&&o.d.X(h,{crossOrigin:v,integrity:x,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Gt.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=m(p.as,p.crossOrigin);o.d.M(h,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(h)},Gt.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=m(y,p.crossOrigin);o.d.L(h,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Gt.preloadModule=function(h,p){if(typeof h=="string")if(p){var y=m(p.as,p.crossOrigin);o.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(h)},Gt.requestFormReset=function(h){o.d.r(h)},Gt.unstable_batchedUpdates=function(h,p){return h(p)},Gt.useFormState=function(h,p,y){return d.H.useFormState(h,p,y)},Gt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Gt.version="19.2.6",Gt}var S1;function Zx(){if(S1)return Om.exports;S1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Om.exports=P3(),Om.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var w1;function B3(){if(w1)return kl;w1=1;var e=z3(),n=Cu(),a=Zx();function o(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function i(t){var r=t,s=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(s=r.return),t=r.return;while(t)}return r.tag===3?s:null}function d(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function m(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function h(t){if(i(t)!==t)throw Error(o(188))}function p(t){var r=t.alternate;if(!r){if(r=i(t),r===null)throw Error(o(188));return r!==t?null:t}for(var s=t,u=r;;){var g=s.return;if(g===null)break;var b=g.alternate;if(b===null){if(u=g.return,u!==null){s=u;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===s)return h(g),t;if(b===u)return h(g),r;b=b.sibling}throw Error(o(188))}if(s.return!==u.return)s=g,u=b;else{for(var w=!1,T=g.child;T;){if(T===s){w=!0,s=g,u=b;break}if(T===u){w=!0,u=g,s=b;break}T=T.sibling}if(!w){for(T=b.child;T;){if(T===s){w=!0,s=b,u=g;break}if(T===u){w=!0,u=b,s=g;break}T=T.sibling}if(!w)throw Error(o(189))}}if(s.alternate!==u)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),A=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function fe(t){return t===null||typeof t!="object"?null:(t=Q&&t[Q]||t["@@iterator"],typeof t=="function"?t:null)}var de=Symbol.for("react.client.reference");function ce(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===de?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case E:return"Profiler";case N:return"StrictMode";case L:return"Suspense";case z:return"SuspenseList";case q:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case j:return"Portal";case A:return t.displayName||"Context";case k:return(t._context.displayName||"Context")+".Consumer";case R:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case B:return r=t.displayName||null,r!==null?r:ce(t.type)||"Memo";case U:r=t._payload,t=t._init;try{return ce(t(r))}catch{}}return null}var he=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},oe=[],ee=-1;function _(t){return{current:t}}function O(t){0>ee||(t.current=oe[ee],oe[ee]=null,ee--)}function H(t,r){ee++,oe[ee]=t.current,t.current=r}var I=_(null),V=_(null),ne=_(null),J=_(null);function me(t,r){switch(H(ne,r),H(V,t),H(I,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?zy(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=zy(r),t=Py(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}O(I),H(I,t)}function pe(){O(I),O(V),O(ne)}function G(t){t.memoizedState!==null&&H(J,t);var r=I.current,s=Py(r,t.type);r!==s&&(H(V,t),H(I,s))}function se(t){V.current===t&&(O(I),O(V)),J.current===t&&(O(J),wl._currentValue=re)}var ge,je;function Ae(t){if(ge===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);ge=r&&r[1]||"",je=-1<s.stack.indexOf(`
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ge+t+je}var Qe=!1;function ct(t,r){if(!t||Qe)return"";Qe=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(X){var W=X}Reflect.construct(t,[],le)}else{try{le.call()}catch(X){W=X}t.call(le.prototype)}}else{try{throw Error()}catch(X){W=X}(le=t())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(X){if(X&&W&&typeof X.stack=="string")return[X.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),w=b[0],T=b[1];if(w&&T){var D=w.split(`
`),Y=T.split(`
`);for(g=u=0;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;for(;g<Y.length&&!Y[g].includes("DetermineComponentFrameRoot");)g++;if(u===D.length||g===Y.length)for(u=D.length-1,g=Y.length-1;1<=u&&0<=g&&D[u]!==Y[g];)g--;for(;1<=u&&0<=g;u--,g--)if(D[u]!==Y[g]){if(u!==1||g!==1)do if(u--,g--,0>g||D[u]!==Y[g]){var te=`
`+D[u].replace(" at new "," at ");return t.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",t.displayName)),te}while(1<=u&&0<=g);break}}}finally{Qe=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Ae(s):""}function Tt(t,r){switch(t.tag){case 26:case 27:case 5:return Ae(t.type);case 16:return Ae("Lazy");case 13:return t.child!==r&&r!==null?Ae("Suspense Fallback"):Ae("Suspense");case 19:return Ae("SuspenseList");case 0:case 15:return ct(t.type,!1);case 11:return ct(t.type.render,!1);case 1:return ct(t.type,!0);case 31:return Ae("Activity");default:return""}}function Ca(t){try{var r="",s=null;do r+=Tt(t,s),s=t,t=t.return;while(t);return r}catch(u){return`
Error generating stack: `+u.message+`
`+u.stack}}var Rt=Object.prototype.hasOwnProperty,Os=e.unstable_scheduleCallback,Ds=e.unstable_cancelCallback,Yt=e.unstable_shouldYield,$r=e.unstable_requestPaint,Wt=e.unstable_now,hd=e.unstable_getCurrentPriorityLevel,ja=e.unstable_ImmediatePriority,xi=e.unstable_UserBlockingPriority,Ea=e.unstable_NormalPriority,Ls=e.unstable_LowPriority,dr=e.unstable_IdlePriority,Si=e.log,Ir=e.unstable_setDisableYieldValue,Na=null,qt=null;function $n(t){if(typeof Si=="function"&&Ir(t),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(Na,t)}catch{}}var Ht=Math.clz32?Math.clz32:Xn,gd=Math.log,zs=Math.LN2;function Xn(t){return t>>>=0,t===0?32:31-(gd(t)/zs|0)|0}var fo=256,mo=262144,ka=4194304;function Zn(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Te(t,r,s){var u=t.pendingLanes;if(u===0)return 0;var g=0,b=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var T=u&134217727;return T!==0?(u=T&~b,u!==0?g=Zn(u):(w&=T,w!==0?g=Zn(w):s||(s=T&~t,s!==0&&(g=Zn(s))))):(T=u&~b,T!==0?g=Zn(T):w!==0?g=Zn(w):s||(s=u&~t,s!==0&&(g=Zn(s)))),g===0?0:r!==0&&r!==g&&(r&b)===0&&(b=g&-g,s=r&-r,b>=s||b===32&&(s&4194048)!==0)?r:g}function ut(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function At(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vt(){var t=ka;return ka<<=1,(ka&62914560)===0&&(ka=4194304),t}function Ur(t){for(var r=[],s=0;31>s;s++)r.push(t);return r}function mt(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Zt(t,r,s,u,g,b){var w=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var T=t.entanglements,D=t.expirationTimes,Y=t.hiddenUpdates;for(s=w&~s;0<s;){var te=31-Ht(s),le=1<<te;T[te]=0,D[te]=-1;var W=Y[te];if(W!==null)for(Y[te]=null,te=0;te<W.length;te++){var X=W[te];X!==null&&(X.lane&=-536870913)}s&=~le}u!==0&&Ta(t,u,0),b!==0&&g===0&&t.tag!==0&&(t.suspendedLanes|=b&~(w&~r))}function Ta(t,r,s){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-Ht(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|s&261930}function Qt(t,r){var s=t.entangledLanes|=r;for(t=t.entanglements;s;){var u=31-Ht(s),g=1<<u;g&r|t[u]&r&&(t[u]|=r),s&=~g}}function Jt(t,r){var s=r&-r;return s=(s&42)!==0?1:po(s),(s&(t.suspendedLanes|r))!==0?0:s}function po(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function In(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function vd(){var t=K.p;return t!==0?t:(t=window.event,t===void 0?32:s1(t.type))}function wg(t,r){var s=K.p;try{return K.p=t,r()}finally{K.p=s}}var Hr=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Hr,en="__reactProps$"+Hr,ho="__reactContainer$"+Hr,bd="__reactEvents$"+Hr,b5="__reactListeners$"+Hr,y5="__reactHandles$"+Hr,Cg="__reactResources$"+Hr,Ps="__reactMarker$"+Hr;function yd(t){delete t[Lt],delete t[en],delete t[bd],delete t[b5],delete t[y5]}function go(t){var r=t[Lt];if(r)return r;for(var s=t.parentNode;s;){if(r=s[ho]||s[Lt]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(t=Gy(t);t!==null;){if(s=t[Lt])return s;t=Gy(t)}return r}t=s,s=t.parentNode}return null}function vo(t){if(t=t[Lt]||t[ho]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function Bs(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(o(33))}function bo(t){var r=t[Cg];return r||(r=t[Cg]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function _t(t){t[Ps]=!0}var jg=new Set,Eg={};function Ra(t,r){yo(t,r),yo(t+"Capture",r)}function yo(t,r){for(Eg[t]=r,t=0;t<r.length;t++)jg.add(r[t])}var x5=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\ Line truncated
`).replace(ZE,"")}function Dy(t,r){return r=Oy(r),Oy(t)===r}function et(t,r,s,u,g,b){switch(s){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||So(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&So(t,""+u);break;case"className":Ci(t,"class",u);break;case"tabIndex":Ci(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ci(t,s,u);break;case"style":Dg(t,u,b);break;case"data":if(r!=="object"){Ci(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||s!=="href")){t.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(s);break}u=Ei(""+u),t.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(s==="formAction"?(r!=="input"&&et(t,r,"name",g.name,g,null),et(t,r,"formEncType",g.formEncType,g,null),et(t,r,"formMethod",g.formMethod,g,null),et(t,r,"formTarget",g.formTarget,g,null)):(et(t,r,"encType",g.encType,g,null),et(t,r,"method",g.method,g,null),et(t,r,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(s);break}u=Ei(""+u),t.setAttribute(s,u);break;case"onClick":u!=null&&(t.onclick=mr);break;case"onScroll":u!=null&&Pe("scroll",t);break;case"onScrollEnd":u!=null&&Pe("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(g.children!=null)throw Error(o(60));t.innerHTML=s}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}s=Ei(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,""+u):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":u===!0?t.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,u):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(s,u):t.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(s):t.setAttribute(s,u);break;case"popover":Pe("beforetoggle",t),Pe("toggle",t),wi(t,"popover",u);break;case"xlinkActuate":fr(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":fr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":fr(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":fr(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":fr(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":fr(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":fr(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":fr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":fr(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":wi(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=E5.get(s)||s,wi(t,s,u))}}function um(t,r,s,u,g,b){switch(s){case"style":Dg(t,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(g.children!=null)throw Error(o(60));t.innerHTML=s}}break;case"children":typeof u=="string"?So(t,u):(typeof u=="number"||typeof u=="bigint")&&So(t,""+u);break;case"onScroll":u!=null&&Pe("scroll",t);break;case"onScrollEnd":u!=null&&Pe("scrollend",t);break;case"onClick":u!=null&&(t.onclick=mr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
* react-router v7.15.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var j1="popstate";function E1(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function U3(e={}){function n(o,l){var p;let i=(p=l.state)==null?void 0:p.masked,{pathname:d,search:m,hash:h}=i||o.location;return mp("",{pathname:d,search:m,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default",i?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function a(o,l){return typeof l=="string"?l:Il(l)}return V3(n,a,null,e)}function ft(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Pn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function H3(){return Math.random().toString(36).substring(2,10)}function N1(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function mp(e,n,a=null,o,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?ws(n):n,state:a,key:n&&n.key||o||H3(),mask:l}}function Il({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function ws(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let o=e.indexOf("?");o>=0&&(n.search=e.substring(o),e=e.substring(0,o)),e&&(n.pathname=e)}return n}function V3(e,n,a,o={}){let{window:l=document.defaultView,v5Compat:i=!1}=o,d=l.history,m="POP",h=null,p=y();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function y(){return(d.state||{idx:null}).idx}function v(){m="POP";let N=y(),E=N==null?null:N-p;p=N,h&&h({action:m,location:C.location,delta:E})}function x(N,E){m="PUSH";let k=E1(N)?N:mp(C.location,N,E);p=y()+1;let A=N1(k,p),R=C.createHref(k.mask||k);try{d.pushState(A,"",R)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(R)}i&&h&&h({action:m,location:C.location,delta:1})}function S(N,E){m="REPLACE";let k=E1(N)?N:mp(C.location,N,E);p=y();let A=N1(k,p),R=C.createHref(k.mask||k);d.replaceState(A,"",R),i&&h&&h({action:m,location:C.location,delta:0})}function j(N){return G3(N)}let C={get action(){return m},get location(){return e(l,d)},listen(N){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(j1,v),h=N,()=>{l.removeEventListener(j1,v),h=null}},createHref(N){return n(l,N)},createURL:j,encodeLocation(N){let E=j(N);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:S,go(N){return d.go(N)}};return C}function G3(e,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),ft(a,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Il(e);return o=o.replace(/ $/,"%20"),!n&&o.startsWith("//")&&(o=a+o),new URL(o,a)}function Qx(e,n,a="/"){return F3(e,n,a,!1)}function F3(e,n,a,o,l){let i=typeof n=="string"?ws(n):n,d=Or(i.pathname||"/",a);if(d==null)return null;let m=Y3(e),h=null,p=aN(d);for(let y=0;h==null&&y<m.length;++y)h=nN(m[y],p,o);return h}function Y3(e){let n=Jx(e);return W3(n),n}function Jx(e,n=[],a=[],o="",l=!1){let i=(d,m,h=l,p)=>{let y={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&h)return;ft(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let v=Fn([o,y.relativePath]),x=a.concat(y);d.children&&d.children.length>0&&(ft(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Jx(d.children,n,x,v,h)),!(d.path==null&&!d.index)&&n.push({path:v,score:eN(v,d.index),routesMeta:x})};return e.forEach((d,m)=>{var h;if(d.path===""||!((h=d.path)!=null&&h.includes("?")))i(d,m);else for(let p of e0(d.path))i(d,m,!0,p)}),n}function e0(e){let n=e.split("/");if(n.length===0)return[];let[a,...o]=n,l=a.endsWith("?"),i=a.replace(/\?$/,"");if(o.length===0)return l?[i,""]:[i];let d=e0(o.join("/")),m=[];return m.push(...d.map(h=>h===""?i:[i,h].join("/"))),l&&m.push(...d),m.map(h=>e.startsWith("/")&&h===""?"/":h)}function W3(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:tN(n.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var q3=/^:[\w-]+$/,K3=3,X3=2,Z3=1,Q3=10,J3=-2,k1=e=>e==="*";function eN(e,n){let a=e.split("/"),o=a.length;return a.some(k1)&&(o+=J3),n&&(o+=X3),a.filter(l=>!k1(l)).reduce((l,i)=>l+(q3.test(i)?K3:i===""?Z3:Q3),o)}function tN(e,n){return e.length===n.length&&e.slice(0,-1).every((o,l)=>o===n[l])?e[e.length-1]-n[n.length-1]:0}function nN(e,n,a=!1){let{routesMeta:o}=e,l={},i="/",d=[];for(let m=0;m<o.length;++m){let h=o[m],p=m===o.length-1,y=i==="/"?n:n.slice(i.length)||"/",v=au({path:h.relativePath,caseSensit Line truncated
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let y=Sn(),v;if(n){let E=typeof n=="string"?ws(n):n;ft(h==="/"||((N=E.pathname)==null?void 0:N.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${E.pathname}" was given in the \`location\` prop.`),v=E}else v=y;let x=v.pathname||"/",S=x;if(h!=="/"){let E=h.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let j=a&&a.state.matches.length?a.state.matches.map(E=>Object.assign(E,{route:a.manifest[E.route.id]||E.route})):Qx(e,{pathname:S});Pn(p||j!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Pn(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=_N(j&&j.map(E=>Object.assign({},E,{params:Object.assign({},d,E.params),pathname:Fn([h,o.encodeLocation?o.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?h:Fn([h,o.encodeLocation?o.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),l,a);return n&&C?f.createElement(Zl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},C):C}function kN(){let e=zN(),n=fN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},i={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:i},"ErrorBoundary")," or"," ",f.createElement("code",{style:i},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},n),a?f.createElement("pre",{style:l},a):null,d)}var TN=f.createElement(kN,null),d0=class extends f.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=SN(e.digest);a&&(e=a)}let n=e!==void 0?f.createElement(qn.Provider,{value:this.props.routeContext},f.createElement(rh.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?f.createElement(RN,{error:e},n):n}};d0.contextType=o0;var Lm=new WeakMap;function RN({children:e,error:n}){let{basename:a}=f.useContext(xn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let o=xN(n.digest);if(o){let l=Lm.get(n);if(l)throw l;let i=r0(o.location,a);if(n0&&!Lm.get(n))if(i.isExternal||o.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:o.replace}));throw Lm.set(n,d),d}return f.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function AN({routeContext:e,match:n,children:a}){let o=f.useContext(Cs);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(qn.Provider,{value:e},a)}function _N(e,n=[],a){let o=a==null?void 0:a.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let l=e,i=o==null?void 0:o.errors;if(i!=null){let y=l.findIndex(v=>v.route.id&&(i==null?void 0:i[v.route.id])!==void 0);ft(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),l=l.slice(0,Math.min(l.length,y+1))}let d=!1,m=-1;if(a&&o){d=o.renderFallback;for(let y=0;y<l.length;y++){let v=l[y];if((v.route.HyLine truncated
.`.concat(c9,` {
overflow: hidden `).concat(o,`;
padding-right: `).concat(m,"px ").concat(o,`;
}
body[`).concat(us,`] {
overflow: hidden `).concat(o,`;
overscroll-behavior: contain;
`).concat([n&&"position: relative ".concat(o,";"),a==="margin"&&`
padding-left: `.concat(l,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(d,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(m,"px ").concat(o,`;
`),a==="padding"&&"padding-right: ".concat(m,"px ").concat(o,";")].filter(Boolean).join(""),`
}
.`).concat(Qc,` {
right: `).concat(m,"px ").concat(o,`;
}
.`).concat(Jc,` {
margin-right: `).concat(m,"px ").concat(o,`;
}
.`).concat(Qc," .").concat(Qc,` {
right: 0 `).concat(o,`;
}
.`).concat(Jc," .").concat(Jc,` {
margin-right: 0 `).concat(o,`;
}
body[`).concat(us,`] {
`).concat(u9,": ").concat(m,`px;
}
`)},cx=function(){var e=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(e)?e:0},R9=function(){f.useEffect(function(){return document.body.setAttribute(us,(cx()+1).toString()),function(){var e=cx()-1;e<=0?document.body.removeAttribute(us):document.body.setAttribute(us,e.toString())}},[])},A9=function(e){var n=e.noRelative,a=e.noImportant,o=e.gapMode,l=o===void 0?"margin":o;R9();var i=f.useMemo(function(){return N9(l)},[l]);return f.createElement(k9,{styles:T9(i,!n,l,a?"":"!important")})},jp=!1;if(typeof window<"u")try{var Uc=Object.defineProperty({},"passive",{get:function(){return jp=!0,!0}});window.addEventListener("test",Uc,Uc),window.removeEventListener("test",Uc,Uc)}catch{jp=!1}var es=jp?{passive:!1}:!1,_9=function(e){return e.tagName==="TEXTAREA"},P2=function(e,n){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!_9(e)&&a[n]==="visible")},M9=function(e){return P2(e,"overflowY")},O9=function(e){return P2(e,"overflowX")},ux=function(e,n){var a=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var l=B2(e,o);if(l){var i=$2(e,o),d=i[1],m=i[2];if(d>m)return!0}o=o.parentNode}while(o&&o!==a.body);return!1},D9=function(e){var n=e.scrollTop,a=e.scrollHeight,o=e.clientHeight;return[n,a,o]},L9=function(e){var n=e.scrollLeft,a=e.scrollWidth,o=e.clientWidth;return[n,a,o]},B2=function(e,n){return e==="v"?M9(n):O9(n)},$2=function(e,n){return e==="v"?D9(n):L9(n)},z9=function(e,n){return e==="h"&&n==="rtl"?-1:1},P9=function(e,n,a,o,l){var i=z9(e,window.getComputedStyle(n).direction),d=i*o,m=a.target,h=n.contains(m),p=!1,y=d>0,v=0,x=0;do{if(!m)break;var S=$2(e,m),j=S[0],C=S[1],N=S[2],E=C-N-i*j;(j||E)&&B2(e,m)&&(v+=E,x+=j);var k=m.parentNode;m=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!h&&m!==document.body||h&&(n.contains(m)||n===m));return(y&&Math.abs(v)<1||!y&&Math.abs(x)<1)&&(p=!0),p},Hc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dx=function(e){return[e.deltaX,e.deltaY]},fx=function(e){return e&&"current"in e?e.current:e},B9=function(e,n){return e[0]===n[0]&&e[1]===n[1]},$9=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},I9=0,ts=[];function U9(e){var n=f.useRef([]),a=f.useRef([0,0]),o=f.useRef(),l=f.useState(I9++)[0],i=f.useState(z2)[0],d=f.useRef(e);f.useEffect(function(){d.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var C=i9([e.lockRef.current],(e.shards||[]).map(fx),!0).filter(Boolean);return C.forEach(function(N){return N.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),C.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var m=f.useCallback(function(C,N){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!d.current.allowPinchZoom;var E=Hc(C),k=a.current,A="deltaX"in C?C.deltaX:k[0]-E[0],R="deltaY"in C?C.deltaY:k[1]-E[1],L,z=C.target,B=Math.abs(A)>Math.abs(R)?"h":"v";if("touches"in C&&B==="h"&&z.type==="range")return!1;var U=window.getSelection(),q=U&&U.anchorNode,Z=q?q===z||q.contains(z):!1;if(Z)return!1;var Q=ux(B,z);if(!Q)return!0;if(Q?L=B:(L=B==="v"?"h":"v",Q=ux(B,z)),!Q)return!1;if(!o.current&&"changedTouches"in C&&(A||R)&&(o.current=L),!L)return!0;var fe=o.current||L;return P9(fe,N,C,fe==="h"?A:R)},[]),h=f.useCallback(function(C){var N=C;if(!(!ts.length||ts[ts.length-1]!==i)){var E="deltaY"in N?dx(N):Hc(N),k=n.current.filter(function(L){return L.name===N.type&&(L.target===N.target||N.target===L.shadowParent)&&B9(L.delta,E)})[0];if(k&&k.should){N.cancelable&&N.preventDefault();return}if(!k){var A=(d.current.shards||[]).map(fx).filter(Boolean).filter(function(L){return L.contains(N.target)}),R=A.length>0?m(N,A[0]):!d.current.noIsolation;R&&N.cancelable&&N.preventDefault()}}},[]),p=f.useCallback(function(C,N,E,k){var A={name:C,delta:N,target:E,should:k,shadowParent:H9(E)};n.current.push(A),setTimeout(function(){n.current=n.current.filter(function(R){return R!==A})},1)},[]),y=f.useCallback(function(C){a.current=Hc(C),o.current=void 0},[]),v=f.useCallback(function(C){p(C.type,dx(C),C.target,m(C,e.lockRef.current))},[]),x=f.useCallback(function(C){p(C.type,Hc(C),C.target,m(C,e.lockRef.current))},[]);f.useEffect(function(){return ts.push(i),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",h,es),document.addEventListener("touchmove",h,es),document.addEventListener("touchstart",y,es),function(){ts=ts.filter(function(C){return C!==i}),document.removeEventListener("wheel",h,es),document.removeEventListener("touchmove",h,es),document.removeEventListener("touchstart",y,es)}},[]);var S=e.removeScrollBar,j=e.inert;return f.createElement(f.Fragment,null,j?f.createElement(i,{styles:$9(l)}):null,S?f.createElement(A9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function H9(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const V9=v9(L2,U9);var si=f.forwardRef(function(e,n){return f.createElement(Gu,or({},e,{ref:n,sideCar:V9}))});si.classNames=Gu.classNames;var Ep=["Enter"," "],G9=["ArrowDown","PageUp","Home"],I2=["ArrowUp","PageDown","End"],F9=[...G9,...I2],Y9={ltr:[...Ep,"ArrowRight"],rtl:[...Ep,"ArrowLeft"]},W9={ltr:["ArrowLeft"],rtl:["ArrowRight"]},li="Menu",[Gl,q9,K9]=jh(li),[io,U2]=uk(li,[K9,ba,Hu]),Fu=ba(),H2=Hu(),[X9,co]=io(li),[Z9,ii]=io(li),V2=e=>{const{__scopeMenu:n,open:a=!1,children:o,dir:l,onOpenChange:i,modal:d=!0}=e,m=Fu(n),[h,p]=f.useState(null),y=f.useRef(!1),v=Ot(i),x=ei(l);return f.useEffect(()=>{const S=()=>{y.current=!0,document.addEventListener("pointerdown",j,{capture:!0,once:!0}),document.addEventListener("pointermove",j,{capture:!0,once:!0})},j=()=>y.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",j,{capture:!0}),document.removeEventListener("pointermove",j,{capture:!0})}},[]),c.jsx($u,{...m,children:c.jsx(X9,{scope:n,open:a,onOpenChange:v,content:h,onContentChange:p,children:c.jsx(Z9,{scope:n,onClose:f.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:y,dir:x,modal:d,children:o})})})};V2.displayName=li;var Q9="MenuAnchor",Oh=f.forwardRef((e,n)=>{const{__scopeMenu:a,...o}=e,l=Fu(a);return c.jsx(ri,{...l,...o,ref:n})});Oh.displayName=Q9;var Dh="MenuPortal",[J9,G2]=io(Dh,{forceMount:void 0}),F2=e=>{const{__scopeMenu:n,forceMount:a,children:o,container:l}=e,i=co(Dh,n);return c.jsx(J9,{scope:n,forceMount:a,children:c.jsx(Ut,{present:a||i.open,children:c.jsx(As,{asChild:!0,container:l,children:o})})})};F2.displayName=Dh;var zn="MenuContent",[eR,Lh]=io(zn),Y2=f.forwardRef((e,n)=>{const a=G2(zn,e.__scopeMenu),{forceMount:o=a.forceMount,...l}=e,i=co(zn,e.__scopeMenu),d=ii(zn,e.__scopeMenu);return c.jsx(Gl.Provider,{scope:e.__scopeMenu,children:c.jsx(Ut,{present:o||i.open,children:c.jsx(Gl.Slot,{scope:e.__scopeMenu,children:d.modal?c.jsx(tR,{...l,ref:n}):c.jsx(nR,{...l,ref:n})})})})}),tR=f.forwardRef((e,n)=>{const a=co(zn,e.__scopeMenu),o=f.useRe Line truncated
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const OS=(...e)=>e.filter((n,a,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===a).join(" ").trim();/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,o)=>o?o.toUpperCase():a.toLowerCase());/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const px=e=>{const n=eA(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var Zm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tA=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},nA=f.createContext({}),rA=()=>f.useContext(nA),aA=f.forwardRef(({color:e,size:n,strokeWidth:a,absoluteStrokeWidth:o,className:l="",children:i,iconNode:d,...m},h)=>{const{size:p=24,strokeWidth:y=2,absoluteStrokeWidth:v=!1,color:x="currentColor",className:S=""}=rA()??{},j=o??v?Number(a??y)*24/Number(n??p):a??y;return f.createElement("svg",{ref:h,...Zm,width:n??p??Zm.width,height:n??p??Zm.height,stroke:e??x,strokeWidth:j,className:OS("lucide",S,l),...!i&&!tA(m)&&{"aria-hidden":"true"},...m},[...d.map(([C,N])=>f.createElement(C,N)),...Array.isArray(i)?i:[i]])});/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ya=(e,n)=>{const a=f.forwardRef(({className:o,...l},i)=>f.createElement(aA,{ref:i,iconNode:n,className:OS(`lucide-${JR(px(e))}`,`lucide-${e}`,o),...l}));return a.displayName=px(e),a};/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],DS=ya("check",oA);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],LS=ya("chevron-down",sA);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],iA=ya("chevron-right",lA);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],uA=ya("chevron-up",cA);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fA=ya("circle",dA);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],pA=ya("panel-left",mA);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],gA=ya("search",hA);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zS=ya("x",vA),Ih=XR,Uh=ZR,bA=f.forwardRef(({className:e,inset:n,children:a,...o},l)=>c.jsxs(_S,{ref:l,className:ie("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8",e),...o,children:[a,c.jsx(iA,{className:"ml-auto"})]}));bA.displayName=_S.displayName;const yA=f.forwardRef(({className:e,...n},a)=>c.jsx(MS,{ref:a,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n}));yA.displayName=MS.displayName;const qu=f.forwardRef(({className:e,sideOffset:n=4,...a},o)=>c.jsx(QR,{children:c.jsx(jS,{ref:o,sideOffset:n,className:ie("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...a})}));qu.displayName=jS.displayName;const Yl=f.forwardRef(({className:e,inset:n,...a},o)=>c.jsx(NS,{ref:o,className:ie("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",e),...a}));Yl.displayName=NS.displayName;const xA=f.forwardRef(({className:e,children:n,checked:a,...o},l)=>c.jsxs(kS,{ref:l,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(RS,{children:c.jsx(DS,{className:"h-4 w-4"})})}),n]}));xA.displayName=kS.displayName;const SA=f.forwardRef(({className:e,children:n,...a},o)=>c.jsxs(TS,{ref:o,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(RS,{children:c.jsx(fA,{className:"h-2 w-2 fill-current"})})}),n]}));SA.displayName=TS.displayName;const Hh=f.forwardRef(({className:e,inset:n,...a},o)=>c.jsx(ES,{ref:o,className:ie("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...a}));Hh.displayName=ES.displayName;const hu=f.forwardRef(({className:e,...n},a)=>c.jsx(AS,{ref:a,className:ie("-mx-1 my-1 h-px bg-muted",e),...n}));hu.displayName=AS.displayName;const Qm=768;function wA(){const[e,n]=f.useState(void 0);return f.useEffect(()=>{const a=window.matchMedia(`(max-width: ${Qm-1}px)`),o=()=>{n(window.innerWidth<Qm)};return a.addEventListener("change",o),n(window.innerWidth<Qm),()=>a.removeEventListener("change",o)},[]),!!e}const rt=f.forwardRef(({className:e,type:n,...a},o)=>c.jsx("input",{type:n,className:ie("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...a}));rt.displayName="Input";var CA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wn=CA.reduce((e,n)=>{const a=K0(`Primitive.${n}`),o=f.forwardRef((l,i)=>{const{asChild:d,...m}=l,h=d?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(h,{...m,ref:i})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),jA="Separator",hx="horizontal",EA=["horizontal","vertical"],PS=f.forwardRef((e,n)=>{const{decorative:a,orientation:o=hx,...l}=e,i=NA(o)?o:hx,m=a?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};returnLine truncated
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},GA="DialogDescriptionWarning",FA=({contentRef:e,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tw(GA).contentName}}.`;return f.useEffect(()=>{var i;const l=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");n&&l&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null},Yh=HS,Wh=FS,ui=YS,di=WS,Xu=KS,Zu=ZS,nw=JS;const YA=Yh,WA=Wh,rw=f.forwardRef(({className:e,...n},a)=>c.jsx(ui,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:a}));rw.displayName=ui.displayName;const qA=Ns("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),aw=f.forwardRef(({side:e="right",className:n,children:a,...o},l)=>c.jsxs(WA,{children:[c.jsx(rw,{}),c.jsxs(di,{ref:l,className:ie(qA({side:e}),n),...o,children:[c.jsxs(nw,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(zS,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));aw.displayName=di.displayName;const ow=({className:e,...n})=>c.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",e),...n});ow.displayName="SheetHeader";const sw=f.forwardRef(({className:e,...n},a)=>c.jsx(Xu,{ref:a,className:ie("text-lg font-semibold text-foreground",e),...n}));sw.displayName=Xu.displayName;const lw=f.forwardRef(({className:e,...n},a)=>c.jsx(Zu,{ref:a,className:ie("text-sm text-muted-foreground",e),...n}));lw.displayName=Zu.displayName;function Fe({className:e,...n}){return c.jsx("div",{className:ie("animate-pulse rounded-md bg-primary/10",e),...n})}function KA(e,n=[]){let a=[];function o(i,d){const m=f.createContext(d),h=a.length;a=[...a,d];const p=v=>{var E;const{scope:x,children:S,...j}=v,C=((E=x==null?void 0:x[e])==null?void 0:E[h])||m,N=f.useMemo(()=>j,Object.values(j));return c.jsx(C.Provider,{value:N,children:S})};p.displayName=i+"Provider";function y(v,x){var C;const S=((C=x==null?void 0:x[e])==null?void 0:C[h])||m,j=f.useContext(S);if(j)return j;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${i}\``)}return[p,y]}const l=()=>{const i=a.map(d=>f.createContext(d));return function(m){const h=(m==null?void 0:m[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...m,[e]:h}}),[m,h])}};return l.scopeName=e,[o,XA(l,...n)]}function XA(...e){const n=e[0];if(e.length===1)return n;const a=()=>{const o=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(i){const d=o.reduce((m,{useScope:h,scopeName:p})=>{const v=h(i)[`__scope${p}`];return{...m,...v}},{});return f.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])}};return a.scopeName=n.scopeName,a}function ZA(e){const n=QA(e),a=f.forwardRef((o,l)=>{const{children:i,...d}=o,m=f.Children.toArray(i),h=m.find(e7);if(h){const p=h.props.children,y=m.map(v=>v===h?f.Children.count(p)>1?f.Children.only(null):f.isValidElement(p)?p.props.children:null:v);return c.jsx(n,{...d,ref:l,children:f.isValidElement(p)?f.cloneElement(p,void 0,y):null})}return c.jsx(n,{...d,ref:l,children:i})});return a.displayName=`${e}.Slot`,a}function QA(e){const n=f.forwardRef((a,o)=>{const{children:l,...i}=a;if(f.isValidElement(l)){const d=n7(l),m=t7(i,l.props);return l.type!==f.Fragment&&(m.ref=o?st(o,d):d),f.cloneElement(l,m)}return f.Children.count(l)>1?f.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var iw=Symbol("radix.slottable");function JA(e){const n=({children:a})=>c.jsx(c.Fragment,{children:a});return n.displayName=`${e}.Slottable`,n.__radixId=iw,n}function e7(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iw}function t7(e,n){const a={...n};for(const o in n){const l=e[o],i=n[o];/^on[A-Z]/.test(o)?l&&i?a[o]=(...m)=>{const h=i(...m);return l(...m),h}:l&&(a[o]=l):o==="style"?a[o]={...l,...i}:o==="className"&&(a[o]=[l,i].filter(Boolean).join(" "))}return{...e,...a}}funct Line truncated
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xx;function rM(){if(xx)return rp;xx=1;var e=Cu();function n(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var a=typeof Object.is=="function"?Object.is:n,o=e.useState,l=e.useEffect,i=e.useLayoutEffect,d=e.useDebugValue;function m(v,x){var S=x(),j=o({inst:{value:S,getSnapshot:x}}),C=j[0].inst,N=j[1];return i(function(){C.value=S,C.getSnapshot=x,h(C)&&N({inst:C})},[v,S,x]),l(function(){return h(C)&&N({inst:C}),v(function(){h(C)&&N({inst:C})})},[v]),d(S),S}function h(v){var x=v.getSnapshot;v=v.value;try{var S=x();return!a(v,S)}catch{return!0}}function p(v,x){return x()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return rp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,rp}var Sx;function aM(){return Sx||(Sx=1,np.exports=rM()),np.exports}var oM=aM();function sM(){return oM.useSyncExternalStore(lM,()=>!0,()=>!1)}function lM(){return()=>{}}var tg="Avatar",[iM]=tM(tg),[cM,Ww]=iM(tg),qw=f.forwardRef((e,n)=>{const{__scopeAvatar:a,...o}=e,[l,i]=f.useState("idle");return c.jsx(cM,{scope:a,imageLoadingStatus:l,onImageLoadingStatusChange:i,children:c.jsx(wn.span,{...o,ref:n})})});qw.displayName=tg;var Kw="AvatarImage",Xw=f.forwardRef((e,n)=>{const{__scopeAvatar:a,src:o,onLoadingStatusChange:l=()=>{},...i}=e,d=Ww(Kw,a),m=uM(o,i),h=Ot(p=>{l(p),d.onImageLoadingStatusChange(p)});return Ct(()=>{m!=="idle"&&h(m)},[m,h]),m==="loaded"?c.jsx(wn.img,{...i,ref:n,src:o}):null});Xw.displayName=Kw;var Zw="AvatarFallback",Qw=f.forwardRef((e,n)=>{const{__scopeAvatar:a,delayMs:o,...l}=e,i=Ww(Zw,a),[d,m]=f.useState(o===void 0);return f.useEffect(()=>{if(o!==void 0){const h=window.setTimeout(()=>m(!0),o);return()=>window.clearTimeout(h)}},[o]),d&&i.imageLoadingStatus!=="loaded"?c.jsx(wn.span,{...l,ref:n}):null});Qw.displayName=Zw;function wx(e,n){return e?n?(e.src!==n&&(e.src=n),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function uM(e,{referrerPolicy:n,crossOrigin:a}){const o=sM(),l=f.useRef(null),i=o?(l.current||(l.current=new window.Image),l.current):null,[d,m]=f.useState(()=>wx(i,e));return Ct(()=>{m(wx(i,e))},[i,e]),Ct(()=>{const h=v=>()=>{m(v)};if(!i)return;const p=h("loaded"),y=h("error");return i.addEventListener("load",p),i.addEventListener("error",y),n&&(i.referrerPolicy=n),typeof a=="string"&&(i.crossOrigin=a),()=>{i.removeEventListener("load",p),i.removeEventListener("error",y)}},[i,a,n]),d}var Jw=qw,eC=Xw,tC=Qw;const gs=f.forwardRef(({className:e,...n},a)=>c.jsx(Jw,{ref:a,className:ie("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));gs.displayName=Jw.displayName;const vs=f.forwardRef(({className:e,...n},a)=>c.jsx(eC,{ref:a,className:ie("aspect-square h-full w-full",e),...n}));vs.displayName=eC.displayName;const bs=f.forwardRef(({className:e,...n},a)=>c.jsx(tC,{ref:a,className:ie("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...n}));bs.displayName=tC.displayName;const nC=f.createContext(null);function dM({children:e}){const[n,a]=f.useState([]),[o,l]=f.useState(0),[i,d]=f.useState(!0),m=f.useCallback(async()=>{try{const v=await ke.getNotifications();v.data&&(a(v.data.items),l(v.data.unreadCount))}catch{}finally{d(!1)}},[]),h=f.useCallback(async()=>{var v;try{const x=await ke.markNotificationsRead("all");a(S=>S.map(j=>({...j,read:!0}))),l(((v=x.data)==null?void 0:v.unreadCount)??0)}catch{}},[]),p=f.useCallback(async v=>{var x;try{const S=await ke.dismissNotification(v);a(j=>j.filter(C=>C.id!==v)),l(((x=S.data)==null?void 0:x.unreadCount)??0)}catch{}},[]);f.useEffect(()=>{m();const v=setInterval(m,3e4);return()=>clearInterval(v)},[m]);const y=f.useMemo(()=>({items:n,unreadCount:o,loading:i,refresh:m,markAllRead:h,dismiss:p}),[n,o,i,m,h,p]);return c.jsx(nC.Provider,{value:y,children:e})}function fM(){const e=f.useContext(nC);if(!e)throw new Error("useNotifications must be used within NotificationsProvider");return e}const mM=Ns("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ll({className:e,variant:n,...a}){return c.jsx("div",{className:ie(mM({variant:n}),e),...a})}function pM(e){const n=hM(e),a=f.forwardRef((o,l)=>{const{children:i,...d}=o,m=f.Children.toArray(i),h=m.find(vM);if(h){const p=h.props.children,y=m.map(v=>v===h?f.Children.count(p)>1?f.Children.only(null):f.isValidElement(p)?p.props.children:null:v);return c.jsx(n,{...d,ref:l,children:f.isValidElement(p)?f.cloneElement(p,void 0,y):null})}return c.jsx(n,{...d,ref:l,children:i})});return a.displayName=`${e}.SLine truncated
--num-groups: ${i.groups.length};
--indicator-opacity: ${i.searchMode?0:1};
--num-skintones: ${Mx};`}),d(()=>{i.customEmoji&&i.database&&B()}),d(()=>{i.customEmoji&&i.customEmoji.length?i.groups!==Xp&&(i.groups=Xp):i.groups!==sp&&(i.currentGroupIndex&&i.currentGroupIndex--,i.groups=sp)}),d(()=>{async function G(){i.databaseLoaded&&(i.currentSkinTone=await i.database.getPreferredSkinTone())}G()}),d(()=>{i.skinTones=Array(Mx).fill().map((G,se)=>rz(i.skinToneEmoji,se))}),d(()=>{i.skinToneButtonText=i.skinTones[i.currentSkinTone]}),d(()=>{i.skinToneButtonLabel=i.i18n.skinToneLabel.replace("{skinTone}",i.i18n.skinTones[i.currentSkinTone])}),d(()=>{async function G(){const{database:se}=i,ge=(await Promise.all(WL.map(je=>se.getEmojiByUnicodeOrName(je)))).filter(Boolean);i.defaultFavoriteEmojis=ge}i.databaseLoaded&&G()});function B(){const{customEmoji:G,database:se}=i,ge=G||fp;se.customEmoji!==ge&&(se.customEmoji=ge)}d(()=>{async function G(){B();const{database:se,defaultFavoriteEmojis:ge,numColumns:je}=i,Ae=await se.getTopFavoriteEmoji(je),Qe=await ce(c5([...Ae,...ge],ct=>ct.unicode||ct.name).slice(0,je));i.currentFavorites=Qe}i.databaseLoaded&&i.defaultFavoriteEmojis&&G()});function U(G){sz(G,l,()=>{{const se=getComputedStyle(a.rootElement),ge=parseInt(se.getPropertyValue("--num-columns"),10),je=se.getPropertyValue("direction")==="rtl";i.numColumns=ge,i.isRtl=je}})}function q(G){Nz(G,l,se=>{for(const{target:ge,isIntersecting:je}of se)ge.classList.toggle("onscreen",je)})}d(()=>{async function G(){const{searchText:se,currentGroup:ge,databaseLoaded:je,customEmoji:Ae}=i;if(!je)i.currentEmojis=[],i.searchMode=!1;else if(se.length>=HL){const Qe=await M(se);i.searchText===se&&(S(Qe),j(!0))}else{const{id:Qe}=ge;if(Qe!==-1||Ae&&Ae.length){const ct=await he(Qe);i.currentGroup.id===Qe&&(S(ct),j(!1))}}}G()});const Z=()=>{tu(()=>uz(a.tabpanelElement))};d(()=>{const{currentEmojis:G,emojiVersion:se}=i,ge=G.filter(je=>je.unicode).filter(je=>Ox(je)&&!Zp.has(je.unicode));if(!se&&ge.length)S(G),tu(()=>Q(ge));else{const je=se?G:G.filter(fe);S(je),Z()}});function Q(G){iz(G,a.baselineEmoji,p)?Z():i.currentEmojis=[...i.currentEmojis]}function fe(G){return!G.unicode||!Ox(G)||Zp.get(G.unicode)}async function de(G){const se=i.emojiVersion||await ip();return G.filter(({version:ge})=>!ge||ge<=se)}async function ce(G){return az(G,i.emojiVersion||await ip())}async function he(G){const se=G===-1?i.customEmoji:await i.database.getEmojiByGroup(G);return ce(await de(se))}async function M(G){return ce(await de(await i.database.getEmojiBySearchQuery(G)))}d(()=>{}),d(()=>{function G(){const{searchMode:ge,currentEmojis:je}=i;if(ge)return[{category:"",emojis:je}];const Ae=new Map;for(const Qe of je){const ct=Qe.category||"";let Tt=Ae.get(ct);Tt||(Tt=[],Ae.set(ct,Tt)),Tt.push(Qe)}return[...Ae.entries()].map(([Qe,ct])=>({category:Qe,emojis:ct})).sort((Qe,ct)=>i.customCategorySorting(Qe.category,ct.category))}const se=G();C(se)}),d(()=>{i.activeSearchItemId=i.activeSearchItem!==-1&&i.currentEmojis[i.activeSearchItem].id}),d(()=>{const{rawSearchText:G}=i;l5(()=>{i.searchText=(G||"").trim(),i.activeSearchItem=-1})});function K(G){if(!i.searchMode||!i.currentEmojis.length)return;const se=ge=>{rr(G),i.activeSearchItem=cp(ge,i.activeSearchItem,i.currentEmojis)};switch(G.key){case"ArrowDown":return se(!1);case"ArrowUp":return se(!0);case"Enter":if(i.activeSearchItem===-1)i.activeSearchItem=0;else return rr(G),_(i.currentEmojis[i.activeSearchItem].id)}}function re(G){const{target:se}=G,ge=se.closest(".nav-button");if(!ge)return;const je=parseInt(ge.dataset.groupId,10);a.searchElement.value="",i.rawSearchText="",i.searchText="",i.activeSearchItem=-1,i.currentGroupIndex=i.groups.findIndex(Ae=>Ae.id===je)}function oe(G){const{target:se,key:ge}=G,je=Ae=>{Ae&&(rr(G),Ae.focus())};switch(ge){case"ArrowLeft":return je(se.previousElementSibling);case"ArrowRight":return je(se.nextElementSibling);case"Home":return je(se.parentElement.firstElementChild);case"End":return je(se.parentElement.lastElementChild)}}async function ee(G){const se=await i.database.getEmojiByUnicodeOrName(G),ge=[...i.currentEmojis,...i.currentFavorites].find(Ae=>Ae.id===G),je=ge.unicode&&N(ge,i.currentSkinTone);return await i.database.incrementFavoriteEmojiCount(G),{emoji:se,skinTone:i.currentSkinTone,...je&&{unicode:je},...ge.name&&{name:ge.name}}}async function _(G){const se=ee(G);y("emoji-click-sync",se),y("emoji-click",await se)}function O(G){const{target:se}=G;if(!se.classList.contains("emoji"))return;rr(G);const ge=se.id.substring(4);_(ge)}function H(G){i.currentSkinTone=G,i.skinTonePickerExpanded=!1,h("skintone-button"),y("skin-tone-change",{skinTone:G}),i.database.setPreferredSkinTone(G)}function I(G){const{target:{id:se}}=G,ge=se&&se.match(/^skintone-(\d)/);if(!ge)return;rr(G);const je=parseInt(ge[1],10);H(je)}function V(G){i.skinTonePickerExpanded=!i.skinTonePickerExpanded,i.activeSkinTone=i.currentSkinTone,i.skinTonePickerExpanded&&(rr(G),tu(()=>h("skintone-list")))}d(()=>{i.skinTonePickerExpanded?a.skinToneDropdown.addEventListener("transitionend",()=>{i.s Line truncated
987654321098765432`,className:"min-h-[120px] font-mono text-sm"})]}),c.jsx(yi,{result:a.owners}),c.jsx("div",{className:"mt-auto",children:c.jsx(be,{type:"button",variant:"secondary",disabled:o||!e.ownerUserIds.trim(),onClick:l,children:o?"Checking with Discord…":"Verify owner IDs"})})]})}function BP({onContinue:e}){return c.jsx("div",{className:"mx-auto flex w-full max-w-lg flex-1 flex-col justify-center py-8",children:c.jsxs("div",{className:"rounded-2xl border border-border bg-card px-6 py-10 text-center md:px-10",children:[c.jsx("div",{className:"mx-auto mb-6 flex size-16 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:c.jsx(xe,{icon:ku,size:40})}),c.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Setup complete"}),c.jsxs("p",{className:"mx-auto mt-3 max-w-sm text-sm leading-relaxed text-muted-foreground",children:["Your configuration has been saved. Restart the server for changes to take effect — stop the running process, then start it again (for example"," ",c.jsx("code",{className:"rounded-md bg-muted px-1.5 py-0.5 font-mono text-xs",children:"npm start"}),")."]}),c.jsx(Ue,{className:"mt-6 text-left",children:c.jsx(He,{children:"After restarting, sign in with Discord to open the dashboard."})}),c.jsx(be,{type:"button",size:"lg",className:"mt-8 min-w-[220px]",onClick:e,children:"Continue to sign in"})]})})}function $P({currentIndex:e,validating:n,saving:a,onBack:o,onNext:l,onFinish:i}){const d=e===fs.length-1;return c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsxs(be,{type:"button",variant:"ghost",disabled:e===0||a,onClick:o,children:[c.jsx(xe,{icon:b0,size:18,className:"mr-1"}),"Back"]}),c.jsx("div",{className:"flex flex-1 justify-end gap-2",children:d?c.jsx(be,{type:"button",size:"lg",disabled:a||n,onClick:i,className:"min-w-[200px]",children:a?"Saving…":"Finish setup"}):c.jsxs(be,{type:"button",size:"lg",disabled:n||a,onClick:l,children:["Continue",c.jsx(xe,{icon:mh,size:18,className:"ml-1"})]})})]})}function IP(){const e=crypto.randomUUID().replace(/-/g,""),n=crypto.randomUUID().replace(/-/g,"");return e+n}function UP(e){return e.split(/[\s,]+/).map(n=>n.trim()).filter(Boolean)}function Fx(e){return e==="oauth"?"oauth":e==="owners"?"owners":e}function HP(){const e=oo(),{branding:n}=Mu(),{loading:a,error:o,refresh:l,status:i}=yC(),[d,m]=f.useState(0),[h,p]=f.useState({botToken:"",secretKey:"",clientId:"",clientSecret:"",redirectUri:"",ownerUserIds:""}),[y,v]=f.useState({}),[x,S]=f.useState(!1),[j,C]=f.useState(!1),[N,E]=f.useState(""),[k,A]=f.useState(!1),R=fs[d];f.useEffect(()=>{i!=null&&i.suggestedRedirectUri&&!h.redirectUri&&p(Q=>({...Q,redirectUri:i.suggestedRedirectUri}))},[i==null?void 0:i.suggestedRedirectUri,h.redirectUri]);const L=f.useMemo(()=>({botToken:h.botToken,secretKey:h.secretKey,clientId:h.clientId,clientSecret:h.clientSecret,redirectUri:h.redirectUri,ownerUserIds:UP(h.ownerUserIds)}),[h]);async function z(){S(!0),E("");try{const Q=await ke.validateSetup(L);return v(fe=>{var de;return{...fe,...(de=Q.data)==null?void 0:de.results}}),Q.data}catch(Q){return E(Q instanceof Error?Q.message:"Validation failed"),null}finally{S(!1)}}async function B(){var de,ce;const Q=Fx(R.id),fe=await z();return!!((ce=(de=fe==null?void 0:fe.results)==null?void 0:de[Q])!=null&&ce.ok)}async function U(){const Q=Fx(R.id),fe=y[Q];!(fe!=null&&fe.ok)&&!await B()||m(de=>Math.min(de+1,fs.length-1))}async function q(){C(!0),E("");try{const Q=await z();if(!(Q!=null&&Q.ok)){E("Fix the steps marked with errors before finishing.");return}await ke.completeSetup(L),A(!0)}catch(Q){E(Q instanceof Error?Q.message:"Could not save setup")}finally{C(!1)}}function Z(){const Q={values:h,setValues:p,validation:y,validating:x};switch(R.id){case"botToken":return c.jsx(OP,{...Q,onValidate:()=>void B()});case"secretKey":return c.jsx(DP,{...Q,onGenerate:()=>p(fe=>({...fe,secretKey:IP()})),onValidate:()=>void B()});case"oauth":return c.jsx(LP,{...Q,onValidate:()=>void B()});case"redirectUri":return c.jsx(zP,{values:h,setValues:p,validation:y});case"owners":return c.jsx(PP,{...Q,onValidate:()=>void B()})}}return a?c.jsx("div",{className:"min-h-svh bg-background px-4 py-10",children:c.jsxs("div",{className:"mx-auto max-w-6xl space-y-8",children:[c.jsx(Fe,{className:"h-14 w-64"}),c.jsxs("div",{className:"grid gap-8 lg:grid-cols-[280px_1fr]",children:[c.jsx(Fe,{className:"hidden h-80 lg:block"}),c.jsx(Fe,{className:"h-[520px] rounded-2xl"})]})]})}):c.jsxs(AP,{brandingTitle:n.title,faviconUrl:n.faviconUrl,faviconVersion:n.updatedAt,hasFavicon:n.hasFavicon,children:[o?c.jsx(Ue,{variant:"destructive",className:"mb-6",children:c.jsx(He,{children:o})}):null,N?c.jsx(Ue,{variant:"destructive",className:"mb-6",children:c.jsx(He,{children:N})}):null,k?c.jsx(BP,{onContinue:async()=>{await l(),e("/login",{replace:!0})}}):c.jsxs("div",{className:"grid flex-1 gap-8 lg:grid-cols-[minmax(0,280px)_1fr]",children:[c.jsx(_P,{currentIndex:d,validation:y}) Line truncated
@@ -0,0 +1 @@
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Poppins,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 240 10% 4%;--foreground: 0 0% 98%;--card: 240 7% 11%;--card-foreground: 0 0% 98%;--popover: 240 8% 10%;--popover-foreground: 0 0% 98%;--primary: 141 45% 49%;--primary-foreground: 0 0% 100%;--secondary: 240 6% 14%;--secondary-foreground: 0 0% 90%;--muted: 240 6% 14%;--muted-foreground: 240 5%Line truncated
+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SupportBot Dashboard</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap"
rel="stylesheet"
/>
<script type="module" crossorigin src="/assets/index-8vC2EWRW.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CbwuK0wQ.css">
</head>
<body>
<div id="root"></div>␍
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB