@authdog/react-elements 0.0.44 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +6 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +13 -20
- package/package.json +2 -2
- package/src/components/core/navbar.tsx +5 -3
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ui/button.tsx","../src/lib/utils.ts","../src/components/core/client-only.tsx","../src/components/core/navbar.tsx","../src/components/ui/avatar.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/sheet.tsx","../src/components/icons.tsx","../src/components/ui/theme-toggle.tsx","../src/components/core/user-profile.tsx","../src/components/ui/badge.tsx","../src/components/ui/card.tsx","../src/components/ui/input.tsx","../src/components/ui/label.tsx","../src/components/core/user-dropdown.tsx","../src/components/core/placeholder-alert.tsx","../src/components/ui/alert.tsx","../src/components/flow/totp-validator.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { useEffect, useState, type ReactNode } from \"react\";\n\nexport const ClientOnly = ({ children }: { children: ReactNode }) => {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) {\n return null;\n }\n\n return <>{children}</>;\n};\n","\"use client\";\n\nimport type React from \"react\";\nimport { useState } from \"react\";\nimport { User, LogOut, Menu } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"../../components/ui/avatar\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../../components/ui/dropdown-menu\";\nimport { Sheet, SheetContent, SheetTrigger } from \"../../components/ui/sheet\";\nimport { IconWrapper } from \"../icons\";\nimport { ThemeToggle } from \"../ui/theme-toggle\";\n\ninterface NavItem {\n title: string;\n href: string;\n disabled?: boolean;\n}\n\ninterface NavbarProps {\n items?: NavItem[] | undefined;\n children?: React.ReactNode;\n className?: string;\n logoText?: string;\n logoSrc?: string;\n isLoading?: boolean;\n user?: any;\n onNavigateHome?: () => void;\n onNavItemClick?: (href: string) => void;\n onProfileSelected?: () => void;\n onLogout?: () => void;\n // signinUrl?: string;\n identityHost?: string;\n environmentId?: string;\n}\n\nexport function Navbar({\n items = [\n // { title: \"Dashboard\", href: \"/dashboard\" },\n ],\n children,\n className,\n logoText = \"ACME Corp\",\n logoSrc,\n user = {\n name: \"John Doe\",\n email: \"john@example.com\",\n image: \"https://i.pravatar.cc/150?u=a042581f4e29026704d\",\n },\n onNavigateHome = () => console.log(\"Navigating to home\"),\n onNavItemClick = (href: string) => console.log(`Navigating to ${href}`),\n onProfileSelected,\n onLogout = () => console.log(\"Logout clicked\"),\n isLoading = false,\n identityHost = \"https://stg-id.authdog.xyz\",\n environmentId = \"58be35b0-708f-49f6-84f0-6695d307d997\",\n}: NavbarProps) {\n const [open, setOpen] = useState(false);\n const [logoFailed, setLogoFailed] = useState(false);\n const isAuthenticated =\n user !== null &&\n user !== undefined &&\n user.id !== null &&\n user.id !== undefined;\n\n return (\n <header\n className={cn(\n \"sticky top-0 z-40 w-full border-b bg-background/80 backdrop-blur supports-[backdrop-filter]:bg-background/60\",\n className,\n )}\n >\n <div\n className={cn(\n \"flex h-16 items-center justify-between px-4 md:px-6\",\n \"w-full lg:max-w-[80vw] mx-auto\",\n )}\n >\n <div className=\"flex items-center gap-3 md:gap-4\">\n <button\n type=\"button\"\n onClick={onNavigateHome}\n className={cn(\n \"group inline-flex items-center gap-2 md:gap-3 rounded-md px-1 py-1 text-left\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n )}\n aria-label=\"Go to homepage\"\n >\n {logoSrc && !logoFailed && (\n <span className=\"inline-flex h-8 w-8 items-center justify-center overflow-hidden rounded-md bg-muted/80 ring-1 ring-border\">\n <img\n src={logoSrc}\n alt={logoText}\n className=\"h-7 w-7 object-contain\"\n onError={() => setLogoFailed(true)}\n />\n </span>\n )}\n <span className=\"text-base font-semibold tracking-tight md:text-lg group-hover:text-primary\">\n {logoText}\n </span>\n </button>\n {children}\n </div>\n <div className=\"flex flex-1 items-center justify-end gap-6\">\n <nav className=\"hidden md:flex items-center gap-6\">\n {items?.map((item, index) => (\n <span\n key={index}\n onClick={() => {\n if (!item.disabled) {\n onNavItemClick(item.href);\n }\n }}\n className={cn(\n \"text-sm font-medium transition-colors hover:text-primary cursor-pointer\",\n item.disabled && \"cursor-not-allowed opacity-80\",\n )}\n >\n {item.title}\n </span>\n ))}\n </nav>\n <div className=\"flex items-center gap-3\">\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"md:hidden\"\n aria-label=\"Open Menu\"\n >\n <IconWrapper Icon={Menu} />\n </Button>\n </SheetTrigger>\n <SheetContent side=\"left\" className=\"pr-0\">\n <nav className=\"grid gap-2 py-6\">\n {items?.map((item, index) => (\n <a\n key={index}\n href={item.href}\n className={cn(\n \"flex w-full items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent\",\n item.disabled && \"cursor-not-allowed opacity-80\",\n )}\n onClick={() => setOpen(false)}\n >\n {item.title}\n </a>\n ))}\n </nav>\n </SheetContent>\n </Sheet>\n <ThemeToggle />\n {isAuthenticated ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n className=\"relative h-8 w-8 rounded-full\"\n disabled={isLoading}\n >\n <Avatar className=\"h-8 w-8\">\n {isLoading ? (\n <div className=\"h-8 w-8 animate-pulse bg-muted rounded-full\" />\n ) : (\n <>\n <AvatarImage\n src={user.photos?.[0]?.value || \"/placeholder.svg\"}\n alt={user.displayName}\n />\n <AvatarFallback>\n {user.displayName?.charAt(0)}\n </AvatarFallback>\n </>\n )}\n </Avatar>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\" align=\"end\" forceMount>\n {isLoading ? (\n <div className=\"p-4\">\n <div className=\"h-4 w-3/4 animate-pulse bg-muted rounded mb-2\" />\n <div className=\"h-3 w-1/2 animate-pulse bg-muted rounded\" />\n </div>\n ) : (\n <>\n <DropdownMenuLabel className=\"font-normal\">\n <div className=\"flex flex-col space-y-1\">\n <p className=\"text-sm font-medium leading-none\">\n {user.displayName}\n </p>\n <p className=\"text-xs leading-none text-muted-foreground\">\n {user.emails?.[0]?.value}\n </p>\n </div>\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <DropdownMenuItem onClick={onProfileSelected}>\n <IconWrapper Icon={User} />\n <span>Profile</span>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={onLogout}>\n <IconWrapper Icon={LogOut} />\n <span>Log out</span>\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n ) : (\n <Button\n variant=\"default\"\n aria-label=\"Sign in\"\n onClick={() => {\n if (!environmentId) {\n throw new Error(\"Environment ID is required\");\n }\n\n if (!identityHost) {\n throw new Error(\"Identity Host is required\");\n }\n\n const signinUrl = `${identityHost}/signin/${environmentId}`;\n window.open(signinUrl, \"_blank\");\n }}\n >\n Sign in\n </Button>\n )}\n </div>\n </div>\n </div>\n </header>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n \"relative flex size-8 shrink-0 overflow-hidden rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full\", className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"bg-muted flex size-full items-center justify-center rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst ChevronRightIcon = ChevronRight as ComponentType<\n React.SVGProps<SVGSVGElement>\n>;\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nconst DropdownMenuTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Trigger\n ref={ref}\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n));\nDropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Group\n ref={ref}\n data-slot=\"dropdown-menu-group\"\n {...props}\n />\n));\nDropdownMenuGroup.displayName = DropdownMenuPrimitive.Group.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n }\n>(({ className, inset, variant = \"default\", ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.RadioGroup\n ref={ref}\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n));\nDropdownMenuRadioGroup.displayName =\n DropdownMenuPrimitive.RadioGroup.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst XIcon = X as ComponentType<React.SVGProps<SVGSVGElement>>;\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nfunction SheetClose({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nfunction SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n side === \"right\" &&\n \"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n side === \"left\" &&\n \"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n side === \"top\" &&\n \"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b\",\n side === \"bottom\" &&\n \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t\",\n className,\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n {...props}\n />\n );\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\nfunction SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\"text-foreground font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n","import { LucideProps } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\n\nconst iconProps: LucideProps = {\n className: \"mr-2 h-4 w-4\",\n \"aria-hidden\": \"true\",\n};\n\nexport const IconWrapper = ({ Icon }: { Icon: any }) => {\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return (\n <span className=\"inline-flex items-center justify-center\">\n {!isMounted ? (\n <span className=\"mr-2 h-4 w-4\" aria-hidden=\"true\" />\n ) : (\n <Icon {...iconProps} />\n )}\n </span>\n );\n};\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"}\n onClick={toggle}\n >\n {mode === \"dark\" ? <Sun className=\"h-4 w-4\" /> : <Moon className=\"h-4 w-4\" />}\n </Button>\n );\n};\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"../../components/ui/avatar\";\nimport { Button } from \"../../components/ui/button\";\nimport { Badge } from \"../../components/ui/badge\";\nimport {\n Card,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n} from \"../../components/ui/card\";\nimport { Input } from \"../../components/ui/input\";\nimport { Label } from \"../../components/ui/label\";\nimport { User, Shield, SlidersHorizontal, LucideProps } from \"lucide-react\";\n\nexport interface UserProfileProps {\n loading: boolean;\n user: any;\n emails?: { address: string; isPrimary?: boolean }[];\n handleAuthenticated?: () => void;\n onRequestEmailVerification?: (\n email: string,\n ) => Promise<{ success: boolean; message?: string } | void>;\n onVerifyEmail?: (\n email: string,\n code: string,\n ) => Promise<{ success: boolean; message?: string } | void>;\n onAddEmail?: (\n email: string,\n ) => Promise<{ success: boolean; message?: string } | void>;\n}\n\nexport const UserProfile = ({\n loading,\n user,\n handleAuthenticated,\n onRequestEmailVerification,\n onVerifyEmail,\n onAddEmail,\n}: UserProfileProps) => {\n const [isMounted, setIsMounted] = useState(false);\n const [activeTab, setActiveTab] = useState<\n \"profile\" | \"security\" | \"preferences\"\n >(\"profile\");\n const [verifyingEmail, setVerifyingEmail] = useState<string | null>(null);\n const [codeByEmail, setCodeByEmail] = useState<Record<string, string>>({});\n const [addingEmail, setAddingEmail] = useState<boolean>(false);\n const [newEmail, setNewEmail] = useState<string>(\"\");\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n useEffect(() => {\n if (!loading && handleAuthenticated) {\n handleAuthenticated();\n }\n }, [loading, user, handleAuthenticated]);\n\n const iconProps: LucideProps = {\n className: \"mr-2 h-4 w-4\",\n \"aria-hidden\": \"true\",\n };\n\n const renderIcon = (Icon: any) => {\n if (!isMounted) return null;\n return <Icon {...iconProps} />;\n };\n\n if (!isMounted || loading) {\n return <div>Loading...</div>;\n }\n\n if (!user) {\n return <div>No user</div>;\n }\n\n return (\n <div className=\"grid grid-cols-[14rem,1fr] w-full bg-transparent\">\n <div className=\"h-full border-r border-border p-3 md:p-4 bg-transparent flex flex-col min-w-0\">\n <div className=\"mb-3 md:mb-4\">\n <h1 className=\"text-xl font-bold text-foreground\">Account</h1>\n <p className=\"text-sm text-muted-foreground\">\n Manage your account info.\n </p>\n </div>\n\n <nav className=\"space-y-1 flex-1\">\n <button\n onClick={() => setActiveTab(\"profile\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"profile\"\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted/50\"\n }`}\n >\n {renderIcon(User)}\n Profile\n </button>\n\n {/* <button\n onClick={() => setActiveTab(\"security\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"security\"\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted/50\"\n }`}\n >\n {renderIcon(Shield)}\n Security\n </button>\n <button\n onClick={() => setActiveTab(\"preferences\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"preferences\"\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted/50\"\n }`}\n >\n {renderIcon(SlidersHorizontal)}\n Preferences\n </button> */}\n </nav>\n </div>\n\n <div className=\"h-full p-3 md:p-5 min-w-0 bg-transparent\">\n <div className=\"flex justify-between items-center mb-3 md:mb-4\">\n <h2 className=\"text-xl font-semibold text-foreground\">\n {activeTab === \"profile\"\n ? \"Profile details\"\n : activeTab === \"security\"\n ? \"Security settings\"\n : \"Preferences\"}\n </h2>\n {/* <button className=\"text-gray-500 hover:text-gray-700\">\n {renderIcon(X)}\n </button> */}\n </div>\n\n {activeTab === \"profile\" ? (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Profile Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-foreground\">\n Profile\n </h3>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center\">\n <Avatar className=\"h-12 w-12 mr-4 border\">\n <AvatarImage\n src={user.photos?.[0]?.value}\n alt=\"Profile picture\"\n />\n <AvatarFallback>\n {user.displayName\n ?.split(\" \")\n .map((n: string) => n[0])\n .join(\"\")}\n </AvatarFallback>\n </Avatar>\n <span className=\"font-medium text-foreground\">\n {user.displayName}\n </span>\n </div>\n {/* <Button variant=\"outline\" size=\"sm\">\n Edit profile\n </Button> */}\n </div>\n </div>\n\n {/* Email Addresses Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-foreground\">\n Email addresses\n </h3>\n <div className=\"space-y-2.5\">\n {/* {JSON.stringify(user)} */}\n\n {/* {(emails.length > 0 ? emails : [{ address: user.email, isPrimary: true }]).map((email, i) => (\n <div className=\"flex items-center justify-between\" key={email.address}>\n <span>{email.address}</span>\n {email.isPrimary && (\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n )}\n </div>\n ))} */}\n\n {user.emails.map((email: any, idx: number) => {\n const v = (user?.verifications || []).find(\n (ve: any) => ve.email === email.value,\n );\n const isVerified = v?.verified === true;\n const codeInput = codeByEmail[email.value] || \"\";\n return (\n <div\n className=\"flex items-start justify-between gap-2\"\n key={email.value}\n >\n <div className=\"flex flex-col\">\n <span className=\"text-foreground\">{email.value}</span>\n <div className=\"mt-1\">\n {isVerified ? (\n <Badge className=\"text-xs rounded-full px-2.5 py-0.5 bg-green-100 text-green-800 border border-green-300 dark:bg-green-500/20 dark:text-green-200 dark:border-green-400/40\">\n Verified\n </Badge>\n ) : (\n <Badge className=\"text-xs rounded-full px-2.5 py-0.5 bg-amber-100 text-amber-800 border border-amber-300 dark:bg-amber-500/20 dark:text-amber-200 dark:border-amber-400/40\">\n Not verified\n </Badge>\n )}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n {idx === 0 && (\n <Badge\n variant=\"outline\"\n className=\"text-xs bg-muted text-foreground hover:bg-muted\"\n >\n Primary\n </Badge>\n )}\n {!isVerified && (\n <>\n {verifyingEmail === email.value ? (\n <div className=\"flex items-center gap-1\">\n <input\n className=\"h-7 w-24 text-sm rounded-md border border-border bg-background px-2 text-foreground\"\n placeholder=\"Code\"\n value={codeInput}\n onChange={(e) =>\n setCodeByEmail((m) => ({\n ...m,\n [email.value]: e.target.value,\n }))\n }\n />\n <button\n className=\"h-7 rounded-md border border-border px-2 text-xs\"\n onClick={async () => {\n if (!onVerifyEmail) return;\n await onVerifyEmail(email.value, codeInput);\n }}\n >\n Verify\n </button>\n <button\n className=\"h-7 rounded-md border border-border px-2 text-xs\"\n onClick={() => setVerifyingEmail(null)}\n >\n Cancel\n </button>\n </div>\n ) : (\n <>\n <button\n className=\"h-7 rounded-md border border-border px-2 text-xs\"\n onClick={async () => {\n if (onRequestEmailVerification)\n await onRequestEmailVerification(\n email.value,\n );\n setVerifyingEmail(email.value);\n }}\n >\n Send code\n </button>\n </>\n )}\n </>\n )}\n </div>\n </div>\n );\n })}\n <div className=\"mt-2\">\n {addingEmail ? (\n <div className=\"max-w-md\">\n <Card>\n <CardHeader>\n <CardTitle>Add email address</CardTitle>\n <CardDescription>\n You'll need to verify this email address before it\n can be added to your account.\n </CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-email\">Email address</Label>\n <Input\n id=\"new-email\"\n placeholder=\"Enter your email address\"\n value={newEmail}\n onChange={(e) => setNewEmail(e.target.value)}\n onKeyDown={async (e) => {\n if (e.key === \"Enter\") {\n const v = String(newEmail || \"\")\n .trim()\n .toLowerCase();\n if (!v) return;\n if (onAddEmail) await onAddEmail(v);\n setAddingEmail(false);\n setNewEmail(\"\");\n }\n }}\n />\n </div>\n </CardContent>\n <CardFooter className=\"justify-end gap-2\">\n <Button\n variant=\"ghost\"\n onClick={() => {\n setAddingEmail(false);\n setNewEmail(\"\");\n }}\n >\n Cancel\n </Button>\n <Button\n onClick={async () => {\n const v = String(newEmail || \"\")\n .trim()\n .toLowerCase();\n if (!v) return;\n if (onAddEmail) await onAddEmail(v);\n setAddingEmail(false);\n setNewEmail(\"\");\n }}\n >\n Add\n </Button>\n </CardFooter>\n </Card>\n </div>\n ) : (\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"text-xs\"\n onClick={() => setAddingEmail(true)}\n >\n Add email\n </Button>\n )}\n </div>\n </div>\n </div>\n\n {/* Phone Number Section */}\n {/* <div>\n <h3 className=\"text-sm font-medium mb-3\">Phone number</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <span>+1 (555) 123-4567</span>\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n </div>\n <Button variant=\"ghost\" size=\"sm\" className=\"flex items-center text-gray-700\">\n {renderIcon(PlusCircle)}\n Add phone number\n </Button>\n </div>\n </div> */}\n\n {/* Connected Accounts Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">\n Connected accounts\n </h3>\n <div className=\"space-y-2.5\">\n <div\n className=\"flex items-center justify-between\"\n key={user.provider}\n >\n <div className=\"flex items-center\">\n <div className=\"mr-2\">\n <span className=\"text-gray-900 dark:text-gray-100\">\n {user.provider}\n </span>\n </div>\n </div>\n <span className=\"text-sm text-gray-500 dark:text-gray-400\">\n {user?.emails?.[0]?.value}\n </span>\n </div>\n </div>\n </div>\n </div>\n ) : activeTab === \"security\" ? (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Password row */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"text-sm text-gray-700 dark:text-gray-300\">\n Password\n </div>\n <button className=\"text-sm text-indigo-600 hover:underline\">\n Set password\n </button>\n </div>\n </div>\n\n {/* Passkeys row */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"text-sm text-gray-700 dark:text-gray-300\">\n Passkeys\n </div>\n <button className=\"text-sm text-indigo-600 hover:underline\">\n + Add a passkey\n </button>\n </div>\n </div>\n\n {/* Two-step verification row */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"text-sm text-gray-700 dark:text-gray-300\">\n Two-step verification\n </div>\n <button className=\"text-sm text-indigo-600 hover:underline\">\n + Add two-step verification\n </button>\n </div>\n </div>\n\n {/* Active devices list (scaffold) */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"px-4 py-3 border-b text-sm font-medium text-gray-900 dark:text-gray-100\">\n Active devices\n </div>\n <div className=\"p-4 space-y-3\">\n <div className=\"text-sm\">\n <div className=\"flex items-center gap-2\">\n <span className=\"inline-block h-5 w-5 rounded-sm bg-gray-900 dark:bg-white\" />\n <span className=\"font-medium\">X11</span>\n <span className=\"text-xs rounded-md border px-2 py-0.5 text-gray-600 dark:text-gray-300\">\n This device\n </span>\n </div>\n <div className=\"text-gray-600 dark:text-gray-400 mt-1\">\n Firefox 142.0\n </div>\n <div className=\"text-gray-600 dark:text-gray-400\">\n 127.0.0.1 (Local), (Your City)\n </div>\n <div className=\"text-gray-600 dark:text-gray-400\">\n Today at 7:08 PM\n </div>\n </div>\n </div>\n </div>\n\n {/* Delete account */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"text-sm text-gray-700 dark:text-gray-300\">\n Delete account\n </div>\n <button className=\"text-sm text-red-600 hover:underline\">\n Delete account\n </button>\n </div>\n </div>\n </div>\n ) : (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Preferences */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">\n Preferences\n </h3>\n <div className=\"space-y-3 text-sm\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-gray-700 dark:text-gray-300\">\n Locale\n </span>\n <span className=\"text-gray-500 dark:text-gray-400\">Auto</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-gray-700 dark:text-gray-300\">\n Theme\n </span>\n <span className=\"text-gray-500 dark:text-gray-400\">\n System\n </span>\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* <div className=\"absolute bottom-4 text-xs text-gray-500 flex items-center\">\n Secured by\n <span className=\"ml-1 font-medium flex items-center\">\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"mr-1\"\n >\n <path d=\"M8 0L14.9282 4V12L8 16L1.07179 12V4L8 0Z\" fill=\"#6C47FF\" />\n </svg>\n Authdog\n </span>\n </div> */}\n </div>\n );\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n data-slot=\"badge\"\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nexport { Badge, badgeVariants };\n","import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n};\n","import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n \"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n","\"use client\";\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../../components/ui/dropdown-menu\";\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"../../components/ui/avatar\";\nimport { cn } from \"../../lib/utils\";\nimport { LogOut, Settings, ExternalLink } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nexport type UserDropdownLink = {\n label: string;\n href?: string;\n onClick?: () => void;\n icon?: React.ComponentType<any>;\n};\n\nexport interface UserDropdownProps {\n trigger: React.ReactElement;\n user: {\n displayName?: string;\n name?: string;\n email?: string;\n emails?: { value: string }[];\n photos?: { value: string }[];\n avatar?: string;\n };\n className?: string;\n onManageAccount?: () => void;\n onSignout?: () => void;\n links?: UserDropdownLink[];\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n sideOffset?: number;\n modal?: boolean;\n triggerAsChild?: boolean;\n triggerWrapperClassName?: string;\n}\n\nconst getInitials = (name?: string) => {\n if (!name) return \"?\";\n const parts = String(name).trim().split(/\\s+/);\n const initials = parts\n .slice(0, 2)\n .map((p) => p[0]?.toUpperCase())\n .join(\"\");\n return initials || \"?\";\n};\n\nexport const UserDropdown = ({\n trigger,\n user,\n className,\n onManageAccount,\n onSignout,\n links = [],\n side = \"bottom\",\n align = \"end\",\n sideOffset = 8,\n modal = false,\n triggerAsChild = false,\n triggerWrapperClassName,\n}: UserDropdownProps) => {\n const primaryEmail = user?.emails?.[0]?.value || user?.email || \"\";\n const displayName = user?.displayName || user?.name || \"\";\n const avatar = user?.photos?.[0]?.value || user?.avatar || \"\";\n\n const handleLink = (item: UserDropdownLink) => {\n if (item.onClick) return item.onClick();\n if (item.href) {\n if (item.href.startsWith(\"http\")) {\n window.open(item.href, \"_blank\");\n } else {\n window.location.assign(item.href);\n }\n }\n };\n\n const IconExternal = ExternalLink as any;\n const SettingsIcon = Settings as ComponentType<any>;\n const LogOutIcon = LogOut as ComponentType<any>;\n\n return (\n <DropdownMenu modal={modal}>\n {triggerAsChild ? (\n <DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>\n ) : (\n <DropdownMenuTrigger\n className={cn(\n \"inline-flex items-center justify-center bg-transparent p-0 border-0 outline-none focus-visible:outline-none\",\n triggerWrapperClassName,\n )}\n >\n {trigger}\n </DropdownMenuTrigger>\n )}\n <DropdownMenuContent\n align={align}\n side={side}\n sideOffset={sideOffset}\n className={cn(\n \"w-72 p-2 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n className,\n )}\n >\n <div className=\"flex items-center gap-3 px-4 pt-4 pb-3\">\n <Avatar className=\"h-9 w-9 rounded-full\">\n <AvatarImage src={avatar} alt={displayName} />\n <AvatarFallback className=\"rounded-full\">\n {getInitials(displayName)}\n </AvatarFallback>\n </Avatar>\n <div className=\"min-w-0\">\n <div className=\"text-sm font-semibold truncate\">{displayName}</div>\n <div className=\"text-xs text-muted-foreground truncate\">\n {primaryEmail}\n </div>\n </div>\n </div>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n className=\"cursor-pointer py-2\"\n onClick={() => onManageAccount?.()}\n >\n <SettingsIcon className=\"mr-2 h-4 w-4\" />\n <span>Manage account</span>\n </DropdownMenuItem>\n {links.map((item, idx) => {\n const Icon = (item.icon ?? IconExternal) as any;\n return (\n <DropdownMenuItem\n key={`${item.label}-${idx}`}\n className=\"cursor-pointer py-2\"\n onClick={() => handleLink(item)}\n >\n <Icon className=\"mr-2 h-4 w-4\" />\n <span>{item.label}</span>\n </DropdownMenuItem>\n );\n })}\n <DropdownMenuSeparator />\n <DropdownMenuItem\n className=\"cursor-pointer py-2 rounded-md font-semibold text-red-600 dark:text-red-300 hover:bg-red-50 hover:text-red-700 focus:bg-red-50 focus:text-red-700 dark:hover:bg-red-500/20 dark:focus:bg-red-500/25 dark:hover:text-red-100 dark:focus:text-red-100 border border-transparent dark:border-red-500/30 ring-0 focus-visible:ring-2 focus-visible:ring-red-400/40 dark:focus-visible:ring-red-400/40\"\n onClick={() => onSignout?.()}\n >\n <LogOutIcon className=\"mr-2 h-4 w-4 text-red-600 dark:text-red-300\" />\n <span>Sign out</span>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n","import { CheckCircle2Icon } from \"lucide-react\";\nimport { Alert, AlertDescription, AlertTitle } from \"../../components/ui/alert\";\nimport { IconWrapper } from \"../icons\";\n\ninterface PlaceholderAlertProps {\n title?: string;\n description?: string;\n}\n\nexport const PlaceholderAlert = (props: PlaceholderAlertProps) => {\n const title = props.title ?? \"Placeholder Alert\";\n const description = props.description ?? \"This is a placeholder alert.\";\n\n return (\n <div className=\"grid w-full max-w-xl items-start gap-4\">\n <Alert>\n <IconWrapper Icon={CheckCircle2Icon} />\n <AlertTitle>{title}</AlertTitle>\n <AlertDescription>{description}</AlertDescription>\n </Alert>\n </div>\n );\n};\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription };\n","\"use client\";\n\nimport type React from \"react\";\n\nimport { useState, useRef } from \"react\";\nimport { Button } from \"../../components/ui/button\";\nimport { Card, CardContent } from \"../../components/ui/card\";\nimport { Alert, AlertDescription } from \"../../components/ui/alert\";\nimport { Shield, CheckCircle, AlertCircle } from \"lucide-react\";\n\ninterface TOTPValidatorProps {\n onValidate: (code: string) => Promise<void>;\n}\n\nexport const TOTPValidator = ({ onValidate }: TOTPValidatorProps) => {\n const [code, setCode] = useState([\"\", \"\", \"\", \"\", \"\", \"\"]);\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState(\"\");\n const [success, setSuccess] = useState(false);\n const inputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n const handleInputChange = (index: number, value: string) => {\n // Only allow digits\n if (!/^\\d*$/.test(value)) return;\n\n const newCode = [...code];\n newCode[index] = value.slice(-1); // Only take the last character\n\n setCode(newCode);\n setError(\"\");\n setSuccess(false);\n\n // Auto-focus next input\n if (value && index < 5) {\n inputRefs.current[index + 1]?.focus();\n }\n };\n\n const handleKeyDown = (index: number, e: React.KeyboardEvent) => {\n // Handle backspace\n if (e.key === \"Backspace\" && !code[index] && index > 0) {\n inputRefs.current[index - 1]?.focus();\n }\n\n // Handle paste\n if (e.key === \"v\" && (e.ctrlKey || e.metaKey)) {\n e.preventDefault();\n navigator.clipboard.readText().then((text) => {\n const digits = text.replace(/\\D/g, \"\").slice(0, 6).split(\"\");\n const newCode = [...code];\n digits.forEach((digit, i) => {\n if (i < 6) newCode[i] = digit;\n });\n setCode(newCode);\n\n // Focus the next empty input or the last one\n const nextIndex = Math.min(digits.length, 5);\n inputRefs.current[nextIndex]?.focus();\n });\n }\n };\n\n const validateTOTP = async () => {\n const totpCode = code.join(\"\");\n\n if (totpCode.length !== 6) {\n setError(\"Please enter all 6 digits\");\n return;\n }\n\n setLoading(true);\n setError(\"\");\n\n try {\n await onValidate(totpCode);\n setSuccess(true);\n } catch (error) {\n setError(\"Invalid TOTP code. Please try again.\");\n } finally {\n setLoading(false);\n }\n\n // try {\n // Call your TOTP validation endpoint\n // const response = await fetch(\"/api/validate-totp\", {\n // method: \"POST\",\n // headers: {\n // \"Content-Type\": \"application/json\",\n // },\n // body: JSON.stringify({ code: totpCode }),\n // })\n\n // // Check if response is JSON\n // const contentType = response.headers.get(\"content-type\")\n // if (!contentType || !contentType.includes(\"application/json\")) {\n // throw new Error(\"Server returned non-JSON response\")\n // }\n\n // const result = await response.json()\n\n // if (response.ok && result.valid) {\n // setSuccess(true)\n // setError(\"\")\n // } else {\n // setError(result.message || \"Invalid TOTP code. Please try again.\")\n // // Clear the code on error\n // setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n // inputRefs.current[0]?.focus()\n // }\n // } catch (err) {\n // console.error(\"TOTP validation error:\", err)\n // if (err instanceof Error && err.message.includes(\"non-JSON\")) {\n // setError(\"Server error. Please try again later.\")\n // } else {\n // setError(\"Network error. Please try again.\")\n // }\n // // Clear the code on error\n // setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n // inputRefs.current[0]?.focus()\n // } finally {\n // setLoading(false)\n // }\n };\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n validateTOTP();\n };\n\n const clearCode = () => {\n setCode([\"\", \"\", \"\", \"\", \"\", \"\"]);\n setError(\"\");\n setSuccess(false);\n setLoading(false);\n inputRefs.current[0]?.focus();\n };\n\n if (success) {\n return (\n <div className=\"max-w-md mx-auto\">\n <Card className=\"border-green-200 bg-green-50\">\n <CardContent className=\"pt-6\">\n <div className=\"text-center space-y-4\">\n <div className=\"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center\">\n <CheckCircle className=\"w-8 h-8 text-green-600\" />\n </div>\n <div>\n <h3 className=\"text-lg font-semibold text-green-900\">\n Verification Successful!\n </h3>\n <p className=\"text-sm text-green-700 mt-1\">\n Your TOTP code has been validated.\n </p>\n </div>\n <Button\n onClick={clearCode}\n variant=\"outline\"\n className=\"bg-white\"\n >\n Verify Another Code\n </Button>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n }\n\n return (\n <div className=\"max-w-md mx-auto\">\n <Card>\n <CardContent className=\"pt-6\">\n <div className=\"text-center space-y-6\">\n <div>\n <div className=\"mx-auto w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4\">\n <Shield className=\"w-6 h-6 text-blue-600\" />\n </div>\n <h3 className=\"text-lg font-semibold\">Enter Verification Code</h3>\n <p className=\"text-sm text-muted-foreground mt-1\">\n Enter the 6-digit code from your authenticator app\n </p>\n </div>\n\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <div className=\"flex justify-center gap-2\">\n {code.map((digit, index) => (\n <Card\n key={index}\n className=\"w-12 h-14 border-2 focus-within:border-blue-500 transition-colors\"\n >\n <CardContent className=\"p-0 h-full flex items-center justify-center\">\n <input\n ref={(el) => {\n inputRefs.current[index] = el;\n }}\n type=\"tel\"\n inputMode=\"numeric\"\n maxLength={1}\n value={digit}\n onChange={(e) =>\n handleInputChange(index, e.target.value)\n }\n onKeyDown={(e) => handleKeyDown(index, e)}\n className=\"w-full h-full text-center text-2xl font-bold border-none outline-none bg-transparent\"\n autoComplete=\"one-time-code\"\n disabled={loading}\n style={{\n height: \"auto\",\n }}\n />\n </CardContent>\n </Card>\n ))}\n </div>\n\n {error && (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n\n <div className=\"space-y-3\">\n <Button\n type=\"submit\"\n className=\"w-full\"\n disabled={loading || code.some((digit) => digit === \"\")}\n >\n {loading ? \"Verifying...\" : \"Verify Code\"}\n </Button>\n\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={clearCode}\n className=\"w-full text-xs\"\n >\n Clear Code\n </Button>\n </div>\n </form>\n\n <p className=\"text-xs text-muted-foreground\">\n Codes refresh every 30 seconds\n </p>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n};\n"],"mappings":";AAAA,UAAYA,OAAW,QACvB,OAAS,QAAAC,OAAY,uBACrB,OAAS,OAAAC,OAA8B,2BCFvC,OAA0B,QAAAC,OAAY,OACtC,OAAS,WAAAC,OAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,GAAQD,GAAKG,CAAM,CAAC,CAC7B,CDwCM,cAAAC,OAAA,oBAvCN,IAAMC,GAAiBC,GACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,cACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAGtDT,GAFWO,EAAUG,GAAO,SAE3B,CACC,UAAWC,EAAGV,GAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,SErDrB,OAAS,aAAAS,GAAW,YAAAC,OAAgC,QAa3C,mBAAAC,GAAA,OAAAC,OAAA,oBAXF,IAAMC,GAAa,CAAC,CAAE,SAAAC,CAAS,IAA+B,CACnE,GAAM,CAACC,E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,CAAK,EAAIiB,CAC7B,EACA,KAAK,MACL,UAAU,UACV,UAAW,EACX,MAAOV,EACP,SAAWH,GACTL,EAAkBC,EAAOI,EAAE,OAAO,KAAK,EAEzC,UAAYA,GAAMD,EAAcH,EAAOI,CAAC,EACxC,UAAU,uFACV,aAAa,gBACb,SAAUb,EACV,MAAO,CACL,OAAQ,MACV,EACF,EACF,GAvBKS,CAwBP,CACD,EACH,EAECP,GACCR,EAACiC,EAAA,CAAM,QAAQ,cACb,UAAAlC,EAACD,GAAA,CAAY,UAAU,UAAU,EACjCC,EAACmC,EAAA,CAAkB,SAAA1B,EAAM,GAC3B,EAGFR,EAAC,OAAI,UAAU,YACb,UAAAD,EAACgC,EAAA,CACC,KAAK,SACL,UAAU,SACV,SAAUzB,GAAWH,EAAK,KAAMmB,GAAUA,IAAU,EAAE,EAErD,SAAAhB,EAAU,eAAiB,cAC9B,EAEAP,EAACgC,EAAA,CACC,KAAK,SACL,QAAQ,QACR,KAAK,KACL,QAASH,EACT,UAAU,iBACX,sBAED,GACF,GACF,EAEA7B,EAAC,KAAE,UAAU,gCAAgC,0CAE7C,GACF,EACF,EACF,EACF,CAEJ","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn","useEffect","useState","Fragment","jsx","ClientOnly","children","mounted","setMounted","useState","User","LogOut","Menu","AvatarPrimitive","jsx","Avatar","className","props","cn","AvatarImage","AvatarFallback","React","DropdownMenuPrimitive","Check","ChevronRight","Circle","jsx","jsxs","CheckIcon","Check","CircleIcon","Circle","ChevronRightIcon","ChevronRight","DropdownMenu","props","DropdownMenuTrigger","props","ref","jsx","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","jsxs","CheckIcon","DropdownMenuRadioGroup","DropdownMenuRadioItem","CircleIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSubTrigger","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRightIcon","DropdownMenuSubContent","SheetPrimitive","X","jsx","jsxs","XIcon","X","Sheet","props","SheetTrigger","SheetPortal","props","jsx","SheetOverlay","className","cn","SheetContent","children","side","jsxs","XIcon","useEffect","useState","jsx","iconProps","IconWrapper","Icon","isMounted","setIsMounted","useEffect","useState","Sun","Moon","jsx","STORAGE_KEY","getPreferredTheme","stored","applyTheme","mode","ThemeToggle","setMode","useState","useEffect","initial","Button","nextMode","Sun","Moon","Fragment","jsx","jsxs","Navbar","items","children","className","logoText","logoSrc","user","onNavigateHome","onNavItemClick","href","onProfileSelected","onLogout","isLoading","identityHost","environmentId","open","setOpen","useState","logoFailed","setLogoFailed","isAuthenticated","cn","item","index","Sheet","SheetTrigger","Button","IconWrapper","Menu","SheetContent","ThemeToggle","DropdownMenu","DropdownMenuTrigger","Avatar","AvatarImage","AvatarFallback","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuGroup","DropdownMenuItem","User","LogOut","signinUrl","useEffect","useState","Slot","cva","jsx","badgeVariants","cva","Badge","className","variant","asChild","props","Slot","cn","jsx","Card","className","props","cn","CardHeader","CardTitle","CardDescription","CardContent","className","props","jsx","cn","CardFooter","jsx","Input","className","type","props","cn","LabelPrimitive","jsx","Label","className","props","cn","User","Fragment","jsx","jsxs","UserProfile","loading","user","handleAuthenticated","onRequestEmailVerification","onVerifyEmail","onAddEmail","isMounted","setIsMounted","useState","activeTab","setActiveTab","verifyingEmail","setVerifyingEmail","codeByEmail","setCodeByEmail","addingEmail","setAddingEmail","newEmail","setNewEmail","useEffect","iconProps","renderIcon","Icon","Avatar","AvatarImage","AvatarFallback","n","email","idx","isVerified","ve","codeInput","Badge","e","m","Card","CardHeader","CardTitle","CardDescription","CardContent","Label","Input","v","CardFooter","Button","LogOut","Settings","ExternalLink","jsx","jsxs","getInitials","name","p","UserDropdown","trigger","user","className","onManageAccount","onSignout","links","side","align","sideOffset","modal","triggerAsChild","triggerWrapperClassName","primaryEmail","displayName","avatar","handleLink","item","IconExternal","SettingsIcon","LogOutIcon","DropdownMenu","DropdownMenuTrigger","cn","DropdownMenuContent","Avatar","AvatarImage","AvatarFallback","DropdownMenuSeparator","DropdownMenuItem","idx","Icon","CheckCircle2Icon","cva","jsx","alertVariants","cva","Alert","className","variant","props","cn","AlertTitle","AlertDescription","jsx","jsxs","PlaceholderAlert","props","title","description","Alert","IconWrapper","CheckCircle2Icon","AlertTitle","AlertDescription","useState","useRef","Shield","CheckCircle","AlertCircle","jsx","jsxs","TOTPValidator","onValidate","code","setCode","useState","loading","setLoading","error","setError","success","setSuccess","inputRefs","useRef","handleInputChange","index","value","newCode","handleKeyDown","e","text","digits","digit","i","nextIndex","validateTOTP","totpCode","handleSubmit","clearCode","Card","CardContent","Button","el","Alert","AlertDescription"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/button.tsx","../src/lib/utils.ts","../src/components/core/client-only.tsx","../src/components/core/navbar.tsx","../src/components/ui/avatar.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/sheet.tsx","../src/components/icons.tsx","../src/components/ui/theme-toggle.tsx","../src/components/core/user-profile.tsx","../src/components/ui/badge.tsx","../src/components/ui/card.tsx","../src/components/ui/input.tsx","../src/components/ui/label.tsx","../src/components/core/user-dropdown.tsx","../src/components/core/placeholder-alert.tsx","../src/components/ui/alert.tsx","../src/components/flow/totp-validator.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { useEffect, useState, type ReactNode } from \"react\";\n\nexport const ClientOnly = ({ children }: { children: ReactNode }) => {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) {\n return null;\n }\n\n return <>{children}</>;\n};\n","\"use client\";\n\nimport type React from \"react\";\nimport { useState } from \"react\";\nimport { User, LogOut, Menu } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"../../components/ui/avatar\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../../components/ui/dropdown-menu\";\nimport { Sheet, SheetContent, SheetTrigger } from \"../../components/ui/sheet\";\nimport { IconWrapper } from \"../icons\";\nimport { ThemeToggle } from \"../ui/theme-toggle\";\n\ninterface NavItem {\n title: string;\n href: string;\n disabled?: boolean;\n}\n\ninterface NavbarProps {\n items?: NavItem[] | undefined;\n children?: React.ReactNode;\n className?: string;\n logoText?: string;\n logoSrc?: string;\n isLoading?: boolean;\n user?: any;\n onNavigateHome?: () => void;\n onNavItemClick?: (href: string) => void;\n onProfileSelected?: () => void;\n onLogout?: () => void;\n // signinUrl?: string;\n identityHost?: string;\n environmentId?: string;\n}\n\nexport function Navbar({\n items = [\n // { title: \"Dashboard\", href: \"/dashboard\" },\n ],\n children,\n className,\n logoText = \"ACME Corp\",\n logoSrc,\n user = {\n name: \"John Doe\",\n email: \"john@example.com\",\n image: \"https://i.pravatar.cc/150?u=a042581f4e29026704d\",\n },\n onNavigateHome = () => console.log(\"Navigating to home\"),\n onNavItemClick = (href: string) => console.log(`Navigating to ${href}`),\n onProfileSelected,\n onLogout = () => console.log(\"Logout clicked\"),\n isLoading = false,\n identityHost = \"https://stg-id.authdog.xyz\",\n environmentId = \"58be35b0-708f-49f6-84f0-6695d307d997\",\n}: NavbarProps) {\n const [open, setOpen] = useState(false);\n const [logoFailed, setLogoFailed] = useState(false);\n const isAuthenticated =\n user !== null &&\n user !== undefined &&\n user.id !== null &&\n user.id !== undefined;\n\n return (\n <header\n className={cn(\n // Keep the navbar simple and predictable so host apps can style around it.\n // We avoid sticky positioning, backdrop filters, and custom width constraints.\n \"w-full border-b bg-background\",\n className,\n )}\n >\n <div\n className={cn(\n // Basic centered container with horizontal padding.\n \"mx-auto flex h-16 w-full max-w-6xl items-center justify-between px-4 md:px-6\",\n )}\n >\n <div className=\"flex items-center gap-3 md:gap-4\">\n <button\n type=\"button\"\n onClick={onNavigateHome}\n className={cn(\n \"group inline-flex items-center gap-2 md:gap-3 rounded-md px-1 py-1 text-left\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n )}\n aria-label=\"Go to homepage\"\n >\n {logoSrc && !logoFailed && (\n <span className=\"inline-flex h-8 w-8 items-center justify-center overflow-hidden rounded-md bg-muted/80 ring-1 ring-border\">\n <img\n src={logoSrc}\n alt={logoText}\n className=\"h-7 w-7 object-contain\"\n onError={() => setLogoFailed(true)}\n />\n </span>\n )}\n <span className=\"text-base font-semibold tracking-tight md:text-lg group-hover:text-primary\">\n {logoText}\n </span>\n </button>\n {children}\n </div>\n <div className=\"flex flex-1 items-center justify-end gap-6\">\n <nav className=\"hidden md:flex items-center gap-6\">\n {items?.map((item, index) => (\n <span\n key={index}\n onClick={() => {\n if (!item.disabled) {\n onNavItemClick(item.href);\n }\n }}\n className={cn(\n \"text-sm font-medium transition-colors hover:text-primary cursor-pointer\",\n item.disabled && \"cursor-not-allowed opacity-80\",\n )}\n >\n {item.title}\n </span>\n ))}\n </nav>\n <div className=\"flex items-center gap-3\">\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"md:hidden\"\n aria-label=\"Open Menu\"\n >\n <IconWrapper Icon={Menu} />\n </Button>\n </SheetTrigger>\n <SheetContent side=\"left\" className=\"pr-0\">\n <nav className=\"grid gap-2 py-6\">\n {items?.map((item, index) => (\n <a\n key={index}\n href={item.href}\n className={cn(\n \"flex w-full items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent\",\n item.disabled && \"cursor-not-allowed opacity-80\",\n )}\n onClick={() => setOpen(false)}\n >\n {item.title}\n </a>\n ))}\n </nav>\n </SheetContent>\n </Sheet>\n <ThemeToggle />\n {isAuthenticated ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n className=\"relative h-8 w-8 rounded-full\"\n disabled={isLoading}\n >\n <Avatar className=\"h-8 w-8\">\n {isLoading ? (\n <div className=\"h-8 w-8 animate-pulse bg-muted rounded-full\" />\n ) : (\n <>\n <AvatarImage\n src={user.photos?.[0]?.value || \"/placeholder.svg\"}\n alt={user.displayName}\n />\n <AvatarFallback>\n {user.displayName?.charAt(0)}\n </AvatarFallback>\n </>\n )}\n </Avatar>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\" align=\"end\" forceMount>\n {isLoading ? (\n <div className=\"p-4\">\n <div className=\"h-4 w-3/4 animate-pulse bg-muted rounded mb-2\" />\n <div className=\"h-3 w-1/2 animate-pulse bg-muted rounded\" />\n </div>\n ) : (\n <>\n <DropdownMenuLabel className=\"font-normal\">\n <div className=\"flex flex-col space-y-1\">\n <p className=\"text-sm font-medium leading-none\">\n {user.displayName}\n </p>\n <p className=\"text-xs leading-none text-muted-foreground\">\n {user.emails?.[0]?.value}\n </p>\n </div>\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <DropdownMenuItem onClick={onProfileSelected}>\n <IconWrapper Icon={User} />\n <span>Profile</span>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={onLogout}>\n <IconWrapper Icon={LogOut} />\n <span>Log out</span>\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n ) : (\n <Button\n variant=\"default\"\n aria-label=\"Sign in\"\n onClick={() => {\n if (!environmentId) {\n throw new Error(\"Environment ID is required\");\n }\n\n if (!identityHost) {\n throw new Error(\"Identity Host is required\");\n }\n\n const signinUrl = `${identityHost}/signin/${environmentId}`;\n window.open(signinUrl, \"_blank\");\n }}\n >\n Sign in\n </Button>\n )}\n </div>\n </div>\n </div>\n </header>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n \"relative flex size-8 shrink-0 overflow-hidden rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full\", className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"bg-muted flex size-full items-center justify-center rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst ChevronRightIcon = ChevronRight as ComponentType<\n React.SVGProps<SVGSVGElement>\n>;\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nconst DropdownMenuTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Trigger\n ref={ref}\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n));\nDropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Group\n ref={ref}\n data-slot=\"dropdown-menu-group\"\n {...props}\n />\n));\nDropdownMenuGroup.displayName = DropdownMenuPrimitive.Group.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n }\n>(({ className, inset, variant = \"default\", ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.RadioGroup\n ref={ref}\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n));\nDropdownMenuRadioGroup.displayName =\n DropdownMenuPrimitive.RadioGroup.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst XIcon = X as ComponentType<React.SVGProps<SVGSVGElement>>;\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nfunction SheetClose({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nfunction SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n side === \"right\" &&\n \"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n side === \"left\" &&\n \"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n side === \"top\" &&\n \"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b\",\n side === \"bottom\" &&\n \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t\",\n className,\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n {...props}\n />\n );\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\nfunction SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\"text-foreground font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n","import { LucideProps } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\n\nconst iconProps: LucideProps = {\n className: \"mr-2 h-4 w-4\",\n \"aria-hidden\": \"true\",\n};\n\nexport const IconWrapper = ({ Icon }: { Icon: any }) => {\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return (\n <span className=\"inline-flex items-center justify-center\">\n {!isMounted ? (\n <span className=\"mr-2 h-4 w-4\" aria-hidden=\"true\" />\n ) : (\n <Icon {...iconProps} />\n )}\n </span>\n );\n};\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"}\n onClick={toggle}\n >\n {mode === \"dark\" ? <Sun className=\"h-4 w-4\" /> : <Moon className=\"h-4 w-4\" />}\n </Button>\n );\n};\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"../../components/ui/avatar\";\nimport { Button } from \"../../components/ui/button\";\nimport { Badge } from \"../../components/ui/badge\";\nimport {\n Card,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n} from \"../../components/ui/card\";\nimport { Input } from \"../../components/ui/input\";\nimport { Label } from \"../../components/ui/label\";\nimport { User, Shield, SlidersHorizontal, LucideProps } from \"lucide-react\";\n\nexport interface UserProfileProps {\n loading: boolean;\n user: any;\n emails?: { address: string; isPrimary?: boolean }[];\n handleAuthenticated?: () => void;\n onRequestEmailVerification?: (\n email: string,\n ) => Promise<{ success: boolean; message?: string } | void>;\n onVerifyEmail?: (\n email: string,\n code: string,\n ) => Promise<{ success: boolean; message?: string } | void>;\n onAddEmail?: (\n email: string,\n ) => Promise<{ success: boolean; message?: string } | void>;\n}\n\nexport const UserProfile = ({\n loading,\n user,\n handleAuthenticated,\n onRequestEmailVerification,\n onVerifyEmail,\n onAddEmail,\n}: UserProfileProps) => {\n const [isMounted, setIsMounted] = useState(false);\n const [activeTab, setActiveTab] = useState<\n \"profile\" | \"security\" | \"preferences\"\n >(\"profile\");\n const [verifyingEmail, setVerifyingEmail] = useState<string | null>(null);\n const [codeByEmail, setCodeByEmail] = useState<Record<string, string>>({});\n const [addingEmail, setAddingEmail] = useState<boolean>(false);\n const [newEmail, setNewEmail] = useState<string>(\"\");\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n useEffect(() => {\n if (!loading && handleAuthenticated) {\n handleAuthenticated();\n }\n }, [loading, user, handleAuthenticated]);\n\n const iconProps: LucideProps = {\n className: \"mr-2 h-4 w-4\",\n \"aria-hidden\": \"true\",\n };\n\n const renderIcon = (Icon: any) => {\n if (!isMounted) return null;\n return <Icon {...iconProps} />;\n };\n\n if (!isMounted || loading) {\n return <div>Loading...</div>;\n }\n\n if (!user) {\n return <div>No user</div>;\n }\n\n return (\n <div className=\"grid grid-cols-[14rem,1fr] w-full bg-transparent\">\n <div className=\"h-full border-r border-border p-3 md:p-4 bg-transparent flex flex-col min-w-0\">\n <div className=\"mb-3 md:mb-4\">\n <h1 className=\"text-xl font-bold text-foreground\">Account</h1>\n <p className=\"text-sm text-muted-foreground\">\n Manage your account info.\n </p>\n </div>\n\n <nav className=\"space-y-1 flex-1\">\n <button\n onClick={() => setActiveTab(\"profile\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"profile\"\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted/50\"\n }`}\n >\n {renderIcon(User)}\n Profile\n </button>\n\n {/* <button\n onClick={() => setActiveTab(\"security\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"security\"\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted/50\"\n }`}\n >\n {renderIcon(Shield)}\n Security\n </button>\n <button\n onClick={() => setActiveTab(\"preferences\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"preferences\"\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted/50\"\n }`}\n >\n {renderIcon(SlidersHorizontal)}\n Preferences\n </button> */}\n </nav>\n </div>\n\n <div className=\"h-full p-3 md:p-5 min-w-0 bg-transparent\">\n <div className=\"flex justify-between items-center mb-3 md:mb-4\">\n <h2 className=\"text-xl font-semibold text-foreground\">\n {activeTab === \"profile\"\n ? \"Profile details\"\n : activeTab === \"security\"\n ? \"Security settings\"\n : \"Preferences\"}\n </h2>\n {/* <button className=\"text-gray-500 hover:text-gray-700\">\n {renderIcon(X)}\n </button> */}\n </div>\n\n {activeTab === \"profile\" ? (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Profile Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-foreground\">\n Profile\n </h3>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center\">\n <Avatar className=\"h-12 w-12 mr-4 border\">\n <AvatarImage\n src={user.photos?.[0]?.value}\n alt=\"Profile picture\"\n />\n <AvatarFallback>\n {user.displayName\n ?.split(\" \")\n .map((n: string) => n[0])\n .join(\"\")}\n </AvatarFallback>\n </Avatar>\n <span className=\"font-medium text-foreground\">\n {user.displayName}\n </span>\n </div>\n {/* <Button variant=\"outline\" size=\"sm\">\n Edit profile\n </Button> */}\n </div>\n </div>\n\n {/* Email Addresses Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-foreground\">\n Email addresses\n </h3>\n <div className=\"space-y-2.5\">\n {/* {JSON.stringify(user)} */}\n\n {/* {(emails.length > 0 ? emails : [{ address: user.email, isPrimary: true }]).map((email, i) => (\n <div className=\"flex items-center justify-between\" key={email.address}>\n <span>{email.address}</span>\n {email.isPrimary && (\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n )}\n </div>\n ))} */}\n\n {user.emails.map((email: any, idx: number) => {\n const v = (user?.verifications || []).find(\n (ve: any) => ve.email === email.value,\n );\n const isVerified = v?.verified === true;\n const codeInput = codeByEmail[email.value] || \"\";\n return (\n <div\n className=\"flex items-start justify-between gap-2\"\n key={email.value}\n >\n <div className=\"flex flex-col\">\n <span className=\"text-foreground\">{email.value}</span>\n <div className=\"mt-1\">\n {isVerified ? (\n <Badge className=\"text-xs rounded-full px-2.5 py-0.5 bg-green-100 text-green-800 border border-green-300 dark:bg-green-500/20 dark:text-green-200 dark:border-green-400/40\">\n Verified\n </Badge>\n ) : (\n <Badge className=\"text-xs rounded-full px-2.5 py-0.5 bg-amber-100 text-amber-800 border border-amber-300 dark:bg-amber-500/20 dark:text-amber-200 dark:border-amber-400/40\">\n Not verified\n </Badge>\n )}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n {idx === 0 && (\n <Badge\n variant=\"outline\"\n className=\"text-xs bg-muted text-foreground hover:bg-muted\"\n >\n Primary\n </Badge>\n )}\n {!isVerified && (\n <>\n {verifyingEmail === email.value ? (\n <div className=\"flex items-center gap-1\">\n <input\n className=\"h-7 w-24 text-sm rounded-md border border-border bg-background px-2 text-foreground\"\n placeholder=\"Code\"\n value={codeInput}\n onChange={(e) =>\n setCodeByEmail((m) => ({\n ...m,\n [email.value]: e.target.value,\n }))\n }\n />\n <button\n className=\"h-7 rounded-md border border-border px-2 text-xs\"\n onClick={async () => {\n if (!onVerifyEmail) return;\n await onVerifyEmail(email.value, codeInput);\n }}\n >\n Verify\n </button>\n <button\n className=\"h-7 rounded-md border border-border px-2 text-xs\"\n onClick={() => setVerifyingEmail(null)}\n >\n Cancel\n </button>\n </div>\n ) : (\n <>\n <button\n className=\"h-7 rounded-md border border-border px-2 text-xs\"\n onClick={async () => {\n if (onRequestEmailVerification)\n await onRequestEmailVerification(\n email.value,\n );\n setVerifyingEmail(email.value);\n }}\n >\n Send code\n </button>\n </>\n )}\n </>\n )}\n </div>\n </div>\n );\n })}\n <div className=\"mt-2\">\n {addingEmail ? (\n <div className=\"max-w-md\">\n <Card>\n <CardHeader>\n <CardTitle>Add email address</CardTitle>\n <CardDescription>\n You'll need to verify this email address before it\n can be added to your account.\n </CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-email\">Email address</Label>\n <Input\n id=\"new-email\"\n placeholder=\"Enter your email address\"\n value={newEmail}\n onChange={(e) => setNewEmail(e.target.value)}\n onKeyDown={async (e) => {\n if (e.key === \"Enter\") {\n const v = String(newEmail || \"\")\n .trim()\n .toLowerCase();\n if (!v) return;\n if (onAddEmail) await onAddEmail(v);\n setAddingEmail(false);\n setNewEmail(\"\");\n }\n }}\n />\n </div>\n </CardContent>\n <CardFooter className=\"justify-end gap-2\">\n <Button\n variant=\"ghost\"\n onClick={() => {\n setAddingEmail(false);\n setNewEmail(\"\");\n }}\n >\n Cancel\n </Button>\n <Button\n onClick={async () => {\n const v = String(newEmail || \"\")\n .trim()\n .toLowerCase();\n if (!v) return;\n if (onAddEmail) await onAddEmail(v);\n setAddingEmail(false);\n setNewEmail(\"\");\n }}\n >\n Add\n </Button>\n </CardFooter>\n </Card>\n </div>\n ) : (\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"text-xs\"\n onClick={() => setAddingEmail(true)}\n >\n Add email\n </Button>\n )}\n </div>\n </div>\n </div>\n\n {/* Phone Number Section */}\n {/* <div>\n <h3 className=\"text-sm font-medium mb-3\">Phone number</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <span>+1 (555) 123-4567</span>\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n </div>\n <Button variant=\"ghost\" size=\"sm\" className=\"flex items-center text-gray-700\">\n {renderIcon(PlusCircle)}\n Add phone number\n </Button>\n </div>\n </div> */}\n\n {/* Connected Accounts Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">\n Connected accounts\n </h3>\n <div className=\"space-y-2.5\">\n <div\n className=\"flex items-center justify-between\"\n key={user.provider}\n >\n <div className=\"flex items-center\">\n <div className=\"mr-2\">\n <span className=\"text-gray-900 dark:text-gray-100\">\n {user.provider}\n </span>\n </div>\n </div>\n <span className=\"text-sm text-gray-500 dark:text-gray-400\">\n {user?.emails?.[0]?.value}\n </span>\n </div>\n </div>\n </div>\n </div>\n ) : activeTab === \"security\" ? (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Password row */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"text-sm text-gray-700 dark:text-gray-300\">\n Password\n </div>\n <button className=\"text-sm text-indigo-600 hover:underline\">\n Set password\n </button>\n </div>\n </div>\n\n {/* Passkeys row */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"text-sm text-gray-700 dark:text-gray-300\">\n Passkeys\n </div>\n <button className=\"text-sm text-indigo-600 hover:underline\">\n + Add a passkey\n </button>\n </div>\n </div>\n\n {/* Two-step verification row */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"text-sm text-gray-700 dark:text-gray-300\">\n Two-step verification\n </div>\n <button className=\"text-sm text-indigo-600 hover:underline\">\n + Add two-step verification\n </button>\n </div>\n </div>\n\n {/* Active devices list (scaffold) */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"px-4 py-3 border-b text-sm font-medium text-gray-900 dark:text-gray-100\">\n Active devices\n </div>\n <div className=\"p-4 space-y-3\">\n <div className=\"text-sm\">\n <div className=\"flex items-center gap-2\">\n <span className=\"inline-block h-5 w-5 rounded-sm bg-gray-900 dark:bg-white\" />\n <span className=\"font-medium\">X11</span>\n <span className=\"text-xs rounded-md border px-2 py-0.5 text-gray-600 dark:text-gray-300\">\n This device\n </span>\n </div>\n <div className=\"text-gray-600 dark:text-gray-400 mt-1\">\n Firefox 142.0\n </div>\n <div className=\"text-gray-600 dark:text-gray-400\">\n 127.0.0.1 (Local), (Your City)\n </div>\n <div className=\"text-gray-600 dark:text-gray-400\">\n Today at 7:08 PM\n </div>\n </div>\n </div>\n </div>\n\n {/* Delete account */}\n <div className=\"border rounded-md overflow-hidden\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"text-sm text-gray-700 dark:text-gray-300\">\n Delete account\n </div>\n <button className=\"text-sm text-red-600 hover:underline\">\n Delete account\n </button>\n </div>\n </div>\n </div>\n ) : (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Preferences */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">\n Preferences\n </h3>\n <div className=\"space-y-3 text-sm\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-gray-700 dark:text-gray-300\">\n Locale\n </span>\n <span className=\"text-gray-500 dark:text-gray-400\">Auto</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-gray-700 dark:text-gray-300\">\n Theme\n </span>\n <span className=\"text-gray-500 dark:text-gray-400\">\n System\n </span>\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* <div className=\"absolute bottom-4 text-xs text-gray-500 flex items-center\">\n Secured by\n <span className=\"ml-1 font-medium flex items-center\">\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"mr-1\"\n >\n <path d=\"M8 0L14.9282 4V12L8 16L1.07179 12V4L8 0Z\" fill=\"#6C47FF\" />\n </svg>\n Authdog\n </span>\n </div> */}\n </div>\n );\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n data-slot=\"badge\"\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nexport { Badge, badgeVariants };\n","import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n};\n","import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n \"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n","\"use client\";\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../../components/ui/dropdown-menu\";\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"../../components/ui/avatar\";\nimport { cn } from \"../../lib/utils\";\nimport { LogOut, Settings, ExternalLink } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nexport type UserDropdownLink = {\n label: string;\n href?: string;\n onClick?: () => void;\n icon?: React.ComponentType<any>;\n};\n\nexport interface UserDropdownProps {\n trigger: React.ReactElement;\n user: {\n displayName?: string;\n name?: string;\n email?: string;\n emails?: { value: string }[];\n photos?: { value: string }[];\n avatar?: string;\n };\n className?: string;\n onManageAccount?: () => void;\n onSignout?: () => void;\n links?: UserDropdownLink[];\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n sideOffset?: number;\n modal?: boolean;\n triggerAsChild?: boolean;\n triggerWrapperClassName?: string;\n}\n\nconst getInitials = (name?: string) => {\n if (!name) return \"?\";\n const parts = String(name).trim().split(/\\s+/);\n const initials = parts\n .slice(0, 2)\n .map((p) => p[0]?.toUpperCase())\n .join(\"\");\n return initials || \"?\";\n};\n\nexport const UserDropdown = ({\n trigger,\n user,\n className,\n onManageAccount,\n onSignout,\n links = [],\n side = \"bottom\",\n align = \"end\",\n sideOffset = 8,\n modal = false,\n triggerAsChild = false,\n triggerWrapperClassName,\n}: UserDropdownProps) => {\n const primaryEmail = user?.emails?.[0]?.value || user?.email || \"\";\n const displayName = user?.displayName || user?.name || \"\";\n const avatar = user?.photos?.[0]?.value || user?.avatar || \"\";\n\n const handleLink = (item: UserDropdownLink) => {\n if (item.onClick) return item.onClick();\n if (item.href) {\n if (item.href.startsWith(\"http\")) {\n window.open(item.href, \"_blank\");\n } else {\n window.location.assign(item.href);\n }\n }\n };\n\n const IconExternal = ExternalLink as any;\n const SettingsIcon = Settings as ComponentType<any>;\n const LogOutIcon = LogOut as ComponentType<any>;\n\n return (\n <DropdownMenu modal={modal}>\n {triggerAsChild ? (\n <DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>\n ) : (\n <DropdownMenuTrigger\n className={cn(\n \"inline-flex items-center justify-center bg-transparent p-0 border-0 outline-none focus-visible:outline-none\",\n triggerWrapperClassName,\n )}\n >\n {trigger}\n </DropdownMenuTrigger>\n )}\n <DropdownMenuContent\n align={align}\n side={side}\n sideOffset={sideOffset}\n className={cn(\n \"w-72 p-2 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n className,\n )}\n >\n <div className=\"flex items-center gap-3 px-4 pt-4 pb-3\">\n <Avatar className=\"h-9 w-9 rounded-full\">\n <AvatarImage src={avatar} alt={displayName} />\n <AvatarFallback className=\"rounded-full\">\n {getInitials(displayName)}\n </AvatarFallback>\n </Avatar>\n <div className=\"min-w-0\">\n <div className=\"text-sm font-semibold truncate\">{displayName}</div>\n <div className=\"text-xs text-muted-foreground truncate\">\n {primaryEmail}\n </div>\n </div>\n </div>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n className=\"cursor-pointer py-2\"\n onClick={() => onManageAccount?.()}\n >\n <SettingsIcon className=\"mr-2 h-4 w-4\" />\n <span>Manage account</span>\n </DropdownMenuItem>\n {links.map((item, idx) => {\n const Icon = (item.icon ?? IconExternal) as any;\n return (\n <DropdownMenuItem\n key={`${item.label}-${idx}`}\n className=\"cursor-pointer py-2\"\n onClick={() => handleLink(item)}\n >\n <Icon className=\"mr-2 h-4 w-4\" />\n <span>{item.label}</span>\n </DropdownMenuItem>\n );\n })}\n <DropdownMenuSeparator />\n <DropdownMenuItem\n className=\"cursor-pointer py-2 rounded-md font-semibold text-red-600 dark:text-red-300 hover:bg-red-50 hover:text-red-700 focus:bg-red-50 focus:text-red-700 dark:hover:bg-red-500/20 dark:focus:bg-red-500/25 dark:hover:text-red-100 dark:focus:text-red-100 border border-transparent dark:border-red-500/30 ring-0 focus-visible:ring-2 focus-visible:ring-red-400/40 dark:focus-visible:ring-red-400/40\"\n onClick={() => onSignout?.()}\n >\n <LogOutIcon className=\"mr-2 h-4 w-4 text-red-600 dark:text-red-300\" />\n <span>Sign out</span>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n","import { CheckCircle2Icon } from \"lucide-react\";\nimport { Alert, AlertDescription, AlertTitle } from \"../../components/ui/alert\";\nimport { IconWrapper } from \"../icons\";\n\ninterface PlaceholderAlertProps {\n title?: string;\n description?: string;\n}\n\nexport const PlaceholderAlert = (props: PlaceholderAlertProps) => {\n const title = props.title ?? \"Placeholder Alert\";\n const description = props.description ?? \"This is a placeholder alert.\";\n\n return (\n <div className=\"grid w-full max-w-xl items-start gap-4\">\n <Alert>\n <IconWrapper Icon={CheckCircle2Icon} />\n <AlertTitle>{title}</AlertTitle>\n <AlertDescription>{description}</AlertDescription>\n </Alert>\n </div>\n );\n};\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription };\n","\"use client\";\n\nimport type React from \"react\";\n\nimport { useState, useRef } from \"react\";\nimport { Button } from \"../../components/ui/button\";\nimport { Card, CardContent } from \"../../components/ui/card\";\nimport { Alert, AlertDescription } from \"../../components/ui/alert\";\nimport { Shield, CheckCircle, AlertCircle } from \"lucide-react\";\n\ninterface TOTPValidatorProps {\n onValidate: (code: string) => Promise<void>;\n}\n\nexport const TOTPValidator = ({ onValidate }: TOTPValidatorProps) => {\n const [code, setCode] = useState([\"\", \"\", \"\", \"\", \"\", \"\"]);\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState(\"\");\n const [success, setSuccess] = useState(false);\n const inputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n const handleInputChange = (index: number, value: string) => {\n // Only allow digits\n if (!/^\\d*$/.test(value)) return;\n\n const newCode = [...code];\n newCode[index] = value.slice(-1); // Only take the last character\n\n setCode(newCode);\n setError(\"\");\n setSuccess(false);\n\n // Auto-focus next input\n if (value && index < 5) {\n inputRefs.current[index + 1]?.focus();\n }\n };\n\n const handleKeyDown = (index: number, e: React.KeyboardEvent) => {\n // Handle backspace\n if (e.key === \"Backspace\" && !code[index] && index > 0) {\n inputRefs.current[index - 1]?.focus();\n }\n\n // Handle paste\n if (e.key === \"v\" && (e.ctrlKey || e.metaKey)) {\n e.preventDefault();\n navigator.clipboard.readText().then((text) => {\n const digits = text.replace(/\\D/g, \"\").slice(0, 6).split(\"\");\n const newCode = [...code];\n digits.forEach((digit, i) => {\n if (i < 6) newCode[i] = digit;\n });\n setCode(newCode);\n\n // Focus the next empty input or the last one\n const nextIndex = Math.min(digits.length, 5);\n inputRefs.current[nextIndex]?.focus();\n });\n }\n };\n\n const validateTOTP = async () => {\n const totpCode = code.join(\"\");\n\n if (totpCode.length !== 6) {\n setError(\"Please enter all 6 digits\");\n return;\n }\n\n setLoading(true);\n setError(\"\");\n\n try {\n await onValidate(totpCode);\n setSuccess(true);\n } catch (error) {\n setError(\"Invalid TOTP code. Please try again.\");\n } finally {\n setLoading(false);\n }\n\n // try {\n // Call your TOTP validation endpoint\n // const response = await fetch(\"/api/validate-totp\", {\n // method: \"POST\",\n // headers: {\n // \"Content-Type\": \"application/json\",\n // },\n // body: JSON.stringify({ code: totpCode }),\n // })\n\n // // Check if response is JSON\n // const contentType = response.headers.get(\"content-type\")\n // if (!contentType || !contentType.includes(\"application/json\")) {\n // throw new Error(\"Server returned non-JSON response\")\n // }\n\n // const result = await response.json()\n\n // if (response.ok && result.valid) {\n // setSuccess(true)\n // setError(\"\")\n // } else {\n // setError(result.message || \"Invalid TOTP code. Please try again.\")\n // // Clear the code on error\n // setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n // inputRefs.current[0]?.focus()\n // }\n // } catch (err) {\n // console.error(\"TOTP validation error:\", err)\n // if (err instanceof Error && err.message.includes(\"non-JSON\")) {\n // setError(\"Server error. Please try again later.\")\n // } else {\n // setError(\"Network error. Please try again.\")\n // }\n // // Clear the code on error\n // setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n // inputRefs.current[0]?.focus()\n // } finally {\n // setLoading(false)\n // }\n };\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n validateTOTP();\n };\n\n const clearCode = () => {\n setCode([\"\", \"\", \"\", \"\", \"\", \"\"]);\n setError(\"\");\n setSuccess(false);\n setLoading(false);\n inputRefs.current[0]?.focus();\n };\n\n if (success) {\n return (\n <div className=\"max-w-md mx-auto\">\n <Card className=\"border-green-200 bg-green-50\">\n <CardContent className=\"pt-6\">\n <div className=\"text-center space-y-4\">\n <div className=\"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center\">\n <CheckCircle className=\"w-8 h-8 text-green-600\" />\n </div>\n <div>\n <h3 className=\"text-lg font-semibold text-green-900\">\n Verification Successful!\n </h3>\n <p className=\"text-sm text-green-700 mt-1\">\n Your TOTP code has been validated.\n </p>\n </div>\n <Button\n onClick={clearCode}\n variant=\"outline\"\n className=\"bg-white\"\n >\n Verify Another Code\n </Button>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n }\n\n return (\n <div className=\"max-w-md mx-auto\">\n <Card>\n <CardContent className=\"pt-6\">\n <div className=\"text-center space-y-6\">\n <div>\n <div className=\"mx-auto w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4\">\n <Shield className=\"w-6 h-6 text-blue-600\" />\n </div>\n <h3 className=\"text-lg font-semibold\">Enter Verification Code</h3>\n <p className=\"text-sm text-muted-foreground mt-1\">\n Enter the 6-digit code from your authenticator app\n </p>\n </div>\n\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <div className=\"flex justify-center gap-2\">\n {code.map((digit, index) => (\n <Card\n key={index}\n className=\"w-12 h-14 border-2 focus-within:border-blue-500 transition-colors\"\n >\n <CardContent className=\"p-0 h-full flex items-center justify-center\">\n <input\n ref={(el) => {\n inputRefs.current[index] = el;\n }}\n type=\"tel\"\n inputMode=\"numeric\"\n maxLength={1}\n value={digit}\n onChange={(e) =>\n handleInputChange(index, e.target.value)\n }\n onKeyDown={(e) => handleKeyDown(index, e)}\n className=\"w-full h-full text-center text-2xl font-bold border-none outline-none bg-transparent\"\n autoComplete=\"one-time-code\"\n disabled={loading}\n style={{\n height: \"auto\",\n }}\n />\n </CardContent>\n </Card>\n ))}\n </div>\n\n {error && (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n\n <div className=\"space-y-3\">\n <Button\n type=\"submit\"\n className=\"w-full\"\n disabled={loading || code.some((digit) => digit === \"\")}\n >\n {loading ? \"Verifying...\" : \"Verify Code\"}\n </Button>\n\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={clearCode}\n className=\"w-full text-xs\"\n >\n Clear Code\n </Button>\n </div>\n </form>\n\n <p className=\"text-xs text-muted-foreground\">\n Codes refresh every 30 seconds\n </p>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n};\n"],"mappings":";AAAA,UAAYA,OAAW,QACvB,OAAS,QAAAC,OAAY,uBACrB,OAAS,OAAAC,OAA8B,2BCFvC,OAA0B,QAAAC,OAAY,OACtC,OAAS,WAAAC,OAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,GAAQD,GAAKG,CAAM,CAAC,CAC7B,CDwCM,cAAAC,OAAA,oBAvCN,IAAMC,GAAiBC,GACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,cACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAGtDT,GAFWO,EAAUG,GAAO,SAE3B,CACC,UAAWC,EAAGV,GAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,E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B,EAAC,OAAI,UAAU,4BACZ,SAAAI,EAAK,IAAI,CAACmB,EAAOP,IAChBhB,EAAC8B,EAAA,CAEC,UAAU,oEAEV,SAAA9B,EAAC+B,EAAA,CAAY,UAAU,8CACrB,SAAA/B,EAAC,SACC,IAAMiC,GAAO,CACXpB,EAAU,QAAQG,CAAK,EAAIiB,CAC7B,EACA,KAAK,MACL,UAAU,UACV,UAAW,EACX,MAAOV,EACP,SAAWH,GACTL,EAAkBC,EAAOI,EAAE,OAAO,KAAK,EAEzC,UAAYA,GAAMD,EAAcH,EAAOI,CAAC,EACxC,UAAU,uFACV,aAAa,gBACb,SAAUb,EACV,MAAO,CACL,OAAQ,MACV,EACF,EACF,GAvBKS,CAwBP,CACD,EACH,EAECP,GACCR,EAACiC,EAAA,CAAM,QAAQ,cACb,UAAAlC,EAACD,GAAA,CAAY,UAAU,UAAU,EACjCC,EAACmC,EAAA,CAAkB,SAAA1B,EAAM,GAC3B,EAGFR,EAAC,OAAI,UAAU,YACb,UAAAD,EAACgC,EAAA,CACC,KAAK,SACL,UAAU,SACV,SAAUzB,GAAWH,EAAK,KAAMmB,GAAUA,IAAU,EAAE,EAErD,SAAAhB,EAAU,eAAiB,cAC9B,EAEAP,EAACgC,EAAA,CACC,KAAK,SACL,QAAQ,QACR,KAAK,KACL,QAASH,EACT,UAAU,iBACX,sBAED,GACF,GACF,EAEA7B,EAAC,KAAE,UAAU,gCAAgC,0CAE7C,GACF,EACF,EACF,EACF,CAEJ","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn","useEffect","useState","Fragment","jsx","ClientOnly","children","mounted","setMounted","useState","User","LogOut","Menu","AvatarPrimitive","jsx","Avatar","className","props","cn","AvatarImage","AvatarFallback","React","DropdownMenuPrimitive","Check","ChevronRight","Circle","jsx","jsxs","CheckIcon","Check","CircleIcon","Circle","ChevronRightIcon","ChevronRight","DropdownMenu","props","DropdownMenuTrigger","props","ref","jsx","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","jsxs","CheckIcon","DropdownMenuRadioGroup","DropdownMenuRadioItem","CircleIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSubTrigger","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRightIcon","DropdownMenuSubContent","SheetPrimitive","X","jsx","jsxs","XIcon","X","Sheet","props","SheetTrigger","SheetPortal","props","jsx","SheetOverlay","className","cn","SheetContent","children","side","jsxs","XIcon","useEffect","useState","jsx","iconProps","IconWrapper","Icon","isMounted","setIsMounted","useEffect","useState","Sun","Moon","jsx","STORAGE_KEY","getPreferredTheme","stored","applyTheme","mode","ThemeToggle","setMode","useState","useEffect","initial","Button","nextMode","Sun","Moon","Fragment","jsx","jsxs","Navbar","items","children","className","logoText","logoSrc","user","onNavigateHome","onNavItemClick","href","onProfileSelected","onLogout","isLoading","identityHost","environmentId","open","setOpen","useState","logoFailed","setLogoFailed","isAuthenticated","cn","item","index","Sheet","SheetTrigger","Button","IconWrapper","Menu","SheetContent","ThemeToggle","DropdownMenu","DropdownMenuTrigger","Avatar","AvatarImage","AvatarFallback","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuGroup","DropdownMenuItem","User","LogOut","signinUrl","useEffect","useState","Slot","cva","jsx","badgeVariants","cva","Badge","className","variant","asChild","props","Slot","cn","jsx","Card","className","props","cn","CardHeader","CardTitle","CardDescription","CardContent","className","props","jsx","cn","CardFooter","jsx","Input","className","type","props","cn","LabelPrimitive","jsx","Label","className","props","cn","User","Fragment","jsx","jsxs","UserProfile","loading","user","handleAuthenticated","onRequestEmailVerification","onVerifyEmail","onAddEmail","isMounted","setIsMounted","useState","activeTab","setActiveTab","verifyingEmail","setVerifyingEmail","codeByEmail","setCodeByEmail","addingEmail","setAddingEmail","newEmail","setNewEmail","useEffect","iconProps","renderIcon","Icon","Avatar","AvatarImage","AvatarFallback","n","email","idx","isVerified","ve","codeInput","Badge","e","m","Card","CardHeader","CardTitle","CardDescription","CardContent","Label","Input","v","CardFooter","Button","LogOut","Settings","ExternalLink","jsx","jsxs","getInitials","name","p","UserDropdown","trigger","user","className","onManageAccount","onSignout","links","side","align","sideOffset","modal","triggerAsChild","triggerWrapperClassName","primaryEmail","displayName","avatar","handleLink","item","IconExternal","SettingsIcon","LogOutIcon","DropdownMenu","DropdownMenuTrigger","cn","DropdownMenuContent","Avatar","AvatarImage","AvatarFallback","DropdownMenuSeparator","DropdownMenuItem","idx","Icon","CheckCircle2Icon","cva","jsx","alertVariants","cva","Alert","className","variant","props","cn","AlertTitle","AlertDescription","jsx","jsxs","PlaceholderAlert","props","title","description","Alert","IconWrapper","CheckCircle2Icon","AlertTitle","AlertDescription","useState","useRef","Shield","CheckCircle","AlertCircle","jsx","jsxs","TOTPValidator","onValidate","code","setCode","useState","loading","setLoading","error","setError","success","setSuccess","inputRefs","useRef","handleInputChange","index","value","newCode","handleKeyDown","e","text","digits","digit","i","nextIndex","validateTOTP","totpCode","handleSubmit","clearCode","Card","CardContent","Button","el","Alert","AlertDescription"]}
|