{"version":3,"file":"index-node22.cjs","sources":["../src/core/NativeThemeVariablesContext.ts","../src/core/ThemeContext.ts","../src/ui/containers/ScopedTheme.tsx","../src/core/AlouetteProvider.tsx","../src/core/AlouetteDecorator.tsx","../src/ui/primitives/View.tsx","../src/ui/containers/AccentScope.tsx","../src/ui/primitives/Text.tsx","../src/ui/primitives/ScrollView.tsx","../src/ui/primitives/FlatList.tsx","../src/ui/primitives/SectionList.tsx","../src/ui/stacks/stacks.tsx","../src/ui/stacks/Separator.tsx","../src/ui/containers/Box.tsx","../src/ui/containers/Surface.tsx","../src/ui/styled.tsx","../src/ui/story-components/StoryTitle.tsx","../src/ui/story-components/Story.tsx","../src/ui/story-components/StoryContainer.tsx","../src/ui/story-components/StoryDecorator.tsx","../src/ui/story-components/StoryGrid.tsx","../src/ui/containers/StableAccentScope.tsx","../src/ui/containers/PortalAccentScope.tsx","../src/ui/containers/Presence.tsx","../src/animationDurationsMs.ts","../src/core/useScrollEndState.ts","../src/core/useColorToken.ts","../src/expo/ExternalLink.tsx","../src/expo/ExternalLink.shared.ts","../src/ui/primitives/Icon.tsx","../src/ui/feedback/RingCircle.tsx","../src/ui/feedback/useSimulatedProgress.ts","../src/ui/feedback/CircularProgress.tsx","../src/ui/actions/PressableBox.tsx","../src/ui/actions/Button.tsx","../src/ui/actions/IconButton.tsx","../src/ui/containers/Modal.tsx","../src/ui/feedback/Message.tsx","../src/ui/actions/CollapsibleErrorMessage.tsx","../src/ui/actions/usePressAsync.ts","../src/ui/containers/AlertDialog.tsx","../src/ui/actions/ExternalLinkText.tsx","../src/ui/actions/ActionButton.tsx","../src/ui/inputs/InputText.tsx","../src/ui/inputs/TextArea.tsx","../src/ui/inputs/Switch.tsx","../src/core/useControllableValue.ts","../src/ui/inputs/Select.shared.tsx","../src/ui/inputs/Select.tsx","../src/ui/selection/SelectionContext.tsx","../src/ui/inputs/RadioContext.tsx","../src/ui/inputs/RadioGroup.tsx","../src/ui/containers/DefaultAccentScope.tsx","../src/ui/selection/RadioIndicator.tsx","../src/ui/inputs/Radio.tsx","../src/ui/selection/SegmentedBar.tsx","../src/ui/inputs/RadioButtonGroup.tsx","../src/ui/selection/SegmentedItem.tsx","../src/ui/inputs/RadioButton.tsx","../src/ui/inputs/RadioCardGroup.tsx","../src/ui/inputs/RadioCard.tsx","../src/ui/navigation/NavBarContext.tsx","../src/ui/navigation/NavBar.tsx","../src/ui/navigation/NavBarItem.tsx","../src/ui/navigation/TabsContext.tsx","../src/ui/navigation/Tabs.tsx","../src/ui/navigation/Tab.tsx","../src/ui/forms/FormItem.tsx","../src/ui/forms/Form.tsx","../src/ui/forms/FormField.tsx","../src/ui/forms/FormFieldArray.tsx","../src/ui/forms/FormSubmitButton.tsx","../src/ui/forms/SimpleVForm.tsx","../src/ui/data/EditableItem.tsx","../src/ui/forms/FormEditableItem.tsx","../src/ui/data/Badge.tsx","../src/ui/data/Bullet.tsx","../src/ui/feedback/ConnectionState.tsx","../src/ui/feedback/LinearProgress.tsx","../src/ui/actions/PressableListItem.tsx","../src/ui/layout/GradientBackground.tsx","../src/ui/layout/GradientScrollView.tsx","../src/config/Breakpoints.ts","../src/windowSize/useCurrentBreakpointName.ts","../src/windowSize/SwitchBreakpoints.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { AlouetteTheme } from \"./AlouetteConfig\";\n\n/**\n * Resolved CSS-variable map for every theme — the JS mirror of the palette CSS,\n * consumed by `ScopedTheme` (feeds NativeWind's `VariableContextProvider`). This is the shape of `generateTheme(...).themeVariables`.\n */\nexport type ThemeVariablesMap = Record<\n  AlouetteTheme,\n  Record<`--${string}`, string>\n>;\n\n/**\n * Holds the active {@link ThemeVariablesMap}. Defaults to the bundled default\n * palette (`themeVariables`) so `ScopedTheme` works with no provider. A\n * BYO-palette app overrides it via `<AlouetteProvider themeVariables={...}>`\n * with its own `generateTheme(...).themeVariables`, keeping JS token reads in\n * sync with its palette CSS.\n */\nexport const NativeThemeVariablesContext = createContext<ThemeVariablesMap>(\n  null as unknown as ThemeVariablesMap,\n);\n\nexport function useNativeThemeVariables(): ThemeVariablesMap {\n  return useContext(NativeThemeVariablesContext);\n}\n","import { createContext, useContext } from \"react\";\nimport type { AlouetteModeTheme, AlouetteTheme } from \"./AlouetteConfig\";\n\n/**\n * Tracks the currently applied theme name (e.g. \"dark_brand\") so native reads\n * and accent composition (`AccentScope`) know which theme\n * is active. Set by `ScopedTheme` alongside NativeWind's variable context.\n *\n * Defaults to \"light\", matching the light defaults in the global `@theme` block.\n */\nexport const ThemeContext = createContext<AlouetteTheme>(\"light\");\n\nexport function useCurrentTheme(): AlouetteTheme {\n  return useContext(ThemeContext);\n}\n\nexport function useCurrentMode(): AlouetteModeTheme {\n  return useContext(ThemeContext).startsWith(\"dark\") ? \"dark\" : \"light\";\n}\n","import { VariableContextProvider } from \"nativewind\";\nimport type { ReactNode } from \"react\";\nimport { useContext } from \"react\";\nimport type { AlouetteTheme } from \"../../core/AlouetteConfig\";\nimport { NativeThemeVariablesContext } from \"../../core/NativeThemeVariablesContext\";\nimport { ThemeContext } from \"../../core/ThemeContext\";\n\nexport interface ScopedThemeProps {\n  /** Full theme name, e.g. \"light\", \"dark\", \"light_brand\", \"dark_danger\". */\n  theme: AlouetteTheme;\n  children?: ReactNode;\n}\n\n/**\n * Applies a theme to its subtree by pushing the theme's resolved CSS variables\n * through NativeWind's `VariableContextProvider` (context only, layout-neutral).\n * The web build applies the theme as a className instead — see\n * `ScopedTheme.web.tsx`. It also records the active theme name in `ThemeContext`\n * so `AccentScope` can read it.\n */\nexport function ScopedTheme({ theme, children }: ScopedThemeProps): ReactNode {\n  const themeVariables = useContext(NativeThemeVariablesContext);\n  return (\n    <ThemeContext.Provider value={theme}>\n      <VariableContextProvider value={themeVariables[theme]}>\n        {children}\n      </VariableContextProvider>\n    </ThemeContext.Provider>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { useColorScheme } from \"react-native\";\nimport { ScopedTheme } from \"../ui/containers/ScopedTheme\";\nimport type { ThemeVariablesMap } from \"./NativeThemeVariablesContext\";\nimport { NativeThemeVariablesContext } from \"./NativeThemeVariablesContext\";\n\nexport interface AlouetteProviderProps {\n  children: ReactNode;\n  /**\n   * The resolved theme-variable map JS token reads use. Defaults to the bundled\n   * default palette. A BYO-palette app passes its own\n   * `generateTheme(...).themeVariables` (from `alouette/theme-generator`) here so\n   * JS reads match its palette CSS.\n   */\n  themeVariables: ThemeVariablesMap;\n}\n\nexport function AlouetteProvider({\n  children,\n  themeVariables,\n}: AlouetteProviderProps): ReactNode {\n  // Apply the OS light/dark scheme as the root theme so base tokens resolve\n  // correctly app-wide. Subtrees can override via ScopedTheme / AccentScope.\n  const colorScheme = useColorScheme();\n  return (\n    <NativeThemeVariablesContext.Provider value={themeVariables}>\n      <ScopedTheme theme={colorScheme === \"dark\" ? \"dark\" : \"light\"}>\n        {children}\n      </ScopedTheme>\n    </NativeThemeVariablesContext.Provider>\n  );\n}\n","/* eslint-disable react/destructuring-assignment */\nimport type { Decorator } from \"@storybook/react-vite\";\nimport { ScopedTheme } from \"../ui/containers/ScopedTheme\";\nimport { AlouetteProvider } from \"./AlouetteProvider\";\nimport { SafeAreaProvider } from \"./SafeAreaProvider\";\n\n// eslint-disable-next-line react/function-component-definition -- not a component\nexport const AlouetteDecorator: Decorator = (storyFn, context) => {\n  const theme: \"dark\" | \"light\" =\n    context.globals.mode === \"dark\" ? \"dark\" : \"light\";\n\n  // The `colorFormat` toolbar global (web storybook only) previews the wide-gamut\n  // palette. It defaults to sRGB so what is reviewed matches what native renders.\n  const themeVariables = context.parameters.alouette?.themeVariables;\n\n  if (!themeVariables) {\n    throw new Error(\n      'AlouetteDecorator: missing \"themeVariables\" in parameters.alouette',\n    );\n  }\n\n  return (\n    <SafeAreaProvider>\n      <AlouetteProvider themeVariables={themeVariables}>\n        <ScopedTheme theme={theme}>{storyFn(context)}</ScopedTheme>\n      </AlouetteProvider>\n    </SafeAreaProvider>\n  );\n};\n","import { forwardRef } from \"react\";\nimport { View as RNView, type ViewProps as RNViewProps } from \"react-native\";\n\nexport type ViewProps = RNViewProps;\n\nexport const View = forwardRef<RNView, ViewProps>((props, ref) => {\n  return <RNView ref={ref} {...props} />;\n});\n","import type { ReactNode } from \"react\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { useCurrentMode } from \"../../core/ThemeContext\";\nimport { ScopedTheme } from \"./ScopedTheme\";\n\nexport interface AccentScopeProps {\n  mode?: \"dark\" | \"light\";\n  accent?: Accent;\n  children?: ReactNode;\n}\n\nexport function AccentScope({\n  mode: forcedMode,\n  accent,\n  children,\n}: AccentScopeProps): ReactNode {\n  const currentMode = useCurrentMode();\n  if (!accent) {\n    return children;\n  }\n  // ScopedTheme applies the accent theme's *resolved* variables (base mode + accent),\n  // so a single scope works at any depth — no need to pre-apply the base mode.\n  const mode = forcedMode ?? currentMode;\n  return <ScopedTheme theme={`${mode}_${accent}`}>{children}</ScopedTheme>;\n}\n","import { forwardRef } from \"react\";\nimport { Text as RNText, type TextProps as RNTextProps } from \"react-native\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\n\nconst twMerge = extendTailwindMerge({\n  extend: {\n    classGroups: {\n      \"font-family\": [\n        \"font-body\",\n        \"font-body-bold\",\n        \"font-body-extrabold\",\n        \"font-heading\",\n        \"font-heading-bold\",\n        \"font-heading-extrabold\",\n        \"font-mono\",\n        \"font-mono-bold\",\n        \"font-mono-extrabold\",\n      ],\n    },\n  },\n});\n\nexport interface TextProps extends RNTextProps {\n  accent?: Accent;\n}\n\nexport const Text = forwardRef<RNText, TextProps>(\n  ({ className, accent, ...props }, ref) => {\n    return (\n      <AccentScope accent={accent}>\n        <RNText\n          ref={ref}\n          className={twMerge(\"font-body text-sharp\", className)}\n          {...props}\n        />\n      </AccentScope>\n    );\n  },\n);\n\nexport type ParagraphProps = TextProps;\n\nexport const Paragraph = forwardRef<RNText, ParagraphProps>(\n  ({ className, ...props }, ref) => {\n    return (\n      <Text\n        ref={ref}\n        role=\"paragraph\"\n        className={`select-auto ${className ?? \"\"}`}\n        {...props}\n      />\n    );\n  },\n);\n","import { styled } from \"nativewind\";\nimport type { ComponentType } from \"react\";\nimport {\n  ScrollView as RNScrollView,\n  type ScrollViewProps as RNScrollViewProps,\n  type StyleProp,\n  type ViewStyle,\n} from \"react-native\";\n\nexport type ScrollViewProps = RNScrollViewProps;\n\ninterface StyledScrollViewProps {\n  style?: StyleProp<ViewStyle>;\n  contentContainerStyle?: StyleProp<ViewStyle>;\n}\n\nexport const ScrollView = styled(\n  RNScrollView as unknown as ComponentType<StyledScrollViewProps>,\n  {\n    className: \"style\",\n    contentContainerClassName: \"contentContainerStyle\",\n  },\n) as ComponentType<ScrollViewProps>;\n","import { styled } from \"nativewind\";\nimport type { ComponentType, ReactNode } from \"react\";\nimport {\n  FlatList as RNFlatList,\n  type FlatListProps as RNFlatListProps,\n  type StyleProp,\n  type ViewStyle,\n} from \"react-native\";\n\nexport type FlatListProps<ItemT> = RNFlatListProps<ItemT>;\n\ninterface StyledFlatListProps {\n  style?: StyleProp<ViewStyle>;\n  contentContainerStyle?: StyleProp<ViewStyle>;\n  columnWrapperStyle?: StyleProp<ViewStyle>;\n}\n\nexport const FlatList = styled(\n  RNFlatList as unknown as ComponentType<StyledFlatListProps>,\n  {\n    className: \"style\",\n    contentContainerClassName: \"contentContainerStyle\",\n    columnWrapperClassName: \"columnWrapperStyle\",\n  },\n) as <ItemT>(props: FlatListProps<ItemT>) => ReactNode;\n","import { styled } from \"nativewind\";\nimport type { ComponentType, ReactNode } from \"react\";\nimport {\n  SectionList as RNSectionList,\n  type SectionListProps as RNSectionListProps,\n  type StyleProp,\n  type ViewStyle,\n} from \"react-native\";\n\ntype DefaultSectionT = Record<string, unknown>;\n\nexport type SectionListProps<\n  ItemT,\n  SectionT = DefaultSectionT,\n> = RNSectionListProps<ItemT, SectionT>;\n\ninterface StyledSectionListProps {\n  style?: StyleProp<ViewStyle>;\n  contentContainerStyle?: StyleProp<ViewStyle>;\n}\n\nexport const SectionList = styled(\n  RNSectionList as unknown as ComponentType<StyledSectionListProps>,\n  {\n    className: \"style\",\n    contentContainerClassName: \"contentContainerStyle\",\n  },\n) as <ItemT, SectionT = DefaultSectionT>(\n  props: SectionListProps<ItemT, SectionT>,\n) => ReactNode;\n","import { forwardRef } from \"react\";\nimport { View as RNView, type ViewProps as RNViewProps } from \"react-native\";\n\nexport type StackProps = RNViewProps;\n\nexport const Stack = forwardRef<RNView, StackProps>(\n  ({ className, ...props }, ref) => {\n    return (\n      <RNView\n        ref={ref}\n        className={`flex-row flex-wrap ${className ?? \"\"}`}\n        {...props}\n      />\n    );\n  },\n);\n\nexport type HStackProps = RNViewProps;\n\nexport const HStack = forwardRef<RNView, HStackProps>(\n  ({ className, ...props }, ref) => {\n    return (\n      <RNView ref={ref} className={`flex-row ${className ?? \"\"}`} {...props} />\n    );\n  },\n);\n\nexport type VStackProps = RNViewProps;\n\nexport const VStack = forwardRef<RNView, VStackProps>(\n  ({ className, ...props }, ref) => {\n    return (\n      <RNView ref={ref} className={`flex-col ${className ?? \"\"}`} {...props} />\n    );\n  },\n);\n","import { forwardRef } from \"react\";\nimport { View as RNView, type ViewProps as RNViewProps } from \"react-native\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\n\nconst separatorVariants = tv({\n  base: \"border-border-sharp\",\n  variants: {\n    vertical: {\n      true: \"self-stretch border-r w-px\",\n      false: \"self-stretch border-b h-px\",\n    },\n  },\n  defaultVariants: {\n    vertical: false,\n  },\n});\n\ntype SeparatorVariantProps = VariantProps<typeof separatorVariants>;\n\nexport interface SeparatorProps extends RNViewProps, SeparatorVariantProps {}\n\nexport const Separator = forwardRef<RNView, SeparatorProps>(\n  ({ className, vertical, ...props }, ref) => {\n    return (\n      <RNView\n        ref={ref}\n        className={separatorVariants({ vertical, className })}\n        {...props}\n      />\n    );\n  },\n);\n","import type { ReactElement } from \"react\";\nimport { Children, cloneElement, forwardRef } from \"react\";\nimport {\n  Pressable,\n  type PressableProps,\n  View as RNView,\n  type ViewProps as RNViewProps,\n} from \"react-native\";\nimport type { VariantProps } from \"tailwind-variants\";\nimport { tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { useSafeAreaInsets } from \"../../core/useSafeAreaInsets\";\nimport { AccentScope } from \"./AccentScope\";\n// Allow Box to shrink when used inside HStack/VStack (matches the original\n// BoxFrame default). overflow is intentionally left off so multi-layer\n// box-shadows are not clipped.\nexport const boxBaseClasses = \"shrink\";\n\nexport interface BoxProps extends RNViewProps {\n  accent?: Accent;\n}\n\nexport const Box = forwardRef<RNView, BoxProps>(\n  ({ className, accent, ...props }, ref) => {\n    return (\n      <AccentScope accent={accent}>\n        <RNView\n          ref={ref}\n          className={`${boxBaseClasses} ${className ?? \"\"}`}\n          {...props}\n        />\n      </AccentScope>\n    );\n  },\n);\n\nexport const interactiveBoxVariants = tv({\n  base: [\n    boxBaseClasses,\n    \"cursor-pointer\",\n    \"transition-[transform,background-color,border-color] duration-fast ease-in\",\n    \"disabled:cursor-not-allowed disabled:opacity-70 aria-disabled:cursor-not-allowed aria-disabled:opacity-70\",\n    \"active:scale-[0.975]\",\n  ].join(\" \"),\n  variants: {\n    withFocusVisibleOutline: {\n      true: \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n    },\n  },\n});\n\nexport interface InteractiveBoxProps\n  extends VariantProps<typeof interactiveBoxVariants>, PressableProps {}\n\nexport const InteractiveBox = forwardRef<RNView, InteractiveBoxProps>(\n  ({ withFocusVisibleOutline, className, ...rest }, ref) => (\n    <Pressable\n      ref={ref}\n      // override default behavior of Pressable which sets pointerEvents to \"none\" on disabled state. However this prevents cursor to display as\n      pointerEvents=\"auto\"\n      {...rest}\n      className={interactiveBoxVariants({ withFocusVisibleOutline, className })}\n    />\n  ),\n);\n\nexport const InteractiveBoxHitSlop = forwardRef<RNView, InteractiveBoxProps>(\n  ({ withFocusVisibleOutline, children, className, ...rest }, ref) => {\n    const child = Children.only(children) as ReactElement<RNViewProps>;\n    return (\n      <Pressable\n        ref={ref}\n        // override default behavior of Pressable which sets pointerEvents to \"none\" on disabled state. However this prevents cursor to display as\n        pointerEvents=\"auto\"\n        className={`flex-center ${className ?? \"\"}`}\n        {...rest}\n      >\n        {cloneElement(child, {\n          className: interactiveBoxVariants({\n            withFocusVisibleOutline,\n            className: child.props.className,\n          }),\n        })}\n      </Pressable>\n    );\n  },\n);\n\nexport type SafeAreaBoxProps = Omit<BoxProps, \"style\">;\n\nexport const SafeAreaBox = forwardRef<RNView, SafeAreaBoxProps>(\n  (props, ref) => {\n    const insets = useSafeAreaInsets();\n    return (\n      <Box\n        ref={ref}\n        style={{\n          paddingTop: insets.top,\n          paddingBottom: insets.bottom,\n          paddingLeft: insets.left,\n          paddingRight: insets.right,\n        }}\n        {...props}\n      />\n    );\n  },\n);\n","import { forwardRef } from \"react\";\nimport type { View as RNView } from \"react-native\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"./AccentScope\";\nimport { Box, type BoxProps } from \"./Box\";\n\nconst surfaceVariants = tv({\n  // overflow-hidden so the multi-layer shadow respects the rounded corners.\n  base: \"overflow-hidden transition-background duration-fast\",\n  variants: {\n    size: {\n      xxs: \"p-xs rounded-xs\",\n      xs: \"p-sm rounded-xs\",\n      sm: \"p-m rounded-sm\",\n      md: \"p-xl rounded-sm\",\n      lg: \"p-xxl rounded-md\",\n    },\n    variant: {\n      surface: \"bg-surface\",\n      highlight: \"bg-highlight\",\n      \"highlight-accent\": \"bg-highlight-accent\",\n      lowered: \"bg-lowered\",\n      translucent: \"bg-translucent\",\n    },\n    shadow: {\n      none: \"shadow-none\",\n      s: \"shadow-s\",\n      m: \"shadow-m\",\n      l: \"shadow-l\",\n      lowered: \"shadow-lowered\",\n    },\n  },\n  defaultVariants: {\n    size: \"md\",\n    variant: \"surface\",\n  },\n});\n\ntype SurfaceVariantProps = VariantProps<typeof surfaceVariants>;\n\nexport interface SurfaceProps extends BoxProps, SurfaceVariantProps {\n  accent?: Accent;\n}\n\nexport const Surface = forwardRef<RNView, SurfaceProps>(\n  ({ className, size, variant, shadow, accent, ...props }, ref) => {\n    // shadow defaults to \"s\", or \"lowered\" when variant=\"lowered\".\n    const resolvedShadow = shadow ?? (variant === \"lowered\" ? \"lowered\" : \"s\");\n    return (\n      <AccentScope accent={accent}>\n        <Box\n          ref={ref}\n          className={surfaceVariants({\n            size,\n            variant,\n            shadow: resolvedShadow,\n            className,\n          })}\n          {...props}\n        />\n      </AccentScope>\n    );\n  },\n);\n","import type { ComponentType } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function styled<P extends { className?: string }>(\n  Component: ComponentType<P>,\n  defaultClassName: string,\n): ComponentType<P> {\n  function StyledComponent({ className, ...props }: P) {\n    return (\n      <Component\n        className={twMerge(defaultClassName, className)}\n        {...(props as P)}\n      />\n    );\n  }\n  StyledComponent.displayName = `Styled(${Component.displayName ?? Component.name ?? \"Component\"})`;\n  StyledComponent.__isStyledComponent = true;\n  return StyledComponent;\n}\n","import { forwardRef } from \"react\";\nimport type { Text as RNText } from \"react-native\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport { Text, type TextProps } from \"../primitives/Text\";\n\nconst storyTitleVariants = tv({\n  base: \"font-heading-extrabold text-sharp\",\n  variants: {\n    level: {\n      1: \"text-4xl mb-xl\",\n      2: \"text-3xl mb-xl\",\n      3: \"text-2xl mb-m\",\n      4: \"text-xl mb-m\",\n    },\n  },\n  defaultVariants: {\n    level: 1,\n  },\n});\n\ntype StoryTitleVariantProps = VariantProps<typeof storyTitleVariants>;\n\nexport interface StoryTitleProps extends TextProps, StoryTitleVariantProps {}\n\nexport const StoryTitle = forwardRef<RNText, StoryTitleProps>(\n  ({ className, level, ...props }, ref) => {\n    return (\n      <Text\n        ref={ref}\n        className={storyTitleVariants({ level, className })}\n        {...props}\n      />\n    );\n  },\n);\n","import { Fragment, type ReactNode } from \"react\";\nimport { Platform } from \"react-native\";\nimport type { Accent, AlouetteModeTheme } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { ScopedTheme } from \"../containers/ScopedTheme\";\nimport { Surface } from \"../containers/Surface\";\nimport { ScrollView } from \"../primitives/ScrollView\";\nimport { View } from \"../primitives/View\";\nimport { VStack } from \"../stacks/stacks\";\nimport { styled } from \"../styled\";\nimport { StoryTitle } from \"./StoryTitle\";\n\nexport interface StorySectionProps {\n  title: ReactNode;\n  children: ReactNode;\n  level?: 1 | 2;\n  modeTheme?: AlouetteModeTheme;\n  accent?: Accent;\n  withSurface?: boolean;\n}\n\nconst InternalStorySection = styled(View, \"-mx-l px-l\");\n\nfunction StorySection({\n  title,\n  children,\n  level = 1,\n  modeTheme,\n  accent,\n  withSurface = false,\n}: StorySectionProps): ReactNode {\n  const content = (\n    <InternalStorySection className=\"pb-xl bg-screen\">\n      {withSurface ? (\n        <Surface>\n          <StoryTitle level={(level + 1) as 2 | 3}>{title}</StoryTitle>\n          <VStack className=\"gap-m\">{children}</VStack>\n        </Surface>\n      ) : (\n        <>\n          <StoryTitle level={(level + 1) as 2 | 3}>{title}</StoryTitle>\n          <VStack className=\"gap-m\">{children}</VStack>\n        </>\n      )}\n    </InternalStorySection>\n  );\n\n  if (modeTheme) {\n    return <ScopedTheme theme={modeTheme}>{content}</ScopedTheme>;\n  }\n  if (accent) {\n    return <AccentScope accent={accent}>{content}</AccentScope>;\n  }\n  return content;\n}\n\nfunction StorySubSection({\n  title,\n  children,\n  modeTheme,\n  accent,\n  withSurface = false,\n}: StorySectionProps): ReactNode {\n  const content = (\n    <InternalStorySection className=\"mb-m\">\n      {withSurface ? (\n        <Surface>\n          <StoryTitle level={3}>{title}</StoryTitle>\n          <VStack className=\"gap-m\">{children}</VStack>\n        </Surface>\n      ) : (\n        <>\n          <StoryTitle level={3}>{title}</StoryTitle>\n          <VStack className=\"gap-m\">{children}</VStack>\n        </>\n      )}\n    </InternalStorySection>\n  );\n  if (modeTheme) {\n    return <ScopedTheme theme={modeTheme}>{content}</ScopedTheme>;\n  }\n  if (accent) {\n    return <AccentScope accent={accent}>{content}</AccentScope>;\n  }\n  return content;\n}\n\n// const SimpleWebScrollView = styled(View, \"h-full overflow-auto\");\n\nconst ScrollWrapper = Platform.OS === \"web\" ? Fragment : ScrollView;\n\nexport interface StoryProps {\n  documentation?: NonNullable<ReactNode>;\n  children?: NonNullable<ReactNode>;\n  noDarkMode?: boolean;\n}\n\nexport function Story({\n  documentation,\n  children,\n  noDarkMode,\n}: StoryProps): ReactNode {\n  return (\n    <ScrollWrapper>\n      {documentation && (\n        <Surface accent=\"info\" className=\"mb-xxl\">\n          {documentation}\n        </Surface>\n      )}\n      {([\"light\", ...(noDarkMode ? [] : [\"dark\"])] as (\"dark\" | \"light\")[]).map(\n        (mode) => (\n          <ScopedTheme key={mode} theme={mode}>\n            <View className=\"bg-screen p-l\">{children}</View>\n          </ScopedTheme>\n        ),\n      )}\n    </ScrollWrapper>\n  );\n}\n\nStory.Section = StorySection;\nStory.SubSection = StorySubSection;\n\nexport const accents: Accent[] = [\n  \"brand\",\n  \"danger\",\n  \"info\",\n  \"success\",\n  \"warning\",\n];\n","import type { ReactNode } from \"react\";\nimport { ScopedTheme } from \"../containers/ScopedTheme\";\nimport { ScrollView } from \"../primitives/ScrollView\";\nimport { StoryTitle } from \"./StoryTitle\";\n\nexport interface StoryContainerProps {\n  title: ReactNode;\n  children: NonNullable<ReactNode>;\n}\n\nexport function StoryContainer({\n  title,\n  children,\n}: StoryContainerProps): ReactNode {\n  return (\n    <ScopedTheme theme=\"light\">\n      <ScrollView className=\"bg-white p-3xl\">\n        <StoryTitle level={1}>{title}</StoryTitle>\n        {children}\n      </ScrollView>\n    </ScopedTheme>\n  );\n}\n","import type { Decorator } from \"@storybook/react-vite\";\nimport { StoryContainer } from \"./StoryContainer\";\n\n// eslint-disable-next-line react/function-component-definition -- not a component, it's a decorator for storybook.\nexport const StoryDecorator: Decorator = (storyFn, { name, parameters }) => {\n  if (parameters?.container === false) return storyFn();\n  return <StoryContainer title={name}>{storyFn()}</StoryContainer>;\n};\n","import { Children, type ReactNode } from \"react\";\nimport { Platform } from \"react-native\";\nimport { tv } from \"tailwind-variants\";\nimport { View } from \"../primitives/View\";\nimport { VStack } from \"../stacks/stacks\";\nimport { StoryTitle } from \"./StoryTitle\";\n\nconst rowVariants = tv(\n  {\n    base: \"flex-col\",\n    variants: {\n      breakpoint: {\n        small: \"sm:flex-row sm:mb-xl\",\n        medium: \"md:flex-row md:mb-xl\",\n      },\n      flexWrap: { true: \"\" },\n    },\n    compoundVariants: [\n      { breakpoint: \"small\", flexWrap: true, class: \"sm:flex-wrap sm:gap-m\" },\n      { breakpoint: \"medium\", flexWrap: true, class: \"md:flex-wrap md:gap-m\" },\n    ],\n  },\n  { twMerge: false },\n);\n\nconst itemVariants = tv(\n  {\n    base: \"pt-m pb-xl\",\n    variants: {\n      breakpoint: {\n        small: \"sm:pt-0 sm:pb-0 sm:my-xxs shrink\",\n        medium: \"md:pt-0 md:pb-0 md:my-xxs shrink\",\n      },\n      flexWrap: {\n        true: \"\",\n        false: \"\",\n      },\n      loose: {\n        true: \"\",\n        false: \"grow\",\n      },\n    },\n    compoundVariants: [\n      { breakpoint: \"small\", flexWrap: false, class: \"sm:basis-0\" },\n      { breakpoint: \"medium\", flexWrap: false, class: \"md:basis-0\" },\n    ],\n    defaultVariants: {\n      flexWrap: false,\n    },\n  },\n  { twMerge: false },\n);\n\nexport interface StoryGridRowProps {\n  children: NonNullable<ReactNode>;\n  breakpoint?: \"medium\" | \"small\";\n  flexWrap?: boolean;\n  loose?: boolean;\n}\n\nfunction StoryGridRow({\n  children,\n  breakpoint = \"small\",\n  flexWrap,\n  loose,\n}: StoryGridRowProps): ReactNode {\n  return (\n    <View className={rowVariants({ breakpoint, flexWrap })}>\n      {Children.map(children, (child) => (\n        <View className={itemVariants({ breakpoint, flexWrap, loose })}>\n          {child}\n        </View>\n      ))}\n    </View>\n  );\n}\n\nexport interface StoryGridColProps {\n  children: NonNullable<ReactNode>;\n  title?: string;\n  platform?: \"all\" | \"native\" | \"web\";\n}\n\nfunction StoryGridCol({\n  title,\n  children,\n  platform = \"all\",\n}: StoryGridColProps): ReactNode {\n  const isNative = Platform.OS === \"ios\" || Platform.OS === \"android\";\n\n  if (Platform.OS === \"web\" && platform === \"native\") {\n    return null;\n  }\n  if (isNative && platform === \"web\") {\n    return null;\n  }\n\n  return title ? (\n    <VStack>\n      <StoryTitle level={4} numberOfLines={1}>\n        {title}\n      </StoryTitle>\n      {children}\n    </VStack>\n  ) : (\n    children\n  );\n}\n\nexport const StoryGrid = {\n  Row: StoryGridRow,\n  Col: StoryGridCol,\n};\n","import type { ReactNode } from \"react\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { useCurrentMode, useCurrentTheme } from \"../../core/ThemeContext\";\nimport { ScopedTheme } from \"./ScopedTheme\";\n\nexport interface StableAccentScopeProps {\n  mode?: \"dark\" | \"light\";\n  accent?: Accent;\n  children?: ReactNode;\n}\n\n/**\n * Like AccentScope, but always keeps a ScopedTheme mounted — when `accent` is\n * unset it re-applies the inherited theme instead of dropping the wrapper.\n * Toggling `accent` (e.g. on hover) therefore only changes the theme prop, so\n * the subtree — and any focused input inside it — is never remounted. Prefer\n * AccentScope when the accent is fixed; reach for this only when it toggles.\n */\nexport function StableAccentScope({\n  mode: forcedMode,\n  accent,\n  children,\n}: StableAccentScopeProps): ReactNode {\n  const currentTheme = useCurrentTheme();\n  const currentMode = useCurrentMode();\n  return (\n    <ScopedTheme\n      theme={accent ? `${forcedMode ?? currentMode}_${accent}` : currentTheme}\n    >\n      {children}\n    </ScopedTheme>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { StableAccentScope } from \"./StableAccentScope\";\n\nexport interface PortalAccentScopeProps {\n  accent?: Accent;\n  children?: ReactNode;\n}\n\n/**\n * Theme scope for content rendered through a portal (Modal). Native has no\n * portal — `ScopedTheme` pushes the theme's fully merged variables through\n * context, which crosses the React tree wherever the host renders it — so a\n * single `StableAccentScope` is enough. The web build re-applies the base mode\n * first, see `PortalAccentScope.web.tsx`.\n */\nexport function PortalAccentScope({\n  accent,\n  children,\n}: PortalAccentScopeProps): ReactNode {\n  return <StableAccentScope accent={accent}>{children}</StableAccentScope>;\n}\n","import {\n  Children,\n  type Key,\n  type ReactElement,\n  type ReactNode,\n  cloneElement,\n  isValidElement,\n  useEffect,\n  useRef,\n  useState,\n} from \"react\";\nimport { View } from \"../primitives/View\";\n\nexport interface PresenceBaseProps {\n  /**\n   * Identity of the current child. When it changes, the previous child is kept\n   * mounted (with `exitClassName`) for `exitDurationMs` so it can animate out\n   * while the new child animates in — an AnimatePresence-style swap done with\n   * pure CSS animations, no animation library.\n   */\n  activeKey: Key;\n  /** How long to keep the exiting child mounted — match the exit animation. */\n  exitDurationMs: number;\n  /** Animation class applied to the entering (current) child. */\n  enterClassName?: string;\n  /** Animation class applied to the exiting (previous) child. */\n  exitClassName?: string;\n  /** Class applied to every item (e.g. `absolute inset-0` to overlap). */\n  className?: string;\n}\n\ninterface Snapshot {\n  key: Key;\n  node: ReactNode;\n}\n\nfunction joinClasses(...classes: (string | undefined)[]): string {\n  return classes.filter(Boolean).join(\" \");\n}\n\n/**\n * Shared keyed-swap logic. Keeps the previously rendered child as a snapshot\n * after `activeKey` changes so an exit animation can play, then removes it once\n * `exitDurationMs` has elapsed. The entering child is keyed by `activeKey`, so\n * it remounts on each change and replays its enter animation.\n *\n * Assumes one child whose content is derived from `activeKey` (the common\n * keyed-swap case). Updates to the active child between key changes are shown\n * live but not snapshotted for the next exit.\n */\nfunction usePresence(\n  activeKey: Key,\n  exitDurationMs: number,\n  children: ReactNode,\n): Snapshot[] {\n  const [exiting, setExiting] = useState<Snapshot[]>([]);\n  const previousRef = useRef<Snapshot>({ key: activeKey, node: children });\n  const childrenRef = useRef<ReactNode>(children);\n  childrenRef.current = children;\n  const timersRef = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n  useEffect(\n    () => () => {\n      timersRef.current.forEach(clearTimeout);\n    },\n    [],\n  );\n\n  useEffect(() => {\n    const previous = previousRef.current;\n    if (previous.key === activeKey) {\n      return;\n    }\n    previousRef.current = { key: activeKey, node: childrenRef.current };\n    setExiting((list) => [...list, previous]);\n    const timer = setTimeout(() => {\n      setExiting((list) => list.filter((item) => item !== previous));\n      timersRef.current = timersRef.current.filter((t) => t !== timer);\n    }, exitDurationMs);\n    timersRef.current.push(timer);\n  }, [activeKey, exitDurationMs]);\n\n  return exiting;\n}\n\ninterface PresenceItem {\n  key: Key;\n  node: ReactNode;\n}\n\nfunction toItems(children: ReactNode): PresenceItem[] {\n  return Children.toArray(children)\n    .filter(isValidElement)\n    .map((child) => ({ key: child.key as Key, node: child }));\n}\n\n/**\n * Order-preserving merge of the previously rendered key order with the current\n * live keys (the react-transition-group algorithm). Removed keys stay in their\n * old positions, so an exiting item animates out in place instead of jumping to\n * the end of the list.\n */\nfunction mergeKeys(previous: Key[], next: Key[]): Key[] {\n  const nextSet = new Set(next);\n  const pendingByNext = new Map<Key, Key[]>();\n  let pending: Key[] = [];\n\n  for (const key of previous) {\n    if (nextSet.has(key)) {\n      if (pending.length > 0) {\n        pendingByNext.set(key, pending);\n        pending = [];\n      }\n    } else {\n      pending.push(key);\n    }\n  }\n\n  const result: Key[] = [];\n  for (const key of next) {\n    const before = pendingByNext.get(key);\n    if (before) {\n      result.push(...before);\n    }\n    result.push(key);\n  }\n  result.push(...pending);\n  return result;\n}\n\ninterface RenderedItem extends PresenceItem {\n  exiting: boolean;\n}\n\n/**\n * Diffs a list of keyed children across renders. New keys are returned with\n * `exiting: false` (mounted fresh, so their enter animation plays); removed keys\n * are kept with `exiting: true` for `exitDurationMs` so they can animate out,\n * then dropped. Order is preserved via {@link mergeKeys}.\n */\nfunction usePresenceList(\n  children: ReactNode,\n  exitDurationMs: number,\n): RenderedItem[] {\n  const items = toItems(children);\n  const liveKeys = items.map((item) => item.key);\n  const signature = liveKeys.join(\"\u0000\");\n\n  const nodesRef = useRef<Map<Key, ReactNode>>(new Map());\n  for (const item of items) {\n    nodesRef.current.set(item.key, item.node);\n  }\n  const liveKeysRef = useRef(liveKeys);\n  liveKeysRef.current = liveKeys;\n\n  const [order, setOrder] = useState<Key[]>(liveKeys);\n  const orderRef = useRef(order);\n  orderRef.current = order;\n  const timersRef = useRef<Map<Key, ReturnType<typeof setTimeout>>>(new Map());\n\n  useEffect(\n    () => () => {\n      timersRef.current.forEach(clearTimeout);\n    },\n    [],\n  );\n\n  useEffect(() => {\n    const live = new Set(liveKeysRef.current);\n    const newOrder = mergeKeys(orderRef.current, liveKeysRef.current);\n\n    // A key that came back before its timer fired cancels its pending exit.\n    for (const key of liveKeysRef.current) {\n      const timer = timersRef.current.get(key);\n      if (timer) {\n        clearTimeout(timer);\n        timersRef.current.delete(key);\n      }\n    }\n    // A key that's gone animates out, then is dropped once the timer fires.\n    for (const key of newOrder) {\n      if (!live.has(key) && !timersRef.current.has(key)) {\n        const timer = setTimeout(() => {\n          timersRef.current.delete(key);\n          nodesRef.current.delete(key);\n          setOrder((current) => current.filter((k) => k !== key));\n        }, exitDurationMs);\n        timersRef.current.set(key, timer);\n      }\n    }\n    setOrder(newOrder);\n  }, [signature, exitDurationMs]);\n\n  const live = new Set(liveKeys);\n  return order.map((key) => ({\n    key,\n    node: nodesRef.current.get(key),\n    exiting: !live.has(key),\n  }));\n}\n\nexport interface PresenceListProps {\n  /** How long to keep a removed child mounted — match the exit animation. */\n  exitDurationMs: number;\n  /** Animation class applied to entering children. */\n  enterClassName?: string;\n  /** Animation class applied to exiting children. */\n  exitClassName?: string;\n  /** Class applied to every item's wrapper `<View>`. */\n  className?: string;\n  /**\n   * A list of keyed elements — each child must have a stable `key`. Adding a key\n   * animates that item in while the others stay put; removing a key animates only\n   * that item out.\n   */\n  children: ReactNode;\n}\n\n/**\n * Keyed-list presence (AnimatePresence-style). Renders a list of keyed children,\n * each wrapped in its own `<View>`, and animates individual add/remove: added\n * keys mount with `enterClassName`, removed keys stay mounted with `exitClassName`\n * for `exitDurationMs` before unmounting. For swapping a single child, use\n * {@link PresenceOne}.\n */\nexport function PresenceList({\n  exitDurationMs,\n  enterClassName,\n  exitClassName,\n  className,\n  children,\n}: PresenceListProps): ReactNode {\n  const items = usePresenceList(children, exitDurationMs);\n\n  return (\n    <>\n      {items.map((item) => (\n        <View\n          key={item.key}\n          className={joinClasses(\n            className,\n            item.exiting ? exitClassName : enterClassName,\n          )}\n        >\n          {item.node}\n        </View>\n      ))}\n    </>\n  );\n}\n\ntype StyledElement = ReactElement<{ className?: string }>;\n\nexport interface PresenceOneProps extends PresenceBaseProps {\n  /**\n   * A single element that accepts and forwards `className` to its root view.\n   * The `className` + enter/exit animation classes are merged onto it directly,\n   * so no extra wrapper `<View>` is added to the tree.\n   */\n  children: StyledElement;\n}\n\n/**\n * Keyed-swap presence that merges the animation classes onto the child element\n * itself via `cloneElement` — no wrapper `<View>`. Requires a single element\n * that forwards `className`; for anything else use {@link PresenceList}.\n */\nexport function PresenceOne({\n  activeKey,\n  exitDurationMs,\n  enterClassName,\n  exitClassName,\n  className,\n  children,\n}: PresenceOneProps): ReactNode {\n  const exiting = usePresence(activeKey, exitDurationMs, children);\n\n  return (\n    <>\n      {exiting.map((item) => {\n        const node = item.node as StyledElement;\n        return cloneElement(node, {\n          key: item.key,\n          className: joinClasses(\n            node.props.className,\n            className,\n            exitClassName,\n          ),\n        });\n      })}\n      {cloneElement(children, {\n        key: activeKey,\n        className: joinClasses(\n          children.props.className,\n          className,\n          enterClassName,\n        ),\n      })}\n    </>\n  );\n}\n","/* Generated by scripts/build-css.ts. DO NOT EDIT. */\n\n/**\n * Duration (in ms) of each generic motion, mirroring the `--animate-*` CSS\n * tokens. Pass the matching value as `exitDurationMs` to {@link PresenceOne} /\n * {@link PresenceList} so the exit timer matches the CSS animation.\n */\nexport const animationDurationsMs = {\n  \"slide\": 600,\n  \"collapse\": 800,\n  \"progress\": 600,\n  \"fade\": 300,\n  \"fast\": 200\n} as const;\n","import { useRef, useState } from \"react\";\nimport type { ScrollViewProps } from \"react-native\";\n\nexport interface ScrollEndState {\n  isScrolledToEnd: boolean;\n  scrollViewProps: Required<\n    Pick<\n      ScrollViewProps,\n      \"onContentSizeChange\" | \"onLayout\" | \"onScroll\" | \"scrollEventThrottle\"\n    >\n  >;\n}\n\n// Sub-pixel layout rounding makes an exact equality unreliable.\nconst scrollEndToleranceInPx = 1;\n\n// Tracks whether a ScrollView is scrolled to its end — true as well when the\n// content fits, since there is then nothing hidden below the fold. Spread the\n// returned props on the ScrollView: onScroll alone never fires for content that\n// doesn't overflow, so layout and content size feed the initial state.\nexport function useScrollEndState(): ScrollEndState {\n  const [isScrolledToEnd, setIsScrolledToEnd] = useState(true);\n  const viewportHeightRef = useRef(0);\n  const contentHeightRef = useRef(0);\n  const scrollOffsetRef = useRef(0);\n\n  const updateIsScrolledToEnd = (): void => {\n    setIsScrolledToEnd(\n      contentHeightRef.current - scrollOffsetRef.current <=\n        viewportHeightRef.current + scrollEndToleranceInPx,\n    );\n  };\n\n  return {\n    isScrolledToEnd,\n    scrollViewProps: {\n      scrollEventThrottle: 16,\n      onLayout: (event) => {\n        viewportHeightRef.current = event.nativeEvent.layout.height;\n        updateIsScrolledToEnd();\n      },\n      onContentSizeChange: (_width, height) => {\n        contentHeightRef.current = height;\n        updateIsScrolledToEnd();\n      },\n      onScroll: (event) => {\n        const { contentOffset, contentSize, layoutMeasurement } =\n          event.nativeEvent;\n        scrollOffsetRef.current = contentOffset.y;\n        contentHeightRef.current = contentSize.height;\n        viewportHeightRef.current = layoutMeasurement.height;\n        updateIsScrolledToEnd();\n      },\n    },\n  };\n}\n","import { useUnstableNativeVariable as useNativeVariable } from \"nativewind\";\n\nexport const useColorVariable = useNativeVariable as (\n  variableName: string,\n) => string | undefined;\n\nexport type ColorClassName =\n  | string // keeping string to allow tailwind-variants usage\n  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n  | \"text-accent\"\n  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n  | \"text-disabled-muted\"\n  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n  | \"text-disabled\"\n  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n  | \"text-muted\"\n  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n  | \"text-on-accent-muted\"\n  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n  | \"text-on-accent\"\n  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n  | \"text-sharp\";\n/**\n * Resolves a `text-*` Tailwind className (e.g. `\"text-accent\"`) to its\n * concrete `--color-*` token value for the active theme. For native SVG\n * props (`color`, `stroke`, `fill`) that can't take a className directly and\n * so can't rely on CSS `currentColor` the way web SVG can.\n */\nexport function useColorToken(className: ColorClassName): string | undefined {\n  const token = className\n    .split(/\\s+/)\n    .find((part) => part.startsWith(\"text-\"))\n    ?.slice(\"text-\".length);\n  return useColorVariable(`--color-${token ?? \"sharp\"}`);\n}\n","import * as WebBrowser from \"expo-web-browser\";\nimport { WebBrowserPresentationStyle } from \"expo-web-browser\";\nimport type { ComponentProps, FunctionComponent, ReactNode } from \"react\";\nimport { Linking } from \"react-native\";\nimport type { GestureResponderEvent } from \"react-native\";\nimport { useColorVariable } from \"../core/useColorToken\";\nimport type { ExternalOpenLinkBehavior } from \"./ExternalLink.shared\";\n\nexport interface ExternalLinkRequiredComponentProps {\n  onPress?: (event: GestureResponderEvent) => Promise<void> | void;\n}\n\nconst useOpenExternalLink = () => {\n  const textSharp = useColorVariable(\"text-sharp\");\n  const bgSurface = useColorVariable(\"bg-surface\");\n\n  return async (href: string, openLinkBehavior: ExternalOpenLinkBehavior) => {\n    switch (openLinkBehavior.native) {\n      case \"webBrowser\": {\n        return WebBrowser.openBrowserAsync(href, {\n          controlsColor: textSharp,\n          dismissButtonStyle: \"close\",\n          presentationStyle: WebBrowserPresentationStyle.PAGE_SHEET,\n          toolbarColor: bgSurface,\n          secondaryToolbarColor: bgSurface,\n          readerMode: false,\n          enableBarCollapsing: false,\n          showTitle: true,\n          enableDefaultShareMenuItem: true,\n        });\n      }\n      case \"linking\": {\n        return Linking.openURL(href);\n      }\n      default: {\n        throw new Error(\n          `Unsupported openLinkBehavior.native: ${openLinkBehavior.native as string}`,\n        );\n      }\n    }\n  };\n};\n\nexport interface ExternalLinkProps<C extends FunctionComponent<any>> {\n  as: C;\n  href: string;\n  onPress?: (event: GestureResponderEvent) => void;\n  openLinkBehavior: ExternalOpenLinkBehavior;\n}\n\ntype ExternalLinkSpreadProps<C extends FunctionComponent<any>> = Omit<\n  ComponentProps<C>,\n  keyof ExternalLinkProps<C>\n>;\n\nexport function ExternalLink<C extends FunctionComponent<any>>({\n  as: C,\n  href,\n  openLinkBehavior,\n  onPress,\n  ...props\n}: ExternalLinkProps<C> & ExternalLinkSpreadProps<C>): ReactNode {\n  const openExternalLink = useOpenExternalLink();\n  const handlePress: ExternalLinkRequiredComponentProps[\"onPress\"] = (e) => {\n    if (onPress) {\n      onPress(e);\n      if (e?.defaultPrevented) return;\n    }\n\n    if (!href) return;\n\n    return openExternalLink(href, openLinkBehavior);\n  };\n\n  return <C {...(props as any)} onPress={handlePress} />;\n}\n","export interface ExternalOpenLinkBehavior {\n  native: \"linking\" | \"webBrowser\";\n  web: \"targetBlank\" | \"targetSelf\";\n}\n\n/** In-app themed browser sheet on native, new tab on web. */\nexport const defaultExternalOpenLinkBehavior: ExternalOpenLinkBehavior = {\n  native: \"webBrowser\",\n  web: \"targetBlank\",\n};\n","import {\n  type ReactElement,\n  type ReactNode,\n  type SVGProps,\n  cloneElement,\n} from \"react\";\nimport type { ColorClassName } from \"../../core/useColorToken\";\nimport { useColorToken } from \"../../core/useColorToken\";\n\nexport type SVGIconElement = ReactElement<SVGProps<SVGSVGElement>>;\n\nexport interface IconProps {\n  icon: SVGIconElement;\n  /** Square size in px. Defaults to 20. */\n  size?: number;\n  /**\n   * Text-color className driving the icon tint, e.g. `text-sharp`,\n   * `text-muted`, `text-accent`, `text-on-accent`, `text-disabled-muted`.\n   * Defaults to `text-sharp`.\n   */\n  className?: ColorClassName;\n}\n\nexport function Icon({\n  icon,\n  size = 20,\n  className = \"text-sharp\",\n}: IconProps): ReactNode {\n  // RN SVG needs a concrete color, not a className. Resolve the text-* color\n  // class to its --color-* token value via the active theme.\n  const color = useColorToken(className);\n  return cloneElement(icon, {\n    color,\n    width: size,\n    height: size,\n  });\n}\n","import type { ReactNode } from \"react\";\nimport { useEffect } from \"react\";\nimport Animated, {\n  Easing,\n  useAnimatedProps,\n  useSharedValue,\n  withTiming,\n} from \"react-native-reanimated\";\nimport { Circle, Svg } from \"react-native-svg\";\nimport { animationDurationsMs } from \"../../animationDurationsMs\";\n\nexport interface RingCircleProps {\n  center: number;\n  radius: number;\n  strokeWidth: number;\n  strokeDasharray?: number;\n  strokeDashoffset?: number;\n  /** Injected by the native `Icon` via `cloneElement`, resolved from a `useColorToken` string. */\n  color?: string;\n  /** Injected by the web `Icon` via `cloneElement` — the `text-*` class itself, resolved through CSS `currentColor`. */\n  className?: string;\n  width?: number;\n  height?: number;\n}\n\nconst AnimatedCircle = Animated.createAnimatedComponent(Circle);\n\n// Matches the web ring's CSS `ease-out` (cubic-bezier(0, 0, 0.58, 1)).\nconst easeOut = Easing.bezier(0, 0, 0.58, 1);\n\nexport function RingCircle({\n  center,\n  radius,\n  strokeWidth,\n  strokeDasharray,\n  strokeDashoffset,\n  color,\n  width,\n  height,\n}: RingCircleProps): ReactNode {\n  // Same viewBox as Phosphor icons (e.g. CheckCircleRegularIcon, viewBox\n  // \"0 0 256 256\"), whose glyph is a 208-diameter circle inset within it.\n  // Rendering into the same viewBox at the same glyph diameter gives the ring\n  // the same padding, so it keeps a consistent visual weight when swapped for\n  // a Phosphor icon in the same slot (Button's overlay spinner → success check).\n  const scale = 208 / (center * 2);\n  const scaledRadius = radius * scale;\n  const scaledStrokeWidth = strokeWidth * scale;\n  const scaledDashoffset =\n    strokeDashoffset == null ? undefined : strokeDashoffset * scale;\n\n  // strokeDashoffset is an SVG prop, not a view style, so NativeWind\n  // transitions can't animate it — drive it with Reanimated instead.\n  const animatedOffset = useSharedValue(scaledDashoffset ?? 0);\n\n  useEffect(() => {\n    animatedOffset.value = withTiming(scaledDashoffset ?? 0, {\n      duration: animationDurationsMs.progress,\n      easing: easeOut,\n    });\n  }, [animatedOffset, scaledDashoffset]);\n\n  const animatedProps = useAnimatedProps(() => ({\n    strokeDashoffset: animatedOffset.value,\n  }));\n\n  return (\n    <Svg color={color} width={width} height={height} viewBox=\"0 0 256 256\">\n      {strokeDasharray == null ? (\n        <Circle\n          cx={128}\n          cy={128}\n          r={scaledRadius}\n          stroke=\"currentColor\"\n          strokeWidth={scaledStrokeWidth}\n          fill=\"none\"\n        />\n      ) : (\n        <AnimatedCircle\n          animatedProps={animatedProps}\n          cx={128}\n          cy={128}\n          r={scaledRadius}\n          stroke=\"currentColor\"\n          strokeWidth={scaledStrokeWidth}\n          strokeDasharray={strokeDasharray * scale}\n          strokeLinecap=\"round\"\n          transform=\"rotate(-90 128 128)\"\n          fill=\"none\"\n        />\n      )}\n    </Svg>\n  );\n}\n","import { useEffect, useState } from \"react\";\nimport { animationDurationsMs } from \"../../animationDurationsMs\";\n\nconst startDelayMs = 100;\nconst stepIntervalMs = 500;\nconst completeDelayMs = 500;\nconst resetDelayMs = 1000;\n\n/**\n * Time from `loading` going false until the ring has finished completing to\n * 100% and faded out — how long a consumer must keep the component mounted\n * to see the finish animation instead of cutting it off.\n */\nexport const indeterminateExitDurationMs =\n  resetDelayMs + animationDurationsMs.fade;\n\nconst random = (): number => Math.ceil(Math.random() * 100) / 100;\n\n/**\n * Advances toward 100 in decreasing increments so the bar appears to slow\n * down as it approaches completion, without ever reaching it on its own\n * (e.g. ~20% at 100ms, ~40% at 1s, ~60% at 2s, ~80% at 3s).\n */\nfunction nextSimulatedProgress(progress: number): number {\n  if (progress < 60) return progress + random() * 10 + 5;\n  if (progress < 70) return progress + random() * 10 + 3;\n  if (progress < 80) return progress + random() + 5;\n  if (progress < 90) return progress + random() + 1;\n  if (progress < 95) return progress + 0.1;\n  return progress;\n}\n\nexport function useSimulatedProgress(loading: boolean): {\n  progress: number;\n  hidden: boolean;\n} {\n  const [progress, setProgress] = useState(1);\n  const [hidden, setHidden] = useState(!loading);\n\n  useEffect(() => {\n    if (!loading) return undefined;\n\n    setHidden(false);\n    const startTimer = setTimeout(() => {\n      setProgress(20);\n    }, startDelayMs);\n    const stepTimer = setInterval(() => {\n      setProgress(nextSimulatedProgress);\n    }, stepIntervalMs);\n\n    return () => {\n      clearTimeout(startTimer);\n      clearInterval(stepTimer);\n    };\n  }, [loading]);\n\n  useEffect(() => {\n    if (loading) return undefined;\n\n    const completeTimer = setTimeout(() => {\n      setProgress(100);\n    }, completeDelayMs);\n    const resetTimer = setTimeout(() => {\n      setHidden(true);\n      setProgress(1);\n    }, resetDelayMs);\n\n    return () => {\n      clearTimeout(completeTimer);\n      clearTimeout(resetTimer);\n    };\n  }, [loading]);\n\n  return { progress, hidden };\n}\n","import type { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { Icon } from \"../primitives/Icon\";\nimport { View } from \"../primitives/View\";\nimport { RingCircle } from \"./RingCircle\";\nimport { useSimulatedProgress } from \"./useSimulatedProgress\";\n\nexport type CircularProgressSize = \"lg\" | \"md\" | \"sm\" | \"xs\";\n\nconst diameterBySize: Record<CircularProgressSize, number> = {\n  xs: 16,\n  sm: 32,\n  md: 64,\n  lg: 128,\n};\n\nconst strokeWidthBySize: Record<CircularProgressSize, number> = {\n  xs: 2,\n  sm: 4,\n  md: 8,\n  lg: 16,\n};\n\nconst ring = tv({\n  base: \"relative transition-opacity duration-fade\",\n  variants: {\n    hidden: {\n      true: \"opacity-0\",\n      false: \"opacity-100\",\n    },\n  },\n  defaultVariants: { hidden: false },\n});\n\nexport interface CircularProgressProps {\n  /** Known completion percentage, 0-100. For an unknown percentage (e.g.\n   * reconnecting, page transitions), use `IndeterminateCircularProgress` instead. */\n  progress: number;\n  hidden?: boolean;\n  accent?: Accent;\n  size?: CircularProgressSize;\n}\n\nexport function CircularProgress({\n  progress,\n  hidden = false,\n  accent = \"brand\",\n  size = \"md\",\n}: CircularProgressProps): ReactNode {\n  const diameter = diameterBySize[size];\n  const strokeWidth = strokeWidthBySize[size];\n  const radius = (diameter - strokeWidth) / 2;\n  const circumference = 2 * Math.PI * radius;\n  const clampedProgress = Math.min(Math.max(progress, 0), 100);\n  const dashOffset = circumference * (1 - clampedProgress / 100);\n  const center = diameter / 2;\n\n  const trackRing = (\n    <RingCircle center={center} radius={radius} strokeWidth={strokeWidth} />\n  );\n\n  const fillRing = (\n    <RingCircle\n      center={center}\n      radius={radius}\n      strokeWidth={strokeWidth}\n      strokeDasharray={circumference}\n      strokeDashoffset={dashOffset}\n    />\n  );\n\n  return (\n    <AccentScope accent={accent}>\n      <View\n        className={ring({ hidden })}\n        style={{ width: diameter, height: diameter }}\n      >\n        <View className=\"absolute inset-0\">\n          <Icon\n            icon={trackRing}\n            size={diameter}\n            className=\"text-border-muted\"\n          />\n        </View>\n        <View className=\"absolute inset-0\">\n          <Icon icon={fillRing} size={diameter} className=\"text-accent\" />\n        </View>\n      </View>\n    </AccentScope>\n  );\n}\n\nexport interface IndeterminateCircularProgressProps {\n  /** Whether an operation is in progress. The ring creeps toward 100% while\n   * `true`, then completes and fades out once `false`. */\n  loading: boolean;\n  accent?: Accent;\n  size?: CircularProgressSize;\n}\n\nexport function IndeterminateCircularProgress({\n  loading,\n  accent,\n  size,\n}: IndeterminateCircularProgressProps): ReactNode {\n  const { progress, hidden } = useSimulatedProgress(loading);\n\n  return (\n    <CircularProgress\n      progress={progress}\n      hidden={hidden}\n      accent={accent}\n      size={size}\n    />\n  );\n}\n","import { forwardRef } from \"react\";\nimport type {\n  PressableProps as RNPressableProps,\n  View as RNView,\n} from \"react-native\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { InteractiveBox, interactiveBoxVariants } from \"../containers/Box\";\n\nconst pressableBoxVariants = tv(\n  {\n    extend: interactiveBoxVariants,\n    base: \"overflow-hidden\",\n    variants: {\n      variant: {\n        contained: [\n          \"rounded-sm\",\n          process.env.EXPO_PUBLIC_STORYBOOK_ENABLED\n            ? \"\"\n            : \"shadow-s bg-interactive-contained-pressable\",\n          \"hover:bg-interactive-contained-hover\",\n          \"focus:bg-interactive-contained-focus\",\n          \"active:bg-interactive-contained-active\",\n          \"disabled:bg-interactive-contained-disabled disabled:shadow-none\",\n          \"aria-disabled:bg-interactive-contained-disabled aria-disabled:shadow-none\",\n          \"focus-visible:outline-border-muted\",\n        ].join(\" \"),\n        outlined: [\n          \"border bg-highlight\",\n          process.env.EXPO_PUBLIC_STORYBOOK_ENABLED\n            ? \"\"\n            : \"border-interactive-outlined-pressable\",\n          \"hover:border-interactive-outlined-hover\",\n          \"focus:border-interactive-outlined-focus\",\n          \"active:border-interactive-outlined-active\",\n          \"disabled:border-interactive-outlined-disabled\",\n          \"aria-disabled:border-interactive-outlined-disabled\",\n          \"focus-visible:outline-interactive-outlined-outline-focus\",\n        ].join(\" \"),\n        ghost: [\n          \"border border-transparent\",\n          \"hover:border hover:border-interactive-outlined-hover\",\n          \"focus:border focus:border-interactive-outlined-focus\",\n          \"active:border active:border-interactive-outlined-active\",\n          \"disabled:border-interactive-outlined-disabled\",\n          \"aria-disabled:border-interactive-outlined-disabled\",\n          \"focus-visible:outline-interactive-outlined-outline-focus\",\n        ].join(\" \"),\n      },\n      forceStyle: {\n        hover: \"\",\n        focus: \"\",\n        press: \"scale-[0.975]\",\n      },\n    },\n    compoundVariants: process.env.EXPO_PUBLIC_STORYBOOK_ENABLED\n      ? [\n          /* contained */\n          {\n            variant: \"contained\",\n            forceStyle: undefined,\n            ghost: false,\n            className: \"shadow-s bg-interactive-contained-pressable\",\n          },\n          {\n            variant: \"contained\",\n            forceStyle: \"hover\",\n            className: \"shadow-s bg-interactive-contained-hover\",\n          },\n          {\n            variant: \"contained\",\n            forceStyle: \"focus\",\n            className: \"shadow-s bg-interactive-contained-focus\",\n          },\n          {\n            variant: \"contained\",\n            forceStyle: \"press\",\n            className: \"shadow-s bg-interactive-contained-active\",\n          },\n          /* outlined */\n          {\n            variant: \"outlined\",\n            forceStyle: undefined,\n            ghost: false,\n            className: \"border-interactive-outlined-pressable\",\n          },\n          {\n            variant: \"outlined\",\n            forceStyle: \"hover\",\n            className: \"border-interactive-outlined-hover\",\n          },\n          {\n            variant: \"outlined\",\n            forceStyle: \"focus\",\n            className: \"border-interactive-outlined-focus\",\n          },\n          {\n            variant: \"outlined\",\n            forceStyle: \"press\",\n            className: \"border-interactive-outlined-active\",\n          },\n          /* ghost */\n          {\n            variant: \"ghost\",\n            forceStyle: undefined,\n            className: \"border-transparent\",\n          },\n          {\n            variant: \"ghost\",\n            forceStyle: \"hover\",\n            className: \"border-interactive-outlined-hover\",\n          },\n          {\n            variant: \"ghost\",\n            forceStyle: \"focus\",\n            className: \"border-interactive-outlined-focus\",\n          },\n          {\n            variant: \"ghost\",\n            forceStyle: \"press\",\n            className: \"border-interactive-outlined-active\",\n          },\n        ]\n      : undefined,\n    defaultVariants: {\n      variant: \"contained\",\n    },\n  },\n  { twMerge: false },\n);\n\ntype PressableBoxVariantProps = VariantProps<typeof pressableBoxVariants>;\n\nexport interface PressableBoxProps\n  extends RNPressableProps, PressableBoxVariantProps {\n  accent?: Accent;\n  className?: string;\n  forceStyle?: \"focus\" | \"hover\" | \"press\";\n}\n\n// TODO what is the diff between <Box interactive> and PressableBox ?\nexport const PressableBox = forwardRef<RNView, PressableBoxProps>(\n  ({ className, variant, forceStyle, accent, ...props }, ref) => {\n    return (\n      <AccentScope accent={accent}>\n        <InteractiveBox\n          ref={ref}\n          withFocusVisibleOutline\n          role=\"button\"\n          className={pressableBoxVariants({\n            variant,\n\n            className,\n            forceStyle,\n          })}\n          {...props}\n        />\n      </AccentScope>\n    );\n  },\n);\n","import { CheckCircleRegularIcon } from \"alouette-icons/phosphor-icons/CheckCircleRegularIcon\";\nimport { WarningDuotoneIcon } from \"alouette-icons/phosphor-icons/WarningDuotoneIcon\";\nimport { type ReactNode, useEffect, useState } from \"react\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { ExternalLink } from \"../../expo/ExternalLink\";\nimport {\n  type ExternalOpenLinkBehavior,\n  defaultExternalOpenLinkBehavior,\n} from \"../../expo/ExternalLink.shared\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { IndeterminateCircularProgress } from \"../feedback/CircularProgress\";\nimport { indeterminateExitDurationMs } from \"../feedback/useSimulatedProgress\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\nimport { View } from \"../primitives/View\";\nimport { PressableBox, type PressableBoxProps } from \"./PressableBox\";\n\nexport const buttonHeight = {\n  sm: 38,\n  md: 44,\n} as const;\n\nconst buttonVariants = tv(\n  {\n    slots: {\n      frame: \"flex-row flex-center relative\",\n      text: \"font-body-bold text-center shrink transition-opacity duration-fade\",\n      icon: \"\",\n      terminalIcon: \"text-accent\",\n      overlayIconContainer: \"absolute inset-0 flex-center\",\n    },\n    variants: {\n      size: {\n        sm: {\n          frame: \"rounded-sm px-xs gap-xxs min-h-[38px]\",\n          text: \"text-sm py-xxs\",\n        },\n        md: {\n          frame: \"rounded-sm px-m gap-xs min-h-[44px]\",\n          text: \"text-base py-xs\",\n        },\n      },\n      variant: {\n        contained: { text: \"text-on-accent\" },\n        outlined: { text: \"text-sharp\" },\n        ghost: { text: \"text-sharp\" },\n      },\n      disabled: { true: {}, false: {} },\n      dimmed: {\n        true: { text: \"opacity-30\", icon: \"opacity-30\" },\n        false: {},\n      },\n    },\n    compoundVariants: [\n      {\n        variant: \"contained\",\n        disabled: false,\n        ghost: false,\n        class: { icon: \"text-on-accent\" },\n      },\n      {\n        variant: \"contained\",\n        disabled: false,\n        ghost: true,\n        class: {\n          text: \"text-sharp hover:text-on-accent\",\n          icon: \"text-sharp hover:text-on-accent\",\n        },\n      },\n      { variant: \"outlined\", disabled: false, class: { icon: \"text-sharp\" } },\n      {\n        variant: \"contained\",\n        disabled: true,\n        class: { icon: \"text-disabled-sharp\", text: \"text-disabled-sharp\" },\n      },\n      {\n        variant: \"outlined\",\n        disabled: true,\n        class: { icon: \"text-disabled-muted\", text: \"text-disabled-muted\" },\n      },\n    ],\n    defaultVariants: { size: \"md\", variant: \"contained\" },\n  },\n  { twMerge: false },\n);\n\ntype ButtonSizeProps = Pick<VariantProps<typeof buttonVariants>, \"size\">;\n\nexport type ButtonState = \"failed\" | \"loading\" | \"success\";\n\n/** Icon shown above the text for a terminal `state`, once the spinner's\n * finish animation has played out. */\nfunction resolveTerminalIcon(state: ButtonState | undefined): {\n  terminalIcon: SVGIconElement | undefined;\n  terminalIconAccent: Accent | undefined;\n} {\n  if (state === \"success\") {\n    return {\n      terminalIcon: <CheckCircleRegularIcon />,\n      terminalIconAccent: \"success\",\n    };\n  }\n  if (state === \"failed\") {\n    return {\n      terminalIcon: <WarningDuotoneIcon />,\n      terminalIconAccent: \"danger\",\n    };\n  }\n  return { terminalIcon: undefined, terminalIconAccent: undefined };\n}\n\nexport interface ButtonProps\n  extends Omit<PressableBoxProps, \"children\">, ButtonSizeProps {\n  icon?: SVGIconElement;\n  accent?: Accent;\n  text: ReactNode;\n  state?: ButtonState;\n}\n\ninterface IsButtonDisabledParams {\n  disabled?: boolean | null;\n  state?: ButtonState;\n}\n\nfunction isButtonDisabled({\n  disabled,\n  state,\n}: IsButtonDisabledParams): boolean {\n  return disabled === true || state != null;\n}\n\nexport function Button({\n  icon,\n  text,\n  disabled,\n  state,\n  accent = \"brand\",\n  variant = \"contained\",\n  size = \"md\",\n  className,\n  ...pressableProps\n}: ButtonProps): ReactNode {\n  const isLoading = state === \"loading\";\n\n  // Keep the spinner (and the disabled look) mounted past `state` leaving\n  // \"loading\" so the ring's complete-then-fade animation can finish, and the\n  // background transitions back in step with it, instead of both being cut\n  // off mid-animation.\n  const [showSpinner, setShowSpinner] = useState(isLoading);\n  useEffect(() => {\n    if (isLoading) {\n      setShowSpinner(true);\n      return undefined;\n    }\n    const timer = setTimeout(() => {\n      setShowSpinner(false);\n    }, indeterminateExitDurationMs);\n    return () => {\n      clearTimeout(timer);\n    };\n  }, [isLoading]);\n\n  const { terminalIcon, terminalIconAccent } = resolveTerminalIcon(state);\n  const hasOverlayIcon = showSpinner || terminalIcon !== undefined;\n\n  const isDisabled = isButtonDisabled({ disabled, state });\n  const styles = buttonVariants({\n    size,\n    variant,\n    disabled: isDisabled,\n    dimmed: hasOverlayIcon,\n  });\n\n  return (\n    <PressableBox\n      accent={accent}\n      variant={variant}\n      disabled={isDisabled}\n      className={styles.frame({ className })}\n      {...pressableProps}\n    >\n      {hasOverlayIcon ? (\n        <View className={styles.overlayIconContainer()}>\n          {showSpinner || !terminalIcon ? (\n            <IndeterminateCircularProgress\n              loading={isLoading}\n              accent={accent}\n              size={size === \"sm\" ? \"xs\" : \"sm\"}\n            />\n          ) : (\n            <AccentScope accent={terminalIconAccent}>\n              <Icon\n                icon={terminalIcon}\n                className={styles.terminalIcon()}\n                size={size === \"sm\" ? 24 : 32}\n              />\n            </AccentScope>\n          )}\n        </View>\n      ) : null}\n      {icon ? (\n        <Icon\n          icon={icon}\n          className={styles.icon()}\n          size={size === \"sm\" ? 16 : 20}\n        />\n      ) : null}\n      <Text aria-disabled={isDisabled} className={styles.text()}>\n        {text}\n      </Text>\n    </PressableBox>\n  );\n}\n\nexport interface ExternalLinkButtonProps extends ButtonProps {\n  href: string;\n  /** How the link opens. Defaults to an in-app browser sheet / a new tab. */\n  openLinkBehavior?: ExternalOpenLinkBehavior;\n}\n\nexport function ExternalLinkButton({\n  href,\n  openLinkBehavior = defaultExternalOpenLinkBehavior,\n  onPress,\n  ...buttonProps\n}: ExternalLinkButtonProps): ReactNode {\n  return (\n    <ExternalLink\n      as={Button}\n      // A disabled Pressable never sees the press that would cancel the\n      // navigation, so the href has to go with it — ExternalLink drops a falsy\n      // one on both platforms.\n      href={isButtonDisabled(buttonProps) ? \"\" : href}\n      openLinkBehavior={openLinkBehavior}\n      role=\"link\"\n      onPress={onPress ?? undefined}\n      {...buttonProps}\n    />\n  );\n}\n\nexport interface InternalLinkButtonProps extends ButtonProps {\n  href: string;\n}\n\nexport function InternalLinkButton({\n  href: _href,\n  ...buttonProps\n}: InternalLinkButtonProps): ReactNode {\n  return <Button {...buttonProps} role=\"link\" />;\n}\n","import type { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { buttonHeight } from \"./Button\";\nimport { PressableBox, type PressableBoxProps } from \"./PressableBox\";\n\nconst iconButtonVariants = tv(\n  {\n    slots: {\n      frame: \"shrink-0 flex-center rounded-full\",\n      icon: \"\",\n    },\n    variants: {\n      variant: {\n        contained: {},\n        outlined: {},\n        ghost: {},\n      },\n      disabled: {\n        true: {},\n        false: {},\n      },\n    },\n    compoundVariants: [\n      {\n        variant: \"contained\",\n        disabled: false,\n        class: { icon: \"text-on-accent\" },\n      },\n      {\n        variant: \"outlined\",\n        disabled: false,\n        class: { icon: \"text-sharp\" },\n      },\n      {\n        variant: \"ghost\",\n        disabled: false,\n        class: { icon: \"text-sharp\" },\n      },\n      {\n        variant: \"contained\",\n        disabled: true,\n        class: { icon: \"text-disabled-sharp\" },\n      },\n      {\n        variant: \"outlined\",\n        disabled: true,\n        class: { icon: \"text-disabled-muted\" },\n      },\n      {\n        variant: \"ghost\",\n        disabled: true,\n        class: { icon: \"text-disabled-muted\" },\n      },\n    ],\n    defaultVariants: { variant: \"contained\" },\n  },\n  { twMerge: false },\n);\n\nexport interface IconButtonProps extends Omit<PressableBoxProps, \"children\"> {\n  icon: SVGIconElement;\n  /** Preset size token, or any number for a custom diameter (px). */\n  size?: number | \"md\" | \"sm\";\n  /** When \"fill\", the icon takes 80% of the button; default uses 50%. */\n  iconSize?: \"fill\";\n  \"aria-label\": string;\n}\n\nexport function IconButton({\n  icon,\n  disabled,\n  size = \"md\",\n  iconSize,\n  variant = \"contained\",\n  className,\n  ...pressableProps\n}: IconButtonProps): ReactNode {\n  const diameter = typeof size === \"number\" ? size : buttonHeight[size];\n  const styles = iconButtonVariants({ variant, disabled: disabled === true });\n\n  return (\n    <PressableBox\n      variant={variant}\n      disabled={disabled}\n      className={styles.frame({ className })}\n      style={{ width: diameter, height: diameter }}\n      {...pressableProps}\n    >\n      <Icon\n        icon={icon}\n        size={diameter * (iconSize === \"fill\" ? 0.8 : 0.55)}\n        className={styles.icon()}\n      />\n    </PressableBox>\n  );\n}\n","import { XRegularIcon } from \"alouette-icons/phosphor-icons/XRegularIcon\";\nimport { type ReactNode, useId } from \"react\";\nimport {\n  Platform,\n  Pressable,\n  Modal as RNModal,\n  useWindowDimensions,\n} from \"react-native\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { useScrollEndState } from \"../../core/useScrollEndState\";\nimport { buttonHeight } from \"../actions/Button\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { ScrollView } from \"../primitives/ScrollView\";\nimport { Text } from \"../primitives/Text\";\nimport { View } from \"../primitives/View\";\nimport { HStack } from \"../stacks/stacks\";\nimport { PortalAccentScope } from \"./PortalAccentScope\";\n\n// Yoga only knows `relative` and `absolute` — `position: sticky` is a web-only\n// feature and the class compiles away on native. A component that pins an\n// element to the edge of a scroll box has to lay it out differently there.\nconst supportsStickyPosition = Platform.OS === \"web\";\n\n// The panel padding is split in half so the web scrollbar sits in a balanced\n// gutter: one half stays on the panel (outside the scroll box, between the panel\n// edge and the bar), the other moves into the scroll content container (inside\n// it, between the bar and the content). The header is outside the scroll box, so\n// it carries the inner half itself to stay aligned with the scrolling content;\n// the footer carries the bottom half, which the scroll content drops (pb-0).\nconst modalVariants = tv({\n  slots: {\n    // w-full so the panel shrinks on small screens (the backdrop padding keeps a\n    // margin); max-w caps it on wide viewports.\n    panel: \"w-full max-h-full\",\n    inset: \"bg-highlight shadow-l\",\n    header: \"items-center gap-xs\",\n    scrollContent: \"\",\n    // `sticky` pins it to the bottom of the scroll box on web. The border is\n    // transparent at rest so toggling it can't shift the layout.\n    footer:\n      \"items-center justify-end gap-m sticky bottom-0 bg-highlight border-t border-transparent\",\n  },\n  variants: {\n    size: {\n      sm: {\n        panel: \"max-w-[360px]\",\n        inset: \"rounded-sm p-xs\",\n        header: \"pl-xs\",\n        scrollContent: \"p-xs\",\n        footer: \"py-xs\",\n      },\n      md: {\n        panel: \"max-w-[520px]\",\n        inset: \"rounded-sm p-m\",\n        header: \"pl-m\",\n        scrollContent: \"p-m\",\n        footer: \"py-sm\",\n      },\n      lg: {\n        panel: \"max-w-[720px]\",\n        inset: \"rounded-md p-l\",\n        header: \"pl-l\",\n        scrollContent: \"p-l\",\n        footer: \"py-m\",\n      },\n    },\n    withFooter: {\n      true: { scrollContent: \"pb-0\" },\n    },\n    // Native has no sticky positioning, so the footer sits below the scroll box\n    // instead of inside it — outside the scroll content container it has to\n    // carry that container's horizontal padding itself to stay aligned with the\n    // body.\n    detachedFooter: {\n      true: {},\n    },\n    // Only while the footer overlaps scrolled-past content does it need a rule\n    // separating it from the body; at the end of the scroll it sits in flow.\n    stuck: {\n      true: { footer: \"border-border-muted\" },\n    },\n  },\n  compoundVariants: [\n    { size: \"sm\", detachedFooter: true, class: { footer: \"px-xs\" } },\n    { size: \"md\", detachedFooter: true, class: { footer: \"px-m\" } },\n    { size: \"lg\", detachedFooter: true, class: { footer: \"px-l\" } },\n  ],\n  defaultVariants: { size: \"md\" },\n});\n\ntype ModalVariantProps = VariantProps<typeof modalVariants>;\n\nexport interface ModalProps {\n  /** Whether the modal is shown. */\n  visible: boolean;\n  /**\n   * Called when the user dismisses the modal — backdrop press, close button, the\n   * Android back button, or the Escape key (web).\n   */\n  onClose: () => void;\n  children: ReactNode;\n  /**\n   * Heading rendered in the fixed header; also labels the dialog for assistive\n   * tech.\n   */\n  title: string;\n  /** Accent-tinted icon rendered before the title in the header. */\n  icon?: SVGIconElement;\n  /** Actions row rendered below the body (e.g. Cancel/Confirm buttons). */\n  footer?: ReactNode;\n  accent?: Accent;\n  size?: ModalVariantProps[\"size\"];\n  /** Hide the header close button (the modal stays dismissible otherwise). */\n  hideCloseButton?: boolean;\n  /** Accessible label for the close button. */\n  closeButtonAriaLabel?: string;\n  /**\n   * `alertdialog` for interruptions that require an explicit response\n   * (destructive confirmation, errors). Defaults to `dialog`.\n   */\n  role?: \"alertdialog\" | \"dialog\";\n  /** ID of the element describing the dialog (announced by assistive tech). */\n  \"aria-describedby\"?: string;\n  testID?: string;\n}\n\nexport function Modal({\n  visible,\n  onClose,\n  children,\n  icon,\n  footer,\n  accent,\n  size = \"md\",\n  title,\n  hideCloseButton = false,\n  closeButtonAriaLabel = \"Close\",\n  role = \"dialog\",\n  \"aria-describedby\": ariaDescribedby,\n  testID,\n}: ModalProps): ReactNode {\n  const { height: windowHeight } = useWindowDimensions();\n  const titleId = useId();\n  const iconSize = size === \"lg\" ? \"md\" : size;\n  const { isScrolledToEnd, scrollViewProps } = useScrollEndState();\n  const styles = modalVariants({\n    size,\n    withFooter: footer !== undefined,\n    stuck: footer !== undefined && !isScrolledToEnd,\n    detachedFooter: !supportsStickyPosition,\n  });\n  const footerElement =\n    footer === undefined ? null : (\n      <HStack className={styles.footer()}>{footer}</HStack>\n    );\n\n  return (\n    <RNModal\n      transparent\n      visible={visible}\n      animationType=\"fade\"\n      onRequestClose={onClose}\n    >\n      <PortalAccentScope accent={accent}>\n        <View className=\"flex-1 flex-center p-l\">\n          {/* Backdrop is an absolutely-filled sibling behind the panel, so it\n              catches outside clicks without wrapping the panel — clicks inside\n              the panel never reach it. aria-hidden + focusable={false} keep this\n              dismiss target out of the accessibility tree and the tab order. */}\n          <Pressable\n            aria-hidden\n            focusable={false}\n            className=\"absolute inset-0 bg-translucent\"\n            onPress={onClose}\n          />\n          <View\n            aria-modal\n            role={role}\n            aria-labelledby={titleId}\n            aria-describedby={ariaDescribedby}\n            testID={testID}\n            className={styles.panel()}\n          >\n            <View className={styles.inset()}>\n              {/* Header sits outside the scroll box: the title and the close\n                  button stay put while the body scrolls under them. */}\n              <HStack\n                className={styles.header()}\n                style={{ minHeight: buttonHeight[iconSize] }}\n              >\n                {icon === undefined ? null : (\n                  <Icon icon={icon} size={24} className=\"text-accent\" />\n                )}\n                <Text\n                  nativeID={titleId}\n                  className=\"shrink grow font-heading-bold text-xl leading-tight text-sharp\"\n                >\n                  {title}\n                </Text>\n                {hideCloseButton ? null : (\n                  <IconButton\n                    icon={<XRegularIcon />}\n                    variant=\"ghost\"\n                    size={iconSize}\n                    aria-label={closeButtonAriaLabel}\n                    onPress={onClose}\n                  />\n                )}\n              </HStack>\n\n              {/* Pixel maxHeight (not a %) so the ScrollView sizes to its\n                  content and only scrolls once it exceeds ~70% of the screen;\n                  `shrink` lets it give way to the header and the detached\n                  footer when the panel hits the screen height. */}\n              <ScrollView\n                className=\"shrink\"\n                style={{ maxHeight: windowHeight * 0.7 }}\n                contentContainerClassName={styles.scrollContent()}\n                {...scrollViewProps}\n              >\n                {children}\n\n                {/* Web keeps the footer in the scroll content, where `sticky`\n                    pins it to the bottom edge and the body scrolls under it. */}\n                {supportsStickyPosition ? footerElement : null}\n              </ScrollView>\n\n              {/* Native has no sticky positioning: the footer sits after the\n                  scroll box instead. Same result — the ScrollView grows with\n                  its content up to its maxHeight, so the footer is right below\n                  short content and pinned under a full-height body. */}\n              {supportsStickyPosition ? null : footerElement}\n            </View>\n          </View>\n        </View>\n      </PortalAccentScope>\n    </RNModal>\n  );\n}\n","import { CheckRegularIcon } from \"alouette-icons/phosphor-icons/CheckRegularIcon\";\nimport { InfoRegularIcon } from \"alouette-icons/phosphor-icons/InfoRegularIcon\";\nimport { WarningDuotoneIcon } from \"alouette-icons/phosphor-icons/WarningDuotoneIcon\";\nimport { WarningRegularIcon } from \"alouette-icons/phosphor-icons/WarningRegularIcon\";\nimport { XRegularIcon } from \"alouette-icons/phosphor-icons/XRegularIcon\";\nimport type { ReactNode } from \"react\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport type { Except } from \"type-fest\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { Box } from \"../containers/Box\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\n\nconst messageFrameVariants = tv(\n  {\n    base: \"flex-row items-center overflow-hidden bg-highlight-accent\",\n    variants: {\n      size: {\n        sm: \"gap-xs p-sm rounded-xs\",\n        md: \"gap-m p-m rounded-sm\",\n        lg: \"gap-l p-l rounded-md\",\n      },\n      variant: {\n        // Raised: the banner is its own layer above the screen background.\n        surface: \"shadow-m\",\n        // Flush: for a banner already inside a raised surface, where a second\n        // elevation would read as a card stacked on a card.\n        flat: \"shadow-none border-border-muted border\",\n      },\n    },\n    defaultVariants: { size: \"md\", variant: \"surface\" },\n  },\n  { twMerge: false },\n);\n\ntype MessageVariantProps = VariantProps<typeof messageFrameVariants>;\ntype MessageSize = NonNullable<MessageVariantProps[\"size\"]>;\nexport type MessageVariant = NonNullable<MessageVariantProps[\"variant\"]>;\n\nconst ICON_SIZE: Record<MessageSize, number> = { sm: 20, md: 24, lg: 28 };\nconst DISMISS_BUTTON_SIZE: Record<MessageSize, number> = {\n  sm: 24,\n  md: 40,\n  lg: 40,\n};\n\ninterface MessageBaseProps {\n  accent: Accent;\n  size?: MessageSize;\n  /**\n   * \"surface\" (default) is a raised banner. Use \"flat\" only when the message\n   * already sits inside a raised surface (a Modal footer, a Surface card).\n   */\n  variant?: MessageVariant;\n  icon: SVGIconElement;\n  children?: ReactNode;\n}\ninterface MessagePropsWithDismiss extends MessageBaseProps {\n  onDismiss: () => void;\n  dismissIconAriaLabel: string;\n}\ninterface MessagePropsWithoutDismiss extends MessageBaseProps {\n  onDismiss?: undefined;\n  dismissIconAriaLabel?: undefined;\n}\n\nexport type MessageProps = MessagePropsWithDismiss | MessagePropsWithoutDismiss;\n\nexport function Message({\n  icon,\n  size = \"md\",\n  variant,\n  accent,\n  children,\n  onDismiss,\n  dismissIconAriaLabel,\n}: MessageProps): ReactNode {\n  const dismissDiameter = DISMISS_BUTTON_SIZE[size];\n  return (\n    <AccentScope accent={accent}>\n      <Box className={messageFrameVariants({ size, variant })}>\n        <Icon icon={icon} size={ICON_SIZE[size]} className=\"text-accent\" />\n        {/* React Native defaults flexShrink to 0: without `shrink` the text\n            keeps its content width and pushes the dismiss button out of the\n            frame instead of wrapping. */}\n        <Text className=\"text-sharp shrink grow\">{children}</Text>\n        {onDismiss ? (\n          <Box\n            style={{ width: dismissDiameter, height: dismissDiameter }}\n            className=\"shrink-0 flex-center\"\n          >\n            <IconButton\n              icon={<XRegularIcon />}\n              iconSize={size === \"sm\" ? \"fill\" : undefined}\n              size={dismissDiameter}\n              variant=\"ghost\"\n              aria-label={dismissIconAriaLabel}\n              onPress={onDismiss}\n            />\n          </Box>\n        ) : null}\n      </Box>\n    </AccentScope>\n  );\n}\n\ntype AccentMessageProps = Except<MessageProps, \"accent\" | \"icon\">;\n\nexport function InfoMessage(props: AccentMessageProps): ReactNode {\n  return <Message {...props} accent=\"info\" icon={<InfoRegularIcon />} />;\n}\n\nexport function ConfirmationMessage(props: AccentMessageProps): ReactNode {\n  return <Message {...props} accent=\"success\" icon={<CheckRegularIcon />} />;\n}\n\nexport function WarningMessage(props: AccentMessageProps): ReactNode {\n  return <Message {...props} accent=\"warning\" icon={<WarningRegularIcon />} />;\n}\n\nexport function ErrorMessage(props: AccentMessageProps): ReactNode {\n  return <Message {...props} accent=\"danger\" icon={<WarningDuotoneIcon />} />;\n}\n","import type { ReactNode } from \"react\";\nimport { ErrorMessage, type MessageVariant } from \"../feedback/Message\";\nimport { View } from \"../primitives/View\";\n\nexport interface CollapsibleErrorMessageProps {\n  error: Error | null;\n  errorToMessage: (error: unknown) => string;\n  /** Forwarded to the message: \"flat\" when the caller is inside a surface. */\n  variant?: MessageVariant;\n}\n\n// Collapsed, the message is taken out of the flow rather than merely zero-\n// height: an in-flow child would still lend its parent its own intrinsic width,\n// sizing a button to the width of a message nobody can see — and in a row (a\n// modal footer) that width squeezes the sibling buttons.\nexport function CollapsibleErrorMessage({\n  error,\n  errorToMessage,\n  variant,\n}: CollapsibleErrorMessageProps): ReactNode {\n  return (\n    <View\n      role=\"alert\"\n      className={`overflow-hidden transition-[height,opacity] duration-collapse ${\n        error ? \"p-sm h-auto opacity-100\" : \"absolute h-0 opacity-0\"\n      }`}\n    >\n      {/* Mounted empty rather than filled-and-hidden: a live region only\n          announces content added after it exists, and `errorToMessage` is never\n          called with a null error. */}\n      {error === null ? null : (\n        <ErrorMessage size=\"sm\" variant={variant}>\n          {errorToMessage(error)}\n        </ErrorMessage>\n      )}\n    </View>\n  );\n}\n","import { useEffect, useReducer, useRef } from \"react\";\nimport type { GestureResponderEvent } from \"react-native\";\nimport type { ButtonState } from \"./Button\";\n\nexport const settledDisplayDurationMs = 4000;\n\ninterface PressAsyncState {\n  buttonState: ButtonState | undefined;\n  error: Error | null;\n}\n\ntype PressAsyncAction =\n  | { type: \"reject\"; error: Error }\n  | { type: \"resolve\" }\n  | { type: \"settledTimeout\" }\n  | { type: \"start\" };\n\nconst idleState: PressAsyncState = { buttonState: undefined, error: null };\n\nfunction pressAsyncReducer(\n  previousState: PressAsyncState,\n  action: PressAsyncAction,\n): PressAsyncState {\n  switch (action.type) {\n    case \"start\":\n      return { buttonState: \"loading\", error: null };\n    case \"resolve\":\n      return { buttonState: \"success\", error: null };\n    case \"reject\":\n      return { buttonState: \"failed\", error: action.error };\n    case \"settledTimeout\":\n      return { buttonState: undefined, error: previousState.error };\n    default:\n      throw new Error(`Unhandled action: ${JSON.stringify(action)}`);\n  }\n}\n\nexport interface UsePressAsyncResult extends PressAsyncState {\n  handlePress: (event: GestureResponderEvent) => void;\n}\n\nexport function usePressAsync(\n  onPress: (event: GestureResponderEvent) => unknown,\n): UsePressAsyncResult {\n  const [pressAsyncState, dispatch] = useReducer(pressAsyncReducer, idleState);\n  const settledTimerRef = useRef<ReturnType<typeof setTimeout>>(undefined);\n\n  useEffect(() => {\n    return () => {\n      clearTimeout(settledTimerRef.current);\n    };\n  }, []);\n\n  function handlePress(event: GestureResponderEvent): void {\n    if (pressAsyncState.buttonState === \"loading\") return;\n    clearTimeout(settledTimerRef.current);\n    const result = onPress(event);\n    if (!(result instanceof Promise)) return;\n    dispatch({ type: \"start\" });\n\n    function scheduleSettledTimeout(): void {\n      settledTimerRef.current = setTimeout(() => {\n        dispatch({ type: \"settledTimeout\" });\n      }, settledDisplayDurationMs);\n    }\n\n    result\n      .then(() => {\n        dispatch({ type: \"resolve\" });\n        scheduleSettledTimeout();\n      })\n      .catch((caughtError: unknown) => {\n        const normalizedError =\n          caughtError instanceof Error\n            ? caughtError\n            : new Error(String(caughtError));\n        // eslint-disable-next-line no-console\n        console.error(\n          \"Unexpected error caught in usePressAsync\",\n          normalizedError,\n        );\n        dispatch({ type: \"reject\", error: normalizedError });\n        scheduleSettledTimeout();\n      });\n  }\n\n  return { ...pressAsyncState, handlePress };\n}\n","import { CheckRegularIcon } from \"alouette-icons/phosphor-icons/CheckRegularIcon\";\nimport { InfoRegularIcon } from \"alouette-icons/phosphor-icons/InfoRegularIcon\";\nimport { QuestionRegularIcon } from \"alouette-icons/phosphor-icons/QuestionRegularIcon\";\nimport { WarningRegularIcon } from \"alouette-icons/phosphor-icons/WarningRegularIcon\";\nimport { type ReactNode, useId } from \"react\";\nimport type { GestureResponderEvent } from \"react-native\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { Button, type ButtonState } from \"../actions/Button\";\nimport { CollapsibleErrorMessage } from \"../actions/CollapsibleErrorMessage\";\nimport { usePressAsync } from \"../actions/usePressAsync\";\nimport type { SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\nimport { HStack, VStack } from \"../stacks/stacks\";\nimport { Modal, type ModalProps } from \"./Modal\";\n\nfunction noop(): void {\n  // Intentionally empty.\n}\n\ninterface AsyncActionProps {\n  /**\n   * Called when the user takes the action. Returning a promise puts the button\n   * in its loading state and locks the dialog until it settles — the cancel\n   * button is disabled and backdrop / Escape / Android back stop dismissing, so\n   * the action can't be cut short and a failure can't be scrolled away.\n   */\n  onConfirm: () => unknown;\n  /**\n   * Formats a rejection from {@link onConfirm} into the message shown in the\n   * footer. Without it a failure only flips the button to its failed state —\n   * the library can't provide a default without hardcoding an English string.\n   */\n  errorToMessage?: (error: unknown) => string;\n}\n\ninterface AlertDialogBaseProps extends Pick<ModalProps, \"size\" | \"testID\"> {\n  /** Whether the dialog is shown. */\n  visible: boolean;\n  /** Heading; also labels the dialog for assistive tech. */\n  title: string;\n  /** Body copy describing the situation or the consequence of confirming. */\n  children?: ReactNode;\n  /** Themes the icon and the primary button. Defaults to \"danger\". */\n  accent?: Accent;\n  /**\n   * Icon shown in the header, signalling the nature of the dialog. Prefer a\n   * usage component ({@link QuestionAlertDialog}, {@link WarningAlertDialog},\n   * {@link InfoAlertDialog}, {@link SuccessAlertDialog}) which supplies it.\n   */\n  icon: SVGIconElement;\n}\n\ninterface ConfirmAlertDialogProps\n  extends AlertDialogBaseProps, AsyncActionProps {\n  /**\n   * \"confirm\" (default) offers a cancel and a confirm action — for decisions,\n   * typically destructive ones.\n   */\n  variant?: \"confirm\";\n  /**\n   * Called when the user rejects the action — cancel button, backdrop, Escape,\n   * or the Android back button.\n   */\n  onCancel: () => void;\n  /** Confirm button label. Defaults to \"Confirm\". */\n  confirmText?: ReactNode;\n  /** Cancel button label. Defaults to \"Cancel\". */\n  cancelText?: ReactNode;\n  /** Disables the confirm button (e.g. while a form is invalid). */\n  confirmDisabled?: boolean;\n}\n\ninterface AcknowledgeAlertDialogProps extends AlertDialogBaseProps {\n  /**\n   * \"alert\" offers a single acknowledge action — for interruptions that only\n   * need to be read and dismissed.\n   */\n  variant: \"alert\";\n  /**\n   * Called when the user dismisses the dialog — acknowledge button, backdrop,\n   * Escape, or the Android back button.\n   */\n  onClose: () => void;\n  /** Acknowledge button label. Defaults to \"OK\". */\n  closeText?: ReactNode;\n}\n\ninterface RequiredAlertDialogProps\n  extends AlertDialogBaseProps, AsyncActionProps {\n  /**\n   * \"required\" offers a single action and cannot be dismissed by the backdrop,\n   * Escape, or the Android back button — the user must respond (e.g. accept\n   * updated terms, a forced sign-out).\n   */\n  variant: \"required\";\n  /** Action button label. Defaults to \"OK\". */\n  confirmText?: ReactNode;\n  /** Disables the action button (e.g. while a form is invalid). */\n  confirmDisabled?: boolean;\n}\n\nexport type AlertDialogProps =\n  | AcknowledgeAlertDialogProps\n  | ConfirmAlertDialogProps\n  | RequiredAlertDialogProps;\n\ninterface ResolvedVariant {\n  /** Footer buttons for the variant. */\n  footer: ReactNode;\n  /**\n   * Handler for the dialog's dismiss affordances (backdrop / Escape / Android\n   * back): the rejecting action for confirm/alert, a no-op for required.\n   */\n  onDismiss: () => void;\n}\n\ninterface ActionFooterProps {\n  /** The variant's buttons, in reading order. */\n  children: ReactNode;\n  errorToMessage: AsyncActionProps[\"errorToMessage\"];\n  error: Error | null;\n}\n\n// Modal lays the footer out as a right-aligned row; a single full-width child\n// turns it into a column so the failure message spans the dialog instead of\n// being squeezed to the width of the button that triggered it.\nfunction ActionFooter({\n  children,\n  errorToMessage,\n  error,\n}: ActionFooterProps): ReactNode {\n  const errorMessage =\n    errorToMessage === undefined ? null : (\n      // The dialog panel is already a raised surface, so the message is flat.\n      <CollapsibleErrorMessage\n        error={error}\n        errorToMessage={errorToMessage}\n        variant=\"flat\"\n      />\n    );\n  return (\n    <VStack className=\"w-full gap-sm\">\n      <HStack className=\"items-center justify-end gap-m\">{children}</HStack>\n      {errorMessage}\n    </VStack>\n  );\n}\n\ninterface ResolveVariantParams {\n  accent: Accent;\n  /** State of the confirm action, driven by `usePressAsync`. */\n  buttonState: ButtonState | undefined;\n  error: Error | null;\n  isPending: boolean;\n  handleConfirm: (event: GestureResponderEvent) => void;\n}\n\n// Resolves the variant-specific footer and dismiss handler outside the\n// component so its discriminated props can be narrowed by destructuring.\nfunction resolveVariant(\n  props: AlertDialogProps,\n  {\n    accent,\n    buttonState,\n    error,\n    isPending,\n    handleConfirm,\n  }: ResolveVariantParams,\n): ResolvedVariant {\n  switch (props.variant) {\n    case \"alert\": {\n      const { onClose, closeText } = props;\n      return {\n        onDismiss: onClose,\n        footer: (\n          <Button accent={accent} text={closeText ?? \"OK\"} onPress={onClose} />\n        ),\n      };\n    }\n    case \"required\": {\n      const { confirmText, confirmDisabled, errorToMessage } = props;\n      return {\n        // Non-dismissible: only the explicit action closes it.\n        onDismiss: noop,\n        footer: (\n          <ActionFooter error={error} errorToMessage={errorToMessage}>\n            <Button\n              accent={accent}\n              text={confirmText ?? \"OK\"}\n              state={buttonState}\n              disabled={confirmDisabled}\n              onPress={handleConfirm}\n            />\n          </ActionFooter>\n        ),\n      };\n    }\n    case \"confirm\":\n    case undefined:\n    default: {\n      const {\n        onCancel,\n        confirmText,\n        cancelText,\n        confirmDisabled,\n        errorToMessage,\n      } = props;\n      return {\n        onDismiss: isPending ? noop : onCancel,\n        footer: (\n          <ActionFooter error={error} errorToMessage={errorToMessage}>\n            <Button\n              variant=\"outlined\"\n              text={cancelText ?? \"Cancel\"}\n              disabled={isPending}\n              onPress={onCancel}\n            />\n            <Button\n              accent={accent}\n              text={confirmText ?? \"Confirm\"}\n              state={buttonState}\n              disabled={confirmDisabled}\n              onPress={handleConfirm}\n            />\n          </ActionFooter>\n        ),\n      };\n    }\n  }\n}\n\n// The alert variant has no confirm action; its single button closes the dialog\n// synchronously and never drives the async state.\nfunction resolveConfirmHandler(props: AlertDialogProps): () => unknown {\n  return props.variant === \"alert\" ? noop : props.onConfirm;\n}\n\nexport function AlertDialog(props: AlertDialogProps): ReactNode {\n  const {\n    visible,\n    title,\n    children,\n    accent = \"danger\",\n    icon,\n    size = \"md\",\n    testID,\n  } = props;\n  const descriptionId = useId();\n  const { buttonState, error, handlePress } = usePressAsync(\n    resolveConfirmHandler(props),\n  );\n  const isPending = buttonState === \"loading\";\n  const { footer, onDismiss } = resolveVariant(props, {\n    accent,\n    buttonState,\n    error,\n    isPending,\n    handleConfirm: handlePress,\n  });\n\n  return (\n    <Modal\n      hideCloseButton\n      visible={visible}\n      role=\"alertdialog\"\n      accent={accent}\n      size={size}\n      title={title}\n      icon={icon}\n      aria-describedby={children === undefined ? undefined : descriptionId}\n      testID={testID}\n      footer={footer}\n      onClose={onDismiss}\n    >\n      {children === undefined ? null : (\n        <Text nativeID={descriptionId} className=\"text-base text-muted\">\n          {children}\n        </Text>\n      )}\n    </Modal>\n  );\n}\n\n// Omit that distributes over the union so each variant keeps its own props.\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown\n  ? Omit<T, K>\n  : never;\n\n// Icon is fixed by the usage component; the accent stays the caller's choice.\nexport type AlertDialogUsageProps = DistributiveOmit<AlertDialogProps, \"icon\">;\n\nexport function QuestionAlertDialog(props: AlertDialogUsageProps): ReactNode {\n  return <AlertDialog {...props} icon={<QuestionRegularIcon />} />;\n}\n\nexport function WarningAlertDialog(props: AlertDialogUsageProps): ReactNode {\n  return <AlertDialog {...props} icon={<WarningRegularIcon />} />;\n}\n\nexport function InfoAlertDialog(props: AlertDialogUsageProps): ReactNode {\n  return <AlertDialog {...props} icon={<InfoRegularIcon />} />;\n}\n\nexport function SuccessAlertDialog(props: AlertDialogUsageProps): ReactNode {\n  return <AlertDialog {...props} icon={<CheckRegularIcon />} />;\n}\n","import { ArrowSquareOutRegularIcon } from \"alouette-icons/phosphor-icons/ArrowSquareOutRegularIcon\";\nimport type { ReactNode } from \"react\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { ExternalLink } from \"../../expo/ExternalLink\";\nimport {\n  type ExternalOpenLinkBehavior,\n  defaultExternalOpenLinkBehavior,\n} from \"../../expo/ExternalLink.shared\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { InteractiveBox, type InteractiveBoxProps } from \"../containers/Box\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\n\n// Native resolves the icon tint through useColorToken, which reads the base\n// `text-*` only, so the group-driven hover/active tint is web-only.\nconst externalLinkTextVariants = tv(\n  {\n    slots: {\n      frame:\n        \"group flex-row items-center gap-xxs self-start rounded-xs py-xxs focus-visible:outline-interactive-outlined-outline-focus\",\n      text: \"shrink font-body-bold underline transition-[color] duration-fast ease-in\",\n      icon: \"\",\n    },\n    variants: {\n      size: {\n        sm: { text: \"text-sm\" },\n        md: { text: \"text-base\" },\n      },\n      disabled: {\n        true: {\n          text: \"text-disabled-muted\",\n          icon: \"text-disabled-muted\",\n        },\n        false: {\n          text: \"text-interactive-pressable group-hover:text-interactive-hover group-active:text-interactive-active\",\n          icon: \"text-interactive-pressable group-hover:text-interactive-hover group-active:text-interactive-active\",\n        },\n      },\n    },\n    defaultVariants: { size: \"md\", disabled: false },\n  },\n  { twMerge: false },\n);\n\ntype ExternalLinkTextSizeProps = Pick<\n  VariantProps<typeof externalLinkTextVariants>,\n  \"size\"\n>;\n\nexport interface ExternalLinkTextProps\n  extends Omit<InteractiveBoxProps, \"children\">, ExternalLinkTextSizeProps {\n  href: string;\n  /** How the link opens. Defaults to an in-app browser sheet / a new tab. */\n  openLinkBehavior?: ExternalOpenLinkBehavior;\n  text: ReactNode;\n  /** Leading affordance icon. Defaults to the external-link arrow. */\n  icon?: SVGIconElement;\n  accent?: Accent;\n}\n\n/**\n * Inline text link to an external destination — the lightweight alternative to\n * `ExternalLinkButton` when the link is part of a text flow rather than a call\n * to action.\n */\nexport function ExternalLinkText({\n  href,\n  openLinkBehavior = defaultExternalOpenLinkBehavior,\n  text,\n  icon = <ArrowSquareOutRegularIcon />,\n  accent,\n  size = \"md\",\n  disabled,\n  className,\n  onPress,\n  ...pressableProps\n}: ExternalLinkTextProps): ReactNode {\n  const isDisabled = disabled === true;\n  const styles = externalLinkTextVariants({ size, disabled: isDisabled });\n\n  return (\n    <AccentScope accent={accent}>\n      <ExternalLink\n        withFocusVisibleOutline\n        as={InteractiveBox}\n        // A disabled Pressable never sees the press that would cancel the\n        // navigation, so the href has to go with it — ExternalLink drops a\n        // falsy one on both platforms.\n        href={isDisabled ? \"\" : href}\n        openLinkBehavior={openLinkBehavior}\n        role=\"link\"\n        aria-disabled={isDisabled}\n        disabled={disabled}\n        className={styles.frame({ className })}\n        onPress={onPress ?? undefined}\n        {...pressableProps}\n      >\n        <Icon\n          icon={icon}\n          size={size === \"sm\" ? 16 : 20}\n          className={styles.icon()}\n        />\n        <Text className={styles.text()}>{text}</Text>\n      </ExternalLink>\n    </AccentScope>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport type { GestureResponderEvent } from \"react-native\";\nimport type { MessageVariant } from \"../feedback/Message\";\nimport { VStack } from \"../stacks/stacks\";\nimport { Button, type ButtonProps } from \"./Button\";\nimport { CollapsibleErrorMessage } from \"./CollapsibleErrorMessage\";\nimport { usePressAsync } from \"./usePressAsync\";\n\nexport interface ActionButtonProps extends Omit<\n  ButtonProps,\n  \"onPress\" | \"state\"\n> {\n  onPress: (event: GestureResponderEvent) => unknown;\n  errorToMessage: (error: unknown) => string;\n  /**\n   * Elevation of the failure message. Defaults to the raised \"surface\"; pass\n   * \"flat\" when the button already sits inside a raised surface.\n   */\n  errorMessageVariant?: MessageVariant;\n}\n\nexport function ActionButton({\n  onPress,\n  errorToMessage,\n  errorMessageVariant,\n  ...buttonProps\n}: ActionButtonProps): ReactNode {\n  const { buttonState, error, handlePress } = usePressAsync(onPress);\n\n  return (\n    <VStack className=\"shrink\">\n      <Button {...buttonProps} state={buttonState} onPress={handlePress} />\n      <CollapsibleErrorMessage\n        error={error}\n        errorToMessage={errorToMessage}\n        variant={errorMessageVariant}\n      />\n    </VStack>\n  );\n}\n","import { forwardRef } from \"react\";\nimport {\n  Platform,\n  TextInput as RNTextInput,\n  type TextInputProps as RNTextInputProps,\n} from \"react-native\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport { useColorVariable } from \"../../core/useColorToken\";\n\nconst inputVariants = tv(\n  {\n    base: [\n      \"bg-highlight text-base text-sharp\",\n      \"border\",\n      \"transition-[border-color,background-color,outline-color] duration-fast ease-in\",\n      \"outline-interactive-outlined-pressable\", // to have proper outline color transition\n      process.env.EXPO_PUBLIC_STORYBOOK_ENABLED\n        ? \"\"\n        : \"border-interactive-outlined-pressable\",\n      \"hover:border-interactive-outlined-hover\",\n      \"focus:border-interactive-outlined-focus\",\n      \"focus:outline-1 focus:outline-interactive-outlined-focus focus:outline-offset-0\",\n      \"active:border-interactive-outlined-active\",\n      \"disabled:bg-disabled-interactive-muted disabled:border-interactive-outlined-disabled disabled:text-form-disabled-text disabled:cursor-not-allowed\",\n      \"placeholder:text-form-placeholder\",\n    ].join(\" \"),\n    variants: {\n      multiline: {\n        false: \"rounded-md px-m py-xs\",\n        true: \"min-h-[80px] resize-y rounded-xs px-xs py-xs\",\n      },\n      forceStyle: {\n        undefined: process.env.EXPO_PUBLIC_STORYBOOK_ENABLED\n          ? \"border-interactive-outlined-pressable\"\n          : \"\",\n        hover: process.env.EXPO_PUBLIC_STORYBOOK_ENABLED\n          ? \"border-interactive-outlined-hover\"\n          : \"\",\n        focus: process.env.EXPO_PUBLIC_STORYBOOK_ENABLED\n          ? \"border-interactive-outlined-focus outline-1 outline-interactive-outlined-focus outline-offset-0\"\n          : \"\",\n        press: process.env.EXPO_PUBLIC_STORYBOOK_ENABLED\n          ? \"border-interactive-outlined-active\"\n          : \"\",\n      },\n    },\n    defaultVariants: {\n      forceStyle: \"undefined\",\n    },\n  },\n  { twMerge: false },\n);\n\ntype InputVariantProps = VariantProps<typeof inputVariants>;\n\nconst MODE_PROPS = {\n  password: {\n    secureTextEntry: true,\n    autoComplete: \"current-password\",\n  },\n  number: {\n    inputMode: \"numeric\",\n    keyboardType: \"numeric\",\n  },\n  tel: {\n    inputMode: \"tel\",\n    autoComplete: \"tel\",\n    keyboardType: \"phone-pad\",\n  },\n  email: {\n    inputMode: \"email\",\n    autoComplete: \"email\",\n    keyboardType: \"email-address\",\n  },\n  url: {\n    inputMode: \"url\",\n    keyboardType: \"url\",\n  },\n  search: {\n    inputMode: \"search\",\n  },\n  webSearch: {\n    inputMode: \"search\",\n    keyboardType: \"web-search\",\n  },\n} as const satisfies Record<string, Partial<RNTextInputProps>>;\n\nexport type InputTextMode = keyof typeof MODE_PROPS;\n\nexport interface InputTextProps\n  extends Omit<RNTextInputProps, \"editable\">, InputVariantProps {\n  className?: string;\n  disabled?: boolean;\n  mode?: InputTextMode;\n}\n\nexport const InputText = forwardRef<RNTextInput, InputTextProps>(\n  ({ className, disabled, mode, multiline, forceStyle, ...props }, ref) => {\n    const placeholderColor =\n      Platform.OS === \"web\"\n        ? undefined\n        : // eslint-disable-next-line react-hooks/rules-of-hooks -- native only, web is set via css.\n          useColorVariable(\"--color-form-placeholder\");\n    const modeProps = mode ? MODE_PROPS[mode] : undefined;\n    return (\n      <RNTextInput\n        ref={ref}\n        editable={!disabled}\n        disabled={disabled}\n        aria-disabled={disabled === true}\n        multiline={multiline === true}\n        placeholderTextColor={placeholderColor}\n        className={inputVariants({ multiline, forceStyle, className })}\n        {...modeProps}\n        {...props}\n      />\n    );\n  },\n);\n","import { forwardRef } from \"react\";\nimport type { TextInput as RNTextInput } from \"react-native\";\nimport { InputText, type InputTextProps } from \"./InputText\";\n\nexport type TextAreaProps = Omit<InputTextProps, \"multiline\">;\n\nexport const TextArea = forwardRef<RNTextInput, TextAreaProps>((props, ref) => {\n  return <InputText ref={ref} multiline {...props} />;\n});\n","import { type ReactNode, useCallback, useState } from \"react\";\nimport { Switch as RNSwitch } from \"react-native\";\nimport { useColorVariable } from \"../../core/useColorToken\";\nimport { AccentScope, type AccentScopeProps } from \"../containers/AccentScope\";\n\nexport interface SwitchProps {\n  accent?: AccentScopeProps[\"accent\"];\n  checked?: boolean;\n  disabled?: boolean;\n  onValueChange?: (value: boolean) => void;\n  \"aria-labelledby\"?: string;\n  testID?: string;\n}\n\nfunction useControllableChecked(\n  controlled: boolean | undefined,\n  onValueChange?: (value: boolean) => void,\n): readonly [boolean, (next: boolean) => void] {\n  const [internal, setInternal] = useState(controlled ?? false);\n  const value = controlled ?? internal;\n  const onChange = useCallback(\n    (next: boolean) => {\n      if (controlled === undefined) {\n        setInternal(next);\n      }\n      if (next !== value) {\n        onValueChange?.(next);\n      }\n    },\n    [controlled, onValueChange, value],\n  );\n  return [value, onChange] as const;\n}\n\nfunction SwitchInner({\n  checked,\n  disabled,\n  onValueChange,\n  ...props\n}: SwitchProps): ReactNode {\n  const [value, setValue] = useControllableChecked(checked, onValueChange);\n  const trackBg = useColorVariable(\"--color-lowered\");\n  const thumb = useColorVariable(\"--color-highlight\");\n  const disabledTrackBg = useColorVariable(\n    \"--color-disabled-interactive-muted\",\n  );\n  const disabledThumb = useColorVariable(\"--color-disabled-muted\");\n  const track = disabled ? disabledTrackBg : trackBg;\n  const thumbColor = disabled ? disabledThumb : thumb;\n  return (\n    <RNSwitch\n      value={value}\n      disabled={disabled}\n      ios_backgroundColor={track}\n      trackColor={{ false: track, true: track }}\n      thumbColor={thumbColor}\n      onValueChange={setValue}\n      {...props}\n    />\n  );\n}\n\nexport function Switch({ accent, ...rest }: SwitchProps): ReactNode {\n  return (\n    <AccentScope accent={accent}>\n      <SwitchInner {...rest} />\n    </AccentScope>\n  );\n}\n","import { useCallback, useState } from \"react\";\n\nexport interface UseControllableValueParams {\n  value: string | undefined;\n  defaultValue: string | undefined;\n  onValueChange?: (value: string) => void;\n}\n\nexport function useControllableValue({\n  value: controlledValue,\n  defaultValue,\n  onValueChange,\n}: UseControllableValueParams): readonly [\n  string | undefined,\n  (next: string) => void,\n] {\n  const [internalValue, setInternalValue] = useState(defaultValue);\n  const value = controlledValue ?? internalValue;\n  const setValue = useCallback(\n    (next: string) => {\n      if (controlledValue === undefined) {\n        setInternalValue(next);\n      }\n      if (next !== value) {\n        onValueChange?.(next);\n      }\n    },\n    [controlledValue, onValueChange, value],\n  );\n  return [value, setValue] as const;\n}\n","import { CaretDownRegularIcon } from \"alouette-icons/phosphor-icons/CaretDownRegularIcon\";\nimport type { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { Icon } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\n\nexport interface SelectOption {\n  label: string;\n  value: string;\n  disabled?: boolean;\n}\n\nexport interface SelectProps {\n  options: SelectOption[];\n  /** Controlled selected value. */\n  value?: string;\n  /** Initial value for uncontrolled usage. */\n  defaultValue?: string;\n  onValueChange?: (value: string) => void;\n  placeholder?: string;\n  disabled?: boolean;\n  accent?: Accent;\n  \"aria-label\"?: string;\n  \"aria-labelledby\"?: string;\n  testID?: string;\n}\n\n// Shared outlined-input look for the trigger, matching InputText. Focus styling\n// and the background are platform-specific (the background lives in each\n// platform's enabled/disabled variant so the disabled bg never competes with\n// bg-highlight at equal specificity), so they are applied by each platform file.\nexport const selectTriggerBaseClassName = [\n  \"flex-row items-center justify-between gap-xs\",\n  \"rounded-md border px-m py-xs min-h-[44px]\",\n  \"transition-[border-color,outline-color,background-color] duration-fast ease-in\",\n].join(\" \");\n\nconst triggerLabelVariants = tv({\n  base: \"flex-1 text-base\",\n  variants: {\n    // Mirrors InputText: sharp value, form-placeholder, form-disabled-text.\n    state: {\n      value: \"text-sharp\",\n      placeholder: \"text-form-placeholder\",\n      disabled: \"text-form-disabled-text\",\n    },\n  },\n  defaultVariants: { state: \"value\" },\n});\n\nexport interface SelectTriggerContentProps {\n  label?: string;\n  placeholder?: string;\n  disabled?: boolean;\n}\n\nexport function SelectTriggerContent({\n  label,\n  placeholder,\n  disabled,\n}: SelectTriggerContentProps): ReactNode {\n  const state = ((): \"disabled\" | \"placeholder\" | \"value\" => {\n    // Placeholder keeps its own color even when disabled (mirrors InputText,\n    // whose placeholderTextColor is independent of the disabled text color);\n    // only an actual value switches to the darker disabled text color.\n    if (label === undefined) return \"placeholder\";\n    if (disabled) return \"disabled\";\n    return \"value\";\n  })();\n  return (\n    <>\n      <Text numberOfLines={1} className={triggerLabelVariants({ state })}>\n        {label ?? placeholder ?? \"\"}\n      </Text>\n      <Icon\n        icon={<CaretDownRegularIcon />}\n        size={18}\n        className={disabled ? \"text-form-disabled-text\" : \"text-muted\"}\n      />\n    </>\n  );\n}\n","import { CheckRegularIcon } from \"alouette-icons/phosphor-icons/CheckRegularIcon\";\nimport { type ReactNode, useState } from \"react\";\nimport { Modal, Pressable, useWindowDimensions } from \"react-native\";\nimport { tv } from \"tailwind-variants\";\nimport { useControllableValue } from \"../../core/useControllableValue\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { InteractiveBox } from \"../containers/Box\";\nimport { Surface } from \"../containers/Surface\";\nimport { Icon } from \"../primitives/Icon\";\nimport { ScrollView } from \"../primitives/ScrollView\";\nimport { Text } from \"../primitives/Text\";\nimport {\n  type SelectOption,\n  type SelectProps,\n  SelectTriggerContent,\n  selectTriggerBaseClassName,\n} from \"./Select.shared\";\n\nconst triggerVariants = tv(\n  {\n    base: selectTriggerBaseClassName,\n    variants: {\n      // bg lives in each branch (not the shared base) so the disabled bg never\n      // competes with bg-highlight at equal specificity.\n      disabled: {\n        true: \"bg-disabled-interactive-muted border-interactive-outlined-disabled\",\n        false: [\n          \"bg-highlight\",\n          \"border-interactive-outlined-pressable\",\n          \"hover:border-interactive-outlined-hover\",\n          \"focus:border-interactive-outlined-focus\",\n          \"active:border-interactive-outlined-active\",\n        ].join(\" \"),\n      },\n    },\n    defaultVariants: { disabled: false },\n  },\n  { twMerge: false },\n);\n\nconst optionVariants = tv(\n  {\n    base: [\n      \"flex-row items-center justify-between gap-xxs rounded-xs px-m py-m my-xxs\",\n      \"hover:bg-interactive-contained-hover focus:bg-interactive-contained-focus active:bg-interactive-contained-active\",\n    ].join(\" \"),\n    variants: {\n      selected: {\n        true: \"bg-interactive-contained-active\",\n        false: \"bg-interactive-contained-pressable\",\n      },\n      disabled: {\n        true: \"opacity-50\",\n        false: \"\",\n      },\n    },\n    defaultVariants: { selected: false, disabled: false },\n  },\n  { twMerge: false },\n);\n\ninterface SelectOptionRowProps {\n  option: SelectOption;\n  selected: boolean;\n  onSelect: (value: string) => void;\n}\n\nfunction SelectOptionRow({\n  option,\n  selected,\n  onSelect,\n}: SelectOptionRowProps): ReactNode {\n  return (\n    <Pressable\n      role=\"option\"\n      aria-selected={selected}\n      aria-disabled={option.disabled === true}\n      disabled={option.disabled}\n      className={optionVariants({ selected, disabled: option.disabled })}\n      onPress={() => {\n        onSelect(option.value);\n      }}\n    >\n      <Text numberOfLines={1} className=\"flex-1 text-base text-on-accent\">\n        {option.label}\n      </Text>\n      {selected ? (\n        <Icon\n          icon={<CheckRegularIcon />}\n          size={18}\n          className=\"text-on-accent\"\n        />\n      ) : null}\n    </Pressable>\n  );\n}\n\nfunction SelectInner({\n  options,\n  value,\n  defaultValue,\n  onValueChange,\n  placeholder,\n  disabled,\n  testID,\n  \"aria-label\": ariaLabel,\n  \"aria-labelledby\": ariaLabelledby,\n}: Omit<SelectProps, \"accent\">): ReactNode {\n  const [current, setValue] = useControllableValue({\n    value,\n    defaultValue,\n    onValueChange,\n  });\n  const [open, setOpen] = useState(false);\n  const { height: windowHeight } = useWindowDimensions();\n  const selected = options.find((option) => option.value === current);\n\n  const onSelect = (next: string) => {\n    setValue(next);\n    setOpen(false);\n  };\n\n  return (\n    <>\n      <InteractiveBox\n        withFocusVisibleOutline\n        role=\"combobox\"\n        aria-expanded={open}\n        aria-disabled={disabled === true}\n        disabled={disabled}\n        testID={testID}\n        aria-label={ariaLabel}\n        aria-labelledby={ariaLabelledby}\n        className={triggerVariants({ disabled })}\n        onPress={() => {\n          setOpen(true);\n        }}\n      >\n        <SelectTriggerContent\n          label={selected?.label}\n          placeholder={placeholder}\n          disabled={disabled}\n        />\n      </InteractiveBox>\n      <Modal\n        transparent\n        visible={open}\n        animationType=\"fade\"\n        onRequestClose={() => {\n          setOpen(false);\n        }}\n      >\n        <Pressable\n          className=\"flex-1 justify-center bg-translucent px-xl\"\n          onPress={() => {\n            setOpen(false);\n          }}\n        >\n          {/* Captures presses so tapping the list does not dismiss the modal. */}\n          <Pressable className=\"w-full\" aria-label={ariaLabel}>\n            <Surface variant=\"highlight\" shadow=\"l\" size=\"sm\" className=\"py-xs\">\n              {/* Pixel maxHeight (not a %) so the ScrollView sizes to its\n                  content and only scrolls once it exceeds ~70% of the screen. */}\n              <ScrollView\n                style={{ maxHeight: windowHeight * 0.7 }}\n                showsVerticalScrollIndicator={false}\n              >\n                {options.map((option) => (\n                  <SelectOptionRow\n                    key={option.value}\n                    option={option}\n                    selected={option.value === current}\n                    onSelect={onSelect}\n                  />\n                ))}\n              </ScrollView>\n            </Surface>\n          </Pressable>\n        </Pressable>\n      </Modal>\n    </>\n  );\n}\n\nexport function Select({ accent, ...rest }: SelectProps): ReactNode {\n  return (\n    <AccentScope accent={accent}>\n      <SelectInner {...rest} />\n    </AccentScope>\n  );\n}\n","import type { Provider, ReactNode } from \"react\";\nimport { createContext, useContext, useMemo } from \"react\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { useControllableValue } from \"../../core/useControllableValue\";\n\nexport interface SelectionContextValue {\n  value: string | undefined;\n  onSelect: (value: string) => void;\n  disabled?: boolean;\n}\n\nexport interface SelectionGroupProps {\n  /** Controlled selected value. */\n  value?: string;\n  /** Initial value for uncontrolled usage. */\n  defaultValue?: string;\n  onValueChange?: (value: string) => void;\n  accent?: Accent;\n  disabled?: boolean;\n  \"aria-labelledby\"?: string;\n  children: ReactNode;\n}\n\ninterface SelectionContext {\n  SelectionContextProvider: Provider<SelectionContextValue | undefined>;\n  useSelection: () => SelectionContextValue;\n}\n\n/** One context per group family, so a misplaced child gets a precise error. */\nexport function createSelectionContext(\n  missingProviderMessage: string,\n): SelectionContext {\n  const Context = createContext<SelectionContextValue | undefined>(undefined);\n  return {\n    SelectionContextProvider: Context.Provider,\n    useSelection: () => {\n      const context = useContext(Context);\n      if (!context) {\n        throw new Error(missingProviderMessage);\n      }\n      return context;\n    },\n  };\n}\n\nexport type SelectionValueProps = Pick<\n  SelectionGroupProps,\n  \"defaultValue\" | \"disabled\" | \"onValueChange\" | \"value\"\n>;\n\nexport function useSelectionValue({\n  value: controlledValue,\n  defaultValue,\n  onValueChange,\n  disabled,\n}: SelectionValueProps): SelectionContextValue {\n  const [value, onSelect] = useControllableValue({\n    value: controlledValue,\n    defaultValue,\n    onValueChange,\n  });\n  return useMemo(\n    () => ({ value, onSelect, disabled }),\n    [value, onSelect, disabled],\n  );\n}\n","import { createSelectionContext } from \"../selection/SelectionContext\";\n\nexport const {\n  SelectionContextProvider: RadioContextProvider,\n  useSelection: useRadioContext,\n} = createSelectionContext(\n  \"Radio, RadioButton and RadioCard must be rendered inside a RadioGroup, RadioButtonGroup or RadioCardGroup.\",\n);\n","import type { ReactNode } from \"react\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { View } from \"../primitives/View\";\nimport {\n  type SelectionGroupProps,\n  useSelectionValue,\n} from \"../selection/SelectionContext\";\nimport { RadioContextProvider } from \"./RadioContext\";\n\nexport type RadioGroupProps = SelectionGroupProps;\n\nexport function RadioGroup({\n  value,\n  defaultValue,\n  onValueChange,\n  accent,\n  disabled,\n  children,\n  ...props\n}: RadioGroupProps): ReactNode {\n  const context = useSelectionValue({\n    value,\n    defaultValue,\n    onValueChange,\n    disabled,\n  });\n\n  return (\n    <AccentScope accent={accent}>\n      <RadioContextProvider value={context}>\n        <View role=\"radiogroup\" {...props}>\n          {children}\n        </View>\n      </RadioContextProvider>\n    </AccentScope>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { useCurrentMode, useCurrentTheme } from \"../../core/ThemeContext\";\nimport { ScopedTheme } from \"./ScopedTheme\";\n\nexport interface DefaultAccentScopeProps {\n  children?: ReactNode;\n}\n\n/**\n * Falls back to the brand accent when the subtree sits in a plain light/dark\n * theme, so an accent-driven element (a radio dot, a selected card) is tinted\n * instead of grayscale. An accent already applied by an ancestor wins.\n */\nexport function DefaultAccentScope({\n  children,\n}: DefaultAccentScopeProps): ReactNode {\n  const currentTheme = useCurrentTheme();\n  const currentMode = useCurrentMode();\n  return (\n    <ScopedTheme\n      theme={\n        currentTheme === currentMode ? `${currentTheme}_brand` : currentTheme\n      }\n    >\n      {children}\n    </ScopedTheme>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { DefaultAccentScope } from \"../containers/DefaultAccentScope\";\nimport { View } from \"../primitives/View\";\n\nconst radioIndicatorVariants = tv({\n  slots: {\n    ring: \"size-[22px] rounded-full border-2 items-center justify-center transition-[border-color] duration-fast ease-in\",\n    dot: \"size-[10px] rounded-full bg-accent transition-transform duration-fast ease-in\",\n  },\n  variants: {\n    selected: {\n      true: { ring: \"border-accent\", dot: \"scale-100\" },\n      false: {\n        ring: \"border-interactive-outlined-pressable group-hover:border-interactive-outlined-hover group-active:border-interactive-outlined-active\",\n        dot: \"scale-0\",\n      },\n    },\n    onAccent: {\n      true: { ring: \"border-on-accent\", dot: \"bg-on-accent\" },\n      false: {},\n    },\n    disabled: {\n      true: {\n        ring: \"border-interactive-outlined-disabled\",\n        dot: \"bg-disabled-muted\",\n      },\n      false: {},\n    },\n  },\n  // On the disabled contained fill, `interactive-outlined-disabled` is the same\n  // color as the background — the ring needs the foreground disabled token the\n  // label next to it already uses.\n  compoundVariants: [\n    {\n      disabled: true,\n      onAccent: true,\n      class: { ring: \"border-disabled-sharp\", dot: \"bg-disabled-sharp\" },\n    },\n  ],\n});\n\nexport interface RadioIndicatorProps {\n  selected: boolean;\n  disabled?: boolean;\n  /** Set on a filled surface (accent, or the disabled fill), where the accent\n   * dot and the outlined tokens have no contrast. */\n  onAccent?: boolean;\n}\n\n/**\n * Circle-dot indicator shared by Radio and RadioCard. Its hover/active colors\n * are driven by the `group` on the pressable row that contains it.\n */\nexport function RadioIndicator({\n  selected,\n  disabled,\n  onAccent,\n}: RadioIndicatorProps): ReactNode {\n  const styles = radioIndicatorVariants({ selected, disabled, onAccent });\n  return (\n    <DefaultAccentScope>\n      <View className={styles.ring()}>\n        <View className={styles.dot()} />\n      </View>\n    </DefaultAccentScope>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { InteractiveBox } from \"../containers/Box\";\nimport { Text } from \"../primitives/Text\";\nimport { RadioIndicator } from \"../selection/RadioIndicator\";\nimport { useRadioContext } from \"./RadioContext\";\n\nconst labelVariants = tv({\n  base: \"text-base\",\n  variants: {\n    disabled: {\n      true: \"text-disabled-sharp\",\n      false: \"text-sharp\",\n    },\n  },\n});\n\nexport interface RadioProps {\n  value: string;\n  label: string;\n  disabled?: boolean;\n}\n\nexport function Radio({ value, label, disabled }: RadioProps): ReactNode {\n  const {\n    value: selectedValue,\n    onSelect,\n    disabled: groupDisabled,\n  } = useRadioContext();\n  const selected = selectedValue === value;\n  const isDisabled = disabled === true || groupDisabled === true;\n\n  return (\n    <InteractiveBox\n      withFocusVisibleOutline\n      role=\"radio\"\n      aria-checked={selected}\n      aria-disabled={isDisabled}\n      aria-label={label}\n      disabled={isDisabled}\n      className=\"group flex-row items-center gap-xs self-start rounded-xs px-xs min-h-11 focus-visible:outline-interactive-outlined-outline-focus\"\n      onPress={() => {\n        onSelect(value);\n      }}\n    >\n      <RadioIndicator selected={selected} disabled={isDisabled} />\n      <Text className={labelVariants({ disabled: isDisabled })}>{label}</Text>\n    </InteractiveBox>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { Surface, type SurfaceProps } from \"../containers/Surface\";\n\nexport interface SegmentedBarProps extends Omit<\n  SurfaceProps,\n  \"role\" | \"shadow\" | \"size\" | \"variant\"\n> {\n  role: \"navigation\" | \"radiogroup\" | \"tablist\";\n}\n\n/**\n * Lowered track shared by every segmented group (RadioButtonGroup, NavBar, Tabs).\n * It is a 44px Surface with no vertical padding, so each item pressable fills the\n * full height (a 44px tap target) while rendering a shorter visible chip inside it.\n */\nexport function SegmentedBar({\n  className,\n  ...props\n}: SegmentedBarProps): ReactNode {\n  return (\n    <Surface\n      variant=\"lowered\"\n      size=\"sm\"\n      className={`flex-row items-stretch self-start gap-xxs px-xs py-0 min-h-[44px] ${className ?? \"\"}`}\n      {...props}\n    />\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { SegmentedBar } from \"../selection/SegmentedBar\";\nimport {\n  type SelectionGroupProps,\n  useSelectionValue,\n} from \"../selection/SelectionContext\";\nimport { RadioContextProvider } from \"./RadioContext\";\n\nexport type RadioButtonGroupProps = SelectionGroupProps;\n\nexport function RadioButtonGroup({\n  value,\n  defaultValue,\n  onValueChange,\n  accent,\n  disabled,\n  children,\n  ...props\n}: RadioButtonGroupProps): ReactNode {\n  const context = useSelectionValue({\n    value,\n    defaultValue,\n    onValueChange,\n    disabled,\n  });\n\n  return (\n    <RadioContextProvider value={context}>\n      <SegmentedBar role=\"radiogroup\" accent={accent} {...props}>\n        {children}\n      </SegmentedBar>\n    </RadioContextProvider>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { InteractiveBox, type InteractiveBoxProps } from \"../containers/Box\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\nimport { View } from \"../primitives/View\";\n\n// The selected chip is a raised layer that cross-fades on opacity so the\n// background and shadow animate together with no border. Swapping a bordered\n// variant instead would flash a border on the outgoing segment mid-transition.\nconst chipVariants = tv({\n  base: \"absolute inset-0 rounded-xs transition-opacity duration-fast ease-in\",\n  variants: {\n    selected: {\n      true: \"opacity-100\",\n      false: \"opacity-0\",\n    },\n    disabled: {\n      true: \"bg-interactive-contained-disabled\",\n      false: \"bg-interactive-contained-pressable shadow-s\",\n    },\n  },\n});\n\n// The visible chip is shorter than the 44px pressable, so the lowered\n// SegmentedBar shows around it as an inset frame while the tap target stays\n// 44px. Its border is permanently transparent and only animates color on the\n// row's hover/active, driven by the `group` on the pressable.\nconst segmentVariants = tv({\n  base: \"relative flex-row flex-center gap-xxs min-h-[32px] rounded-xs border border-transparent px-m transition-[border-color] duration-fast ease-in\",\n  variants: {\n    selected: { true: \"\", false: \"\" },\n    disabled: { true: \"\", false: \"\" },\n  },\n  compoundVariants: [\n    {\n      selected: false,\n      disabled: false,\n      class:\n        \"group-hover:border-interactive-outlined-hover group-active:border-interactive-outlined-active\",\n    },\n  ],\n});\n\n// Label and icon share one color set. Native resolves the icon tint through\n// useColorToken, which reads the base `text-*` only, so the hover tint and the\n// stacking above the chip are web-only.\nconst foregroundVariants = tv({\n  base: \"z-1 transition-[color] duration-fast ease-in\",\n  variants: {\n    selected: {\n      true: \"text-on-accent\",\n      false: \"text-muted group-hover:text-sharp\",\n    },\n    disabled: {\n      true: \"text-disabled-muted group-hover:text-disabled-muted\",\n      false: \"\",\n    },\n  },\n  compoundVariants: [\n    {\n      selected: true,\n      disabled: true,\n      class: \"text-disabled-sharp group-hover:text-disabled-sharp\",\n    },\n  ],\n});\n\nconst labelVariants = tv({\n  extend: foregroundVariants,\n  base: \"select-none font-body-bold text-base text-center\",\n});\n\nexport interface SegmentedItemProps extends Omit<\n  InteractiveBoxProps,\n  \"aria-label\" | \"children\" | \"className\" | \"withFocusVisibleOutline\"\n> {\n  label: string;\n  icon?: SVGIconElement;\n  selected: boolean;\n  /**\n   * react-native's types have no `aria-current` / `aria-controls` / `href`, but\n   * react-native-web forwards all three (an `href` makes it render an `<a>`) and\n   * native ignores unknown props — declared here for `NavBarItem` and `Tab`.\n   */\n  \"aria-current\"?: \"page\";\n  \"aria-controls\"?: string;\n  href?: string;\n}\n\nexport function SegmentedItem({\n  label,\n  icon,\n  selected,\n  disabled,\n  ...props\n}: SegmentedItemProps): ReactNode {\n  const isDisabled = disabled === true;\n\n  return (\n    <InteractiveBox\n      withFocusVisibleOutline\n      aria-label={label}\n      disabled={disabled}\n      className=\"group flex-center min-h-[44px] rounded-xs focus-visible:outline-interactive-outlined-outline-focus\"\n      {...props}\n    >\n      <View className={segmentVariants({ selected, disabled: isDisabled })}>\n        <View className={chipVariants({ selected, disabled: isDisabled })} />\n        {icon ? (\n          <Icon\n            icon={icon}\n            size={20}\n            className={foregroundVariants({ selected, disabled: isDisabled })}\n          />\n        ) : null}\n        <Text\n          numberOfLines={1}\n          className={labelVariants({ selected, disabled: isDisabled })}\n        >\n          {label}\n        </Text>\n      </View>\n    </InteractiveBox>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { SegmentedItem } from \"../selection/SegmentedItem\";\nimport { useRadioContext } from \"./RadioContext\";\n\nexport interface RadioButtonProps {\n  value: string;\n  label: string;\n  disabled?: boolean;\n}\n\nexport function RadioButton({\n  value,\n  label,\n  disabled,\n}: RadioButtonProps): ReactNode {\n  const {\n    value: selectedValue,\n    onSelect,\n    disabled: groupDisabled,\n  } = useRadioContext();\n  const selected = selectedValue === value;\n  const isDisabled = disabled === true || groupDisabled === true;\n\n  return (\n    <SegmentedItem\n      role=\"radio\"\n      aria-checked={selected}\n      aria-disabled={isDisabled}\n      label={label}\n      selected={selected}\n      disabled={isDisabled}\n      onPress={() => {\n        onSelect(value);\n      }}\n    />\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { createContext, useContext } from \"react\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { View } from \"../primitives/View\";\nimport {\n  type SelectionGroupProps,\n  useSelectionValue,\n} from \"../selection/SelectionContext\";\nimport { RadioContextProvider } from \"./RadioContext\";\n\nconst radioCardGroupVariants = tv({\n  base: \"gap-xs\",\n  variants: {\n    variant: {\n      list: \"flex-col\",\n      stack: \"flex-row flex-wrap\",\n    },\n  },\n  defaultVariants: { variant: \"list\" },\n});\n\ntype RadioCardGroupVariantProps = VariantProps<typeof radioCardGroupVariants>;\n\nexport type RadioCardGroupVariant = NonNullable<\n  RadioCardGroupVariantProps[\"variant\"]\n>;\n\nconst RadioCardGroupVariantContext =\n  createContext<RadioCardGroupVariant>(\"list\");\n\n/** Lets a card size itself for the row it flows in. */\nexport function useRadioCardGroupVariant(): RadioCardGroupVariant {\n  return useContext(RadioCardGroupVariantContext);\n}\n\nexport interface RadioCardGroupProps\n  extends SelectionGroupProps, RadioCardGroupVariantProps {}\n\nexport function RadioCardGroup({\n  value,\n  defaultValue,\n  onValueChange,\n  accent,\n  disabled,\n  variant,\n  children,\n  ...props\n}: RadioCardGroupProps): ReactNode {\n  const context = useSelectionValue({\n    value,\n    defaultValue,\n    onValueChange,\n    disabled,\n  });\n\n  return (\n    <AccentScope accent={accent}>\n      <RadioContextProvider value={context}>\n        <RadioCardGroupVariantContext value={variant ?? \"list\"}>\n          <View\n            role=\"radiogroup\"\n            className={radioCardGroupVariants({ variant })}\n            {...props}\n          >\n            {children}\n          </View>\n        </RadioCardGroupVariantContext>\n      </RadioContextProvider>\n    </AccentScope>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { PressableBox } from \"../actions/PressableBox\";\nimport { DefaultAccentScope } from \"../containers/DefaultAccentScope\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\nimport { RadioIndicator } from \"../selection/RadioIndicator\";\nimport { VStack } from \"../stacks/stacks\";\nimport { useRadioCardGroupVariant } from \"./RadioCardGroup\";\nimport { useRadioContext } from \"./RadioContext\";\n\n// The selected card is PressableBox's `contained` fill (raised, accent) and the\n// unselected one its `outlined` surface, so every rest/hover/focus/press color\n// comes from the shared interactive tokens — only the foreground follows.\nconst radioCardVariants = tv(\n  {\n    slots: {\n      frame: \"flex-row gap-m rounded-sm p-m min-h-[44px]\",\n      icon: \"\",\n      label: \"font-body-bold text-base\",\n      description: \"text-sm\",\n    },\n    variants: {\n      // In a wrapping group the cards share each row instead of sizing to text,\n      // and the icon and the indicator hold the card's top corners.\n      layout: {\n        list: { frame: \"items-center\" },\n        stack: { frame: \"items-start grow shrink basis-[240px]\" },\n      },\n      selected: {\n        true: {\n          icon: \"text-on-accent\",\n          label: \"text-on-accent\",\n          description: \"text-on-accent-muted\",\n        },\n        false: {\n          icon: \"text-muted\",\n          label: \"text-sharp\",\n          description: \"text-muted\",\n        },\n      },\n      disabled: {\n        true: {\n          icon: \"text-disabled-muted\",\n          label: \"text-disabled-sharp\",\n          description: \"text-disabled-muted\",\n        },\n        false: {},\n      },\n    },\n  },\n  { twMerge: false },\n);\n\nexport interface RadioCardProps {\n  value: string;\n  label: string;\n  description?: string;\n  icon?: SVGIconElement;\n  disabled?: boolean;\n}\n\nexport function RadioCard({\n  value,\n  label,\n  description,\n  icon,\n  disabled,\n}: RadioCardProps): ReactNode {\n  const {\n    value: selectedValue,\n    onSelect,\n    disabled: groupDisabled,\n  } = useRadioContext();\n  const layout = useRadioCardGroupVariant();\n  const selected = selectedValue === value;\n  const isDisabled = disabled === true || groupDisabled === true;\n  const styles = radioCardVariants({ layout, selected, disabled: isDisabled });\n\n  return (\n    <DefaultAccentScope>\n      <PressableBox\n        variant={selected ? \"contained\" : \"outlined\"}\n        role=\"radio\"\n        aria-checked={selected}\n        aria-disabled={isDisabled}\n        aria-label={label}\n        disabled={isDisabled}\n        className={styles.frame()}\n        onPress={() => {\n          onSelect(value);\n        }}\n      >\n        {icon ? <Icon icon={icon} size={24} className={styles.icon()} /> : null}\n        <VStack className=\"flex-1 gap-xxs\">\n          <Text className={styles.label()}>{label}</Text>\n          {description ? (\n            <Text className={styles.description()}>{description}</Text>\n          ) : null}\n        </VStack>\n        <RadioIndicator\n          selected={selected}\n          disabled={isDisabled}\n          onAccent={selected}\n        />\n      </PressableBox>\n    </DefaultAccentScope>\n  );\n}\n","import { createSelectionContext } from \"../selection/SelectionContext\";\n\nexport const {\n  SelectionContextProvider: NavBarContextProvider,\n  useSelection: useNavBarContext,\n} = createSelectionContext(\"NavBarItem must be rendered inside a NavBar.\");\n","import type { ReactNode } from \"react\";\nimport { SegmentedBar } from \"../selection/SegmentedBar\";\nimport {\n  type SelectionGroupProps,\n  useSelectionValue,\n} from \"../selection/SelectionContext\";\nimport { NavBarContextProvider } from \"./NavBarContext\";\n\nexport interface NavBarProps extends SelectionGroupProps {\n  \"aria-label\"?: string;\n}\n\n/**\n * Segmented navigation between destinations. `value` is the current\n * destination — it matches an item's `href`, and is usually owned by the app's\n * router, so pass it controlled.\n */\nexport function NavBar({\n  value,\n  defaultValue,\n  onValueChange,\n  accent,\n  disabled,\n  children,\n  ...props\n}: NavBarProps): ReactNode {\n  const context = useSelectionValue({\n    value,\n    defaultValue,\n    onValueChange,\n    disabled,\n  });\n\n  return (\n    <NavBarContextProvider value={context}>\n      <SegmentedBar role=\"navigation\" accent={accent} {...props}>\n        {children}\n      </SegmentedBar>\n    </NavBarContextProvider>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport type { GestureResponderEvent } from \"react-native\";\nimport type { SVGIconElement } from \"../primitives/Icon\";\nimport {\n  SegmentedItem,\n  type SegmentedItemProps,\n} from \"../selection/SegmentedItem\";\nimport { useNavBarContext } from \"./NavBarContext\";\n\nexport interface NavBarItemProps {\n  /**\n   * Destination, matched against the NavBar's value to mark the item current.\n   * Renders a real `<a href>` on web (native ignores it); expo Router's\n   * `<Link asChild>` injects it, so it does not have to be written twice.\n   */\n  href?: string;\n  label: string;\n  icon?: SVGIconElement;\n  disabled?: boolean;\n  /**\n   * Handles the press instead of the group's `onValueChange` — this is what\n   * `<Link asChild>` injects. A NavBar whose items carry `onPress` must be\n   * controlled: its internal value never updates. A handler that navigates on\n   * web must call `event.preventDefault()`, as routers do.\n   */\n  onPress?: SegmentedItemProps[\"onPress\"];\n}\n\nexport function NavBarItem({\n  href,\n  label,\n  icon,\n  disabled,\n  onPress,\n}: NavBarItemProps): ReactNode {\n  const {\n    value: currentValue,\n    onSelect,\n    disabled: navBarDisabled,\n  } = useNavBarContext();\n  const selected = href !== undefined && currentValue === href;\n  const isDisabled = disabled === true || navBarDisabled === true;\n\n  // Routing is the app's job, through the group's onValueChange or an item\n  // onPress, so the anchor must not navigate on its own.\n  const selectHref =\n    href === undefined\n      ? undefined\n      : (event: GestureResponderEvent) => {\n          event.preventDefault();\n          onSelect(href);\n        };\n\n  return (\n    <SegmentedItem\n      role=\"link\"\n      // A disabled Pressable never sees the press, so dropping the href is the\n      // only thing that stops the browser from following the link anyway.\n      href={isDisabled ? undefined : href}\n      aria-current={selected ? \"page\" : undefined}\n      aria-disabled={isDisabled}\n      label={label}\n      icon={icon}\n      selected={selected}\n      disabled={isDisabled}\n      onPress={onPress ?? selectHref}\n    />\n  );\n}\n","import { createSelectionContext } from \"../selection/SelectionContext\";\n\nexport const {\n  SelectionContextProvider: TabsContextProvider,\n  useSelection: useTabsContext,\n} = createSelectionContext(\"Tab must be rendered inside Tabs.\");\n","import type { ReactNode } from \"react\";\nimport { SegmentedBar } from \"../selection/SegmentedBar\";\nimport {\n  type SelectionGroupProps,\n  useSelectionValue,\n} from \"../selection/SelectionContext\";\nimport { TabsContextProvider } from \"./TabsContext\";\n\nexport interface TabsProps extends SelectionGroupProps {\n  \"aria-label\"?: string;\n}\n\n/** Segmented switch between views rendered on the same screen. */\nexport function Tabs({\n  value,\n  defaultValue,\n  onValueChange,\n  accent,\n  disabled,\n  children,\n  ...props\n}: TabsProps): ReactNode {\n  const context = useSelectionValue({\n    value,\n    defaultValue,\n    onValueChange,\n    disabled,\n  });\n\n  return (\n    <TabsContextProvider value={context}>\n      <SegmentedBar role=\"tablist\" accent={accent} {...props}>\n        {children}\n      </SegmentedBar>\n    </TabsContextProvider>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport type { SVGIconElement } from \"../primitives/Icon\";\nimport {\n  SegmentedItem,\n  type SegmentedItemProps,\n} from \"../selection/SegmentedItem\";\nimport { useTabsContext } from \"./TabsContext\";\n\nexport interface TabProps {\n  value: string;\n  label: string;\n  icon?: SVGIconElement;\n  disabled?: boolean;\n  \"aria-controls\"?: string;\n  id?: string;\n  /**\n   * Runs instead of the group's `onValueChange`. Tabs whose items carry\n   * `onPress` must be controlled: the internal value never updates.\n   */\n  onPress?: SegmentedItemProps[\"onPress\"];\n}\n\nexport function Tab({\n  value,\n  label,\n  icon,\n  disabled,\n  onPress,\n  ...props\n}: TabProps): ReactNode {\n  const {\n    value: currentValue,\n    onSelect,\n    disabled: tabsDisabled,\n  } = useTabsContext();\n  const selected = currentValue === value;\n  const isDisabled = disabled === true || tabsDisabled === true;\n\n  return (\n    <SegmentedItem\n      role=\"tab\"\n      aria-selected={selected}\n      aria-disabled={isDisabled}\n      label={label}\n      icon={icon}\n      selected={selected}\n      disabled={isDisabled}\n      onPress={\n        onPress ??\n        (() => {\n          onSelect(value);\n        })\n      }\n      {...props}\n    />\n  );\n}\n","import { AsteriskSimpleRegularIcon } from \"alouette-icons/phosphor-icons/AsteriskSimpleRegularIcon\";\nimport { WarningRegularIcon } from \"alouette-icons/phosphor-icons/WarningRegularIcon\";\nimport { type ReactNode, useId } from \"react\";\nimport { Pressable } from \"react-native\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { Icon } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\nimport { View } from \"../primitives/View\";\nimport { HStack, VStack } from \"../stacks/stacks\";\n\nexport interface FormItemProps {\n  label: string;\n  /** Muted helper text shown between the label and the input. */\n  details?: ReactNode;\n  error?: ReactNode;\n  /**\n   * True when `error` is caused by the field being left empty, as opposed\n   * to some other validation failure. An empty required field just needs\n   * its star recolored — a second warning icon would be a redundant cue.\n   */\n  isRequiredError?: boolean;\n  /** true shows the default marker; any other ReactNode replaces it. */\n  required?: ReactNode;\n  /**\n   * Wraps the rendered content in a left border + padding to visually nest it\n   * inside a group. The label stays at full width above the rail.\n   */\n  indented?: boolean;\n  /** Called when the label is pressed, so it can focus the input. */\n  onLabelPress?: () => void;\n  render: (labelId: string) => ReactNode;\n}\n\n/**\n * Label, error message and layout for a single form field. Form-library\n * agnostic — pass the input as a render prop so it can wire\n * aria-labelledby to the generated labelId, and onLabelPress so the label\n * can focus it, matching a native <label for> click.\n */\nexport function FormItem({\n  label,\n  details,\n  error,\n  isRequiredError,\n  required,\n  indented,\n  onLabelPress,\n  render,\n}: FormItemProps): ReactNode {\n  const labelId = useId();\n  const hasError = Boolean(error);\n  const showWarningIcon = hasError && !isRequiredError;\n\n  // The trailing marker is always the last element after the label text, so\n  // the text never shifts position when error/required state changes. The\n  // required star is never removed on error — it's only recolored, with the\n  // warning icon added alongside it for non-required-emptiness errors.\n  const marker = ((): ReactNode => {\n    if (required === true) {\n      return (\n        <HStack className=\"gap-xxs items-center\">\n          <Icon\n            icon={<AsteriskSimpleRegularIcon />}\n            size={12}\n            className=\"text-accent\"\n          />\n          {showWarningIcon ? (\n            <Icon\n              icon={<WarningRegularIcon />}\n              size={16}\n              className=\"text-accent\"\n            />\n          ) : null}\n        </HStack>\n      );\n    }\n    if (required) {\n      return required;\n    }\n    if (showWarningIcon) {\n      return (\n        <Icon icon={<WarningRegularIcon />} size={16} className=\"text-accent\" />\n      );\n    }\n    return null;\n  })();\n\n  return (\n    <VStack className=\"gap-xxs\">\n      <Pressable onPress={onLabelPress}>\n        <VStack>\n          <HStack className=\"gap-xxs items-center\">\n            <Text\n              nativeID={labelId}\n              accent={hasError ? \"danger\" : undefined}\n              className={`font-body-bold text-md ${hasError ? \"text-accent\" : \"\"}`}\n            >\n              {label}\n            </Text>\n            {marker ? (\n              <View aria-hidden>\n                {hasError ? (\n                  <AccentScope accent=\"danger\">{marker}</AccentScope>\n                ) : (\n                  marker\n                )}\n              </View>\n            ) : null}\n          </HStack>\n          {details ? (\n            <Text className=\"text-muted text-sm\">{details}</Text>\n          ) : null}\n        </VStack>\n      </Pressable>\n      {indented ? (\n        <View className=\"border-l border-border-muted pl-m\">\n          {render(labelId)}\n        </View>\n      ) : (\n        render(labelId)\n      )}\n      {error ? (\n        <View className=\"px-m\">\n          <Text role=\"alert\" accent=\"danger\" className=\"text-accent text-sm\">\n            {error}\n          </Text>\n        </View>\n      ) : null}\n    </VStack>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport {\n  type DefaultValues,\n  type FieldValues,\n  FormProvider,\n  type SubmitHandler,\n  type UseFormProps,\n  useForm,\n} from \"react-hook-form\";\n\nexport class FormValidationError extends Error {\n  constructor() {\n    super(\"Form validation failed.\");\n    this.name = \"FormValidationError\";\n  }\n}\n\nexport interface FormProps<TFieldValues extends FieldValues> {\n  defaultValues: DefaultValues<TFieldValues>;\n  mode?: UseFormProps<TFieldValues>[\"mode\"];\n  onSubmit: SubmitHandler<TFieldValues>;\n  onSubmitError?: (error: unknown) => void;\n  render: (params: { submit: () => Promise<void> }) => ReactNode;\n}\n\n/**\n * Owns the react-hook-form instance and exposes it through context, so\n * FormField never needs a `control` prop. submit() rejects with\n * FormValidationError when fields are invalid (nothing was submitted), so\n * FormSubmitButton can tell that apart from a genuine onSubmit failure.\n * Without `onSubmitError`, an exception thrown from `onSubmit` is left to\n * propagate as a genuine unhandled rejection rather than being silently\n * logged — FormSubmitButton (built on ActionButton) consumes it instead to\n * drive its own loading/success/failed state.\n */\nexport function Form<TFieldValues extends FieldValues>({\n  defaultValues,\n  mode = \"onTouched\",\n  onSubmit,\n  onSubmitError,\n  render,\n}: FormProps<TFieldValues>): ReactNode {\n  const form = useForm<TFieldValues>({ mode, defaultValues });\n\n  function submit(): Promise<void> {\n    // react-hook-form only broadcasts the updated field errors to\n    // Controller subscribers in a final internal step *after* the onInvalid\n    // callback resolves — throwing from inside onInvalid pre-empts that\n    // broadcast, so field-level errors would never reach FormField/FormItem.\n    // Record invalidity instead, and throw only once handleSubmit is done.\n    let valid = true;\n    const result = form\n      .handleSubmit(onSubmit, () => {\n        valid = false;\n      })()\n      .then(() => {\n        if (!valid) throw new FormValidationError();\n      });\n    if (onSubmitError) result.catch(onSubmitError);\n    return result;\n  }\n\n  return <FormProvider {...form}>{render({ submit })}</FormProvider>;\n}\n","import type { ReactNode } from \"react\";\nimport {\n  Controller,\n  type ControllerRenderProps,\n  type FieldError,\n  type FieldPath,\n  type FieldValues,\n  type RegisterOptions,\n  useFormContext,\n} from \"react-hook-form\";\nimport { FormItem } from \"./FormItem\";\n\nexport interface FormFieldProps<TFieldValues extends FieldValues> {\n  name: FieldPath<TFieldValues>;\n  label: string;\n  /**\n   * Marks the field required and shows FormItem's marker. Pass true for no\n   * message, or any other ReactNode to use as the required-field error —\n   * unless renderError overrides it — once the field is left empty.\n   * react-hook-form's own FieldError.message is always a plain string, so\n   * this is the only way to get a richer, i18n'd required message without\n   * reaching for renderError.\n   */\n  required?: ReactNode;\n  validate?: RegisterOptions<TFieldValues>[\"validate\"];\n  renderError?: (error: FieldError | undefined) => ReactNode;\n  render: (params: {\n    field: ControllerRenderProps<TFieldValues>;\n    labelId: string;\n  }) => ReactNode;\n}\n\n/**\n * Wires a react-hook-form Controller to FormItem's label/error/layout.\n * Must be used inside <Form>, which provides the control via context.\n * Renders any input via `render` — not tied to a specific input component.\n * The rendered input must attach `field.ref` for pressing the label to\n * focus it, via react-hook-form's own setFocus.\n */\nexport function FormField<TFieldValues extends FieldValues>({\n  name,\n  label,\n  required,\n  validate,\n  renderError,\n  render,\n}: FormFieldProps<TFieldValues>): ReactNode {\n  const { control, setFocus } = useFormContext<TFieldValues>();\n\n  return (\n    <Controller\n      control={control}\n      name={name}\n      rules={{ required: Boolean(required), validate }}\n      render={({ field, fieldState }) => {\n        const requiredError =\n          fieldState.error?.type === \"required\" && required !== true\n            ? required\n            : undefined;\n        return (\n          <FormItem\n            label={label}\n            required={Boolean(required)}\n            isRequiredError={fieldState.error?.type === \"required\"}\n            error={\n              renderError\n                ? renderError(fieldState.error)\n                : (requiredError ?? fieldState.error?.message)\n            }\n            render={(labelId) => render({ field, labelId })}\n            onLabelPress={() => {\n              setFocus(name);\n            }}\n          />\n        );\n      }}\n    />\n  );\n}\n","import { PlusRegularIcon } from \"alouette-icons/phosphor-icons/PlusRegularIcon\";\nimport { TrashRegularIcon } from \"alouette-icons/phosphor-icons/TrashRegularIcon\";\nimport { type ReactNode, useEffect, useRef, useState } from \"react\";\nimport {\n  type ArrayPath,\n  type FieldArray,\n  type FieldPath,\n  type FieldValues,\n  useFieldArray,\n  useFormContext,\n} from \"react-hook-form\";\nimport { Button } from \"../actions/Button\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { StableAccentScope } from \"../containers/StableAccentScope\";\nimport { View } from \"../primitives/View\";\nimport { HStack, VStack } from \"../stacks/stacks\";\nimport { FormItem } from \"./FormItem\";\n\nexport interface FormFieldArrayProps<TFieldValues extends FieldValues> {\n  name: ArrayPath<TFieldValues>;\n  label: string;\n  /** Muted helper text shown under the label (e.g. a minimum-count hint). */\n  details?: ReactNode;\n  /** Value appended when a new item is added. */\n  emptyValue: FieldArray<TFieldValues, ArrayPath<TFieldValues>>;\n  /**\n   * Minimum number of items. The array is padded to this length on mount and\n   * the leading `minSize` items cannot be removed.\n   */\n  minSize?: number;\n  /** aria-label for the add button. */\n  addLabel?: string;\n  /** Disables the add button, e.g. while the last item is still empty. */\n  disableAdd?: boolean;\n  /** aria-label for each remove button, given the item's own label. */\n  removeLabel?: (itemLabel: string) => string;\n  render: (params: {\n    /** Path prefix for this item, e.g. \"guests.0\". Build sub-paths as `${name}.value`. */\n    name: FieldPath<TFieldValues>;\n    index: number;\n    /** Per-item base accessible name (`${label} ${index + 1}`), e.g. \"Guests 1\". */\n    label: string;\n  }) => ReactNode;\n}\n\ninterface FormFieldArrayItemProps<TFieldValues extends FieldValues> {\n  name: FieldPath<TFieldValues>;\n  itemLabel: string;\n  removeLabel: string;\n  index: number;\n  removable: boolean;\n  onRemove: () => void;\n  render: FormFieldArrayProps<TFieldValues>[\"render\"];\n}\n\nfunction FormFieldArrayItem<TFieldValues extends FieldValues>({\n  name,\n  itemLabel,\n  removeLabel,\n  index,\n  removable,\n  onRemove,\n  render,\n}: FormFieldArrayItemProps<TFieldValues>): ReactNode {\n  // Hovering the remove button tints the whole row with the danger accent, as\n  // an affordance that pressing it will drop the item. StableAccentScope keeps\n  // the scope mounted across the toggle so the inputs don't remount.\n  const [pendingRemoval, setPendingRemoval] = useState(false);\n\n  return (\n    <StableAccentScope accent={pendingRemoval ? \"danger\" : undefined}>\n      <HStack className=\"gap-sm items-center p-xxs\">\n        <View className=\"grow shrink basis-0\">\n          {render({ name, index, label: itemLabel })}\n        </View>\n        {removable ? (\n          <IconButton\n            variant=\"ghost\"\n            icon={<TrashRegularIcon />}\n            aria-label={removeLabel}\n            onHoverIn={() => {\n              setPendingRemoval(true);\n            }}\n            onHoverOut={() => {\n              setPendingRemoval(false);\n            }}\n            onPress={onRemove}\n          />\n        ) : null}\n      </HStack>\n    </StableAccentScope>\n  );\n}\n\n/**\n * A repeatable list of object fields backed by react-hook-form's useFieldArray.\n * Must be used inside <Form>. FormFieldArray owns only the array label and the\n * add/remove buttons — it is agnostic about what an item contains, including\n * any per-item framing (a caller can wrap multi-field items in a Surface). Each item's inputs (their values, labels and error\n * messages) are the caller's job: `render` receives the item's path prefix\n * (e.g. \"guests.0\") and composes its own FormField(s), bound to `name` for a\n * raw value or `${name}.value` / `${name}.firstName` for an object item.\n */\nexport function FormFieldArray<TFieldValues extends FieldValues>({\n  name,\n  label,\n  details,\n  emptyValue,\n  minSize = 0,\n  addLabel = \"Add item\",\n  disableAdd,\n  removeLabel = (itemLabel) => `Remove ${itemLabel}`,\n  render,\n}: FormFieldArrayProps<TFieldValues>): ReactNode {\n  const { control } = useFormContext<TFieldValues>();\n  const { fields, append, remove } = useFieldArray<TFieldValues>({\n    control,\n    name,\n  });\n\n  // Pad up to the minimum once on mount, appending the whole shortfall in a\n  // single call. The ref keeps StrictMode's double-invoked effect from\n  // appending twice.\n  const paddedRef = useRef(false);\n  useEffect(() => {\n    if (paddedRef.current) return;\n    paddedRef.current = true;\n    const shortfall = minSize - fields.length;\n    if (shortfall > 0) {\n      append(\n        Array.from({ length: shortfall }, () => emptyValue),\n        { shouldFocus: false },\n      );\n    }\n  }, [append, emptyValue, fields.length, minSize]);\n\n  return (\n    <FormItem\n      label={label}\n      details={details}\n      render={() => (\n        <VStack className=\"gap-xs\">\n          {fields.map((field, index) => (\n            <FormFieldArrayItem<TFieldValues>\n              key={field.id}\n              name={`${name}.${index}` as FieldPath<TFieldValues>}\n              itemLabel={`${label} ${index + 1}`}\n              removeLabel={removeLabel(`${label} ${index + 1}`)}\n              index={index}\n              removable={index >= minSize}\n              render={render}\n              onRemove={() => {\n                remove(index);\n              }}\n            />\n          ))}\n          <Button\n            size=\"sm\"\n            variant=\"outlined\"\n            icon={<PlusRegularIcon />}\n            text={addLabel}\n            className=\"self-start\"\n            disabled={disableAdd}\n            onPress={() => {\n              append(emptyValue);\n            }}\n          />\n        </VStack>\n      )}\n    />\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { ActionButton } from \"../actions/ActionButton\";\n\nexport interface FormSubmitButtonProps {\n  label: string;\n  onPress: () => Promise<void>;\n  /**\n   * Maps a submit failure to displayed text. Required rather than\n   * defaulted, since a library-provided default could only ever be a\n   * hardcoded English string — not translatable. Check\n   * `error instanceof FormValidationError` to render a \"fix the errors\n   * above\" case distinctly from a genuine onSubmit failure.\n   */\n  errorToMessage: (error: unknown) => string;\n}\n\n/**\n * Submit button for a <Form>. Built on ActionButton, so submission gets the\n * same loading/success/failed lifecycle and inline error message as any\n * other async action in the app, rather than a plain boolean isSubmitting.\n */\nexport function FormSubmitButton({\n  label,\n  onPress,\n  errorToMessage,\n}: FormSubmitButtonProps): ReactNode {\n  return (\n    <ActionButton\n      text={label}\n      errorToMessage={errorToMessage}\n      onPress={onPress}\n    />\n  );\n}\n","import type { ReactNode } from \"react\";\nimport type { FieldValues } from \"react-hook-form\";\nimport { VStack } from \"../stacks/stacks\";\nimport { Form, type FormProps } from \"./Form\";\nimport { FormSubmitButton } from \"./FormSubmitButton\";\n\nexport interface SimpleVFormProps<\n  TFieldValues extends FieldValues,\n> extends Omit<FormProps<TFieldValues>, \"render\"> {\n  submitLabel: string;\n  /** Forwarded to FormSubmitButton — see its errorToMessage doc. */\n  submitErrorToMessage: (error: unknown) => string;\n  className?: string;\n  render: (params: { submit: () => Promise<void> }) => ReactNode;\n}\n\n/**\n * Standardizes the common case: a Form laid out as a vertical stack with\n * a trailing FormSubmitButton.\n */\nexport function SimpleVForm<TFieldValues extends FieldValues>({\n  submitLabel,\n  submitErrorToMessage,\n  className,\n  render,\n  ...formProps\n}: SimpleVFormProps<TFieldValues>): ReactNode {\n  return (\n    <Form\n      {...formProps}\n      render={({ submit }) => (\n        <VStack className={className ?? \"gap-l\"}>\n          {render({ submit })}\n          <FormSubmitButton\n            label={submitLabel}\n            errorToMessage={submitErrorToMessage}\n            onPress={submit}\n          />\n        </VStack>\n      )}\n    />\n  );\n}\n","import { PencilSimpleRegularIcon } from \"alouette-icons/phosphor-icons/PencilSimpleRegularIcon\";\nimport type { ReactNode } from \"react\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { IconButton } from \"../actions/IconButton\";\nimport type { PressableBoxProps } from \"../actions/PressableBox\";\nimport type { SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\nimport { HStack, VStack } from \"../stacks/stacks\";\n\nexport interface EditableItemProps {\n  label: string;\n  /** Current value shown next to the label — a Badge, a Text, anything short. */\n  summary?: ReactNode;\n  /** Muted helper text under the label. */\n  details?: ReactNode;\n  /** Names the edit button for assistive tech — it has no visible text. */\n  editAriaLabel: string;\n  editIcon?: SVGIconElement;\n  variant?: PressableBoxProps[\"variant\"];\n  accent?: Accent;\n  disabled?: boolean;\n  onEdit: () => void;\n  /** Rendered under the row, when the value is too large for `summary`. */\n  children?: ReactNode;\n}\n\n/**\n * A labelled value with an edit affordance. Owns no editor: pair it with\n * FormEditableItem for a react-hook-form modal, or compose your own Modal\n * from `onEdit`.\n */\nexport function EditableItem({\n  label,\n  summary,\n  details,\n  editAriaLabel,\n  editIcon = <PencilSimpleRegularIcon />,\n  variant,\n  accent,\n  disabled,\n  onEdit,\n  children,\n}: EditableItemProps): ReactNode {\n  return (\n    <VStack className=\"gap-xs\">\n      <HStack className=\"items-center justify-between gap-sm\">\n        <VStack className=\"shrink\">\n          <HStack className=\"items-center gap-sm\">\n            <Text className=\"font-body-bold text-md\">{label}</Text>\n            {summary}\n          </HStack>\n          {details ? (\n            <Text className=\"text-muted text-sm\">{details}</Text>\n          ) : null}\n        </VStack>\n        <IconButton\n          size=\"sm\"\n          icon={editIcon}\n          variant={variant}\n          accent={accent}\n          disabled={disabled}\n          aria-label={editAriaLabel}\n          onPress={onEdit}\n        />\n      </HStack>\n      {children}\n    </VStack>\n  );\n}\n","import { type ReactNode, useState } from \"react\";\nimport type { FieldValues } from \"react-hook-form\";\nimport { Button } from \"../actions/Button\";\nimport { Modal, type ModalProps } from \"../containers/Modal\";\nimport { EditableItem, type EditableItemProps } from \"../data/EditableItem\";\nimport { Form, type FormProps } from \"./Form\";\nimport { FormSubmitButton } from \"./FormSubmitButton\";\n\nexport interface FormEditableItemProps<TFieldValues extends FieldValues>\n  extends\n    Pick<\n      EditableItemProps,\n      | \"accent\"\n      | \"details\"\n      | \"disabled\"\n      | \"editAriaLabel\"\n      | \"editIcon\"\n      | \"label\"\n      | \"summary\"\n      | \"variant\"\n    >,\n    Omit<FormProps<TFieldValues>, \"onSubmitError\" | \"render\"> {\n  /** Heading of the editor modal. Defaults to `label`. */\n  title?: string;\n  size?: ModalProps[\"size\"];\n  closeButtonAriaLabel?: string;\n  cancelLabel: string;\n  submitLabel: string;\n  /** Forwarded to FormSubmitButton — see its errorToMessage doc. */\n  submitErrorToMessage: (error: unknown) => string;\n  /** The fields, rendered as the modal body. */\n  children: ReactNode;\n}\n\n/**\n * An EditableItem whose editor is a modal owning its own Form. The Form is\n * mounted only while editing, so it reseeds from `defaultValues` on every\n * open and cancelling is a plain unmount — the surrounding screen's state is\n * never touched by an abandoned edit, and nothing has to be snapshotted and\n * restored.\n */\nexport function FormEditableItem<TFieldValues extends FieldValues>({\n  label,\n  summary,\n  details,\n  editAriaLabel,\n  editIcon,\n  variant,\n  accent,\n  disabled,\n  title,\n  size,\n  closeButtonAriaLabel,\n  cancelLabel,\n  submitLabel,\n  submitErrorToMessage,\n  defaultValues,\n  mode,\n  onSubmit,\n  children,\n}: FormEditableItemProps<TFieldValues>): ReactNode {\n  const [editing, setEditing] = useState(false);\n\n  function close(): void {\n    setEditing(false);\n  }\n\n  // Closing only once onSubmit resolves keeps the modal open on failure, where\n  // FormSubmitButton shows the error. It cuts the button's success state short,\n  // but the modal disappearing is the confirmation.\n  const handleSubmit: FormProps<TFieldValues>[\"onSubmit\"] = async (\n    values,\n    event,\n  ) => {\n    await onSubmit(values, event);\n    setEditing(false);\n  };\n\n  return (\n    <EditableItem\n      label={label}\n      summary={summary}\n      details={details}\n      editAriaLabel={editAriaLabel}\n      editIcon={editIcon}\n      variant={variant}\n      accent={accent}\n      disabled={disabled}\n      onEdit={() => {\n        setEditing(true);\n      }}\n    >\n      {editing ? (\n        <Form\n          defaultValues={defaultValues}\n          mode={mode}\n          render={({ submit }) => (\n            <Modal\n              visible\n              title={title ?? label}\n              accent={accent}\n              size={size}\n              closeButtonAriaLabel={closeButtonAriaLabel}\n              footer={\n                <>\n                  <Button\n                    variant=\"outlined\"\n                    text={cancelLabel}\n                    onPress={close}\n                  />\n                  <FormSubmitButton\n                    label={submitLabel}\n                    errorToMessage={submitErrorToMessage}\n                    onPress={submit}\n                  />\n                </>\n              }\n              onClose={close}\n            >\n              {children}\n            </Modal>\n          )}\n          onSubmit={handleSubmit}\n        />\n      ) : null}\n    </EditableItem>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { type VariantProps, tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { Box } from \"../containers/Box\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\n\nconst badgeVariants = tv(\n  {\n    slots: {\n      frame: \"flex-row items-center self-start rounded-full\",\n      text: \"font-body-bold\",\n      icon: \"\",\n    },\n    variants: {\n      size: {\n        sm: { frame: \"gap-xxs px-xs py-xxs\", text: \"text-xs\", icon: \"\" },\n        md: { frame: \"gap-xs px-sm py-xxs\", text: \"text-sm\", icon: \"\" },\n      },\n      variant: {\n        solid: {\n          frame: \"bg-highlight-accent\",\n          text: \"text-sharp\",\n          icon: \"text-sharp\",\n        },\n        \"solid.enabled\": {\n          frame: \"bg-enabled\",\n          text: \"text-on-accent\",\n          icon: \"text-on-accent\",\n        },\n        outlined: {\n          frame: \"border border-accent\",\n          text: \"text-accent\",\n          icon: \"text-accent\",\n        },\n      },\n    },\n    defaultVariants: { size: \"md\", variant: \"solid\" },\n  },\n  { twMerge: false },\n);\n\ntype BadgeVariantProps = VariantProps<typeof badgeVariants>;\ntype BadgeSize = NonNullable<BadgeVariantProps[\"size\"]>;\n\nconst ICON_SIZE: Record<BadgeSize, number> = { sm: 12, md: 16 };\n\nexport interface BadgeProps {\n  accent?: Accent;\n  size?: BadgeSize;\n  variant?: NonNullable<BadgeVariantProps[\"variant\"]>;\n  icon?: SVGIconElement;\n  children?: ReactNode;\n}\n\nexport function Badge({\n  accent = \"brand\",\n  size = \"md\",\n  variant = \"solid\",\n  icon,\n  children,\n}: BadgeProps): ReactNode {\n  const styles = badgeVariants({ size, variant });\n  return (\n    <AccentScope accent={accent}>\n      <Box className={styles.frame()}>\n        {icon ? (\n          <Icon icon={icon} size={ICON_SIZE[size]} className={styles.icon()} />\n        ) : null}\n        <Text className={styles.text()}>{children}</Text>\n      </Box>\n    </AccentScope>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { Icon, type SVGIconElement } from \"../primitives/Icon\";\nimport { Text } from \"../primitives/Text\";\nimport { HStack } from \"../stacks/stacks\";\n\nexport interface BulletProps {\n  /** Leading icon, tinted with the current accent. */\n  icon: SVGIconElement;\n  children?: ReactNode;\n}\n\nexport function Bullet({ icon, children }: BulletProps): ReactNode {\n  return (\n    <HStack className=\"gap-sm items-start\">\n      <Icon icon={icon} className=\"text-accent\" />\n      <Text className=\"shrink\">{children}</Text>\n    </HStack>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { useEffect, useState } from \"react\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { Text } from \"../primitives/Text\";\nimport { View } from \"../primitives/View\";\n\nexport type ConnectionStateStatus = \"connected\" | \"connecting\" | \"disconnected\";\n\n// How long the green \"connected\" pill stays fully visible before sliding out.\nconst connectedHoldMs = 1200;\n\nexport interface ConnectionStateProps {\n  /** Current connection status, or `null` when unknown (renders nothing). */\n  state: ConnectionStateStatus | null;\n  /** Force the banner off-screen regardless of `state`. */\n  forceHidden?: boolean;\n  /** Keep the banner on-screen even when `connected` (for demos/showcases). */\n  forceVisible?: boolean;\n  /** Label shown in the pill (e.g. \"Reconnecting…\"). */\n  children: NonNullable<ReactNode>;\n}\n\n/**\n * Thin status banner pinned to the top of the screen. It stays hidden while\n * connected and slides down to surface a red pill when connecting or\n * disconnected. On reconnection it turns green and holds for `connectedHoldMs`\n * so the confirmation is legible, then slides back out.\n */\nexport function ConnectionState({\n  state,\n  forceHidden,\n  forceVisible,\n  children,\n}: ConnectionStateProps): ReactNode {\n  const connected = state === \"connected\";\n\n  // While `connected`, keep the pill visible for a pause, then slide it out.\n  const [hideAfterHold, setHideAfterHold] = useState(false);\n  useEffect(() => {\n    if (!connected || forceVisible) {\n      setHideAfterHold(false);\n      return undefined;\n    }\n    const timer = setTimeout(() => {\n      setHideAfterHold(true);\n    }, connectedHoldMs);\n    return () => {\n      clearTimeout(timer);\n    };\n  }, [connected, forceVisible]);\n\n  const hidden =\n    forceHidden || (!forceVisible && (!state || (connected && hideAfterHold)));\n  const accent: Accent = connected ? \"success\" : \"danger\";\n\n  return (\n    <AccentScope accent={accent}>\n      <View\n        className={`absolute inset-x-0 top-0 z-9 h-0.5 bg-interactive-contained-pressable shadow-m transition-transform duration-slide ease-in-out ${hidden ? \"-translate-y-6\" : \"translate-y-0\"}`}\n      >\n        {state ? (\n          <Text className=\"absolute left-1/2 top-0.5 h-5.5 w-50 -translate-x-1/2 rounded-b-sm bg-interactive-contained-pressable text-center leading-5.5 text-on-accent transition-colors duration-fast\">\n            {children}\n          </Text>\n        ) : null}\n      </View>\n    </AccentScope>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { View } from \"../primitives/View\";\nimport { useSimulatedProgress } from \"./useSimulatedProgress\";\n\nexport type LinearProgressSize = \"lg\" | \"md\" | \"sm\" | \"xs\";\n\nconst track = tv({\n  base: \"absolute inset-x-0 top-0 z-10 overflow-hidden transition-opacity duration-fade\",\n  variants: {\n    size: {\n      xs: \"h-0.5\",\n      sm: \"h-1\",\n      md: \"h-1.5\",\n      lg: \"h-2\",\n    },\n    hidden: {\n      true: \"opacity-0\",\n      false: \"opacity-100\",\n    },\n  },\n  defaultVariants: { size: \"md\", hidden: false },\n});\n\nexport interface LinearProgressProps {\n  /** Known completion percentage, 0-100. For an unknown percentage (e.g.\n   * reconnecting, page transitions), use `IndeterminateLinearProgress` instead. */\n  progress: number;\n  hidden?: boolean;\n  accent?: Accent;\n  size?: LinearProgressSize;\n}\n\nexport function LinearProgress({\n  progress,\n  hidden = false,\n  accent = \"brand\",\n  size = \"md\",\n}: LinearProgressProps): ReactNode {\n  return (\n    <AccentScope accent={accent}>\n      <View pointerEvents=\"none\" className={track({ size, hidden })}>\n        <View\n          className=\"h-full bg-accent transition-[width] duration-progress ease-out\"\n          style={{ width: `${progress}%` }}\n        />\n      </View>\n    </AccentScope>\n  );\n}\n\nexport interface IndeterminateLinearProgressProps {\n  /** Whether an operation is in progress. The bar creeps toward 100% while\n   * `true`, then completes and fades out once `false`. */\n  loading: boolean;\n  accent?: Accent;\n  size?: LinearProgressSize;\n}\n\nexport function IndeterminateLinearProgress({\n  loading,\n  accent,\n  size,\n}: IndeterminateLinearProgressProps): ReactNode {\n  const { progress, hidden } = useSimulatedProgress(loading);\n\n  return (\n    <LinearProgress\n      progress={progress}\n      hidden={hidden}\n      accent={accent}\n      size={size}\n    />\n  );\n}\n","import { CaretRightRegularIcon } from \"alouette-icons/phosphor-icons/CaretRightRegularIcon\";\nimport type { ReactNode } from \"react\";\nimport { View } from \"react-native\";\nimport { Icon } from \"../primitives/Icon\";\nimport { PressableBox, type PressableBoxProps } from \"./PressableBox\";\n\nexport interface PressableListItemProps {\n  variant?: PressableBoxProps[\"variant\"];\n  accent?: PressableBoxProps[\"accent\"];\n  role?: PressableBoxProps[\"role\"];\n  children: ReactNode;\n  onPress: () => void;\n}\n\nexport function PressableListItem({\n  variant = \"contained\",\n  role = \"button\",\n  accent,\n  children,\n  onPress,\n}: PressableListItemProps): ReactNode {\n  return (\n    <PressableBox\n      variant={variant}\n      role={role}\n      accent={accent}\n      className=\"flex-row items-center justify-between mx-xs my-xxs px-m py-m\"\n      onPress={onPress}\n    >\n      <View className=\"flex-1\">{children}</View>\n      <View className=\"justify-center\">\n        <Icon\n          className={\n            variant === \"contained\" ? \"text-on-accent-muted\" : \"text-muted\"\n          }\n          icon={<CaretRightRegularIcon />}\n          size={18}\n        />\n      </View>\n    </PressableBox>\n  );\n}\n","import type { ReactNode } from \"react\";\nimport { View } from \"react-native\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\n\nexport interface GradientBackgroundProps {\n  children?: ReactNode;\n  accent?: Accent;\n}\n\nexport function GradientBackground({\n  accent,\n  children,\n}: GradientBackgroundProps): ReactNode {\n  return (\n    <AccentScope accent={accent}>\n      <View className=\"absolute inset-0 bg-linear-to-t from-screen-gradient-end from-5% via-screen-gradient-middle via-80% to-screen-gradient-start to-98%\">\n        {children}\n      </View>\n    </AccentScope>\n  );\n}\n","import { type ReactNode, forwardRef } from \"react\";\nimport {\n  ScrollView as RNScrollView,\n  type ScrollViewProps as RNScrollViewProps,\n  View,\n} from \"react-native\";\nimport type { Accent } from \"../../core/AlouetteConfig\";\nimport { AccentScope } from \"../containers/AccentScope\";\nimport { GradientBackground } from \"./GradientBackground\";\n\ninterface GradientScrollViewInnerProps extends RNScrollViewProps {\n  children?: ReactNode;\n}\n\nconst GradientScrollViewInner = forwardRef<\n  RNScrollView,\n  GradientScrollViewInnerProps\n>(({ children, ...scrollViewProps }, ref) => {\n  return (\n    <RNScrollView ref={ref} {...scrollViewProps}>\n      <View className=\"absolute left-0 right-0 top-[-600] height-[600] background-(--color-screen-gradient-start)\" />\n      <View className=\"absolute left-0 right-0 bottom-[-600] height-[600] background-(--color-screen-gradient-end)\" />\n      <GradientBackground />\n      {children}\n    </RNScrollView>\n  );\n});\n\nexport interface GradientScrollViewProps extends RNScrollViewProps {\n  children?: ReactNode;\n  accent: Accent;\n}\n\nexport const GradientScrollView = forwardRef<\n  RNScrollView,\n  GradientScrollViewProps\n>(({ accent, children, ...scrollViewProps }, ref) => {\n  return (\n    <AccentScope accent={accent}>\n      <GradientScrollViewInner ref={ref} {...scrollViewProps}>\n        {children}\n      </GradientScrollViewInner>\n    </AccentScope>\n  );\n});\n","export const Breakpoints = {\n  /**\n   * min-width: 0\n   */\n  BASE: 0,\n  /**\n   * min-width: 480px\n   */\n  SMALL: 480,\n  /**\n   * min-width: 768px\n   */\n  MEDIUM: 768,\n  /**\n   * min-width: 1024px\n   */\n  LARGE: 1024,\n  /**\n   * min-width: 1280px\n   */\n  WIDE: 1280,\n} as const;\n\nexport type Breakpoint = (typeof Breakpoints)[keyof typeof Breakpoints];\nexport type BreakpointNames = \"base\" | \"large\" | \"medium\" | \"small\" | \"wide\";\n\nexport enum BreakpointNameEnum {\n  BASE = \"base\",\n  SMALL = \"small\",\n  MEDIUM = \"medium\",\n  LARGE = \"large\",\n  WIDE = \"wide\",\n}\n","import { useWindowDimensions } from \"react-native\";\nimport {\n  BreakpointNameEnum,\n  type BreakpointNames,\n  Breakpoints,\n} from \"../config/Breakpoints\";\n\nexport function useCurrentBreakpointName(): BreakpointNameEnum {\n  const { width } = useWindowDimensions();\n  if (width >= Breakpoints.WIDE) return BreakpointNameEnum.WIDE;\n  if (width >= Breakpoints.LARGE) return BreakpointNameEnum.LARGE;\n  if (width >= Breakpoints.MEDIUM) return BreakpointNameEnum.MEDIUM;\n  if (width >= Breakpoints.SMALL) return BreakpointNameEnum.SMALL;\n  return BreakpointNameEnum.BASE;\n}\n\nexport function useCurrentBreakpointNameFiltered<\n  Names extends BreakpointNames[],\n>(names: Names): Names[number] {\n  const current = useCurrentBreakpointName();\n  // Walk from the largest matching breakpoint down to BASE; pick the first\n  // one the consumer asked for.\n  const ordered = [\n    BreakpointNameEnum.WIDE,\n    BreakpointNameEnum.LARGE,\n    BreakpointNameEnum.MEDIUM,\n    BreakpointNameEnum.SMALL,\n    BreakpointNameEnum.BASE,\n  ] as const;\n  const startIndex = ordered.indexOf(current);\n  for (let i = startIndex; i < ordered.length; i++) {\n    const candidate = ordered[i]!;\n    if (names.includes(candidate)) return candidate;\n  }\n  return BreakpointNameEnum.BASE;\n}\n","import type { ReactNode } from \"react\";\nimport { View } from \"react-native\";\nimport type { SetRequired } from \"type-fest\";\nimport type { BreakpointNames } from \"../config/Breakpoints\";\nimport { useCurrentBreakpointNameFiltered } from \"./useCurrentBreakpointName\";\n\ntype SwitchBreakpointsProps = SetRequired<\n  Partial<Record<BreakpointNames, ReactNode>>,\n  \"base\"\n> & { children?: never };\n\n// Static lookup table so the Tailwind/NativeWind scanner sees every classname.\n// Keys are `\"<currentBreakpoint>:<nextDefinedBreakpointOrEnd>\"`. The value\n// is the className that makes the slot visible from `current` (inclusive)\n// up to `next` (exclusive).\n//\n// Tailwind v4 breakpoint mapping — see global.css:\n//   sm = 480px (alouette SMALL)\n//   md = 768px (alouette MEDIUM)\n//   lg = 1024px (alouette LARGE)\n//   xl = 1280px (alouette WIDE)\nconst VISIBILITY_CLASS: Record<string, string> = {\n  \"base:end\": \"flex\",\n  \"base:small\": \"flex sm:hidden\",\n  \"base:medium\": \"flex md:hidden\",\n  \"base:large\": \"flex lg:hidden\",\n  \"base:wide\": \"flex xl:hidden\",\n  \"small:end\": \"hidden sm:flex\",\n  \"small:medium\": \"hidden sm:flex md:hidden\",\n  \"small:large\": \"hidden sm:flex lg:hidden\",\n  \"small:wide\": \"hidden sm:flex xl:hidden\",\n  \"medium:end\": \"hidden md:flex\",\n  \"medium:large\": \"hidden md:flex lg:hidden\",\n  \"medium:wide\": \"hidden md:flex xl:hidden\",\n  \"large:end\": \"hidden lg:flex\",\n  \"large:wide\": \"hidden lg:flex xl:hidden\",\n  \"wide:end\": \"hidden xl:flex\",\n};\n\n/**\n * Display based on current breakpoint via responsive utility classes.\n *\n * On web this is SSR-friendly (CSS handles the switching). On native it\n * still relies on NativeWind's runtime media-query evaluation.\n */\nexport function SwitchBreakpointsUsingDisplayNone({\n  ...breakpoints\n}: SwitchBreakpointsProps): ReactNode {\n  const entries = Object.entries(breakpoints) as [BreakpointNames, ReactNode][];\n\n  return entries.map(([name, node], index) => {\n    const next = entries[index + 1]?.[0] ?? \"end\";\n    const className = VISIBILITY_CLASS[`${name}:${next}`] ?? \"flex\";\n    return (\n      <View key={name} className={className}>\n        {node}\n      </View>\n    );\n  });\n}\n\n/**\n * Display based on current breakpoint via conditional rendering. Only the\n * matching slot is in the tree — heavier components stay unmounted.\n */\nexport function SwitchBreakpointsUsingNull({\n  children,\n  ...breakpoints\n}: SwitchBreakpointsProps): ReactNode {\n  const currentBreakpointName = useCurrentBreakpointNameFiltered(\n    Object.keys(breakpoints) as (keyof typeof breakpoints)[],\n  );\n\n  return breakpoints[currentBreakpointName] ?? null;\n}\n"],"names":["createContext","useContext","jsx","VariableContextProvider","useColorScheme","SafeAreaProvider","forwardRef","RNView","extendTailwindMerge","RNText","styled","RNScrollView","RNFlatList","RNSectionList","tv","Pressable","Children","useSafeAreaInsets","twMerge","jsxs","Fragment","Platform","useState","useRef","useEffect","isValidElement","live","cloneElement","useNativeVariable","WebBrowser","WebBrowserPresentationStyle","Linking","Circle","Easing","useSharedValue","withTiming","useAnimatedProps","Svg","CheckCircleRegularIcon","WarningDuotoneIcon","useWindowDimensions","useId","RNModal","XRegularIcon","ICON_SIZE","InfoRegularIcon","CheckRegularIcon","WarningRegularIcon","useReducer","QuestionRegularIcon","ArrowSquareOutRegularIcon","RNTextInput","useCallback","RNSwitch","CaretDownRegularIcon","Modal","useMemo","labelVariants","AsteriskSimpleRegularIcon","useForm","FormProvider","useFormContext","Controller","TrashRegularIcon","useFieldArray","PlusRegularIcon","PencilSimpleRegularIcon","View","CaretRightRegularIcon","BreakpointNameEnum"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,2BAAA,GAA8BA,mBAAA;AAAA,EACzC;AACF,CAAA;;ACXO,MAAM,YAAA,GAAeA,oBAA6B,OAAO,CAAA;AAEzD,SAAS,eAAA,GAAiC;AAC/C,EAAA,OAAOC,iBAAW,YAAY,CAAA;AAChC;AAEO,SAAS,cAAA,GAAoC;AAClD,EAAA,OAAOA,iBAAW,YAAY,CAAA,CAAE,UAAA,CAAW,MAAM,IAAI,MAAA,GAAS,OAAA;AAChE;;ACEO,SAAS,WAAA,CAAY,EAAE,KAAA,EAAO,QAAA,EAAS,EAAgC;AAC5E,EAAA,MAAM,cAAA,GAAiBA,iBAAW,2BAA2B,CAAA;AAC7D,EAAA,uBACEC,cAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,KAAA,EAAO,KAAA,EAC5B,QAAA,kBAAAA,cAAA,CAACC,kCA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