@bergetai/ui 0.12.1 → 0.13.1

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/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/theme-provider/ThemeProvider.tsx","../src/components/theme-provider/ThemeToggle.tsx","../src/lib/utils.ts","../src/primitives/button.tsx","../src/components/button/Button.tsx","../src/components/typography/Typography.tsx","../src/components/card/Card.tsx","../src/primitives/card.tsx","../src/components/badge/Badge.tsx","../src/components/model-card/ModelCard.tsx","../src/components/model-logo/ModelLogo.tsx","../src/components/berget-logo/BergetLogo.tsx","../src/components/alert/Alert.tsx","../src/primitives/alert.tsx","../src/components/dialog/Dialog.tsx","../src/components/alert-dialog/AlertDialog.tsx","../src/components/dropdown-menu/DropdownMenu.tsx","../src/components/navigation-menu/NavigationMenu.tsx","../src/primitives/navigation-menu.tsx","../src/primitives/sidebar.tsx","../src/hooks/use-mobile.tsx","../src/primitives/input.tsx","../src/primitives/separator.tsx","../src/primitives/sheet.tsx","../src/primitives/skeleton.tsx","../src/primitives/tooltip.tsx","../src/components/sidebar/Sidebar.tsx","../src/components/table/Table.tsx","../src/primitives/table.tsx","../src/components/item/Item.tsx","../src/primitives/item.tsx","../src/components/input/Input.tsx","../src/components/checkbox/Checkbox.tsx","../src/primitives/checkbox.tsx","../src/components/switch/Switch.tsx","../src/components/select/Select.tsx","../src/primitives/select.tsx","../src/components/country-select/CountrySelect.tsx","../src/components/icon/Icon.tsx","../src/primitives/popover.tsx","../src/primitives/command.tsx","../src/primitives/dialog.tsx","../src/primitives/input-group.tsx","../src/primitives/textarea.tsx","../src/components/country-select/countries.ts","../src/components/text-area/TextArea.tsx","../src/primitives/label.tsx","../src/primitives/field.tsx","../src/components/link/Link.tsx","../src/components/container/Container.tsx","../src/components/grid/Grid.tsx","../src/components/box/Box.tsx","../src/components/language-select/LanguageSelect.tsx","../src/components/list/List.tsx","../src/components/divider/Divider.tsx","../src/components/code-block/CodeBlock.tsx","../src/components/window-frame/WindowFrame.tsx","../src/components/fog-illustration/FogIllustration.tsx"],"sourcesContent":["import * as React from 'react';\n\ntype Theme = 'dark' | 'light' | 'system';\n\ninterface ThemeState {\n theme: Theme;\n resolvedTheme: 'dark' | 'light';\n}\n\ninterface ThemeProviderContextValue extends ThemeState {\n setTheme: (theme: Theme) => void;\n}\n\nconst ThemeProviderContext = React.createContext<ThemeProviderContextValue | undefined>(undefined);\n\nconst STORAGE_KEY = 'berget-theme';\n\nfunction getSystemTheme(): 'dark' | 'light' {\n return window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';\n}\n\nfunction resolveTheme(theme: Theme): ThemeState {\n return {\n theme,\n resolvedTheme: theme === 'system' ? getSystemTheme() : theme,\n };\n}\n\nexport interface ThemeProviderProps {\n children: React.ReactNode;\n /** Explicitly set and lock the theme ('light' or 'dark').\n * When provided, `setTheme` is a no-op and localStorage is ignored. */\n theme?: 'light' | 'dark';\n}\n\nconst ThemeProvider = React.memo(function ThemeProvider({\n children,\n theme: controlledTheme,\n}: ThemeProviderProps) {\n const isControlled = controlledTheme !== undefined;\n\n const [state, setState] = React.useState<ThemeState>(() => {\n if (isControlled) {\n return resolveTheme(controlledTheme);\n }\n\n let theme: Theme = 'system';\n try {\n const stored = localStorage.getItem(STORAGE_KEY) as Theme | null;\n if (stored && ['dark', 'light', 'system'].includes(stored)) {\n theme = stored;\n }\n } catch {\n /* ignore */\n }\n\n return resolveTheme(theme);\n });\n\n // Sync DOM attribute\n React.useEffect(() => {\n document.documentElement.setAttribute('data-theme', state.resolvedTheme);\n }, [state.resolvedTheme]);\n\n // Controlled sync: if theme prop changes, override state\n React.useEffect(() => {\n if (isControlled && state.theme !== controlledTheme) {\n setState(resolveTheme(controlledTheme));\n }\n }, [isControlled, controlledTheme, state.theme]);\n\n const setTheme = React.useCallback(\n (theme: Theme) => {\n if (isControlled) return;\n\n const next = resolveTheme(theme);\n setState(next);\n\n try {\n localStorage.setItem(STORAGE_KEY, theme);\n } catch {\n /* ignore */\n }\n },\n [isControlled],\n );\n\n // System preference listener (only when system is active and not controlled)\n React.useEffect(() => {\n if (isControlled || state.theme !== 'system') return;\n\n const media = window.matchMedia('(prefers-color-scheme: light)');\n const handler = () => {\n setState((prev) => ({\n ...prev,\n resolvedTheme: getSystemTheme(),\n }));\n };\n\n media.addEventListener('change', handler);\n return () => media.removeEventListener('change', handler);\n }, [isControlled, state.theme]);\n\n const value = React.useMemo(\n () => ({\n ...state,\n setTheme,\n }),\n [state, setTheme],\n );\n\n return <ThemeProviderContext.Provider value={value}>{children}</ThemeProviderContext.Provider>;\n});\n\nfunction useTheme(): ThemeProviderContextValue {\n const context = React.useContext(ThemeProviderContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider.');\n }\n return context;\n}\n\nexport { ThemeProvider, useTheme };\nexport type { Theme };\n","import * as React from 'react';\nimport { useTheme } from './ThemeProvider';\nimport { cn } from '../../lib/utils';\n\nexport interface ThemeToggleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Accessible label for the toggle button */\n label?: string;\n /** Force a specific size class */\n size?: 'sm' | 'md' | 'lg';\n}\n\nconst ThemeToggle = React.forwardRef<HTMLButtonElement, ThemeToggleProps>(\n ({ className, label = 'Toggle theme', size = 'md', ...props }, ref) => {\n const { theme, resolvedTheme, setTheme } = useTheme();\n\n const toggle = React.useCallback(() => {\n setTheme(theme === 'dark' ? 'light' : 'dark');\n }, [theme, setTheme]);\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={toggle}\n aria-label={label}\n title={`Toggle ${resolvedTheme === 'dark' ? 'light' : 'dark'} mode`}\n className={cn(\n 'relative inline-flex items-center justify-center rounded-full cursor-pointer',\n 'transition-colors duration-200',\n 'hover:bg-berget-surface-hover',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring',\n size === 'sm' && 'w-7 h-7',\n size === 'md' && 'w-9 h-9',\n size === 'lg' && 'w-11 h-11',\n className,\n )}\n {...props}\n >\n {/* Sun */}\n <svg\n className={cn(\n 'absolute transition-all duration-200',\n resolvedTheme === 'dark'\n ? 'opacity-100 scale-100 rotate-0'\n : 'opacity-0 scale-0 -rotate-90',\n size === 'sm' && 'w-3.5 h-3.5',\n size === 'md' && 'w-4 h-4',\n size === 'lg' && 'w-5 h-5',\n )}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path\n strokeLinecap=\"round\"\n d=\"M12 2v2m0 16v2m9-10h-2M5 12H3m15.36 6.36-1.41-1.41M6.05 6.05 4.64 4.64m12.72 0-1.41 1.41M6.05 17.95l-1.41 1.41\"\n />\n </svg>\n\n {/* Moon */}\n <svg\n className={cn(\n 'absolute transition-all duration-200',\n resolvedTheme === 'light'\n ? 'opacity-100 scale-100 rotate-0'\n : 'opacity-0 scale-0 rotate-90',\n size === 'sm' && 'w-3.5 h-3.5',\n size === 'md' && 'w-4 h-4',\n size === 'lg' && 'w-5 h-5',\n )}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z\"\n />\n </svg>\n </button>\n );\n },\n);\n\nThemeToggle.displayName = 'ThemeToggle';\n\nexport { ThemeToggle };\n","import * as React from 'react';\nimport { clsx, type ClassValue } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n// Extend tailwind-merge to recognise custom utilities from @theme.\nconst twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n rounded: [\n 'rounded-berget-none',\n 'rounded-berget-xs',\n 'rounded-berget-sm',\n 'rounded-berget-md',\n 'rounded-berget-lg',\n 'rounded-berget-full',\n ],\n 'font-size': [\n 'text-h1',\n 'text-h2',\n 'text-h3',\n 'text-h4',\n 'text-p',\n 'text-mono',\n 'text-hero',\n 'text-caption',\n ],\n },\n },\n});\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Bridge for the legacy Radix `asChild` boolean on Berget primitive wrappers.\n * Base UI replaces `asChild` with a `render` prop: this helper returns the\n * element to pass to `render` (or `undefined` when not composing), so the\n * public design-system API can keep `<Trigger asChild><Button/></Trigger>`.\n */\nexport function asChildRender(\n asChild: boolean | undefined,\n children: React.ReactNode,\n): React.ReactElement | undefined {\n if (!asChild) return undefined;\n return React.Children.only(children) as React.ReactElement;\n}\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nconst buttonVariants = cva(\n \"group/button inline-flex cursor-pointer shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline:\n \"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n icon: \"size-8\",\n \"icon-xs\":\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\":\n \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\n \"icon-lg\": \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","import type * as React from 'react';\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Button as ButtonPrimitive, buttonVariants } from '../../primitives/button';\nimport type { VariantProps } from 'class-variance-authority';\n\n/** Variants exposed by the Berget wrapper. */\ntype CustomVariant = 'default' | 'primary' | 'destructive' | 'outline' | 'ghost' | 'link';\n\n/** Props for the Berget Button wrapper. */\nexport interface ButtonProps extends Omit<\n React.ComponentProps<typeof ButtonPrimitive>,\n 'variant' | 'ref'\n> {\n /** Visual style variant. `primary` is Berget-specific. */\n variant?: CustomVariant;\n /** Full width or auto width. */\n width?: 'default' | 'full';\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/**\n * Shared interaction chrome for every variant.\n *\n * The primitive already provides hover/focus/disabled plumbing via shadcn\n * tokens (`--primary`, `--muted`, `--ring`, …), which the shadcn bridge in\n * `styles/index.css` maps to brand values. These classes neutralise the bits\n * that don't fit the Berget system and apply the component-scoped\n * `--berget-button-*` state tokens:\n *\n * - Focus: always visible on keyboard focus (`focus-visible`), drawn as a\n * real CSS **outline** (2px, offset 2px) in `--berget-button-focus-ring`\n * (moss-300 dark / moss-600 light, ≥3:1 against the surface per\n * WCAG 2.4.7) — not a ring/box-shadow hugging the edge, and the control's\n * own border keeps its resting colour.\n * - Disabled: replaces the primitive's flat `opacity-50` fade with explicit\n * muted tokens so every variant stays legible (≥3:1, and disabled UI is\n * exempt from AA text contrast per WCAG 1.4.3).\n *\n * `dark:` is intentionally absent — it tracks `prefers-color-scheme`, not the\n * Berget theme. Theme switching is driven entirely by the semantic tokens.\n */\nconst interactionClasses = cn(\n // Outline-based focus indicator; neutralise the primitive's ring (the\n // ring colour class is left — harmless at width 0).\n 'focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:ring-0',\n // Neutralise the primitive's disabled fade; variants apply their own tokens.\n 'disabled:pointer-events-none disabled:opacity-100 disabled:cursor-not-allowed',\n // No press movement: same compound selector as the primitive base's 1px\n // active translate so tailwind-merge strips it down to 0.\n 'active:not-aria-[haspopup]:translate-y-0',\n);\n\n/** Disabled treatment shared by every variant. */\nconst disabledClasses = 'disabled:text-berget-button-disabled-fg disabled:shadow-none';\n\n/** Brand-specific classes applied *on top* of the upstream primitive. */\nfunction brandVariantClasses(variant?: CustomVariant): string {\n switch (variant) {\n case 'primary':\n return cn(\n // Flat tinted-glass fill; the alpha carries the state, so no shadow lift.\n 'bg-berget-button-primary-bg text-berget-button-primary-fg',\n 'hover:bg-berget-button-primary-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the primary fg token.\n 'hover:text-berget-button-primary-fg',\n 'active:bg-berget-button-primary-active',\n // Keep the resting (transparent) border on focus — the outline is the indicator.\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-primary-disabled-bg',\n );\n case 'destructive':\n return cn(\n 'bg-berget-button-destructive-bg text-berget-button-destructive-fg',\n 'hover:bg-berget-button-destructive-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n 'hover:text-berget-button-destructive-hover-fg',\n 'active:bg-berget-button-destructive-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-destructive-disabled-bg',\n );\n case 'outline':\n return cn(\n // Transparent fill with a theme-foreground-derived border (25% of the\n // foreground). The state treatment is static: hover, press and\n // keyboard focus render identically to rest — only the shared focus\n // outline and the disabled treatment deviate.\n 'bg-transparent border-berget-button-outline-border text-berget-button-outline-fg',\n // Hover: slight brightening (hover bg token); the border and\n // foreground stay at rest. The dark:hover twin also neutralises\n // the primitive ghost's dark:hover:bg-muted/50. Pressed drops the\n // fill back to transparent (a pressed element is still hovered, so\n // an explicit active override is needed in both colour schemes).\n 'hover:bg-berget-button-outline-hover dark:hover:bg-berget-button-outline-hover',\n 'active:bg-transparent dark:active:bg-transparent',\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-outline-border',\n disabledClasses,\n 'disabled:bg-transparent disabled:border-berget-button-disabled-border',\n );\n case 'ghost':\n // Transparent fill with foreground text; hover and press add subtle\n // theme-foreground-derived fills (10% / 5%). No border of its own —\n // the primitive's resting transparent border persists. The primitive\n // ghost variant's aria-expanded state (bg-muted + foreground text)\n // passes through for dropdown-trigger use.\n return cn(\n 'bg-transparent text-berget-button-ghost-fg',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which is the same value here but pinned\n // explicitly for parity with the other fg-token variants.\n 'hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg',\n // The dark:hover twin neutralises the primitive ghost's\n // dark:hover:bg-muted/50 so only the token fill applies.\n 'dark:hover:bg-berget-button-ghost-hover',\n 'active:bg-berget-button-ghost-active dark:active:bg-berget-button-ghost-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-transparent',\n );\n case 'link':\n // Rendered without buttonVariants — needs its own sizing, focus ring and\n // disabled treatment (the primitive's fade is not legible on text links).\n return cn(\n 'h-auto bg-transparent p-0 text-berget-button-link-fg font-medium underline-offset-4 shadow-none',\n 'hover:bg-transparent hover:text-berget-button-link-hover-fg',\n // On press, return to the resting foreground (hover fg otherwise sticks).\n 'active:text-berget-button-link-fg',\n 'focus:bg-transparent',\n // Neutralise the primitive base's focus-visible:border-ring + ring-3,\n // which land on link too (the primitive merges its cva base under\n // every variant): the outline above is the only focus indicator.\n 'focus-visible:border-transparent focus-visible:ring-0',\n 'focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:rounded-berget-xs',\n 'disabled:text-berget-button-disabled-fg disabled:no-underline',\n 'disabled:opacity-100 disabled:cursor-not-allowed',\n );\n\n case 'default':\n default:\n return cn(\n // Solid granite-800 fill with a granite-700 border on dark surfaces\n // (ink glass in light theme).\n 'bg-berget-button-default-bg border-berget-button-default-border text-berget-button-default-fg',\n 'hover:bg-berget-button-default-hover',\n 'active:bg-berget-button-default-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-default-disabled-bg',\n );\n }\n}\n\n/** Map custom variants to the closest upstream primitive variant. */\nfunction primitiveVariant(variant?: CustomVariant): VariantProps<typeof buttonVariants>['variant'] {\n switch (variant) {\n case 'primary':\n case 'destructive':\n case 'outline':\n case 'ghost':\n return 'ghost';\n default:\n return variant;\n }\n}\n\nexport function Button({\n className,\n variant = 'default',\n size,\n asChild = false,\n width = 'default',\n type = 'button',\n ref,\n children,\n ...props\n}: ButtonProps) {\n const isIcon = typeof size === 'string' && size.startsWith('icon');\n const isLink = variant === 'link';\n\n const baseClass = cn(\n !isLink && buttonVariants({ variant: primitiveVariant(variant), size }),\n // Berget brand overrides — full-width buttons use the square radius;\n // everything else stays pill-shaped.\n !isLink && (width === 'full' ? 'rounded-berget-xs' : 'rounded-full'),\n // Em-based padding, inline = 2× block — matches the 8px/16px spacing-scale\n // values at the default text-sm (14px) and scales down/up with smaller or\n // larger button text. h-auto drops the primitive's fixed h-* so the\n // vertical paddings take effect.\n !isLink && !isIcon && 'py-[0.57em] px-[1.14em] h-auto',\n // Text ladder: size = typography scale; the em-based padding above\n // follows automatically, so no per-size paddings are needed. Only\n // default/lg/sm need overrides — xs keeps the primitive's text-xs.\n !isLink &&\n !isIcon &&\n (size === 'lg' ? 'text-lg' : size === 'sm' ? 'text-sm' : size === 'xs' ? '' : 'text-base'),\n // Normal weight for every non-link variant — tailwind-merge strips the\n // primitive's font-medium (font-weight: var(--font-weight-medium)); the\n // link variant keeps medium via its own classes above.\n !isLink && 'font-normal',\n brandVariantClasses(variant),\n interactionClasses,\n !isLink && width === 'full' && 'w-full',\n isIcon && 'rounded-full shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]',\n className,\n );\n\n const content = (\n <span className={cn('inline-flex items-center', !isIcon && 'gap-2')}>{children}</span>\n );\n\n return (\n <ButtonPrimitive\n className={baseClass}\n ref={ref}\n render={asChildRender(asChild, children)}\n type={type}\n {...props}\n >\n {asChild ? undefined : content}\n </ButtonPrimitive>\n );\n}\n\nexport { buttonVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst typographyVariants = cva('', {\n variants: {\n variant: {\n // Fluid heading scale — use @theme tokens (clamp-based, 390px → 1440px)\n h1: 'text-h1 font-h1 leading-h1 tracking-h1 text-balance',\n // Hero display — from landing-page /dedicated-inference hero (Ovo, 400, tight display leading)\n hero: \"text-hero font-hero leading-hero tracking-hero text-balance font-normal [font-feature-settings:'normal']\",\n h2: 'text-h2 font-h2 leading-h2 tracking-h2 text-balance',\n h3: 'text-h3 font-h3 leading-h3 tracking-h3 text-balance',\n h4: 'text-h4 font-h4 leading-h4 tracking-h4 text-balance',\n // Static sans-serif sub-heading\n h5: 'text-xl font-xl leading-xl text-balance',\n // Body and UI text — use @theme tokens where available\n large: 'text-lg font-lg leading-lg text-pretty',\n body: 'text-p font-p leading-p text-pretty',\n small: 'text-sm font-sm leading-sm text-pretty',\n xs: 'text-xs font-xs leading-xs text-pretty',\n // Caption / overline / eyebrow (DM Sans, Semibold, uppercase)\n caption:\n 'text-caption font-caption leading-caption tracking-caption text-pretty font-semibold uppercase',\n // Monospaced — use @theme token\n mono: 'text-mono font-mono leading-mono text-pretty',\n // Inline code / spec labels\n code: 'text-xs font-mono',\n },\n color: {\n default: 'text-berget-foreground',\n muted: 'text-berget-muted-foreground',\n dim: 'text-berget-foreground/65',\n primary: 'text-berget-primary',\n },\n },\n defaultVariants: {\n variant: 'body',\n color: 'default',\n },\n});\n\nconst defaultElementMap: Record<string, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'span'> = {\n hero: 'h1',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n large: 'p',\n body: 'p',\n small: 'p',\n xs: 'p',\n caption: 'span',\n mono: 'p',\n code: 'span',\n};\n\nexport interface TypographyProps\n extends\n Omit<React.HTMLAttributes<HTMLElement>, 'color'>,\n VariantProps<typeof typographyVariants> {\n as?: React.ElementType;\n}\n\nconst Typography = React.forwardRef<HTMLElement, TypographyProps>(\n ({ className, variant = 'body', color = 'default', as, children, ...props }, ref) => {\n const Component = (as ?? defaultElementMap[variant ?? 'body'] ?? 'p') as\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'p'\n | 'span';\n return (\n <Component\n className={cn(typographyVariants({ variant, color }), className)}\n ref={ref as any}\n {...(props as any)}\n >\n {children}\n </Component>\n );\n },\n);\nTypography.displayName = 'Typography';\n\nexport { Typography, typographyVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport {\n Card as CardPrimitive,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n CardAction,\n} from '../../primitives/card';\n\nconst cardVariants = cva('rounded-berget-xs ring-0', {\n variants: {\n variant: {\n outlined: 'bg-transparent border border-berget-border-subtle',\n filled: 'bg-berget-card-filled-bg border border-berget-border-subtle',\n },\n padding: {\n none: 'p-0',\n sm: 'p-3 sm:p-4',\n md: 'p-4 sm:p-6',\n lg: 'p-6 sm:p-8',\n },\n },\n defaultVariants: {\n variant: 'outlined',\n padding: 'md',\n },\n});\n\nexport interface CardProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant, padding, children, ...props }, ref) => {\n return (\n <CardPrimitive\n ref={ref}\n className={cn(cardVariants({ variant, padding }), className)}\n {...props}\n >\n {children}\n </CardPrimitive>\n );\n },\n);\nCard.displayName = 'Card';\n\nexport {\n Card,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n CardAction,\n cardVariants,\n};\n","import * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Card({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n \"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-berget-xs bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\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 \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)\",\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(\n \"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm\",\n className\n )}\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-sm text-muted-foreground\", 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-(--card-spacing)\", 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(\n \"flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)\",\n className\n )}\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';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n 'inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2',\n {\n variants: {\n variant: {\n default: 'px-8',\n tag: 'px-4',\n semantic: 'px-3',\n },\n status: {\n default: 'bg-berget-badge-default-bg text-berget-badge-default-fg',\n active: 'bg-berget-badge-active-bg text-berget-badge-active-fg',\n tagDefault: 'bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg',\n tagActive: 'bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg',\n tagGhost: 'bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg',\n info: 'berget-tint berget-tint-info',\n success: 'berget-tint berget-tint-success',\n warning: 'berget-tint berget-tint-warning',\n error: 'berget-tint berget-tint-error',\n },\n size: {\n sm: 'text-xs h-6',\n md: 'text-sm h-6',\n },\n },\n defaultVariants: {\n variant: 'default',\n status: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {\n icon?: React.ReactNode;\n iconGap?: number;\n}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {\n return (\n <div className={cn(badgeVariants({ variant, status, size }), className)} ref={ref} {...props}>\n {icon && <div style={{ marginRight: children ? `${iconGap * 0.25}rem` : '0' }}>{icon}</div>}\n {children}\n </div>\n );\n },\n);\nBadge.displayName = 'Badge';\n\nexport { Badge, badgeVariants };\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Card } from '../card';\nimport { type ModelCategory, type ModelLogoProvider, ModelLogo } from '../model-logo';\nimport { Typography } from '../typography';\n\n/**\n * ModelCard — a whole-card link tile for presenting AI models in a grid:\n * provider mark, category eyebrow, model name, optional lifecycle tab,\n * per-unit price columns, and fine-print capability facts.\n *\n * Presentational only: all copy is passed in as props; the card itself\n * owns no strings and no domain types.\n */\n/** Lifecycle status shown as a corner tab on the card. */\nexport type ModelLifecycle = 'preview' | 'active' | 'deprecated';\n\nconst lifecycleLabels: Record<ModelLifecycle, string> = {\n preview: 'Preview',\n active: 'Active',\n deprecated: 'Deprecated',\n};\n\n/** Per-status styling for the lifecycle tab (tint classes come from\n * index.css; deprecated uses the granite neutral). Brightens when the\n * card (`group`) is hovered. */\nconst lifecycleStyles: Record<ModelLifecycle, string> = {\n preview: 'berget-tint berget-tint-warning',\n active: 'berget-tint berget-tint-success',\n deprecated: 'bg-berget-brand-granite-700 text-berget-muted-foreground',\n};\n\nexport type { ModelCategory, ModelLogoProvider };\n\nexport interface ModelCardProps extends Omit<React.ComponentProps<'a'>, 'title' | 'children'> {\n /** Provider mark, rendered in a bordered square at the top of the card. */\n icon?: React.ReactNode;\n /**\n * Model family for the icon square — resolved to a bundled brand mark\n * (e.g. `'mistralai'`, `'moonshotai'`, `'berget'`). Ignored when `icon`\n * is set.\n */\n provider?: string;\n /** Fallback category for the icon square when no brand mark exists\n * (maps to the `model_type` values from `GET /v1/models`). */\n category?: ModelCategory;\n /** Small category label above the title (rendered uppercase). */\n eyebrow?: string;\n /** The model name — rendered as an `h3` and truncated when too long. */\n title: React.ReactNode;\n /**\n * Lifecycle status rendered as a corner tab: `preview` (yellow),\n * `active` (green), `deprecated` (gray).\n */\n lifecycle?: ModelLifecycle;\n /** Secondary line under the title, e.g. the provider name. */\n description?: React.ReactNode;\n /** Label-above-value columns, e.g. per-million-token input/output prices. */\n columns?: { label: React.ReactNode; value: React.ReactNode }[];\n /**\n * Fine-print capability facts rendered in one uppercase row with\n * square separators drawn by the card, e.g. ['Vision', '262K context'].\n */\n meta?: React.ReactNode[];\n /** Link target for the whole card. */\n href: string;\n /** Opens the link in a new tab (adds `target`/`rel`). */\n external?: boolean;\n /** Extra content rendered at the bottom of the card. */\n children?: React.ReactNode;\n}\n\nconst ModelCard = React.forwardRef<HTMLAnchorElement, ModelCardProps>(\n (\n {\n icon,\n provider,\n category,\n eyebrow,\n title,\n lifecycle,\n description,\n columns,\n meta,\n href,\n external,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const titleId = React.useId();\n\n return (\n <a\n ref={ref}\n href={href}\n aria-labelledby={titleId}\n {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n className={cn('group block', className)}\n {...props}\n >\n <Card\n variant=\"filled\"\n padding=\"none\"\n className=\"relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))] sm:p-6\"\n >\n {lifecycle && (\n <div className=\"absolute top-0 right-0 z-10 overflow-hidden rounded-bl-berget-sm\">\n <div\n className={cn(\n 'inline-flex h-6 items-center whitespace-nowrap border-0! px-8 text-sm',\n lifecycleStyles[lifecycle],\n )}\n >\n {lifecycleLabels[lifecycle]}\n </div>\n </div>\n )}\n {(icon || provider || category) && (\n <div className=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-berget-xs border border-berget-border bg-white/5 text-berget-foreground\">\n {icon ?? <ModelLogo provider={provider} category={category} />}\n </div>\n )}\n\n {/* Identity cluster: eyebrow, title, description — cb tightly\n grouped; the card's flex gap separates it from other groups. */}\n <header>\n {eyebrow && (\n <Typography\n variant=\"xs\"\n color=\"muted\"\n className=\"font-medium uppercase leading-none tracking-[0.25em]\"\n >\n {eyebrow}\n </Typography>\n )}\n <div className={cn('flex items-baseline gap-3', lifecycle && 'pr-24')}>\n <Typography\n as=\"h3\"\n id={titleId}\n variant=\"h5\"\n className=\"min-w-0 truncate whitespace-nowrap leading-tight\"\n style={{ fontFeatureSettings: 'normal' }}\n >\n {title}\n </Typography>\n </div>\n {description && (\n <Typography variant=\"xs\" color=\"muted\" className=\"leading-none\">\n {description}\n </Typography>\n )}\n </header>\n\n {columns && columns.length > 0 && (\n <div className=\"grid grid-cols-2\">\n {columns.map((col, i) => (\n <div key={i}>\n <Typography variant=\"xs\" color=\"muted\" className=\"leading-none\">\n {col.label}\n </Typography>\n <Typography\n variant=\"body\"\n className=\"tabular-nums leading-none\"\n style={{ fontFeatureSettings: 'normal' }}\n >\n {col.value}\n </Typography>\n </div>\n ))}\n </div>\n )}\n\n {meta && meta.length > 0 && (\n <Typography\n variant=\"xs\"\n color=\"muted\"\n className=\"text-[0.65rem] uppercase tracking-[0.15em]\"\n >\n {meta.map((item, i) => (\n <React.Fragment key={i}>\n {i > 0 && ' ▪ '}\n {item}\n </React.Fragment>\n ))}\n </Typography>\n )}\n\n {children}\n </Card>\n </a>\n );\n },\n);\nModelCard.displayName = 'ModelCard';\n\nexport { ModelCard };\n","import * as React from 'react';\nimport { ArrowDownWideNarrow, AudioLines, Bot, Braces, Eye, ScanEye } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { BergetLogo } from '../berget-logo';\n\n/**\n * Model families with a bundled brand mark, keyed by the `owned_by` values\n * returned by `GET /v1/models` (normalized: lowercase, aliases below).\n */\nexport type ModelLogoProvider = 'qwen' | 'mistral' | 'kimi' | 'google' | 'zai' | 'berget';\n\n/** Fallback model categories for models without a brand mark, matching\n * the `model_type` values in `GET /v1/models` (plus `vision`, which lives\n * in per-model capabilities). */\nexport type ModelCategory =\n | 'text'\n | 'speech-to-text'\n | 'embedding'\n | 'rerank'\n | 'system-one'\n | 'vision';\n\n/** Accepted aliases, e.g. the raw `owned_by` strings from the models API. */\nconst providerAliases: Record<string, ModelLogoProvider> = {\n qwen: 'qwen',\n mistralai: 'mistral',\n mistral: 'mistral',\n moonshotai: 'kimi',\n kimi: 'kimi',\n google: 'google',\n 'zai-org': 'zai',\n zai: 'zai',\n berget: 'berget',\n bergetai: 'berget',\n};\n\n/** Monochrome, `currentColor`, 24×24 brand marks (via @lobehub/icons, MIT). */\nconst providerPaths: Record<Exclude<ModelLogoProvider, 'berget'>, string[]> = {\n qwen: [\n 'M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z',\n ],\n mistral: [\n 'M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z',\n ],\n kimi: [\n 'M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z',\n 'M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z',\n ],\n google: [\n 'M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z',\n 'M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z',\n 'M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z',\n 'M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z',\n ],\n zai: [\n 'M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z',\n ],\n};\n\nconst providerLabels: Record<ModelLogoProvider, string> = {\n qwen: 'Qwen',\n mistral: 'Mistral',\n kimi: 'Kimi',\n google: 'Google',\n zai: 'Z.ai',\n berget: 'Berget AI',\n};\n\nconst categoryIcons: Record<ModelCategory, React.ComponentType<{ className?: string }>> = {\n text: Bot,\n 'speech-to-text': AudioLines,\n embedding: Braces,\n rerank: ArrowDownWideNarrow,\n 'system-one': ScanEye,\n vision: Eye,\n};\n\nconst categoryLabels: Record<ModelCategory, string> = {\n text: 'Model',\n 'speech-to-text': 'Speech-to-text',\n embedding: 'Embedding',\n rerank: 'Reranker',\n 'system-one': 'System One',\n vision: 'Vision',\n};\n\nexport interface ModelLogoProps extends React.SVGAttributes<SVGSVGElement> {\n /**\n * Model family to render a brand mark for. Accepts the `owned_by` values\n * from `GET /v1/models` (e.g. `'moonshotai'`) case-insensitively.\n */\n provider?: string;\n /** Fallback category when `provider` is missing or unknown. */\n category?: ModelCategory;\n /** Size (width and height) in pixels. */\n size?: number;\n}\n\n/**\n * ModelLogo — brand mark for a supported model family, falling back to a\n * category icon for everything else. Renders nothing if no `provider` and\n * no `category` match.\n */\nexport const ModelLogo = React.forwardRef<SVGSVGElement, ModelLogoProps>(\n ({ provider, category, size = 24, className, ...props }, ref) => {\n const resolved = provider ? providerAliases[provider.trim().toLowerCase()] : undefined;\n\n if (resolved === 'berget') {\n return <BergetLogo variant=\"symbol\" size={size} className={cn('shrink-0', className)} />;\n }\n\n if (resolved) {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n width={size}\n height={size}\n role=\"img\"\n aria-label={providerLabels[resolved]}\n className={cn('shrink-0', className)}\n {...props}\n >\n <title>{providerLabels[resolved]}</title>\n {providerPaths[resolved].map((d, i) => (\n <path key={i} d={d} />\n ))}\n </svg>\n );\n }\n\n if (category) {\n const Icon = categoryIcons[category];\n return <Icon className={cn('shrink-0', className)} {...props} />;\n }\n\n return null;\n },\n);\nModelLogo.displayName = 'ModelLogo';\n\nexport { categoryLabels };\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\n\nexport interface BergetLogoProps extends React.SVGAttributes<SVGSVGElement> {\n /** Shape variant */\n variant?: 'logotype' | 'symbol';\n /** Fill color — `auto` follows the theme via CSS variables */\n color?: 'white' | 'black' | 'auto';\n /** Size (height) in pixels */\n size?: number;\n}\n\nconst BergetLogo = React.forwardRef<SVGSVGElement, BergetLogoProps>(\n ({ variant = 'logotype', color = 'auto', size = 48, className, ...props }, ref) => {\n const fillColor =\n color === 'auto'\n ? 'var(--berget-logo-light)'\n : color === 'white'\n ? 'var(--berget-logo-light)'\n : 'var(--berget-logo-dark)';\n\n if (variant === 'symbol') {\n // viewBox cropped to the glyph ink (y 17-403, x 18-446 of the original\n // 463x419 art) so that `size` means glyph height, matching the logotype\n // variant whose viewBox hugs its glyph. Without this the symbol renders\n // ~7% smaller than the logotype at the same size.\n const aspectRatio = 428 / 386;\n const width = size * aspectRatio;\n const height = size;\n\n return (\n <svg\n ref={ref}\n width={width}\n height={height}\n viewBox=\"18 17 428 386\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n aria-label=\"Berget symbol\"\n className={cn('inline-block', className)}\n {...props}\n >\n <path\n d=\"M208.739 17L255.261 17L446 403L398 403L313.5 255L261.5 176L233.163 96.1677L237.815 98.6522H226.185L230.837 96.1677L113 331L64.5 403L18 403L208.739 17Z\"\n style={{ fill: fillColor }}\n />\n </svg>\n );\n }\n\n // variant === 'logotype'\n const aspectRatio = 793.63 / 204.37;\n const width = size * aspectRatio;\n const height = size;\n\n return (\n <svg\n ref={ref}\n width={width}\n height={height}\n viewBox=\"0 0 793.63 204.37\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n aria-label=\"Berget\"\n className={cn('inline-block', className)}\n {...props}\n >\n <g style={{ fill: fillColor }}>\n <path\n className=\"berget-logotype-fill\"\n d=\"M268.78,172.54v-96.04h37.74c10.39,0,18.26,2.33,23.6,7,5.33,4.67,8.01,10.52,8.01,17.56,0,6.13-1.72,11-5.15,14.61-3.43,3.61-7.58,6.06-12.44,7.34,3.81.73,7.22,2.2,10.22,4.39,3.01,2.2,5.36,4.94,7.08,8.23,1.72,3.29,2.58,6.86,2.58,10.7,0,4.94-1.27,9.4-3.79,13.38-2.53,3.98-6.22,7.11-11.08,9.4-4.86,2.29-10.82,3.43-17.87,3.43h-38.89ZM283.93,117.66h20.74c5.81,0,10.24-1.3,13.29-3.91,3.05-2.61,4.58-6.19,4.58-10.77s-1.51-8.05-4.51-10.7c-3-2.65-7.55-3.98-13.65-3.98h-20.45v29.36ZM283.93,160.61h21.74c6.1,0,10.84-1.37,14.22-4.11,3.38-2.75,5.08-6.59,5.08-11.53s-1.76-8.85-5.29-11.73-8.29-4.32-14.3-4.32h-21.45v31.69Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M382.45,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81,2.91-1.88,5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM382.45,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M425.62,172.54v-68.05h13.59l1.29,12.9c2.47-4.48,5.93-8.03,10.37-10.63,4.43-2.61,9.79-3.91,16.08-3.91v15.23h-4.15c-4.19,0-7.93.67-11.22,1.99-3.29,1.33-5.91,3.57-7.86,6.72-1.96,3.16-2.93,7.53-2.93,13.1v32.65h-15.16Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M500.25,151.69c-3.72,0-7.14-.41-10.29-1.24l-6.15,5.76c1.05.64,2.34,1.19,3.86,1.65,1.52.46,3.66.87,6.43,1.23,2.76.37,6.53.73,11.29,1.1,9.43.82,16.25,3,20.44,6.52,4.2,3.52,6.29,8.21,6.29,14.06,0,4.02-1.12,7.84-3.35,11.45-2.24,3.61-5.72,6.54-10.44,8.78s-10.74,3.36-18.09,3.36c-9.91,0-17.94-1.8-24.09-5.42-6.15-3.62-9.22-9.08-9.22-16.4,0-2.84.78-5.65,2.35-8.44,1.57-2.79,4.08-5.42,7.51-7.89-2-.83-3.74-1.72-5.22-2.68-1.48-.96-2.79-1.94-3.94-2.95v-3.29l12.3-12.07c-5.53-4.57-8.29-10.56-8.29-17.97,0-4.48,1.12-8.58,3.36-12.28,2.24-3.7,5.5-6.65,9.79-8.85,4.29-2.2,9.43-3.29,15.44-3.29,4.01,0,7.72.55,11.15,1.64h26.45v9.6l-12.58.69c2.28,3.75,3.43,7.91,3.43,12.49s-1.13,8.69-3.36,12.35c-2.24,3.66-5.48,6.59-9.72,8.78-4.25,2.2-9.37,3.29-15.37,3.29ZM481.24,181.19c0,3.93,1.81,6.88,5.44,8.85,3.62,1.97,8.15,2.95,13.58,2.95s9.48-1.07,12.72-3.22c3.24-2.15,4.86-5,4.86-8.57,0-2.65-1.09-4.92-3.29-6.79-2.19-1.87-6.34-3.04-12.44-3.5-4.57-.27-8.63-.68-12.15-1.23-3.34,1.74-5.63,3.61-6.86,5.63-1.25,2.01-1.86,3.98-1.86,5.9ZM500.25,140.3c4.38,0,7.93-1.12,10.66-3.36,2.71-2.24,4.07-5.42,4.07-9.53s-1.36-7.41-4.07-9.6c-2.72-2.2-6.27-3.29-10.66-3.29s-8.08,1.1-10.79,3.29c-2.71,2.2-4.08,5.4-4.08,9.6s1.36,7.3,4.08,9.53c2.71,2.24,6.31,3.36,10.79,3.36Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M574.61,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79c3-5.4,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81s5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM574.61,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M646.23,172.54c-6.96,0-12.49-1.62-16.59-4.87-4.1-3.25-6.15-9.03-6.15-17.36v-33.61h-12.16v-12.21h12.16l1.86-17.29h13.29v17.29h20.02v12.21h-20.02v33.61c0,3.75.84,6.33,2.51,7.75,1.67,1.42,4.55,2.13,8.65,2.13h8.14v12.35h-11.72Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M684.4,172.54l36.89-96.04h16.59l36.6,96.04h-16.01l-8.58-23.46h-40.88l-8.58,23.46h-16.01ZM713.28,137.56h32.31l-16.16-43.77-16.16,43.77Z\"\n />\n <path className=\"berget-logotype-fill\" d=\"M778.48,172.54v-96.04h15.15v96.04h-15.15Z\" />\n </g>\n <path\n style={{ fill: fillColor }}\n d=\"M99.9,0h24.37l99.9,202.18h-25.14l-44.26-77.52-27.24-41.38-14.84-41.81,2.44,1.3h-6.09l2.44-1.3-61.72,123-25.4,37.71H0L99.9,0Z\"\n />\n </svg>\n );\n },\n);\n\nBergetLogo.displayName = 'BergetLogo';\n\nexport { BergetLogo };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Alert as AlertPrimitive, AlertTitle, AlertDescription } from '../../primitives/alert';\n\nconst alertVariants = cva('', {\n variants: {\n variant: {\n default: 'border-berget-border',\n info: 'berget-tint berget-tint-info',\n success: 'berget-tint berget-tint-success',\n warning: 'berget-tint berget-tint-warning',\n destructive: 'berget-tint berget-tint-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface AlertProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n ({ className, variant, ...props }, ref) => (\n <AlertPrimitive ref={ref} className={cn(alertVariants({ variant }), className)} {...props} />\n ),\n);\nAlert.displayName = 'Alert';\n\nexport type AlertTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\n\nexport type AlertDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nexport { Alert, AlertTitle, AlertDescription, alertVariants };\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nconst alertVariants = cva(\n \"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\",\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 \"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground\",\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-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-action\"\n className={cn(\"absolute top-2 right-2\", className)}\n {...props}\n />\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction }\n","import * as React from 'react';\nimport { Dialog as DialogPrimitive } from '@base-ui/react/dialog';\nimport { X } from 'lucide-react';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst Dialog = DialogPrimitive.Root;\n\ntype DialogTriggerProps = Omit<DialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DialogTrigger = React.forwardRef<HTMLButtonElement, DialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DialogPrimitive.Trigger>\n ),\n);\nDialogTrigger.displayName = 'DialogTrigger';\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<DialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = 'DialogOverlay';\n\nconst DialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<DialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-berget-xs opacity-70 ring-offset-berget-dialog-bg transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-berget-focus-ring focus:ring-offset-2 disabled:pointer-events-none data-open:bg-berget-muted data-open:text-berget-muted-foreground\">\n <X className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Popup>\n </DialogPortal>\n));\nDialogContent.displayName = 'DialogContent';\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props} />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<DialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </DialogPrimitive.Title>\n));\nDialogTitle.displayName = 'DialogTitle';\n\nconst DialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<DialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </DialogPrimitive.Description>\n));\nDialogDescription.displayName = 'DialogDescription';\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","import * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n));\nAlertDialogOverlay.displayName = 'AlertDialogOverlay';\n\nconst AlertDialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95',\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props} />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<AlertDialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nconst AlertDialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<AlertDialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\n/** Action button — compose with `<Button>` via `asChild` for consistent styling. */\nconst AlertDialogAction = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogAction.displayName = 'AlertDialogAction';\n\n/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */\nconst AlertDialogCancel = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn('mt-2 sm:mt-0', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n","import * as React from 'react';\nimport { Menu as DropdownMenuPrimitive } from '@base-ui/react/menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn, asChildRender } from '../../lib/utils';\n\n/* ------------------------------------------------------------------ */\n/* Root & inert sub-components */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\ntype DropdownMenuTriggerProps = Omit<\n DropdownMenuPrimitive.Trigger.Props,\n 'className' | 'render'\n> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, DropdownMenuTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DropdownMenuPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.SubmenuRoot;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* ------------------------------------------------------------------ */\n/* SubTrigger */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.SubmenuTrigger.Props, 'className' | 'render'> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubmenuTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-popup-open:bg-berget-surface-hover [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : (\n <>\n {children}\n <ChevronRight className=\"ml-auto\" />\n </>\n )}\n </DropdownMenuPrimitive.SubmenuTrigger>\n));\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubContent */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuSubContent = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.Popup.Props, 'className'> &\n Pick<\n DropdownMenuPrimitive.Positioner.Props,\n 'side' | 'sideOffset' | 'align' | 'alignOffset'\n > & {\n className?: string;\n }\n>(\n (\n { className, side = 'right', align = 'start', alignOffset = -3, sideOffset = 0, ...props },\n ref,\n ) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Positioner\n side={side}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className=\"isolate z-50 outline-none\"\n >\n <DropdownMenuPrimitive.Popup\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-lg transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--transform-origin]',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Positioner>\n </DropdownMenuPrimitive.Portal>\n ),\n);\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\n/* ------------------------------------------------------------------ */\n/* Content */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuContent = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.Popup.Props, 'className'> &\n Pick<\n DropdownMenuPrimitive.Positioner.Props,\n 'sideOffset' | 'align' | 'side' | 'alignOffset'\n > & {\n className?: string;\n }\n>(({ className, sideOffset = 4, align = 'center', side, alignOffset, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Positioner\n side={side}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className=\"isolate z-50 outline-none\"\n >\n <DropdownMenuPrimitive.Popup\n ref={ref}\n className={cn(\n 'z-50 max-h-[var(--available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-md transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--transform-origin]',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Positioner>\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\n/* ------------------------------------------------------------------ */\n/* Item */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuItem = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.Item.Props, 'className' | 'render' | 'label'> & {\n className?: string;\n inset?: boolean;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, inset, asChild, children, textValue, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n label={textValue}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\n/* ------------------------------------------------------------------ */\n/* CheckboxItem */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.CheckboxItem.Props, 'className' | 'render' | 'label'> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n label={textValue}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.CheckboxItemIndicator>\n <Check className=\"size-4\" />\n </DropdownMenuPrimitive.CheckboxItemIndicator>\n </span>\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\n/* ------------------------------------------------------------------ */\n/* RadioItem */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuRadioItem = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.RadioItem.Props, 'className' | 'render' | 'label'> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n label={textValue}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.RadioItemIndicator>\n <Circle className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.RadioItemIndicator>\n </span>\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\n/* ------------------------------------------------------------------ */\n/* Label */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuLabel = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.GroupLabel.Props, 'className' | 'render'> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuPrimitive.GroupLabel\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold text-berget-foreground',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.GroupLabel>\n));\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\n/* ------------------------------------------------------------------ */\n/* Separator */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuSeparator = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.Separator.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-berget-separator', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\n/* ------------------------------------------------------------------ */\n/* Shortcut */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-berget-muted-foreground', className)}\n {...props}\n />\n );\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n","import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';\nimport { cva } from 'class-variance-authority';\nimport { ChevronDown } from 'lucide-react';\n\nimport { cn } from '../../lib/utils';\nimport {\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuIndicator,\n} from '../../primitives/navigation-menu';\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenu({\n align = 'start',\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props & Pick<NavigationMenuPrimitive.Positioner.Props, 'align'>) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n className={cn(\n 'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center',\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuPositioner align={align} />\n </NavigationMenuPrimitive.Root>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Trigger */\n/* ------------------------------------------------------------------ */\n\nconst navigationMenuTriggerStyle = cva(\n 'group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-berget-xs px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-berget-surface-02 focus:bg-berget-surface-02 focus-visible:ring-3 focus-visible:ring-berget-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-berget-surface-02/50 data-popup-open:hover:bg-berget-surface-02 data-open:bg-berget-surface-02/50 data-open:hover:bg-berget-surface-02 data-open:focus:bg-berget-surface-02',\n);\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Trigger.Props) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), 'group', className)}\n {...props}\n >\n {children}{' '}\n <ChevronDown\n className=\"relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Link */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenuLink({ className, ...props }: NavigationMenuPrimitive.Link.Props) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex items-center gap-2 rounded-berget-xs p-2 text-sm transition-all outline-none hover:bg-berget-surface-02 focus:bg-berget-surface-02 focus-visible:ring-3 focus-visible:ring-berget-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-berget-xs data-active:bg-berget-surface-02/50 data-active:hover:bg-berget-surface-02 data-active:focus:bg-berget-surface-02 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Positioner (portal + popup + viewport) */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenuPositioner({\n className,\n side = 'bottom',\n sideOffset = 8,\n align = 'start',\n alignOffset = 0,\n ...props\n}: NavigationMenuPrimitive.Positioner.Props) {\n return (\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n 'isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0',\n className,\n )}\n {...props}\n >\n <NavigationMenuPrimitive.Popup className=\"data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-lg ring-1 ring-berget-border transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0\">\n <NavigationMenuPrimitive.Viewport className=\"relative size-full overflow-hidden\" />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuPositioner,\n};\n","import { NavigationMenu as NavigationMenuPrimitive } from \"@base-ui/react/navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"cn\"\nimport { ChevronDownIcon } from \"lucide-react\"\n\nfunction NavigationMenu({\n align = \"start\",\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props &\n Pick<NavigationMenuPrimitive.Positioner.Props, \"align\">) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n className={cn(\n \"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuPositioner align={align} />\n </NavigationMenuPrimitive.Root>\n )\n}\n\nfunction NavigationMenuList({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn(\n \"group flex flex-1 list-none items-center justify-center gap-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuItem({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot=\"navigation-menu-item\"\n className={cn(\"relative\", className)}\n {...props}\n />\n )\n}\n\nconst navigationMenuTriggerStyle = cva(\n \"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted\"\n)\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Trigger.Props) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon className=\"relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180\" aria-hidden=\"true\" />\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\nfunction NavigationMenuContent({\n className,\n ...props\n}: NavigationMenuPrimitive.Content.Props) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n \"data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuPositioner({\n className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: NavigationMenuPrimitive.Positioner.Props) {\n return (\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n \"isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n {...props}\n >\n <NavigationMenuPrimitive.Popup className=\"data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0\">\n <NavigationMenuPrimitive.Viewport className=\"relative size-full overflow-hidden\" />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n )\n}\n\nfunction NavigationMenuLink({\n className,\n ...props\n}: NavigationMenuPrimitive.Link.Props) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuIndicator({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>) {\n return (\n <NavigationMenuPrimitive.Icon\n data-slot=\"navigation-menu-indicator\"\n className={cn(\n \"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Icon>\n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n NavigationMenuPositioner,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nimport { useIsMobile } from \"@/hooks/use-mobile\"\nimport { Button } from \"@/primitives/button\"\nimport { Input } from \"@/primitives/input\"\nimport { Separator } from \"@/primitives/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/primitives/sheet\"\nimport { Skeleton } from \"@/primitives/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/primitives/tooltip\"\nimport { PanelLeftIcon } from \"lucide-react\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n dir={dir}\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n data-side={side}\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn(\"h-8 w-full bg-background shadow-none\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n \"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-label\",\n sidebar: \"group-label\",\n },\n })\n}\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"button\"> & React.ComponentProps<\"button\">) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-action\",\n sidebar: \"group-action\",\n },\n })\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-0\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n render,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>) {\n const { isMobile, state } = useSidebar()\n const comp = useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n },\n props\n ),\n render: !tooltip ? render : <TooltipTrigger render={render} />,\n state: {\n slot: \"sidebar-menu-button\",\n sidebar: \"menu-button\",\n size,\n active: isActive,\n },\n })\n\n if (!tooltip) {\n return comp\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n {comp}\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({\n className,\n render,\n showOnHover = false,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n showOnHover?: boolean\n }) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-action\",\n sidebar: \"menu-action\",\n },\n })\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn(\"group/menu-sub-item relative\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({\n render,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: useRender.ComponentProps<\"a\"> &\n React.ComponentProps<\"a\"> & {\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-sub-button\",\n sidebar: \"menu-sub-button\",\n size,\n active: isActive,\n },\n })\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","import * as React from 'react';\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener('change', onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener('change', onChange);\n }, []);\n\n return !!isMobile;\n}\n","import * as React from \"react\"\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\nimport { cn } from \"cn\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","\"use client\"\n\nimport { Separator as SeparatorPrimitive } from \"@base-ui/react/separator\"\nimport { cn } from \"cn\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n ...props\n}: SeparatorPrimitive.Props) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Dialog as SheetPrimitive } from \"@base-ui/react/dialog\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@/primitives/button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Sheet({ ...props }: SheetPrimitive.Root.Props) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({ ...props }: SheetPrimitive.Close.Props) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nfunction SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {\n return (\n <SheetPrimitive.Backdrop\n data-slot=\"sheet-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n showCloseButton = true,\n ...props\n}: SheetPrimitive.Popup.Props & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n showCloseButton?: boolean\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Popup\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n \"fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close\n data-slot=\"sheet-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-3 right-3\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Popup>\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-0.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({ className, ...props }: SheetPrimitive.Title.Props) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\n \"text-base font-medium text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: SheetPrimitive.Description.Props) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-sm text-muted-foreground\", 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 { cn } from \"cn\"\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\nimport { cn } from \"cn\"\n\nfunction TooltipProvider({\n delay = 0,\n ...props\n}: TooltipPrimitive.Provider.Props) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delay}\n {...props}\n />\n )\n}\n\nfunction Tooltip({ ...props }: TooltipPrimitive.Root.Props) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n}\n\nfunction TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\nfunction TooltipContent({\n className,\n side = \"top\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n children,\n ...props\n}: TooltipPrimitive.Popup.Props &\n Pick<\n TooltipPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n className={cn(\n \"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5\" />\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","/**\n * Sidebar — thin proxy over the shadcn sidebar primitive.\n *\n * All brand styling flows through the design-token bridge in\n * `src/styles/index.css` (`bg-sidebar`, `sidebar-border`, … resolve to\n * `--berget-sidebar-*`). The primitive itself is unmodified upstream\n * shadcn output and must never be edited — Berget-specific composition\n * belongs here.\n *\n * Menu buttons, group/menu actions and badges resolve their hover/active\n * states via the --berget-sidebar-accent tokens (a neutral surface step),\n * not a class-level override.\n *\n * Compose per app:\n *\n * <SidebarProvider>\n * <Sidebar>\n * <SidebarHeader>…</SidebarHeader>\n * <SidebarContent>…</SidebarContent>\n * <SidebarFooter>…</SidebarFooter>\n * </Sidebar>\n * <SidebarInset>…main content…</SidebarInset>\n * </SidebarProvider>\n *\n * Toggle with <SidebarTrigger />, the <SidebarRail />, or ⌘/Ctrl+B.\n */\nimport * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { BergetLogo } from '../berget-logo';\nimport {\n SidebarFooter as SidebarFooterPrimitive,\n SidebarGroup as SidebarGroupPrimitive,\n SidebarHeader as SidebarHeaderPrimitive,\n SidebarGroupLabel as SidebarGroupLabelPrimitive,\n SidebarMenuButton as SidebarMenuButtonPrimitive,\n SidebarMenuSubButton as SidebarMenuSubButtonPrimitive,\n SidebarProvider as SidebarProviderPrimitive,\n} from '../../primitives/sidebar';\n\n/** Icon-mode buttons: 40px square tiles (16px glyph + px-3, height matches\n * the expanded bar so the 24px content line doesn't collapse). The overrides\n * win over the primitive's size-8!/p-2! — w-10!/h-10! are emitted after\n * size-8! in the stylesheet, so both dimensions follow the overrides. */\nconst iconModeButtonClasses =\n 'group-data-[collapsible=icon]:w-10! group-data-[collapsible=icon]:h-10! group-data-[collapsible=icon]:px-3!';\n\n/** Menu-button typography: text-base with true 8px (p-2) padding on all\n * sides. h-auto releases the primitive's fixed heights (h-8/h-7/h-12) —\n * otherwise vertical padding has no room. Collapsed icon mode keeps its\n * important size/padding overrides from the primitive. */\nconst sizingMenuButtonClasses = 'text-base px-3 py-2 h-auto';\nconst sizingSubButtonClasses = 'data-[size=md]:text-base data-[size=sm]:text-base px-3 py-2 h-auto';\n\n/** Group label, indented to line up with the menu-button icons\n * (group p-2 + label px-3 = same 20px as group p-2 + button px-3) and\n * set in small uppercase type with wide tracking. */\nfunction SidebarGroupLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarGroupLabelPrimitive>) {\n return (\n <SidebarGroupLabelPrimitive\n className={cn('px-3 uppercase tracking-caption', className)}\n {...props}\n />\n );\n}\n\n/** Provider with the Berget icon-rail width (60px = 10px gutters + 40px\n * buttons). Consumers can still override via `style`. */\nfunction SidebarProvider({\n className,\n style,\n ...props\n}: React.ComponentProps<typeof SidebarProviderPrimitive>) {\n return (\n <SidebarProviderPrimitive\n className={className}\n style={\n {\n '--sidebar-width-icon': '3.75rem',\n ...style,\n } as React.CSSProperties\n }\n {...props}\n />\n );\n}\n\n/** Group with 10px horizontal gutters in icon mode (10 + 40 + 10 = 60px). */\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<typeof SidebarGroupPrimitive>) {\n return (\n <SidebarGroupPrimitive\n className={cn('group-data-[collapsible=icon]:px-2.5', className)}\n {...props}\n />\n );\n}\n\n/** Footer with a top border mirroring the sidebar header's bottom border, and\n * the same 10px icon-mode gutters as SidebarGroup (its menu sits outside a\n * group). */\nfunction SidebarFooter({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarFooterPrimitive>) {\n return (\n <SidebarFooterPrimitive\n className={cn(\n 'group-data-[collapsible=icon]:px-2.5 border-t border-berget-border',\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Header without the primitive's block padding (its p-2 becomes py-0) and\n * with a bottom border matching the default page-header border; vertical\n * rhythm is consumer-controlled (e.g. a h-20 brand bar). Horizontal padding\n * is dropped in icon mode so rail content (logo slots etc.) can center\n * against the full 60px rail width. */\nfunction SidebarHeader({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarHeaderPrimitive>) {\n return (\n <SidebarHeaderPrimitive\n className={cn(\n 'py-0 group-data-[collapsible=icon]:px-0 border-b border-berget-border',\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Berget brand slot for the sidebar header. Fades between the full logo\n * (expanded) and the symbol (collapsed icon rail).\n *\n * Implementation notes — all load-bearing:\n * - The symbol glides instead of popping: at pl-5 its box sits pixel-perfect\n * under the leading glyph of the full logo (both 35.5x32 at x=20), and its\n * padding-left animates to pl-3 (centered in the 60px rail) over 200ms\n * linear — exactly matching the sidebar width transition. The mark never\n * jumps: collapse fades the logotype out while the symbol glides into its\n * gliding position; expand reverses it.\n * - Both layers stay mounted: display isn't animatable, so unmounting the\n * symbol on expand would blink it off in one frame while the logotype is\n * still fading in. visibility+opacity handle hiding instead; visibility is\n * discretely animatable, deferring its flip until the fade completes,\n * and removing the hidden layer from the accessibility tree.\n * - The row is overflow-hidden and the logo shrink-0: when the rail narrows,\n * the fading full logo is clipped at the moving edge instead of being\n * squeezed (the SVG viewBox would otherwise scale it down).\n * - px-5 aligns the logo's left edge with the 20px content line of the\n * expanded sidebar (menu icons and group-label text both sit at 20px).\n * The fading full logo clips under the shrinking rail edge while fading.\n *\n * Renders its own SidebarHeader (px-0 — the row owns all horizontal padding,\n * so its position can't jump when the header's icon-mode padding lands).\n */\nfunction SidebarLogo() {\n return (\n <SidebarHeaderPrimitive className=\"px-0\">\n <div className=\"relative flex h-15 items-center overflow-hidden px-5\">\n <BergetLogo\n variant=\"logotype\"\n size={32}\n className=\"shrink-0 transition-[opacity,visibility] duration-150 group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:invisible group-data-[collapsible=icon]:opacity-0\"\n />\n <span className=\"pointer-events-none invisible absolute inset-y-0 left-0 flex w-15 items-center pl-5 opacity-0 transition-[padding-left,opacity,visibility] duration-200 ease-linear group-data-[collapsible=icon]:visible group-data-[collapsible=icon]:pl-3 group-data-[collapsible=icon]:opacity-100\">\n <BergetLogo variant=\"symbol\" size={32} />\n </span>\n </div>\n </SidebarHeaderPrimitive>\n );\n}\n\n/** Page header for use inside <SidebarInset>. Its height (60px content + 1px)\n * keeps the bottom border on the same line as the sidebar header's border —\n * both occupy the 60-61px row, making the collapsed brand cell a 60x60\n * square. Compose the SidebarTrigger and a title inside. */\nfunction SidebarPageHeader({ className, ...props }: React.ComponentProps<'header'>) {\n return (\n <header\n className={cn(\n 'flex h-[calc(3.75rem+1px)] items-center gap-2 border-b border-berget-border px-4',\n className,\n )}\n {...props}\n />\n );\n}\n\ntype SidebarMenuButtonProps = React.ComponentProps<typeof SidebarMenuButtonPrimitive>;\n\ntype SidebarMenuSubButtonProps = React.ComponentProps<typeof SidebarMenuSubButtonPrimitive>;\n\nfunction SidebarMenuButton({ className, ...props }: SidebarMenuButtonProps) {\n return (\n <SidebarMenuButtonPrimitive\n className={cn(sizingMenuButtonClasses, iconModeButtonClasses, className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubButton({ className, ...props }: SidebarMenuSubButtonProps) {\n return (\n <SidebarMenuSubButtonPrimitive\n className={cn(sizingSubButtonClasses, '[&>svg]:text-inherit', className)}\n {...props}\n />\n );\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from '../../primitives/sidebar';\n\nexport {\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarLogo,\n SidebarMenuButton,\n SidebarMenuSubButton,\n SidebarPageHeader,\n SidebarProvider,\n};\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Table as TablePrimitive,\n TableHeader as TableHeaderPrimitive,\n TableBody as TableBodyPrimitive,\n TableFooter as TableFooterPrimitive,\n TableHead as TableHeadPrimitive,\n TableRow as TableRowPrimitive,\n TableCell as TableCellPrimitive,\n TableCaption as TableCaptionPrimitive,\n} from '../../primitives/table';\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => <TablePrimitive ref={ref} className={className} {...props} />,\n);\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableHeaderPrimitive\n ref={ref}\n className={cn('[&_tr]:border-b border-berget-table-border', className)}\n {...props}\n />\n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableBodyPrimitive\n ref={ref}\n className={cn('[&_tr:last-child]:border-0', className)}\n {...props}\n />\n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableFooterPrimitive\n ref={ref}\n className={cn(\n 'border-t border-berget-table-border bg-berget-table-footer-bg font-medium [&>tr]:last:border-0',\n className,\n )}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <TableRowPrimitive\n ref={ref}\n className={cn(\n 'border-b border-berget-table-border transition-colors hover:bg-berget-table-row-hover data-[state=selected]:bg-berget-table-row-selected',\n className,\n )}\n {...props}\n />\n ),\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <TableHeadPrimitive\n ref={ref}\n className={cn(\n 'h-12 px-4 text-left align-middle font-medium text-berget-table-head-text [&:has([role=checkbox])]:pr-0',\n className,\n )}\n {...props}\n />\n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <TableCellPrimitive\n ref={ref}\n className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)}\n {...props}\n />\n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <TableCaptionPrimitive\n ref={ref}\n className={cn('mt-4 text-sm text-berget-table-caption-text', className)}\n {...props}\n />\n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div\n data-slot=\"table-container\"\n className=\"relative w-full overflow-x-auto\"\n >\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Item as ItemPrimitive,\n ItemGroup,\n ItemSeparator as ItemSeparatorPrimitive,\n ItemMedia as ItemMediaPrimitive,\n ItemContent,\n ItemTitle as ItemTitlePrimitive,\n ItemDescription as ItemDescriptionPrimitive,\n ItemActions,\n ItemHeader,\n ItemFooter,\n} from '@/primitives/item';\nimport type { VariantProps } from 'class-variance-authority';\n\nexport interface ItemProps extends React.ComponentProps<typeof ItemPrimitive> {\n variant?: VariantProps<typeof ItemPrimitive>['variant'];\n size?: VariantProps<typeof ItemPrimitive>['size'];\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nexport function Item({ className, asChild, children, ...props }: ItemProps) {\n return (\n <ItemPrimitive\n render={asChild ? (children as React.ReactElement) : undefined}\n className={cn(\n /* Variant colours — override primitive defaults */\n 'data-[variant=outline]:border-berget-item-outline-border',\n 'data-[variant=muted]:bg-berget-item-muted-bg',\n 'data-[variant=muted]:text-berget-item-muted-fg',\n /* Hover / focus */\n '[&_a]:hover:bg-berget-item-link-hover-surface',\n 'focus-visible:border-berget-item-focus-ring focus-visible:ring-berget-item-focus-ring/50',\n className,\n )}\n {...props}\n >\n {asChild ? undefined : children}\n </ItemPrimitive>\n );\n}\n\n/** Re-export unchanged sub-components. */\nexport { ItemGroup, ItemContent, ItemActions, ItemHeader, ItemFooter };\n\n/** ItemMedia — override icon background. */\nexport const ItemMedia = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof ItemMediaPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <ItemMediaPrimitive\n ref={ref}\n className={cn('data-[variant=icon]:bg-berget-item-media-icon-bg', className)}\n {...props}\n />\n );\n});\nItemMedia.displayName = 'ItemMedia';\n\n/** ItemTitle — override to use semantic foreground. */\nexport const ItemTitle = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof ItemTitlePrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <ItemTitlePrimitive\n ref={ref}\n className={cn('text-berget-item-default-fg', className)}\n {...props}\n />\n );\n});\nItemTitle.displayName = 'ItemTitle';\n\n/** ItemDescription — override muted text colour. */\nexport const ItemDescription = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentProps<typeof ItemDescriptionPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <ItemDescriptionPrimitive\n ref={ref}\n className={cn('text-berget-item-description-fg', className)}\n {...props}\n />\n );\n});\nItemDescription.displayName = 'ItemDescription';\n\n/** ItemSeparator — override colour. */\nexport const ItemSeparator = React.forwardRef<\n React.ComponentRef<typeof ItemSeparatorPrimitive>,\n React.ComponentProps<typeof ItemSeparatorPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <ItemSeparatorPrimitive\n ref={ref}\n className={cn('bg-berget-item-separator', className)}\n {...props}\n />\n );\n});\nItemSeparator.displayName = 'ItemSeparator';\n","import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nimport { Separator } from \"@/primitives/separator\"\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\n \"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-2\", className)}\n {...props}\n />\n )\n}\n\nconst itemVariants = cva(\n \"group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted\",\n {\n variants: {\n variant: {\n default: \"border-transparent\",\n outline: \"border-border\",\n muted: \"border-transparent bg-muted/50\",\n },\n size: {\n default: \"gap-2.5 px-3 py-2.5\",\n sm: \"gap-2.5 px-3 py-2.5\",\n xs: \"gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & VariantProps<typeof itemVariants>) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(itemVariants({ variant, size, className })),\n },\n props\n ),\n render,\n state: {\n slot: \"item\",\n variant,\n size,\n },\n })\n}\n\nconst itemMediaVariants = cva(\n \"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"[&_svg:not([class*='size-'])]:size-4\",\n image:\n \"size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction ItemMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\n return (\n <div\n data-slot=\"item-media\"\n data-variant={variant}\n className={cn(itemMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-content\"\n className={cn(\n \"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-title\"\n className={cn(\n \"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n \"line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-actions\"\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-header\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-footer\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n}\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Input as InputPrimitive } from '../../primitives/input';\nimport { Typography } from '../typography';\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n icon?: React.ReactNode;\n actionButton?: React.ReactNode;\n label?: string;\n description?: string;\n error?: string;\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {\n const generatedId = React.useId();\n const inputId = id || generatedId;\n const errorId = `${inputId}-error`;\n const descriptionId = `${inputId}-description`;\n\n const inputElement = (\n <InputPrimitive\n ref={ref}\n id={inputId}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={cn(error && errorId, description && descriptionId)}\n className={cn(\n 'isolate rounded-berget-xs bg-card focus-visible:border-berget-form-focus-border focus-visible:ring-0 focus-visible:ring-offset-0 hover:bg-berget-surface-hover transition-colors duration-200 px-3 sm:px-4 py-2 sm:py-2.5 text-sm',\n icon && 'pl-10',\n actionButton && 'pr-12',\n error && 'border-berget-destructive-foreground/50 bg-berget-destructive',\n disabled && 'cursor-not-allowed',\n className,\n )}\n {...props}\n />\n );\n\n if (!icon && !actionButton) {\n return (\n <div className=\"flex flex-col gap-2\">\n {label && (\n <label\n htmlFor={inputId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled ? 'text-muted-foreground cursor-not-allowed' : 'text-foreground',\n error && 'text-berget-destructive-foreground',\n )}\n >\n {label}\n </label>\n )}\n {inputElement}\n {(description || error) && (\n <div className=\"flex flex-col gap-1\">\n {description && (\n <Typography variant=\"xs\" color=\"muted\" id={descriptionId}>\n {description}\n </Typography>\n )}\n {error && (\n <Typography\n variant=\"xs\"\n id={errorId}\n className=\"text-berget-destructive-foreground\"\n >\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col gap-2\">\n {label && (\n <label\n htmlFor={inputId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled ? 'text-muted-foreground cursor-not-allowed' : 'text-foreground',\n error && 'text-berget-destructive-foreground',\n )}\n >\n {label}\n </label>\n )}\n <div className=\"relative w-full\">\n {icon && <div className=\"absolute left-3 top-1/2 -translate-y-1/2\">{icon}</div>}\n {inputElement}\n {actionButton && (\n <div className=\"absolute right-2 top-1/2 -translate-y-1/2\">{actionButton}</div>\n )}\n </div>\n {(description || error) && (\n <div className=\"flex flex-col gap-1\">\n {description && (\n <Typography variant=\"xs\" color=\"muted\" id={descriptionId}>\n {description}\n </Typography>\n )}\n {error && (\n <Typography variant=\"xs\" id={errorId} className=\"text-berget-destructive-foreground\">\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\n","import * as React from 'react';\nimport { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';\nimport { Check } from 'lucide-react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Checkbox as CheckboxBase } from '../../primitives/checkbox';\nimport { Typography } from '../typography';\n\nconst checkboxVariants = cva(\n 'inline-flex items-center justify-center rounded-berget-xs transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n variant: {\n default:\n 'text-foreground border border-berget-border-interactive bg-berget-surface-subtle hover:bg-berget-surface-raised',\n error:\n 'border border-berget-destructive-border bg-berget-destructive text-berget-destructive-foreground hover:bg-berget-destructive/90',\n success:\n 'border border-berget-success-border bg-berget-success text-berget-success-foreground hover:bg-berget-success/90',\n },\n size: {\n sm: 'w-4 h-4',\n default: 'w-5 h-5',\n lg: 'w-6 h-6',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, 'className'>,\n VariantProps<typeof checkboxVariants> {\n label?: string;\n description?: string;\n error?: string;\n className?: string;\n}\n\nconst Checkbox = React.forwardRef<React.ComponentRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n variant,\n size,\n label,\n description,\n error,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const checkboxId = id || generatedId;\n const errorId = `${checkboxId}-error`;\n\n return (\n <div className=\"flex items-start gap-3\">\n <div className=\"relative flex items-start pt-0.5\">\n <CheckboxBase\n ref={ref}\n id={checkboxId}\n disabled={disabled}\n nativeButton\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n aria-label={ariaLabel || label || undefined}\n className={cn(\n checkboxVariants({ variant, size }),\n 'cursor-pointer',\n disabled && 'cursor-not-allowed pointer-events-none',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator>\n <Check\n className=\"h-4 w-4 text-current stroke-current\"\n style={{ color: 'currentColor', stroke: 'currentColor' }}\n />\n </CheckboxPrimitive.Indicator>\n </CheckboxBase>\n </div>\n\n {(label || description || error) && (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={checkboxId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled\n ? 'text-white/40 cursor-not-allowed'\n : variant === 'error'\n ? 'text-berget-destructive-foreground cursor-pointer'\n : variant === 'success'\n ? 'text-berget-success-foreground cursor-pointer'\n : 'cursor-pointer',\n error && 'text-berget-destructive-foreground',\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <Typography variant=\"xs\" color=\"muted\">\n {description}\n </Typography>\n )}\n {error && (\n <Typography variant=\"xs\" id={errorId} className=\"text-berget-destructive-foreground\">\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox, checkboxVariants };\n","import { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\nimport { cn } from \"cn\"\nimport { CheckIcon } from \"lucide-react\"\n\nfunction Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer relative flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon\n />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox }\n","import * as React from 'react';\nimport { Switch as SwitchPrimitives } from '@base-ui/react/switch';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst switchRootVariants = cva(\n 'peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'data-unchecked:bg-berget-border data-checked:bg-berget-primary',\n primary:\n 'data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-primary-checked',\n subtle:\n 'data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-subtle-checked',\n },\n size: {\n sm: 'h-5 w-9',\n default: 'h-6 w-11',\n lg: 'h-7 w-[52px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst switchThumbVariants = cva(\n 'pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground',\n {\n variants: {\n size: {\n sm: 'h-4 w-4 data-checked:translate-x-4 data-unchecked:translate-x-0',\n default: 'h-5 w-5 data-checked:translate-x-5 data-unchecked:translate-x-0',\n lg: 'h-6 w-6 data-checked:translate-x-6 data-unchecked:translate-x-0',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n);\n\nexport interface SwitchProps\n extends Omit<SwitchPrimitives.Root.Props, 'className'>, VariantProps<typeof switchRootVariants> {\n label?: string;\n description?: string;\n error?: string;\n className?: string;\n}\n\nconst Switch = React.forwardRef<HTMLElement, SwitchProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n variant,\n size,\n label,\n description,\n error,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const switchId = id || generatedId;\n const errorId = `${switchId}-error`;\n\n return (\n <div className=\"flex items-center gap-3\">\n <SwitchPrimitives.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n nativeButton\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n aria-label={ariaLabel || label || undefined}\n className={cn(\n switchRootVariants({ variant, size }),\n disabled && 'cursor-not-allowed pointer-events-none',\n className,\n )}\n {...props}\n >\n <SwitchPrimitives.Thumb className={cn(switchThumbVariants({ size }))} />\n </SwitchPrimitives.Root>\n\n {(label || description || error) && (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled\n ? 'text-muted-foreground cursor-not-allowed'\n : error\n ? 'text-berget-destructive-foreground cursor-pointer'\n : 'text-foreground cursor-pointer',\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <Typography variant=\"xs\" color=\"muted\">\n {description}\n </Typography>\n )}\n {error && (\n <Typography variant=\"xs\" id={errorId} className=\"text-berget-destructive-foreground\">\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nexport { Switch, switchRootVariants, switchThumbVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Typography } from '../typography';\nimport {\n Select as SelectRoot,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from '../../primitives/select';\n\nconst selectVariants = cva(\n 'flex w-full items-center justify-between rounded-berget-xs border bg-card px-4 py-3 text-sm transition-colors duration-200 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-berget-form-focus-border disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'border-berget-border-interactive hover:bg-berget-surface-hover',\n primary:\n 'border-berget-primary-border bg-berget-primary-tint hover:bg-berget-surface-hover',\n subtle: 'border-berget-border-subtle hover:bg-berget-surface-hover',\n muted: 'border-berget-border-subtle/50 hover:bg-berget-surface-hover',\n },\n size: {\n sm: 'px-3 py-2 text-xs',\n default: 'px-4 py-3 text-sm',\n lg: 'px-5 py-4 text-base',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface SelectOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface SelectProps extends VariantProps<typeof selectVariants> {\n label?: string;\n description?: string;\n error?: string;\n placeholder?: string;\n options: SelectOption[];\n id?: string;\n disabled?: boolean;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n name?: string;\n required?: boolean;\n className?: string;\n}\n\nconst Select = React.forwardRef<React.ComponentRef<typeof SelectTrigger>, SelectProps>(\n (\n {\n className,\n variant,\n size,\n label,\n description,\n error,\n placeholder,\n options,\n id,\n disabled,\n value,\n defaultValue,\n onValueChange,\n name,\n required,\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const selectId = id || generatedId;\n const errorId = `${selectId}-error`;\n const descriptionId = `${selectId}-description`;\n\n return (\n <div className=\"flex flex-col gap-2\">\n {label && (\n <label\n htmlFor={selectId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled ? 'text-muted-foreground cursor-not-allowed' : 'text-foreground',\n error && 'text-berget-destructive-foreground',\n )}\n >\n {label}\n </label>\n )}\n\n <SelectRoot\n value={value}\n defaultValue={defaultValue}\n onValueChange={\n onValueChange ? (value) => onValueChange((value ?? '') as string) : undefined\n }\n disabled={disabled}\n name={name}\n required={required}\n // Base UI Select.Value renders the raw value by default. Passing `items`\n // makes it render the matching label instead (radix selected ItemText behaviour).\n items={options}\n >\n <SelectTrigger\n ref={ref}\n id={selectId}\n aria-invalid={!!error}\n aria-describedby={cn(error && errorId, description && descriptionId)}\n className={cn(\n selectVariants({ variant, size }),\n error && 'border-berget-destructive-foreground/50 bg-berget-destructive',\n className,\n )}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map((option) => (\n <SelectItem key={option.value} value={option.value} disabled={option.disabled}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </SelectRoot>\n\n {description && (\n <Typography variant=\"xs\" color=\"muted\" id={descriptionId}>\n {description}\n </Typography>\n )}\n\n {error && (\n <Typography variant=\"xs\" id={errorId} className=\"text-berget-destructive-foreground\">\n {error}\n </Typography>\n )}\n </div>\n );\n },\n);\nSelect.displayName = 'Select';\n\nexport { Select, selectVariants };\n","import * as React from \"react\"\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\nimport { cn } from \"cn\"\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className={cn(\"flex flex-1 text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n }\n />\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\"\n >) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-align-trigger={alignItemWithTrigger}\n className={cn(\"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: SelectPrimitive.GroupLabel.Props) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: SelectPrimitive.Item.Props) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText className=\"flex flex-1 shrink-0 gap-2 whitespace-nowrap\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n","'use client';\n\nimport * as React from 'react';\nimport { ChevronDown, Globe } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Icon } from '@/components/icon';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/primitives/popover';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/primitives/command';\nimport { type Country, COUNTRIES } from './countries';\n\nexport interface CountrySelectProps {\n value?: string | null;\n onValueChange?: (code: string) => void;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n align?: 'center' | 'start' | 'end';\n sideOffset?: number;\n}\n\nconst CountrySelect = React.forwardRef<React.ElementRef<'button'>, CountrySelectProps>(\n (\n {\n value,\n onValueChange,\n placeholder = 'Select country',\n disabled = false,\n className,\n align = 'center',\n sideOffset = 4,\n },\n ref,\n ) => {\n const [open, setOpen] = React.useState(false);\n const selectedCountry = React.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n ref={ref}\n render={\n <button\n type=\"button\"\n disabled={disabled}\n aria-expanded={open}\n className={cn(\n // Base layout — consistent with Select trigger\n 'flex w-full items-center justify-between',\n 'rounded-berget-xs border bg-card',\n 'px-4 py-3 text-sm',\n 'transition-colors duration-200',\n 'focus-visible:outline-none focus-visible:ring-0',\n 'focus-visible:ring-offset-0 focus-visible:border-berget-form-focus-border',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Default border & hover matching Select variant \"default\"\n 'border-berget-border-interactive hover:bg-berget-surface-hover',\n className,\n )}\n />\n }\n >\n <div className=\"flex items-center gap-2 min-w-0 flex-1\">\n {selectedCountry ? (\n <>\n <span className=\"text-xl flex-shrink-0\">{selectedCountry.flag}</span>\n <span className=\"truncate\">{selectedCountry.name}</span>\n <span className=\"text-berget-muted-foreground text-xs flex-shrink-0\">\n ({selectedCountry.code})\n </span>\n </>\n ) : (\n <>\n <Icon\n icon={Globe}\n size={16}\n className=\"flex-shrink-0 text-berget-muted-foreground\"\n />\n <span className=\"text-berget-muted-foreground truncate\">{placeholder}</span>\n </>\n )}\n </div>\n <Icon\n icon={ChevronDown}\n size={16}\n className={cn(\n 'flex-shrink-0 text-berget-muted-foreground',\n 'transition-transform duration-200',\n open && 'rotate-180',\n )}\n />\n </PopoverTrigger>\n\n <PopoverContent\n align={align}\n sideOffset={sideOffset}\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n >\n <Command>\n <CommandInput placeholder=\"Search country...\" />\n <CommandList>\n <CommandEmpty>No countries found.</CommandEmpty>\n <CommandGroup>\n {COUNTRIES.map((country) => (\n <CommandItem\n key={country.code}\n value={`${country.name} ${country.code}`}\n onSelect={() => {\n onValueChange?.(country.code);\n setOpen(false);\n }}\n className={cn(\n 'flex items-center gap-3 px-3 py-2.5',\n \"data-[selected='true']:bg-berget-brand-granite-700/40! data-[selected=true]:text-berget-foreground\",\n value === country.code && 'bg-berget-brand-granite-800/40',\n )}\n >\n <span className=\"text-xl flex-shrink-0\">{country.flag}</span>\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-sm truncate\">{country.name}</div>\n <div className=\"text-xs text-berget-muted-foreground\">{country.code}</div>\n </div>\n {value === country.code && (\n <div className=\"w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0\" />\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nCountrySelect.displayName = 'CountrySelect';\n\nexport { CountrySelect };\nexport type { Country };\nexport {\n COUNTRIES,\n EU_COUNTRY_CODES,\n getCountryByCode,\n getCountryByName,\n isEUCountry,\n} from './countries';\n","import * as React from 'react';\nimport { LucideIcon, LucideProps } from 'lucide-react';\nimport { cn } from '../../lib/utils';\n\nexport interface IconProps extends Omit<LucideProps, 'size'> {\n icon: LucideIcon;\n size: 16 | 24 | 32;\n className?: string;\n 'aria-label'?: string;\n 'aria-hidden'?: boolean;\n}\n\nconst iconStrokeMap: Record<IconProps['size'], number> = {\n 16: 1.4,\n 24: 1.6,\n 32: 1.8,\n};\n\nconst Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n icon: IconComponent,\n size,\n className,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden = true,\n ...props\n },\n ref,\n ) => {\n const strokeWidth = iconStrokeMap[size];\n const sizeClass = size === 16 ? 'w-4 h-4' : size === 24 ? 'w-6 h-6' : 'w-8 h-8';\n\n const ariaAttributes = ariaLabel ? { 'aria-label': ariaLabel } : { 'aria-hidden': ariaHidden };\n\n return (\n <IconComponent\n ref={ref}\n className={cn(sizeClass, className)}\n strokeWidth={strokeWidth}\n {...ariaAttributes}\n {...props}\n />\n );\n },\n);\n\nIcon.displayName = 'Icon';\n\nexport { Icon };\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport { cn } from \"cn\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { cn } from \"cn\"\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/primitives/dialog\"\nimport {\n InputGroup,\n InputGroupAddon,\n} from \"@/primitives/input-group\"\nimport { SearchIcon, CheckIcon } from \"lucide-react\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n \"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: Omit<React.ComponentProps<typeof Dialog>, \"children\"> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n children: React.ReactNode\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\n \"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0\",\n className\n )}\n showCloseButton={showCloseButton}\n >\n {children}\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n \"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn(\"py-6 text-center text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n \"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","import * as React from \"react\"\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@/primitives/button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"text-base leading-none font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@/primitives/button\"\nimport { Input } from \"@/primitives/input\"\nimport { Textarea } from \"@/primitives/textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\":\n \"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]\",\n \"inline-end\":\n \"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]\",\n \"block-start\":\n \"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2\",\n \"block-end\":\n \"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\":\n \"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\" | \"type\"> &\n VariantProps<typeof inputGroupButtonVariants> & {\n type?: \"button\" | \"submit\" | \"reset\"\n }) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n","import * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n","/**\n * List of countries supported by Odoo Fiscal Localization\n * Source: https://www.odoo.com/documentation/saas-15.3/applications/finance/accounting/fiscal_localizations/overview/localizations_list.html\n */\n\nexport interface Country {\n code: string; // ISO 3166-1 alpha-2 code\n name: string; // Country name\n flag: string; // Emoji flag\n}\n\nexport const COUNTRIES: Country[] = [\n { code: 'AX', name: 'Åland Islands', flag: '🇦🇽' },\n { code: 'DZ', name: 'Algeria', flag: '🇩🇿' },\n { code: 'AR', name: 'Argentina', flag: '🇦🇷' },\n { code: 'AU', name: 'Australia', flag: '🇦🇺' },\n { code: 'AT', name: 'Austria', flag: '🇦🇹' },\n { code: 'BE', name: 'Belgium', flag: '🇧🇪' },\n { code: 'BG', name: 'Bulgaria', flag: '🇧🇬' },\n { code: 'BO', name: 'Bolivia', flag: '🇧🇴' },\n { code: 'BR', name: 'Brazil', flag: '🇧🇷' },\n { code: 'CA', name: 'Canada', flag: '🇨🇦' },\n { code: 'CL', name: 'Chile', flag: '🇨🇱' },\n { code: 'CN', name: 'China', flag: '🇨🇳' },\n { code: 'CO', name: 'Colombia', flag: '🇨🇴' },\n { code: 'CR', name: 'Costa Rica', flag: '🇨🇷' },\n { code: 'CY', name: 'Cyprus', flag: '🇨🇾' },\n { code: 'HR', name: 'Croatia', flag: '🇭🇷' },\n { code: 'CZ', name: 'Czech Republic', flag: '🇨🇿' },\n { code: 'DK', name: 'Denmark', flag: '🇩🇰' },\n { code: 'DO', name: 'Dominican Republic', flag: '🇩🇴' },\n { code: 'EC', name: 'Ecuador', flag: '🇪🇨' },\n { code: 'EG', name: 'Egypt', flag: '🇪🇬' },\n { code: 'EE', name: 'Estonia', flag: '🇪🇪' },\n { code: 'ET', name: 'Ethiopia', flag: '🇪🇹' },\n { code: 'FI', name: 'Finland', flag: '🇫🇮' },\n { code: 'FR', name: 'France', flag: '🇫🇷' },\n { code: 'DE', name: 'Germany', flag: '🇩🇪' },\n { code: 'GR', name: 'Greece', flag: '🇬🇷' },\n { code: 'GT', name: 'Guatemala', flag: '🇬🇹' },\n { code: 'HN', name: 'Honduras', flag: '🇭🇳' },\n { code: 'HK', name: 'Hong Kong', flag: '🇭🇰' },\n { code: 'HU', name: 'Hungary', flag: '🇭🇺' },\n { code: 'IN', name: 'India', flag: '🇮🇳' },\n { code: 'ID', name: 'Indonesia', flag: '🇮🇩' },\n { code: 'IE', name: 'Ireland', flag: '🇮🇪' },\n { code: 'IL', name: 'Israel', flag: '🇮🇱' },\n { code: 'IT', name: 'Italy', flag: '🇮🇹' },\n { code: 'JP', name: 'Japan', flag: '🇯🇵' },\n { code: 'KE', name: 'Kenya', flag: '🇰🇪' },\n { code: 'LT', name: 'Lithuania', flag: '🇱🇹' },\n { code: 'LV', name: 'Latvia', flag: '🇱🇻' },\n { code: 'LU', name: 'Luxembourg', flag: '🇱🇺' },\n { code: 'MA', name: 'Morocco', flag: '🇲🇦' },\n { code: 'MT', name: 'Malta', flag: '🇲🇹' },\n { code: 'MX', name: 'Mexico', flag: '🇲🇽' },\n { code: 'MN', name: 'Mongolia', flag: '🇲🇳' },\n { code: 'NL', name: 'Netherlands', flag: '🇳🇱' },\n { code: 'NZ', name: 'New Zealand', flag: '🇳🇿' },\n { code: 'NO', name: 'Norway', flag: '🇳🇴' },\n { code: 'PK', name: 'Pakistan', flag: '🇵🇰' },\n { code: 'PA', name: 'Panama', flag: '🇵🇦' },\n { code: 'PE', name: 'Peru', flag: '🇵🇪' },\n { code: 'PL', name: 'Poland', flag: '🇵🇱' },\n { code: 'PT', name: 'Portugal', flag: '🇵🇹' },\n { code: 'RO', name: 'Romania', flag: '🇷🇴' },\n { code: 'SA', name: 'Saudi Arabia', flag: '🇸🇦' },\n { code: 'SG', name: 'Singapore', flag: '🇸🇬' },\n { code: 'SK', name: 'Slovakia', flag: '🇸🇰' },\n { code: 'SI', name: 'Slovenia', flag: '🇸🇮' },\n { code: 'ZA', name: 'South Africa', flag: '🇿🇦' },\n { code: 'ES', name: 'Spain', flag: '🇪🇸' },\n { code: 'SE', name: 'Sweden', flag: '🇸🇪' },\n { code: 'CH', name: 'Switzerland', flag: '🇨🇭' },\n { code: 'TW', name: 'Taiwan', flag: '🇹🇼' },\n { code: 'TH', name: 'Thailand', flag: '🇹🇭' },\n { code: 'TR', name: 'Turkey', flag: '🇹🇷' },\n { code: 'AE', name: 'United Arab Emirates', flag: '🇦🇪' },\n { code: 'GB', name: 'United Kingdom', flag: '🇬🇧' },\n { code: 'UA', name: 'Ukraine', flag: '🇺🇦' },\n { code: 'US', name: 'United States', flag: '🇺🇸' },\n { code: 'UY', name: 'Uruguay', flag: '🇺🇾' },\n { code: 'VE', name: 'Venezuela', flag: '🇻🇪' },\n { code: 'VN', name: 'Vietnam', flag: '🇻🇳' },\n];\n\n// Helper function to get country by code\nexport const getCountryByCode = (code: string): Country | undefined => {\n return COUNTRIES.find((country) => country.code === code);\n};\n\n// Helper function to get country by name (case-insensitive)\nexport const getCountryByName = (name: string): Country | undefined => {\n return COUNTRIES.find((country) => country.name.toLowerCase() === name.toLowerCase());\n};\n\n// EU member states (ISO 3166-1 alpha-2 codes)\n// Source: https://europa.eu/european-union/about-eu/countries_en\nexport const EU_COUNTRY_CODES = [\n 'AT', // Austria\n 'BE', // Belgium\n 'BG', // Bulgaria\n 'HR', // Croatia\n 'CY', // Cyprus\n 'CZ', // Czech Republic\n 'DK', // Denmark\n 'EE', // Estonia\n 'FI', // Finland\n 'FR', // France\n 'DE', // Germany\n 'GR', // Greece\n 'HU', // Hungary\n 'IE', // Ireland\n 'IT', // Italy\n 'LV', // Latvia\n 'LT', // Lithuania\n 'LU', // Luxembourg\n 'MT', // Malta\n 'NL', // Netherlands\n 'PL', // Poland\n 'PT', // Portugal\n 'RO', // Romania\n 'SK', // Slovakia\n 'SI', // Slovenia\n 'ES', // Spain\n 'SE', // Sweden\n] as const;\n\n// Helper function to check if a country is in the EU\nexport const isEUCountry = (countryCode: string): boolean => {\n return (EU_COUNTRY_CODES as readonly string[]).includes(countryCode);\n};\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Textarea as TextAreaPrimitive } from '../../primitives/textarea';\nimport { Typography } from '../typography';\n\nconst textAreaVariants = cva(\n 'rounded-berget-xs bg-card px-4 py-3 transition-colors duration-200 focus-visible:border-berget-form-focus-border focus-visible:ring-0 focus-visible:ring-offset-0 resize-y',\n {\n variants: {\n variant: {\n default: 'border-berget-border-interactive hover:bg-berget-surface-hover',\n primary:\n 'border-berget-primary-border bg-berget-primary-tint hover:bg-berget-surface-hover',\n subtle: 'border-berget-border-subtle hover:bg-berget-surface-hover',\n muted: 'border-berget-border-subtle/50 hover:bg-berget-surface-hover',\n },\n size: {\n sm: 'px-3 py-2 sm:px-4 sm:py-2.5 text-xs sm:text-sm',\n default: 'px-4 py-3 sm:py-3.5 text-sm',\n lg: 'px-5 py-4 sm:py-5 text-base sm:text-lg',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface TextAreaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textAreaVariants> {\n label?: string;\n description?: string;\n error?: string;\n placeholder?: string;\n maxLength?: number;\n showCount?: boolean;\n rows?: number;\n icon?: React.ReactNode;\n secondaryIcon?: React.ReactNode;\n actionButton?: React.ReactNode;\n}\n\nconst TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n className,\n variant,\n size,\n label,\n description,\n error,\n placeholder,\n maxLength,\n showCount,\n rows,\n id,\n disabled,\n value,\n icon,\n secondaryIcon,\n actionButton,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const textareaId = id || generatedId;\n const errorId = `${textareaId}-error`;\n const descriptionId = `${textareaId}-description`;\n const characterCount = typeof value === 'string' ? value.length : 0;\n\n return (\n <div className=\"flex flex-col gap-2\">\n {label && (\n <label\n htmlFor={textareaId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled ? 'text-muted-foreground cursor-not-allowed' : 'text-foreground',\n error && 'text-berget-destructive-foreground',\n )}\n >\n {label}\n </label>\n )}\n\n <div className=\"relative\">\n {icon && <div className=\"absolute left-2 top-1/2 -translate-y-1/2\">{icon}</div>}\n <TextAreaPrimitive\n ref={ref}\n id={textareaId}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={cn(error && errorId, description && descriptionId)}\n className={cn(\n textAreaVariants({ variant, size }),\n error && 'border-berget-destructive-foreground/50 bg-berget-destructive',\n disabled && 'cursor-not-allowed',\n icon && 'pl-11',\n secondaryIcon && 'pr-20',\n actionButton && !secondaryIcon && 'pr-12',\n secondaryIcon && actionButton && 'pr-20',\n className,\n )}\n placeholder={placeholder}\n maxLength={maxLength}\n rows={rows}\n value={value}\n {...props}\n />\n {secondaryIcon && (\n <div className=\"absolute right-12 top-1/2 -translate-y-1/2\">{secondaryIcon}</div>\n )}\n {actionButton && (\n <div className=\"absolute right-2 top-1/2 -translate-y-1/2\">{actionButton}</div>\n )}\n </div>\n\n {(description || error || (showCount && maxLength)) && (\n <div className=\"flex items-center justify-between gap-2\">\n {description && (\n <Typography variant=\"xs\" color=\"muted\" id={descriptionId}>\n {description}\n </Typography>\n )}\n {(error || (showCount && maxLength)) && (\n <div className=\"flex items-center gap-2 ml-auto\">\n {showCount && maxLength && (\n <Typography\n variant=\"xs\"\n className={cn(\n characterCount >= maxLength\n ? 'text-berget-destructive-foreground'\n : 'text-muted-foreground',\n )}\n >\n {characterCount}/{maxLength}\n </Typography>\n )}\n {error && (\n <Typography\n variant=\"xs\"\n id={errorId}\n className=\"text-berget-destructive-foreground\"\n >\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nTextArea.displayName = 'TextArea';\n\nexport { TextArea, textAreaVariants };\n","import * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Label({ className, ...props }: React.ComponentProps<\"label\">) {\n return (\n <label\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 { useMemo } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nimport { Label } from \"@/primitives/label\"\nimport { Separator } from \"@/primitives/separator\"\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<\"fieldset\">) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n \"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({\n className,\n variant = \"legend\",\n ...props\n}: React.ComponentProps<\"legend\"> & { variant?: \"legend\" | \"label\" }) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n \"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n \"group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst fieldVariants = cva(\n \"group/field flex w-full gap-2 data-[invalid=true]:text-destructive\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col *:w-full [&>.sr-only]:w-auto\",\n horizontal:\n \"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n responsive:\n \"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n)\n\nfunction Field({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n \"group/field-content flex flex-1 flex-col gap-0.5 leading-snug\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n \"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n \"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n \"text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5\",\n \"last:mt-0 nth-last-2:-mt-1\",\n \"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n children?: React.ReactNode\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n \"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2\",\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"relative mx-auto block w-fit bg-background px-2 text-muted-foreground\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n )\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<\"div\"> & {\n errors?: Array<{ message?: string } | undefined>\n}) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {uniqueErrors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>\n )}\n </ul>\n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn(\"text-sm font-normal text-destructive\", className)}\n {...props}\n >\n {content}\n </div>\n )\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n}\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Icon } from '../icon/Icon';\nimport { ExternalLink } from 'lucide-react';\n\nconst linkVariants = cva(\n 'inline-flex cursor-pointer items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'text-foreground hover:text-foreground/80',\n primary: 'text-berget-brand-moss-400 hover:text-berget-brand-moss-500',\n secondary: 'text-berget-accent hover:text-berget-accent/80',\n ghost: 'text-muted-foreground hover:text-foreground',\n muted: 'text-muted-foreground hover:text-muted-foreground/80',\n code: 'text-berget-brand-moss-400 hover:text-berget-brand-moss-500 font-mono text-sm bg-berget-primary-tint px-2 py-1 rounded hover:bg-berget-primary-tint-hover',\n },\n size: {\n sm: 'text-sm',\n default: 'text-base',\n lg: 'text-lg',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface LinkProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement>, VariantProps<typeof linkVariants> {\n children: React.ReactNode;\n external?: boolean;\n icon?: React.ReactNode;\n showExternalIcon?: boolean;\n disabled?: boolean;\n}\n\nconst Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n (\n {\n className,\n variant,\n size,\n external = false,\n icon,\n showExternalIcon = false,\n disabled = false,\n children,\n ...props\n },\n ref,\n ) => {\n const isExternal =\n external ||\n (typeof props.href === 'string' &&\n (props.href.startsWith('http://') ||\n props.href.startsWith('https://') ||\n props.href.startsWith('mailto:') ||\n props.href.startsWith('tel:')));\n\n return (\n <a\n ref={ref}\n className={cn(linkVariants({ variant, size }), className)}\n {...(disabled && {\n 'aria-disabled': true,\n onClick: (e: React.MouseEvent) => e.preventDefault(),\n })}\n {...props}\n {...(isExternal &&\n !disabled && {\n rel: 'noopener noreferrer',\n target: '_blank',\n })}\n >\n {children}\n {icon && <span className=\"inline-flex items-center\">{icon}</span>}\n {showExternalIcon && isExternal && !disabled && (\n <span className=\"inline-flex items-center ml-1 opacity-60\" aria-hidden=\"true\">\n <Icon icon={ExternalLink} size={16} />\n </span>\n )}\n </a>\n );\n },\n);\nLink.displayName = 'Link';\n\nexport { Link, linkVariants };\n","import * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst containerVariants = cva('w-full mx-auto', {\n variants: {\n size: {\n sm: 'max-w-3xl',\n md: 'max-w-5xl',\n lg: 'max-w-7xl',\n xl: 'max-w-screen-xl',\n full: 'max-w-full',\n },\n padding: {\n none: 'px-0',\n sm: 'px-4 sm:px-6',\n md: 'px-4 sm:px-6 lg:px-8',\n lg: 'px-4 sm:px-8 lg:px-12',\n },\n },\n defaultVariants: {\n size: 'lg',\n padding: 'md',\n },\n});\n\nexport interface ContainerProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof containerVariants> {\n children?: React.ReactNode;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ className, size, padding, asChild = false, children, ...props }, ref) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(containerVariants({ size, padding }), className),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nContainer.displayName = 'Container';\n\nexport { Container, containerVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst gridVariants = cva('grid', {\n variants: {\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n },\n defaultVariants: {\n align: 'stretch',\n justify: 'start',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport type GridColsScale = 1 | 2 | 3 | 4 | 6 | 12;\n\nexport type GridRowsScale = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface GridProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof gridVariants> {\n children?: React.ReactNode;\n cols?: GridColsScale;\n rows?: GridRowsScale;\n gap?: SpacingScale;\n gapX?: SpacingScale;\n gapY?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Grid = React.forwardRef<HTMLElement, GridProps>(\n (\n { className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n gridVariants({ align, justify }),\n cols !== undefined && `grid-cols-${cols}`,\n rows !== undefined && `grid-rows-${rows}`,\n gap !== undefined && `gap-${gap}`,\n gapX !== undefined && `gap-x-${gapX}`,\n gapY !== undefined && `gap-y-${gapY}`,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nGrid.displayName = 'Grid';\n\nexport { Grid, gridVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined && `gap-${gap}`,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nBox.displayName = 'Box';\n\nexport { Box, boxVariants };\n","import * as React from 'react';\nimport { Globe } from 'lucide-react';\nimport { Icon } from '../icon';\nimport { Button } from '../button';\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n} from '../dropdown-menu';\n\nexport interface LanguageSelectOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface LanguageSelectProps {\n options: LanguageSelectOption[];\n value?: string;\n onValueChange?: (value: string) => void;\n className?: string;\n}\n\nconst LanguageSelect = React.forwardRef<HTMLButtonElement, LanguageSelectProps>(\n ({ className, options, value, onValueChange }, ref) => {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger ref={ref} asChild>\n <Button variant=\"outline\" size=\"icon\" className={className} aria-label=\"Select language\">\n <span className=\"sr-only\">Select language</span>\n <Icon icon={Globe} size={16} aria-hidden={true} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuRadioGroup\n value={value}\n onValueChange={onValueChange ? (v) => onValueChange(v as string) : undefined}\n >\n {options.map((option) => (\n <DropdownMenuRadioItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n // MenuRadioItem defaults to staying open (radio semantics);\n // a language picker closes on selection.\n closeOnClick={true}\n >\n {option.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n },\n);\n\nLanguageSelect.displayName = 'LanguageSelect';\n\nexport { LanguageSelect };\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Icon } from '../icon/Icon';\nimport { Divider } from '../divider';\nimport { Typography } from '../typography';\nimport { Check } from 'lucide-react';\n\nexport interface ListProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n}\n\nconst List = React.forwardRef<HTMLDivElement, ListProps>(\n ({ className, children, ...props }, ref) => {\n const childrenArray = React.Children.toArray(children);\n return (\n <div ref={ref} className={cn('flex flex-col', className)} {...props}>\n {childrenArray.map((child, index) => (\n <React.Fragment key={index}>\n {child}\n {index < childrenArray.length - 1 && <Divider variant=\"subtle\" />}\n </React.Fragment>\n ))}\n </div>\n );\n },\n);\nList.displayName = 'List';\n\nexport interface ListItemProps extends React.HTMLAttributes<HTMLDivElement> {\n icon?: React.ReactNode;\n children: React.ReactNode;\n interactive?: boolean;\n}\n\nconst ListItem = React.forwardRef<HTMLDivElement, ListItemProps>(\n ({ className, icon, children, interactive = true, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex items-center gap-4 px-4 py-3 sm:px-6 sm:py-4',\n interactive && 'transition-all duration-200 hover:bg-berget-surface-hover cursor-pointer',\n className,\n )}\n {...props}\n >\n {icon && <div className=\"flex-shrink-0 flex items-center justify-center\">{icon}</div>}\n <div className=\"flex-1 min-w-0\">{children}</div>\n </div>\n ),\n);\nListItem.displayName = 'ListItem';\n\nexport interface ListHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n}\n\nconst ListHeader = React.forwardRef<HTMLDivElement, ListHeaderProps>(\n ({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('px-4 py-2 sm:px-6 sm:py-3 text-sm text-muted-foreground', className)}\n {...props}\n >\n {children}\n </div>\n ),\n);\nListHeader.displayName = 'ListHeader';\n\nexport interface FeatureListProps extends React.HTMLAttributes<HTMLUListElement> {\n items: string[];\n variant?: 'bullet' | 'checkmark';\n}\n\nconst FeatureList = React.forwardRef<HTMLUListElement, FeatureListProps>(\n ({ items, variant = 'bullet', className, ...props }, ref) => {\n return (\n <ul ref={ref} className={cn('flex flex-col gap-fluid-md', className)} {...props}>\n {items.map((item, index) => (\n <li key={index} className=\"flex items-start gap-fluid-md\">\n {variant === 'bullet' ? (\n <span className=\"w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2\" />\n ) : (\n <div className=\"flex-shrink-0 mt-0.5\">\n <Icon icon={Check} size={24} className=\"text-berget-logo-light\" />\n </div>\n )}\n <Typography variant=\"body\" color=\"muted\">\n {item}\n </Typography>\n </li>\n ))}\n </ul>\n );\n },\n);\nFeatureList.displayName = 'FeatureList';\n\nexport { List, ListItem, ListHeader, FeatureList };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Separator } from '../../primitives/separator';\nimport { Typography } from '../typography';\n\nconst dividerVariants = cva('', {\n variants: {\n variant: {\n default: 'bg-berget-separator',\n subtle: 'bg-berget-separator-subtle',\n strong: 'bg-berget-border-interactive',\n primary: 'bg-berget-primary-border',\n muted: 'bg-berget-separator-subtle',\n },\n size: {\n thin: '',\n medium: '!h-[2px]',\n thick: '!h-[4px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'thin',\n },\n});\n\nexport interface DividerProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dividerVariants> {\n orientation?: 'horizontal' | 'vertical';\n label?: string;\n labelPosition?: 'center' | 'left' | 'right';\n}\n\nconst Divider = React.forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n className,\n orientation = 'horizontal',\n variant,\n size,\n label,\n labelPosition = 'center',\n ...props\n },\n ref,\n ) => {\n if (label) {\n return (\n <div ref={ref} className={cn('flex items-center w-full', className)} {...props}>\n {labelPosition !== 'right' && (\n <Separator\n orientation=\"horizontal\"\n className={cn(dividerVariants({ variant, size }), 'flex-1')}\n />\n )}\n <Typography variant=\"small\" color=\"muted\" className=\"px-4 whitespace-nowrap\">\n {label}\n </Typography>\n {labelPosition !== 'left' && (\n <Separator\n orientation=\"horizontal\"\n className={cn(dividerVariants({ variant, size }), 'flex-1')}\n />\n )}\n </div>\n );\n }\n\n return (\n <Separator\n ref={ref as React.Ref<never>}\n orientation={orientation}\n className={cn(\n dividerVariants({ variant, size }),\n orientation === 'vertical' && 'h-full !w-[1px]',\n className,\n )}\n />\n );\n },\n);\nDivider.displayName = 'Divider';\n\nexport { Divider, dividerVariants };\n","import { useState, useEffect, useCallback } from 'react';\nimport { Copy, Check } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { getHighlighter } from '../../lib/shiki';\n\nexport interface CodeBlockProps {\n code: string;\n language?: string;\n title?: string;\n className?: string;\n}\n\nexport function CodeBlock({ code, language = 'text', title, className }: CodeBlockProps) {\n const [html, setHtml] = useState<string | null>(null);\n const [copied, setCopied] = useState(false);\n\n useEffect(() => {\n getHighlighter().then((highlighter) => {\n const loadedLangs = highlighter.getLoadedLanguages();\n const lang = loadedLangs.includes(language) ? language : 'text';\n setHtml(highlighter.codeToHtml(code, { lang, theme: 'berget' }));\n });\n }, [code, language]);\n\n const handleCopy = useCallback(async () => {\n await navigator.clipboard.writeText(code);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }, [code]);\n\n const copyButton = (\n <button\n onClick={handleCopy}\n className=\"flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors\"\n aria-label=\"Copy code\"\n >\n {copied ? <Check className=\"w-3.5 h-3.5\" /> : <Copy className=\"w-3.5 h-3.5\" />}\n </button>\n );\n\n return (\n <div\n className={cn(\n 'rounded-berget-xs border bg-berget-codeblock-bg border-berget-border backdrop-blur-[12px] relative overflow-hidden isolate',\n className,\n )}\n >\n {title && (\n <div className=\"!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg\">\n <span className=\"text-berget-muted-foreground\">{title}</span>\n </div>\n )}\n <div className=\"absolute right-2 top-2 z-10\">{copyButton}</div>\n {html ? (\n <div\n className=\"[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent\"\n dangerouslySetInnerHTML={{ __html: html }}\n />\n ) : (\n <pre className=\"!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground\">\n <code>{code}</code>\n </pre>\n )}\n </div>\n );\n}\n","import * as React from 'react';\nimport { useState } from 'react';\nimport { cn } from '../../lib/utils';\n\nexport interface WindowTab {\n id: string;\n label: string;\n}\n\nexport interface WindowFrameProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Window title shown in the title bar when no tabs are provided */\n title?: string;\n /** Optional tabs for switching content */\n tabs?: WindowTab[];\n /** Controlled active tab ID */\n activeTab?: string;\n /** Callback when a tab is selected */\n onTabChange?: (tabId: string) => void;\n}\n\nexport const WindowFrame = React.forwardRef<HTMLDivElement, WindowFrameProps>(\n ({ title = 'window', tabs, activeTab, onTabChange, children, className, ...props }, ref) => {\n const [internalActive, setInternalActive] = useState(tabs?.[0]?.id ?? '');\n const currentTab = activeTab ?? internalActive;\n\n const handleTabChange = (id: string) => {\n if (onTabChange) {\n onTabChange(id);\n } else {\n setInternalActive(id);\n }\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n 'rounded-berget-sm overflow-hidden shadow-berget-md border border-berget-brand-granite-700 bg-berget-brand-granite-800',\n className,\n )}\n {...props}\n >\n {/* Title bar */}\n <div className=\"flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900\">\n <div className=\"flex items-center gap-2 flex-shrink-0\">\n <div className=\"w-3 h-3 rounded-full bg-berget-brand-muscaria-400\" />\n <div className=\"w-3 h-3 rounded-full bg-berget-brand-chanterelle-200\" />\n <div className=\"w-3 h-3 rounded-full bg-berget-brand-moss-400\" />\n </div>\n\n {tabs && tabs.length > 0 ? (\n <div className=\"ml-4 flex items-center gap-1\">\n {tabs.map((tab) => (\n <button\n key={tab.id}\n type=\"button\"\n onClick={() => handleTabChange(tab.id)}\n className={cn(\n 'px-3 py-1 text-sm transition-colors cursor-pointer',\n currentTab === tab.id\n ? 'rounded-berget-xs bg-white/10 text-berget-foreground font-medium'\n : 'rounded text-berget-muted-foreground hover:text-berget-foreground font-medium',\n )}\n >\n {tab.label}\n </button>\n ))}\n </div>\n ) : (\n <span className=\"ml-4 text-sm font-mono text-berget-brand-moss-400\">{title}</span>\n )}\n </div>\n\n {/* Content area */}\n <div>{children}</div>\n </div>\n );\n },\n);\n\nWindowFrame.displayName = 'WindowFrame';\n","import { useEffect, useRef } from 'react';\nimport { cn } from '../../lib/utils';\n\n/**\n * FogIllustration — a volumetric fog raymarcher rendered as chunky\n * 1-bit dither in a given palette.\n *\n * Two GPU passes: the scene is raymarched at low internal resolution\n * (ridged fbm ground, drifting fog volumes, air haze — the fog hides\n * the low resolution), then a full-resolution pass thresholds the\n * scene against a Bayer matrix with hash jitter: ink dots on milk,\n * with moss-tinted dots where fog dominates.\n *\n * The canvas fills its parent element; give the parent a size.\n * Pauses under prefers-reduced-motion after one frame.\n */\n\nexport type FogPalette = {\n /** Dark terrain and dither ink. */\n ink: string;\n /** Background the dots sit on. */\n milk: string;\n /** Tint for dots where fog dominates. */\n moss: string;\n};\n\n/** The Berget brand palette, as rendered sRGB. */\nexport const FOG_BRAND_PALETTE: FogPalette = {\n ink: '#171a1a',\n milk: '#f7f5ed',\n moss: '#598c6b',\n};\n\nexport interface FogIllustrationProps {\n /** Colors as hex strings. Unset keys fall back to the brand palette. */\n palette?: Partial<FogPalette>;\n /** Flight speed multiplier @default 1 */\n speed?: number;\n /** Additional CSS classes for the canvas element */\n className?: string;\n}\n\nconst hexToRgb = (hex: string): [number, number, number] => {\n let h = hex.replace('#', '');\n if (h.length === 3)\n h = h\n .split('')\n .map((c) => c + c)\n .join('');\n const n = Number.parseInt(h, 16);\n return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];\n};\n\nconst hexToRgbAll = (p: FogPalette) => ({\n ink: hexToRgb(p.ink),\n milk: hexToRgb(p.milk),\n moss: hexToRgb(p.moss),\n});\n\nconst VERT = `#version 300 es\nvoid main() {\n vec2 p = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));\n gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0);\n}`;\n\n/** Pass A — raymarch the foggy terrain at low resolution. */\nconst SCENE_FRAG = `#version 300 es\nprecision highp float;\nout vec4 outColor;\nuniform vec2 uRes;\nuniform float uTime;\nuniform sampler2D uNoise;\n\nfloat noise(vec3 x) {\n // 3D value noise from the 2D random texture — iq's two-slice trick:\n // z slices are tiled into the u axis, two neighbours mixed by fract(z).\n vec3 p = floor(x), f = fract(x);\n f = f * f * (3.0 - 2.0 * f);\n vec2 uv = (p.xy + vec2(37.0, 239.0) * p.z) + f.xy;\n vec2 rg = texture(uNoise, (uv + 0.5) / 256.0).xy;\n return mix(rg.x, rg.y, f.z) * 2.0 - 1.0;\n}\n\nfloat ground(vec3 pos, int oct) {\n float f = 0.0;\n float s = 1.4;\n vec3 p = pos * s * 0.1;\n for (int i = 0; i < 6; i++) {\n if (i >= oct) break;\n f += abs(noise(p)) * s;\n p = vec3(p.z * 5.0, p.xy * 3.0 + p.yx * 4.0 * vec2(1, -1)) * 2.0 / 5.0;\n s /= 2.0;\n }\n return (pos.y + f) * 0.8;\n}\n\nfloat fogD(vec3 pos, int oct) {\n float f = 0.0;\n float s = 1.0;\n vec3 p = pos * 0.7;\n p += uTime * vec3(0.0, -0.02, 0.02);\n for (int i = 0; i < 6; i++) {\n if (i >= oct) break;\n f += noise(p) * s;\n p = vec3(p.z * 5.0, p.xy * 3.0 + p.yx * 4.0 * vec2(1, -1)) * 2.0 / 5.0;\n s /= 1.7;\n }\n f += smoothstep(0.2, 0.0, abs(pos.y + 1.0)) * 0.4;\n f += smoothstep(0.35, 0.15, abs(pos.y - 0.02)) * 0.7;\n f *= 1.0 - smoothstep(-0.1, 0.55, pos.y);\n f = smoothstep(0.45, 1.7, f);\n float g = ground(pos, 2);\n f *= 1.0 - g / (abs(g) + 0.04);\n return f;\n}\n\nfloat airD(vec3 pos) { return exp2(-pos.y / 5.0 - 3.0); }\n\nvoid main() {\n float time = uTime * 0.2;\n vec3 velocity = vec3(1.0, 0.0, 0.0);\n vec3 camPos = vec3(sin(time * 0.618) * 0.4, 0.62 + 0.08 * sin(time), 0.0) + time * velocity;\n vec3 camLook = vec3(-1.0, -0.3, 4.0) + (time - sin(time)) * velocity;\n\n vec2 fc = gl_FragCoord.xy;\n vec3 ray = vec3((fc - uRes * 0.5) / uRes.x, 1.0);\n vec3 camDir = normalize(camLook - camPos);\n vec3 camRight = normalize(cross(vec3(0.0, 1.0, 0.0), camDir));\n vec3 camUp = cross(camDir, camRight);\n ray = normalize(ray.x * camRight + ray.y * camUp + ray.z * camDir);\n\n vec3 sunDir = normalize(vec3(-3.0, 2.0, 1.0));\n\n vec3 pos = camPos;\n float absorption = 1.0;\n float emission = 0.0;\n float fogFactor = 0.0;\n float lastStride = 0.0;\n float lastFog = 0.0;\n float lastAir = 0.0;\n\n for (int i = 0; i < 80; i++) {\n float h = ground(pos, 4);\n float fog = fogD(pos, 3);\n float fogIntegral = lastStride * mix(fog, lastFog, 0.5);\n float air = airD(pos);\n float airIntegral = lastStride * mix(air, lastAir, 0.5);\n\n float fogAbsDelta = pow(0.1, fogIntegral);\n float fogEmiDelta = 1.0 - fogAbsDelta;\n float shadowStep = 0.07;\n float shadow = (fog - fogD(pos + sunDir * shadowStep, 2)) / shadowStep;\n fogEmiDelta *= mix(0.2, 0.85, smoothstep(-1.0, 1.0, shadow));\n\n float airAbsDelta = pow(0.55, airIntegral);\n float airEmiDelta = (1.0 - pow(0.55, airIntegral)) * 0.5;\n\n float absDelta = fogAbsDelta * airAbsDelta;\n emission += absorption * sqrt(absDelta) * (fogEmiDelta + airEmiDelta);\n absorption *= absDelta;\n\n fogFactor = max(fogFactor, (1.0 - absorption) * step(0.05, fog));\n\n lastFog = fog;\n lastAir = air;\n h = min(h, 0.1);\n lastStride = h;\n pos += h * ray;\n if (h < 0.001) break;\n }\n\n float brightness;\n if (absorption > 0.02) {\n // terrain visible — light it\n vec2 d = vec2(-1.0, 1.0) * 0.02;\n vec3 normal = normalize(\n ground(pos + d.xxx, 5) * d.xxx +\n ground(pos + d.xyy, 5) * d.xyy +\n ground(pos + d.yxy, 5) * d.yxy +\n ground(pos + d.yyx, 5) * d.yyx\n );\n float ao = smoothstep(-0.2, 1.5, ground(pos + normal * 0.3, 5) / 0.3);\n float shade = (0.5 * ao + 0.5 * max(dot(normal, sunDir), 0.0)) * 0.65;\n brightness = shade * absorption + emission;\n } else {\n brightness = emission;\n }\n\n // Clear sky — rays that escape upward land on milk, whatever the\n // haze did. The poster look: light sky, dark ridges, fog between.\n float sky = smoothstep(-0.15, 0.35, ray.y) * 0.92;\n brightness = max(brightness, sky * absorption);\n\n outColor = vec4(clamp(brightness, 0.0, 1.0), clamp(fogFactor, 0.0, 1.0), 0.0, 1.0);\n}`;\n\n/** Pass B — full-resolution 1-bit dither of the scene. */\nconst DITHER_FRAG = `#version 300 es\nprecision highp float;\nout vec4 outColor;\nuniform vec2 uRes;\nuniform float uDot;\nuniform sampler2D uScene;\nuniform vec3 uInk;\nuniform vec3 uMilk;\nuniform vec3 uMoss;\n\nfloat bayer2(vec2 a) { a = floor(a); return fract(a.x / 2.0 + a.y * a.y * 0.75); }\nfloat bayer4(vec2 a) { return bayer2(0.5 * a) * 0.25 + bayer2(a); }\nfloat hash12(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\nvoid main() {\n // Chunky cells: one dot decision per uDot×uDot block — the dither\n // reads as visible pixels, not 1px noise.\n vec2 cell = floor(gl_FragCoord.xy / uDot);\n vec4 scene = texture(uScene, (cell * uDot + uDot * 0.5) / uRes);\n float darkness = 1.0 - scene.r;\n float jitter = (hash12(cell) - 0.5) * 0.3;\n float on = step(darkness, bayer4(cell) + jitter);\n vec3 col = scene.g > 0.5 ? uMoss : uInk;\n outColor = vec4(mix(col, uMilk, on), 1.0);\n}`;\n\nconst compile = (gl: WebGL2RenderingContext, type: number, src: string): WebGLShader => {\n const sh = gl.createShader(type);\n if (!sh) throw new Error('shader creation failed');\n gl.shaderSource(sh, src);\n gl.compileShader(sh);\n if (!gl.getShaderParameter(sh, gl.COMPILE_STATUS)) {\n throw new Error(gl.getShaderInfoLog(sh) || 'shader compile failed');\n }\n return sh;\n};\n\nconst program = (gl: WebGL2RenderingContext, frag: string): WebGLProgram => {\n const p = gl.createProgram();\n if (!p) throw new Error('program creation failed');\n gl.attachShader(p, compile(gl, gl.VERTEX_SHADER, VERT));\n gl.attachShader(p, compile(gl, gl.FRAGMENT_SHADER, frag));\n gl.linkProgram(p);\n if (!gl.getProgramParameter(p, gl.LINK_STATUS)) {\n throw new Error(gl.getProgramInfoLog(p) || 'program link failed');\n }\n return p;\n};\n\nexport const FogIllustration = ({ palette, speed = 1, className }: FogIllustrationProps) => {\n const ref = useRef<HTMLCanvasElement>(null);\n // Live props — the GL setup runs once; palette and speed changes\n // apply on the next frame without rebuilding the context.\n const live = useRef({ palette: { ...FOG_BRAND_PALETTE, ...palette }, speed });\n live.current = { palette: { ...FOG_BRAND_PALETTE, ...palette }, speed };\n\n useEffect(() => {\n const canvas = ref.current;\n const parent = canvas?.parentElement;\n if (!canvas || !parent) return;\n\n // preserveDrawingBuffer keeps the frame readable for screenshots —\n // the cost is negligible for a decorative illustration.\n const gl = canvas.getContext('webgl2', {\n antialias: false,\n alpha: false,\n preserveDrawingBuffer: true,\n });\n if (!gl) return;\n\n let sceneProg: WebGLProgram;\n let ditherProg: WebGLProgram;\n try {\n sceneProg = program(gl, SCENE_FRAG);\n ditherProg = program(gl, DITHER_FRAG);\n } catch (err) {\n console.error('fog shader failed:', err);\n return; // shader failed — leave the panel empty rather than broken\n }\n\n // Noise texture — the Shadertoy iChannel1 stand-in.\n const noiseTex = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, noiseTex);\n const N = 256;\n const data = new Uint8Array(N * N * 4);\n for (let i = 0; i < data.length; i += 4) {\n data[i] = Math.random() * 256;\n data[i + 1] = Math.random() * 256;\n data[i + 2] = Math.random() * 256;\n data[i + 3] = 255;\n }\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, N, N, 0, gl.RGBA, gl.UNSIGNED_BYTE, data);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\n // Low-res scene target.\n const sceneTex = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, sceneTex);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n const fbo = gl.createFramebuffer();\n\n const SCALE = 0.3; // internal raymarch resolution\n const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n const start = performance.now();\n let raf = 0;\n let last = 0;\n\n const render = (elapsed: number) => {\n const w = parent.clientWidth;\n const h = parent.clientHeight;\n if (w === 0 || h === 0) return;\n const dpr = Math.min(window.devicePixelRatio || 1, 2);\n if (canvas.width !== Math.round(w * dpr) || canvas.height !== Math.round(h * dpr)) {\n canvas.width = Math.round(w * dpr);\n canvas.height = Math.round(h * dpr);\n }\n const sceneW = Math.max(64, Math.round(w * SCALE));\n const sceneH = Math.max(64, Math.round(h * SCALE));\n gl.bindTexture(gl.TEXTURE_2D, sceneTex);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, sceneW, sceneH, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n\n const t = elapsed * live.current.speed;\n\n // Pass A — scene at low resolution.\n gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, sceneTex, 0);\n gl.viewport(0, 0, sceneW, sceneH);\n gl.useProgram(sceneProg);\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, noiseTex);\n gl.uniform1i(gl.getUniformLocation(sceneProg, 'uNoise'), 0);\n gl.uniform2f(gl.getUniformLocation(sceneProg, 'uRes'), sceneW, sceneH);\n gl.uniform1f(gl.getUniformLocation(sceneProg, 'uTime'), t);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n\n // Pass B — dither at full resolution.\n const { ink, milk, moss } = hexToRgbAll(live.current.palette);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, canvas.width, canvas.height);\n gl.useProgram(ditherProg);\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, sceneTex);\n gl.uniform1i(gl.getUniformLocation(ditherProg, 'uScene'), 0);\n gl.uniform2f(gl.getUniformLocation(ditherProg, 'uRes'), canvas.width, canvas.height);\n gl.uniform1f(gl.getUniformLocation(ditherProg, 'uDot'), Math.max(3, Math.round(dpr * 2)));\n gl.uniform3f(gl.getUniformLocation(ditherProg, 'uInk'), ...ink);\n gl.uniform3f(gl.getUniformLocation(ditherProg, 'uMilk'), ...milk);\n gl.uniform3f(gl.getUniformLocation(ditherProg, 'uMoss'), ...moss);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n };\n\n render(0);\n if (!reduced) {\n const frame = (now: number) => {\n if (now - last >= 1000 / 30) {\n last = now;\n render((now - start) / 1000);\n }\n raf = requestAnimationFrame(frame);\n };\n raf = requestAnimationFrame(frame);\n }\n const observer = new ResizeObserver(() => render((performance.now() - start) / 1000));\n observer.observe(parent);\n\n return () => {\n cancelAnimationFrame(raf);\n observer.disconnect();\n gl.deleteProgram(sceneProg);\n gl.deleteProgram(ditherProg);\n gl.deleteTexture(noiseTex);\n gl.deleteTexture(sceneTex);\n gl.deleteFramebuffer(fbo);\n };\n }, []);\n\n return <canvas ref={ref} aria-hidden=\"true\" className={cn('size-full', className)} />;\n};\n"],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B,YAAI,MAAM,QAAQ,MAAO,IAAI;AAC3B,iBAAO;AACP,kBAAQ,MAAM,SAAS,GAAI;AAAA,QAC7B;AACA,cAAM,sBAAsB,KAAK;AAAA,MACnC;AACA,YAAM,sBAAsB,KAAK;AAAA,IACnC;AACA,UAAM,WAAW,IAAI,eAAe,MAAM,QAAQ,YAAY,IAAI,IAAI,SAAS,GAAI,CAAC;AACpF,aAAS,QAAQ,MAAM;AAEvB,WAAO,MAAM;AACX,2BAAqB,GAAG;AACxB,eAAS,WAAW;AACpB,SAAG,cAAc,SAAS;AAC1B,SAAG,cAAc,UAAU;AAC3B,SAAG,cAAc,QAAQ;AACzB,SAAG,cAAc,QAAQ;AACzB,SAAG,kBAAkB,GAAG;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO,gBAAAD,MAAC,YAAO,KAAU,eAAY,QAAO,WAAW,GAAG,aAAa,SAAS,GAAG;AACrF;","names":["ThemeProvider","React","React","jsx","cn","jsx","jsx","Button","React","cva","jsx","cva","React","cva","cn","jsx","jsx","cva","Card","React","cva","jsx","jsxs","cva","React","React","React","jsx","jsxs","aspectRatio","width","height","jsx","jsxs","Icon","jsx","jsxs","Card","React","cva","cva","cn","jsx","jsx","alertVariants","cva","Alert","React","jsx","jsxs","React","jsx","jsxs","React","Fragment","jsx","jsxs","NavigationMenuPrimitive","cva","cva","cn","jsx","jsxs","jsx","cn","cva","jsx","cn","jsx","cn","jsx","jsxs","NavigationMenuPrimitive","navigationMenuTriggerStyle","cva","React","cva","cn","React","cn","jsx","cn","jsx","cn","jsx","jsxs","jsx","cn","jsxs","jsx","cn","cn","jsx","cn","jsx","jsxs","jsx","jsxs","cn","jsx","jsxs","open","cn","cva","jsx","jsxs","SidebarGroupLabel","SidebarProvider","SidebarGroup","SidebarFooter","SidebarHeader","SidebarMenuButton","SidebarMenuSubButton","React","cn","jsx","jsx","Table","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","React","mergeProps","useRender","cva","cn","jsx","cn","cva","useRender","mergeProps","jsx","Item","ItemMedia","jsx","ItemTitle","ItemDescription","ItemSeparator","React","jsx","jsxs","Input","React","CheckboxPrimitive","Check","cva","cn","jsx","jsx","jsxs","cva","Checkbox","CheckboxPrimitive","Check","React","cva","jsx","jsxs","cva","React","cva","cn","ChevronDownIcon","CheckIcon","jsx","jsxs","jsx","cn","jsxs","ChevronDownIcon","jsxs","cn","jsx","CheckIcon","jsx","cn","ChevronDownIcon","jsx","jsxs","cva","Select","value","React","ChevronDown","React","jsx","cn","jsx","cn","DialogPrimitive","cn","XIcon","jsx","jsxs","cva","cn","cn","jsx","jsx","cn","cva","CheckIcon","jsx","jsxs","cn","jsx","jsxs","cn","jsxs","cn","jsx","CheckIcon","Fragment","jsx","jsxs","ChevronDown","React","cva","jsx","jsxs","cva","cn","jsx","useMemo","cva","cn","jsx","jsxs","cn","cva","useMemo","React","cva","jsx","jsxs","cva","React","mergeProps","useRender","cva","cva","useRender","mergeProps","React","cva","mergeProps","useRender","cva","useRender","mergeProps","React","cva","mergeProps","useRender","cva","useRender","mergeProps","React","Globe","jsx","jsxs","Button","Globe","React","React","cva","jsx","jsxs","cva","Check","jsx","jsxs","useState","useEffect","useCallback","Check","jsx","jsxs","useState","useEffect","useCallback","Check","React","useState","jsx","jsxs","useState","useEffect","jsx","useEffect"]}
1
+ {"version":3,"sources":["../src/components/theme-provider/ThemeProvider.tsx","../src/components/theme-provider/ThemeToggle.tsx","../src/lib/utils.ts","../src/primitives/button.tsx","../src/components/button/Button.tsx","../src/components/typography/Typography.tsx","../src/components/card/Card.tsx","../src/primitives/card.tsx","../src/components/badge/Badge.tsx","../src/components/model-card/ModelCard.tsx","../src/components/model-logo/ModelLogo.tsx","../src/components/berget-logo/BergetLogo.tsx","../src/components/alert/Alert.tsx","../src/primitives/alert.tsx","../src/components/dialog/Dialog.tsx","../src/components/alert-dialog/AlertDialog.tsx","../src/components/dropdown-menu/DropdownMenu.tsx","../src/components/navigation-menu/NavigationMenu.tsx","../src/primitives/navigation-menu.tsx","../src/primitives/sidebar.tsx","../src/hooks/use-mobile.tsx","../src/primitives/input.tsx","../src/primitives/separator.tsx","../src/primitives/sheet.tsx","../src/primitives/skeleton.tsx","../src/primitives/tooltip.tsx","../src/components/sidebar/Sidebar.tsx","../src/components/table/Table.tsx","../src/primitives/table.tsx","../src/components/item/Item.tsx","../src/primitives/item.tsx","../src/components/search-input/SearchInput.tsx","../src/components/checkbox/Checkbox.tsx","../src/primitives/checkbox.tsx","../src/components/switch/Switch.tsx","../src/primitives/select.tsx","../src/components/country-select/CountrySelect.tsx","../src/components/icon/Icon.tsx","../src/primitives/popover.tsx","../src/primitives/command.tsx","../src/primitives/dialog.tsx","../src/primitives/input-group.tsx","../src/primitives/textarea.tsx","../src/components/country-select/countries.ts","../src/primitives/label.tsx","../src/primitives/field.tsx","../src/components/link/Link.tsx","../src/components/container/Container.tsx","../src/components/grid/Grid.tsx","../src/components/box/Box.tsx","../src/components/language-select/LanguageSelect.tsx","../src/components/list/List.tsx","../src/components/divider/Divider.tsx","../src/components/code-block/CodeBlock.tsx","../src/components/window-frame/WindowFrame.tsx","../src/components/fog-illustration/FogIllustration.tsx"],"sourcesContent":["import * as React from 'react';\n\ntype Theme = 'dark' | 'light' | 'system';\n\ninterface ThemeState {\n theme: Theme;\n resolvedTheme: 'dark' | 'light';\n}\n\ninterface ThemeProviderContextValue extends ThemeState {\n setTheme: (theme: Theme) => void;\n}\n\nconst ThemeProviderContext = React.createContext<ThemeProviderContextValue | undefined>(undefined);\n\nconst STORAGE_KEY = 'berget-theme';\n\nfunction getSystemTheme(): 'dark' | 'light' {\n return window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';\n}\n\nfunction resolveTheme(theme: Theme): ThemeState {\n return {\n theme,\n resolvedTheme: theme === 'system' ? getSystemTheme() : theme,\n };\n}\n\nexport interface ThemeProviderProps {\n children: React.ReactNode;\n /** Explicitly set and lock the theme ('light' or 'dark').\n * When provided, `setTheme` is a no-op and localStorage is ignored. */\n theme?: 'light' | 'dark';\n}\n\nconst ThemeProvider = React.memo(function ThemeProvider({\n children,\n theme: controlledTheme,\n}: ThemeProviderProps) {\n const isControlled = controlledTheme !== undefined;\n\n const [state, setState] = React.useState<ThemeState>(() => {\n if (isControlled) {\n return resolveTheme(controlledTheme);\n }\n\n let theme: Theme = 'system';\n try {\n const stored = localStorage.getItem(STORAGE_KEY) as Theme | null;\n if (stored && ['dark', 'light', 'system'].includes(stored)) {\n theme = stored;\n }\n } catch {\n /* ignore */\n }\n\n return resolveTheme(theme);\n });\n\n // Sync DOM attribute\n React.useEffect(() => {\n document.documentElement.setAttribute('data-theme', state.resolvedTheme);\n }, [state.resolvedTheme]);\n\n // Controlled sync: if theme prop changes, override state\n React.useEffect(() => {\n if (isControlled && state.theme !== controlledTheme) {\n setState(resolveTheme(controlledTheme));\n }\n }, [isControlled, controlledTheme, state.theme]);\n\n const setTheme = React.useCallback(\n (theme: Theme) => {\n if (isControlled) return;\n\n const next = resolveTheme(theme);\n setState(next);\n\n try {\n localStorage.setItem(STORAGE_KEY, theme);\n } catch {\n /* ignore */\n }\n },\n [isControlled],\n );\n\n // System preference listener (only when system is active and not controlled)\n React.useEffect(() => {\n if (isControlled || state.theme !== 'system') return;\n\n const media = window.matchMedia('(prefers-color-scheme: light)');\n const handler = () => {\n setState((prev) => ({\n ...prev,\n resolvedTheme: getSystemTheme(),\n }));\n };\n\n media.addEventListener('change', handler);\n return () => media.removeEventListener('change', handler);\n }, [isControlled, state.theme]);\n\n const value = React.useMemo(\n () => ({\n ...state,\n setTheme,\n }),\n [state, setTheme],\n );\n\n return <ThemeProviderContext.Provider value={value}>{children}</ThemeProviderContext.Provider>;\n});\n\nfunction useTheme(): ThemeProviderContextValue {\n const context = React.useContext(ThemeProviderContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider.');\n }\n return context;\n}\n\nexport { ThemeProvider, useTheme };\nexport type { Theme };\n","import * as React from 'react';\nimport { useTheme } from './ThemeProvider';\nimport { cn } from '../../lib/utils';\n\nexport interface ThemeToggleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Accessible label for the toggle button */\n label?: string;\n /** Force a specific size class */\n size?: 'sm' | 'md' | 'lg';\n}\n\nconst ThemeToggle = React.forwardRef<HTMLButtonElement, ThemeToggleProps>(\n ({ className, label = 'Toggle theme', size = 'md', ...props }, ref) => {\n const { theme, resolvedTheme, setTheme } = useTheme();\n\n const toggle = React.useCallback(() => {\n setTheme(theme === 'dark' ? 'light' : 'dark');\n }, [theme, setTheme]);\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={toggle}\n aria-label={label}\n title={`Toggle ${resolvedTheme === 'dark' ? 'light' : 'dark'} mode`}\n className={cn(\n 'relative inline-flex items-center justify-center rounded-full cursor-pointer',\n 'transition-colors duration-200',\n 'hover:bg-berget-surface-hover',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring',\n size === 'sm' && 'w-7 h-7',\n size === 'md' && 'w-9 h-9',\n size === 'lg' && 'w-11 h-11',\n className,\n )}\n {...props}\n >\n {/* Sun */}\n <svg\n className={cn(\n 'absolute transition-all duration-200',\n resolvedTheme === 'dark'\n ? 'opacity-100 scale-100 rotate-0'\n : 'opacity-0 scale-0 -rotate-90',\n size === 'sm' && 'w-3.5 h-3.5',\n size === 'md' && 'w-4 h-4',\n size === 'lg' && 'w-5 h-5',\n )}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path\n strokeLinecap=\"round\"\n d=\"M12 2v2m0 16v2m9-10h-2M5 12H3m15.36 6.36-1.41-1.41M6.05 6.05 4.64 4.64m12.72 0-1.41 1.41M6.05 17.95l-1.41 1.41\"\n />\n </svg>\n\n {/* Moon */}\n <svg\n className={cn(\n 'absolute transition-all duration-200',\n resolvedTheme === 'light'\n ? 'opacity-100 scale-100 rotate-0'\n : 'opacity-0 scale-0 rotate-90',\n size === 'sm' && 'w-3.5 h-3.5',\n size === 'md' && 'w-4 h-4',\n size === 'lg' && 'w-5 h-5',\n )}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z\"\n />\n </svg>\n </button>\n );\n },\n);\n\nThemeToggle.displayName = 'ThemeToggle';\n\nexport { ThemeToggle };\n","import * as React from 'react';\nimport { clsx, type ClassValue } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n// Extend tailwind-merge to recognise custom utilities from @theme.\nconst twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n rounded: [\n 'rounded-berget-none',\n 'rounded-berget-xs',\n 'rounded-berget-sm',\n 'rounded-berget-md',\n 'rounded-berget-lg',\n 'rounded-berget-full',\n ],\n 'font-size': [\n 'text-h1',\n 'text-h2',\n 'text-h3',\n 'text-h4',\n 'text-p',\n 'text-mono',\n 'text-hero',\n 'text-caption',\n ],\n },\n },\n});\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Bridge for the legacy Radix `asChild` boolean on Berget primitive wrappers.\n * Base UI replaces `asChild` with a `render` prop: this helper returns the\n * element to pass to `render` (or `undefined` when not composing), so the\n * public design-system API can keep `<Trigger asChild><Button/></Trigger>`.\n */\nexport function asChildRender(\n asChild: boolean | undefined,\n children: React.ReactNode,\n): React.ReactElement | undefined {\n if (!asChild) return undefined;\n return React.Children.only(children) as React.ReactElement;\n}\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nconst buttonVariants = cva(\n \"group/button inline-flex cursor-pointer shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline:\n \"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n icon: \"size-8\",\n \"icon-xs\":\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\":\n \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\n \"icon-lg\": \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","import type * as React from 'react';\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Button as ButtonPrimitive, buttonVariants } from '../../primitives/button';\nimport type { VariantProps } from 'class-variance-authority';\n\n/** Variants exposed by the Berget wrapper. */\ntype CustomVariant = 'default' | 'primary' | 'destructive' | 'outline' | 'ghost' | 'link';\n\n/** Props for the Berget Button wrapper. */\nexport interface ButtonProps extends Omit<\n React.ComponentProps<typeof ButtonPrimitive>,\n 'variant' | 'ref'\n> {\n /** Visual style variant. `primary` is Berget-specific. */\n variant?: CustomVariant;\n /** Full width or auto width. */\n width?: 'default' | 'full';\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/**\n * Shared interaction chrome for every variant.\n *\n * The primitive already provides hover/focus/disabled plumbing via shadcn\n * tokens (`--primary`, `--muted`, `--ring`, …), which the shadcn bridge in\n * `styles/index.css` maps to brand values. These classes neutralise the bits\n * that don't fit the Berget system and apply the component-scoped\n * `--berget-button-*` state tokens:\n *\n * - Focus: always visible on keyboard focus (`focus-visible`), drawn as a\n * real CSS **outline** (2px, offset 2px) in `--berget-button-focus-ring`\n * (moss-300 dark / moss-600 light, ≥3:1 against the surface per\n * WCAG 2.4.7) — not a ring/box-shadow hugging the edge, and the control's\n * own border keeps its resting colour.\n * - Disabled: replaces the primitive's flat `opacity-50` fade with explicit\n * muted tokens so every variant stays legible (≥3:1, and disabled UI is\n * exempt from AA text contrast per WCAG 1.4.3).\n *\n * `dark:` is intentionally absent — it tracks `prefers-color-scheme`, not the\n * Berget theme. Theme switching is driven entirely by the semantic tokens.\n */\nconst interactionClasses = cn(\n // Outline-based focus indicator; neutralise the primitive's ring (the\n // ring colour class is left — harmless at width 0).\n 'focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:ring-0',\n // Neutralise the primitive's disabled fade; variants apply their own tokens.\n 'disabled:pointer-events-none disabled:opacity-100 disabled:cursor-not-allowed',\n // No press movement: same compound selector as the primitive base's 1px\n // active translate so tailwind-merge strips it down to 0.\n 'active:not-aria-[haspopup]:translate-y-0',\n);\n\n/** Disabled treatment shared by every variant. */\nconst disabledClasses = 'disabled:text-berget-button-disabled-fg disabled:shadow-none';\n\n/** Brand-specific classes applied *on top* of the upstream primitive. */\nfunction brandVariantClasses(variant?: CustomVariant): string {\n switch (variant) {\n case 'primary':\n return cn(\n // Flat tinted-glass fill; the alpha carries the state, so no shadow lift.\n 'bg-berget-button-primary-bg text-berget-button-primary-fg',\n 'hover:bg-berget-button-primary-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the primary fg token.\n 'hover:text-berget-button-primary-fg',\n 'active:bg-berget-button-primary-active',\n // Keep the resting (transparent) border on focus — the outline is the indicator.\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-primary-disabled-bg',\n );\n case 'destructive':\n return cn(\n 'bg-berget-button-destructive-bg text-berget-button-destructive-fg',\n 'hover:bg-berget-button-destructive-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n 'hover:text-berget-button-destructive-hover-fg',\n 'active:bg-berget-button-destructive-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-destructive-disabled-bg',\n );\n case 'outline':\n return cn(\n // Transparent fill with a theme-foreground-derived border (25% of the\n // foreground). The state treatment is static: hover, press and\n // keyboard focus render identically to rest — only the shared focus\n // outline and the disabled treatment deviate.\n 'bg-transparent border-berget-button-outline-border text-berget-button-outline-fg',\n // Hover: slight brightening (hover bg token); the border and\n // foreground stay at rest. The dark:hover twin also neutralises\n // the primitive ghost's dark:hover:bg-muted/50. Pressed drops the\n // fill back to transparent (a pressed element is still hovered, so\n // an explicit active override is needed in both colour schemes).\n 'hover:bg-berget-button-outline-hover dark:hover:bg-berget-button-outline-hover',\n 'active:bg-transparent dark:active:bg-transparent',\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-outline-border',\n disabledClasses,\n 'disabled:bg-transparent disabled:border-berget-button-disabled-border',\n );\n case 'ghost':\n // Transparent fill with foreground text; hover and press add subtle\n // theme-foreground-derived fills (10% / 5%). No border of its own —\n // the primitive's resting transparent border persists. The primitive\n // ghost variant's aria-expanded state (bg-muted + foreground text)\n // passes through for dropdown-trigger use.\n return cn(\n 'bg-transparent text-berget-button-ghost-fg',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which is the same value here but pinned\n // explicitly for parity with the other fg-token variants.\n 'hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg',\n // The dark:hover twin neutralises the primitive ghost's\n // dark:hover:bg-muted/50 so only the token fill applies.\n 'dark:hover:bg-berget-button-ghost-hover',\n 'active:bg-berget-button-ghost-active dark:active:bg-berget-button-ghost-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-transparent',\n );\n case 'link':\n // Rendered without buttonVariants — needs its own sizing, focus ring and\n // disabled treatment (the primitive's fade is not legible on text links).\n return cn(\n 'h-auto bg-transparent p-0 text-berget-button-link-fg font-medium underline-offset-4 shadow-none',\n 'hover:bg-transparent hover:text-berget-button-link-hover-fg',\n // On press, return to the resting foreground (hover fg otherwise sticks).\n 'active:text-berget-button-link-fg',\n 'focus:bg-transparent',\n // Neutralise the primitive base's focus-visible:border-ring + ring-3,\n // which land on link too (the primitive merges its cva base under\n // every variant): the outline above is the only focus indicator.\n 'focus-visible:border-transparent focus-visible:ring-0',\n 'focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:rounded-berget-xs',\n 'disabled:text-berget-button-disabled-fg disabled:no-underline',\n 'disabled:opacity-100 disabled:cursor-not-allowed',\n );\n\n case 'default':\n default:\n return cn(\n // Solid granite-800 fill with a granite-700 border on dark surfaces\n // (ink glass in light theme).\n 'bg-berget-button-default-bg border-berget-button-default-border text-berget-button-default-fg',\n 'hover:bg-berget-button-default-hover',\n 'active:bg-berget-button-default-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-default-disabled-bg',\n );\n }\n}\n\n/** Map custom variants to the closest upstream primitive variant. */\nfunction primitiveVariant(variant?: CustomVariant): VariantProps<typeof buttonVariants>['variant'] {\n switch (variant) {\n case 'primary':\n case 'destructive':\n case 'outline':\n case 'ghost':\n return 'ghost';\n default:\n return variant;\n }\n}\n\nexport function Button({\n className,\n variant = 'default',\n size,\n asChild = false,\n width = 'default',\n type = 'button',\n ref,\n children,\n ...props\n}: ButtonProps) {\n const isIcon = typeof size === 'string' && size.startsWith('icon');\n const isLink = variant === 'link';\n\n const baseClass = cn(\n !isLink && buttonVariants({ variant: primitiveVariant(variant), size }),\n // Berget brand overrides — full-width buttons use the square radius;\n // everything else stays pill-shaped.\n !isLink && (width === 'full' ? 'rounded-berget-xs' : 'rounded-full'),\n // Em-based padding, inline = 2× block — matches the 8px/16px spacing-scale\n // values at the default text-sm (14px) and scales down/up with smaller or\n // larger button text. h-auto drops the primitive's fixed h-* so the\n // vertical paddings take effect.\n !isLink && !isIcon && 'py-[0.57em] px-[1.14em] h-auto',\n // Text ladder: size = typography scale; the em-based padding above\n // follows automatically, so no per-size paddings are needed. Only\n // default/lg/sm need overrides — xs keeps the primitive's text-xs.\n !isLink &&\n !isIcon &&\n (size === 'lg' ? 'text-lg' : size === 'sm' ? 'text-sm' : size === 'xs' ? '' : 'text-base'),\n // Normal weight for every non-link variant — tailwind-merge strips the\n // primitive's font-medium (font-weight: var(--font-weight-medium)); the\n // link variant keeps medium via its own classes above.\n !isLink && 'font-normal',\n brandVariantClasses(variant),\n interactionClasses,\n !isLink && width === 'full' && 'w-full',\n isIcon && 'rounded-full shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]',\n className,\n );\n\n const content = (\n <span className={cn('inline-flex items-center', !isIcon && 'gap-2')}>{children}</span>\n );\n\n return (\n <ButtonPrimitive\n className={baseClass}\n ref={ref}\n render={asChildRender(asChild, children)}\n type={type}\n {...props}\n >\n {asChild ? undefined : content}\n </ButtonPrimitive>\n );\n}\n\nexport { buttonVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst typographyVariants = cva('', {\n variants: {\n variant: {\n // Fluid heading scale — use @theme tokens (clamp-based, 390px → 1440px)\n h1: 'text-h1 font-h1 leading-h1 tracking-h1 text-balance',\n // Hero display — from landing-page /dedicated-inference hero (Ovo, 400, tight display leading)\n hero: \"text-hero font-hero leading-hero tracking-hero text-balance font-normal [font-feature-settings:'normal']\",\n h2: 'text-h2 font-h2 leading-h2 tracking-h2 text-balance',\n h3: 'text-h3 font-h3 leading-h3 tracking-h3 text-balance',\n h4: 'text-h4 font-h4 leading-h4 tracking-h4 text-balance',\n // Static sans-serif sub-heading\n h5: 'text-xl font-xl leading-xl text-balance',\n // Body and UI text — use @theme tokens where available\n large: 'text-lg font-lg leading-lg text-pretty',\n body: 'text-p font-p leading-p text-pretty',\n small: 'text-sm font-sm leading-sm text-pretty',\n xs: 'text-xs font-xs leading-xs text-pretty',\n // Caption / overline / eyebrow (DM Sans, Semibold, uppercase)\n caption:\n 'text-caption font-caption leading-caption tracking-caption text-pretty font-semibold uppercase',\n // Monospaced — use @theme token\n mono: 'text-mono font-mono leading-mono text-pretty',\n // Inline code / spec labels\n code: 'text-xs font-mono',\n },\n color: {\n default: 'text-berget-foreground',\n muted: 'text-berget-muted-foreground',\n dim: 'text-berget-foreground/65',\n primary: 'text-berget-primary',\n },\n },\n defaultVariants: {\n variant: 'body',\n color: 'default',\n },\n});\n\nconst defaultElementMap: Record<string, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'span'> = {\n hero: 'h1',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n large: 'p',\n body: 'p',\n small: 'p',\n xs: 'p',\n caption: 'span',\n mono: 'p',\n code: 'span',\n};\n\nexport interface TypographyProps\n extends\n Omit<React.HTMLAttributes<HTMLElement>, 'color'>,\n VariantProps<typeof typographyVariants> {\n as?: React.ElementType;\n}\n\nconst Typography = React.forwardRef<HTMLElement, TypographyProps>(\n ({ className, variant = 'body', color = 'default', as, children, ...props }, ref) => {\n const Component = (as ?? defaultElementMap[variant ?? 'body'] ?? 'p') as\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'p'\n | 'span';\n return (\n <Component\n className={cn(typographyVariants({ variant, color }), className)}\n ref={ref as any}\n {...(props as any)}\n >\n {children}\n </Component>\n );\n },\n);\nTypography.displayName = 'Typography';\n\nexport { Typography, typographyVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport {\n Card as CardPrimitive,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n CardAction,\n} from '../../primitives/card';\n\nconst cardVariants = cva('ring-0', {\n variants: {\n variant: {\n outlined: 'bg-transparent border border-berget-border-subtle',\n filled: 'bg-berget-card-filled-bg border border-berget-border-subtle',\n },\n },\n defaultVariants: {\n variant: 'outlined',\n },\n});\n\nexport interface CardProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {\n /** Spacing scale of the card. `sm` uses a compact 16px spacing, `default` 24px. */\n size?: 'default' | 'sm';\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant, size, children, ...props }, ref) => {\n return (\n <CardPrimitive\n ref={ref}\n size={size}\n className={cn(cardVariants({ variant }), className)}\n {...props}\n >\n {children}\n </CardPrimitive>\n );\n },\n);\nCard.displayName = 'Card';\n\nexport {\n Card,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n CardAction,\n cardVariants,\n};\n","import * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Card({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n \"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-berget-xs bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\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 \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)\",\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(\n \"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm\",\n className\n )}\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-sm text-muted-foreground\", 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-(--card-spacing)\", 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(\n \"flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)\",\n className\n )}\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';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n 'inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2',\n {\n variants: {\n variant: {\n default: 'px-8',\n tag: 'px-4',\n semantic: 'px-3',\n },\n status: {\n default: 'bg-berget-badge-default-bg text-berget-badge-default-fg',\n active: 'bg-berget-badge-active-bg text-berget-badge-active-fg',\n tagDefault: 'bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg',\n tagActive: 'bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg',\n tagGhost: 'bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg',\n info: 'berget-tint berget-tint-info',\n success: 'berget-tint berget-tint-success',\n warning: 'berget-tint berget-tint-warning',\n error: 'berget-tint berget-tint-error',\n },\n size: {\n sm: 'text-xs h-6',\n md: 'text-sm h-6',\n },\n },\n defaultVariants: {\n variant: 'default',\n status: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {\n icon?: React.ReactNode;\n iconGap?: number;\n}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {\n return (\n <div className={cn(badgeVariants({ variant, status, size }), className)} ref={ref} {...props}>\n {icon && <div style={{ marginRight: children ? `${iconGap * 0.25}rem` : '0' }}>{icon}</div>}\n {children}\n </div>\n );\n },\n);\nBadge.displayName = 'Badge';\n\nexport { Badge, badgeVariants };\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Card } from '../card';\nimport { type ModelCategory, type ModelLogoProvider, ModelLogo } from '../model-logo';\nimport { Typography } from '../typography';\n\n/**\n * ModelCard — a whole-card link tile for presenting AI models in a grid:\n * provider mark, category eyebrow, model name, optional lifecycle tab,\n * per-unit price columns, and fine-print capability facts.\n *\n * Presentational only: all copy is passed in as props; the card itself\n * owns no strings and no domain types.\n */\n/** Lifecycle status shown as a corner tab on the card. */\nexport type ModelLifecycle = 'preview' | 'active' | 'deprecated';\n\nconst lifecycleLabels: Record<ModelLifecycle, string> = {\n preview: 'Preview',\n active: 'Active',\n deprecated: 'Deprecated',\n};\n\n/** Per-status styling for the lifecycle tab (tint classes come from\n * index.css; deprecated uses the granite neutral). Brightens when the\n * card (`group`) is hovered. */\nconst lifecycleStyles: Record<ModelLifecycle, string> = {\n preview: 'berget-tint berget-tint-warning',\n active: 'berget-tint berget-tint-success',\n deprecated: 'bg-berget-brand-granite-700 text-berget-muted-foreground',\n};\n\nexport type { ModelCategory, ModelLogoProvider };\n\nexport interface ModelCardProps extends Omit<React.ComponentProps<'a'>, 'title' | 'children'> {\n /** Provider mark, rendered in a bordered square at the top of the card. */\n icon?: React.ReactNode;\n /**\n * Model family for the icon square — resolved to a bundled brand mark\n * (e.g. `'mistralai'`, `'moonshotai'`, `'berget'`). Ignored when `icon`\n * is set.\n */\n provider?: string;\n /** Fallback category for the icon square when no brand mark exists\n * (maps to the `model_type` values from `GET /v1/models`). */\n category?: ModelCategory;\n /** Small category label above the title (rendered uppercase). */\n eyebrow?: string;\n /** The model name — rendered as an `h3` and truncated when too long. */\n title: React.ReactNode;\n /**\n * Lifecycle status rendered as a corner tab: `preview` (yellow),\n * `active` (green), `deprecated` (gray).\n */\n lifecycle?: ModelLifecycle;\n /** Secondary line under the title, e.g. the provider name. */\n description?: React.ReactNode;\n /** Label-above-value columns, e.g. per-million-token input/output prices. */\n columns?: { label: React.ReactNode; value: React.ReactNode }[];\n /**\n * Fine-print capability facts rendered in one uppercase row with\n * square separators drawn by the card, e.g. ['Vision', '262K context'].\n */\n meta?: React.ReactNode[];\n /** Link target for the whole card. */\n href: string;\n /** Opens the link in a new tab (adds `target`/`rel`). */\n external?: boolean;\n /** Extra content rendered at the bottom of the card. */\n children?: React.ReactNode;\n}\n\nconst ModelCard = React.forwardRef<HTMLAnchorElement, ModelCardProps>(\n (\n {\n icon,\n provider,\n category,\n eyebrow,\n title,\n lifecycle,\n description,\n columns,\n meta,\n href,\n external,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const titleId = React.useId();\n\n return (\n <a\n ref={ref}\n href={href}\n aria-labelledby={titleId}\n {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n className={cn('group block', className)}\n {...props}\n >\n <Card\n variant=\"filled\"\n className=\"relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))] sm:p-6\"\n >\n {lifecycle && (\n <div className=\"absolute top-0 right-0 z-10 overflow-hidden rounded-bl-berget-sm\">\n <div\n className={cn(\n 'inline-flex h-6 items-center whitespace-nowrap border-0! px-8 text-sm',\n lifecycleStyles[lifecycle],\n )}\n >\n {lifecycleLabels[lifecycle]}\n </div>\n </div>\n )}\n {(icon || provider || category) && (\n <div className=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-berget-xs border border-berget-border bg-white/5 text-berget-foreground\">\n {icon ?? <ModelLogo provider={provider} category={category} />}\n </div>\n )}\n\n {/* Identity cluster: eyebrow, title, description — cb tightly\n grouped; the card's flex gap separates it from other groups. */}\n <header>\n {eyebrow && (\n <Typography\n variant=\"xs\"\n color=\"muted\"\n className=\"font-medium uppercase leading-none tracking-[0.25em]\"\n >\n {eyebrow}\n </Typography>\n )}\n <div className={cn('flex items-baseline gap-3', lifecycle && 'pr-24')}>\n <Typography\n as=\"h3\"\n id={titleId}\n variant=\"h5\"\n className=\"min-w-0 truncate whitespace-nowrap leading-tight\"\n style={{ fontFeatureSettings: 'normal' }}\n >\n {title}\n </Typography>\n </div>\n {description && (\n <Typography variant=\"xs\" color=\"muted\" className=\"leading-none\">\n {description}\n </Typography>\n )}\n </header>\n\n {columns && columns.length > 0 && (\n <div className=\"grid grid-cols-2\">\n {columns.map((col, i) => (\n <div key={i}>\n <Typography variant=\"xs\" color=\"muted\" className=\"leading-none\">\n {col.label}\n </Typography>\n <Typography\n variant=\"body\"\n className=\"tabular-nums leading-none\"\n style={{ fontFeatureSettings: 'normal' }}\n >\n {col.value}\n </Typography>\n </div>\n ))}\n </div>\n )}\n\n {meta && meta.length > 0 && (\n <Typography\n variant=\"xs\"\n color=\"muted\"\n className=\"text-[0.65rem] uppercase tracking-[0.15em]\"\n >\n {meta.map((item, i) => (\n <React.Fragment key={i}>\n {i > 0 && ' ▪ '}\n {item}\n </React.Fragment>\n ))}\n </Typography>\n )}\n\n {children}\n </Card>\n </a>\n );\n },\n);\nModelCard.displayName = 'ModelCard';\n\nexport { ModelCard };\n","import * as React from 'react';\nimport { ArrowDownWideNarrow, AudioLines, Bot, Braces, Eye, ScanEye } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { BergetLogo } from '../berget-logo';\n\n/**\n * Model families with a bundled brand mark, keyed by the `owned_by` values\n * returned by `GET /v1/models` (normalized: lowercase, aliases below).\n */\nexport type ModelLogoProvider = 'qwen' | 'mistral' | 'kimi' | 'google' | 'zai' | 'berget';\n\n/** Fallback model categories for models without a brand mark, matching\n * the `model_type` values in `GET /v1/models` (plus `vision`, which lives\n * in per-model capabilities). */\nexport type ModelCategory =\n | 'text'\n | 'speech-to-text'\n | 'embedding'\n | 'rerank'\n | 'system-one'\n | 'vision';\n\n/** Accepted aliases, e.g. the raw `owned_by` strings from the models API. */\nconst providerAliases: Record<string, ModelLogoProvider> = {\n qwen: 'qwen',\n mistralai: 'mistral',\n mistral: 'mistral',\n moonshotai: 'kimi',\n kimi: 'kimi',\n google: 'google',\n 'zai-org': 'zai',\n zai: 'zai',\n berget: 'berget',\n bergetai: 'berget',\n};\n\n/** Monochrome, `currentColor`, 24×24 brand marks (via @lobehub/icons, MIT). */\nconst providerPaths: Record<Exclude<ModelLogoProvider, 'berget'>, string[]> = {\n qwen: [\n 'M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z',\n ],\n mistral: [\n 'M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z',\n ],\n kimi: [\n 'M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z',\n 'M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z',\n ],\n google: [\n 'M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z',\n 'M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z',\n 'M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z',\n 'M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z',\n ],\n zai: [\n 'M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z',\n ],\n};\n\nconst providerLabels: Record<ModelLogoProvider, string> = {\n qwen: 'Qwen',\n mistral: 'Mistral',\n kimi: 'Kimi',\n google: 'Google',\n zai: 'Z.ai',\n berget: 'Berget AI',\n};\n\nconst categoryIcons: Record<ModelCategory, React.ComponentType<{ className?: string }>> = {\n text: Bot,\n 'speech-to-text': AudioLines,\n embedding: Braces,\n rerank: ArrowDownWideNarrow,\n 'system-one': ScanEye,\n vision: Eye,\n};\n\nconst categoryLabels: Record<ModelCategory, string> = {\n text: 'Model',\n 'speech-to-text': 'Speech-to-text',\n embedding: 'Embedding',\n rerank: 'Reranker',\n 'system-one': 'System One',\n vision: 'Vision',\n};\n\nexport interface ModelLogoProps extends React.SVGAttributes<SVGSVGElement> {\n /**\n * Model family to render a brand mark for. Accepts the `owned_by` values\n * from `GET /v1/models` (e.g. `'moonshotai'`) case-insensitively.\n */\n provider?: string;\n /** Fallback category when `provider` is missing or unknown. */\n category?: ModelCategory;\n /** Size (width and height) in pixels. */\n size?: number;\n}\n\n/**\n * ModelLogo — brand mark for a supported model family, falling back to a\n * category icon for everything else. Renders nothing if no `provider` and\n * no `category` match.\n */\nexport const ModelLogo = React.forwardRef<SVGSVGElement, ModelLogoProps>(\n ({ provider, category, size = 24, className, ...props }, ref) => {\n const resolved = provider ? providerAliases[provider.trim().toLowerCase()] : undefined;\n\n if (resolved === 'berget') {\n return <BergetLogo variant=\"symbol\" size={size} className={cn('shrink-0', className)} />;\n }\n\n if (resolved) {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n width={size}\n height={size}\n role=\"img\"\n aria-label={providerLabels[resolved]}\n className={cn('shrink-0', className)}\n {...props}\n >\n <title>{providerLabels[resolved]}</title>\n {providerPaths[resolved].map((d, i) => (\n <path key={i} d={d} />\n ))}\n </svg>\n );\n }\n\n if (category) {\n const Icon = categoryIcons[category];\n return <Icon className={cn('shrink-0', className)} {...props} />;\n }\n\n return null;\n },\n);\nModelLogo.displayName = 'ModelLogo';\n\nexport { categoryLabels };\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\n\nexport interface BergetLogoProps extends React.SVGAttributes<SVGSVGElement> {\n /** Shape variant */\n variant?: 'logotype' | 'symbol';\n /** Fill color — `auto` follows the theme via CSS variables */\n color?: 'white' | 'black' | 'auto';\n /** Size (height) in pixels */\n size?: number;\n}\n\nconst BergetLogo = React.forwardRef<SVGSVGElement, BergetLogoProps>(\n ({ variant = 'logotype', color = 'auto', size = 48, className, ...props }, ref) => {\n const fillColor =\n color === 'auto'\n ? 'var(--berget-logo-light)'\n : color === 'white'\n ? 'var(--berget-logo-light)'\n : 'var(--berget-logo-dark)';\n\n if (variant === 'symbol') {\n // viewBox cropped to the glyph ink (y 17-403, x 18-446 of the original\n // 463x419 art) so that `size` means glyph height, matching the logotype\n // variant whose viewBox hugs its glyph. Without this the symbol renders\n // ~7% smaller than the logotype at the same size.\n const aspectRatio = 428 / 386;\n const width = size * aspectRatio;\n const height = size;\n\n return (\n <svg\n ref={ref}\n width={width}\n height={height}\n viewBox=\"18 17 428 386\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n aria-label=\"Berget symbol\"\n className={cn('inline-block', className)}\n {...props}\n >\n <path\n d=\"M208.739 17L255.261 17L446 403L398 403L313.5 255L261.5 176L233.163 96.1677L237.815 98.6522H226.185L230.837 96.1677L113 331L64.5 403L18 403L208.739 17Z\"\n style={{ fill: fillColor }}\n />\n </svg>\n );\n }\n\n // variant === 'logotype'\n const aspectRatio = 793.63 / 204.37;\n const width = size * aspectRatio;\n const height = size;\n\n return (\n <svg\n ref={ref}\n width={width}\n height={height}\n viewBox=\"0 0 793.63 204.37\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n aria-label=\"Berget\"\n className={cn('inline-block', className)}\n {...props}\n >\n <g style={{ fill: fillColor }}>\n <path\n className=\"berget-logotype-fill\"\n d=\"M268.78,172.54v-96.04h37.74c10.39,0,18.26,2.33,23.6,7,5.33,4.67,8.01,10.52,8.01,17.56,0,6.13-1.72,11-5.15,14.61-3.43,3.61-7.58,6.06-12.44,7.34,3.81.73,7.22,2.2,10.22,4.39,3.01,2.2,5.36,4.94,7.08,8.23,1.72,3.29,2.58,6.86,2.58,10.7,0,4.94-1.27,9.4-3.79,13.38-2.53,3.98-6.22,7.11-11.08,9.4-4.86,2.29-10.82,3.43-17.87,3.43h-38.89ZM283.93,117.66h20.74c5.81,0,10.24-1.3,13.29-3.91,3.05-2.61,4.58-6.19,4.58-10.77s-1.51-8.05-4.51-10.7c-3-2.65-7.55-3.98-13.65-3.98h-20.45v29.36ZM283.93,160.61h21.74c6.1,0,10.84-1.37,14.22-4.11,3.38-2.75,5.08-6.59,5.08-11.53s-1.76-8.85-5.29-11.73-8.29-4.32-14.3-4.32h-21.45v31.69Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M382.45,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81,2.91-1.88,5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM382.45,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M425.62,172.54v-68.05h13.59l1.29,12.9c2.47-4.48,5.93-8.03,10.37-10.63,4.43-2.61,9.79-3.91,16.08-3.91v15.23h-4.15c-4.19,0-7.93.67-11.22,1.99-3.29,1.33-5.91,3.57-7.86,6.72-1.96,3.16-2.93,7.53-2.93,13.1v32.65h-15.16Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M500.25,151.69c-3.72,0-7.14-.41-10.29-1.24l-6.15,5.76c1.05.64,2.34,1.19,3.86,1.65,1.52.46,3.66.87,6.43,1.23,2.76.37,6.53.73,11.29,1.1,9.43.82,16.25,3,20.44,6.52,4.2,3.52,6.29,8.21,6.29,14.06,0,4.02-1.12,7.84-3.35,11.45-2.24,3.61-5.72,6.54-10.44,8.78s-10.74,3.36-18.09,3.36c-9.91,0-17.94-1.8-24.09-5.42-6.15-3.62-9.22-9.08-9.22-16.4,0-2.84.78-5.65,2.35-8.44,1.57-2.79,4.08-5.42,7.51-7.89-2-.83-3.74-1.72-5.22-2.68-1.48-.96-2.79-1.94-3.94-2.95v-3.29l12.3-12.07c-5.53-4.57-8.29-10.56-8.29-17.97,0-4.48,1.12-8.58,3.36-12.28,2.24-3.7,5.5-6.65,9.79-8.85,4.29-2.2,9.43-3.29,15.44-3.29,4.01,0,7.72.55,11.15,1.64h26.45v9.6l-12.58.69c2.28,3.75,3.43,7.91,3.43,12.49s-1.13,8.69-3.36,12.35c-2.24,3.66-5.48,6.59-9.72,8.78-4.25,2.2-9.37,3.29-15.37,3.29ZM481.24,181.19c0,3.93,1.81,6.88,5.44,8.85,3.62,1.97,8.15,2.95,13.58,2.95s9.48-1.07,12.72-3.22c3.24-2.15,4.86-5,4.86-8.57,0-2.65-1.09-4.92-3.29-6.79-2.19-1.87-6.34-3.04-12.44-3.5-4.57-.27-8.63-.68-12.15-1.23-3.34,1.74-5.63,3.61-6.86,5.63-1.25,2.01-1.86,3.98-1.86,5.9ZM500.25,140.3c4.38,0,7.93-1.12,10.66-3.36,2.71-2.24,4.07-5.42,4.07-9.53s-1.36-7.41-4.07-9.6c-2.72-2.2-6.27-3.29-10.66-3.29s-8.08,1.1-10.79,3.29c-2.71,2.2-4.08,5.4-4.08,9.6s1.36,7.3,4.08,9.53c2.71,2.24,6.31,3.36,10.79,3.36Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M574.61,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79c3-5.4,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81s5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM574.61,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M646.23,172.54c-6.96,0-12.49-1.62-16.59-4.87-4.1-3.25-6.15-9.03-6.15-17.36v-33.61h-12.16v-12.21h12.16l1.86-17.29h13.29v17.29h20.02v12.21h-20.02v33.61c0,3.75.84,6.33,2.51,7.75,1.67,1.42,4.55,2.13,8.65,2.13h8.14v12.35h-11.72Z\"\n />\n <path\n className=\"berget-logotype-fill\"\n d=\"M684.4,172.54l36.89-96.04h16.59l36.6,96.04h-16.01l-8.58-23.46h-40.88l-8.58,23.46h-16.01ZM713.28,137.56h32.31l-16.16-43.77-16.16,43.77Z\"\n />\n <path className=\"berget-logotype-fill\" d=\"M778.48,172.54v-96.04h15.15v96.04h-15.15Z\" />\n </g>\n <path\n style={{ fill: fillColor }}\n d=\"M99.9,0h24.37l99.9,202.18h-25.14l-44.26-77.52-27.24-41.38-14.84-41.81,2.44,1.3h-6.09l2.44-1.3-61.72,123-25.4,37.71H0L99.9,0Z\"\n />\n </svg>\n );\n },\n);\n\nBergetLogo.displayName = 'BergetLogo';\n\nexport { BergetLogo };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Alert as AlertPrimitive, AlertTitle, AlertDescription } from '../../primitives/alert';\n\nconst alertVariants = cva('', {\n variants: {\n variant: {\n default: 'border-berget-border',\n info: 'berget-tint berget-tint-info',\n success: 'berget-tint berget-tint-success',\n warning: 'berget-tint berget-tint-warning',\n destructive: 'berget-tint berget-tint-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface AlertProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n ({ className, variant, ...props }, ref) => (\n <AlertPrimitive ref={ref} className={cn(alertVariants({ variant }), className)} {...props} />\n ),\n);\nAlert.displayName = 'Alert';\n\nexport type AlertTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\n\nexport type AlertDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nexport { Alert, AlertTitle, AlertDescription, alertVariants };\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nconst alertVariants = cva(\n \"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\",\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 \"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground\",\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-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-action\"\n className={cn(\"absolute top-2 right-2\", className)}\n {...props}\n />\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction }\n","import * as React from 'react';\nimport { Dialog as DialogPrimitive } from '@base-ui/react/dialog';\nimport { X } from 'lucide-react';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst Dialog = DialogPrimitive.Root;\n\ntype DialogTriggerProps = Omit<DialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DialogTrigger = React.forwardRef<HTMLButtonElement, DialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DialogPrimitive.Trigger>\n ),\n);\nDialogTrigger.displayName = 'DialogTrigger';\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<DialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = 'DialogOverlay';\n\nconst DialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<DialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-berget-xs opacity-70 ring-offset-berget-dialog-bg transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-berget-focus-ring focus:ring-offset-2 disabled:pointer-events-none data-open:bg-berget-muted data-open:text-berget-muted-foreground\">\n <X className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Popup>\n </DialogPortal>\n));\nDialogContent.displayName = 'DialogContent';\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props} />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<DialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </DialogPrimitive.Title>\n));\nDialogTitle.displayName = 'DialogTitle';\n\nconst DialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<DialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </DialogPrimitive.Description>\n));\nDialogDescription.displayName = 'DialogDescription';\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","import * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n));\nAlertDialogOverlay.displayName = 'AlertDialogOverlay';\n\nconst AlertDialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95',\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props} />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<AlertDialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nconst AlertDialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<AlertDialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\n/** Action button — compose with `<Button>` via `asChild` for consistent styling. */\nconst AlertDialogAction = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogAction.displayName = 'AlertDialogAction';\n\n/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */\nconst AlertDialogCancel = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn('mt-2 sm:mt-0', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n","import * as React from 'react';\nimport { Menu as DropdownMenuPrimitive } from '@base-ui/react/menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn, asChildRender } from '../../lib/utils';\n\n/* ------------------------------------------------------------------ */\n/* Root & inert sub-components */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\ntype DropdownMenuTriggerProps = Omit<\n DropdownMenuPrimitive.Trigger.Props,\n 'className' | 'render'\n> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, DropdownMenuTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DropdownMenuPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.SubmenuRoot;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* ------------------------------------------------------------------ */\n/* SubTrigger */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.SubmenuTrigger.Props, 'className' | 'render'> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubmenuTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-popup-open:bg-berget-surface-hover [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : (\n <>\n {children}\n <ChevronRight className=\"ml-auto\" />\n </>\n )}\n </DropdownMenuPrimitive.SubmenuTrigger>\n));\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubContent */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuSubContent = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.Popup.Props, 'className'> &\n Pick<\n DropdownMenuPrimitive.Positioner.Props,\n 'side' | 'sideOffset' | 'align' | 'alignOffset'\n > & {\n className?: string;\n }\n>(\n (\n { className, side = 'right', align = 'start', alignOffset = -3, sideOffset = 0, ...props },\n ref,\n ) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Positioner\n side={side}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className=\"isolate z-50 outline-none\"\n >\n <DropdownMenuPrimitive.Popup\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-lg transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--transform-origin]',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Positioner>\n </DropdownMenuPrimitive.Portal>\n ),\n);\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\n/* ------------------------------------------------------------------ */\n/* Content */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuContent = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.Popup.Props, 'className'> &\n Pick<\n DropdownMenuPrimitive.Positioner.Props,\n 'sideOffset' | 'align' | 'side' | 'alignOffset'\n > & {\n className?: string;\n }\n>(({ className, sideOffset = 4, align = 'center', side, alignOffset, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Positioner\n side={side}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className=\"isolate z-50 outline-none\"\n >\n <DropdownMenuPrimitive.Popup\n ref={ref}\n className={cn(\n 'z-50 max-h-[var(--available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-md transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--transform-origin]',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Positioner>\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\n/* ------------------------------------------------------------------ */\n/* Item */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuItem = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.Item.Props, 'className' | 'render' | 'label'> & {\n className?: string;\n inset?: boolean;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, inset, asChild, children, textValue, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n label={textValue}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\n/* ------------------------------------------------------------------ */\n/* CheckboxItem */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.CheckboxItem.Props, 'className' | 'render' | 'label'> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n label={textValue}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.CheckboxItemIndicator>\n <Check className=\"size-4\" />\n </DropdownMenuPrimitive.CheckboxItemIndicator>\n </span>\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\n/* ------------------------------------------------------------------ */\n/* RadioItem */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuRadioItem = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.RadioItem.Props, 'className' | 'render' | 'label'> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n label={textValue}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.RadioItemIndicator>\n <Circle className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.RadioItemIndicator>\n </span>\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\n/* ------------------------------------------------------------------ */\n/* Label */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuLabel = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.GroupLabel.Props, 'className' | 'render'> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuPrimitive.GroupLabel\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold text-berget-foreground',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuPrimitive.GroupLabel>\n));\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\n/* ------------------------------------------------------------------ */\n/* Separator */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuSeparator = React.forwardRef<\n HTMLDivElement,\n Omit<DropdownMenuPrimitive.Separator.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-berget-separator', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\n/* ------------------------------------------------------------------ */\n/* Shortcut */\n/* ------------------------------------------------------------------ */\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-berget-muted-foreground', className)}\n {...props}\n />\n );\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n","import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';\nimport { cva } from 'class-variance-authority';\nimport { ChevronDown } from 'lucide-react';\n\nimport { cn } from '../../lib/utils';\nimport {\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuIndicator,\n} from '../../primitives/navigation-menu';\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenu({\n align = 'start',\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props & Pick<NavigationMenuPrimitive.Positioner.Props, 'align'>) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n className={cn(\n 'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center',\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuPositioner align={align} />\n </NavigationMenuPrimitive.Root>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Trigger */\n/* ------------------------------------------------------------------ */\n\nconst navigationMenuTriggerStyle = cva(\n 'group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-berget-xs px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-berget-surface-02 focus:bg-berget-surface-02 focus-visible:ring-3 focus-visible:ring-berget-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-berget-surface-02/50 data-popup-open:hover:bg-berget-surface-02 data-open:bg-berget-surface-02/50 data-open:hover:bg-berget-surface-02 data-open:focus:bg-berget-surface-02',\n);\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Trigger.Props) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), 'group', className)}\n {...props}\n >\n {children}{' '}\n <ChevronDown\n className=\"relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Link */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenuLink({ className, ...props }: NavigationMenuPrimitive.Link.Props) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex items-center gap-2 rounded-berget-xs p-2 text-sm transition-all outline-none hover:bg-berget-surface-02 focus:bg-berget-surface-02 focus-visible:ring-3 focus-visible:ring-berget-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-berget-xs data-active:bg-berget-surface-02/50 data-active:hover:bg-berget-surface-02 data-active:focus:bg-berget-surface-02 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Positioner (portal + popup + viewport) */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenuPositioner({\n className,\n side = 'bottom',\n sideOffset = 8,\n align = 'start',\n alignOffset = 0,\n ...props\n}: NavigationMenuPrimitive.Positioner.Props) {\n return (\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n 'isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0',\n className,\n )}\n {...props}\n >\n <NavigationMenuPrimitive.Popup className=\"data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-lg ring-1 ring-berget-border transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0\">\n <NavigationMenuPrimitive.Viewport className=\"relative size-full overflow-hidden\" />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuPositioner,\n};\n","import { NavigationMenu as NavigationMenuPrimitive } from \"@base-ui/react/navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"cn\"\nimport { ChevronDownIcon } from \"lucide-react\"\n\nfunction NavigationMenu({\n align = \"start\",\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props &\n Pick<NavigationMenuPrimitive.Positioner.Props, \"align\">) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n className={cn(\n \"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuPositioner align={align} />\n </NavigationMenuPrimitive.Root>\n )\n}\n\nfunction NavigationMenuList({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn(\n \"group flex flex-1 list-none items-center justify-center gap-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuItem({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot=\"navigation-menu-item\"\n className={cn(\"relative\", className)}\n {...props}\n />\n )\n}\n\nconst navigationMenuTriggerStyle = cva(\n \"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted\"\n)\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Trigger.Props) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon className=\"relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180\" aria-hidden=\"true\" />\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\nfunction NavigationMenuContent({\n className,\n ...props\n}: NavigationMenuPrimitive.Content.Props) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n \"data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuPositioner({\n className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: NavigationMenuPrimitive.Positioner.Props) {\n return (\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n \"isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n {...props}\n >\n <NavigationMenuPrimitive.Popup className=\"data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0\">\n <NavigationMenuPrimitive.Viewport className=\"relative size-full overflow-hidden\" />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n )\n}\n\nfunction NavigationMenuLink({\n className,\n ...props\n}: NavigationMenuPrimitive.Link.Props) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuIndicator({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>) {\n return (\n <NavigationMenuPrimitive.Icon\n data-slot=\"navigation-menu-indicator\"\n className={cn(\n \"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Icon>\n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n NavigationMenuPositioner,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nimport { useIsMobile } from \"@/hooks/use-mobile\"\nimport { Button } from \"@/primitives/button\"\nimport { Input } from \"@/primitives/input\"\nimport { Separator } from \"@/primitives/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/primitives/sheet\"\nimport { Skeleton } from \"@/primitives/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/primitives/tooltip\"\nimport { PanelLeftIcon } from \"lucide-react\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n dir={dir}\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n data-side={side}\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn(\"h-8 w-full bg-background shadow-none\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n \"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-label\",\n sidebar: \"group-label\",\n },\n })\n}\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"button\"> & React.ComponentProps<\"button\">) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-action\",\n sidebar: \"group-action\",\n },\n })\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-0\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n render,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>) {\n const { isMobile, state } = useSidebar()\n const comp = useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n },\n props\n ),\n render: !tooltip ? render : <TooltipTrigger render={render} />,\n state: {\n slot: \"sidebar-menu-button\",\n sidebar: \"menu-button\",\n size,\n active: isActive,\n },\n })\n\n if (!tooltip) {\n return comp\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n {comp}\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({\n className,\n render,\n showOnHover = false,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n showOnHover?: boolean\n }) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-action\",\n sidebar: \"menu-action\",\n },\n })\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn(\"group/menu-sub-item relative\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({\n render,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: useRender.ComponentProps<\"a\"> &\n React.ComponentProps<\"a\"> & {\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-sub-button\",\n sidebar: \"menu-sub-button\",\n size,\n active: isActive,\n },\n })\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","import * as React from 'react';\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener('change', onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener('change', onChange);\n }, []);\n\n return !!isMobile;\n}\n","import * as React from \"react\"\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\nimport { cn } from \"cn\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","\"use client\"\n\nimport { Separator as SeparatorPrimitive } from \"@base-ui/react/separator\"\nimport { cn } from \"cn\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n ...props\n}: SeparatorPrimitive.Props) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Dialog as SheetPrimitive } from \"@base-ui/react/dialog\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@/primitives/button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Sheet({ ...props }: SheetPrimitive.Root.Props) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({ ...props }: SheetPrimitive.Close.Props) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nfunction SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {\n return (\n <SheetPrimitive.Backdrop\n data-slot=\"sheet-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n showCloseButton = true,\n ...props\n}: SheetPrimitive.Popup.Props & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n showCloseButton?: boolean\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Popup\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n \"fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close\n data-slot=\"sheet-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-3 right-3\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Popup>\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-0.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({ className, ...props }: SheetPrimitive.Title.Props) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\n \"text-base font-medium text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: SheetPrimitive.Description.Props) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-sm text-muted-foreground\", 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 { cn } from \"cn\"\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\nimport { cn } from \"cn\"\n\nfunction TooltipProvider({\n delay = 0,\n ...props\n}: TooltipPrimitive.Provider.Props) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delay}\n {...props}\n />\n )\n}\n\nfunction Tooltip({ ...props }: TooltipPrimitive.Root.Props) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n}\n\nfunction TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\nfunction TooltipContent({\n className,\n side = \"top\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n children,\n ...props\n}: TooltipPrimitive.Popup.Props &\n Pick<\n TooltipPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n className={cn(\n \"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5\" />\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","/**\n * Sidebar — thin proxy over the shadcn sidebar primitive.\n *\n * All brand styling flows through the design-token bridge in\n * `src/styles/index.css` (`bg-sidebar`, `sidebar-border`, … resolve to\n * `--berget-sidebar-*`). The primitive itself is unmodified upstream\n * shadcn output and must never be edited — Berget-specific composition\n * belongs here.\n *\n * Menu buttons, group/menu actions and badges resolve their hover/active\n * states via the --berget-sidebar-accent tokens (a neutral surface step),\n * not a class-level override.\n *\n * Compose per app:\n *\n * <SidebarProvider>\n * <Sidebar>\n * <SidebarHeader>…</SidebarHeader>\n * <SidebarContent>…</SidebarContent>\n * <SidebarFooter>…</SidebarFooter>\n * </Sidebar>\n * <SidebarInset>…main content…</SidebarInset>\n * </SidebarProvider>\n *\n * Toggle with <SidebarTrigger />, the <SidebarRail />, or ⌘/Ctrl+B.\n */\nimport * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { BergetLogo } from '../berget-logo';\nimport {\n SidebarFooter as SidebarFooterPrimitive,\n SidebarGroup as SidebarGroupPrimitive,\n SidebarHeader as SidebarHeaderPrimitive,\n SidebarGroupLabel as SidebarGroupLabelPrimitive,\n SidebarMenuButton as SidebarMenuButtonPrimitive,\n SidebarMenuSubButton as SidebarMenuSubButtonPrimitive,\n SidebarProvider as SidebarProviderPrimitive,\n} from '../../primitives/sidebar';\n\n/** Icon-mode buttons: 40px square tiles (16px glyph + px-3, height matches\n * the expanded bar so the 24px content line doesn't collapse). The overrides\n * win over the primitive's size-8!/p-2! — w-10!/h-10! are emitted after\n * size-8! in the stylesheet, so both dimensions follow the overrides. */\nconst iconModeButtonClasses =\n 'group-data-[collapsible=icon]:w-10! group-data-[collapsible=icon]:h-10! group-data-[collapsible=icon]:px-3!';\n\n/** Menu-button typography: text-base with true 8px (p-2) padding on all\n * sides. h-auto releases the primitive's fixed heights (h-8/h-7/h-12) —\n * otherwise vertical padding has no room. Collapsed icon mode keeps its\n * important size/padding overrides from the primitive. */\nconst sizingMenuButtonClasses = 'text-base px-3 py-2 h-auto';\nconst sizingSubButtonClasses = 'data-[size=md]:text-base data-[size=sm]:text-base px-3 py-2 h-auto';\n\n/** Group label, indented to line up with the menu-button icons\n * (group p-2 + label px-3 = same 20px as group p-2 + button px-3) and\n * set in small uppercase type with wide tracking. */\nfunction SidebarGroupLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarGroupLabelPrimitive>) {\n return (\n <SidebarGroupLabelPrimitive\n className={cn('px-3 uppercase tracking-caption', className)}\n {...props}\n />\n );\n}\n\n/** Provider with the Berget icon-rail width (60px = 10px gutters + 40px\n * buttons). Consumers can still override via `style`. */\nfunction SidebarProvider({\n className,\n style,\n ...props\n}: React.ComponentProps<typeof SidebarProviderPrimitive>) {\n return (\n <SidebarProviderPrimitive\n className={className}\n style={\n {\n '--sidebar-width-icon': '3.75rem',\n ...style,\n } as React.CSSProperties\n }\n {...props}\n />\n );\n}\n\n/** Group with 10px horizontal gutters in icon mode (10 + 40 + 10 = 60px). */\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<typeof SidebarGroupPrimitive>) {\n return (\n <SidebarGroupPrimitive\n className={cn('group-data-[collapsible=icon]:px-2.5', className)}\n {...props}\n />\n );\n}\n\n/** Footer with a top border mirroring the sidebar header's bottom border, and\n * the same 10px icon-mode gutters as SidebarGroup (its menu sits outside a\n * group). */\nfunction SidebarFooter({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarFooterPrimitive>) {\n return (\n <SidebarFooterPrimitive\n className={cn(\n 'group-data-[collapsible=icon]:px-2.5 border-t border-berget-border',\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Header without the primitive's block padding (its p-2 becomes py-0) and\n * with a bottom border matching the default page-header border; vertical\n * rhythm is consumer-controlled (e.g. a h-20 brand bar). Horizontal padding\n * is dropped in icon mode so rail content (logo slots etc.) can center\n * against the full 60px rail width. */\nfunction SidebarHeader({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarHeaderPrimitive>) {\n return (\n <SidebarHeaderPrimitive\n className={cn(\n 'py-0 group-data-[collapsible=icon]:px-0 border-b border-berget-border',\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Berget brand slot for the sidebar header. Fades between the full logo\n * (expanded) and the symbol (collapsed icon rail).\n *\n * Implementation notes — all load-bearing:\n * - The symbol glides instead of popping: at pl-5 its box sits pixel-perfect\n * under the leading glyph of the full logo (both 35.5x32 at x=20), and its\n * padding-left animates to pl-3 (centered in the 60px rail) over 200ms\n * linear — exactly matching the sidebar width transition. The mark never\n * jumps: collapse fades the logotype out while the symbol glides into its\n * gliding position; expand reverses it.\n * - Both layers stay mounted: display isn't animatable, so unmounting the\n * symbol on expand would blink it off in one frame while the logotype is\n * still fading in. visibility+opacity handle hiding instead; visibility is\n * discretely animatable, deferring its flip until the fade completes,\n * and removing the hidden layer from the accessibility tree.\n * - The row is overflow-hidden and the logo shrink-0: when the rail narrows,\n * the fading full logo is clipped at the moving edge instead of being\n * squeezed (the SVG viewBox would otherwise scale it down).\n * - px-5 aligns the logo's left edge with the 20px content line of the\n * expanded sidebar (menu icons and group-label text both sit at 20px).\n * The fading full logo clips under the shrinking rail edge while fading.\n *\n * Renders its own SidebarHeader (px-0 — the row owns all horizontal padding,\n * so its position can't jump when the header's icon-mode padding lands).\n */\nfunction SidebarLogo() {\n return (\n <SidebarHeaderPrimitive className=\"px-0\">\n <div className=\"relative flex h-15 items-center overflow-hidden px-5\">\n <BergetLogo\n variant=\"logotype\"\n size={32}\n className=\"shrink-0 transition-[opacity,visibility] duration-150 group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:invisible group-data-[collapsible=icon]:opacity-0\"\n />\n <span className=\"pointer-events-none invisible absolute inset-y-0 left-0 flex w-15 items-center pl-5 opacity-0 transition-[padding-left,opacity,visibility] duration-200 ease-linear group-data-[collapsible=icon]:visible group-data-[collapsible=icon]:pl-3 group-data-[collapsible=icon]:opacity-100\">\n <BergetLogo variant=\"symbol\" size={32} />\n </span>\n </div>\n </SidebarHeaderPrimitive>\n );\n}\n\n/** Page header for use inside <SidebarInset>. Its height (60px content + 1px)\n * keeps the bottom border on the same line as the sidebar header's border —\n * both occupy the 60-61px row, making the collapsed brand cell a 60x60\n * square. Compose the SidebarTrigger and a title inside. */\nfunction SidebarPageHeader({ className, ...props }: React.ComponentProps<'header'>) {\n return (\n <header\n className={cn(\n 'flex h-[calc(3.75rem+1px)] items-center gap-2 border-b border-berget-border px-4',\n className,\n )}\n {...props}\n />\n );\n}\n\ntype SidebarMenuButtonProps = React.ComponentProps<typeof SidebarMenuButtonPrimitive>;\n\ntype SidebarMenuSubButtonProps = React.ComponentProps<typeof SidebarMenuSubButtonPrimitive>;\n\nfunction SidebarMenuButton({ className, ...props }: SidebarMenuButtonProps) {\n return (\n <SidebarMenuButtonPrimitive\n className={cn(sizingMenuButtonClasses, iconModeButtonClasses, className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubButton({ className, ...props }: SidebarMenuSubButtonProps) {\n return (\n <SidebarMenuSubButtonPrimitive\n className={cn(sizingSubButtonClasses, '[&>svg]:text-inherit', className)}\n {...props}\n />\n );\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from '../../primitives/sidebar';\n\nexport {\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarLogo,\n SidebarMenuButton,\n SidebarMenuSubButton,\n SidebarPageHeader,\n SidebarProvider,\n};\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Table as TablePrimitive,\n TableHeader as TableHeaderPrimitive,\n TableBody as TableBodyPrimitive,\n TableFooter as TableFooterPrimitive,\n TableHead as TableHeadPrimitive,\n TableRow as TableRowPrimitive,\n TableCell as TableCellPrimitive,\n TableCaption as TableCaptionPrimitive,\n} from '../../primitives/table';\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => <TablePrimitive ref={ref} className={className} {...props} />,\n);\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableHeaderPrimitive\n ref={ref}\n className={cn('[&_tr]:border-b border-berget-table-border', className)}\n {...props}\n />\n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableBodyPrimitive\n ref={ref}\n className={cn('[&_tr:last-child]:border-0', className)}\n {...props}\n />\n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableFooterPrimitive\n ref={ref}\n className={cn(\n 'border-t border-berget-table-border bg-berget-table-footer-bg font-medium [&>tr]:last:border-0',\n className,\n )}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <TableRowPrimitive\n ref={ref}\n className={cn(\n 'border-b border-berget-table-border transition-colors hover:bg-berget-table-row-hover data-[state=selected]:bg-berget-table-row-selected',\n className,\n )}\n {...props}\n />\n ),\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <TableHeadPrimitive\n ref={ref}\n className={cn(\n 'h-12 px-4 text-left align-middle font-medium text-berget-table-head-text [&:has([role=checkbox])]:pr-0',\n className,\n )}\n {...props}\n />\n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <TableCellPrimitive\n ref={ref}\n className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)}\n {...props}\n />\n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <TableCaptionPrimitive\n ref={ref}\n className={cn('mt-4 text-sm text-berget-table-caption-text', className)}\n {...props}\n />\n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div\n data-slot=\"table-container\"\n className=\"relative w-full overflow-x-auto\"\n >\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Item as ItemPrimitive,\n ItemGroup,\n ItemSeparator as ItemSeparatorPrimitive,\n ItemMedia as ItemMediaPrimitive,\n ItemContent,\n ItemTitle as ItemTitlePrimitive,\n ItemDescription as ItemDescriptionPrimitive,\n ItemActions,\n ItemHeader,\n ItemFooter,\n} from '@/primitives/item';\nimport type { VariantProps } from 'class-variance-authority';\n\nexport interface ItemProps extends React.ComponentProps<typeof ItemPrimitive> {\n variant?: VariantProps<typeof ItemPrimitive>['variant'];\n size?: VariantProps<typeof ItemPrimitive>['size'];\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nexport function Item({ className, asChild, children, ...props }: ItemProps) {\n return (\n <ItemPrimitive\n render={asChild ? (children as React.ReactElement) : undefined}\n className={cn(\n /* Variant colours — override primitive defaults */\n 'data-[variant=outline]:border-berget-item-outline-border',\n 'data-[variant=muted]:bg-berget-item-muted-bg',\n 'data-[variant=muted]:text-berget-item-muted-fg',\n /* Hover / focus */\n '[&_a]:hover:bg-berget-item-link-hover-surface',\n 'focus-visible:border-berget-item-focus-ring focus-visible:ring-berget-item-focus-ring/50',\n className,\n )}\n {...props}\n >\n {asChild ? undefined : children}\n </ItemPrimitive>\n );\n}\n\n/** Re-export unchanged sub-components. */\nexport { ItemGroup, ItemContent, ItemActions, ItemHeader, ItemFooter };\n\n/** ItemMedia — override icon background. */\nexport const ItemMedia = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof ItemMediaPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <ItemMediaPrimitive\n ref={ref}\n className={cn('data-[variant=icon]:bg-berget-item-media-icon-bg', className)}\n {...props}\n />\n );\n});\nItemMedia.displayName = 'ItemMedia';\n\n/** ItemTitle — override to use semantic foreground. */\nexport const ItemTitle = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof ItemTitlePrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <ItemTitlePrimitive\n ref={ref}\n className={cn('text-berget-item-default-fg', className)}\n {...props}\n />\n );\n});\nItemTitle.displayName = 'ItemTitle';\n\n/** ItemDescription — override muted text colour. */\nexport const ItemDescription = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentProps<typeof ItemDescriptionPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <ItemDescriptionPrimitive\n ref={ref}\n className={cn('text-berget-item-description-fg', className)}\n {...props}\n />\n );\n});\nItemDescription.displayName = 'ItemDescription';\n\n/** ItemSeparator — override colour. */\nexport const ItemSeparator = React.forwardRef<\n React.ComponentRef<typeof ItemSeparatorPrimitive>,\n React.ComponentProps<typeof ItemSeparatorPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <ItemSeparatorPrimitive\n ref={ref}\n className={cn('bg-berget-item-separator', className)}\n {...props}\n />\n );\n});\nItemSeparator.displayName = 'ItemSeparator';\n","import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nimport { Separator } from \"@/primitives/separator\"\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\n \"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-2\", className)}\n {...props}\n />\n )\n}\n\nconst itemVariants = cva(\n \"group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted\",\n {\n variants: {\n variant: {\n default: \"border-transparent\",\n outline: \"border-border\",\n muted: \"border-transparent bg-muted/50\",\n },\n size: {\n default: \"gap-2.5 px-3 py-2.5\",\n sm: \"gap-2.5 px-3 py-2.5\",\n xs: \"gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & VariantProps<typeof itemVariants>) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(itemVariants({ variant, size, className })),\n },\n props\n ),\n render,\n state: {\n slot: \"item\",\n variant,\n size,\n },\n })\n}\n\nconst itemMediaVariants = cva(\n \"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"[&_svg:not([class*='size-'])]:size-4\",\n image:\n \"size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction ItemMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\n return (\n <div\n data-slot=\"item-media\"\n data-variant={variant}\n className={cn(itemMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-content\"\n className={cn(\n \"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-title\"\n className={cn(\n \"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n \"line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-actions\"\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-header\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-footer\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n}\n","import * as React from 'react';\nimport { Search } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { Input } from '../../primitives/input';\n\nexport type SearchInputProps = React.ComponentProps<'input'>;\n\nconst SearchInput = ({\n type = 'search',\n placeholder = 'Search...',\n className,\n ref,\n ...props\n}: SearchInputProps) => (\n <div className=\"relative flex w-full items-center\" data-slot=\"search-input\">\n <Search\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-2.5 size-4 text-berget-muted-foreground\"\n />\n <Input\n ref={ref}\n type={type}\n placeholder={placeholder}\n className={cn('rounded-full pl-8', className)}\n {...props}\n />\n </div>\n);\nSearchInput.displayName = 'SearchInput';\n\nexport { SearchInput };\n","import * as React from 'react';\nimport { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';\nimport { Check } from 'lucide-react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Checkbox as CheckboxBase } from '../../primitives/checkbox';\nimport { Typography } from '../typography';\n\nconst checkboxVariants = cva(\n 'inline-flex items-center justify-center rounded-berget-xs transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n variant: {\n default:\n 'text-foreground border border-berget-border-interactive bg-berget-surface-subtle hover:bg-berget-surface-raised',\n error:\n 'border border-berget-destructive-border bg-berget-destructive text-berget-destructive-foreground hover:bg-berget-destructive/90',\n success:\n 'border border-berget-success-border bg-berget-success text-berget-success-foreground hover:bg-berget-success/90',\n },\n size: {\n sm: 'w-4 h-4',\n default: 'w-5 h-5',\n lg: 'w-6 h-6',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, 'className'>,\n VariantProps<typeof checkboxVariants> {\n label?: string;\n description?: string;\n error?: string;\n className?: string;\n}\n\nconst Checkbox = React.forwardRef<React.ComponentRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n variant,\n size,\n label,\n description,\n error,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const checkboxId = id || generatedId;\n const errorId = `${checkboxId}-error`;\n\n return (\n <div className=\"flex items-start gap-3\">\n <div className=\"relative flex items-start pt-0.5\">\n <CheckboxBase\n ref={ref}\n id={checkboxId}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n aria-label={ariaLabel || label || undefined}\n className={cn(\n checkboxVariants({ variant, size }),\n 'cursor-pointer',\n disabled && 'cursor-not-allowed pointer-events-none',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator>\n <Check\n className=\"h-4 w-4 text-current stroke-current\"\n style={{ color: 'currentColor', stroke: 'currentColor' }}\n />\n </CheckboxPrimitive.Indicator>\n </CheckboxBase>\n </div>\n\n {(label || description || error) && (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={checkboxId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled\n ? 'text-white/40 cursor-not-allowed'\n : variant === 'error'\n ? 'text-berget-destructive-foreground cursor-pointer'\n : variant === 'success'\n ? 'text-berget-success-foreground cursor-pointer'\n : 'cursor-pointer',\n error && 'text-berget-destructive-foreground',\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <Typography variant=\"xs\" color=\"muted\">\n {description}\n </Typography>\n )}\n {error && (\n <Typography variant=\"xs\" id={errorId} className=\"text-berget-destructive-foreground\">\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox, checkboxVariants };\n","import { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\nimport { cn } from \"cn\"\nimport { CheckIcon } from \"lucide-react\"\n\nfunction Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer relative flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon\n />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox }\n","import * as React from 'react';\nimport { Switch as SwitchPrimitives } from '@base-ui/react/switch';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst switchRootVariants = cva(\n 'peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'data-unchecked:bg-berget-border data-checked:bg-berget-primary',\n primary:\n 'data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-primary-checked',\n subtle:\n 'data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-subtle-checked',\n },\n size: {\n sm: 'h-5 w-9',\n default: 'h-6 w-11',\n lg: 'h-7 w-[52px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst switchThumbVariants = cva(\n 'pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground',\n {\n variants: {\n size: {\n sm: 'h-4 w-4 data-checked:translate-x-4 data-unchecked:translate-x-0',\n default: 'h-5 w-5 data-checked:translate-x-5 data-unchecked:translate-x-0',\n lg: 'h-6 w-6 data-checked:translate-x-6 data-unchecked:translate-x-0',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n);\n\nexport interface SwitchProps\n extends Omit<SwitchPrimitives.Root.Props, 'className'>, VariantProps<typeof switchRootVariants> {\n label?: string;\n description?: string;\n error?: string;\n className?: string;\n}\n\nconst Switch = React.forwardRef<HTMLElement, SwitchProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n variant,\n size,\n label,\n description,\n error,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const switchId = id || generatedId;\n const errorId = `${switchId}-error`;\n\n return (\n <div className=\"flex items-center gap-3\">\n <SwitchPrimitives.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n aria-label={ariaLabel || label || undefined}\n className={cn(\n switchRootVariants({ variant, size }),\n disabled && 'cursor-not-allowed pointer-events-none',\n className,\n )}\n {...props}\n >\n <SwitchPrimitives.Thumb className={cn(switchThumbVariants({ size }))} />\n </SwitchPrimitives.Root>\n\n {(label || description || error) && (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled\n ? 'text-muted-foreground cursor-not-allowed'\n : error\n ? 'text-berget-destructive-foreground cursor-pointer'\n : 'text-foreground cursor-pointer',\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <Typography variant=\"xs\" color=\"muted\">\n {description}\n </Typography>\n )}\n {error && (\n <Typography variant=\"xs\" id={errorId} className=\"text-berget-destructive-foreground\">\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nexport { Switch, switchRootVariants, switchThumbVariants };\n","import * as React from \"react\"\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\nimport { cn } from \"cn\"\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className={cn(\"flex flex-1 text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n }\n />\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\"\n >) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-align-trigger={alignItemWithTrigger}\n className={cn(\"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: SelectPrimitive.GroupLabel.Props) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: SelectPrimitive.Item.Props) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText className=\"flex flex-1 shrink-0 gap-2 whitespace-nowrap\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n","'use client';\n\nimport * as React from 'react';\nimport { ChevronDown, Globe } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Icon } from '@/components/icon';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/primitives/popover';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/primitives/command';\nimport { type Country, COUNTRIES } from './countries';\n\nexport interface CountrySelectProps {\n value?: string | null;\n onValueChange?: (code: string) => void;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n align?: 'center' | 'start' | 'end';\n sideOffset?: number;\n}\n\nconst CountrySelect = React.forwardRef<React.ElementRef<'button'>, CountrySelectProps>(\n (\n {\n value,\n onValueChange,\n placeholder = 'Select country',\n disabled = false,\n className,\n align = 'center',\n sideOffset = 4,\n },\n ref,\n ) => {\n const [open, setOpen] = React.useState(false);\n const selectedCountry = React.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n ref={ref}\n render={\n <button\n type=\"button\"\n disabled={disabled}\n aria-expanded={open}\n className={cn(\n // Base layout — consistent with Select trigger\n 'flex w-full items-center justify-between',\n 'rounded-berget-xs border bg-card',\n 'px-4 py-3 text-sm',\n 'transition-colors duration-200',\n 'focus-visible:outline-none focus-visible:ring-0',\n 'focus-visible:ring-offset-0 focus-visible:border-berget-form-focus-border',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Default border & hover matching Select variant \"default\"\n 'border-berget-border-interactive hover:bg-berget-surface-hover',\n className,\n )}\n />\n }\n >\n <div className=\"flex items-center gap-2 min-w-0 flex-1\">\n {selectedCountry ? (\n <>\n <span className=\"text-xl flex-shrink-0\">{selectedCountry.flag}</span>\n <span className=\"truncate\">{selectedCountry.name}</span>\n <span className=\"text-berget-muted-foreground text-xs flex-shrink-0\">\n ({selectedCountry.code})\n </span>\n </>\n ) : (\n <>\n <Icon\n icon={Globe}\n size={16}\n className=\"flex-shrink-0 text-berget-muted-foreground\"\n />\n <span className=\"text-berget-muted-foreground truncate\">{placeholder}</span>\n </>\n )}\n </div>\n <Icon\n icon={ChevronDown}\n size={16}\n className={cn(\n 'flex-shrink-0 text-berget-muted-foreground',\n 'transition-transform duration-200',\n open && 'rotate-180',\n )}\n />\n </PopoverTrigger>\n\n <PopoverContent\n align={align}\n sideOffset={sideOffset}\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n >\n <Command>\n <CommandInput placeholder=\"Search country...\" />\n <CommandList>\n <CommandEmpty>No countries found.</CommandEmpty>\n <CommandGroup>\n {COUNTRIES.map((country) => (\n <CommandItem\n key={country.code}\n value={`${country.name} ${country.code}`}\n onSelect={() => {\n onValueChange?.(country.code);\n setOpen(false);\n }}\n className={cn(\n 'flex items-center gap-3 px-3 py-2.5',\n \"data-[selected='true']:bg-berget-brand-granite-700/40! data-[selected=true]:text-berget-foreground\",\n value === country.code && 'bg-berget-brand-granite-800/40',\n )}\n >\n <span className=\"text-xl flex-shrink-0\">{country.flag}</span>\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-sm truncate\">{country.name}</div>\n <div className=\"text-xs text-berget-muted-foreground\">{country.code}</div>\n </div>\n {value === country.code && (\n <div className=\"w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0\" />\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nCountrySelect.displayName = 'CountrySelect';\n\nexport { CountrySelect };\nexport type { Country };\nexport {\n COUNTRIES,\n EU_COUNTRY_CODES,\n getCountryByCode,\n getCountryByName,\n isEUCountry,\n} from './countries';\n","import * as React from 'react';\nimport { LucideIcon, LucideProps } from 'lucide-react';\nimport { cn } from '../../lib/utils';\n\nexport interface IconProps extends Omit<LucideProps, 'size'> {\n icon: LucideIcon;\n size: 16 | 24 | 32;\n className?: string;\n 'aria-label'?: string;\n 'aria-hidden'?: boolean;\n}\n\nconst iconStrokeMap: Record<IconProps['size'], number> = {\n 16: 1.4,\n 24: 1.6,\n 32: 1.8,\n};\n\nconst Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n icon: IconComponent,\n size,\n className,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden = true,\n ...props\n },\n ref,\n ) => {\n const strokeWidth = iconStrokeMap[size];\n const sizeClass = size === 16 ? 'w-4 h-4' : size === 24 ? 'w-6 h-6' : 'w-8 h-8';\n\n const ariaAttributes = ariaLabel ? { 'aria-label': ariaLabel } : { 'aria-hidden': ariaHidden };\n\n return (\n <IconComponent\n ref={ref}\n className={cn(sizeClass, className)}\n strokeWidth={strokeWidth}\n {...ariaAttributes}\n {...props}\n />\n );\n },\n);\n\nIcon.displayName = 'Icon';\n\nexport { Icon };\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport { cn } from \"cn\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { cn } from \"cn\"\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/primitives/dialog\"\nimport {\n InputGroup,\n InputGroupAddon,\n} from \"@/primitives/input-group\"\nimport { SearchIcon, CheckIcon } from \"lucide-react\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n \"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: Omit<React.ComponentProps<typeof Dialog>, \"children\"> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n children: React.ReactNode\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\n \"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0\",\n className\n )}\n showCloseButton={showCloseButton}\n >\n {children}\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n \"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn(\"py-6 text-center text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n \"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","import * as React from \"react\"\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@/primitives/button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"text-base leading-none font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@/primitives/button\"\nimport { Input } from \"@/primitives/input\"\nimport { Textarea } from \"@/primitives/textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\":\n \"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]\",\n \"inline-end\":\n \"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]\",\n \"block-start\":\n \"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2\",\n \"block-end\":\n \"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\":\n \"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\" | \"type\"> &\n VariantProps<typeof inputGroupButtonVariants> & {\n type?: \"button\" | \"submit\" | \"reset\"\n }) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n","import * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n","/**\n * List of countries supported by Odoo Fiscal Localization\n * Source: https://www.odoo.com/documentation/saas-15.3/applications/finance/accounting/fiscal_localizations/overview/localizations_list.html\n */\n\nexport interface Country {\n code: string; // ISO 3166-1 alpha-2 code\n name: string; // Country name\n flag: string; // Emoji flag\n}\n\nexport const COUNTRIES: Country[] = [\n { code: 'AX', name: 'Åland Islands', flag: '🇦🇽' },\n { code: 'DZ', name: 'Algeria', flag: '🇩🇿' },\n { code: 'AR', name: 'Argentina', flag: '🇦🇷' },\n { code: 'AU', name: 'Australia', flag: '🇦🇺' },\n { code: 'AT', name: 'Austria', flag: '🇦🇹' },\n { code: 'BE', name: 'Belgium', flag: '🇧🇪' },\n { code: 'BG', name: 'Bulgaria', flag: '🇧🇬' },\n { code: 'BO', name: 'Bolivia', flag: '🇧🇴' },\n { code: 'BR', name: 'Brazil', flag: '🇧🇷' },\n { code: 'CA', name: 'Canada', flag: '🇨🇦' },\n { code: 'CL', name: 'Chile', flag: '🇨🇱' },\n { code: 'CN', name: 'China', flag: '🇨🇳' },\n { code: 'CO', name: 'Colombia', flag: '🇨🇴' },\n { code: 'CR', name: 'Costa Rica', flag: '🇨🇷' },\n { code: 'CY', name: 'Cyprus', flag: '🇨🇾' },\n { code: 'HR', name: 'Croatia', flag: '🇭🇷' },\n { code: 'CZ', name: 'Czech Republic', flag: '🇨🇿' },\n { code: 'DK', name: 'Denmark', flag: '🇩🇰' },\n { code: 'DO', name: 'Dominican Republic', flag: '🇩🇴' },\n { code: 'EC', name: 'Ecuador', flag: '🇪🇨' },\n { code: 'EG', name: 'Egypt', flag: '🇪🇬' },\n { code: 'EE', name: 'Estonia', flag: '🇪🇪' },\n { code: 'ET', name: 'Ethiopia', flag: '🇪🇹' },\n { code: 'FI', name: 'Finland', flag: '🇫🇮' },\n { code: 'FR', name: 'France', flag: '🇫🇷' },\n { code: 'DE', name: 'Germany', flag: '🇩🇪' },\n { code: 'GR', name: 'Greece', flag: '🇬🇷' },\n { code: 'GT', name: 'Guatemala', flag: '🇬🇹' },\n { code: 'HN', name: 'Honduras', flag: '🇭🇳' },\n { code: 'HK', name: 'Hong Kong', flag: '🇭🇰' },\n { code: 'HU', name: 'Hungary', flag: '🇭🇺' },\n { code: 'IN', name: 'India', flag: '🇮🇳' },\n { code: 'ID', name: 'Indonesia', flag: '🇮🇩' },\n { code: 'IE', name: 'Ireland', flag: '🇮🇪' },\n { code: 'IL', name: 'Israel', flag: '🇮🇱' },\n { code: 'IT', name: 'Italy', flag: '🇮🇹' },\n { code: 'JP', name: 'Japan', flag: '🇯🇵' },\n { code: 'KE', name: 'Kenya', flag: '🇰🇪' },\n { code: 'LT', name: 'Lithuania', flag: '🇱🇹' },\n { code: 'LV', name: 'Latvia', flag: '🇱🇻' },\n { code: 'LU', name: 'Luxembourg', flag: '🇱🇺' },\n { code: 'MA', name: 'Morocco', flag: '🇲🇦' },\n { code: 'MT', name: 'Malta', flag: '🇲🇹' },\n { code: 'MX', name: 'Mexico', flag: '🇲🇽' },\n { code: 'MN', name: 'Mongolia', flag: '🇲🇳' },\n { code: 'NL', name: 'Netherlands', flag: '🇳🇱' },\n { code: 'NZ', name: 'New Zealand', flag: '🇳🇿' },\n { code: 'NO', name: 'Norway', flag: '🇳🇴' },\n { code: 'PK', name: 'Pakistan', flag: '🇵🇰' },\n { code: 'PA', name: 'Panama', flag: '🇵🇦' },\n { code: 'PE', name: 'Peru', flag: '🇵🇪' },\n { code: 'PL', name: 'Poland', flag: '🇵🇱' },\n { code: 'PT', name: 'Portugal', flag: '🇵🇹' },\n { code: 'RO', name: 'Romania', flag: '🇷🇴' },\n { code: 'SA', name: 'Saudi Arabia', flag: '🇸🇦' },\n { code: 'SG', name: 'Singapore', flag: '🇸🇬' },\n { code: 'SK', name: 'Slovakia', flag: '🇸🇰' },\n { code: 'SI', name: 'Slovenia', flag: '🇸🇮' },\n { code: 'ZA', name: 'South Africa', flag: '🇿🇦' },\n { code: 'ES', name: 'Spain', flag: '🇪🇸' },\n { code: 'SE', name: 'Sweden', flag: '🇸🇪' },\n { code: 'CH', name: 'Switzerland', flag: '🇨🇭' },\n { code: 'TW', name: 'Taiwan', flag: '🇹🇼' },\n { code: 'TH', name: 'Thailand', flag: '🇹🇭' },\n { code: 'TR', name: 'Turkey', flag: '🇹🇷' },\n { code: 'AE', name: 'United Arab Emirates', flag: '🇦🇪' },\n { code: 'GB', name: 'United Kingdom', flag: '🇬🇧' },\n { code: 'UA', name: 'Ukraine', flag: '🇺🇦' },\n { code: 'US', name: 'United States', flag: '🇺🇸' },\n { code: 'UY', name: 'Uruguay', flag: '🇺🇾' },\n { code: 'VE', name: 'Venezuela', flag: '🇻🇪' },\n { code: 'VN', name: 'Vietnam', flag: '🇻🇳' },\n];\n\n// Helper function to get country by code\nexport const getCountryByCode = (code: string): Country | undefined => {\n return COUNTRIES.find((country) => country.code === code);\n};\n\n// Helper function to get country by name (case-insensitive)\nexport const getCountryByName = (name: string): Country | undefined => {\n return COUNTRIES.find((country) => country.name.toLowerCase() === name.toLowerCase());\n};\n\n// EU member states (ISO 3166-1 alpha-2 codes)\n// Source: https://europa.eu/european-union/about-eu/countries_en\nexport const EU_COUNTRY_CODES = [\n 'AT', // Austria\n 'BE', // Belgium\n 'BG', // Bulgaria\n 'HR', // Croatia\n 'CY', // Cyprus\n 'CZ', // Czech Republic\n 'DK', // Denmark\n 'EE', // Estonia\n 'FI', // Finland\n 'FR', // France\n 'DE', // Germany\n 'GR', // Greece\n 'HU', // Hungary\n 'IE', // Ireland\n 'IT', // Italy\n 'LV', // Latvia\n 'LT', // Lithuania\n 'LU', // Luxembourg\n 'MT', // Malta\n 'NL', // Netherlands\n 'PL', // Poland\n 'PT', // Portugal\n 'RO', // Romania\n 'SK', // Slovakia\n 'SI', // Slovenia\n 'ES', // Spain\n 'SE', // Sweden\n] as const;\n\n// Helper function to check if a country is in the EU\nexport const isEUCountry = (countryCode: string): boolean => {\n return (EU_COUNTRY_CODES as readonly string[]).includes(countryCode);\n};\n","import * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Label({ className, ...props }: React.ComponentProps<\"label\">) {\n return (\n <label\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 { useMemo } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nimport { Label } from \"@/primitives/label\"\nimport { Separator } from \"@/primitives/separator\"\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<\"fieldset\">) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n \"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({\n className,\n variant = \"legend\",\n ...props\n}: React.ComponentProps<\"legend\"> & { variant?: \"legend\" | \"label\" }) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n \"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n \"group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst fieldVariants = cva(\n \"group/field flex w-full gap-2 data-[invalid=true]:text-destructive\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col *:w-full [&>.sr-only]:w-auto\",\n horizontal:\n \"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n responsive:\n \"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n)\n\nfunction Field({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n \"group/field-content flex flex-1 flex-col gap-0.5 leading-snug\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n \"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n \"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n \"text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5\",\n \"last:mt-0 nth-last-2:-mt-1\",\n \"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n children?: React.ReactNode\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n \"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2\",\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"relative mx-auto block w-fit bg-background px-2 text-muted-foreground\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n )\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<\"div\"> & {\n errors?: Array<{ message?: string } | undefined>\n}) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {uniqueErrors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>\n )}\n </ul>\n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn(\"text-sm font-normal text-destructive\", className)}\n {...props}\n >\n {content}\n </div>\n )\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n}\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Icon } from '../icon/Icon';\nimport { ExternalLink } from 'lucide-react';\n\nconst linkVariants = cva(\n 'inline-flex cursor-pointer items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'text-foreground hover:text-foreground/80',\n primary: 'text-berget-brand-moss-400 hover:text-berget-brand-moss-500',\n secondary: 'text-berget-accent hover:text-berget-accent/80',\n ghost: 'text-muted-foreground hover:text-foreground',\n muted: 'text-muted-foreground hover:text-muted-foreground/80',\n code: 'text-berget-brand-moss-400 hover:text-berget-brand-moss-500 font-mono text-sm bg-berget-primary-tint px-2 py-1 rounded hover:bg-berget-primary-tint-hover',\n },\n size: {\n sm: 'text-sm',\n default: 'text-base',\n lg: 'text-lg',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface LinkProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement>, VariantProps<typeof linkVariants> {\n children: React.ReactNode;\n external?: boolean;\n icon?: React.ReactNode;\n showExternalIcon?: boolean;\n disabled?: boolean;\n}\n\nconst Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n (\n {\n className,\n variant,\n size,\n external = false,\n icon,\n showExternalIcon = false,\n disabled = false,\n children,\n ...props\n },\n ref,\n ) => {\n const isExternal =\n external ||\n (typeof props.href === 'string' &&\n (props.href.startsWith('http://') ||\n props.href.startsWith('https://') ||\n props.href.startsWith('mailto:') ||\n props.href.startsWith('tel:')));\n\n return (\n <a\n ref={ref}\n className={cn(linkVariants({ variant, size }), className)}\n {...(disabled && {\n 'aria-disabled': true,\n onClick: (e: React.MouseEvent) => e.preventDefault(),\n })}\n {...props}\n {...(isExternal &&\n !disabled && {\n rel: 'noopener noreferrer',\n target: '_blank',\n })}\n >\n {children}\n {icon && <span className=\"inline-flex items-center\">{icon}</span>}\n {showExternalIcon && isExternal && !disabled && (\n <span className=\"inline-flex items-center ml-1 opacity-60\" aria-hidden=\"true\">\n <Icon icon={ExternalLink} size={16} />\n </span>\n )}\n </a>\n );\n },\n);\nLink.displayName = 'Link';\n\nexport { Link, linkVariants };\n","import * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst containerVariants = cva('w-full mx-auto', {\n variants: {\n size: {\n sm: 'max-w-3xl',\n md: 'max-w-5xl',\n lg: 'max-w-7xl',\n xl: 'max-w-screen-xl',\n full: 'max-w-full',\n },\n padding: {\n none: 'px-0',\n sm: 'px-4 sm:px-6',\n md: 'px-4 sm:px-6 lg:px-8',\n lg: 'px-4 sm:px-8 lg:px-12',\n },\n },\n defaultVariants: {\n size: 'lg',\n padding: 'md',\n },\n});\n\nexport interface ContainerProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof containerVariants> {\n children?: React.ReactNode;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ className, size, padding, asChild = false, children, ...props }, ref) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(containerVariants({ size, padding }), className),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nContainer.displayName = 'Container';\n\nexport { Container, containerVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst gridVariants = cva('grid', {\n variants: {\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n },\n defaultVariants: {\n align: 'stretch',\n justify: 'start',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport type GridColsScale = 1 | 2 | 3 | 4 | 6 | 12;\n\nexport type GridRowsScale = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface GridProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof gridVariants> {\n children?: React.ReactNode;\n cols?: GridColsScale;\n rows?: GridRowsScale;\n gap?: SpacingScale;\n gapX?: SpacingScale;\n gapY?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Grid = React.forwardRef<HTMLElement, GridProps>(\n (\n { className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n gridVariants({ align, justify }),\n cols !== undefined && `grid-cols-${cols}`,\n rows !== undefined && `grid-rows-${rows}`,\n gap !== undefined && `gap-${gap}`,\n gapX !== undefined && `gap-x-${gapX}`,\n gapY !== undefined && `gap-y-${gapY}`,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nGrid.displayName = 'Grid';\n\nexport { Grid, gridVariants };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined && `gap-${gap}`,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nBox.displayName = 'Box';\n\nexport { Box, boxVariants };\n","import * as React from 'react';\nimport { Globe } from 'lucide-react';\nimport { Icon } from '../icon';\nimport { Button } from '../button';\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n} from '../dropdown-menu';\n\nexport interface LanguageSelectOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface LanguageSelectProps {\n options: LanguageSelectOption[];\n value?: string;\n onValueChange?: (value: string) => void;\n className?: string;\n}\n\nconst LanguageSelect = React.forwardRef<HTMLButtonElement, LanguageSelectProps>(\n ({ className, options, value, onValueChange }, ref) => {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger ref={ref} asChild>\n <Button variant=\"outline\" size=\"icon\" className={className} aria-label=\"Select language\">\n <span className=\"sr-only\">Select language</span>\n <Icon icon={Globe} size={16} aria-hidden={true} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuRadioGroup\n value={value}\n onValueChange={onValueChange ? (v) => onValueChange(v as string) : undefined}\n >\n {options.map((option) => (\n <DropdownMenuRadioItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n // MenuRadioItem defaults to staying open (radio semantics);\n // a language picker closes on selection.\n closeOnClick={true}\n >\n {option.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n },\n);\n\nLanguageSelect.displayName = 'LanguageSelect';\n\nexport { LanguageSelect };\n","import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Icon } from '../icon/Icon';\nimport { Divider } from '../divider';\nimport { Typography } from '../typography';\nimport { Check } from 'lucide-react';\n\nexport interface ListProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n}\n\nconst List = React.forwardRef<HTMLDivElement, ListProps>(\n ({ className, children, ...props }, ref) => {\n const childrenArray = React.Children.toArray(children);\n return (\n <div ref={ref} className={cn('flex flex-col', className)} {...props}>\n {childrenArray.map((child, index) => (\n <React.Fragment key={index}>\n {child}\n {index < childrenArray.length - 1 && <Divider variant=\"subtle\" />}\n </React.Fragment>\n ))}\n </div>\n );\n },\n);\nList.displayName = 'List';\n\nexport interface ListItemProps extends React.HTMLAttributes<HTMLDivElement> {\n icon?: React.ReactNode;\n children: React.ReactNode;\n interactive?: boolean;\n}\n\nconst ListItem = React.forwardRef<HTMLDivElement, ListItemProps>(\n ({ className, icon, children, interactive = true, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex items-center gap-4 px-4 py-3 sm:px-6 sm:py-4',\n interactive && 'transition-all duration-200 hover:bg-berget-surface-hover cursor-pointer',\n className,\n )}\n {...props}\n >\n {icon && <div className=\"flex-shrink-0 flex items-center justify-center\">{icon}</div>}\n <div className=\"flex-1 min-w-0\">{children}</div>\n </div>\n ),\n);\nListItem.displayName = 'ListItem';\n\nexport interface ListHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n}\n\nconst ListHeader = React.forwardRef<HTMLDivElement, ListHeaderProps>(\n ({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('px-4 py-2 sm:px-6 sm:py-3 text-sm text-muted-foreground', className)}\n {...props}\n >\n {children}\n </div>\n ),\n);\nListHeader.displayName = 'ListHeader';\n\nexport interface FeatureListProps extends React.HTMLAttributes<HTMLUListElement> {\n items: string[];\n variant?: 'bullet' | 'checkmark';\n}\n\nconst FeatureList = React.forwardRef<HTMLUListElement, FeatureListProps>(\n ({ items, variant = 'bullet', className, ...props }, ref) => {\n return (\n <ul ref={ref} className={cn('flex flex-col gap-fluid-md', className)} {...props}>\n {items.map((item, index) => (\n <li key={index} className=\"flex items-start gap-fluid-md\">\n {variant === 'bullet' ? (\n <span className=\"w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2\" />\n ) : (\n <div className=\"flex-shrink-0 mt-0.5\">\n <Icon icon={Check} size={24} className=\"text-berget-logo-light\" />\n </div>\n )}\n <Typography variant=\"body\" color=\"muted\">\n {item}\n </Typography>\n </li>\n ))}\n </ul>\n );\n },\n);\nFeatureList.displayName = 'FeatureList';\n\nexport { List, ListItem, ListHeader, FeatureList };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Separator } from '../../primitives/separator';\nimport { Typography } from '../typography';\n\nconst dividerVariants = cva('', {\n variants: {\n variant: {\n default: 'bg-berget-separator',\n subtle: 'bg-berget-separator-subtle',\n strong: 'bg-berget-border-interactive',\n primary: 'bg-berget-primary-border',\n muted: 'bg-berget-separator-subtle',\n },\n size: {\n thin: '',\n medium: '!h-[2px]',\n thick: '!h-[4px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'thin',\n },\n});\n\nexport interface DividerProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dividerVariants> {\n orientation?: 'horizontal' | 'vertical';\n label?: string;\n labelPosition?: 'center' | 'left' | 'right';\n}\n\nconst Divider = React.forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n className,\n orientation = 'horizontal',\n variant,\n size,\n label,\n labelPosition = 'center',\n ...props\n },\n ref,\n ) => {\n if (label) {\n return (\n <div ref={ref} className={cn('flex items-center w-full', className)} {...props}>\n {labelPosition !== 'right' && (\n <Separator\n orientation=\"horizontal\"\n className={cn(dividerVariants({ variant, size }), 'flex-1')}\n />\n )}\n <Typography variant=\"small\" color=\"muted\" className=\"px-4 whitespace-nowrap\">\n {label}\n </Typography>\n {labelPosition !== 'left' && (\n <Separator\n orientation=\"horizontal\"\n className={cn(dividerVariants({ variant, size }), 'flex-1')}\n />\n )}\n </div>\n );\n }\n\n return (\n <Separator\n ref={ref as React.Ref<never>}\n orientation={orientation}\n className={cn(\n dividerVariants({ variant, size }),\n orientation === 'vertical' && 'h-full !w-[1px]',\n className,\n )}\n />\n );\n },\n);\nDivider.displayName = 'Divider';\n\nexport { Divider, dividerVariants };\n","import { useState, useEffect, useCallback } from 'react';\nimport { Copy, Check } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { getHighlighter } from '../../lib/shiki';\n\nexport interface CodeBlockProps {\n code: string;\n language?: string;\n title?: string;\n className?: string;\n}\n\nexport function CodeBlock({ code, language = 'text', title, className }: CodeBlockProps) {\n const [html, setHtml] = useState<string | null>(null);\n const [copied, setCopied] = useState(false);\n\n useEffect(() => {\n getHighlighter().then((highlighter) => {\n const loadedLangs = highlighter.getLoadedLanguages();\n const lang = loadedLangs.includes(language) ? language : 'text';\n setHtml(highlighter.codeToHtml(code, { lang, theme: 'berget' }));\n });\n }, [code, language]);\n\n const handleCopy = useCallback(async () => {\n await navigator.clipboard.writeText(code);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }, [code]);\n\n const copyButton = (\n <button\n onClick={handleCopy}\n className=\"flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors\"\n aria-label=\"Copy code\"\n >\n {copied ? <Check className=\"w-3.5 h-3.5\" /> : <Copy className=\"w-3.5 h-3.5\" />}\n </button>\n );\n\n return (\n <div\n className={cn(\n 'rounded-berget-xs border bg-berget-codeblock-bg border-berget-border backdrop-blur-[12px] relative overflow-hidden isolate',\n className,\n )}\n >\n {title && (\n <div className=\"!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg\">\n <span className=\"text-berget-muted-foreground\">{title}</span>\n </div>\n )}\n <div className=\"absolute right-2 top-2 z-10\">{copyButton}</div>\n {html ? (\n <div\n className=\"[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent\"\n dangerouslySetInnerHTML={{ __html: html }}\n />\n ) : (\n <pre className=\"!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground\">\n <code>{code}</code>\n </pre>\n )}\n </div>\n );\n}\n","import * as React from 'react';\nimport { useState } from 'react';\nimport { cn } from '../../lib/utils';\n\nexport interface WindowTab {\n id: string;\n label: string;\n}\n\nexport interface WindowFrameProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Window title shown in the title bar when no tabs are provided */\n title?: string;\n /** Optional tabs for switching content */\n tabs?: WindowTab[];\n /** Controlled active tab ID */\n activeTab?: string;\n /** Callback when a tab is selected */\n onTabChange?: (tabId: string) => void;\n}\n\nexport const WindowFrame = React.forwardRef<HTMLDivElement, WindowFrameProps>(\n ({ title = 'window', tabs, activeTab, onTabChange, children, className, ...props }, ref) => {\n const [internalActive, setInternalActive] = useState(tabs?.[0]?.id ?? '');\n const currentTab = activeTab ?? internalActive;\n\n const handleTabChange = (id: string) => {\n if (onTabChange) {\n onTabChange(id);\n } else {\n setInternalActive(id);\n }\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n 'rounded-berget-sm overflow-hidden shadow-berget-md border border-berget-brand-granite-700 bg-berget-brand-granite-800',\n className,\n )}\n {...props}\n >\n {/* Title bar */}\n <div className=\"flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900\">\n <div className=\"flex items-center gap-2 flex-shrink-0\">\n <div className=\"w-3 h-3 rounded-full bg-berget-brand-muscaria-400\" />\n <div className=\"w-3 h-3 rounded-full bg-berget-brand-chanterelle-200\" />\n <div className=\"w-3 h-3 rounded-full bg-berget-brand-moss-400\" />\n </div>\n\n {tabs && tabs.length > 0 ? (\n <div className=\"ml-4 flex items-center gap-1\">\n {tabs.map((tab) => (\n <button\n key={tab.id}\n type=\"button\"\n onClick={() => handleTabChange(tab.id)}\n className={cn(\n 'px-3 py-1 text-sm transition-colors cursor-pointer',\n currentTab === tab.id\n ? 'rounded-berget-xs bg-white/10 text-berget-foreground font-medium'\n : 'rounded text-berget-muted-foreground hover:text-berget-foreground font-medium',\n )}\n >\n {tab.label}\n </button>\n ))}\n </div>\n ) : (\n <span className=\"ml-4 text-sm font-mono text-berget-brand-moss-400\">{title}</span>\n )}\n </div>\n\n {/* Content area */}\n <div>{children}</div>\n </div>\n );\n },\n);\n\nWindowFrame.displayName = 'WindowFrame';\n","import { useEffect, useRef } from 'react';\nimport { cn } from '../../lib/utils';\n\n/**\n * FogIllustration — a volumetric fog raymarcher rendered as chunky\n * 1-bit dither in a given palette.\n *\n * Two GPU passes: the scene is raymarched at low internal resolution\n * (ridged fbm ground, drifting fog volumes, air haze — the fog hides\n * the low resolution), then a full-resolution pass thresholds the\n * scene against a Bayer matrix with hash jitter: ink dots on milk,\n * with moss-tinted dots where fog dominates.\n *\n * The canvas fills its parent element; give the parent a size.\n * Pauses under prefers-reduced-motion after one frame.\n */\n\nexport type FogPalette = {\n /** Dark terrain and dither ink. */\n ink: string;\n /** Background the dots sit on. */\n milk: string;\n /** Tint for dots where fog dominates. */\n moss: string;\n};\n\n/** The Berget brand palette, as rendered sRGB. */\nexport const FOG_BRAND_PALETTE: FogPalette = {\n ink: '#171a1a',\n milk: '#f7f5ed',\n moss: '#598c6b',\n};\n\nexport interface FogIllustrationProps {\n /** Colors as hex strings. Unset keys fall back to the brand palette. */\n palette?: Partial<FogPalette>;\n /** Flight speed multiplier @default 1 */\n speed?: number;\n /** Additional CSS classes for the canvas element */\n className?: string;\n}\n\nconst hexToRgb = (hex: string): [number, number, number] => {\n let h = hex.replace('#', '');\n if (h.length === 3)\n h = h\n .split('')\n .map((c) => c + c)\n .join('');\n const n = Number.parseInt(h, 16);\n return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];\n};\n\nconst hexToRgbAll = (p: FogPalette) => ({\n ink: hexToRgb(p.ink),\n milk: hexToRgb(p.milk),\n moss: hexToRgb(p.moss),\n});\n\nconst VERT = `#version 300 es\nvoid main() {\n vec2 p = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));\n gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0);\n}`;\n\n/** Pass A — raymarch the foggy terrain at low resolution. */\nconst SCENE_FRAG = `#version 300 es\nprecision highp float;\nout vec4 outColor;\nuniform vec2 uRes;\nuniform float uTime;\nuniform sampler2D uNoise;\n\nfloat noise(vec3 x) {\n // 3D value noise from the 2D random texture — iq's two-slice trick:\n // z slices are tiled into the u axis, two neighbours mixed by fract(z).\n vec3 p = floor(x), f = fract(x);\n f = f * f * (3.0 - 2.0 * f);\n vec2 uv = (p.xy + vec2(37.0, 239.0) * p.z) + f.xy;\n vec2 rg = texture(uNoise, (uv + 0.5) / 256.0).xy;\n return mix(rg.x, rg.y, f.z) * 2.0 - 1.0;\n}\n\nfloat ground(vec3 pos, int oct) {\n float f = 0.0;\n float s = 1.4;\n vec3 p = pos * s * 0.1;\n for (int i = 0; i < 6; i++) {\n if (i >= oct) break;\n f += abs(noise(p)) * s;\n p = vec3(p.z * 5.0, p.xy * 3.0 + p.yx * 4.0 * vec2(1, -1)) * 2.0 / 5.0;\n s /= 2.0;\n }\n return (pos.y + f) * 0.8;\n}\n\nfloat fogD(vec3 pos, int oct) {\n float f = 0.0;\n float s = 1.0;\n vec3 p = pos * 0.7;\n p += uTime * vec3(0.0, -0.02, 0.02);\n for (int i = 0; i < 6; i++) {\n if (i >= oct) break;\n f += noise(p) * s;\n p = vec3(p.z * 5.0, p.xy * 3.0 + p.yx * 4.0 * vec2(1, -1)) * 2.0 / 5.0;\n s /= 1.7;\n }\n f += smoothstep(0.2, 0.0, abs(pos.y + 1.0)) * 0.4;\n f += smoothstep(0.35, 0.15, abs(pos.y - 0.02)) * 0.7;\n f *= 1.0 - smoothstep(-0.1, 0.55, pos.y);\n f = smoothstep(0.45, 1.7, f);\n float g = ground(pos, 2);\n f *= 1.0 - g / (abs(g) + 0.04);\n return f;\n}\n\nfloat airD(vec3 pos) { return exp2(-pos.y / 5.0 - 3.0); }\n\nvoid main() {\n float time = uTime * 0.2;\n vec3 velocity = vec3(1.0, 0.0, 0.0);\n vec3 camPos = vec3(sin(time * 0.618) * 0.4, 0.62 + 0.08 * sin(time), 0.0) + time * velocity;\n vec3 camLook = vec3(-1.0, -0.3, 4.0) + (time - sin(time)) * velocity;\n\n vec2 fc = gl_FragCoord.xy;\n vec3 ray = vec3((fc - uRes * 0.5) / uRes.x, 1.0);\n vec3 camDir = normalize(camLook - camPos);\n vec3 camRight = normalize(cross(vec3(0.0, 1.0, 0.0), camDir));\n vec3 camUp = cross(camDir, camRight);\n ray = normalize(ray.x * camRight + ray.y * camUp + ray.z * camDir);\n\n vec3 sunDir = normalize(vec3(-3.0, 2.0, 1.0));\n\n vec3 pos = camPos;\n float absorption = 1.0;\n float emission = 0.0;\n float fogFactor = 0.0;\n float lastStride = 0.0;\n float lastFog = 0.0;\n float lastAir = 0.0;\n\n for (int i = 0; i < 80; i++) {\n float h = ground(pos, 4);\n float fog = fogD(pos, 3);\n float fogIntegral = lastStride * mix(fog, lastFog, 0.5);\n float air = airD(pos);\n float airIntegral = lastStride * mix(air, lastAir, 0.5);\n\n float fogAbsDelta = pow(0.1, fogIntegral);\n float fogEmiDelta = 1.0 - fogAbsDelta;\n float shadowStep = 0.07;\n float shadow = (fog - fogD(pos + sunDir * shadowStep, 2)) / shadowStep;\n fogEmiDelta *= mix(0.2, 0.85, smoothstep(-1.0, 1.0, shadow));\n\n float airAbsDelta = pow(0.55, airIntegral);\n float airEmiDelta = (1.0 - pow(0.55, airIntegral)) * 0.5;\n\n float absDelta = fogAbsDelta * airAbsDelta;\n emission += absorption * sqrt(absDelta) * (fogEmiDelta + airEmiDelta);\n absorption *= absDelta;\n\n fogFactor = max(fogFactor, (1.0 - absorption) * step(0.05, fog));\n\n lastFog = fog;\n lastAir = air;\n h = min(h, 0.1);\n lastStride = h;\n pos += h * ray;\n if (h < 0.001) break;\n }\n\n float brightness;\n if (absorption > 0.02) {\n // terrain visible — light it\n vec2 d = vec2(-1.0, 1.0) * 0.02;\n vec3 normal = normalize(\n ground(pos + d.xxx, 5) * d.xxx +\n ground(pos + d.xyy, 5) * d.xyy +\n ground(pos + d.yxy, 5) * d.yxy +\n ground(pos + d.yyx, 5) * d.yyx\n );\n float ao = smoothstep(-0.2, 1.5, ground(pos + normal * 0.3, 5) / 0.3);\n float shade = (0.5 * ao + 0.5 * max(dot(normal, sunDir), 0.0)) * 0.65;\n brightness = shade * absorption + emission;\n } else {\n brightness = emission;\n }\n\n // Clear sky — rays that escape upward land on milk, whatever the\n // haze did. The poster look: light sky, dark ridges, fog between.\n float sky = smoothstep(-0.15, 0.35, ray.y) * 0.92;\n brightness = max(brightness, sky * absorption);\n\n outColor = vec4(clamp(brightness, 0.0, 1.0), clamp(fogFactor, 0.0, 1.0), 0.0, 1.0);\n}`;\n\n/** Pass B — full-resolution 1-bit dither of the scene. */\nconst DITHER_FRAG = `#version 300 es\nprecision highp float;\nout vec4 outColor;\nuniform vec2 uRes;\nuniform float uDot;\nuniform sampler2D uScene;\nuniform vec3 uInk;\nuniform vec3 uMilk;\nuniform vec3 uMoss;\n\nfloat bayer2(vec2 a) { a = floor(a); return fract(a.x / 2.0 + a.y * a.y * 0.75); }\nfloat bayer4(vec2 a) { return bayer2(0.5 * a) * 0.25 + bayer2(a); }\nfloat hash12(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\nvoid main() {\n // Chunky cells: one dot decision per uDot×uDot block — the dither\n // reads as visible pixels, not 1px noise.\n vec2 cell = floor(gl_FragCoord.xy / uDot);\n vec4 scene = texture(uScene, (cell * uDot + uDot * 0.5) / uRes);\n float darkness = 1.0 - scene.r;\n float jitter = (hash12(cell) - 0.5) * 0.3;\n float on = step(darkness, bayer4(cell) + jitter);\n vec3 col = scene.g > 0.5 ? uMoss : uInk;\n outColor = vec4(mix(col, uMilk, on), 1.0);\n}`;\n\nconst compile = (gl: WebGL2RenderingContext, type: number, src: string): WebGLShader => {\n const sh = gl.createShader(type);\n if (!sh) throw new Error('shader creation failed');\n gl.shaderSource(sh, src);\n gl.compileShader(sh);\n if (!gl.getShaderParameter(sh, gl.COMPILE_STATUS)) {\n throw new Error(gl.getShaderInfoLog(sh) || 'shader compile failed');\n }\n return sh;\n};\n\nconst program = (gl: WebGL2RenderingContext, frag: string): WebGLProgram => {\n const p = gl.createProgram();\n if (!p) throw new Error('program creation failed');\n gl.attachShader(p, compile(gl, gl.VERTEX_SHADER, VERT));\n gl.attachShader(p, compile(gl, gl.FRAGMENT_SHADER, frag));\n gl.linkProgram(p);\n if (!gl.getProgramParameter(p, gl.LINK_STATUS)) {\n throw new Error(gl.getProgramInfoLog(p) || 'program link failed');\n }\n return p;\n};\n\nexport const FogIllustration = ({ palette, speed = 1, className }: FogIllustrationProps) => {\n const ref = useRef<HTMLCanvasElement>(null);\n // Live props — the GL setup runs once; palette and speed changes\n // apply on the next frame without rebuilding the context.\n const live = useRef({ palette: { ...FOG_BRAND_PALETTE, ...palette }, speed });\n live.current = { palette: { ...FOG_BRAND_PALETTE, ...palette }, speed };\n\n useEffect(() => {\n const canvas = ref.current;\n const parent = canvas?.parentElement;\n if (!canvas || !parent) return;\n\n // preserveDrawingBuffer keeps the frame readable for screenshots —\n // the cost is negligible for a decorative illustration.\n const gl = canvas.getContext('webgl2', {\n antialias: false,\n alpha: false,\n preserveDrawingBuffer: true,\n });\n if (!gl) return;\n\n let sceneProg: WebGLProgram;\n let ditherProg: WebGLProgram;\n try {\n sceneProg = program(gl, SCENE_FRAG);\n ditherProg = program(gl, DITHER_FRAG);\n } catch (err) {\n console.error('fog shader failed:', err);\n return; // shader failed — leave the panel empty rather than broken\n }\n\n // Noise texture — the Shadertoy iChannel1 stand-in.\n const noiseTex = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, noiseTex);\n const N = 256;\n const data = new Uint8Array(N * N * 4);\n for (let i = 0; i < data.length; i += 4) {\n data[i] = Math.random() * 256;\n data[i + 1] = Math.random() * 256;\n data[i + 2] = Math.random() * 256;\n data[i + 3] = 255;\n }\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, N, N, 0, gl.RGBA, gl.UNSIGNED_BYTE, data);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\n // Low-res scene target.\n const sceneTex = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, sceneTex);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n const fbo = gl.createFramebuffer();\n\n const SCALE = 0.3; // internal raymarch resolution\n const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n const start = performance.now();\n let raf = 0;\n let last = 0;\n\n const render = (elapsed: number) => {\n const w = parent.clientWidth;\n const h = parent.clientHeight;\n if (w === 0 || h === 0) return;\n const dpr = Math.min(window.devicePixelRatio || 1, 2);\n if (canvas.width !== Math.round(w * dpr) || canvas.height !== Math.round(h * dpr)) {\n canvas.width = Math.round(w * dpr);\n canvas.height = Math.round(h * dpr);\n }\n const sceneW = Math.max(64, Math.round(w * SCALE));\n const sceneH = Math.max(64, Math.round(h * SCALE));\n gl.bindTexture(gl.TEXTURE_2D, sceneTex);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, sceneW, sceneH, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n\n const t = elapsed * live.current.speed;\n\n // Pass A — scene at low resolution.\n gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, sceneTex, 0);\n gl.viewport(0, 0, sceneW, sceneH);\n gl.useProgram(sceneProg);\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, noiseTex);\n gl.uniform1i(gl.getUniformLocation(sceneProg, 'uNoise'), 0);\n gl.uniform2f(gl.getUniformLocation(sceneProg, 'uRes'), sceneW, sceneH);\n gl.uniform1f(gl.getUniformLocation(sceneProg, 'uTime'), t);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n\n // Pass B — dither at full resolution.\n const { ink, milk, moss } = hexToRgbAll(live.current.palette);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, canvas.width, canvas.height);\n gl.useProgram(ditherProg);\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, sceneTex);\n gl.uniform1i(gl.getUniformLocation(ditherProg, 'uScene'), 0);\n gl.uniform2f(gl.getUniformLocation(ditherProg, 'uRes'), canvas.width, canvas.height);\n gl.uniform1f(gl.getUniformLocation(ditherProg, 'uDot'), Math.max(3, Math.round(dpr * 2)));\n gl.uniform3f(gl.getUniformLocation(ditherProg, 'uInk'), ...ink);\n gl.uniform3f(gl.getUniformLocation(ditherProg, 'uMilk'), ...milk);\n gl.uniform3f(gl.getUniformLocation(ditherProg, 'uMoss'), ...moss);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n };\n\n render(0);\n if (!reduced) {\n const frame = (now: number) => {\n if (now - last >= 1000 / 30) {\n last = now;\n render((now - start) / 1000);\n }\n raf = requestAnimationFrame(frame);\n };\n raf = requestAnimationFrame(frame);\n }\n const observer = new ResizeObserver(() => render((performance.now() - start) / 1000));\n observer.observe(parent);\n\n return () => {\n cancelAnimationFrame(raf);\n observer.disconnect();\n gl.deleteProgram(sceneProg);\n gl.deleteProgram(ditherProg);\n gl.deleteTexture(noiseTex);\n gl.deleteTexture(sceneTex);\n gl.deleteFramebuffer(fbo);\n };\n }, []);\n\n return <canvas ref={ref} aria-hidden=\"true\" className={cn('size-full', className)} />;\n};\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AA+Gd;AAlGT,IAAM,uBAA6B,oBAAqD,MAAS;AAEjG,IAAM,cAAc;AAEpB,SAAS,iBAAmC;AAC1C,SAAO,OA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ACX,2BAAqB,GAAG;AACxB,eAAS,WAAW;AACpB,SAAG,cAAc,SAAS;AAC1B,SAAG,cAAc,UAAU;AAC3B,SAAG,cAAc,QAAQ;AACzB,SAAG,cAAc,QAAQ;AACzB,SAAG,kBAAkB,GAAG;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO,gBAAAD,MAAC,YAAO,KAAU,eAAY,QAAO,WAAW,GAAG,aAAa,SAAS,GAAG;AACrF;","names":["ThemeProvider","React","React","jsx","cn","jsx","jsx","Button","React","cva","jsx","cva","React","cva","cn","jsx","jsx","cva","Card","React","cva","jsx","jsxs","cva","React","React","React","jsx","jsxs","aspectRatio","width","height","jsx","jsxs","Icon","jsx","jsxs","Card","React","cva","cva","cn","jsx","jsx","alertVariants","cva","Alert","React","jsx","jsxs","React","jsx","jsxs","React","Fragment","jsx","jsxs","NavigationMenuPrimitive","cva","cva","cn","jsx","jsxs","jsx","cn","cva","jsx","cn","jsx","cn","jsx","jsxs","NavigationMenuPrimitive","navigationMenuTriggerStyle","cva","React","cva","cn","React","cn","jsx","cn","jsx","cn","jsx","jsxs","jsx","cn","jsxs","jsx","cn","cn","jsx","cn","jsx","jsxs","jsx","jsxs","cn","jsx","jsxs","open","cn","cva","jsx","jsxs","SidebarGroupLabel","SidebarProvider","SidebarGroup","SidebarFooter","SidebarHeader","SidebarMenuButton","SidebarMenuSubButton","React","cn","jsx","jsx","Table","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","React","mergeProps","useRender","cva","cn","jsx","cn","cva","useRender","mergeProps","jsx","Item","ItemMedia","jsx","ItemTitle","ItemDescription","ItemSeparator","jsx","jsxs","React","CheckboxPrimitive","Check","cva","cn","jsx","jsx","jsxs","cva","Checkbox","CheckboxPrimitive","Check","React","cva","jsx","jsxs","cva","cn","ChevronDownIcon","CheckIcon","jsx","jsxs","React","ChevronDown","React","jsx","cn","jsx","cn","DialogPrimitive","cn","XIcon","jsx","jsxs","cva","cn","cn","jsx","jsx","cn","cva","CheckIcon","jsx","jsxs","cn","jsx","jsxs","cn","jsxs","cn","jsx","CheckIcon","Fragment","jsx","jsxs","ChevronDown","cn","jsx","useMemo","cva","cn","jsx","jsxs","cn","cva","useMemo","React","cva","jsx","jsxs","cva","React","mergeProps","useRender","cva","cva","useRender","mergeProps","React","cva","mergeProps","useRender","cva","useRender","mergeProps","React","cva","mergeProps","useRender","cva","useRender","mergeProps","React","Globe","jsx","jsxs","Button","Globe","React","React","cva","jsx","jsxs","cva","Check","jsx","jsxs","useState","useEffect","useCallback","Check","jsx","jsxs","useState","useEffect","useCallback","Check","React","useState","jsx","jsxs","useState","useEffect","jsx","useEffect"]}