{"version":3,"sources":["../src/core/Components/Actions/hooks/useActions.ts","../src/core/Components/Actions/ThActionsBar.tsx","../src/core/Components/Menu/assets/icons/more_vert.svg","../src/core/Components/Buttons/ThActionButton.tsx","../src/core/Components/Menu/ThMenuButton.tsx","../src/core/Components/Menu/ThMenu.tsx","../src/core/Components/Actions/ThCollapsibleActionsBar.tsx","../src/core/Components/Audio/ThAudioProgress.tsx","../src/core/Components/Buttons/assets/icons/close.svg","../src/core/Components/Buttons/ThCloseButton.tsx","../src/core/Components/Buttons/assets/icons/delete.svg","../src/core/Components/Buttons/ThDeleteButton.tsx","../src/core/Components/Containers/ThBottomSheet/assets/icons/horizontal_rule.svg","../src/core/Components/Containers/ThBottomSheet/ThDragIndicatorButton.tsx","../src/core/Components/assets/icons/arrow_back.svg","../src/core/Components/assets/icons/arrow_forward.svg","../src/core/Components/Buttons/ThNavigationButton.tsx","../src/core/Components/Containers/hooks/useFirstFocusable.ts","../src/core/Components/Containers/ThPopover.tsx","../src/core/Components/Containers/ThModal.tsx","../src/core/Components/Containers/ThDockedPanel.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeader.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeaderWithClose.tsx","../src/core/Components/Containers/ThContainerHeader/ThContainerHeaderWithPrevious.tsx","../src/core/Components/Containers/ThContainerBody.tsx","../src/core/Components/Containers/ThBottomSheet/ThBottomSheet.tsx","../src/core/Components/Containers/ThTypedComponentRenderer.tsx","../src/core/Components/Form/ThForm.tsx","../src/core/Components/Form/Fields/ThFormNumberField.tsx","../src/core/Components/Form/Fields/ThFormTextField.tsx","../src/core/Components/Form/Fields/assets/icons/search.svg","../src/core/Components/Form/Fields/ThFormSearchField.tsx","../src/core/Components/Links/ThLink.tsx","../src/core/Components/Links/ThBackArrow.tsx","../src/core/Components/Links/assets/icons/home.svg","../src/core/Components/Links/ThHome.tsx","../src/core/Components/Links/assets/icons/newsstand.svg","../src/core/Components/Links/ThLibrary.tsx","../src/core/Components/Menu/ThMenuItem.tsx","../src/core/Components/Reader/ThFooter.tsx","../src/core/Components/Reader/ThLoader.tsx","../src/core/Components/Reader/ThHeader.tsx","../src/core/Components/Reader/ThInteractiveOverlay.tsx","../src/core/Components/Reader/ThPagination.tsx","../src/core/Components/Reader/ThRunningHead.tsx","../src/core/Components/Settings/assets/icons/add.svg","../src/core/Components/Settings/assets/icons/remove.svg","../src/core/Components/Settings/assets/icons/undo.svg","../src/core/Components/Settings/ThSettingsResetButton.tsx","../src/core/Components/Settings/ThNumberField.tsx","../src/core/Components/Settings/ThRadioGroup.tsx","../src/core/Components/Settings/ThSlider.tsx","../src/core/Components/Settings/ThSliderWithPresets.tsx","../src/core/Components/Settings/ThSwitch.tsx","../src/core/Components/Settings/ThDropdown/assets/icons/arrow_drop_down.svg","../src/core/Components/Settings/ThDropdown/ThDropdownButton.tsx","../src/core/Components/Settings/ThDropdown/ThDropdown.tsx","../src/core/Components/Settings/ThSettingsWrapper/assets/icons/settings.svg","../src/core/Components/Settings/ThSettingsWrapper/ThSettingsWrapperButton.tsx","../src/core/Components/Settings/ThSettingsWrapper/ThSettingsWrapper.tsx","../src/core/Components/ThGrid.tsx"],"names":["ThActionsTriggerVariant","jsx","jsxs","Fragment","React","useObjectRef","useRef","Button","useEffect","input","Popover","Dialog","useState","useCallback","useMemo","FocusScope","Label","FieldError","Input","Text","TooltipTrigger","Tooltip","NumberField","Slider","SliderTrack","SliderThumb","Heading","createElement"],"mappings":";;;;;;;;;;;AAUO,IAAM,UAAA,GAAa,CAAqC,SAAA,KAA2B;AACxF,EAAA,MAAM,QAAA,GAAW,YAAY,MAAM;AACjC,IAAA,MAAM,OAAY,EAAC;AAEnB,IAAA,MAAA,CAAO,OAAA,CAAQ,SAAS,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAC,GAAA,EAAK,KAAK,CAAA,KAAM;AAClD,MAAA,IAAI,KAAA,EAAO,MAAA,EAAQ,IAAA,CAAK,IAAA,CAAK,GAAQ,CAAA;AAAA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AClB;AAAA;AAAA,KAEJ,EACA,CAAA;AAAA,EAEJ;AACF;ACxEO,IAAM,SAAS,CAAoB;AAAA,EACxC,GAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAsB;AACpB,EAAA,uBACEA,GAAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACL,KAAA,EAAO;AAAA,QACL,GAAG,KAAA,CAAM,KAAA;AAAA,QACT,SAAA,EAAW,MAAA;AAAA,QACX,MAAA,EAAQ,CAAA;AAAA,QACR,OAAA,EAAS,CAAA;AAAA,QACT,OAAA,EAAS,MAAA;AAAA,QACT,SAAA,EAAW,YAAA;AAAA,QACX,qBAAqB,CAAA,mCAAA,EAAsC,OAAO,gBAAgB,QAAA,GAAW,WAAA,GAAc,cAAc,IAAI,CAAA,QAAA,CAAA;AAAA,QAC7H,GAAA,EAAK,OAAO,GAAA,KAAQ,QAAA,GAAW,MAAM,GAAA,GAAM;AAAA,OAC7C;AAAA,MAEE,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,EAAM,KAAA,qBACjBA,GAAAA,CAAC,IAAA,EAAA,EACG,QAAA,EAAA,UAAA,CAAW,IAAA,EAAM,KAAK,CAAA,EAAA,EADhB,KAEV,CACD;AAAA;AAAA,GACH;AAEJ","file":"chunk-ES2Y5MC7.mjs","sourcesContent":["\"use client\";\n\nimport { useCallback, useMemo } from \"react\";\nimport { ActionStateObject } from \"@/lib/actionsReducer\";\nimport { ThDockingKeys } from \"@/preferences/models\";\n\nexport interface ThActionMap {\n  [key: string | number | symbol]: ActionStateObject | undefined;\n}\n\nexport const useActions = <K extends string | number | symbol>(actionMap: ThActionMap) => {\n  const findOpen = useCallback(() => {\n    const open: K[] = [];\n\n    Object.entries(actionMap).forEach(([key, value]) => {\n      if (value?.isOpen) open.push(key as K);\n    });\n\n    return open;\n  }, [actionMap]);\n\n  const anyOpen = useCallback(() => {\n    return Object.values(actionMap).some((value) => value?.isOpen);\n  }, [actionMap]);\n\n  const isOpen = useCallback((key?: K | null) => {\n    if (key) {\n      if (actionMap[key]?.isOpen == null) {\n        return false;\n      } else {\n        return actionMap[key]?.isOpen;\n      }\n    }\n    return false;\n  }, [actionMap]);\n\n  const findDocked = useCallback(() => {\n    const docked: K[] = [];\n\n    Object.entries(actionMap).forEach(([key, value]) => {\n      const docking = value?.docking;\n      if (docking === ThDockingKeys.start || docking === ThDockingKeys.end) {\n        docked.push(key as K);\n      }\n    });\n\n    return docked;\n  }, [actionMap]);\n\n  const anyDocked = useCallback(() => {\n    return Object.values(actionMap).some((value) => {\n      const docking = value?.docking;\n      return docking === ThDockingKeys.start || docking === ThDockingKeys.end;\n    });\n  }, [actionMap]);\n\n  const isDocked = useCallback((key?: K | null) => {\n    if (!key) return false;\n    const docking = actionMap[key]?.docking;\n    return docking === ThDockingKeys.start || docking === ThDockingKeys.end;\n  }, [actionMap]);\n\n  const whichDocked = useCallback((key?: K | null) => {\n    return key ? actionMap[key]?.docking : null;\n  }, [actionMap]);\n\n  const getDockedWidth = useCallback((key?: K | null) => {\n    return key ? actionMap[key]?.dockedWidth : undefined;\n  }, [actionMap]);\n\n  const everyOpenDocked = useCallback(() => {\n    const opens = findOpen();\n\n    return opens.every((key) => {\n      return isDocked(key);\n    });\n  }, [findOpen, isDocked]);\n\n  return useMemo(() => ({\n    findOpen,\n    anyOpen,\n    isOpen,\n    findDocked,\n    anyDocked,\n    isDocked,\n    whichDocked,\n    getDockedWidth,\n    everyOpenDocked,\n  }), [findOpen, anyOpen, isOpen, findDocked, anyDocked, isDocked, whichDocked, getDockedWidth, everyOpenDocked]);\n};","\"use client\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { Toolbar, ToolbarProps } from \"react-aria-components\";\n\nexport enum ThActionsTriggerVariant {\n  button = \"iconButton\",\n  menu = \"menuItem\"\n}\n\nexport interface ThActionEntry<T> {\n  key: T;\n  associatedKey?: string;\n  Trigger: React.ComponentType<any>;\n  Target?: React.ComponentType<any>;\n}\n\nexport interface ThActionsBarProps extends ToolbarProps {\n  ref?: React.ForwardedRef<HTMLDivElement>\n};\n\nexport const ThActionsBar = ({ \n  ref, \n  children, \n  ...props \n}: ThActionsBarProps) => {\n  const resolvedRef = useObjectRef(ref);\n\n  return (\n    <Toolbar \n      ref={ resolvedRef } \n      { ...props }\n    >\n      { children }\n    </Toolbar>\n  )\n}","import * as React from \"react\";\nconst SvgMoreVert = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z\" /></svg>;\nexport default SvgMoreVert;","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Button, ButtonProps, Tooltip, TooltipProps, TooltipTrigger } from \"react-aria-components\";\nimport { TooltipTriggerProps } from \"react-aria\";\n\nexport interface ThActionButtonProps extends ButtonProps {\n  label?: string,\n  ref?: React.ForwardedRef<HTMLButtonElement>,\n  compounds?: {\n    /**\n     * Props for the tooltipTrigger component. See `TooltipTriggerProps` for more information.\n     */\n    tooltipTrigger?: WithRef<TooltipTriggerProps, HTMLDivElement>,\n    /**\n     * Props for the tooltip component. See `TooltipProps` for more information.\n     */\n    tooltip?: WithRef<TooltipProps, HTMLDivElement>,\n    /**\n     * Content for the tooltip\n     */\n    label: React.ReactNode\n  }\n}\n\nexport const ThActionButton = ({\n  ref,\n  compounds,\n  children,\n  ...props\n}: ThActionButtonProps) => {  \n  if (compounds) {\n    return (\n      <>\n      <TooltipTrigger\n        { ...compounds.tooltipTrigger }\n      >\n        <Button \n          ref={ ref }\n          { ...props }\n        >\n          { children } \n        </Button>\n        <Tooltip\n          arrowBoundaryOffset={ 0 }\n          { ...compounds.tooltip }\n        >\n          { compounds.label }\n        </Tooltip>\n      </TooltipTrigger>\n      </>\n    )\n  } else {\n    return (\n      <>\n      <Button \n        { ...props }\n      >\n        { children }\n      </Button>\n      </>\n    )\n  }\n}","\"use client\";\n\nimport MoreVertIcon from \"./assets/icons/more_vert.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"../Buttons/ThActionButton\";\n\nexport const ThMenuButton = ({\n  label,\n  ref,\n  compounds,\n  children,\n  ...props\n}: ThActionButtonProps) => {\n  return (\n    <ThActionButton\n      ref={ ref }\n      compounds={ compounds }\n      { ...props }\n    >\n      { children \n        ? children \n        : <>\n          <MoreVertIcon aria-hidden=\"true\" focusable=\"false\" /> \n          { label }\n          </> \n      }\n    </ThActionButton>\n  )\n}","\"use client\";\n\nimport React, { useRef } from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Menu, MenuProps, MenuTrigger, MenuTriggerProps, Popover, PopoverProps } from \"react-aria-components\";\n\nimport { ThMenuButton } from \"./ThMenuButton\";\nimport { ThActionButtonProps } from \"../Buttons\";\nimport { ThActionEntry, ThActionsTriggerVariant } from \"../Actions/ThActionsBar\";\n\nexport interface THMenuProps<T> extends MenuProps<ThActionEntry<T>> {\n  ref?: React.ForwardedRef<HTMLDivElement>;\n  triggerRef?: React.RefObject<HTMLElement | null>;\n  items?: Iterable<ThActionEntry<T>>;\n  children?: never;\n  compounds?: {\n    /**\n     * Props for the trigger component. See `MenuTriggerProps` for more information.\n     */\n    menuTrigger?: Omit<WithRef<MenuTriggerProps, HTMLDivElement>, \"children\">;\n    /**\n     * Props for the button component. See `ThActionButtonProps` for more information.\n     * Alternatively you can provide your own component\n     */\n    button?: ThActionButtonProps | React.ReactElement<ThActionButtonProps>;\n    /**\n     * Props for the popover component. See `PopoverProps` for more information.\n     */\n    popover?: WithRef<PopoverProps, HTMLDivElement>;\n  }\n}\n\nexport const ThMenu = ({\n  ref,\n  id,\n  triggerRef,\n  items,\n  dependencies,\n  compounds,\n  ...props\n}: THMenuProps<string>) => {\n  const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n  if (items) {\n    return (\n      <>\n      <MenuTrigger \n        { ...compounds?.menuTrigger }\n      >\n      { compounds?.button && React.isValidElement(compounds.button) \n        ? compounds.button \n        : <ThMenuButton \n            ref={ buttonRef }\n            { ...compounds?.button as ThActionButtonProps }\n          />\n        }\n        <Popover { ...compounds?.popover }>\n          <Menu \n            ref={ ref }\n            id={ id }\n            dependencies={ dependencies }\n            { ...props }\n          >\n            { Array.from(items).map(({ Trigger, key, associatedKey }) => \n              <Trigger \n                key={ `${ key }-menuItem` } \n                variant={ ThActionsTriggerVariant.menu }\n                { ...(associatedKey ? { associatedKey: associatedKey } : {}) } \n                { ...props }\n              />\n            )}\n          </Menu>\n        </Popover>\n      </MenuTrigger>\n      { Array.from(items).map(({ Target, key }) => \n        Target && <Target key={ `${ key }-container` } triggerRef={ triggerRef || buttonRef } { ...props } />\n      )}\n      </>\n    )\n  }\n}","\"use client\";\n\nimport React, { Fragment } from \"react\";\n\nconst MENU_DEPENDENCIES = [\"Trigger\"];\n\nimport { ThActionEntry, ThActionsBar, ThActionsBarProps, ThActionsTriggerVariant } from \"./ThActionsBar\";\nimport { ThMenu, THMenuProps } from \"../Menu/ThMenu\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { ToolbarRenderProps, useRenderProps } from \"react-aria-components\";\nimport { CollapsiblePref, useCollapsibility } from \"./hooks/useCollapsibility\";\n\nexport interface ThCollapsibleActionsBarProps extends ThActionsBarProps {\n  id: string;\n  items: ThActionEntry<string>[];\n  prefs: CollapsiblePref;\n  breakpoint?: string;\n  targetPlacement?: \"top\" | \"bottom\";\n  children?: never;\n  compounds?: {\n    menu: THMenuProps<string> | React.ReactElement<typeof ThMenu>;\n  }\n}\n\nexport const ThCollapsibleActionsBar = ({\n  ref,\n  id,\n  items,\n  prefs,\n  breakpoint,\n  targetPlacement = \"bottom\",\n  compounds,\n  ...props\n}: ThCollapsibleActionsBarProps) => {\n  const resolvedRef = useObjectRef(ref);\n  const Actions = useCollapsibility(items, prefs, breakpoint, resolvedRef);\n\n  const isSpaceFit = prefs.collapse === true;\n  const { className } = useRenderProps({ ...props, values: {} as ToolbarRenderProps });\n\n  return (\n    <>\n    <ThActionsBar\n      ref={ resolvedRef }\n      { ...props }\n    >\n      { isSpaceFit && (\n        // Hidden measurement clone — renders with the same className as the real bar\n        // so gap, display, and any other CSS-driven layout is identical.\n        // Plain div (not Toolbar) to avoid a nested role=\"toolbar\".\n        // Absolutely positioned so it is out of flow; aria-hidden to exclude from AT.\n        <div ref={ Actions.getGhostRef } className={ className } aria-hidden=\"true\" style={{ position: \"absolute\", visibility: \"hidden\", pointerEvents: \"none\" }}>\n          { items.map(({ Trigger, key }) =>\n            <span key={ key } ref={ Actions.getItemRef(key) }>\n              <Trigger variant={ ThActionsTriggerVariant.button } { ...props } />\n            </span>\n          )}\n        </div>\n      )}\n\n      { Actions.ActionIcons.map(({ Trigger, Target, key, associatedKey }) =>\n          <Fragment key={ key }>\n            <Trigger\n              key={ `${ key }-trigger` }\n              variant={ ThActionsTriggerVariant.button }\n              { ...(associatedKey ? { associatedKey: associatedKey } : {}) }\n              { ...props }\n            />\n            { Target && <Target key={ `${ key }-container` } triggerRef={ resolvedRef } placement={ targetPlacement } /> }\n          </Fragment>\n        )\n      }\n\n      { React.isValidElement(compounds?.menu)\n        ? (React.cloneElement(compounds.menu, {\n          id: id,\n          triggerRef: resolvedRef,\n          items: Actions.MenuItems,\n          dependencies: MENU_DEPENDENCIES,\n        } as THMenuProps<string>))\n        : (<ThMenu\n          id={ id }\n          triggerRef={ resolvedRef }\n          items={ Actions.MenuItems }\n          dependencies={ MENU_DEPENDENCIES }\n          { ...compounds?.menu }\n        />\n      )}\n    </ThActionsBar>\n    </>\n  )\n}\n","\"use client\";\n\nimport { useRef, useState, useEffect } from \"react\";\n\nimport {\n  Slider,\n  SliderProps,\n  SliderThumb,\n  SliderThumbProps,\n  SliderTrack,\n  SliderTrackProps\n} from \"react-aria-components\";\nimport { useOverlayPosition, OverlayContainer, OverlayContainerProps, PositionProps, useObjectRef } from \"react-aria\";\n\nimport { WithRef } from \"../customTypes\";\n\nexport interface SeekableRange {\n  start: number;\n  end: number;\n}\n\nexport interface TimelineSegment {\n  title?: string;\n  timestamp: number;\n  percentage: number;\n}\n\nexport interface ThAudioProgressProps {\n  isDisabled?: boolean;\n  currentTime: number;\n  duration: number;\n  playbackRate?: number;\n  onSeek: (time: number) => void;\n  currentChapter?: string;\n  seekableRanges?: SeekableRange[];\n  hoverLabel?: string;\n  onHoverProgression?: (progression: number | null) => void;\n  segments?: TimelineSegment[];\n  compounds?: {\n    wrapper?: React.HTMLAttributes<HTMLDivElement>;\n    current?: React.HTMLAttributes<HTMLDivElement>;\n    slider?: WithRef<SliderProps, HTMLDivElement>;\n    track?: WithRef<SliderTrackProps, HTMLDivElement>;\n    thumb?: WithRef<SliderThumbProps, HTMLDivElement>;\n    elapsedTime?: React.HTMLAttributes<HTMLSpanElement>;\n    remainingTime?: React.HTMLAttributes<HTMLSpanElement>;\n    seekableRange?: React.HTMLAttributes<HTMLDivElement>;\n    fragmentTick?: React.HTMLAttributes<HTMLDivElement>;\n    tooltip?: WithRef<PositionProps & React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n    overlayContainer?: OverlayContainerProps;\n  };\n}\n\nexport const ThAudioProgress = ({\n  isDisabled,\n  currentTime,\n  duration,\n  playbackRate = 1,\n  onSeek,\n  currentChapter,\n  seekableRanges,\n  hoverLabel,\n  onHoverProgression,\n  segments,\n  compounds\n}: ThAudioProgressProps) => {\n  const anchorRef = useRef<HTMLSpanElement>(null);\n  const overlayRef = useObjectRef(compounds?.tooltip?.ref);\n  const [isOpen, setIsOpen] = useState(false);\n  const [isDragging, setIsDragging] = useState(false);\n  const [dragValue, setDragValue] = useState(0);\n  const seekTargetRef = useRef<number | null>(null);\n\n  // Clear drag state once the navigator's currentTime has caught up to the seek target\n  useEffect(() => {\n    if (seekTargetRef.current === null) return;\n    if (Math.abs(currentTime - seekTargetRef.current) < 1) {\n      seekTargetRef.current = null;\n      setIsDragging(false);\n    }\n  }, [currentTime]);\n\n  const overlayConfig = compounds?.tooltip || {};\n  const placement = overlayConfig.placement || \"top\";\n  const offset = overlayConfig.offset !== undefined ? overlayConfig.offset : 8;\n\n  const { overlayProps, updatePosition } = useOverlayPosition({\n    targetRef: anchorRef,\n    overlayRef,\n    placement,\n    offset,\n    isOpen\n  });\n\n  const displayTime = isDragging ? dragValue : currentTime;\n  const defaultElapsedTime = formatTime(displayTime / playbackRate);\n  const defaultRemainingTime = formatTime(Math.max(0, (duration - displayTime) / playbackRate));\n\n  function formatTime(seconds: number) {\n    if (isNaN(seconds) || !isFinite(seconds)) return \"0:00\";\n    const hrs = Math.floor(seconds / 3600);\n    const mins = Math.floor((seconds % 3600) / 60);\n    const secs = Math.floor(seconds % 60);\n    return hrs > 0\n      ? `${ hrs }:${ mins.toString().padStart(2, \"0\") }:${ secs.toString().padStart(2, \"0\") }`\n      : `${ mins }:${ secs.toString().padStart(2, \"0\") }`;\n  }\n\n  const validSeekableRanges = duration > 0\n    ? (seekableRanges ?? []).filter(r => r.end <= duration)\n    : [];\n\n  const handleTrackMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {\n    const rect = e.currentTarget.getBoundingClientRect();\n    const raw = (e.clientX - rect.left) / rect.width;\n    const x = Math.max(0, Math.min(1, raw));\n    if (anchorRef.current) {\n      anchorRef.current.style.left = `${ x * 100 }%`;\n      anchorRef.current.style.right = \"\";\n      updatePosition();\n    }\n    if (!isOpen) setIsOpen(true);\n    onHoverProgression?.(x);\n  };\n\n  const handleTrackMouseLeave = () => {\n    setIsOpen(false);\n    onHoverProgression?.(null);\n  };\n\n  const { onMouseMove, onMouseLeave, ...trackProps } = compounds?.track ?? {};\n\n  return (\n    <div { ...compounds?.wrapper }>\n      { currentChapter && (\n        <div { ...compounds?.current }>\n          { currentChapter }\n        </div>\n      ) }\n      <Slider\n        value={ isDragging ? dragValue : currentTime }\n        minValue={ 0 }\n        maxValue={ duration || 0 }\n        onChange={ (value) => {\n          const v = Array.isArray(value) ? value[0] : value;\n          setIsDragging(true);\n          setDragValue(v);\n        } }\n        onChangeEnd={ (value) => {\n          const v = Array.isArray(value) ? value[0] : value;\n          seekTargetRef.current = v;\n          onSeek(v);\n        } }\n        isDisabled={ !!isDisabled }\n        { ...compounds?.slider }\n      >\n        <SliderTrack\n          onMouseMove={ (e) => { handleTrackMouseMove(e); onMouseMove?.(e); } }\n          onMouseLeave={ (e) => { handleTrackMouseLeave(); onMouseLeave?.(e); } }\n          { ...trackProps }\n        >\n          { validSeekableRanges.map((range, i) => (\n            <div\n              key={ i }\n              { ...compounds?.seekableRange }\n              style={{\n                left: `${ (range.start / duration) * 100 }%`,\n                width: `${ ((range.end - range.start) / duration) * 100 }%`,\n                ...compounds?.seekableRange?.style,\n              }}\n            />\n          )) }\n          { segments?.map((segment, i) => (\n            <div\n              key={ `segment-${ i }` }\n              { ...compounds?.fragmentTick }\n              style={{\n                position: \"absolute\",\n                left: `${ segment.percentage }%`,\n                ...compounds?.fragmentTick?.style,\n              }}\n            />\n          )) }\n          <span\n            ref={ anchorRef }\n            style={{ position: \"absolute\", left: \"0%\", width: 0, height: \"100%\", top: 0 }}\n            aria-hidden=\"true\"\n          />\n          <SliderThumb { ...compounds?.thumb } />\n        </SliderTrack>\n      </Slider>\n      { isOpen && hoverLabel && (\n        <OverlayContainer { ...compounds?.overlayContainer }>\n          <div\n            ref={ overlayRef }\n            { ...overlayConfig }\n            style={{ ...overlayProps.style, ...overlayConfig.style }}\n          >\n            { hoverLabel }\n          </div>\n        </OverlayContainer>\n      ) }\n      <span { ...compounds?.elapsedTime } aria-hidden=\"true\">{ defaultElapsedTime }</span>\n      <span { ...compounds?.remainingTime } aria-hidden=\"true\">{ defaultRemainingTime }</span>\n    </div>\n  );\n};\n","import * as React from \"react\";\nconst SvgClose = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\" /></svg>;\nexport default SvgClose;","\"use client\";\n\nimport Close from \"./assets/icons/close.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"./ThActionButton\";\n\nexport const ThCloseButton = ({\n  label,\n  ref,\n  compounds,\n  children,\n  ...props\n}: ThActionButtonProps) => {\n  return (\n    <ThActionButton\n      ref={ ref }\n      compounds={ compounds }\n      { ...props }\n    >\n      { children \n        ? children \n        : <>\n          <Close aria-hidden=\"true\" focusable=\"false\" /> \n          { label }\n          </> \n      }\n    </ThActionButton>\n  )\n}","import * as React from \"react\";\nconst SvgDelete = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z\" /></svg>;\nexport default SvgDelete;","\"use client\";\n\nimport Delete from \"./assets/icons/delete.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"./ThActionButton\";\n\nexport const ThDeleteButton = ({\n  label,\n  ref,\n  compounds,\n  children,\n  ...props\n}: ThActionButtonProps) => {\n  return (\n    <ThActionButton\n      ref={ ref }\n      compounds={ compounds }\n      { ...props }\n    >\n      { children \n        ? children \n        : <>\n          <Delete aria-hidden=\"true\" focusable=\"false\" /> \n          { label }\n          </> \n      }\n    </ThActionButton>\n  )\n}","import * as React from \"react\";\nconst SvgHorizontalRule = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M200-440q-17 0-28.5-11.5T160-480q0-17 11.5-28.5T200-520h560q17 0 28.5 11.5T800-480q0 17-11.5 28.5T760-440H200Z\" /></svg>;\nexport default SvgHorizontalRule;","\"use client\";\n\nimport HorizontalRule from \"./assets/icons/horizontal_rule.svg\";\n\nimport { Button, ButtonProps } from \"react-aria-components\";\n\nexport interface ThDragIndicatorButtonProps extends ButtonProps {\n  ref?: React.ForwardedRef<HTMLButtonElement>;\n}\n\nexport const ThDragIndicatorButton = ({\n  ref,\n  children,\n  ...props\n}: ThDragIndicatorButtonProps) => {\n  return (\n    <>\n    <Button \n      ref={ ref }\n      { ...props }\n    >\n      { children ? children : <HorizontalRule aria-hidden=\"true\" focusable=\"false\" /> }\n    </Button>\n    </>\n  )\n}","import * as React from \"react\";\nconst SvgArrowBack = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M640-80 240-480l400-400 71 71-329 329 329 329-71 71Z\" /></svg>;\nexport default SvgArrowBack;","import * as React from \"react\";\nconst SvgArrowForward = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m321-80-71-71 329-329-329-329 71-71 400 400L321-80Z\" /></svg>;\nexport default SvgArrowForward;","\"use client\";\n\nimport React from \"react\";\n\nimport ArrowBack from \"../assets/icons/arrow_back.svg\";\nimport ArrowForward from \"../assets/icons/arrow_forward.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"./ThActionButton\";\n\nexport interface ThNavigationButtonProps extends ThActionButtonProps {\n  direction?: \"left\" | \"right\";\n}\n\nexport const ThNavigationButton = ({\n  direction,\n  label,\n  ref,\n  compounds,\n  children,\n  ...props\n}: ThNavigationButtonProps) => {\n  const fallBackChildren = (\n    <React.Fragment>\n      { direction === \"right\"\n        ? <ArrowForward aria-hidden=\"true\" focusable=\"false\" />\n        : <ArrowBack aria-hidden=\"true\" focusable=\"false\" />\n      }\n      { label }\n    </React.Fragment>\n  );\n\n  return (\n    <ThActionButton\n      ref={ ref }\n      compounds={ compounds }\n      { ...props }\n    >\n      { children || fallBackChildren }\n    </ThActionButton>\n  )\n}\n","\"use client\";\n\nimport { useEffect, useRef, RefObject } from \"react\";\nimport { usePrevious } from \"../../../Hooks/usePrevious\";\n\ntype ScrollOptions = {\n  behavior?: ScrollBehavior;\n  block?: ScrollLogicalPosition;\n  inline?: ScrollLogicalPosition;\n};\n\ntype Action = \n  | { \n      type: \"focus\";\n      options?: {\n        preventScroll?: boolean;\n        scrollContainerToTop?: boolean;\n      };\n    }\n  | { \n      type: \"scrollIntoView\";\n      options?: ScrollOptions;\n    }\n  | { \n      type: \"none\";\n    };\n\nexport interface UseFirstFocusableProps {\n  withinRef: RefObject<HTMLElement | null>;\n  fallbackRef?: RefObject<HTMLElement | null>;\n  scrollerRef?: RefObject<HTMLElement | null>;\n  trackedState?: boolean;\n  updateState?: unknown;\n  action?: Action;\n  withSelector?: string;\n}\n\nconst isInViewport = (element: Element, container: Element | null = null): boolean => {\n  const elementRect = element.getBoundingClientRect();\n  const containerRect = container?.getBoundingClientRect() ?? {\n    top: 0,\n    bottom: window.innerHeight,\n    left: 0,\n    right: window.innerWidth\n  };\n\n  return (\n    elementRect.top >= containerRect.top &&\n    elementRect.bottom <= containerRect.bottom &&\n    elementRect.left >= containerRect.left &&\n    elementRect.right <= containerRect.right\n  );\n};\n\n// WARNING: This hook is not a general purpose hook, \n// it is specifically designed to be used with React Aria Components\n// It is not recommended to use it with other libraries or components\nexport const useFirstFocusable = (props?: UseFirstFocusableProps) => {\n  const { \n    withinRef, \n    fallbackRef, \n    scrollerRef, \n    trackedState, \n    updateState,\n    action = { type: \"none\" }, // Default to no action if not provided\n    withSelector\n  } = props || {};\n\n  // Store action in a ref to avoid triggering useEffect on action change\n  // action will be updated on every render, but ref will not trigger useEffect\n  const actionRef = useRef(action);\n  actionRef.current = action;\n\n  const focusableElement = useRef<HTMLElement | null>(null);\n  const attemptsRef = useRef(0);\n  const timeoutRef = useRef<number | null>(null);\n\n  const previousUpdateState = usePrevious(updateState);\n  const previousTrackedState = usePrevious(trackedState);\n\n  useEffect(() => {\n    if (!withinRef) return;\n    \n    // If trackedState is false and updateState hasn't changed, do nothing\n    if (!trackedState && updateState === previousUpdateState) return;\n    \n    // Determine what triggered this effect\n    const isTrackedStateUpdate = trackedState && (previousTrackedState !== trackedState);\n    const isUpdateStateUpdate = updateState !== previousUpdateState;\n\n    attemptsRef.current = 0;\n\n    const tryFindAndHandle = () => {\n      const targetElement = withinRef.current?.firstElementChild || withinRef.current;\n      let firstFocusable: HTMLElement | null = null;\n\n      // Check withSelector first if provided\n      if (withSelector) {\n        firstFocusable = withinRef.current?.querySelector(withSelector) as HTMLElement | null;\n      }\n\n      // If withSelector was not provided or didn't find anything, try radio group logic\n      if (!firstFocusable && targetElement?.getAttribute(\"role\") === \"radiogroup\") {\n        const selectedEl = targetElement.querySelector(\"[data-selected]\");\n        if (selectedEl === null) {\n          const inputs = targetElement.querySelectorAll(\"input\");\n          const input = inputs && Array.from(inputs).find(\n            (input: HTMLInputElement) => !input.disabled && input.tabIndex >= 0\n          );\n          firstFocusable = input as HTMLElement | null;\n        } else if (selectedEl instanceof HTMLElement) {\n          firstFocusable = selectedEl;\n        }\n      }\n\n      if (!firstFocusable) {\n        const focusableElements = withinRef.current?.querySelectorAll(\"a, button, input, select, [data-selected]\");\n        const element = focusableElements && Array.from(focusableElements).find(el => {\n          const htmlEl = el as HTMLAnchorElement | HTMLButtonElement | HTMLInputElement | HTMLSelectElement;\n          if (htmlEl instanceof HTMLAnchorElement) return true;\n          if (htmlEl.getAttribute(\"data-selected\") === \"true\") return true;\n          return !htmlEl.disabled && htmlEl.tabIndex >= 0;\n        });\n        firstFocusable = element as HTMLElement | null;\n      }\n\n      const handleElement = (element: HTMLElement) => {\n        if (actionRef.current.type === \"none\") return;\n\n        switch (actionRef.current.type) {\n          case \"focus\": {\n            const preventScroll = actionRef.current.options?.scrollContainerToTop || actionRef.current.options?.preventScroll;\n            element.focus({ preventScroll: preventScroll ?? false });\n            \n            // Handle container scrolling if requested\n            if (actionRef.current.options?.scrollContainerToTop) {\n              const scrollContainer = scrollerRef?.current || withinRef.current;\n              scrollContainer?.scrollTo({ top: 0 });\n            }\n            break;\n          }\n          \n          case \"scrollIntoView\":\n            if (!isInViewport(element, scrollerRef?.current || null)) {\n              element.scrollIntoView(actionRef.current.options);\n            }\n            break;\n        }\n      };\n\n      if (firstFocusable) {\n        handleElement(firstFocusable);\n        focusableElement.current = firstFocusable;\n      } else {\n        attemptsRef.current++;\n        if (attemptsRef.current < 3) {\n          timeoutRef.current = window.setTimeout(tryFindAndHandle, 50);\n        } else if (fallbackRef?.current) {\n          // Handle fallback based on action type\n          if (actionRef.current.type === \"focus\") {\n            fallbackRef.current.focus({ preventScroll: true });\n          } else if (actionRef.current.type === \"scrollIntoView\") {\n            fallbackRef.current.scrollIntoView(actionRef.current.options);\n          }\n          focusableElement.current = fallbackRef.current;\n        }\n      }\n    };\n\n    if (isTrackedStateUpdate) {\n      // Store the initial timeout ID\n      // We need this because of the bottom sheet animation\n      // requestAnimationFrame is not enough, and trackingState\n      // from onOpenEnd does not work either for some unknown reason…\n      const initialTimeoutId = window.setTimeout(() => {\n        tryFindAndHandle();\n      }, 100);\n\n      return () => {\n        // Clear the initial timeout\n        clearTimeout(initialTimeoutId);\n\n        // Clear any retry timeouts\n        if (timeoutRef.current !== null) {\n          window.clearTimeout(timeoutRef.current);\n          timeoutRef.current = null;\n        }\n        attemptsRef.current = 0;\n      };\n    } else if (isUpdateStateUpdate) {\n      // For updateState changes, run immediately in the next frame\n      const rafId = requestAnimationFrame(() => {\n        tryFindAndHandle();\n      });\n\n      return () => {\n        cancelAnimationFrame(rafId);\n        if (timeoutRef.current !== null) {\n          window.clearTimeout(timeoutRef.current);\n          timeoutRef.current = null;\n        }\n        attemptsRef.current = 0;\n      };\n    }\n  }, [withinRef, fallbackRef, scrollerRef, trackedState, previousUpdateState, updateState, previousTrackedState, withSelector]);\n\n  return focusableElement.current;\n};","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { Dialog, DialogProps, Popover, PopoverProps } from \"react-aria-components\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThPopoverProps extends Omit<PopoverProps, \"children\">, ThContainerProps {\n  triggerRef: React.RefObject<HTMLElement | null>;\n  compounds?: {\n    dialog: WithRef<DialogProps, HTMLDivElement>;\n  }\n}\n\nexport const ThPopover = ({\n  ref,\n  id,\n  triggerRef,\n  focusOptions,\n  compounds,\n  maxHeight,\n  children,\n  ...props\n}: ThPopoverProps) => {\n  const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n  const updatedFocusOptions = focusOptions ? {\n    ...focusOptions,\n    scrollerRef: focusOptions.scrollerRef || resolvedRef\n  } : undefined;\n\n  useFirstFocusable(updatedFocusOptions);\n\n  const computeMaxHeight = () => {\n    if (!resolvedRef.current) return;\n    return window.innerHeight - resolvedRef.current.offsetTop;\n  };\n\n  return (\n    <Popover \n      ref={ resolvedRef }\n      triggerRef={ triggerRef }\n      maxHeight={ maxHeight || computeMaxHeight() }\n      { ...props }\n    >\n      <Dialog id={ id } { ...compounds?.dialog }>\n        { children }\n      </Dialog>\n    </Popover>\n  )\n}","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { Dialog, DialogProps, Modal, ModalOverlayProps } from \"react-aria-components\";\n\nimport { useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThModalProps extends Omit<ModalOverlayProps, \"children\">, ThContainerProps {\n  compounds?: {\n    dialog: WithRef<DialogProps, HTMLDivElement>;\n  }\n}\n\nexport const ThModal = ({\n  ref,\n  id,\n  focusOptions,\n  compounds,\n  children,\n  ...props\n}: ThModalProps) => {\n  const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n  const updatedFocusOptions = focusOptions ? {\n    ...focusOptions,\n    scrollerRef: focusOptions.scrollerRef || resolvedRef\n  } : undefined;\n\n  useFirstFocusable(updatedFocusOptions);\n\n  return (\n    <Modal\n      ref={ resolvedRef }\n      { ...props }\n    >\n      <Dialog id={ id } { ...compounds?.dialog }>\n        { children }\n      </Dialog>\n    </Modal>\n  )\n}","\"use client\";\n\nimport React from \"react\";\nimport { createPortal } from \"react-dom\";\n\nimport { ThContainerProps } from \"./ThContainer\";\n\nimport { FocusScope, useObjectRef } from \"react-aria\";\nimport { useFirstFocusable } from \"./hooks/useFirstFocusable\";\n\nexport interface ThDockedPanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\">, ThContainerProps {\n  isOpen: boolean;\n  portal: HTMLElement | null;\n}\n\nexport const ThDockedPanel = ({ \n  ref,\n  isOpen,\n  portal,\n  focusOptions,\n  children, \n  ...props \n}: ThDockedPanelProps) => {\n  const resolvedRef = useObjectRef(ref as React.RefObject<HTMLDivElement | null>);\n\n  const updatedFocusOptions = focusOptions ? {\n    ...focusOptions,\n    scrollerRef: focusOptions.scrollerRef || resolvedRef\n  } : undefined;\n\n  useFirstFocusable(updatedFocusOptions);\n\n  return (\n    <>\n    { isOpen && portal && createPortal(\n      <FocusScope \n        contain={ false }\n        autoFocus={ (focusOptions?.action?.type && focusOptions.action.type === \"focus\") ?? false } \n        restoreFocus={ true }\n      >\n        <div\n          ref={ resolvedRef } \n          { ...props }\n        >\n          { children }\n        </div>\n      </FocusScope>\n      , portal)\n    }\n    </>\n  )\n}","\"use client\";\n\nimport { Heading, HeadingProps } from \"react-aria-components\";\nimport { HTMLAttributesWithRef, WithRef } from \"../../customTypes\";\n\nexport interface ThContainerHeaderProps extends HTMLAttributesWithRef<HTMLDivElement> {\n  ref?: React.ForwardedRef<HTMLDivElement>;\n  label: string;\n  compounds?: {\n    heading?: WithRef<HeadingProps, HTMLHeadingElement>;\n  }\n}\n\nexport const ThContainerHeader = ({ \n  ref,\n  label,\n  compounds,\n  children,\n  ...props \n}: ThContainerHeaderProps) => {\n  return (\n    <div \n      ref={ ref } \n      { ...props }\n    >\n      <Heading \n        slot=\"title\"\n        { ...compounds?.heading }\n      >\n        { label }\n      </Heading>\n      { children }\n    </div>\n  )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { HeadingProps } from \"react-aria-components\";\nimport { ThActionButtonProps, ThCloseButton } from \"../../Buttons\";\nimport { ThContainerHeader, ThContainerHeaderProps } from \"./ThContainerHeader\"\n\nexport interface THContainerWithCloseProps extends ThContainerHeaderProps {\n  closeRef?: React.ForwardedRef<HTMLButtonElement>;\n  children?: never;\n  compounds?: {\n    heading: WithRef<HeadingProps, HTMLHeadingElement>;\n    button: ThActionButtonProps;\n  }\n}\nexport const ThContainerHeaderWithClose = ({ \n  ref,\n  closeRef,\n  label,\n  compounds,\n  ...props \n}: THContainerWithCloseProps) => {\n  return (\n    <ThContainerHeader \n      ref={ ref } \n      label={ label }\n      { ...props }\n      compounds={ { heading: compounds?.heading }}\n    >\n      <ThCloseButton ref={ closeRef } { ...compounds?.button } />\n    </ThContainerHeader>\n  )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { HeadingProps } from \"react-aria-components\";\nimport { ThNavigationButton, ThNavigationButtonProps } from \"../../Buttons\";\nimport { ThContainerHeader, ThContainerHeaderProps } from \"./ThContainerHeader\"\n\nexport interface THContainerWithPreviousProps extends ThContainerHeaderProps {\n  previousRef?: React.ForwardedRef<HTMLButtonElement>;\n  children?: never;\n  compounds?: {\n    heading: WithRef<HeadingProps, HTMLHeadingElement>;\n    button: ThNavigationButtonProps;\n  }\n}\nexport const ThContainerHeaderWithPrevious = ({ \n  ref,\n  previousRef,\n  label,\n  compounds,\n  ...props \n}: THContainerWithPreviousProps) => {\n  return (\n    <ThContainerHeader \n      ref={ ref } \n      label={ label }\n      { ...props }\n      compounds={ { heading: compounds?.heading }}\n    >\n      <ThNavigationButton ref={ previousRef } { ...compounds?.button } />\n    </ThContainerHeader>\n  )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThContainerBodyProps extends HTMLAttributesWithRef<HTMLDivElement> {}\n\nexport const ThContainerBody = ({ \n  ref,\n  children,\n  ...props \n}: ThContainerBodyProps) => {\n  return (\n    <div \n      ref={ ref } \n      { ...props }\n    >\n      { children }\n    </div>\n  )\n}","\"use client\";\n\nimport React, { \n  RefObject, \n  useCallback, \n  useEffect, \n  useMemo, \n  useState \n} from \"react\";\n\nimport { OverlayTriggerState, useOverlayTriggerState } from \"react-stately\";\n\nimport { ThContainerHeader, ThContainerHeaderProps } from \"../ThContainerHeader\";\nimport { ThContainerBody } from \"../ThContainerBody\";\nimport { ThContainerProps } from \"../ThContainer\";\n\nimport { ThDragIndicatorButton, ThDragIndicatorButtonProps } from \"./ThDragIndicatorButton\";\n\nimport { Sheet, SheetDetent, SheetRef } from \"react-modal-sheet\";\nimport { HeadingProps } from \"react-aria-components\";\nimport { \n  AriaOverlayProps, \n  FocusScope, \n  OverlayProvider, \n  useDialog, \n  useModal, \n  useObjectRef, \n  useOverlay \n} from \"react-aria\";\n\nimport { useTransform } from \"motion/react\";\nimport { useFirstFocusable, UseFirstFocusableProps } from \"../hooks/useFirstFocusable\";\n\nexport interface ThBottomSheetHeaderProps extends ThContainerHeaderProps {\n  wrapper: React.ComponentProps<typeof Sheet.Header>,\n  dragIndicator: React.ComponentProps<typeof ThDragIndicatorButton>,\n  header: ThContainerHeaderProps,\n  heading: HeadingProps\n}\n\nexport interface ThBottomSheetCompounds {\n  container?: Omit<React.ComponentProps<typeof Sheet.Container>, \"children\">,\n  header?: React.ComponentProps<typeof Sheet.Header>,\n  dragIndicator?: ThDragIndicatorButtonProps,\n  scroller?: { \n    ref?: React.RefObject<HTMLDivElement>; \n    className?: string; \n  },\n  content?: React.ComponentProps<typeof Sheet.Content>,\n  backdrop?: React.ComponentProps<typeof Sheet.Backdrop>\n}\n\nexport interface ThBottomSheetProps extends Omit<React.ComponentProps<typeof Sheet>, \"children\" | \"ref\" | \"isOpen\" | \"onClose\">, AriaOverlayProps, ThContainerProps {\n  onOpenChange?: (isOpen: boolean) => void;\n  isKeyboardDismissDisabled?: boolean;\n  compounds?: ThBottomSheetCompounds;\n}\n\nconst ThBottomSheetContainer = ({\n  sheetRef,\n  sheetState,\n  isDraggable, \n  isKeyboardDismissDisabled,\n  focusOptions,\n  detent,\n  compounds,\n  children\n}: {\n  sheetRef: RefObject<HTMLDivElement | SheetRef | null>;\n  sheetState: OverlayTriggerState;\n  onFullHeight?: Omit<React.ComponentProps<typeof Sheet.Container>, \"children\">;\n  isDraggable?: boolean;\n  isKeyboardDismissDisabled?: boolean;\n  focusOptions?: UseFirstFocusableProps;\n  detent?: SheetDetent;\n  compounds?: ThBottomSheetCompounds;\n  children: ThContainerProps[\"children\"];\n}) => {\n  const containerRef = useObjectRef(compounds?.container?.ref);\n  const scrollerRef = useObjectRef(compounds?.scroller?.ref);\n  const dialog = useDialog({}, containerRef);\n  const overlay = useOverlay({ \n    onClose: sheetState.close, \n    isOpen: true, \n    isDismissable: true,\n    isKeyboardDismissDisabled: isKeyboardDismissDisabled\n  }, containerRef);\n  const [isFullHeight, setFullHeight] = useState<boolean>(false);\n\n  const autoPadding = useTransform(() => {\n    return (sheetRef.current as SheetRef)?.y.get() ?? 0;\n  });\n\n  // Apply scroller className from compounds\n  useEffect(() => {\n    if (!scrollerRef.current || !compounds?.scroller?.className) return;\n    scrollerRef.current.className = compounds.scroller.className;\n  }, [scrollerRef, compounds?.scroller]);\n\n  useEffect(() => {\n    if (!isDraggable || !scrollerRef.current) return;\n\n    // We need this so that scrolling into the scrollerRef does not shift Sheet.content\n    scrollerRef.current.style.overscrollBehavior = \"contain\";\n    scrollerRef.current.style.contain = \"content\";\n  }, [isDraggable, scrollerRef]);\n\n  useModal();\n\n  const fullHeightIntersectionCallback = useCallback((entries: IntersectionObserverEntry[]) => {\n    entries.forEach( (entry) => {\n      if (\n          detent === \"default\" &&\n          entry.isIntersecting && \n          entry.intersectionRatio === 1 && \n          // For some reason width is larger on mobile (and border-right is almost invisible)…\n          entry.boundingClientRect.width >= window.innerWidth\n        ) {\n          setFullHeight(true);\n      } else {\n        setFullHeight(false);\n      }\n    });\n  }, [setFullHeight, detent]);\n\n  useEffect(() => {\n    const observer = new IntersectionObserver(fullHeightIntersectionCallback, {\n      threshold: 1.0\n    });\n    containerRef.current && observer.observe(containerRef.current);\n\n    return () => {\n      observer.disconnect();\n    }\n  });\n\n  const [Header, Body] = useMemo(() => {\n    const header = children.find((child) => child.type === ThContainerHeader);\n    const body = children.find((child) => child.type === ThContainerBody);\n    \n    const modifiedHeader = header ? React.cloneElement(header as React.ReactElement<ThContainerHeaderProps>, {\n      ...header.props,\n      compounds: {\n        ...(header.props as ThContainerHeaderProps).compounds,\n        heading: {\n          ...(header.props as ThContainerHeaderProps).compounds?.heading,\n          ...dialog.titleProps\n        }\n      }\n    }) : null;\n\n    return [modifiedHeader, body];\n  }, [children, dialog.titleProps]);\n\n  const updatedFocusOptions = useMemo(() => \n    focusOptions ? {\n      ...focusOptions,\n      scrollerRef: scrollerRef\n    } : undefined,\n    [focusOptions, scrollerRef]\n  );\n\n  useFirstFocusable(updatedFocusOptions);\n\n  return (\n    <>\n    <Sheet.Container \n      { ...compounds?.container }\n      ref={ containerRef }\n      {...(isFullHeight ? { \"data-full-height\": \"true\" } : {} )}\n      { ...overlay.overlayProps as any}\n      { ...dialog.dialogProps }\n    >\n      <Sheet.Header\n        { ...compounds?.header }\n      >\n        { isDraggable && \n          <ThDragIndicatorButton \n            { ...compounds?.dragIndicator }\n          /> \n        }\n        { Header }\n      </Sheet.Header>\n      <Sheet.Content \n        scrollRef={ scrollerRef }\n        { ...compounds?.content }\n        { ...(isDraggable && compounds?.content?.disableDrag ? { style: { ...compounds?.content?.style, paddingBottom: autoPadding } as { [key: string]: any }} : {})}\n      >\n        { Body }\n      </Sheet.Content>\n    </Sheet.Container>\n    <Sheet.Backdrop \n      { ...compounds?.backdrop }\n    />\n    </>\n  )\n}\n\nexport const ThBottomSheet = ({\n  isOpen,\n  onOpenChange,\n  ref,\n  focusOptions,\n  isKeyboardDismissDisabled,\n  detent,\n  snapPoints,\n  compounds,\n  children, \n  ...props\n}: ThBottomSheetProps) => {\n  const resolvedRef = useObjectRef(ref);\n\n  let sheetState = useOverlayTriggerState({\n    isOpen: isOpen,\n    onOpenChange: onOpenChange\n  });\n\n  const isDraggable = useMemo(() => snapPoints && snapPoints.length > 1, [snapPoints]);\n\n  return(\n    <>\n    <Sheet\n      ref={ resolvedRef }\n      isOpen={ sheetState.isOpen }\n      onClose={ sheetState.close }\n      detent={ detent }\n      snapPoints={ snapPoints }\n      { ...props }\n    >\n      <OverlayProvider>\n        <FocusScope \n          contain={ true } \n          // If not set to true, focus is not contained on open\n          autoFocus={ true } \n          restoreFocus={ true }\n        >\n          <ThBottomSheetContainer \n            sheetRef={ resolvedRef } \n            sheetState={ sheetState } \n            isDraggable= { isDraggable }\n            isKeyboardDismissDisabled={ isKeyboardDismissDisabled }\n            focusOptions={ focusOptions }\n            detent={ detent }\n            compounds={ compounds }\n          >\n            { children }\n          </ThBottomSheetContainer>\n      </FocusScope>\n    </OverlayProvider>\n  </Sheet> \n  </>\n  )\n}","\"use client\";\n\nimport React, { ReactNode } from \"react\";\n\nexport type ComponentMap<T extends string> = {\n  [type in T]: React.ComponentType<any>;\n}\n\nexport interface TypedComponentRendererProps<T extends string, K extends keyof ComponentMap<T>> {\n  type: K;\n  componentMap: ComponentMap<T>;\n  props?: any;\n  children?: ReactNode;\n}\n\nexport const ThTypedComponentRenderer = <T extends string, K extends keyof ComponentMap<T>>({\n  type,\n  componentMap,\n  props,\n  children,\n}: TypedComponentRendererProps<T, K>) => {\n  const Component = componentMap[type];\n\n  if (!Component) {\n    throw new Error(`Unsupported type: ${type}`);\n  }\n\n  return React.createElement(Component, props, children);\n};","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Button, ButtonProps, Form, FormProps } from \"react-aria-components\";\n\nexport interface ThFormProps extends FormProps {\n  ref?: React.ForwardedRef<HTMLFormElement>;\n  label: string;\n  compounds?: {\n    button?: Exclude<WithRef<ButtonProps, HTMLButtonElement>, \"type\"> | React.ReactElement<typeof Button>;\n  }\n}\n\nexport const ThForm = ({\n  ref,\n  label,\n  compounds,\n  children,\n  ...props\n}: ThFormProps) => {\n  return(\n    <>\n    <Form\n      ref={ ref }\n      {...props}\n    >\n      { children }\n    \n      { compounds?.button && React.isValidElement(compounds.button) \n        ? compounds.button \n        : <Button\n            { ...compounds?.button }\n            type=\"submit\"\n          >\n            { label }\n          </Button>\n      }\n    </Form>\n    </>\n  )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n  FieldError, \n  FieldErrorProps, \n  Input, \n  InputProps, \n  Label, \n  LabelProps, \n  NumberField, \n  NumberFieldProps, \n  Text \n} from \"react-aria-components\";\n\nexport interface ThFormNumberFieldProps extends NumberFieldProps {\n  ref?: React.ForwardedRef<HTMLInputElement>;\n  onInputChange?: (rawValue: string) => void;\n  label?: string;\n  compounds?: {\n    label?: WithRef<LabelProps, HTMLLabelElement>;\n    input?: WithRef<InputProps, HTMLInputElement>;\n    description?: string;\n    fieldError?: WithRef<FieldErrorProps, HTMLDivElement>;\n  },\n  errorMessage?: string;\n}\n\nexport const ThFormNumberField = ({\n  ref,\n  onInputChange,\n  label,\n  compounds,\n  children,\n  errorMessage,\n  ...props\n}: ThFormNumberFieldProps) => {\n  return(\n    <>\n    <NumberField\n      ref={ ref }\n      {...props }\n    >\n      { children \n        ? children \n        : <>\n          { label && <Label {...compounds?.label }>\n              { label }\n            </Label>\n          }\n          \n          { errorMessage && <FieldError { ...compounds?.fieldError }>\n              { errorMessage }\n            </FieldError> \n          }\n          \n          <Input\n            { ...compounds?.input }\n            onInput={ onInputChange ? (e) => onInputChange((e.target as HTMLInputElement).value) : undefined }\n          />\n          \n          { compounds?.description && <Text slot=\"description\"> \n              { compounds?.description } \n            </Text> \n          }\n          </> \n      }\n    </NumberField>\n    </>\n  )\n}","\"use client\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n  FieldError, \n  FieldErrorProps, \n  Input, \n  InputProps, \n  Label, \n  LabelProps, \n  Text, \n  TextField, \n  TextFieldProps, \n  ValidationResult \n} from \"react-aria-components\";\n\nexport interface ThFormTextFieldProps extends TextFieldProps {\n  ref?: React.ForwardedRef<HTMLInputElement>;\n  label?: string;\n  compounds?: {\n    label?: WithRef<LabelProps, HTMLLabelElement>;\n    input?: WithRef<InputProps, HTMLInputElement>;\n    description?: string;\n    fieldError?: WithRef<FieldErrorProps, HTMLDivElement>;\n  },\n  errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport const ThFormTextField = ({\n  ref,\n  label,\n  children,\n  compounds,\n  errorMessage,\n  ...props\n}: ThFormTextFieldProps) => {\n  return(\n    <>\n    <TextField\n      ref={ ref }\n      {...props }\n    >\n      <>\n      { children \n        ? children \n        : <>\n          { label && <Label {...compounds?.label }>\n              { label }\n            </Label>\n          }\n          \n          { errorMessage && <FieldError { ...compounds?.fieldError }>\n              { errorMessage }\n            </FieldError> \n          }\n          \n          <Input {...compounds?.input } />\n          \n          { compounds?.description && <Text slot=\"description\"> \n              { compounds?.description } \n            </Text> \n          }\n          </> \n      }\n      </>\n    </TextField>\n    </>\n  )\n}","import * as React from \"react\";\nconst SvgSearch = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z\" /></svg>;\nexport default SvgSearch;","\"use client\";\n\nimport React, { HTMLAttributes } from \"react\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport SearchIcon from \"./assets/icons/search.svg\";\n\nimport { \n  FieldError, \n  FieldErrorProps, \n  Input, \n  InputProps, \n  Label, \n  LabelProps, \n  SearchField, \n  SearchFieldProps, \n  Text, \n  ValidationResult \n} from \"react-aria-components\";\nimport { ThActionButtonProps, ThCloseButton } from \"../../Buttons\";\n\nexport interface ThFormSearchFieldProps extends SearchFieldProps {\n  ref?: React.ForwardedRef<HTMLInputElement>;\n  label?: string;\n  compounds?: {\n    label?: WithRef<LabelProps, HTMLLabelElement>;\n    input?: WithRef<InputProps, HTMLInputElement>;\n    searchIcon?: HTMLAttributes<HTMLDivElement> | React.ReactElement<HTMLDivElement>;\n    clearButton?: ThActionButtonProps | React.ReactElement<ThActionButtonProps>;\n    description?: string;\n    fieldError?: WithRef<FieldErrorProps, HTMLDivElement>;\n  },\n  errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport const ThFormSearchField = ({\n  ref,\n  label,\n  children,\n  compounds,\n  errorMessage,\n  ...props\n}: ThFormSearchFieldProps) => {\n  return(\n    <>\n    <SearchField\n      ref={ ref }\n      {...props }\n    >\n      <>\n      { children \n        ? children \n        : <>\n          { label && <Label { ...compounds?.label }>\n              { label }\n            </Label>\n          }\n\n          { errorMessage && <FieldError { ...compounds?.fieldError }>\n              { errorMessage }\n            </FieldError> \n          }\n          \n          <Input { ...compounds?.input } />\n\n          { compounds?.searchIcon && React.isValidElement(compounds.searchIcon)\n           ? compounds.searchIcon\n            : <div {...compounds?.searchIcon }>\n                <SearchIcon aria-hidden=\"true\" focusable=\"false\" />\n              </div>\n          }\n          \n          { compounds?.clearButton && React.isValidElement(compounds.clearButton) \n            ? compounds.clearButton \n            : <ThCloseButton { ...compounds?.clearButton } type=\"button\" />\n          }\n          \n          { compounds?.description && <Text slot=\"description\"> \n              { compounds?.description } \n            </Text> \n          }\n          </> \n      }\n      </>\n    </SearchField>\n    </>\n  )\n}","\"use client\";\n\nimport { Link, LinkProps, Tooltip, TooltipProps, TooltipTrigger } from \"react-aria-components\";\nimport { WithRef } from \"../customTypes\";\nimport { TooltipTriggerProps } from \"react-aria\";\n\nexport interface ThLinkProps extends LinkProps {\n  ref?: React.ForwardedRef<HTMLAnchorElement>;\n  href: string;\n  children: React.ReactNode;\n  compounds?: {\n      /**\n       * Props for the tooltipTrigger component. See `TooltipTriggerProps` for more information.\n       */\n      tooltipTrigger?: WithRef<TooltipTriggerProps, HTMLDivElement>,\n      /**\n       * Props for the tooltip component. See `TooltipProps` for more information.\n       */\n      tooltip?: WithRef<TooltipProps, HTMLDivElement>,\n      /**\n       * String for the tooltip\n       */\n      label: string \n    }\n}\n\nexport interface ThLinkIconProps extends Omit<ThLinkProps, \"children\"> {\n  \"aria-label\": string;\n}\n\nexport const ThLink = ({ \n  ref,\n  href,\n  children,\n  compounds,\n  ...props \n}: ThLinkProps) => {\n  if (compounds) {\n    return (\n      <TooltipTrigger\n        { ...compounds.tooltipTrigger }\n      >\n        <Link \n          href={ href }\n          ref={ ref }\n          { ...props }\n        >\n          { children }\n        </Link>\n        <Tooltip\n          arrowBoundaryOffset={ 0 }\n          { ...compounds.tooltip }\n        >\n          { compounds.label }\n        </Tooltip>\n      </TooltipTrigger>\n    );\n  } else {\n    return (\n      <Link \n        href={ href }\n        ref={ ref }\n        { ...props }\n      >\n        { children }\n      </Link>\n    );\n  }\n};","\"use client\";\n\nimport ArrowBackIcon from \"../assets/icons/arrow_back.svg\";\nimport ArrowForwardIcon from \"../assets/icons/arrow_forward.svg\";\n\nimport { ThLink, ThLinkIconProps } from \"./ThLink\";\n\nexport interface ThBackArrowProps extends ThLinkIconProps {\n  direction?: \"left\" | \"right\";\n}\n\nexport const ThBackArrow = ({\n  ref,\n  href,\n  \"aria-label\": ariaLabel,\n  direction,\n  ...props\n}: ThBackArrowProps) => {\n  return (\n    <ThLink \n      href={ href }\n      ref={ ref }\n      aria-label={ ariaLabel }\n      { ...props }\n    >\n      { direction === \"right\"\n        ? <ArrowForwardIcon aria-hidden=\"true\" focusable=\"false\" />\n        : <ArrowBackIcon aria-hidden=\"true\" focusable=\"false\" />\n      }\n    </ThLink>\n  );\n};","import * as React from \"react\";\nconst SvgHome = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z\" /></svg>;\nexport default SvgHome;","\"use client\";\n\nimport HomeIcon from \"./assets/icons/home.svg\";\n\nimport { ThLink, ThLinkIconProps } from \"./ThLink\";\n\nexport const ThHome = ({\n  ref,\n  href,\n  \"aria-label\": ariaLabel,\n  ...props\n}: ThLinkIconProps) => {\n  return (\n    <ThLink \n      href={ href }\n      ref={ ref }\n      aria-label={ ariaLabel }\n      { ...props }\n    >\n      <HomeIcon aria-hidden=\"true\" focusable=\"false\" />\n    </ThLink>\n  );\n};","import * as React from \"react\";\nconst SvgNewsstand = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M80-160v-80h800v80H80Zm80-160v-320h80v320h-80Zm160 0v-480h80v480h-80Zm160 0v-480h80v480h-80Zm280 0L600-600l70-40 160 280-70 40Z\" /></svg>;\nexport default SvgNewsstand;","\"use client\";\n\nimport LibraryIcon from \"./assets/icons/newsstand.svg\";\n\nimport { ThLink, ThLinkIconProps } from \"./ThLink\";\n\nexport const ThLibrary = ({\n  ref,\n  href,\n  \"aria-label\": ariaLabel,\n  ...props\n}: ThLinkIconProps) => {\n  return (\n    <ThLink \n      href={ href }\n      ref={ ref }\n      aria-label={ ariaLabel }\n      { ...props }\n    >\n      <LibraryIcon aria-hidden=\"true\" focusable=\"false\" />\n    </ThLink>\n  );\n};","\"use client\";\n\nimport React from \"react\";\nimport { KeyboardProps } from \"react-aria\";\n\nimport { WithRef } from \"../customTypes\";\n\nimport { Keyboard, LabelProps, MenuItem, MenuItemProps, Text } from \"react-aria-components\";\n\nexport interface ThMenuItemProps extends MenuItemProps {\n  ref?: React.Ref<HTMLDivElement>;\n  id: string;\n  SVGIcon?: React.ComponentType<React.SVGProps<SVGElement>>;\n  label: string;\n  shortcut?: string;\n  compounds?: {\n    label: WithRef<LabelProps, HTMLSpanElement>;\n    shortcut: WithRef<KeyboardProps, HTMLSpanElement>;\n  }\n}\n\nexport const ThMenuItem = ({\n  ref,\n  id,\n  SVGIcon,\n  label, \n  shortcut,\n  compounds,\n  children,\n  ...props\n}: ThMenuItemProps) => {\n  const menuItemLabelId = `${ id }-label`;  \n  return(\n    <>\n    <MenuItem \n      ref={ ref }\n      id={ id } \n      { ...(children ? {} : { \"aria-labelledby\": menuItemLabelId }) }\n      { ...props }\n    >\n      { children \n        ? children \n        : <>\n          { SVGIcon && <SVGIcon aria-hidden=\"true\" focusable=\"false\" /> }\n          <Text \n            { ...compounds?.label } \n            slot=\"label\"\n            id={ menuItemLabelId }\n          >\n            { label }\n          </Text>\n          { shortcut && <Keyboard { ...compounds?.shortcut }>{ shortcut }</Keyboard> }\n        </>\n      }\n    </MenuItem>\n    </>\n  )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport const ThFooter = ({ \n  ref,\n  children,\n  ...props \n}: HTMLAttributesWithRef<HTMLDivElement>) => {\n  return (\n    <aside \n      ref={ ref } \n      { ...props }\n    >\n      { children }\n    </aside>\n  )\n}","\"use client\";\n\nimport { ReactNode } from \"react\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThLoaderProps extends Omit<HTMLAttributesWithRef<HTMLDivElement>, \"aria-busy\" | \"aria-live\"> {\n  ref?: React.ForwardedRef<HTMLDivElement>;\n  isLoading: boolean;\n  loader: ReactNode;\n}\n\n// Since we are removing loader entirely, no need for aria-hidden={ !isLoading }\n// No need for a label either since we are using the string for the animation\nexport const ThLoader = ({ \n  ref, \n  isLoading,\n  loader,\n  children,\n  ...props\n }: ThLoaderProps) => {\n  return (\n    <>\n    <div\n      ref={ ref }\n      { ...props }\n      style={{ position: \"relative\", ...props.style }}\n      aria-busy={ isLoading }\n      aria-live=\"polite\"\n    >\n      { children }\n      { isLoading && (\n        <div style={{ position: \"absolute\", inset: 0, zIndex: 10000 }}>\n          { loader }\n        </div>\n      )}\n    </div>\n    </>\n  )\n}","\"use client\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport const ThHeader = ({ \n  ref,\n  children,\n  ...props \n}: HTMLAttributesWithRef<HTMLDivElement>) => {\n  return (\n    <header \n      ref={ ref } \n      { ...props }\n    >\n      { children }\n    </header>\n  )\n}","export interface ThInteractiveOverlayProps extends React.HTMLAttributes<HTMLDivElement> {\n  ref?: React.ForwardedRef<HTMLDivElement>;\n  isActive: boolean;\n  children?: never;\n}\n\n// This is meant to mount invisible zones that can be hovered, clicked, etc.\nexport const ThInteractiveOverlay = ({ \n  ref,\n  isActive,\n  className,\n  style,\n  ...props \n}: ThInteractiveOverlayProps) => {\n  const defaultStyles: React.CSSProperties = {\n    opacity: 0,\n    zIndex: 10000,\n    pointerEvents: \"auto\",\n  };\n\n  const mergedStyles = className \n    ? undefined \n    : {\n      ...defaultStyles,\n      ...style\n    };\n\n  if (isActive) {\n    return (\n      <div \n        ref={ ref } \n        className={ className }\n        style={ mergedStyles }\n        { ...props }\n      ></div>\n    )\n  }\n}","\"use client\";\n\nimport React, { ComponentType, SVGProps } from \"react\";\n\nimport { Button, ButtonProps } from \"react-aria-components\";\nimport { WithRef } from \"../customTypes\";\n\nimport ArrowBack from \"../assets/icons/arrow_back.svg\";\nimport ArrowForward from \"../assets/icons/arrow_forward.svg\";\n\nexport interface ThPaginationLinkProps {\n  icon?: ComponentType<SVGProps<SVGElement>> | null;\n  node: React.ReactNode;\n  onPress: () => void;\n}\n\nexport interface ThPaginationProps extends React.HTMLAttributes<HTMLDivElement> {\n  ref?: React.RefObject<HTMLDivElement>;\n  children?: React.ReactNode;\n  links?: {\n    left?: ThPaginationLinkProps;\n    right?: ThPaginationLinkProps;\n  };\n  compounds?: {\n    listItem?: React.HTMLAttributes<HTMLLIElement>;\n    leftButton?: Exclude<WithRef<ButtonProps, HTMLButtonElement>, \"type\">;\n    rightButton?: Exclude<WithRef<ButtonProps, HTMLButtonElement>, \"type\">;\n  };\n}\n\nexport const ThPagination = ({\n  ref,\n  links,\n  compounds,\n  children,\n  dir,\n  ...restProps\n}: ThPaginationProps) => {\n  if (!links) {\n    return null;\n  }\n\n  const { left, right } = links;\n\n  return (\n    <nav\n      ref={ ref }\n      dir=\"ltr\"\n      { ...restProps }\n    >\n      { left && (\n        <li { ...compounds?.listItem }>\n          <Button\n            { ...compounds?.leftButton }\n            type=\"button\"\n            onPress={ left.onPress }\n          >\n            { left.icon ? <left.icon aria-hidden=\"true\" focusable=\"false\" /> : <ArrowBack aria-hidden=\"true\" focusable=\"false\" /> }\n            { left.node }\n          </Button>\n        </li>\n      ) }\n\n      { children && (\n        <li { ...compounds?.listItem } dir={ dir }>\n          { children }\n        </li>\n      ) }\n\n      { right && (\n        <li { ...compounds?.listItem }>\n          <Button\n            { ...compounds?.rightButton }\n            type=\"button\"\n            onPress={ right.onPress }\n          >\n            { right.node }\n            { right.icon ? <right.icon aria-hidden=\"true\" focusable=\"false\" /> : <ArrowForward aria-hidden=\"true\" focusable=\"false\" /> }\n          </Button>\n        </li>\n      ) }\n    </nav>\n  );\n};\n","\"use client\";\n\nimport React from \"react\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\n\nexport interface ThRunningHeadProps extends HTMLAttributesWithRef<HTMLHeadingElement> {\n  ref?: React.RefObject<HTMLHeadingElement>\n  label: string;\n}\n\nexport const ThRunningHead = ({ \n  ref,\n  label,\n  ...props\n}: ThRunningHeadProps) => {\n\n  return(\n    <>\n    <h1 \n      ref={ ref }\n      { ...props }\n    >\n        { label }\n      </h1>\n    </>\n  )\n}","import * as React from \"react\";\nconst SvgAdd = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z\" /></svg>;\nexport default SvgAdd;","import * as React from \"react\";\nconst SvgRemove = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M200-440v-80h560v80H200Z\" /></svg>;\nexport default SvgRemove;","import * as React from \"react\";\nconst SvgUndo = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"M280-200v-80h284q63 0 109.5-40T720-420q0-60-46.5-100T564-560H312l104 104-56 56-200-200 200-200 56 56-104 104h252q97 0 166.5 63T800-420q0 94-69.5 157T564-200H280Z\" /></svg>;\nexport default SvgUndo;","\"use client\";\n\nimport Undo from \"./assets/icons/undo.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"../Buttons/ThActionButton\";\n\nexport const ThSettingsResetButton = ({\n  label,\n  ref,\n  compounds,\n  children,\n  ...props\n}: ThActionButtonProps) => {\n  return (\n    <ThActionButton\n      ref={ ref }\n      compounds={ compounds }\n      { ...props }\n    >\n      { children \n        ? children \n        : <>\n          <Undo aria-hidden=\"true\" focusable=\"false\" /> \n          { label }\n          </> \n      }\n    </ThActionButton>\n  )\n}","\"use client\";\n\nimport { ComponentType, SVGProps, useCallback } from \"react\";\n\nimport { HTMLAttributesWithRef, WithRef } from \"../customTypes\";\nimport { ThActionButtonProps } from \"../Buttons\";\n\nimport AddIcon from \"./assets/icons/add.svg\";\nimport RemoveIcon from \"./assets/icons/remove.svg\";\n\nimport { ThSettingsResetButton } from \"./ThSettingsResetButton\";\n\nimport {\n  Button,\n  ButtonProps,\n  Group,\n  GroupProps,\n  Input,\n  InputProps,\n  Label,\n  LabelProps,\n  NumberField,\n  NumberFieldProps\n} from \"react-aria-components\";\n\nimport { useObjectRef } from \"react-aria\";\n\nexport interface ThNumberFieldProps extends Omit<NumberFieldProps, \"minValue\" | \"maxValue\" | \"decrementAriaLabel\" | \"incrementAriaLabel\"> {\n  ref?: React.ForwardedRef<HTMLInputElement>;\n  onReset?: () => void;\n  onInputChange?: (rawValue: string) => void;\n  label?: string;\n  placeholder?: string;\n  range: number[];\n  isVirtualKeyboardDisabled?: boolean;\n  steppers?: {\n    decrementIcon?: ComponentType<SVGProps<SVGElement>> | null;\n    decrementLabel: string;\n    incrementIcon?: ComponentType<SVGProps<SVGElement>> | null;\n    incrementLabel: string;\n  };\n  compounds?: {\n    /**\n     * Props for the wrapper component.\n     */\n    wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n    /**\n     * Props for the Group component. See `GroupProps` for more information.\n     */\n    group?: WithRef<GroupProps, HTMLDivElement>;\n    /**\n     * Props for the Input component. See `InputProps` for more information.\n     */\n    input?: Omit<WithRef<InputProps, HTMLInputElement>, \"placeholder\">;\n    /**\n     * Props for the Label component. See `LabelProps` for more information.\n     */\n    label?: WithRef<LabelProps, HTMLLabelElement>;\n    /**\n     * Props for the Button component used for decrement/increment. See `ButtonProps` for more information.\n     */\n    stepper?: ButtonProps;\n    /**\n     * Props for the Button component used for resetting the value. See `ThActionButtonProps` for more information.\n     */\n    reset?: ThActionButtonProps;\n  };\n}\n\nexport const ThNumberField = ({\n  ref,\n  onReset,\n  onInputChange,\n  label,\n  placeholder,\n  range,\n  isVirtualKeyboardDisabled,\n  steppers,\n  compounds,\n  value,\n  ...props\n}: ThNumberFieldProps) => {\n  const resolvedRef = useObjectRef(ref);\n\n  // Callback that handles reset and focus restoration\n  const handleResetWithFocus = useCallback(() => {\n    onReset?.();\n    // Use requestAnimationFrame to defer focus until after current call stack\n    requestAnimationFrame(() => {\n      if (resolvedRef.current) {\n        const inputElement = resolvedRef.current.querySelector(\"input\");\n        if (inputElement) {\n          (inputElement as HTMLElement).focus();\n        }\n      }\n    });\n  }, [onReset, resolvedRef]);\n\n  return (\n    <>\n      <div { ...compounds?.wrapper }>\n        <NumberField\n          ref={ resolvedRef }\n          // This looks super weird but is the only way\n          // to unset the value in NumberField as undefined\n          // will not update the value\n          value={ value === undefined ? NaN : value }\n          minValue={ Math.min(...range) }\n          maxValue={ Math.max(...range) }\n          decrementAriaLabel={ steppers?.decrementLabel }\n          incrementAriaLabel={ steppers?.incrementLabel }\n          { ...props }\n        >\n          { label && <Label { ...compounds?.label }>\n            { label }\n          </Label>\n          }\n\n          <Group { ...compounds?.group }>\n            {steppers &&\n              <Button\n                { ...compounds?.stepper }\n                slot=\"decrement\"\n              >\n                { steppers.decrementIcon\n                  ? <steppers.decrementIcon aria-hidden=\"true\" focusable=\"false\" />\n                  : <RemoveIcon aria-hidden=\"true\" focusable=\"false\" /> }\n              </Button>\n            }\n\n            <Input\n              { ...compounds?.input }\n              { ...(isVirtualKeyboardDisabled ? { inputMode: \"none\" } : {}) }\n              placeholder={ placeholder }\n              onInput={ onInputChange ? (e) => onInputChange((e.target as HTMLInputElement).value) : undefined }\n            />\n\n            { steppers &&\n              <Button\n                { ...compounds?.stepper }\n                slot=\"increment\"\n              >\n                { steppers.incrementIcon\n                  ? <steppers.incrementIcon aria-hidden=\"true\" focusable=\"false\" />\n                  : <AddIcon aria-hidden=\"true\" focusable=\"false\" /> }\n              </Button>\n            }\n          </Group>\n        </NumberField>\n        { onReset && <ThSettingsResetButton { ...compounds?.reset } onClick={ handleResetWithFocus } /> }\n      </div>\n    </>\n  );\n};","\"use client\";\n\nimport React, { ComponentType, SVGProps, useEffect, useRef } from \"react\";\n\nimport { HTMLAttributesWithRef, WithRef } from \"../customTypes\";\n\nimport { \n  Label, \n  LabelProps, \n  Radio, \n  RadioGroup, \n  RadioGroupProps, \n  RadioProps \n} from \"react-aria-components\"\n\nexport interface ThRadioGroupItems {\n  id: string;\n  value: string;\n  icon?: ComponentType<SVGProps<SVGElement>>;\n  label: string;\n  isDisabled?: boolean;\n}\n\nexport interface ThRadioGroupProps extends RadioGroupProps {\n  ref?: React.ForwardedRef<HTMLDivElement>;\n  label?: string;\n  items?: ThRadioGroupItems[];\n  compounds?: {\n    /**\n     * Props for the wrapper component. See `HTMLAttributesWithRef` for more information.\n     */\n    wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n    /**\n     * Props for the label component. See `LabelProps` for more information.\n     */\n    label?: WithRef<LabelProps, HTMLLabelElement>;\n    /**\n     * Props for the radio component. See `RadioProps` for more information.\n     */\n    radio?: Omit<RadioProps, \"value\">;\n    /**\n     * Props for the radio label component. See `HTMLAttributesWithRef` for more information.\n     */\n    radioLabel?: HTMLAttributesWithRef<HTMLSpanElement>;\n  }\n}\n\nexport const ThRadioGroup = ({\n  ref,\n  label,\n  items,\n  compounds,\n  children,\n  value,\n  ...props\n}: ThRadioGroupProps) => {\n  const radioGroupRef = useRef<HTMLDivElement>(null);\n\n  // Auto-detect when value doesn't match items and ensure first radio is focusable\n  // Otherwise all inputs will have tabindex -1 and the entire group will be skipped\n  // when tabbing.\n  useEffect(() => {\n    if (items?.length && radioGroupRef.current && value !== undefined) {\n      const valueMatches = items.some((item) => item.value === value);\n\n      if (!valueMatches) {\n        // When no value matches, make first radio focusable for tab navigation\n        const firstRadio = radioGroupRef.current.querySelector(\"input[type='radio']\") as HTMLInputElement;\n        if (firstRadio && firstRadio.getAttribute(\"tabindex\") !== \"0\") {\n          firstRadio.setAttribute(\"tabindex\", \"0\");\n        }\n      }\n      // When value matches, let React Aria handle tabindex completely\n    }\n  }, [items, value]);\n\n  if (React.isValidElement(children)) {\n    return (\n      <RadioGroup\n        ref={ ref || radioGroupRef }\n        value={ value }\n        { ...props }\n      >\n        { label && <Label { ...compounds?.label }>\n            { label }\n          </Label>\n        }\n        { children }\n      </RadioGroup>\n    )\n  } else if (items) {\n    return (\n      <RadioGroup\n        ref={ radioGroupRef }\n        value={ value }\n        { ...props }\n      >\n        { label && <Label { ...compounds?.label }>\n            { label }\n          </Label>\n        }\n        <div { ...compounds?.wrapper }>\n          { items.map((item) => (\n            <Radio\n              { ...compounds?.radio }\n              id={ item.id }\n              key={ item.id }\n              value={ item.value }\n              isDisabled={ item.isDisabled }\n            >\n              <React.Fragment>\n                { item.icon && <item.icon aria-hidden=\"true\" focusable=\"false\" /> }\n                <span { ...compounds?.radioLabel }>\n                  { item.label }\n                </span>\n              </React.Fragment>\n            </Radio>\n          )) }\n        </div>\n      </RadioGroup>\n    )\n  }\n};","\"use client\";\n\nimport { useCallback } from \"react\";\n\nimport { HTMLAttributesWithRef, WithRef } from \"../customTypes\";\nimport { ThActionButtonProps } from \"../Buttons\";\n\nimport { ThSettingsResetButton } from \"./ThSettingsResetButton\";\n\nimport { \n  Label,\n  LabelProps,\n  Slider,\n  SliderOutput,\n  SliderOutputProps,\n  SliderProps,\n  SliderThumb,\n  SliderThumbProps,\n  SliderTrack,\n  SliderTrackProps \n} from \"react-aria-components\";\n\nimport { useObjectRef } from \"react-aria\";\n\nexport interface ThSliderProps extends Omit<SliderProps, \"minValue\" | \"maxValue\"> {\n  ref?: React.ForwardedRef<HTMLDivElement>;\n  onReset?: () => void;\n  label?: string;\n  placeholder?: string;\n  range: number[];\n  compounds?: {\n    /**\n     * Props for the wrapper component.\n     */\n    wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n    /**\n     * Props for the label component. See `LabelProps` for more information.\n     */\n    label?: WithRef<LabelProps, HTMLLabelElement>;\n    /**\n     * Props for the slider output component. See `SliderOutputProps` for more information.\n     */\n    output?: WithRef<SliderOutputProps, HTMLOutputElement>;\n    /**\n     * Props for the slider placeholder component. See `HTMLSpanElement` for more information.\n     */\n    placeholder?: HTMLAttributesWithRef<HTMLSpanElement>;\n    /**\n     * Props for the slider track component. See `SliderTrackProps` for more information.\n     */\n    track?: WithRef<SliderTrackProps, HTMLDivElement>;\n    /**\n     * Props for the slider thumb component. See `SliderThumbProps` for more information.\n     */\n    thumb?: WithRef<SliderThumbProps, HTMLDivElement>;\n    /**\n     * Props for the reset button component. See `ThActionButtonProps` for more information.\n     */\n    reset?: ThActionButtonProps;\n  };\n}\n\nexport const ThSlider = ({\n  ref,\n  onReset,\n  label,\n  placeholder,\n  range,\n  compounds,\n  value,\n  ...props\n}: ThSliderProps) => {\n  const resolvedRef = useObjectRef(ref);\n\n  // Callback that handles reset and focus restoration\n  const handleResetWithFocus = useCallback(() => {\n    onReset?.();\n    // Use requestAnimationFrame to defer focus until after current call stack\n    requestAnimationFrame(() => {\n      if (resolvedRef.current) {\n        const inputElement = resolvedRef.current.querySelector(\"input\");\n        if (inputElement) {\n          (inputElement as HTMLElement).focus();\n        }\n      }\n    });\n  }, [onReset, resolvedRef]);\n  return(\n    <>\n    <div { ...compounds?.wrapper }>\n      <Slider\n        ref={ resolvedRef }\n        value={ value }\n        minValue={ Math.min(...range) }\n        maxValue={ Math.max(...range) }\n        { ...props }\n      >\n        { label && <Label { ...compounds?.label }>\n            { label }\n          </Label>\n        }\n        <SliderOutput { ...compounds?.output }>\n          {({ state }) => value !== undefined\n            ? state.getFormattedValue(state.values[0])\n            : placeholder\n              ? <span { ...compounds?.placeholder }>{ placeholder }</span>\n              : null\n          }\n        </SliderOutput>\n        <SliderTrack { ...compounds?.track }>\n          <SliderThumb { ...compounds?.thumb } />\n        </SliderTrack>\n      </Slider>\n      { onReset && <ThSettingsResetButton { ...compounds?.reset } onClick={ handleResetWithFocus } /> }\n    </div>\n    </>\n  )\n}","\"use client\";\n\nimport { useCallback } from \"react\";\n\nimport { RadioGroupProps } from \"react-aria-components\";\n\nimport { HTMLAttributesWithRef } from \"../customTypes\";\nimport { ThSlider, ThSliderProps } from \"./ThSlider\";\nimport { ThRadioGroup, ThRadioGroupProps } from \"./ThRadioGroup\";\n\nexport interface ThSliderWithPresetsProps extends Omit<ThSliderProps, \"compounds\"> {\n  presets: number[];\n  formatValue?: (value: number) => string;\n  compounds?: {\n    /**\n     * Props for the outer wrapper div (contains slider + presets).\n     */\n    wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n    /**\n     * Compounds forwarded to the inner ThSlider.\n     */\n    slider?: ThSliderProps[\"compounds\"];\n    /**\n     * Props for the RadioGroup element wrapping the presets.\n     */\n    presetsList?: Omit<RadioGroupProps, \"value\" | \"onChange\" | \"children\">;\n    /**\n     * Props for the inner wrapper div containing the Radio items (grid container).\n     */\n    presetsWrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n    /**\n     * Props applied to each preset Radio.\n     */\n    preset?: ThRadioGroupProps[\"compounds\"] extends infer C ? C extends { radio?: infer R } ? R : never : never;\n    /**\n     * Props applied to the label span inside each preset Radio.\n     */\n    presetLabel?: ThRadioGroupProps[\"compounds\"] extends infer C ? C extends { radioLabel?: infer L } ? L : never : never;\n  };\n}\n\nexport const ThSliderWithPresets = ({\n  presets,\n  formatValue,\n  value,\n  onChange,\n  compounds,\n  range,\n  step,\n  ...props\n}: ThSliderWithPresetsProps) => {\n  const currentValue = Array.isArray(value) ? value[0] : value;\n\n  const handleChange = useCallback((v: string) => {\n    onChange?.([parseFloat(v)]);\n  }, [onChange]);\n\n  const radioValue = currentValue !== undefined && presets.includes(currentValue)\n    ? String(currentValue)\n    : \"\";\n\n  const radioItems = presets.map((p) => ({\n    id: String(p),\n    value: String(p),\n    label: formatValue ? formatValue(p) : String(p),\n  }));\n\n  return (\n    <div { ...compounds?.wrapper }>\n      <ThSlider\n        value={ value }\n        onChange={ onChange }\n        range={ range }\n        step={ step }\n        compounds={ compounds?.slider }\n        { ...props }\n      />\n      <ThRadioGroup\n        { ...compounds?.presetsList }\n        value={ radioValue }\n        onChange={ handleChange }\n        items={ radioItems }\n        compounds={{\n          wrapper: compounds?.presetsWrapper,\n          radio: compounds?.preset,\n          radioLabel: compounds?.presetLabel,\n        }}\n      />\n    </div>\n  );\n};\n","\"use client\";\n\nimport { HTMLAttributesWithRef, WithRef } from \"../customTypes\";\n\nimport { Heading, HeadingProps, Switch, SwitchProps } from \"react-aria-components\";\n\nexport interface ThSwitchProps extends SwitchProps {\n  ref?: React.ForwardedRef<HTMLLabelElement>;\n  label: string;\n  heading?: string;\n  compounds?: {\n    /**\n     * Props for the wrapper component. See `HTMLAttributesWithRef` for more information.\n     */\n    wrapper?: HTMLAttributesWithRef<HTMLDivElement>;\n    /**\n     * Props for the heading component. See `HeadingProps` for more information.\n     */\n    heading?: WithRef<HeadingProps, HTMLHeadingElement>;\n    /**\n     * Props for the indicator component. See `HTMLAttributesWithRef` for more information.\n     */\n    indicator?: HTMLAttributesWithRef<HTMLDivElement>;\n  }\n}\n\nexport const ThSwitch = ({\n  ref,\n  label,\n  compounds,\n  heading, \n  ...props\n}: ThSwitchProps) => {\n  return(\n    <>\n    <div { ...compounds?.wrapper }>\n      { heading && <Heading { ...compounds?.heading }>\n          { heading }\n        </Heading> \n      }\n      <Switch \n        ref={ ref }\n        { ...props }\n      >\n        <div { ...compounds?.indicator } />\n        <span>{ label }</span>\n      </Switch>\n    </div>\n    </>\n  )\n}","import * as React from \"react\";\nconst SvgArrowDropDown = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"Inherit\" {...props}><path d=\"M480-360 280-560h400L480-360Z\" /></svg>;\nexport default SvgArrowDropDown;","\"use client\";\n\nimport ArrowDropDownIcon from \"./assets/icons/arrow_drop_down.svg\";\n\nimport { Button, ButtonProps, SelectValue } from \"react-aria-components\";\n\nexport interface ThDropdownButtonProps extends ButtonProps {\n  ref?: React.ForwardedRef<HTMLButtonElement>;\n}\n\nexport const ThDropdownButton = ({\n  ref,\n  children,\n  ...props\n}: ThDropdownButtonProps) => {\n  return (\n    <>\n    <Button \n      ref={ ref }\n      { ...props }\n    >\n      { children \n        ? children \n        : <>\n          <SelectValue /> \n          <ArrowDropDownIcon aria-hidden=\"true\" focusable=\"false\" />\n          </> \n      }\n    </Button>\n    </>\n  )\n}","\"use client\";\n\nimport React from \"react\";\n\nimport { WithRef } from \"../../customTypes\";\n\nimport { \n  Button,\n  ButtonProps, \n  Label, \n  LabelProps, \n  ListBox, \n  ListBoxItem, \n  ListBoxItemProps, \n  ListBoxProps, \n  Popover, \n  PopoverProps, \n  Select, \n  SelectProps \n} from \"react-aria-components\";\nimport { ThDropdownButton, ThDropdownButtonProps } from \"./ThDropdownButton\";\n\nexport interface ThDropdownEntry {\n  id: string;\n  label: string;\n  value: string;\n}\n\nexport interface ThDropdownProps extends SelectProps<object> {\n  ref?: React.ForwardedRef<HTMLDivElement>;\n  label?: string;\n  items?: Iterable<ThDropdownEntry>;\n  children?: never;\n  compounds?: {\n    /**\n     * Props for the label component. See `LabelProps` for more information.\n     */\n    label?: WithRef<LabelProps, HTMLLabelElement>;\n    /**\n     * Props for the button component. See `ThDropdownButtonProps` for more information.\n     * Alternatively you can provide your own Button component\n     */\n    button?: WithRef<ButtonProps, HTMLButtonElement> | React.ReactElement<typeof Button>;\n    /**\n     * Props for the popover component. See `PopoverProps` for more information.\n     */\n    popover?: WithRef<PopoverProps, HTMLDivElement>;\n    /**\n     * Props for the listbox component. See `LisboxProps` for more information.\n     * Alternatively you can provide your own Listbox component\n     */\n    listbox?: WithRef<ListBoxProps<ThDropdownEntry>, HTMLDivElement> | React.ReactElement<typeof ListBox | HTMLDivElement>;\n    /**\n     * Props for the listboxItem component. See `ListBoxItemProps` for more information.\n     */\n    listboxItem?: ListBoxItemProps<ThDropdownEntry>;\n  }\n}\n\nexport const ThDropdown = ({\n  ref,\n  label,\n  items,\n  compounds,\n  ...props\n}: ThDropdownProps) => {\n  if (!items && !React.isValidElement(compounds?.listbox)) {\n    return null;\n  }\n\n  return(\n    <>\n    <Select\n      ref={ ref }\n      { ...props }\n    >\n      { label && <Label { ...compounds?.label }>\n          { label }\n        </Label>\n      }\n      { compounds?.button && React.isValidElement(compounds.button) \n        ? compounds.button \n        : <ThDropdownButton { ...compounds?.button as ThDropdownButtonProps } />\n      }\n      <Popover\n        { ...compounds?.popover }\n      >\n      { compounds?.listbox && React.isValidElement(compounds.listbox) \n        ? compounds.listbox \n        : <ListBox \n            items={ items } \n            { ...compounds?.listbox }>\n            { (item: ThDropdownEntry) => <ListBoxItem \n                { ...compounds?.listboxItem }\n                id={ item.id } \n                key={ item.id } \n                textValue={ item.value || undefined }\n              >\n                { item.label }\n              </ListBoxItem>\n            }\n          </ListBox>\n      }\n      </Popover>\n    </Select>\n    </>\n  )\n}\n","import * as React from \"react\";\nconst SvgSettings = props => <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"inherit\" {...props}><path d=\"m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z\" /></svg>;\nexport default SvgSettings;","\"use client\";\n\nimport Settings from \"./assets/icons/settings.svg\";\n\nimport { ThActionButton, ThActionButtonProps } from \"../../Buttons/ThActionButton\";\n\nexport const ThSettingsWrapperButton = ({\n  label,\n  ref,\n  compounds,\n  children,\n  ...props\n}: ThActionButtonProps) => {\n  return (\n    <ThActionButton\n      ref={ ref }\n      compounds={ compounds }\n      { ...props }\n    >\n      { children \n        ? children \n        : <>\n          <Settings aria-hidden=\"true\" focusable=\"false\" /> \n          { label }\n          </> \n      }\n    </ThActionButton>\n  )\n}","\"use client\";\n\nimport React from \"react\";\n\nimport { ThSettingsWrapperButton } from \"./ThSettingsWrapperButton\";\n\nimport { Heading, HeadingProps } from \"react-aria-components\";\nimport { HTMLAttributesWithRef, WithRef } from \"../../customTypes\";\nimport { ThActionButtonProps } from \"../../Buttons\";\n\nexport interface ThSettingsEntry {\n  Comp: React.ComponentType<any>\n}\n\nexport interface ThSettingsPrefs {\n  main: string[];\n  subPanel?: string[] | null;\n}\n\nexport interface ThSettingsWrapperProps extends HTMLAttributesWithRef<HTMLDivElement> {\n  /**\n   * Label for advanced settings that will be displayed as a heading\n   */\n  label?: string;\n  items?: Record<string, ThSettingsEntry> | null;\n  prefs: ThSettingsPrefs;\n  compounds?: {\n    /**\n     * Props for the heading. Can be either:\n     * - A React element that will be rendered directly\n     * - Props that will be spread onto the default Heading component\n     */\n    heading?: WithRef<HeadingProps, HTMLHeadingElement> | React.ReactElement<typeof Heading>;\n    /**\n     * Props for the button that triggers the subpanel. See `ThActionButtonProps` for more information.\n     */\n    button?: ThActionButtonProps;\n  }\n}\n\n// TODO: Handle Standalone and Usage as Group\nexport const ThSettingsWrapper = ({\n  ref,\n  label,\n  items,\n  prefs,\n  compounds,\n  ...props\n}: ThSettingsWrapperProps) => {\n  const main = prefs.main;\n  const displayOrder = prefs.subPanel;\n  \n  const isAdvanced = items && (\n    main.length < Object.keys(items).length && \n    displayOrder && displayOrder.length > 0\n  );\n\n  if (items) {\n    return(\n      <>\n      <div \n        ref={ ref }\n        { ...props }\n      >\n        { isAdvanced && (compounds?.heading && React.isValidElement(compounds.heading)\n          ? compounds.heading\n          : label && (\n              <Heading { ...(compounds?.heading || {}) }>\n                { label }\n              </Heading>\n            )\n        ) }\n        { main.map((key, index) => {\n          const match = items[key];\n          return match && <match.Comp key={ key } standalone={ !isAdvanced || index !== 0 } { ...props } />;\n        }) }\n        { isAdvanced && (\n          <ThSettingsWrapperButton\n            { ...compounds?.button }\n          />\n        ) }\n      </div>\n      </>\n    )\n  }\n}","\"use client\";\n\nimport React from \"react\";\nimport { HTMLAttributesWithRef } from \"./customTypes\";\n\nexport interface ThGridProps<T> extends HTMLAttributesWithRef<HTMLUListElement> {\n  items: T[];\n  children?: never;\n  renderItem: (item: T, index: number) => React.ReactNode;\n  columnWidth?: number | string;\n  gap?: number | string;\n}\n\nexport const ThGrid = <T extends unknown>({\n  ref,\n  items,\n  renderItem,\n  columnWidth,\n  gap,\n  ...props\n}: ThGridProps<T>) => {\n  return (\n    <ul \n      ref={ ref } \n      { ...props }\n      style={{\n        ...props.style,\n        listStyle: \"none\",\n        margin: 0,\n        padding: 0,\n        display: \"grid\",\n        boxSizing: \"border-box\",\n        gridTemplateColumns: `repeat(auto-fill, minmax(min(100%, ${typeof columnWidth === \"string\" ? columnWidth : columnWidth + \"px\"}), 1fr))`,\n        gap: typeof gap === \"string\" ? gap : gap + \"px\"\n      }}\n    >\n      { items.map((item, index) => (\n        <li key={ index }>\n          { renderItem(item, index) }\n        </li>\n      )) }\n    </ul>\n  );\n};"]}