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AAK,mBAEJ3E,EAAe,cACfkG,GAAa,GAAAlJ,EAAAK,GAAA,EAACyK,EAAAA,CAAaA,CAAAA,CAAChL,UAAU,eAAeqB,MAAO,aAKvE,0DC3OO,IAAMC,EAAO2F,CAAAA,EAAAA,QAAAA,UAAAA,EAAW,SAC7BhH,CAAgB,CAChBiH,CAA0C,EAE1C,MACE,GAAAM,EAAAjH,GAAA,EAAC0K,EAAAA,CAAuBA,CAAAA,UACtB,GAAAzD,EAAAjH,GAAA,EAAC2K,EAAAA,OAAQA,CAAAA,CACPlL,UAAU,yCACT,GAAGC,CAAK,CACTiH,IAAKA,KAIb,EAEAV,CAAAA,EAAA2E,CAAA,CAAe7J,+CCRfkF,CAAAA,EAAA2E,CAAA,CAZA,SAAcpL,CAA4D,KAA5D,CAAEC,UAAAA,CAAS,CAAE,GAAGC,EAA4C,CAA5DF,EACZ,MACE,GAAAyH,EAAAjH,GAAA,EAAC6K,IAAAA,CACE,GAAGnL,CAAK,CACTD,UAAWK,CAAAA,EAAAA,EAAAA,CAAAA,EAAKL,EAAW,8CAC3B2H,YAAU,QAGhB","sources":["webpack://_N_E/../../packages/ui/src/LeftNav/LeftNav.tsx","webpack://_N_E/./src/components/HeaderLink/index.tsx","webpack://_N_E/./src/components/BuyflowNav/BuyflowNav.tsx","webpack://_N_E/./src/components/BuyflowNav/hooks.tsx","webpack://_N_E/./src/components/BuyflowNav/index.ts","webpack://_N_E/./src/redux/features/eligibility.ts","webpack://_N_E/../../packages/ui/src/Link/index.ts","webpack://_N_E/../../packages/ui/src/Button/Button.tsx","webpack://_N_E/../../packages/ui/src/Fieldset/Fieldset.tsx","webpack://_N_E/../../packages/ui/src/Fieldset/index.ts","webpack://_N_E/../../packages/ui/src/InputField/InputField.tsx","webpack://_N_E/../../packages/ui/src/Form/Form.tsx","webpack://_N_E/../../packages/ui/src/Link/Link.tsx","webpack://_N_E/../../packages/ui/src/Text/Text/Text.tsx"],"sourcesContent":["\"use client\";\n\nimport clsx from \"clsx\";\nimport { default as React } from \"react\";\n\nexport type LeftNavProps = {\n  header?: React.ReactElement | string;\n  title?: string;\n} & React.ComponentPropsWithoutRef<\"nav\">;\n\nexport default function LeftNav({ className, ...props }: LeftNavProps) {\n  return (\n    <nav\n      {...props}\n      className={clsx(\n        className,\n        \"flex h-full flex-col bg-plume-lilac-100 pl-10 pr-12\",\n      )}\n    >\n      {props.header ? <LeftNavHeader>{props.header}</LeftNavHeader> : null}\n      {props.title ? (\n        <LeftNavSectionTitle>{props.title}</LeftNavSectionTitle>\n      ) : null}\n      <LeftNavBody>{props.children}</LeftNavBody>\n    </nav>\n  );\n}\n\nexport function LeftNavHeader({\n  className,\n  ...props\n}: React.ComponentPropsWithoutRef<\"div\">) {\n  return <div {...props} className={clsx(className, \"flex flex-col my-5\")} />;\n}\n\nexport function LeftNavBody({\n  className,\n  ...props\n}: React.ComponentPropsWithoutRef<\"div\">) {\n  return (\n    <div\n      {...props}\n      className={clsx(\n        className,\n        \"flex flex-1 flex-col overflow-y-auto [&>[data-slot=section]+[data-slot=section]]:mt-8\",\n      )}\n    />\n  );\n}\n\nexport function LeftNavFooter({\n  className,\n  ...props\n}: React.ComponentPropsWithoutRef<\"div\">) {\n  return (\n    <div\n      {...props}\n      className={clsx(\n        className,\n        \"flex flex-col border-t border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5\",\n      )}\n    />\n  );\n}\n\nexport function LeftNavSectionTitle({\n  className,\n  ...props\n}: React.ComponentPropsWithoutRef<\"div\">) {\n  return (\n    <div\n      className={clsx(\n        className,\n        \"mt-10 mb-8 text-plume-violet text-lg font-bold font-sans\",\n      )}\n    >\n      {props.children}\n    </div>\n  );\n}\n\nexport function LeftNavDivider({\n  className,\n  ...props\n}: React.ComponentPropsWithoutRef<\"hr\">) {\n  return (\n    <hr\n      {...props}\n      className={clsx(\n        className,\n        \"-my-4 border-t border-zinc-950/5 lg:-mx-4 dark:border-white/5\",\n      )}\n    />\n  );\n}\n\nexport function LeftNavSpacer({\n  className,\n  ...props\n}: React.ComponentPropsWithoutRef<\"div\">) {\n  return (\n    <div\n      aria-hidden=\"true\"\n      {...props}\n      className={clsx(className, \"-mt-8 flex-1\")}\n    />\n  );\n}\n\nexport function LeftNavItem({\n  className,\n  complete,\n  current,\n  icon,\n  subtitle,\n  title,\n  ...props\n}: {\n  className?: string;\n  complete?: boolean;\n  current?: boolean;\n  icon: React.ReactElement;\n  subtitle?: string;\n  title: string;\n}) {\n  return (\n    <div\n      {...props}\n      className={clsx(\n        className,\n        \"relative flex font-sans text-plume-violet mb-8\",\n      )}\n    >\n      <div\n        className={clsx(\n          \"size-12 rounded-full p-2 flex\",\n          current && \"text-plume-plum bg-plume-lilac-500\",\n          complete && \"text-success bg-plume-teal-50\",\n          !current && !complete && \"text-plume-plum bg-plume-paper\",\n        )}\n      >\n        {icon}\n      </div>\n      <div className=\"ml-4\">\n        <div className=\"font-semibold mb-2\">{title}</div>\n        <div className=\"font-light text-sm\">{subtitle}</div>\n      </div>\n    </div>\n  );\n}\n\nexport function LeftNavLabel({\n  className,\n  ...props\n}: React.ComponentPropsWithoutRef<\"span\">) {\n  return <span {...props} className={clsx(className, \"truncate\")} />;\n}\n","import { Route } from \"next\";\nimport Image from \"next/image\";\nimport Link from \"next/link\";\n\nconst HeaderLink: React.FC<{ height?: number; width: number }> = ({\n  height = 1,\n  width,\n}) => {\n  return (\n    <Link\n      aria-label=\"Go back to Plume homepage\"\n      href={\n        process.env.NEXT_PUBLIC_PLUME_HOME\n          ? (process.env.NEXT_PUBLIC_PLUME_HOME as Route)\n          : \"/\"\n      }\n    >\n      <Image\n        alt=\"Plume logo\"\n        height={height}\n        src=\"/images/plume-logo-plum.png\"\n        width={width}\n      />\n    </Link>\n  );\n};\n\nexport default HeaderLink;\n","\"use client\";\n\nimport {\n  ClipboardDocumentListIcon,\n  Cog6ToothIcon,\n  CreditCardIcon,\n  UserCircleIcon,\n} from \"@heroicons/react/24/outline\";\nimport LeftNav, { LeftNavItem } from \"@repo/ui/LeftNav\";\nimport { usePathname } from \"next/navigation\";\nimport { useTranslations } from \"next-intl\";\nimport React from \"react\";\n\nimport { NO_INSURANCE_SELECTED, User } from \"../../redux/features/user\";\nimport HeaderLink from \"../HeaderLink\";\nimport { getPathIndex } from \"./hooks\";\n\nconst ICON_SIZE = 32;\n\nexport type BuyflowPath =\n  | \"/checkout\"\n  | \"/checkout/success\"\n  | \"/get-started\"\n  | \"/service-selection\"\n  | \"/sign-up\"\n  | \"/sign-up/insurance\";\n\nexport type BuyflowStep =\n  | \"checkout\"\n  | \"get-started\"\n  | \"service-selection\"\n  | \"sign-up\";\n\nexport const INELIGIBLE_PATHNAME = \"/ineligible\";\n\nexport type AltPath = \"/new-buyflow\" | typeof INELIGIBLE_PATHNAME;\n\nexport type NavStep = {\n  altPathnames: AltPath[];\n  icon: typeof ClipboardDocumentListIcon;\n  name: BuyflowStep;\n  substeps: {\n    condition?: (user: Partial<User>) => boolean;\n    pathname: BuyflowPath;\n  }[];\n};\n\nexport type Substep = NavStep[\"substeps\"][number];\n\nexport const NAV_STEP_ORDER: NavStep[] = [\n  {\n    altPathnames: [INELIGIBLE_PATHNAME, \"/new-buyflow\"],\n    icon: UserCircleIcon,\n    name: \"get-started\",\n    substeps: [\n      {\n        pathname: \"/get-started\",\n      },\n    ],\n  },\n  {\n    altPathnames: [],\n    icon: Cog6ToothIcon,\n    name: \"service-selection\",\n    substeps: [\n      {\n        pathname: \"/service-selection\",\n      },\n    ],\n  },\n  {\n    altPathnames: [],\n    icon: ClipboardDocumentListIcon,\n    name: \"sign-up\",\n    substeps: [\n      {\n        pathname: \"/sign-up\",\n      },\n      {\n        condition: (user: Partial<User>) => {\n          return (\n            user.insuranceName !== NO_INSURANCE_SELECTED &&\n            user.selectedPurchaseOption?.purchaseOptionType !== \"letter\"\n          );\n        },\n        pathname: \"/sign-up/insurance\",\n      },\n    ],\n  },\n  {\n    altPathnames: [],\n    icon: CreditCardIcon,\n    name: \"checkout\",\n    substeps: [\n      {\n        pathname: \"/checkout\",\n      },\n      {\n        pathname: \"/checkout/success\",\n      },\n    ],\n  },\n] as const;\n\nexport const SUBSTEP_ORDER = NAV_STEP_ORDER.flatMap(\n  (navStep) => navStep.substeps,\n);\n\nconst BuyflowNav: React.FC = () => {\n  const pathname = usePathname();\n  const getTranslation = useTranslations(\"nav\");\n  const currentIndex = getPathIndex(pathname);\n\n  return (\n    <LeftNav\n      className=\"min-h-screen w-full\"\n      header={<HeaderLink width={175} />}\n      title={getTranslation(\"title\")}\n    >\n      {NAV_STEP_ORDER.map((navStep, stepIndex) => {\n        return (\n          <LeftNavItem\n            complete={\n              stepIndex < currentIndex || pathname === \"/checkout/success\"\n            }\n            current={currentIndex === stepIndex}\n            icon={<navStep.icon height={ICON_SIZE} width={ICON_SIZE} />}\n            key={navStep.name}\n            subtitle={getTranslation(`${navStep.name}.subtitle`)}\n            title={getTranslation(`${navStep.name}.title`)}\n          />\n        );\n      })}\n    </LeftNav>\n  );\n};\n\nexport default BuyflowNav;\n","\"use client\";\n\nimport { Route } from \"next\";\nimport { usePathname } from \"next/navigation\";\n\nimport { User } from \"../../redux/features/user\";\nimport { useAppSelector } from \"../../redux/hooks\";\nimport {\n  AltPath,\n  BuyflowPath,\n  INELIGIBLE_PATHNAME,\n  NAV_STEP_ORDER,\n  SUBSTEP_ORDER,\n} from \"./BuyflowNav\";\n\nexport type BuyflowRoute = Route<BuyflowPath>;\n\nexport const getPathIndex = (route: string) => {\n  const maybeRouteIndex = NAV_STEP_ORDER.findIndex((navStep) =>\n    navStep.substeps.find((substep) => substep.pathname === route),\n  );\n  const isPrimaryRoute = maybeRouteIndex >= 0;\n  const routeIndex = isPrimaryRoute\n    ? maybeRouteIndex\n    : NAV_STEP_ORDER.findIndex(\n        (navStep) =>\n          navStep.altPathnames.length &&\n          navStep.altPathnames.includes(route as AltPath),\n      );\n  return routeIndex;\n};\n\ntype PrevNextRoutes = {\n  nextPathName: BuyflowRoute;\n  prevPathName: BuyflowRoute;\n};\n\nconst getPrevNextRoutes = (currentPath: string, user: Partial<User>) => {\n  const pathIndex = SUBSTEP_ORDER.findIndex(\n    (step) => step.pathname === currentPath,\n  );\n  if (pathIndex === -1) {\n    return {\n      nextPathName: currentPath,\n      prevPathName: currentPath,\n    } as PrevNextRoutes;\n  }\n\n  let prevRouteIndex = pathIndex - 1;\n  let prevRoute = SUBSTEP_ORDER[pathIndex - 1];\n  // finds the previous route that has its condition met or doesn't have a condition\n  while (prevRoute && prevRoute.condition && !prevRoute.condition(user)) {\n    prevRouteIndex--;\n    prevRoute = SUBSTEP_ORDER[prevRouteIndex];\n  }\n\n  let nextRouteIndex = pathIndex + 1;\n  let nextRoute = SUBSTEP_ORDER[nextRouteIndex];\n  // finds the next route that has its condition met or doesn't have a condition\n  while (nextRoute && nextRoute.condition && !nextRoute.condition(user)) {\n    nextRouteIndex++;\n    nextRoute = SUBSTEP_ORDER[nextRouteIndex];\n  }\n\n  if (pathIndex === 0) {\n    return {\n      nextPathName: nextRoute.pathname,\n      prevPathName: currentPath,\n    } as PrevNextRoutes;\n  }\n\n  if (pathIndex === SUBSTEP_ORDER.length - 1) {\n    return {\n      nextPathName: currentPath,\n      prevPathName: prevRoute.pathname,\n    } as PrevNextRoutes;\n  }\n\n  return {\n    nextPathName: nextRoute.pathname,\n    prevPathName: prevRoute.pathname,\n  } as PrevNextRoutes;\n};\n\nexport const useGetPrevNextBuyflowPaths = () => {\n  const path = usePathname();\n  const user = useAppSelector((state) => state.user);\n\n  const defaultPaths = {\n    ineligiblePathName: INELIGIBLE_PATHNAME as BuyflowRoute,\n    startPathName: NAV_STEP_ORDER[0].substeps[0].pathname as BuyflowRoute,\n  };\n\n  const nextPevRoutes = getPrevNextRoutes(path, user);\n\n  return { ...defaultPaths, ...nextPevRoutes };\n};\n","export { default } from \"./BuyflowNav\";\nexport * from \"./BuyflowNav\";\nexport * from \"./hooks\";\n","import { createApi, fetchBaseQuery } from \"@reduxjs/toolkit/query/react\";\nimport dobToAge from \"dob-to-age\";\nimport queryString from \"query-string\";\nimport { Simplify } from \"type-fest\";\n\nimport { PurchaseOptionType } from \"../../../../../packages/service-eligibility/src/insurance/purchases\";\nimport {\n  EligibilityInput,\n  EligibilityOutput,\n} from \"../../../../../packages/service-eligibility/src/user\";\nimport { PriceWithProduct } from \"../../app/(buyflow)/api/eligibility/route\";\nimport { EligibilityDetails, NO_INSURANCE_SELECTED } from \"../features/user\";\n\nexport type OptionsWithPrice = Record<PurchaseOptionType, PriceWithProduct>;\n\nexport type EligibilityBody = Simplify<\n  {\n    optionsWithPrice: OptionsWithPrice;\n    stateAcceptsInsurance: boolean;\n  } & EligibilityOutput\n>;\n\n/* Need to use location.origin to be test-compatible:\n * https://mswjs.io/docs/runbook/#rtk-query-requests-are-not-intercepted */\nconst baseUrl =\n  process.env.NODE_ENV == \"test\"\n    ? new URL(\"/api\", location.origin).href\n    : \"/api\";\n\nexport const eligibilityApi = createApi({\n  baseQuery: fetchBaseQuery({ baseUrl }),\n  endpoints: (builder) => ({\n    getUserEligibility: builder.query<\n      EligibilityBody,\n      Partial<EligibilityDetails>\n    >({\n      query: ({ dob, insuranceName, medicaid, stateOfResidence }) => {\n        const age = dob ? dobToAge(dob) : undefined;\n        const query: Partial<EligibilityInput> = {\n          age,\n          insuranceName:\n            insuranceName === NO_INSURANCE_SELECTED ? undefined : insuranceName,\n          medicaid,\n          stateOfResidence,\n        };\n\n        return queryString.stringifyUrl({ query, url: \"/eligibility\" });\n      },\n    }),\n  }),\n  reducerPath: \"eligibility\",\n});\n\nexport const { useGetUserEligibilityQuery } = eligibilityApi;\nexport default eligibilityApi;\n","export { default, type LinkProps } from \"./Link\";\n","import {\n  Button as HeadlessButton,\n  type ButtonProps as HeadlessButtonProps,\n} from \"@headlessui/react\";\nimport { clsx } from \"clsx\";\nimport { forwardRef } from \"react\";\n\nimport Link from \"../Link\";\nconst styles = {\n  base: [\n    \"relative isolate inline-flex items-center justify-center gap-x-2 rounded-lg border text-base/6 font-semibold\",\n    \"px-[calc(theme(spacing[3.5])-1px)] py-[calc(theme(spacing[2.5])-1px)] sm:px-[calc(theme(spacing.3)-1px)] sm:py-[calc(theme(spacing[1.5])-1px)] sm:text-sm/6\",\n    \"focus:outline-none data-[focus]:outline data-[focus]:outline-2 data-[focus]:outline-offset-2 data-[focus]:outline-blue-500\",\n    \"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed\",\n  ],\n\n  modes: {\n    primary: [\n      \"border-transparent bg-plume-plum\",\n      \"before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.lg)-1px)] before:bg-plume-plum before:shadow\",\n      \"after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.lg)-1px)]\",\n      \"after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]\",\n      \"after:data-[active]:bg-plume-violet after:data-[hover]:bg-plume-violet\",\n      \"before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none data-[disabled]:bg-plume-violet\",\n      \"text-plume-paper\",\n    ],\n    secondary: [\n      \"border-plume-plum bg-white text-plume-plum data-[active]:bg-plume-plum/[10%] data-[hover]:bg-plume-plum/[10%]\",\n    ],\n  },\n};\n\nexport type ButtonProps = {\n  children: React.ReactNode;\n} & { mode?: keyof typeof styles.modes } & (\n    | HeadlessButtonProps\n    | React.ComponentPropsWithoutRef<typeof Link>\n  );\n\nconst Button = forwardRef(function Button(\n  { children, className, mode, ...props }: ButtonProps,\n  ref: React.ForwardedRef<HTMLElement>,\n) {\n  const classes = clsx(\n    className,\n    styles.base,\n    clsx(styles.modes[mode ?? \"primary\"]),\n  );\n\n  return \"href\" in props ? (\n    <Link\n      {...props}\n      className={clsx(classes)}\n      ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n    >\n      <TouchTarget>{children}</TouchTarget>\n    </Link>\n  ) : (\n    <HeadlessButton\n      {...props}\n      className={clsx(classes, \"cursor-pointer\")}\n      ref={ref}\n    >\n      <TouchTarget>{children}</TouchTarget>\n    </HeadlessButton>\n  );\n});\n\nexport function TouchTarget({ children }: { children: React.ReactNode }) {\n  return (\n    <>\n      {children}\n      <span\n        aria-hidden=\"true\"\n        className=\"absolute left-1/2 top-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 [@media(pointer:fine)]:hidden\"\n      />\n    </>\n  );\n}\n\nexport default Button;\n","import type React from \"react\";\n\nimport * as Headless from \"@headlessui/react\";\nimport clsx from \"clsx\";\n\nexport type FieldsetProps = {\n  className?: string;\n  disabled?: boolean;\n} & Headless.FieldsetProps;\n\nexport function Fieldset({ className, ...props }: FieldsetProps) {\n  return (\n    <Headless.Fieldset\n      {...props}\n      className={clsx(\n        className,\n        \"[&>*+[data-slot=control]]:mt-6 [&>[data-slot=text]]:mt-1\",\n      )}\n    />\n  );\n}\n\nexport type FieldType = \"checkbox\" | \"default\";\n\nexport type LegendProps = {\n  className?: string;\n} & Omit<Headless.LegendProps, \"className\">;\n\nexport function Legend({ ...props }: LegendProps) {\n  return (\n    <Headless.Legend\n      {...props}\n      className={clsx(\n        props.className,\n        \"text-2xl font-bold text-plume-violet data-[disabled]:opacity-50\",\n      )}\n      data-slot=\"legend\"\n    />\n  );\n}\n\nexport function FieldGroup({\n  className,\n  type,\n  ...props\n}: {\n  type?: FieldType;\n} & React.ComponentPropsWithoutRef<\"div\">) {\n  return (\n    <div\n      {...props}\n      className={clsx(className, {\n        \"has-[[data-slot=description]]:space-y-6 [&_[data-slot=label]]:has-[[data-slot=description]]:font-medium\":\n          type === \"checkbox\",\n      })}\n      data-slot=\"control\"\n    />\n  );\n}\n\nexport type FieldProps = {\n  className?: string;\n  type?: FieldType;\n} & Headless.FieldProps;\n\nexport function Field({ className, type, ...props }: FieldProps) {\n  return (\n    <Headless.Field\n      className={clsx(\n        className,\n        type !== \"checkbox\"\n          ? [\n              \"[&>[data-slot=control]]:mt-1\",\n              \"[&>[data-slot=label]]:font-medium\",\n            ]\n          : [\n              //TODO: style error messaging to be right aligned for check boxes\n              \"grid grid-cols-[1.125rem_1fr] items-center gap-x-4 gap-y-1 sm:grid-cols-[1rem_1fr]\",\n              \"[&>[data-slot=control]]:col-start-1 [&>[data-slot=control]]:row-start-1 [&>[data-slot=control]]:justify-self-center\",\n              \"[&>[data-slot=label]]:col-start-2 [&>[data-slot=label]]:row-start-1 [&>[data-slot=label]]:justify-self-start\",\n              \"[&>[data-slot=description]]:col-start-2 [&>[data-slot=description]]:row-start-2\",\n              \"[&_[data-slot=label]]:has-[[data-slot=description]]:font-medium\",\n            ],\n      )}\n      {...props}\n    />\n  );\n}\n\nexport type LabelProps = { className?: string } & Headless.LabelProps;\n\nexport function Label({ className, ...props }: LabelProps) {\n  return (\n    <Headless.Label\n      {...props}\n      className={clsx(\n        className,\n        \"select-none py-1 text-plume-black data-[disabled]:opacity-50\",\n      )}\n      data-slot=\"label\"\n    />\n  );\n}\n\nexport type DescriptionProps = {\n  className?: string;\n  disabled?: boolean;\n} & Headless.DescriptionProps;\n\nexport function Description({ className, ...props }: DescriptionProps) {\n  return (\n    <Headless.Description\n      {...props}\n      className={clsx(\n        className,\n        \"py-1 text-base/6 text-zinc-500 data-[disabled]:opacity-50\",\n      )}\n      data-slot=\"description\"\n    />\n  );\n}\n\nexport type ErrorMessageProps = DescriptionProps;\n\nexport function ErrorMessage({ className, ...props }: ErrorMessageProps) {\n  return (\n    <Headless.Description\n      {...props}\n      className={clsx(\n        className,\n        \"py-1 text-base/6 text-error data-[disabled]:opacity-50\",\n      )}\n      data-slot=\"error\"\n    />\n  );\n}\n","export * from \"./Fieldset\";\n","import {\n  Description,\n  ErrorMessage,\n  Field,\n  FieldType,\n  Label,\n} from \"../Fieldset\";\n\nexport type InputFieldProps = {\n  children: React.ReactNode;\n  className?: string;\n  description?: string;\n  disabled?: boolean;\n  error?: string;\n  label?: React.ReactNode | string;\n  required?: boolean;\n  type?: FieldType;\n};\n\nconst InputField: React.FC<InputFieldProps> = ({\n  children,\n  className,\n  description,\n  disabled,\n  error,\n  label,\n  required,\n  type,\n}) => {\n  const hasError = Boolean(error);\n  return (\n    <Field className={className} disabled={disabled} type={type}>\n      {Boolean(label) && typeof label === \"string\" ? (\n        <Label className=\"text-sm\">\n          {label} {required ? \"*\" : \"\"}\n        </Label>\n      ) : (\n        label\n      )}\n      {children}\n      {hasError && <ErrorMessage className=\"text-xs\">{error}</ErrorMessage>}\n      {Boolean(!hasError && description) && (\n        <Description className=\"text-sm\">{description}</Description>\n      )}\n    </Field>\n  );\n};\n\nexport default InputField;\n","\"use client\";\n\nimport { ArrowPathIcon } from \"@heroicons/react/20/solid\";\nimport Button from \"@repo/ui/Button\";\nimport { FieldGroup, Fieldset, FieldType, Legend } from \"@repo/ui/Fieldset\";\nimport InputField from \"@repo/ui/InputField\";\nimport Text from \"@repo/ui/Text\";\nimport clsx from \"clsx\";\nimport { MessageKeys } from \"next-intl\";\nimport React from \"react\";\nimport {\n  Control,\n  Controller,\n  ControllerRenderProps,\n  FieldValues,\n  FormState,\n  Path,\n  RefCallBack,\n} from \"react-hook-form\";\n\ntype BaseFormTranslations = {\n  error?: string;\n  legendSubtext: string;\n  legendText: string;\n  loading: string;\n  placeholder?: string;\n  primaryCta: string;\n  required: string;\n  secondaryCta?: string;\n};\n\n// Helper types to add type safety when looking up translations\n// this will prevent you from trying to lookup a field key that doesn't exist\n// on the Form.\ntype BaseFormTranslationsKeys = keyof BaseFormTranslations;\ntype TranslationsKeys<FormData extends FieldValues> =\n  | BaseFormTranslationsKeys\n  | MessageKeys<FormTranslations<FormData>, Path<FormTranslations<FormData>>>;\n\n// This type couples the form fields with their respective translations\n// so when you implement the translations for a form you can't forget to add copy for a form field\nexport type FormTranslations<FormData extends FieldValues> = {\n  fields: {\n    [K in keyof FormData]: {\n      errorMessage?: string;\n      label: string;\n      placeholder?: string;\n    };\n  };\n} & BaseFormTranslations;\n\nexport type FormInputProps<\n  FormData extends FieldValues,\n  K extends Path<FormData>,\n> = {\n  // We intentionally omit the ref prop from ControllerRenderProps that react hook forms is sending, as it would make every input\n  // that we pass to the form component need to be wrapped in a forwardRef due to react explicitly forcing any prop named [ref](https://react.dev/reference/react/forwardRef#returns) to be\n  fieldType?: FieldType;\n  // forwarded in this way. Instead we have an explicit name for our input refs (inner ref), and do to the name mapping in this component only.\n  innerRef: RefCallBack;\n  invalid?: boolean;\n} & Omit<ControllerRenderProps<FormData, K>, \"ref\">;\n\n// Component interface you can type input components as, if you need to declare them outside of the inputs object\nexport type FormInputComponent<P = unknown> = <\n  FormData extends FieldValues,\n  K extends Path<FormData>,\n>(\n  props: FormInputProps<FormData, K> & P,\n) => JSX.Element;\n\nexport type FormProps<FormData extends FieldValues> = {\n  className?: string;\n  /* The form control object from react-hook-forms */\n  control: Control<FormData>;\n  errorText?: string;\n  /* The form state object from react-hook-forms */\n  formState: FormState<FormData>;\n  /* A function to fetch translations for the form copy, typically the output of useTranslations from next-intl */\n  getTranslation: (key: TranslationsKeys<FormData>) => string;\n  /* An array of groups of fields, to decide how to group inputs into sections of the grid */\n  groups: {\n    disabled?: boolean;\n    fields: Path<FormData>[];\n    header?: string;\n    type?: FieldType;\n  }[];\n  /* An object of inputs to render, with each key being a field name and each value being an object with a Component and optional rules of the same interface\n   * as the Controller component from react-hook-forms expects. Set rules.required to `true`, when you'd prefer\n   * the translation key to come from the validation result of a custom resolver, like Zod.\n   */\n  inputs: {\n    [K in Path<FormData>]: {\n      Component: FormInputComponent;\n      error?: string;\n      label?: React.ReactNode | string;\n      rules?: React.ComponentProps<typeof Controller<FormData, K>>[`rules`];\n    };\n  };\n  /* The function to call when the form is submitted, typically wrapped in handleSubmit form react-hook-forms */\n  onSubmit: (e: React.FormEvent<HTMLFormElement>) => Promise<void>;\n  // A function to call when the secondary button is clicked, this button will not render unless provided\n  secondaryOnClick?: () => void;\n} & React.FormHTMLAttributes<HTMLFormElement>;\n\n/*\n * @name Form\n * @description A form component that accepts a list of input components and renders them as inputs in our responsive grid, as well as fetches\n * translations for the form copy. These components must map its props to the actual input components, for the input to be controlled\n * by RHF correctly.\n */\nfunction Form<FormData extends FieldValues>({\n  className,\n  control,\n  errorText,\n  formState,\n  getTranslation,\n  groups,\n  inputs,\n  onSubmit,\n  secondaryOnClick,\n  ...props\n}: FormProps<FormData>) {\n  const legendText = getTranslation(\"legendText\");\n  const legendSubtext = getTranslation(\"legendSubtext\");\n  const [isLoading, setIsLoading] = React.useState(false);\n  const [isError, setIsError] = React.useState(false);\n  return (\n    <form\n      className={clsx(\n        \"mt-12 mx-8 px-4 md:px-0 w-auto max-w-3xl flex flex-col\",\n        className,\n      )}\n      onSubmit={async (...args) => {\n        try {\n          setIsLoading(true);\n          await onSubmit(...args);\n        } catch (e) {\n          setIsError(true);\n        } finally {\n          setIsLoading(false);\n        }\n      }}\n      {...props}\n    >\n      {Boolean(groups.length) && (\n        <Fieldset className=\"flex flex-col\">\n          {Boolean(legendText) && (\n            <div className=\"self-start\">\n              <Legend>{legendText}</Legend>\n              {Boolean(legendSubtext) && <Text>{legendSubtext}</Text>}\n            </div>\n          )}\n          <div className=\"flex flex-col\" data-slot=\"control\">\n            {groups.map(({ disabled, fields, type }) => {\n              return (\n                <FieldGroup\n                  className={clsx(\n                    \"w-full grid gap-y-6 self-start grid-cols-1 mb-4 xs:gap-6 md:gap-x-14\",\n                    {\n                      \"xs:grid-cols-2 lg:grid-cols-3\":\n                        fields.length > 1 || groups.length > 1,\n                    },\n                  )}\n                  key={fields.join()}\n                  type={type}\n                >\n                  {fields.map((field) => {\n                    const { Component, error, label, rules } = inputs[field];\n                    const inputError = formState.errors[field];\n                    const errorPath =\n                      inputError?.message?.toString() as TranslationsKeys<FormData>;\n\n                    const invalid = Boolean(inputError);\n                    const labelPath =\n                      `fields.${field}.label` as TranslationsKeys<FormData>;\n\n                    return (\n                      <InputField\n                        className={clsx({ \"col-span-3\": type == \"checkbox\" })}\n                        disabled={disabled}\n                        error={errorPath ? getTranslation(errorPath) : error}\n                        key={field}\n                        label={label ?? getTranslation(labelPath)}\n                        required={Boolean(rules?.required)}\n                        type={type}\n                      >\n                        <Controller\n                          control={control}\n                          name={field}\n                          render={({ field }) => {\n                            const { ref, ...props } = field;\n                            return (\n                              <Component\n                                {...props}\n                                innerRef={ref}\n                                invalid={invalid}\n                              />\n                            );\n                          }}\n                          rules={rules}\n                        />\n                      </InputField>\n                    );\n                  })}\n                </FieldGroup>\n              );\n            })}\n          </div>\n\n          {isError && !isLoading && Boolean(errorText) && (\n            <div className=\" text-error data-[disabled]:opacity-50\">\n              {errorText}\n            </div>\n          )}\n        </Fieldset>\n      )}\n      <div className=\"flex flex-row mb-4 justify-center\">\n        {secondaryOnClick && (\n          <Button\n            className=\"w-32 mt-8 mr-4\"\n            data-component=\"secondaryCta\"\n            mode=\"secondary\"\n            onClick={secondaryOnClick}\n            type=\"button\"\n          >\n            {getTranslation(\"secondaryCta\")}\n          </Button>\n        )}\n        <Button\n          className=\"w-32 mt-8\"\n          data-component=\"primaryCta\"\n          disabled={isLoading}\n          mode=\"primary\"\n          type=\"submit\"\n        >\n          {getTranslation(\"primaryCta\")}\n          {isLoading && <ArrowPathIcon className=\"animate-spin\" width={16} />}\n        </Button>\n      </div>\n    </form>\n  );\n}\n\nexport default Form;\n","import { DataInteractive as HeadlessDataInteractive } from \"@headlessui/react\";\nimport NextLink, { type LinkProps as NextLinkProps } from \"next/link\";\nimport { forwardRef } from \"react\";\n\nexport type LinkProps = NextLinkProps<string> &\n  React.ComponentPropsWithoutRef<\"a\">;\n\nexport const Link = forwardRef(function Link(\n  props: LinkProps,\n  ref: React.ForwardedRef<HTMLAnchorElement>,\n) {\n  return (\n    <HeadlessDataInteractive>\n      <NextLink\n        className=\"text-plume-plum data-[hover]:underline\"\n        {...props}\n        ref={ref}\n      />\n    </HeadlessDataInteractive>\n  );\n});\n\nexport default Link;\n","import { clsx } from \"clsx\";\n\nfunction Text({ className, ...props }: React.ComponentPropsWithoutRef<\"p\">) {\n  return (\n    <p\n      {...props}\n      className={clsx(className, \"text-base/6 text-plume-violet sm:text-sm/6\")}\n      data-slot=\"text\"\n    />\n  );\n}\n\nexport type TextProps = React.ComponentProps<typeof Text>;\n\nexport default Text;\n"],"names":["LeftNav","param","className","props","jsx_runtime","jsxs","nav","clsx","header","jsx","LeftNavHeader","title","LeftNavSectionTitle","LeftNavBody","children","div","LeftNavItem","complete","current","icon","subtitle","components_HeaderLink","height","width","Link","aria-label","href","process","Image","alt","src","INELIGIBLE_PATHNAME","NAV_STEP_ORDER","altPathnames","UserCircleIcon","name","substeps","pathname","Cog6ToothIcon","ClipboardDocumentListIcon","condition","user","insuranceName","NO_INSURANCE_SELECTED","selectedPurchaseOption","purchaseOptionType","CreditCardIcon","SUBSTEP_ORDER","flatMap","navStep","BuyflowNav_BuyflowNav","usePathname","getTranslation","useTranslations","currentIndex","getPathIndex","HeaderLink","map","stepIndex","concat","maybeRouteIndex","findIndex","find","substep","route","isPrimaryRoute","length","includes","getPrevNextRoutes","currentPath","pathIndex","step","nextPathName","prevPathName","prevRouteIndex","prevRoute","nextRouteIndex","nextRoute","useGetPrevNextBuyflowPaths","path","useAppSelector","state","defaultPaths","ineligiblePathName","startPathName","nextPevRoutes","eligibilityApi","createApi","baseQuery","fetchBaseQuery","baseUrl","endpoints","getUserEligibility","builder","query","dob","medicaid","stateOfResidence","age","dobToAge","undefined","queryString","stringifyUrl","url","reducerPath","useGetUserEligibilityQuery","__webpack_exports__","ZP","primary","secondary","TouchTarget","Fragment","span","aria-hidden","Button_Button","forwardRef","ref","mode","classes","styles","HeadlessButton","Fieldset","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","Headless","Legend","data-slot","FieldGroup","type","Field","Label","Description","ErrorMessage","InputField_InputField","description","disabled","error","label","required","hasError","Boolean","Form_Form","control","errorText","formState","groups","inputs","onSubmit","secondaryOnClick","legendText","legendSubtext","isLoading","setIsLoading","React","isError","setIsError","form","args","e","Text","fields","inputError","Component","rules","field","errors","errorPath","message","toString","invalid","labelPath","InputField","Controller","render","innerRef","join","Button","data-component","onClick","ArrowPathIcon","HeadlessDataInteractive","NextLink","Z","p"],"sourceRoot":""}