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AAA,EAAKC,aACXC,QAASlV,EACThkC,UAAuB,SAAKg4C,GAAc,CACxCpH,aAAcA,EACdsH,yBAA0BA,EAC1Bl4C,UAAuB,SAAK6kC,EAAiB,CAC3Ct/B,MAAOxF,EACPC,UAAuB,SAAKg3C,GAAiB,CAAC,U","sources":["webpack://oricheckoutclientapp/../../node_modules/@mui/material/ClickAwayListener/ClickAwayListener.js","webpack://oricheckoutclientapp/../../node_modules/@mui/system/esm/useMediaQuery/useMediaQuery.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/favorites-updated/dist/esm/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/loyalty-dialog-result/dist/esm/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/open-back-in-stock-notification-dialog/dist/esm/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/open-product-info-dialog/dist/esm/event.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/request-favorites/dist/esm/index.js","webpack://oricheckoutclientapp/../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","webpack://oricheckoutclientapp/../../node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs","webpack://oricheckoutclientapp/../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","webpack://oricheckoutclientapp/../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","webpack://oricheckoutclientapp/../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","webpack://oricheckoutclientapp/../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","webpack://oricheckoutclientapp/../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/utils/useForkCallback.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/constants.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/quantityPickerClasses.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/quantityPickerStyled.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/useDebug.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/QuantityPickerClickEvent.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/useQuantityPicker.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/useControlledQuantityPicker.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/useUncontrolledQuantityPicker.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/QuantityPicker.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/QuantityPicker/useVisualProps.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/Add/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/AddToBag/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/AddToBagFilled/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/DiscountTagFilled/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/EmptyBasket/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/EmptyBasketFilled/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/Heart/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/HeartFilled/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/Notification/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/NotificationFilled/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/OriflameSpinner/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/Products/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/Remove/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/icons/dist/esm/SuperdealFilled/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/toggle-favorite/dist/esm/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/node_modules/uuid/dist/esm-browser/native.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/node_modules/uuid/dist/esm-browser/rng.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/node_modules/uuid/dist/esm-browser/stringify.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/node_modules/uuid/dist/esm-browser/v4.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/HeartsAnimation/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/HeartsAnimation/Heart.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/HeartsAnimation/HeartsAnimation.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/common/constants.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/FavoritesHeart/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/FavoritesHeart/HeartIcon.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/FavoritesHeart/FavoritesHeart.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/FavoritesHeartIconButton/utils.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/FavoritesHeartIconButton/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/favorites-heart/dist/esm/components/FavoritesHeartIconButton/FavoritesHeartIconButton.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/common/constants/carousel.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/ImagePlaceholder/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/ImagePlaceholder/ImagePlaceholder.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/shadeClasses.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/utils/getShadeBackground.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/constants.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/utils/getBoxShadow.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/utils/getShadeClearIconColor.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/utils/getShadeClearIconSize.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/utils/getShadeBorder.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/utils/getShadeRootSize.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/Shade.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/Shade/types.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-hooks/dist/esm/useDisclose.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-hooks/dist/esm/useIsMobile.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/constants-generated.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/context/productContext.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/logger.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/containers/ErrorBoundary.js","webpack://oricheckoutclientapp/../../node_modules/@ori/image-sizes-helper/dist/esm/constants.js","webpack://oricheckoutclientapp/../../node_modules/@ori/image-sizes-helper/dist/esm/internal/constants/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori/image-sizes-helper/dist/esm/utils/getImageVariants.js","webpack://oricheckoutclientapp/../../node_modules/@ori/image-sizes-helper/dist/esm/internal/getBackgroundColorForVariants.js","webpack://oricheckoutclientapp/../../node_modules/@ori/image-sizes-helper/dist/esm/internal/sanitizeUrlFromWrongParams.js","webpack://oricheckoutclientapp/../../node_modules/@ori/image-sizes-helper/dist/esm/internal/createVariant.js","webpack://oricheckoutclientapp/../../node_modules/@ori/image-sizes-helper/dist/esm/utils/generateSrcSet.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/hooks/internal/useProduct.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/ProductImage/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/ProductImage/ProductImage.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/DealLabel/isDealLabel.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/utils/internal/getPointsBackground.js","webpack://oricheckoutclientapp/../../node_modules/@mui/material/Fab/fabClasses.js","webpack://oricheckoutclientapp/../../node_modules/@mui/material/Fab/Fab.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/DealLabel/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/DealLabel/CatalogueOfferTooltip.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/DealLabel/CatalogueOfferLabel.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/DealLabel/InnerDealLabel.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/PointsOrDealLabel/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/DealLabel/DealLabel.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/PointsOrDealLabel/PointsOrDealLabel.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/open-shade-picker/dist/esm/event.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/common/constants/quickBuyButton.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/QuickBuyButton/helpers.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-hooks/dist/esm/useGlobalEvents.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/utils/getDesktopSize.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/QuickBuyButton/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/QuickBuyButton/QuickBuyButton.js","webpack://oricheckoutclientapp/../../node_modules/@ori/presentation-components/dist/esm/components/QuickBuyButton/hooks.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/product-box-disabled-quickbuy-clicked/dist/esm/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/hooks/useTranslations.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/NotifyMe.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/BuyOrNotifyMe.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/hooks/internal/useQuickBuyButtonTooltipHandlers.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/Favorites.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/BottomIconButtons.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/utils/internal/openShadePicker.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/StarRating/starRatingClasses.js","webpack://oricheckoutclientapp/../../node_modules/@ori-ui/components/dist/esm/StarRating/StarRating.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/Rating/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/Rating/Rating.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/Shades/constants.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/Shades/components/ShadeWithName/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/Shades/components/ShadeWithName/ShadeWithName.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/Shades/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/Shades/components/ShadesResponsive.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/Shades/Shades.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/PricesSection/constants.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/PricesSection/utils/getCurrentPriceColor.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/PricesSection/styles.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/PricesSection/utils/isOldPriceVisible.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/PricesSection/PricesSection.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/constants.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/QuantityPicker.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/Remove.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/components/IconButtons/TopIconButtons.js","webpack://oricheckoutclientapp/../../node_modules/@ori-events/product-click/dist/esm/index.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/containers/InnerProductBox.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/hooks/internal/useOnClick.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/containers/Translations.js","webpack://oricheckoutclientapp/../../node_modules/@ori/product-box/dist/esm/containers/ProductBox.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { elementAcceptingRef, exactProp, unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback } from '@mui/utils';\n\n// TODO: return `EventHandlerName extends `on${infer EventName}` ? Lowercase<EventName> : never` once generatePropTypes runs with TS 4.1\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction mapEventPropToEvent(eventProp) {\n  return eventProp.substring(2).toLowerCase();\n}\nfunction clickedRootScrollbar(event, doc) {\n  return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;\n}\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n *\n * Demos:\n *\n * - [Click-Away Listener](https://mui.com/material-ui/react-click-away-listener/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n *\n * API:\n *\n * - [ClickAwayListener API](https://mui.com/material-ui/api/click-away-listener/)\n */\nfunction ClickAwayListener(props) {\n  const {\n    children,\n    disableReactTree = false,\n    mouseEvent = 'onClick',\n    onClickAway,\n    touchEvent = 'onTouchEnd'\n  } = props;\n  const movedRef = React.useRef(false);\n  const nodeRef = React.useRef(null);\n  const activatedRef = React.useRef(false);\n  const syntheticEventRef = React.useRef(false);\n  React.useEffect(() => {\n    // Ensure that this component is not \"activated\" synchronously.\n    // https://github.com/facebook/react/issues/20074\n    setTimeout(() => {\n      activatedRef.current = true;\n    }, 0);\n    return () => {\n      activatedRef.current = false;\n    };\n  }, []);\n  const handleRef = useForkRef(\n  // @ts-expect-error TODO upstream fix\n  children.ref, nodeRef);\n\n  // The handler doesn't take event.defaultPrevented into account:\n  //\n  // event.preventDefault() is meant to stop default behaviors like\n  // clicking a checkbox to check it, hitting a button to submit a form,\n  // and hitting left arrow to move the cursor in a text input etc.\n  // Only special HTML elements have these default behaviors.\n  const handleClickAway = useEventCallback(event => {\n    // Given developers can stop the propagation of the synthetic event,\n    // we can only be confident with a positive value.\n    const insideReactTree = syntheticEventRef.current;\n    syntheticEventRef.current = false;\n    const doc = ownerDocument(nodeRef.current);\n\n    // 1. IE11 support, which trigger the handleClickAway even after the unbind\n    // 2. The child might render null.\n    // 3. Behave like a blur listener.\n    if (!activatedRef.current || !nodeRef.current || 'clientX' in event && clickedRootScrollbar(event, doc)) {\n      return;\n    }\n\n    // Do not act if user performed touchmove\n    if (movedRef.current) {\n      movedRef.current = false;\n      return;\n    }\n    let insideDOM;\n\n    // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n    if (event.composedPath) {\n      insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n    } else {\n      insideDOM = !doc.documentElement.contains(\n      // @ts-expect-error returns `false` as intended when not dispatched from a Node\n      event.target) || nodeRef.current.contains(\n      // @ts-expect-error returns `false` as intended when not dispatched from a Node\n      event.target);\n    }\n    if (!insideDOM && (disableReactTree || !insideReactTree)) {\n      onClickAway(event);\n    }\n  });\n\n  // Keep track of mouse/touch events that bubbled up through the portal.\n  const createHandleSynthetic = handlerName => event => {\n    syntheticEventRef.current = true;\n    const childrenPropsHandler = children.props[handlerName];\n    if (childrenPropsHandler) {\n      childrenPropsHandler(event);\n    }\n  };\n  const childrenProps = {\n    ref: handleRef\n  };\n  if (touchEvent !== false) {\n    childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n  }\n  React.useEffect(() => {\n    if (touchEvent !== false) {\n      const mappedTouchEvent = mapEventPropToEvent(touchEvent);\n      const doc = ownerDocument(nodeRef.current);\n      const handleTouchMove = () => {\n        movedRef.current = true;\n      };\n      doc.addEventListener(mappedTouchEvent, handleClickAway);\n      doc.addEventListener('touchmove', handleTouchMove);\n      return () => {\n        doc.removeEventListener(mappedTouchEvent, handleClickAway);\n        doc.removeEventListener('touchmove', handleTouchMove);\n      };\n    }\n    return undefined;\n  }, [handleClickAway, touchEvent]);\n  if (mouseEvent !== false) {\n    childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n  }\n  React.useEffect(() => {\n    if (mouseEvent !== false) {\n      const mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n      const doc = ownerDocument(nodeRef.current);\n      doc.addEventListener(mappedMouseEvent, handleClickAway);\n      return () => {\n        doc.removeEventListener(mappedMouseEvent, handleClickAway);\n      };\n    }\n    return undefined;\n  }, [handleClickAway, mouseEvent]);\n  return /*#__PURE__*/_jsx(React.Fragment, {\n    children: /*#__PURE__*/React.cloneElement(children, childrenProps)\n  });\n}\nprocess.env.NODE_ENV !== \"production\" ? ClickAwayListener.propTypes /* remove-proptypes */ = {\n  // ┌────────────────────────────── Warning ──────────────────────────────┐\n  // │ These PropTypes are generated from the TypeScript type definitions. │\n  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n  // └─────────────────────────────────────────────────────────────────────┘\n  /**\n   * The wrapped element.\n   */\n  children: elementAcceptingRef.isRequired,\n  /**\n   * If `true`, the React tree is ignored and only the DOM tree is considered.\n   * This prop changes how portaled elements are handled.\n   * @default false\n   */\n  disableReactTree: PropTypes.bool,\n  /**\n   * The mouse event to listen to. You can disable the listener by providing `false`.\n   * @default 'onClick'\n   */\n  mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', 'onPointerDown', 'onPointerUp', false]),\n  /**\n   * Callback fired when a \"click away\" event is detected.\n   */\n  onClickAway: PropTypes.func.isRequired,\n  /**\n   * The touch event to listen to. You can disable the listener by providing `false`.\n   * @default 'onTouchEnd'\n   */\n  touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n  // eslint-disable-next-line\n  ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);\n}\nexport { ClickAwayListener };","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { getThemeProps } from '../useThemeProps';\nimport useTheme from '../useThemeWithoutDefault';\n\n/**\n * @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.\n */\n\n/**\n * @deprecated Not used internally. Use `MediaQueryList` from lib.dom.d.ts instead.\n */\n\n/**\n * @deprecated Not used internally. Use `(event: MediaQueryListEvent) => void` instead.\n */\n\nfunction useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {\n  const [match, setMatch] = React.useState(() => {\n    if (noSsr && matchMedia) {\n      return matchMedia(query).matches;\n    }\n    if (ssrMatchMedia) {\n      return ssrMatchMedia(query).matches;\n    }\n\n    // Once the component is mounted, we rely on the\n    // event listeners to return the correct matches value.\n    return defaultMatches;\n  });\n  useEnhancedEffect(() => {\n    let active = true;\n    if (!matchMedia) {\n      return undefined;\n    }\n    const queryList = matchMedia(query);\n    const updateMatch = () => {\n      // Workaround Safari wrong implementation of matchMedia\n      // TODO can we remove it?\n      // https://github.com/mui/material-ui/pull/17315#issuecomment-528286677\n      if (active) {\n        setMatch(queryList.matches);\n      }\n    };\n    updateMatch();\n    // TODO: Use `addEventListener` once support for Safari < 14 is dropped\n    queryList.addListener(updateMatch);\n    return () => {\n      active = false;\n      queryList.removeListener(updateMatch);\n    };\n  }, [query, matchMedia]);\n  return match;\n}\n\n// eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];\nfunction useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {\n  const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);\n  const getServerSnapshot = React.useMemo(() => {\n    if (noSsr && matchMedia) {\n      return () => matchMedia(query).matches;\n    }\n    if (ssrMatchMedia !== null) {\n      const {\n        matches\n      } = ssrMatchMedia(query);\n      return () => matches;\n    }\n    return getDefaultSnapshot;\n  }, [getDefaultSnapshot, query, ssrMatchMedia, noSsr, matchMedia]);\n  const [getSnapshot, subscribe] = React.useMemo(() => {\n    if (matchMedia === null) {\n      return [getDefaultSnapshot, () => () => {}];\n    }\n    const mediaQueryList = matchMedia(query);\n    return [() => mediaQueryList.matches, notify => {\n      // TODO: Use `addEventListener` once support for Safari < 14 is dropped\n      mediaQueryList.addListener(notify);\n      return () => {\n        mediaQueryList.removeListener(notify);\n      };\n    }];\n  }, [getDefaultSnapshot, matchMedia, query]);\n  const match = maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n  return match;\n}\nexport default function useMediaQuery(queryInput, options = {}) {\n  const theme = useTheme();\n  // Wait for jsdom to support the match media feature.\n  // All the browsers MUI support have this built-in.\n  // This defensive check is here for simplicity.\n  // Most of the time, the match media logic isn't central to people tests.\n  const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n  const {\n    defaultMatches = false,\n    matchMedia = supportMatchMedia ? window.matchMedia : null,\n    ssrMatchMedia = null,\n    noSsr = false\n  } = getThemeProps({\n    name: 'MuiUseMediaQuery',\n    props: options,\n    theme\n  });\n  if (process.env.NODE_ENV !== 'production') {\n    if (typeof queryInput === 'function' && theme === null) {\n      console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n    }\n  }\n  let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n  query = query.replace(/^@media( ?)/m, '');\n\n  // TODO: Drop `useMediaQueryOld` and use  `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable\n  const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;\n  const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);\n  if (process.env.NODE_ENV !== 'production') {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    React.useDebugValue({\n      query,\n      match\n    });\n  }\n  return match;\n}","export const Name = 'favorites-updated';\nexport const FavoritesUpdated = Name;\n//# sourceMappingURL=index.js.map","import { Method } from '@ori-events/add-to-basket';\nexport const Name = 'loyalty-dialog-result';\nexport const LoyaltyDialogResultEvent = Name;\nexport let LoyaltyDialogResults = /*#__PURE__*/function (LoyaltyDialogResults) {\n  LoyaltyDialogResults[\"CLOSE\"] = \"CLOSE\";\n  return LoyaltyDialogResults;\n}({});\nexport { Method };\nexport let Results = function (Results) {\n  Results[\"CLOSE\"] = \"CLOSE\";\n  Results[Results[\"BUY_FOR_MONEY\"] = Method.BUY_FOR_MONEY] = \"BUY_FOR_MONEY\";\n  Results[Results[\"BUY_FOR_POINTS\"] = Method.BUY_FOR_POINTS] = \"BUY_FOR_POINTS\";\n  return Results;\n}({});\nexport const isLoyaltyBuyForMoneyResult = result => result === Method.BUY_FOR_MONEY;\nexport const isLoyaltyBuyForPointsResult = result => result === Method.BUY_FOR_POINTS;\nexport const isLoyaltyCloseResult = result => result === LoyaltyDialogResults.CLOSE;\n//# sourceMappingURL=index.js.map","export const Name = 'open-back-in-stock-notification-dialog';\nexport const ToggleFavorite = Name;\n//# sourceMappingURL=index.js.map","export const Name = 'open-product-info-dialog';\nexport const OpenProductInfoDialogDialog = Name;\nexport let DialogMode = /*#__PURE__*/function (DialogMode) {\n  DialogMode[\"Favorites\"] = \"favorites\";\n  DialogMode[\"Loading\"] = \"loading\";\n  DialogMode[\"StandardBuy\"] = \"standardBuy\";\n  return DialogMode;\n}({});\n//# sourceMappingURL=event.js.map","export const Name = 'request-favorites';\nexport const RequestFavorites = Name;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface -- Used only to request state update across SPAs.\n//# sourceMappingURL=index.js.map","function hasWindow() {\n  return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n  if (isNode(node)) {\n    return (node.nodeName || '').toLowerCase();\n  }\n  // Mocked nodes in testing environments may not be instances of Node. By\n  // returning `#document` an infinite loop won't occur.\n  // https://github.com/floating-ui/floating-ui/issues/2317\n  return '#document';\n}\nfunction getWindow(node) {\n  var _node$ownerDocument;\n  return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n  var _ref;\n  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n  if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n  const {\n    overflow,\n    overflowX,\n    overflowY,\n    display\n  } = getComputedStyle(element);\n  return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n  return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n  return [':popover-open', ':modal'].some(selector => {\n    try {\n      return element.matches(selector);\n    } catch (e) {\n      return false;\n    }\n  });\n}\nfunction isContainingBlock(elementOrCss) {\n  const webkit = isWebKit();\n  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n  return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n  let currentNode = getParentNode(element);\n  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    if (isContainingBlock(currentNode)) {\n      return currentNode;\n    } else if (isTopLayer(currentNode)) {\n      return null;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  return null;\n}\nfunction isWebKit() {\n  if (typeof CSS === 'undefined' || !CSS.supports) return false;\n  return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n  return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n  if (isElement(element)) {\n    return {\n      scrollLeft: element.scrollLeft,\n      scrollTop: element.scrollTop\n    };\n  }\n  return {\n    scrollLeft: element.scrollX,\n    scrollTop: element.scrollY\n  };\n}\nfunction getParentNode(node) {\n  if (getNodeName(node) === 'html') {\n    return node;\n  }\n  const result =\n  // Step into the shadow DOM of the parent of a slotted node.\n  node.assignedSlot ||\n  // DOM Element detected.\n  node.parentNode ||\n  // ShadowRoot detected.\n  isShadowRoot(node) && node.host ||\n  // Fallback.\n  getDocumentElement(node);\n  return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n  const parentNode = getParentNode(node);\n  if (isLastTraversableNode(parentNode)) {\n    return node.ownerDocument ? node.ownerDocument.body : node.body;\n  }\n  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n    return parentNode;\n  }\n  return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n  var _node$ownerDocument2;\n  if (list === void 0) {\n    list = [];\n  }\n  if (traverseIframes === void 0) {\n    traverseIframes = true;\n  }\n  const scrollableAncestor = getNearestOverflowAncestor(node);\n  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n  const win = getWindow(scrollableAncestor);\n  if (isBody) {\n    const frameElement = getFrameElement(win);\n    return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n  }\n  return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';\n\nfunction activeElement(doc) {\n  let activeElement = doc.activeElement;\n  while (((_activeElement = activeElement) == null || (_activeElement = _activeElement.shadowRoot) == null ? void 0 : _activeElement.activeElement) != null) {\n    var _activeElement;\n    activeElement = activeElement.shadowRoot.activeElement;\n  }\n  return activeElement;\n}\nfunction contains(parent, child) {\n  if (!parent || !child) {\n    return false;\n  }\n  const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();\n\n  // First, attempt with faster native method\n  if (parent.contains(child)) {\n    return true;\n  }\n\n  // then fallback to custom implementation with Shadow DOM support\n  if (rootNode && isShadowRoot(rootNode)) {\n    let next = child;\n    while (next) {\n      if (parent === next) {\n        return true;\n      }\n      // @ts-ignore\n      next = next.parentNode || next.host;\n    }\n  }\n\n  // Give up, the result is false\n  return false;\n}\n// Avoid Chrome DevTools blue warning.\nfunction getPlatform() {\n  const uaData = navigator.userAgentData;\n  if (uaData != null && uaData.platform) {\n    return uaData.platform;\n  }\n  return navigator.platform;\n}\nfunction getUserAgent() {\n  const uaData = navigator.userAgentData;\n  if (uaData && Array.isArray(uaData.brands)) {\n    return uaData.brands.map(_ref => {\n      let {\n        brand,\n        version\n      } = _ref;\n      return brand + \"/\" + version;\n    }).join(' ');\n  }\n  return navigator.userAgent;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nfunction isVirtualClick(event) {\n  // FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.\n  // Try to find a workaround for this. `react-aria` source still has the check.\n  if (event.mozInputSource === 0 && event.isTrusted) {\n    return true;\n  }\n  if (isAndroid() && event.pointerType) {\n    return event.type === 'click' && event.buttons === 1;\n  }\n  return event.detail === 0 && !event.pointerType;\n}\nfunction isVirtualPointerEvent(event) {\n  if (isJSDOM()) return false;\n  return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n  // iOS VoiceOver returns 0.333• for width/height.\n  event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nfunction isSafari() {\n  // Chrome DevTools does not complain about navigator.vendor\n  return /apple/i.test(navigator.vendor);\n}\nfunction isAndroid() {\n  const re = /android/i;\n  return re.test(getPlatform()) || re.test(getUserAgent());\n}\nfunction isMac() {\n  return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\n}\nfunction isJSDOM() {\n  return getUserAgent().includes('jsdom/');\n}\nfunction isMouseLikePointerType(pointerType, strict) {\n  // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n  // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n  const values = ['mouse', 'pen'];\n  if (!strict) {\n    values.push('', undefined);\n  }\n  return values.includes(pointerType);\n}\nfunction isReactEvent(event) {\n  return 'nativeEvent' in event;\n}\nfunction isRootElement(element) {\n  return element.matches('html,body');\n}\nfunction getDocument(node) {\n  return (node == null ? void 0 : node.ownerDocument) || document;\n}\nfunction isEventTargetWithin(event, node) {\n  if (node == null) {\n    return false;\n  }\n  if ('composedPath' in event) {\n    return event.composedPath().includes(node);\n  }\n\n  // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n  const e = event;\n  return e.target != null && node.contains(e.target);\n}\nfunction getTarget(event) {\n  if ('composedPath' in event) {\n    return event.composedPath()[0];\n  }\n\n  // TS thinks `event` is of type never as it assumes all browsers support\n  // `composedPath()`, but browsers without shadow DOM don't.\n  return event.target;\n}\nconst TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nfunction isTypeableElement(element) {\n  return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nfunction stopEvent(event) {\n  event.preventDefault();\n  event.stopPropagation();\n}\nfunction isTypeableCombobox(element) {\n  if (!element) return false;\n  return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\n\nexport { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isAndroid, isEventTargetWithin, isJSDOM, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n  x: v,\n  y: v\n});\nconst oppositeSideMap = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n  start: 'end',\n  end: 'start'\n};\nfunction clamp(start, value, end) {\n  return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n  return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n  return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n  return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n  return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n  return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n  return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n  if (rtl === void 0) {\n    rtl = false;\n  }\n  const alignment = getAlignment(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const length = getAxisLength(alignmentAxis);\n  let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n  if (rects.reference[length] > rects.floating[length]) {\n    mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n  }\n  return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n  const oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n  const lr = ['left', 'right'];\n  const rl = ['right', 'left'];\n  const tb = ['top', 'bottom'];\n  const bt = ['bottom', 'top'];\n  switch (side) {\n    case 'top':\n    case 'bottom':\n      if (rtl) return isStart ? rl : lr;\n      return isStart ? lr : rl;\n    case 'left':\n    case 'right':\n      return isStart ? tb : bt;\n    default:\n      return [];\n  }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n  const alignment = getAlignment(placement);\n  let list = getSideList(getSide(placement), direction === 'start', rtl);\n  if (alignment) {\n    list = list.map(side => side + \"-\" + alignment);\n    if (flipAlignment) {\n      list = list.concat(list.map(getOppositeAlignmentPlacement));\n    }\n  }\n  return list;\n}\nfunction getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0,\n    ...padding\n  };\n}\nfunction getPaddingObject(padding) {\n  return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n    top: padding,\n    right: padding,\n    bottom: padding,\n    left: padding\n  };\n}\nfunction rectToClientRect(rect) {\n  const {\n    x,\n    y,\n    width,\n    height\n  } = rect;\n  return {\n    width,\n    height,\n    top: y,\n    left: x,\n    right: x + width,\n    bottom: y + height,\n    x,\n    y\n  };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n  let {\n    reference,\n    floating\n  } = _ref;\n  const sideAxis = getSideAxis(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const alignLength = getAxisLength(alignmentAxis);\n  const side = getSide(placement);\n  const isVertical = sideAxis === 'y';\n  const commonX = reference.x + reference.width / 2 - floating.width / 2;\n  const commonY = reference.y + reference.height / 2 - floating.height / 2;\n  const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n  let coords;\n  switch (side) {\n    case 'top':\n      coords = {\n        x: commonX,\n        y: reference.y - floating.height\n      };\n      break;\n    case 'bottom':\n      coords = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n    case 'right':\n      coords = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n    case 'left':\n      coords = {\n        x: reference.x - floating.width,\n        y: commonY\n      };\n      break;\n    default:\n      coords = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n  switch (getAlignment(placement)) {\n    case 'start':\n      coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n    case 'end':\n      coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n  }\n  return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n  const {\n    placement = 'bottom',\n    strategy = 'absolute',\n    middleware = [],\n    platform\n  } = config;\n  const validMiddleware = middleware.filter(Boolean);\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n  let rects = await platform.getElementRects({\n    reference,\n    floating,\n    strategy\n  });\n  let {\n    x,\n    y\n  } = computeCoordsFromPlacement(rects, placement, rtl);\n  let statefulPlacement = placement;\n  let middlewareData = {};\n  let resetCount = 0;\n  for (let i = 0; i < validMiddleware.length; i++) {\n    const {\n      name,\n      fn\n    } = validMiddleware[i];\n    const {\n      x: nextX,\n      y: nextY,\n      data,\n      reset\n    } = await fn({\n      x,\n      y,\n      initialPlacement: placement,\n      placement: statefulPlacement,\n      strategy,\n      middlewareData,\n      rects,\n      platform,\n      elements: {\n        reference,\n        floating\n      }\n    });\n    x = nextX != null ? nextX : x;\n    y = nextY != null ? nextY : y;\n    middlewareData = {\n      ...middlewareData,\n      [name]: {\n        ...middlewareData[name],\n        ...data\n      }\n    };\n    if (reset && resetCount <= 50) {\n      resetCount++;\n      if (typeof reset === 'object') {\n        if (reset.placement) {\n          statefulPlacement = reset.placement;\n        }\n        if (reset.rects) {\n          rects = reset.rects === true ? await platform.getElementRects({\n            reference,\n            floating,\n            strategy\n          }) : reset.rects;\n        }\n        ({\n          x,\n          y\n        } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n      }\n      i = -1;\n    }\n  }\n  return {\n    x,\n    y,\n    placement: statefulPlacement,\n    strategy,\n    middlewareData\n  };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n  var _await$platform$isEle;\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    x,\n    y,\n    platform,\n    rects,\n    elements,\n    strategy\n  } = state;\n  const {\n    boundary = 'clippingAncestors',\n    rootBoundary = 'viewport',\n    elementContext = 'floating',\n    altBoundary = false,\n    padding = 0\n  } = evaluate(options, state);\n  const paddingObject = getPaddingObject(padding);\n  const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n  const element = elements[altBoundary ? altContext : elementContext];\n  const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n    element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n    boundary,\n    rootBoundary,\n    strategy\n  }));\n  const rect = elementContext === 'floating' ? {\n    x,\n    y,\n    width: rects.floating.width,\n    height: rects.floating.height\n  } : rects.reference;\n  const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n  const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n    x: 1,\n    y: 1\n  } : {\n    x: 1,\n    y: 1\n  };\n  const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  }) : rect);\n  return {\n    top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n    bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n    left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n    right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n  };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n  name: 'arrow',\n  options,\n  async fn(state) {\n    const {\n      x,\n      y,\n      placement,\n      rects,\n      platform,\n      elements,\n      middlewareData\n    } = state;\n    // Since `element` is required, we don't Partial<> the type.\n    const {\n      element,\n      padding = 0\n    } = evaluate(options, state) || {};\n    if (element == null) {\n      return {};\n    }\n    const paddingObject = getPaddingObject(padding);\n    const coords = {\n      x,\n      y\n    };\n    const axis = getAlignmentAxis(placement);\n    const length = getAxisLength(axis);\n    const arrowDimensions = await platform.getDimensions(element);\n    const isYAxis = axis === 'y';\n    const minProp = isYAxis ? 'top' : 'left';\n    const maxProp = isYAxis ? 'bottom' : 'right';\n    const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n    const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n    const startDiff = coords[axis] - rects.reference[axis];\n    const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n    let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n    // DOM platform can return `window` as the `offsetParent`.\n    if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n      clientSize = elements.floating[clientProp] || rects.floating[length];\n    }\n    const centerToReference = endDiff / 2 - startDiff / 2;\n\n    // If the padding is large enough that it causes the arrow to no longer be\n    // centered, modify the padding so that it is centered.\n    const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n    const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n    const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n    // Make sure the arrow doesn't overflow the floating element if the center\n    // point is outside the floating element's bounds.\n    const min$1 = minPadding;\n    const max = clientSize - arrowDimensions[length] - maxPadding;\n    const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n    const offset = clamp(min$1, center, max);\n\n    // If the reference is small enough that the arrow's padding causes it to\n    // to point to nothing for an aligned placement, adjust the offset of the\n    // floating element itself. To ensure `shift()` continues to take action,\n    // a single reset is performed when this is true.\n    const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n    const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n    return {\n      [axis]: coords[axis] + alignmentOffset,\n      data: {\n        [axis]: offset,\n        centerOffset: center - offset - alignmentOffset,\n        ...(shouldAddOffset && {\n          alignmentOffset\n        })\n      },\n      reset: shouldAddOffset\n    };\n  }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n  const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n  return allowedPlacementsSortedByAlignment.filter(placement => {\n    if (alignment) {\n      return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n    }\n    return true;\n  });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'autoPlacement',\n    options,\n    async fn(state) {\n      var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n      const {\n        rects,\n        middlewareData,\n        placement,\n        platform,\n        elements\n      } = state;\n      const {\n        crossAxis = false,\n        alignment,\n        allowedPlacements = placements,\n        autoAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n      const currentPlacement = placements$1[currentIndex];\n      if (currentPlacement == null) {\n        return {};\n      }\n      const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n      // Make `computeCoords` start from the right place.\n      if (placement !== currentPlacement) {\n        return {\n          reset: {\n            placement: placements$1[0]\n          }\n        };\n      }\n      const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n      const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n        placement: currentPlacement,\n        overflows: currentOverflows\n      }];\n      const nextPlacement = placements$1[currentIndex + 1];\n\n      // There are more placements to check.\n      if (nextPlacement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: nextPlacement\n          }\n        };\n      }\n      const placementsSortedByMostSpace = allOverflows.map(d => {\n        const alignment = getAlignment(d.placement);\n        return [d.placement, alignment && crossAxis ?\n        // Check along the mainAxis and main crossAxis side.\n        d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n        // Check only the mainAxis.\n        d.overflows[0], d.overflows];\n      }).sort((a, b) => a[1] - b[1]);\n      const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n      // Aligned placements should not check their opposite crossAxis\n      // side.\n      getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n      const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n      if (resetPlacement !== placement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: resetPlacement\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'flip',\n    options,\n    async fn(state) {\n      var _middlewareData$arrow, _middlewareData$flip;\n      const {\n        placement,\n        middlewareData,\n        rects,\n        initialPlacement,\n        platform,\n        elements\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = true,\n        fallbackPlacements: specifiedFallbackPlacements,\n        fallbackStrategy = 'bestFit',\n        fallbackAxisSideDirection = 'none',\n        flipAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n\n      // If a reset by the arrow was caused due to an alignment offset being\n      // added, we should skip any logic now since `flip()` has already done its\n      // work.\n      // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n      if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      const side = getSide(placement);\n      const initialSideAxis = getSideAxis(initialPlacement);\n      const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n      const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n      const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n      const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n      if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n        fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n      }\n      const placements = [initialPlacement, ...fallbackPlacements];\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const overflows = [];\n      let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n      if (checkMainAxis) {\n        overflows.push(overflow[side]);\n      }\n      if (checkCrossAxis) {\n        const sides = getAlignmentSides(placement, rects, rtl);\n        overflows.push(overflow[sides[0]], overflow[sides[1]]);\n      }\n      overflowsData = [...overflowsData, {\n        placement,\n        overflows\n      }];\n\n      // One or more sides is overflowing.\n      if (!overflows.every(side => side <= 0)) {\n        var _middlewareData$flip2, _overflowsData$filter;\n        const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n        const nextPlacement = placements[nextIndex];\n        if (nextPlacement) {\n          // Try next placement and re-run the lifecycle.\n          return {\n            data: {\n              index: nextIndex,\n              overflows: overflowsData\n            },\n            reset: {\n              placement: nextPlacement\n            }\n          };\n        }\n\n        // First, find the candidates that fit on the mainAxis side of overflow,\n        // then find the placement that fits the best on the main crossAxis side.\n        let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n        // Otherwise fallback.\n        if (!resetPlacement) {\n          switch (fallbackStrategy) {\n            case 'bestFit':\n              {\n                var _overflowsData$filter2;\n                const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n                  if (hasFallbackAxisSideDirection) {\n                    const currentSideAxis = getSideAxis(d.placement);\n                    return currentSideAxis === initialSideAxis ||\n                    // Create a bias to the `y` side axis due to horizontal\n                    // reading directions favoring greater width.\n                    currentSideAxis === 'y';\n                  }\n                  return true;\n                }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n                if (placement) {\n                  resetPlacement = placement;\n                }\n                break;\n              }\n            case 'initialPlacement':\n              resetPlacement = initialPlacement;\n              break;\n          }\n        }\n        if (placement !== resetPlacement) {\n          return {\n            reset: {\n              placement: resetPlacement\n            }\n          };\n        }\n      }\n      return {};\n    }\n  };\n};\n\nfunction getSideOffsets(overflow, rect) {\n  return {\n    top: overflow.top - rect.height,\n    right: overflow.right - rect.width,\n    bottom: overflow.bottom - rect.height,\n    left: overflow.left - rect.width\n  };\n}\nfunction isAnySideFullyClipped(overflow) {\n  return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'hide',\n    options,\n    async fn(state) {\n      const {\n        rects\n      } = state;\n      const {\n        strategy = 'referenceHidden',\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      switch (strategy) {\n        case 'referenceHidden':\n          {\n            const overflow = await detectOverflow(state, {\n              ...detectOverflowOptions,\n              elementContext: 'reference'\n            });\n            const offsets = getSideOffsets(overflow, rects.reference);\n            return {\n              data: {\n                referenceHiddenOffsets: offsets,\n                referenceHidden: isAnySideFullyClipped(offsets)\n              }\n            };\n          }\n        case 'escaped':\n          {\n            const overflow = await detectOverflow(state, {\n              ...detectOverflowOptions,\n              altBoundary: true\n            });\n            const offsets = getSideOffsets(overflow, rects.floating);\n            return {\n              data: {\n                escapedOffsets: offsets,\n                escaped: isAnySideFullyClipped(offsets)\n              }\n            };\n          }\n        default:\n          {\n            return {};\n          }\n      }\n    }\n  };\n};\n\nfunction getBoundingRect(rects) {\n  const minX = min(...rects.map(rect => rect.left));\n  const minY = min(...rects.map(rect => rect.top));\n  const maxX = max(...rects.map(rect => rect.right));\n  const maxY = max(...rects.map(rect => rect.bottom));\n  return {\n    x: minX,\n    y: minY,\n    width: maxX - minX,\n    height: maxY - minY\n  };\n}\nfunction getRectsByLine(rects) {\n  const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n  const groups = [];\n  let prevRect = null;\n  for (let i = 0; i < sortedRects.length; i++) {\n    const rect = sortedRects[i];\n    if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n      groups.push([rect]);\n    } else {\n      groups[groups.length - 1].push(rect);\n    }\n    prevRect = rect;\n  }\n  return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'inline',\n    options,\n    async fn(state) {\n      const {\n        placement,\n        elements,\n        rects,\n        platform,\n        strategy\n      } = state;\n      // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n      // ClientRect's bounds, despite the event listener being triggered. A\n      // padding of 2 seems to handle this issue.\n      const {\n        padding = 2,\n        x,\n        y\n      } = evaluate(options, state);\n      const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n      const clientRects = getRectsByLine(nativeClientRects);\n      const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n      const paddingObject = getPaddingObject(padding);\n      function getBoundingClientRect() {\n        // There are two rects and they are disjoined.\n        if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n          // Find the first rect in which the point is fully inside.\n          return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n        }\n\n        // There are 2 or more connected rects.\n        if (clientRects.length >= 2) {\n          if (getSideAxis(placement) === 'y') {\n            const firstRect = clientRects[0];\n            const lastRect = clientRects[clientRects.length - 1];\n            const isTop = getSide(placement) === 'top';\n            const top = firstRect.top;\n            const bottom = lastRect.bottom;\n            const left = isTop ? firstRect.left : lastRect.left;\n            const right = isTop ? firstRect.right : lastRect.right;\n            const width = right - left;\n            const height = bottom - top;\n            return {\n              top,\n              bottom,\n              left,\n              right,\n              width,\n              height,\n              x: left,\n              y: top\n            };\n          }\n          const isLeftSide = getSide(placement) === 'left';\n          const maxRight = max(...clientRects.map(rect => rect.right));\n          const minLeft = min(...clientRects.map(rect => rect.left));\n          const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n          const top = measureRects[0].top;\n          const bottom = measureRects[measureRects.length - 1].bottom;\n          const left = minLeft;\n          const right = maxRight;\n          const width = right - left;\n          const height = bottom - top;\n          return {\n            top,\n            bottom,\n            left,\n            right,\n            width,\n            height,\n            x: left,\n            y: top\n          };\n        }\n        return fallback;\n      }\n      const resetRects = await platform.getElementRects({\n        reference: {\n          getBoundingClientRect\n        },\n        floating: elements.floating,\n        strategy\n      });\n      if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n        return {\n          reset: {\n            rects: resetRects\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n  const {\n    placement,\n    platform,\n    elements\n  } = state;\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n  const side = getSide(placement);\n  const alignment = getAlignment(placement);\n  const isVertical = getSideAxis(placement) === 'y';\n  const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n  const crossAxisMulti = rtl && isVertical ? -1 : 1;\n  const rawValue = evaluate(options, state);\n\n  // eslint-disable-next-line prefer-const\n  let {\n    mainAxis,\n    crossAxis,\n    alignmentAxis\n  } = typeof rawValue === 'number' ? {\n    mainAxis: rawValue,\n    crossAxis: 0,\n    alignmentAxis: null\n  } : {\n    mainAxis: rawValue.mainAxis || 0,\n    crossAxis: rawValue.crossAxis || 0,\n    alignmentAxis: rawValue.alignmentAxis\n  };\n  if (alignment && typeof alignmentAxis === 'number') {\n    crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n  }\n  return isVertical ? {\n    x: crossAxis * crossAxisMulti,\n    y: mainAxis * mainAxisMulti\n  } : {\n    x: mainAxis * mainAxisMulti,\n    y: crossAxis * crossAxisMulti\n  };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n  if (options === void 0) {\n    options = 0;\n  }\n  return {\n    name: 'offset',\n    options,\n    async fn(state) {\n      var _middlewareData$offse, _middlewareData$arrow;\n      const {\n        x,\n        y,\n        placement,\n        middlewareData\n      } = state;\n      const diffCoords = await convertValueToCoords(state, options);\n\n      // If the placement is the same and the arrow caused an alignment offset\n      // then we don't need to change the positioning coordinates.\n      if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      return {\n        x: x + diffCoords.x,\n        y: y + diffCoords.y,\n        data: {\n          ...diffCoords,\n          placement\n        }\n      };\n    }\n  };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'shift',\n    options,\n    async fn(state) {\n      const {\n        x,\n        y,\n        placement\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = false,\n        limiter = {\n          fn: _ref => {\n            let {\n              x,\n              y\n            } = _ref;\n            return {\n              x,\n              y\n            };\n          }\n        },\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const crossAxis = getSideAxis(getSide(placement));\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      if (checkMainAxis) {\n        const minSide = mainAxis === 'y' ? 'top' : 'left';\n        const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n        const min = mainAxisCoord + overflow[minSide];\n        const max = mainAxisCoord - overflow[maxSide];\n        mainAxisCoord = clamp(min, mainAxisCoord, max);\n      }\n      if (checkCrossAxis) {\n        const minSide = crossAxis === 'y' ? 'top' : 'left';\n        const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n        const min = crossAxisCoord + overflow[minSide];\n        const max = crossAxisCoord - overflow[maxSide];\n        crossAxisCoord = clamp(min, crossAxisCoord, max);\n      }\n      const limitedCoords = limiter.fn({\n        ...state,\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      });\n      return {\n        ...limitedCoords,\n        data: {\n          x: limitedCoords.x - x,\n          y: limitedCoords.y - y,\n          enabled: {\n            [mainAxis]: checkMainAxis,\n            [crossAxis]: checkCrossAxis\n          }\n        }\n      };\n    }\n  };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    options,\n    fn(state) {\n      const {\n        x,\n        y,\n        placement,\n        rects,\n        middlewareData\n      } = state;\n      const {\n        offset = 0,\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = true\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const crossAxis = getSideAxis(placement);\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      const rawOffset = evaluate(offset, state);\n      const computedOffset = typeof rawOffset === 'number' ? {\n        mainAxis: rawOffset,\n        crossAxis: 0\n      } : {\n        mainAxis: 0,\n        crossAxis: 0,\n        ...rawOffset\n      };\n      if (checkMainAxis) {\n        const len = mainAxis === 'y' ? 'height' : 'width';\n        const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n        const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n        if (mainAxisCoord < limitMin) {\n          mainAxisCoord = limitMin;\n        } else if (mainAxisCoord > limitMax) {\n          mainAxisCoord = limitMax;\n        }\n      }\n      if (checkCrossAxis) {\n        var _middlewareData$offse, _middlewareData$offse2;\n        const len = mainAxis === 'y' ? 'width' : 'height';\n        const isOriginSide = ['top', 'left'].includes(getSide(placement));\n        const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n        const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n        if (crossAxisCoord < limitMin) {\n          crossAxisCoord = limitMin;\n        } else if (crossAxisCoord > limitMax) {\n          crossAxisCoord = limitMax;\n        }\n      }\n      return {\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      };\n    }\n  };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'size',\n    options,\n    async fn(state) {\n      var _state$middlewareData, _state$middlewareData2;\n      const {\n        placement,\n        rects,\n        platform,\n        elements\n      } = state;\n      const {\n        apply = () => {},\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const side = getSide(placement);\n      const alignment = getAlignment(placement);\n      const isYAxis = getSideAxis(placement) === 'y';\n      const {\n        width,\n        height\n      } = rects.floating;\n      let heightSide;\n      let widthSide;\n      if (side === 'top' || side === 'bottom') {\n        heightSide = side;\n        widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n      } else {\n        widthSide = side;\n        heightSide = alignment === 'end' ? 'top' : 'bottom';\n      }\n      const maximumClippingHeight = height - overflow.top - overflow.bottom;\n      const maximumClippingWidth = width - overflow.left - overflow.right;\n      const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n      const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n      const noShift = !state.middlewareData.shift;\n      let availableHeight = overflowAvailableHeight;\n      let availableWidth = overflowAvailableWidth;\n      if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n        availableWidth = maximumClippingWidth;\n      }\n      if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n        availableHeight = maximumClippingHeight;\n      }\n      if (noShift && !alignment) {\n        const xMin = max(overflow.left, 0);\n        const xMax = max(overflow.right, 0);\n        const yMin = max(overflow.top, 0);\n        const yMax = max(overflow.bottom, 0);\n        if (isYAxis) {\n          availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n        } else {\n          availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n        }\n      }\n      await apply({\n        ...state,\n        availableWidth,\n        availableHeight\n      });\n      const nextDimensions = await platform.getDimensions(elements.floating);\n      if (width !== nextDimensions.width || height !== nextDimensions.height) {\n        return {\n          reset: {\n            rects: true\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","import { rectToClientRect, detectOverflow as detectOverflow$1, offset as offset$1, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n  const css = getComputedStyle(element);\n  // In testing environments, the `width` and `height` properties are empty\n  // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n  let width = parseFloat(css.width) || 0;\n  let height = parseFloat(css.height) || 0;\n  const hasOffset = isHTMLElement(element);\n  const offsetWidth = hasOffset ? element.offsetWidth : width;\n  const offsetHeight = hasOffset ? element.offsetHeight : height;\n  const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n  if (shouldFallback) {\n    width = offsetWidth;\n    height = offsetHeight;\n  }\n  return {\n    width,\n    height,\n    $: shouldFallback\n  };\n}\n\nfunction unwrapElement(element) {\n  return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n  const domElement = unwrapElement(element);\n  if (!isHTMLElement(domElement)) {\n    return createCoords(1);\n  }\n  const rect = domElement.getBoundingClientRect();\n  const {\n    width,\n    height,\n    $\n  } = getCssDimensions(domElement);\n  let x = ($ ? round(rect.width) : rect.width) / width;\n  let y = ($ ? round(rect.height) : rect.height) / height;\n\n  // 0, NaN, or Infinity should always fallback to 1.\n\n  if (!x || !Number.isFinite(x)) {\n    x = 1;\n  }\n  if (!y || !Number.isFinite(y)) {\n    y = 1;\n  }\n  return {\n    x,\n    y\n  };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n  const win = getWindow(element);\n  if (!isWebKit() || !win.visualViewport) {\n    return noOffsets;\n  }\n  return {\n    x: win.visualViewport.offsetLeft,\n    y: win.visualViewport.offsetTop\n  };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n  if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n    return false;\n  }\n  return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n  const clientRect = element.getBoundingClientRect();\n  const domElement = unwrapElement(element);\n  let scale = createCoords(1);\n  if (includeScale) {\n    if (offsetParent) {\n      if (isElement(offsetParent)) {\n        scale = getScale(offsetParent);\n      }\n    } else {\n      scale = getScale(element);\n    }\n  }\n  const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n  let x = (clientRect.left + visualOffsets.x) / scale.x;\n  let y = (clientRect.top + visualOffsets.y) / scale.y;\n  let width = clientRect.width / scale.x;\n  let height = clientRect.height / scale.y;\n  if (domElement) {\n    const win = getWindow(domElement);\n    const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n    let currentWin = win;\n    let currentIFrame = getFrameElement(currentWin);\n    while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n      const iframeScale = getScale(currentIFrame);\n      const iframeRect = currentIFrame.getBoundingClientRect();\n      const css = getComputedStyle(currentIFrame);\n      const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n      const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n      x *= iframeScale.x;\n      y *= iframeScale.y;\n      width *= iframeScale.x;\n      height *= iframeScale.y;\n      x += left;\n      y += top;\n      currentWin = getWindow(currentIFrame);\n      currentIFrame = getFrameElement(currentWin);\n    }\n  }\n  return rectToClientRect({\n    width,\n    height,\n    x,\n    y\n  });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n  const leftScroll = getNodeScroll(element).scrollLeft;\n  if (!rect) {\n    return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n  }\n  return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {\n  if (ignoreScrollbarX === void 0) {\n    ignoreScrollbarX = false;\n  }\n  const htmlRect = documentElement.getBoundingClientRect();\n  const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :\n  // RTL <body> scrollbar.\n  getWindowScrollBarX(documentElement, htmlRect));\n  const y = htmlRect.top + scroll.scrollTop;\n  return {\n    x,\n    y\n  };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n  let {\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  } = _ref;\n  const isFixed = strategy === 'fixed';\n  const documentElement = getDocumentElement(offsetParent);\n  const topLayer = elements ? isTopLayer(elements.floating) : false;\n  if (offsetParent === documentElement || topLayer && isFixed) {\n    return rect;\n  }\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  let scale = createCoords(1);\n  const offsets = createCoords(0);\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isHTMLElement(offsetParent)) {\n      const offsetRect = getBoundingClientRect(offsetParent);\n      scale = getScale(offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    }\n  }\n  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);\n  return {\n    width: rect.width * scale.x,\n    height: rect.height * scale.y,\n    x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n    y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n  };\n}\n\nfunction getClientRects(element) {\n  return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n  const html = getDocumentElement(element);\n  const scroll = getNodeScroll(element);\n  const body = element.ownerDocument.body;\n  const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n  let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n  const y = -scroll.scrollTop;\n  if (getComputedStyle(body).direction === 'rtl') {\n    x += max(html.clientWidth, body.clientWidth) - width;\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\n\nfunction getViewportRect(element, strategy) {\n  const win = getWindow(element);\n  const html = getDocumentElement(element);\n  const visualViewport = win.visualViewport;\n  let width = html.clientWidth;\n  let height = html.clientHeight;\n  let x = 0;\n  let y = 0;\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    const visualViewportBased = isWebKit();\n    if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n  const top = clientRect.top + element.clientTop;\n  const left = clientRect.left + element.clientLeft;\n  const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n  const width = element.clientWidth * scale.x;\n  const height = element.clientHeight * scale.y;\n  const x = left * scale.x;\n  const y = top * scale.y;\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n  let rect;\n  if (clippingAncestor === 'viewport') {\n    rect = getViewportRect(element, strategy);\n  } else if (clippingAncestor === 'document') {\n    rect = getDocumentRect(getDocumentElement(element));\n  } else if (isElement(clippingAncestor)) {\n    rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n  } else {\n    const visualOffsets = getVisualOffsets(element);\n    rect = {\n      x: clippingAncestor.x - visualOffsets.x,\n      y: clippingAncestor.y - visualOffsets.y,\n      width: clippingAncestor.width,\n      height: clippingAncestor.height\n    };\n  }\n  return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n  const parentNode = getParentNode(element);\n  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n    return false;\n  }\n  return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n  const cachedResult = cache.get(element);\n  if (cachedResult) {\n    return cachedResult;\n  }\n  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n  let currentContainingBlockComputedStyle = null;\n  const elementIsFixed = getComputedStyle(element).position === 'fixed';\n  let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    const computedStyle = getComputedStyle(currentNode);\n    const currentNodeIsContaining = isContainingBlock(currentNode);\n    if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n      currentContainingBlockComputedStyle = null;\n    }\n    const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n    if (shouldDropCurrentNode) {\n      // Drop non-containing blocks.\n      result = result.filter(ancestor => ancestor !== currentNode);\n    } else {\n      // Record last containing block for next iteration.\n      currentContainingBlockComputedStyle = computedStyle;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  cache.set(element, result);\n  return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n  let {\n    element,\n    boundary,\n    rootBoundary,\n    strategy\n  } = _ref;\n  const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n  const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n  const firstClippingAncestor = clippingAncestors[0];\n  const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n    const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n  return {\n    width: clippingRect.right - clippingRect.left,\n    height: clippingRect.bottom - clippingRect.top,\n    x: clippingRect.left,\n    y: clippingRect.top\n  };\n}\n\nfunction getDimensions(element) {\n  const {\n    width,\n    height\n  } = getCssDimensions(element);\n  return {\n    width,\n    height\n  };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  const documentElement = getDocumentElement(offsetParent);\n  const isFixed = strategy === 'fixed';\n  const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  const offsets = createCoords(0);\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isOffsetParentAnElement) {\n      const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    } else if (documentElement) {\n      // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n      // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n  return {\n    x,\n    y,\n    width: rect.width,\n    height: rect.height\n  };\n}\n\nfunction isStaticPositioned(element) {\n  return getComputedStyle(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n  if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n  if (polyfill) {\n    return polyfill(element);\n  }\n  let rawOffsetParent = element.offsetParent;\n\n  // Firefox returns the <html> element as the offsetParent if it's non-static,\n  // while Chrome and Safari return the <body> element. The <body> element must\n  // be used to perform the correct calculations even if the <html> element is\n  // non-static.\n  if (getDocumentElement(element) === rawOffsetParent) {\n    rawOffsetParent = rawOffsetParent.ownerDocument.body;\n  }\n  return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n  const win = getWindow(element);\n  if (isTopLayer(element)) {\n    return win;\n  }\n  if (!isHTMLElement(element)) {\n    let svgOffsetParent = getParentNode(element);\n    while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n      if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n        return svgOffsetParent;\n      }\n      svgOffsetParent = getParentNode(svgOffsetParent);\n    }\n    return win;\n  }\n  let offsetParent = getTrueOffsetParent(element, polyfill);\n  while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n    offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n  }\n  if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n    return win;\n  }\n  return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n  const getDimensionsFn = this.getDimensions;\n  const floatingDimensions = await getDimensionsFn(data.floating);\n  return {\n    reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n    floating: {\n      x: 0,\n      y: 0,\n      width: floatingDimensions.width,\n      height: floatingDimensions.height\n    }\n  };\n};\n\nfunction isRTL(element) {\n  return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n  convertOffsetParentRelativeRectToViewportRelativeRect,\n  getDocumentElement,\n  getClippingRect,\n  getOffsetParent,\n  getElementRects,\n  getClientRects,\n  getDimensions,\n  getScale,\n  isElement,\n  isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n  return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n  let io = null;\n  let timeoutId;\n  const root = getDocumentElement(element);\n  function cleanup() {\n    var _io;\n    clearTimeout(timeoutId);\n    (_io = io) == null || _io.disconnect();\n    io = null;\n  }\n  function refresh(skip, threshold) {\n    if (skip === void 0) {\n      skip = false;\n    }\n    if (threshold === void 0) {\n      threshold = 1;\n    }\n    cleanup();\n    const elementRectForRootMargin = element.getBoundingClientRect();\n    const {\n      left,\n      top,\n      width,\n      height\n    } = elementRectForRootMargin;\n    if (!skip) {\n      onMove();\n    }\n    if (!width || !height) {\n      return;\n    }\n    const insetTop = floor(top);\n    const insetRight = floor(root.clientWidth - (left + width));\n    const insetBottom = floor(root.clientHeight - (top + height));\n    const insetLeft = floor(left);\n    const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n    const options = {\n      rootMargin,\n      threshold: max(0, min(1, threshold)) || 1\n    };\n    let isFirstUpdate = true;\n    function handleObserve(entries) {\n      const ratio = entries[0].intersectionRatio;\n      if (ratio !== threshold) {\n        if (!isFirstUpdate) {\n          return refresh();\n        }\n        if (!ratio) {\n          // If the reference is clipped, the ratio is 0. Throttle the refresh\n          // to prevent an infinite loop of updates.\n          timeoutId = setTimeout(() => {\n            refresh(false, 1e-7);\n          }, 1000);\n        } else {\n          refresh(false, ratio);\n        }\n      }\n      if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n        // It's possible that even though the ratio is reported as 1, the\n        // element is not actually fully within the IntersectionObserver's root\n        // area anymore. This can happen under performance constraints. This may\n        // be a bug in the browser's IntersectionObserver implementation. To\n        // work around this, we compare the element's bounding rect now with\n        // what it was at the time we created the IntersectionObserver. If they\n        // are not equal then the element moved, so we refresh.\n        refresh();\n      }\n      isFirstUpdate = false;\n    }\n\n    // Older browsers don't support a `document` as the root and will throw an\n    // error.\n    try {\n      io = new IntersectionObserver(handleObserve, {\n        ...options,\n        // Handle <iframe>s\n        root: root.ownerDocument\n      });\n    } catch (e) {\n      io = new IntersectionObserver(handleObserve, options);\n    }\n    io.observe(element);\n  }\n  refresh(true);\n  return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    ancestorScroll = true,\n    ancestorResize = true,\n    elementResize = typeof ResizeObserver === 'function',\n    layoutShift = typeof IntersectionObserver === 'function',\n    animationFrame = false\n  } = options;\n  const referenceEl = unwrapElement(reference);\n  const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n  ancestors.forEach(ancestor => {\n    ancestorScroll && ancestor.addEventListener('scroll', update, {\n      passive: true\n    });\n    ancestorResize && ancestor.addEventListener('resize', update);\n  });\n  const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n  let reobserveFrame = -1;\n  let resizeObserver = null;\n  if (elementResize) {\n    resizeObserver = new ResizeObserver(_ref => {\n      let [firstEntry] = _ref;\n      if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n        // Prevent update loops when using the `size` middleware.\n        // https://github.com/floating-ui/floating-ui/issues/1740\n        resizeObserver.unobserve(floating);\n        cancelAnimationFrame(reobserveFrame);\n        reobserveFrame = requestAnimationFrame(() => {\n          var _resizeObserver;\n          (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n        });\n      }\n      update();\n    });\n    if (referenceEl && !animationFrame) {\n      resizeObserver.observe(referenceEl);\n    }\n    resizeObserver.observe(floating);\n  }\n  let frameId;\n  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n  if (animationFrame) {\n    frameLoop();\n  }\n  function frameLoop() {\n    const nextRefRect = getBoundingClientRect(reference);\n    if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n      update();\n    }\n    prevRefRect = nextRefRect;\n    frameId = requestAnimationFrame(frameLoop);\n  }\n  update();\n  return () => {\n    var _resizeObserver2;\n    ancestors.forEach(ancestor => {\n      ancestorScroll && ancestor.removeEventListener('scroll', update);\n      ancestorResize && ancestor.removeEventListener('resize', update);\n    });\n    cleanupIo == null || cleanupIo();\n    (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n    resizeObserver = null;\n    if (animationFrame) {\n      cancelAnimationFrame(frameId);\n    }\n  };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n  // This caches the expensive `getClippingElementAncestors` function so that\n  // multiple lifecycle resets re-use the same result. It only lives for a\n  // single call. If other functions become expensive, we can add them as well.\n  const cache = new Map();\n  const mergedOptions = {\n    platform,\n    ...options\n  };\n  const platformWithCache = {\n    ...mergedOptions.platform,\n    _c: cache\n  };\n  return computePosition$1(reference, floating, {\n    ...mergedOptions,\n    platform: platformWithCache\n  });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition, arrow as arrow$2, offset as offset$1, shift as shift$1, limitShift as limitShift$1, flip as flip$1, size as size$1, autoPlacement as autoPlacement$1, hide as hide$1, inline as inline$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n  if (a === b) {\n    return true;\n  }\n  if (typeof a !== typeof b) {\n    return false;\n  }\n  if (typeof a === 'function' && a.toString() === b.toString()) {\n    return true;\n  }\n  let length;\n  let i;\n  let keys;\n  if (a && b && typeof a === 'object') {\n    if (Array.isArray(a)) {\n      length = a.length;\n      if (length !== b.length) return false;\n      for (i = length; i-- !== 0;) {\n        if (!deepEqual(a[i], b[i])) {\n          return false;\n        }\n      }\n      return true;\n    }\n    keys = Object.keys(a);\n    length = keys.length;\n    if (length !== Object.keys(b).length) {\n      return false;\n    }\n    for (i = length; i-- !== 0;) {\n      if (!{}.hasOwnProperty.call(b, keys[i])) {\n        return false;\n      }\n    }\n    for (i = length; i-- !== 0;) {\n      const key = keys[i];\n      if (key === '_owner' && a.$$typeof) {\n        continue;\n      }\n      if (!deepEqual(a[key], b[key])) {\n        return false;\n      }\n    }\n    return true;\n  }\n  return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n  if (typeof window === 'undefined') {\n    return 1;\n  }\n  const win = element.ownerDocument.defaultView || window;\n  return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n  const dpr = getDPR(element);\n  return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n  const ref = React.useRef(value);\n  index(() => {\n    ref.current = value;\n  });\n  return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    placement = 'bottom',\n    strategy = 'absolute',\n    middleware = [],\n    platform,\n    elements: {\n      reference: externalReference,\n      floating: externalFloating\n    } = {},\n    transform = true,\n    whileElementsMounted,\n    open\n  } = options;\n  const [data, setData] = React.useState({\n    x: 0,\n    y: 0,\n    strategy,\n    placement,\n    middlewareData: {},\n    isPositioned: false\n  });\n  const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n  if (!deepEqual(latestMiddleware, middleware)) {\n    setLatestMiddleware(middleware);\n  }\n  const [_reference, _setReference] = React.useState(null);\n  const [_floating, _setFloating] = React.useState(null);\n  const setReference = React.useCallback(node => {\n    if (node !== referenceRef.current) {\n      referenceRef.current = node;\n      _setReference(node);\n    }\n  }, []);\n  const setFloating = React.useCallback(node => {\n    if (node !== floatingRef.current) {\n      floatingRef.current = node;\n      _setFloating(node);\n    }\n  }, []);\n  const referenceEl = externalReference || _reference;\n  const floatingEl = externalFloating || _floating;\n  const referenceRef = React.useRef(null);\n  const floatingRef = React.useRef(null);\n  const dataRef = React.useRef(data);\n  const hasWhileElementsMounted = whileElementsMounted != null;\n  const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n  const platformRef = useLatestRef(platform);\n  const openRef = useLatestRef(open);\n  const update = React.useCallback(() => {\n    if (!referenceRef.current || !floatingRef.current) {\n      return;\n    }\n    const config = {\n      placement,\n      strategy,\n      middleware: latestMiddleware\n    };\n    if (platformRef.current) {\n      config.platform = platformRef.current;\n    }\n    computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n      const fullData = {\n        ...data,\n        // The floating element's position may be recomputed while it's closed\n        // but still mounted (such as when transitioning out). To ensure\n        // `isPositioned` will be `false` initially on the next open, avoid\n        // setting it to `true` when `open === false` (must be specified).\n        isPositioned: openRef.current !== false\n      };\n      if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n        dataRef.current = fullData;\n        ReactDOM.flushSync(() => {\n          setData(fullData);\n        });\n      }\n    });\n  }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n  index(() => {\n    if (open === false && dataRef.current.isPositioned) {\n      dataRef.current.isPositioned = false;\n      setData(data => ({\n        ...data,\n        isPositioned: false\n      }));\n    }\n  }, [open]);\n  const isMountedRef = React.useRef(false);\n  index(() => {\n    isMountedRef.current = true;\n    return () => {\n      isMountedRef.current = false;\n    };\n  }, []);\n  index(() => {\n    if (referenceEl) referenceRef.current = referenceEl;\n    if (floatingEl) floatingRef.current = floatingEl;\n    if (referenceEl && floatingEl) {\n      if (whileElementsMountedRef.current) {\n        return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n      }\n      update();\n    }\n  }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n  const refs = React.useMemo(() => ({\n    reference: referenceRef,\n    floating: floatingRef,\n    setReference,\n    setFloating\n  }), [setReference, setFloating]);\n  const elements = React.useMemo(() => ({\n    reference: referenceEl,\n    floating: floatingEl\n  }), [referenceEl, floatingEl]);\n  const floatingStyles = React.useMemo(() => {\n    const initialStyles = {\n      position: strategy,\n      left: 0,\n      top: 0\n    };\n    if (!elements.floating) {\n      return initialStyles;\n    }\n    const x = roundByDPR(elements.floating, data.x);\n    const y = roundByDPR(elements.floating, data.y);\n    if (transform) {\n      return {\n        ...initialStyles,\n        transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n        ...(getDPR(elements.floating) >= 1.5 && {\n          willChange: 'transform'\n        })\n      };\n    }\n    return {\n      position: strategy,\n      left: x,\n      top: y\n    };\n  }, [strategy, transform, elements.floating, data.x, data.y]);\n  return React.useMemo(() => ({\n    ...data,\n    update,\n    refs,\n    elements,\n    floatingStyles\n  }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n  function isRef(value) {\n    return {}.hasOwnProperty.call(value, 'current');\n  }\n  return {\n    name: 'arrow',\n    options,\n    fn(state) {\n      const {\n        element,\n        padding\n      } = typeof options === 'function' ? options(state) : options;\n      if (element && isRef(element)) {\n        if (element.current != null) {\n          return arrow$2({\n            element: element.current,\n            padding\n          }).fn(state);\n        }\n        return {};\n      }\n      if (element) {\n        return arrow$2({\n          element,\n          padding\n        }).fn(state);\n      }\n      return {};\n    }\n  };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n  ...offset$1(options),\n  options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n  ...shift$1(options),\n  options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n  ...limitShift$1(options),\n  options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n  ...flip$1(options),\n  options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n  ...size$1(options),\n  options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n  ...autoPlacement$1(options),\n  options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n  ...hide$1(options),\n  options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n  ...inline$1(options),\n  options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n  ...arrow$1(options),\n  options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","import * as React from 'react';\nimport { useLayoutEffect, useEffect, useRef } from 'react';\nimport { stopEvent, getDocument, isMouseLikePointerType, contains, activeElement, isSafari, isTypeableCombobox, isVirtualClick, isVirtualPointerEvent, getTarget, getPlatform, isTypeableElement, isReactEvent, isRootElement, isEventTargetWithin, isMac, getUserAgent } from '@floating-ui/react/utils';\nimport { floor, evaluate, max, min, round } from '@floating-ui/utils';\nimport { getComputedStyle, isElement, getNodeName, isHTMLElement, getWindow, isLastTraversableNode, getParentNode, isWebKit } from '@floating-ui/utils/dom';\nimport { tabbable, isTabbable } from 'tabbable';\nimport * as ReactDOM from 'react-dom';\nimport { getOverflowAncestors, useFloating as useFloating$1, offset, detectOverflow } from '@floating-ui/react-dom';\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/react-dom';\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/react-utils#usemergerefs\n */\nfunction useMergeRefs(refs) {\n  return React.useMemo(() => {\n    if (refs.every(ref => ref == null)) {\n      return null;\n    }\n    return value => {\n      refs.forEach(ref => {\n        if (typeof ref === 'function') {\n          ref(value);\n        } else if (ref != null) {\n          ref.current = value;\n        }\n      });\n    };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, refs);\n}\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst SafeReact = {\n  ...React\n};\n\nconst useInsertionEffect = SafeReact.useInsertionEffect;\nconst useSafeInsertionEffect = useInsertionEffect || (fn => fn());\nfunction useEffectEvent(callback) {\n  const ref = React.useRef(() => {\n    if (process.env.NODE_ENV !== \"production\") {\n      throw new Error('Cannot call an event handler while rendering.');\n    }\n  });\n  useSafeInsertionEffect(() => {\n    ref.current = callback;\n  });\n  return React.useCallback(function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    return ref.current == null ? void 0 : ref.current(...args);\n  }, []);\n}\n\nconst ARROW_UP = 'ArrowUp';\nconst ARROW_DOWN = 'ArrowDown';\nconst ARROW_LEFT = 'ArrowLeft';\nconst ARROW_RIGHT = 'ArrowRight';\nfunction isDifferentRow(index, cols, prevRow) {\n  return Math.floor(index / cols) !== prevRow;\n}\nfunction isIndexOutOfBounds(listRef, index) {\n  return index < 0 || index >= listRef.current.length;\n}\nfunction getMinIndex(listRef, disabledIndices) {\n  return findNonDisabledIndex(listRef, {\n    disabledIndices\n  });\n}\nfunction getMaxIndex(listRef, disabledIndices) {\n  return findNonDisabledIndex(listRef, {\n    decrement: true,\n    startingIndex: listRef.current.length,\n    disabledIndices\n  });\n}\nfunction findNonDisabledIndex(listRef, _temp) {\n  let {\n    startingIndex = -1,\n    decrement = false,\n    disabledIndices,\n    amount = 1\n  } = _temp === void 0 ? {} : _temp;\n  const list = listRef.current;\n  let index = startingIndex;\n  do {\n    index += decrement ? -amount : amount;\n  } while (index >= 0 && index <= list.length - 1 && isDisabled(list, index, disabledIndices));\n  return index;\n}\nfunction getGridNavigatedIndex(elementsRef, _ref) {\n  let {\n    event,\n    orientation,\n    loop,\n    rtl,\n    cols,\n    disabledIndices,\n    minIndex,\n    maxIndex,\n    prevIndex,\n    stopEvent: stop = false\n  } = _ref;\n  let nextIndex = prevIndex;\n  if (event.key === ARROW_UP) {\n    stop && stopEvent(event);\n    if (prevIndex === -1) {\n      nextIndex = maxIndex;\n    } else {\n      nextIndex = findNonDisabledIndex(elementsRef, {\n        startingIndex: nextIndex,\n        amount: cols,\n        decrement: true,\n        disabledIndices\n      });\n      if (loop && (prevIndex - cols < minIndex || nextIndex < 0)) {\n        const col = prevIndex % cols;\n        const maxCol = maxIndex % cols;\n        const offset = maxIndex - (maxCol - col);\n        if (maxCol === col) {\n          nextIndex = maxIndex;\n        } else {\n          nextIndex = maxCol > col ? offset : offset - cols;\n        }\n      }\n    }\n    if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n      nextIndex = prevIndex;\n    }\n  }\n  if (event.key === ARROW_DOWN) {\n    stop && stopEvent(event);\n    if (prevIndex === -1) {\n      nextIndex = minIndex;\n    } else {\n      nextIndex = findNonDisabledIndex(elementsRef, {\n        startingIndex: prevIndex,\n        amount: cols,\n        disabledIndices\n      });\n      if (loop && prevIndex + cols > maxIndex) {\n        nextIndex = findNonDisabledIndex(elementsRef, {\n          startingIndex: prevIndex % cols - cols,\n          amount: cols,\n          disabledIndices\n        });\n      }\n    }\n    if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n      nextIndex = prevIndex;\n    }\n  }\n\n  // Remains on the same row/column.\n  if (orientation === 'both') {\n    const prevRow = floor(prevIndex / cols);\n    if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n      stop && stopEvent(event);\n      if (prevIndex % cols !== cols - 1) {\n        nextIndex = findNonDisabledIndex(elementsRef, {\n          startingIndex: prevIndex,\n          disabledIndices\n        });\n        if (loop && isDifferentRow(nextIndex, cols, prevRow)) {\n          nextIndex = findNonDisabledIndex(elementsRef, {\n            startingIndex: prevIndex - prevIndex % cols - 1,\n            disabledIndices\n          });\n        }\n      } else if (loop) {\n        nextIndex = findNonDisabledIndex(elementsRef, {\n          startingIndex: prevIndex - prevIndex % cols - 1,\n          disabledIndices\n        });\n      }\n      if (isDifferentRow(nextIndex, cols, prevRow)) {\n        nextIndex = prevIndex;\n      }\n    }\n    if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n      stop && stopEvent(event);\n      if (prevIndex % cols !== 0) {\n        nextIndex = findNonDisabledIndex(elementsRef, {\n          startingIndex: prevIndex,\n          decrement: true,\n          disabledIndices\n        });\n        if (loop && isDifferentRow(nextIndex, cols, prevRow)) {\n          nextIndex = findNonDisabledIndex(elementsRef, {\n            startingIndex: prevIndex + (cols - prevIndex % cols),\n            decrement: true,\n            disabledIndices\n          });\n        }\n      } else if (loop) {\n        nextIndex = findNonDisabledIndex(elementsRef, {\n          startingIndex: prevIndex + (cols - prevIndex % cols),\n          decrement: true,\n          disabledIndices\n        });\n      }\n      if (isDifferentRow(nextIndex, cols, prevRow)) {\n        nextIndex = prevIndex;\n      }\n    }\n    const lastRow = floor(maxIndex / cols) === prevRow;\n    if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n      if (loop && lastRow) {\n        nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledIndex(elementsRef, {\n          startingIndex: prevIndex - prevIndex % cols - 1,\n          disabledIndices\n        });\n      } else {\n        nextIndex = prevIndex;\n      }\n    }\n  }\n  return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nfunction buildCellMap(sizes, cols, dense) {\n  const cellMap = [];\n  let startIndex = 0;\n  sizes.forEach((_ref2, index) => {\n    let {\n      width,\n      height\n    } = _ref2;\n    if (width > cols) {\n      if (process.env.NODE_ENV !== \"production\") {\n        throw new Error(\"[Floating UI]: Invalid grid - item width at index \" + index + \" is greater than grid columns\");\n      }\n    }\n    let itemPlaced = false;\n    if (dense) {\n      startIndex = 0;\n    }\n    while (!itemPlaced) {\n      const targetCells = [];\n      for (let i = 0; i < width; i++) {\n        for (let j = 0; j < height; j++) {\n          targetCells.push(startIndex + i + j * cols);\n        }\n      }\n      if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n        targetCells.forEach(cell => {\n          cellMap[cell] = index;\n        });\n        itemPlaced = true;\n      } else {\n        startIndex++;\n      }\n    }\n  });\n\n  // convert into a non-sparse array\n  return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nfunction getCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n  if (index === -1) return -1;\n  const firstCellIndex = cellMap.indexOf(index);\n  const sizeItem = sizes[index];\n  switch (corner) {\n    case 'tl':\n      return firstCellIndex;\n    case 'tr':\n      if (!sizeItem) {\n        return firstCellIndex;\n      }\n      return firstCellIndex + sizeItem.width - 1;\n    case 'bl':\n      if (!sizeItem) {\n        return firstCellIndex;\n      }\n      return firstCellIndex + (sizeItem.height - 1) * cols;\n    case 'br':\n      return cellMap.lastIndexOf(index);\n  }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nfunction getCellIndices(indices, cellMap) {\n  return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\nfunction isDisabled(list, index, disabledIndices) {\n  if (disabledIndices) {\n    return disabledIndices.includes(index);\n  }\n  const element = list[index];\n  return element == null || element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n}\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\nfunction sortByDocumentPosition(a, b) {\n  const position = a.compareDocumentPosition(b);\n  if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n    return -1;\n  }\n  if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {\n    return 1;\n  }\n  return 0;\n}\nfunction areMapsEqual(map1, map2) {\n  if (map1.size !== map2.size) {\n    return false;\n  }\n  for (const [key, value] of map1.entries()) {\n    if (value !== map2.get(key)) {\n      return false;\n    }\n  }\n  return true;\n}\nconst FloatingListContext = /*#__PURE__*/React.createContext({\n  register: () => {},\n  unregister: () => {},\n  map: /*#__PURE__*/new Map(),\n  elementsRef: {\n    current: []\n  }\n});\n/**\n * Provides context for a list of items within the floating element.\n * @see https://floating-ui.com/docs/FloatingList\n */\nfunction FloatingList(props) {\n  const {\n    children,\n    elementsRef,\n    labelsRef\n  } = props;\n  const [map, setMap] = React.useState(() => new Map());\n  const register = React.useCallback(node => {\n    setMap(prevMap => new Map(prevMap).set(node, null));\n  }, []);\n  const unregister = React.useCallback(node => {\n    setMap(prevMap => {\n      const map = new Map(prevMap);\n      map.delete(node);\n      return map;\n    });\n  }, []);\n  index(() => {\n    const newMap = new Map(map);\n    const nodes = Array.from(newMap.keys()).sort(sortByDocumentPosition);\n    nodes.forEach((node, index) => {\n      newMap.set(node, index);\n    });\n    if (!areMapsEqual(map, newMap)) {\n      setMap(newMap);\n    }\n  }, [map]);\n  return /*#__PURE__*/React.createElement(FloatingListContext.Provider, {\n    value: React.useMemo(() => ({\n      register,\n      unregister,\n      map,\n      elementsRef,\n      labelsRef\n    }), [register, unregister, map, elementsRef, labelsRef])\n  }, children);\n}\n/**\n * Used to register a list item and its index (DOM position) in the\n * `FloatingList`.\n * @see https://floating-ui.com/docs/FloatingList#uselistitem\n */\nfunction useListItem(props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    label\n  } = props;\n  const {\n    register,\n    unregister,\n    map,\n    elementsRef,\n    labelsRef\n  } = React.useContext(FloatingListContext);\n  const [index$1, setIndex] = React.useState(null);\n  const componentRef = React.useRef(null);\n  const ref = React.useCallback(node => {\n    componentRef.current = node;\n    if (index$1 !== null) {\n      elementsRef.current[index$1] = node;\n      if (labelsRef) {\n        var _node$textContent;\n        const isLabelDefined = label !== undefined;\n        labelsRef.current[index$1] = isLabelDefined ? label : (_node$textContent = node == null ? void 0 : node.textContent) != null ? _node$textContent : null;\n      }\n    }\n  }, [index$1, elementsRef, labelsRef, label]);\n  index(() => {\n    const node = componentRef.current;\n    if (node) {\n      register(node);\n      return () => {\n        unregister(node);\n      };\n    }\n  }, [register, unregister]);\n  index(() => {\n    const index = componentRef.current ? map.get(componentRef.current) : null;\n    if (index != null) {\n      setIndex(index);\n    }\n  }, [map]);\n  return React.useMemo(() => ({\n    ref,\n    index: index$1 == null ? -1 : index$1\n  }), [index$1, ref]);\n}\n\nfunction renderJsx(render, computedProps) {\n  if (typeof render === 'function') {\n    return render(computedProps);\n  }\n  if (render) {\n    return /*#__PURE__*/React.cloneElement(render, computedProps);\n  }\n  return /*#__PURE__*/React.createElement(\"div\", computedProps);\n}\nconst CompositeContext = /*#__PURE__*/React.createContext({\n  activeIndex: 0,\n  onNavigate: () => {}\n});\nconst horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];\nconst verticalKeys = [ARROW_UP, ARROW_DOWN];\nconst allKeys = [...horizontalKeys, ...verticalKeys];\n\n/**\n * Creates a single tab stop whose items are navigated by arrow keys, which\n * provides list navigation outside of floating element contexts.\n *\n * This is useful to enable navigation of a list of items that aren’t part of a\n * floating element. A menubar is an example of a composite, with each reference\n * element being an item.\n * @see https://floating-ui.com/docs/Composite\n */\nconst Composite = /*#__PURE__*/React.forwardRef(function Composite(props, forwardedRef) {\n  const {\n    render,\n    orientation = 'both',\n    loop = true,\n    rtl = false,\n    cols = 1,\n    disabledIndices,\n    activeIndex: externalActiveIndex,\n    onNavigate: externalSetActiveIndex,\n    itemSizes,\n    dense = false,\n    ...domProps\n  } = props;\n  const [internalActiveIndex, internalSetActiveIndex] = React.useState(0);\n  const activeIndex = externalActiveIndex != null ? externalActiveIndex : internalActiveIndex;\n  const onNavigate = useEffectEvent(externalSetActiveIndex != null ? externalSetActiveIndex : internalSetActiveIndex);\n  const elementsRef = React.useRef([]);\n  const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n  const contextValue = React.useMemo(() => ({\n    activeIndex,\n    onNavigate\n  }), [activeIndex, onNavigate]);\n  const isGrid = cols > 1;\n  function handleKeyDown(event) {\n    if (!allKeys.includes(event.key)) return;\n    let nextIndex = activeIndex;\n    const minIndex = getMinIndex(elementsRef, disabledIndices);\n    const maxIndex = getMaxIndex(elementsRef, disabledIndices);\n    const horizontalEndKey = rtl ? ARROW_LEFT : ARROW_RIGHT;\n    const horizontalStartKey = rtl ? ARROW_RIGHT : ARROW_LEFT;\n    if (isGrid) {\n      const sizes = itemSizes || Array.from({\n        length: elementsRef.current.length\n      }, () => ({\n        width: 1,\n        height: 1\n      }));\n      // To calculate movements on the grid, we use hypothetical cell indices\n      // as if every item was 1x1, then convert back to real indices.\n      const cellMap = buildCellMap(sizes, cols, dense);\n      const minGridIndex = cellMap.findIndex(index => index != null && !isDisabled(elementsRef.current, index, disabledIndices));\n      // last enabled index\n      const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isDisabled(elementsRef.current, index, disabledIndices) ? cellIndex : foundIndex, -1);\n      const maybeNextIndex = cellMap[getGridNavigatedIndex({\n        current: cellMap.map(itemIndex => itemIndex ? elementsRef.current[itemIndex] : null)\n      }, {\n        event,\n        orientation,\n        loop,\n        rtl,\n        cols,\n        // treat undefined (empty grid spaces) as disabled indices so we\n        // don't end up in them\n        disabledIndices: getCellIndices([...(disabledIndices || elementsRef.current.map((_, index) => isDisabled(elementsRef.current, index) ? index : undefined)), undefined], cellMap),\n        minIndex: minGridIndex,\n        maxIndex: maxGridIndex,\n        prevIndex: getCellIndexOfCorner(activeIndex > maxIndex ? minIndex : activeIndex, sizes, cellMap, cols,\n        // use a corner matching the edge closest to the direction we're\n        // moving in so we don't end up in the same item. Prefer\n        // top/left over bottom/right.\n        event.key === ARROW_DOWN ? 'bl' : event.key === horizontalEndKey ? 'tr' : 'tl')\n      })];\n      if (maybeNextIndex != null) {\n        nextIndex = maybeNextIndex;\n      }\n    }\n    const toEndKeys = {\n      horizontal: [horizontalEndKey],\n      vertical: [ARROW_DOWN],\n      both: [horizontalEndKey, ARROW_DOWN]\n    }[orientation];\n    const toStartKeys = {\n      horizontal: [horizontalStartKey],\n      vertical: [ARROW_UP],\n      both: [horizontalStartKey, ARROW_UP]\n    }[orientation];\n    const preventedKeys = isGrid ? allKeys : {\n      horizontal: horizontalKeys,\n      vertical: verticalKeys,\n      both: allKeys\n    }[orientation];\n    if (nextIndex === activeIndex && [...toEndKeys, ...toStartKeys].includes(event.key)) {\n      if (loop && nextIndex === maxIndex && toEndKeys.includes(event.key)) {\n        nextIndex = minIndex;\n      } else if (loop && nextIndex === minIndex && toStartKeys.includes(event.key)) {\n        nextIndex = maxIndex;\n      } else {\n        nextIndex = findNonDisabledIndex(elementsRef, {\n          startingIndex: nextIndex,\n          decrement: toStartKeys.includes(event.key),\n          disabledIndices\n        });\n      }\n    }\n    if (nextIndex !== activeIndex && !isIndexOutOfBounds(elementsRef, nextIndex)) {\n      var _elementsRef$current$;\n      event.stopPropagation();\n      if (preventedKeys.includes(event.key)) {\n        event.preventDefault();\n      }\n      onNavigate(nextIndex);\n      (_elementsRef$current$ = elementsRef.current[nextIndex]) == null || _elementsRef$current$.focus();\n    }\n  }\n  const computedProps = {\n    ...domProps,\n    ...renderElementProps,\n    ref: forwardedRef,\n    'aria-orientation': orientation === 'both' ? undefined : orientation,\n    onKeyDown(e) {\n      domProps.onKeyDown == null || domProps.onKeyDown(e);\n      renderElementProps.onKeyDown == null || renderElementProps.onKeyDown(e);\n      handleKeyDown(e);\n    }\n  };\n  return /*#__PURE__*/React.createElement(CompositeContext.Provider, {\n    value: contextValue\n  }, /*#__PURE__*/React.createElement(FloatingList, {\n    elementsRef: elementsRef\n  }, renderJsx(render, computedProps)));\n});\n/**\n * @see https://floating-ui.com/docs/Composite\n */\nconst CompositeItem = /*#__PURE__*/React.forwardRef(function CompositeItem(props, forwardedRef) {\n  const {\n    render,\n    ...domProps\n  } = props;\n  const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n  const {\n    activeIndex,\n    onNavigate\n  } = React.useContext(CompositeContext);\n  const {\n    ref,\n    index\n  } = useListItem();\n  const mergedRef = useMergeRefs([ref, forwardedRef, renderElementProps.ref]);\n  const isActive = activeIndex === index;\n  const computedProps = {\n    ...domProps,\n    ...renderElementProps,\n    ref: mergedRef,\n    tabIndex: isActive ? 0 : -1,\n    'data-active': isActive ? '' : undefined,\n    onFocus(e) {\n      domProps.onFocus == null || domProps.onFocus(e);\n      renderElementProps.onFocus == null || renderElementProps.onFocus(e);\n      onNavigate(index);\n    }\n  };\n  return renderJsx(render, computedProps);\n});\n\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\n\nlet serverHandoffComplete = false;\nlet count = 0;\nconst genId = () => // Ensure the id is unique with multiple independent versions of Floating UI\n// on <React 18\n\"floating-ui-\" + Math.random().toString(36).slice(2, 6) + count++;\nfunction useFloatingId() {\n  const [id, setId] = React.useState(() => serverHandoffComplete ? genId() : undefined);\n  index(() => {\n    if (id == null) {\n      setId(genId());\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n  React.useEffect(() => {\n    serverHandoffComplete = true;\n  }, []);\n  return id;\n}\nconst useReactId = SafeReact.useId;\n\n/**\n * Uses React 18's built-in `useId()` when available, or falls back to a\n * slightly less performant (requiring a double render) implementation for\n * earlier React versions.\n * @see https://floating-ui.com/docs/react-utils#useid\n */\nconst useId = useReactId || useFloatingId;\n\nlet devMessageSet;\nif (process.env.NODE_ENV !== \"production\") {\n  devMessageSet = /*#__PURE__*/new Set();\n}\nfunction warn() {\n  var _devMessageSet;\n  for (var _len = arguments.length, messages = new Array(_len), _key = 0; _key < _len; _key++) {\n    messages[_key] = arguments[_key];\n  }\n  const message = \"Floating UI: \" + messages.join(' ');\n  if (!((_devMessageSet = devMessageSet) != null && _devMessageSet.has(message))) {\n    var _devMessageSet2;\n    (_devMessageSet2 = devMessageSet) == null || _devMessageSet2.add(message);\n    console.warn(message);\n  }\n}\nfunction error() {\n  var _devMessageSet3;\n  for (var _len2 = arguments.length, messages = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n    messages[_key2] = arguments[_key2];\n  }\n  const message = \"Floating UI: \" + messages.join(' ');\n  if (!((_devMessageSet3 = devMessageSet) != null && _devMessageSet3.has(message))) {\n    var _devMessageSet4;\n    (_devMessageSet4 = devMessageSet) == null || _devMessageSet4.add(message);\n    console.error(message);\n  }\n}\n\n/**\n * Renders a pointing arrow triangle.\n * @see https://floating-ui.com/docs/FloatingArrow\n */\nconst FloatingArrow = /*#__PURE__*/React.forwardRef(function FloatingArrow(props, ref) {\n  const {\n    context: {\n      placement,\n      elements: {\n        floating\n      },\n      middlewareData: {\n        arrow,\n        shift\n      }\n    },\n    width = 14,\n    height = 7,\n    tipRadius = 0,\n    strokeWidth = 0,\n    staticOffset,\n    stroke,\n    d,\n    style: {\n      transform,\n      ...restStyle\n    } = {},\n    ...rest\n  } = props;\n  if (process.env.NODE_ENV !== \"production\") {\n    if (!ref) {\n      warn('The `ref` prop is required for `FloatingArrow`.');\n    }\n  }\n  const clipPathId = useId();\n  const [isRTL, setIsRTL] = React.useState(false);\n\n  // https://github.com/floating-ui/floating-ui/issues/2932\n  index(() => {\n    if (!floating) return;\n    const isRTL = getComputedStyle(floating).direction === 'rtl';\n    if (isRTL) {\n      setIsRTL(true);\n    }\n  }, [floating]);\n  if (!floating) {\n    return null;\n  }\n  const [side, alignment] = placement.split('-');\n  const isVerticalSide = side === 'top' || side === 'bottom';\n  let computedStaticOffset = staticOffset;\n  if (isVerticalSide && shift != null && shift.x || !isVerticalSide && shift != null && shift.y) {\n    computedStaticOffset = null;\n  }\n\n  // Strokes must be double the border width, this ensures the stroke's width\n  // works as you'd expect.\n  const computedStrokeWidth = strokeWidth * 2;\n  const halfStrokeWidth = computedStrokeWidth / 2;\n  const svgX = width / 2 * (tipRadius / -8 + 1);\n  const svgY = height / 2 * tipRadius / 4;\n  const isCustomShape = !!d;\n  const yOffsetProp = computedStaticOffset && alignment === 'end' ? 'bottom' : 'top';\n  let xOffsetProp = computedStaticOffset && alignment === 'end' ? 'right' : 'left';\n  if (computedStaticOffset && isRTL) {\n    xOffsetProp = alignment === 'end' ? 'left' : 'right';\n  }\n  const arrowX = (arrow == null ? void 0 : arrow.x) != null ? computedStaticOffset || arrow.x : '';\n  const arrowY = (arrow == null ? void 0 : arrow.y) != null ? computedStaticOffset || arrow.y : '';\n  const dValue = d || 'M0,0' + (\" H\" + width) + (\" L\" + (width - svgX) + \",\" + (height - svgY)) + (\" Q\" + width / 2 + \",\" + height + \" \" + svgX + \",\" + (height - svgY)) + ' Z';\n  const rotation = {\n    top: isCustomShape ? 'rotate(180deg)' : '',\n    left: isCustomShape ? 'rotate(90deg)' : 'rotate(-90deg)',\n    bottom: isCustomShape ? '' : 'rotate(180deg)',\n    right: isCustomShape ? 'rotate(-90deg)' : 'rotate(90deg)'\n  }[side];\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({}, rest, {\n    \"aria-hidden\": true,\n    ref: ref,\n    width: isCustomShape ? width : width + computedStrokeWidth,\n    height: width,\n    viewBox: \"0 0 \" + width + \" \" + (height > width ? height : width),\n    style: {\n      position: 'absolute',\n      pointerEvents: 'none',\n      [xOffsetProp]: arrowX,\n      [yOffsetProp]: arrowY,\n      [side]: isVerticalSide || isCustomShape ? '100%' : \"calc(100% - \" + computedStrokeWidth / 2 + \"px)\",\n      transform: [rotation, transform].filter(t => !!t).join(' '),\n      ...restStyle\n    }\n  }), computedStrokeWidth > 0 && /*#__PURE__*/React.createElement(\"path\", {\n    clipPath: \"url(#\" + clipPathId + \")\",\n    fill: \"none\",\n    stroke: stroke\n    // Account for the stroke on the fill path rendered below.\n    ,\n    strokeWidth: computedStrokeWidth + (d ? 0 : 1),\n    d: dValue\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    stroke: computedStrokeWidth && !d ? rest.fill : 'none',\n    d: dValue\n  }), /*#__PURE__*/React.createElement(\"clipPath\", {\n    id: clipPathId\n  }, /*#__PURE__*/React.createElement(\"rect\", {\n    x: -halfStrokeWidth,\n    y: halfStrokeWidth * (isCustomShape ? -1 : 1),\n    width: width + computedStrokeWidth,\n    height: width\n  })));\n});\n\nfunction createPubSub() {\n  const map = new Map();\n  return {\n    emit(event, data) {\n      var _map$get;\n      (_map$get = map.get(event)) == null || _map$get.forEach(handler => handler(data));\n    },\n    on(event, listener) {\n      map.set(event, [...(map.get(event) || []), listener]);\n    },\n    off(event, listener) {\n      var _map$get2;\n      map.set(event, ((_map$get2 = map.get(event)) == null ? void 0 : _map$get2.filter(l => l !== listener)) || []);\n    }\n  };\n}\n\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nconst useFloatingParentNodeId = () => {\n  var _React$useContext;\n  return ((_React$useContext = React.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;\n};\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nconst useFloatingTree = () => React.useContext(FloatingTreeContext);\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction useFloatingNodeId(customParentId) {\n  const id = useId();\n  const tree = useFloatingTree();\n  const reactParentId = useFloatingParentNodeId();\n  const parentId = customParentId || reactParentId;\n  index(() => {\n    const node = {\n      id,\n      parentId\n    };\n    tree == null || tree.addNode(node);\n    return () => {\n      tree == null || tree.removeNode(node);\n    };\n  }, [tree, id, parentId]);\n  return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingNode(props) {\n  const {\n    children,\n    id\n  } = props;\n  const parentId = useFloatingParentNodeId();\n  return /*#__PURE__*/React.createElement(FloatingNodeContext.Provider, {\n    value: React.useMemo(() => ({\n      id,\n      parentId\n    }), [id, parentId])\n  }, children);\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingTree(props) {\n  const {\n    children\n  } = props;\n  const nodesRef = React.useRef([]);\n  const addNode = React.useCallback(node => {\n    nodesRef.current = [...nodesRef.current, node];\n  }, []);\n  const removeNode = React.useCallback(node => {\n    nodesRef.current = nodesRef.current.filter(n => n !== node);\n  }, []);\n  const events = React.useState(() => createPubSub())[0];\n  return /*#__PURE__*/React.createElement(FloatingTreeContext.Provider, {\n    value: React.useMemo(() => ({\n      nodesRef,\n      addNode,\n      removeNode,\n      events\n    }), [addNode, removeNode, events])\n  }, children);\n}\n\nfunction createAttribute(name) {\n  return \"data-floating-ui-\" + name;\n}\n\nfunction useLatestRef(value) {\n  const ref = useRef(value);\n  index(() => {\n    ref.current = value;\n  });\n  return ref;\n}\n\nconst safePolygonIdentifier = /*#__PURE__*/createAttribute('safe-polygon');\nfunction getDelay(value, prop, pointerType) {\n  if (pointerType && !isMouseLikePointerType(pointerType)) {\n    return 0;\n  }\n  if (typeof value === 'number') {\n    return value;\n  }\n  return value == null ? void 0 : value[prop];\n}\n/**\n * Opens the floating element while hovering over the reference element, like\n * CSS `:hover`.\n * @see https://floating-ui.com/docs/useHover\n */\nfunction useHover(context, props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    open,\n    onOpenChange,\n    dataRef,\n    events,\n    elements\n  } = context;\n  const {\n    enabled = true,\n    delay = 0,\n    handleClose = null,\n    mouseOnly = false,\n    restMs = 0,\n    move = true\n  } = props;\n  const tree = useFloatingTree();\n  const parentId = useFloatingParentNodeId();\n  const handleCloseRef = useLatestRef(handleClose);\n  const delayRef = useLatestRef(delay);\n  const openRef = useLatestRef(open);\n  const pointerTypeRef = React.useRef();\n  const timeoutRef = React.useRef(-1);\n  const handlerRef = React.useRef();\n  const restTimeoutRef = React.useRef(-1);\n  const blockMouseMoveRef = React.useRef(true);\n  const performedPointerEventsMutationRef = React.useRef(false);\n  const unbindMouseMoveRef = React.useRef(() => {});\n  const restTimeoutPendingRef = React.useRef(false);\n  const isHoverOpen = React.useCallback(() => {\n    var _dataRef$current$open;\n    const type = (_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type;\n    return (type == null ? void 0 : type.includes('mouse')) && type !== 'mousedown';\n  }, [dataRef]);\n\n  // When closing before opening, clear the delay timeouts to cancel it\n  // from showing.\n  React.useEffect(() => {\n    if (!enabled) return;\n    function onOpenChange(_ref) {\n      let {\n        open\n      } = _ref;\n      if (!open) {\n        clearTimeout(timeoutRef.current);\n        clearTimeout(restTimeoutRef.current);\n        blockMouseMoveRef.current = true;\n        restTimeoutPendingRef.current = false;\n      }\n    }\n    events.on('openchange', onOpenChange);\n    return () => {\n      events.off('openchange', onOpenChange);\n    };\n  }, [enabled, events]);\n  React.useEffect(() => {\n    if (!enabled) return;\n    if (!handleCloseRef.current) return;\n    if (!open) return;\n    function onLeave(event) {\n      if (isHoverOpen()) {\n        onOpenChange(false, event, 'hover');\n      }\n    }\n    const html = getDocument(elements.floating).documentElement;\n    html.addEventListener('mouseleave', onLeave);\n    return () => {\n      html.removeEventListener('mouseleave', onLeave);\n    };\n  }, [elements.floating, open, onOpenChange, enabled, handleCloseRef, isHoverOpen]);\n  const closeWithDelay = React.useCallback(function (event, runElseBranch, reason) {\n    if (runElseBranch === void 0) {\n      runElseBranch = true;\n    }\n    if (reason === void 0) {\n      reason = 'hover';\n    }\n    const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n    if (closeDelay && !handlerRef.current) {\n      clearTimeout(timeoutRef.current);\n      timeoutRef.current = window.setTimeout(() => onOpenChange(false, event, reason), closeDelay);\n    } else if (runElseBranch) {\n      clearTimeout(timeoutRef.current);\n      onOpenChange(false, event, reason);\n    }\n  }, [delayRef, onOpenChange]);\n  const cleanupMouseMoveHandler = useEffectEvent(() => {\n    unbindMouseMoveRef.current();\n    handlerRef.current = undefined;\n  });\n  const clearPointerEvents = useEffectEvent(() => {\n    if (performedPointerEventsMutationRef.current) {\n      const body = getDocument(elements.floating).body;\n      body.style.pointerEvents = '';\n      body.removeAttribute(safePolygonIdentifier);\n      performedPointerEventsMutationRef.current = false;\n    }\n  });\n  const isClickLikeOpenEvent = useEffectEvent(() => {\n    return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n  });\n\n  // Registering the mouse events on the reference directly to bypass React's\n  // delegation system. If the cursor was on a disabled element and then entered\n  // the reference (no gap), `mouseenter` doesn't fire in the delegation system.\n  React.useEffect(() => {\n    if (!enabled) return;\n    function onMouseEnter(event) {\n      clearTimeout(timeoutRef.current);\n      blockMouseMoveRef.current = false;\n      if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || restMs > 0 && !getDelay(delayRef.current, 'open')) {\n        return;\n      }\n      const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n      if (openDelay) {\n        timeoutRef.current = window.setTimeout(() => {\n          if (!openRef.current) {\n            onOpenChange(true, event, 'hover');\n          }\n        }, openDelay);\n      } else if (!open) {\n        onOpenChange(true, event, 'hover');\n      }\n    }\n    function onMouseLeave(event) {\n      if (isClickLikeOpenEvent()) return;\n      unbindMouseMoveRef.current();\n      const doc = getDocument(elements.floating);\n      clearTimeout(restTimeoutRef.current);\n      restTimeoutPendingRef.current = false;\n      if (handleCloseRef.current && dataRef.current.floatingContext) {\n        // Prevent clearing `onScrollMouseLeave` timeout.\n        if (!open) {\n          clearTimeout(timeoutRef.current);\n        }\n        handlerRef.current = handleCloseRef.current({\n          ...dataRef.current.floatingContext,\n          tree,\n          x: event.clientX,\n          y: event.clientY,\n          onClose() {\n            clearPointerEvents();\n            cleanupMouseMoveHandler();\n            if (!isClickLikeOpenEvent()) {\n              closeWithDelay(event, true, 'safe-polygon');\n            }\n          }\n        });\n        const handler = handlerRef.current;\n        doc.addEventListener('mousemove', handler);\n        unbindMouseMoveRef.current = () => {\n          doc.removeEventListener('mousemove', handler);\n        };\n        return;\n      }\n\n      // Allow interactivity without `safePolygon` on touch devices. With a\n      // pointer, a short close delay is an alternative, so it should work\n      // consistently.\n      const shouldClose = pointerTypeRef.current === 'touch' ? !contains(elements.floating, event.relatedTarget) : true;\n      if (shouldClose) {\n        closeWithDelay(event);\n      }\n    }\n\n    // Ensure the floating element closes after scrolling even if the pointer\n    // did not move.\n    // https://github.com/floating-ui/floating-ui/discussions/1692\n    function onScrollMouseLeave(event) {\n      if (isClickLikeOpenEvent()) return;\n      if (!dataRef.current.floatingContext) return;\n      handleCloseRef.current == null || handleCloseRef.current({\n        ...dataRef.current.floatingContext,\n        tree,\n        x: event.clientX,\n        y: event.clientY,\n        onClose() {\n          clearPointerEvents();\n          cleanupMouseMoveHandler();\n          if (!isClickLikeOpenEvent()) {\n            closeWithDelay(event);\n          }\n        }\n      })(event);\n    }\n    if (isElement(elements.domReference)) {\n      var _elements$floating;\n      const ref = elements.domReference;\n      open && ref.addEventListener('mouseleave', onScrollMouseLeave);\n      (_elements$floating = elements.floating) == null || _elements$floating.addEventListener('mouseleave', onScrollMouseLeave);\n      move && ref.addEventListener('mousemove', onMouseEnter, {\n        once: true\n      });\n      ref.addEventListener('mouseenter', onMouseEnter);\n      ref.addEventListener('mouseleave', onMouseLeave);\n      return () => {\n        var _elements$floating2;\n        open && ref.removeEventListener('mouseleave', onScrollMouseLeave);\n        (_elements$floating2 = elements.floating) == null || _elements$floating2.removeEventListener('mouseleave', onScrollMouseLeave);\n        move && ref.removeEventListener('mousemove', onMouseEnter);\n        ref.removeEventListener('mouseenter', onMouseEnter);\n        ref.removeEventListener('mouseleave', onMouseLeave);\n      };\n    }\n  }, [elements, enabled, context, mouseOnly, restMs, move, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, onOpenChange, open, openRef, tree, delayRef, handleCloseRef, dataRef, isClickLikeOpenEvent]);\n\n  // Block pointer-events of every element other than the reference and floating\n  // while the floating element is open and has a `handleClose` handler. Also\n  // handles nested floating elements.\n  // https://github.com/floating-ui/floating-ui/issues/1722\n  index(() => {\n    var _handleCloseRef$curre;\n    if (!enabled) return;\n    if (open && (_handleCloseRef$curre = handleCloseRef.current) != null && _handleCloseRef$curre.__options.blockPointerEvents && isHoverOpen()) {\n      performedPointerEventsMutationRef.current = true;\n      const floatingEl = elements.floating;\n      if (isElement(elements.domReference) && floatingEl) {\n        var _tree$nodesRef$curren;\n        const body = getDocument(elements.floating).body;\n        body.setAttribute(safePolygonIdentifier, '');\n        const ref = elements.domReference;\n        const parentFloating = tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null ? void 0 : _tree$nodesRef$curren.elements.floating;\n        if (parentFloating) {\n          parentFloating.style.pointerEvents = '';\n        }\n        body.style.pointerEvents = 'none';\n        ref.style.pointerEvents = 'auto';\n        floatingEl.style.pointerEvents = 'auto';\n        return () => {\n          body.style.pointerEvents = '';\n          ref.style.pointerEvents = '';\n          floatingEl.style.pointerEvents = '';\n        };\n      }\n    }\n  }, [enabled, open, parentId, elements, tree, handleCloseRef, isHoverOpen]);\n  index(() => {\n    if (!open) {\n      pointerTypeRef.current = undefined;\n      restTimeoutPendingRef.current = false;\n      cleanupMouseMoveHandler();\n      clearPointerEvents();\n    }\n  }, [open, cleanupMouseMoveHandler, clearPointerEvents]);\n  React.useEffect(() => {\n    return () => {\n      cleanupMouseMoveHandler();\n      clearTimeout(timeoutRef.current);\n      clearTimeout(restTimeoutRef.current);\n      clearPointerEvents();\n    };\n  }, [enabled, elements.domReference, cleanupMouseMoveHandler, clearPointerEvents]);\n  const reference = React.useMemo(() => {\n    function setPointerRef(event) {\n      pointerTypeRef.current = event.pointerType;\n    }\n    return {\n      onPointerDown: setPointerRef,\n      onPointerEnter: setPointerRef,\n      onMouseMove(event) {\n        const {\n          nativeEvent\n        } = event;\n        function handleMouseMove() {\n          if (!blockMouseMoveRef.current && !openRef.current) {\n            onOpenChange(true, nativeEvent, 'hover');\n          }\n        }\n        if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n          return;\n        }\n        if (open || restMs === 0) {\n          return;\n        }\n\n        // Ignore insignificant movements to account for tremors.\n        if (restTimeoutPendingRef.current && event.movementX ** 2 + event.movementY ** 2 < 2) {\n          return;\n        }\n        clearTimeout(restTimeoutRef.current);\n        if (pointerTypeRef.current === 'touch') {\n          handleMouseMove();\n        } else {\n          restTimeoutPendingRef.current = true;\n          restTimeoutRef.current = window.setTimeout(handleMouseMove, restMs);\n        }\n      }\n    };\n  }, [mouseOnly, onOpenChange, open, openRef, restMs]);\n  const floating = React.useMemo(() => ({\n    onMouseEnter() {\n      clearTimeout(timeoutRef.current);\n    },\n    onMouseLeave(event) {\n      if (!isClickLikeOpenEvent()) {\n        closeWithDelay(event.nativeEvent, false);\n      }\n    }\n  }), [closeWithDelay, isClickLikeOpenEvent]);\n  return React.useMemo(() => enabled ? {\n    reference,\n    floating\n  } : {}, [enabled, reference, floating]);\n}\n\nconst NOOP = () => {};\nconst FloatingDelayGroupContext = /*#__PURE__*/React.createContext({\n  delay: 0,\n  initialDelay: 0,\n  timeoutMs: 0,\n  currentId: null,\n  setCurrentId: NOOP,\n  setState: NOOP,\n  isInstantPhase: false\n});\n\n/**\n * @deprecated\n * Use the return value of `useDelayGroup()` instead.\n */\nconst useDelayGroupContext = () => React.useContext(FloatingDelayGroupContext);\n/**\n * Provides context for a group of floating elements that should share a\n * `delay`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction FloatingDelayGroup(props) {\n  const {\n    children,\n    delay,\n    timeoutMs = 0\n  } = props;\n  const [state, setState] = React.useReducer((prev, next) => ({\n    ...prev,\n    ...next\n  }), {\n    delay,\n    timeoutMs,\n    initialDelay: delay,\n    currentId: null,\n    isInstantPhase: false\n  });\n  const initialCurrentIdRef = React.useRef(null);\n  const setCurrentId = React.useCallback(currentId => {\n    setState({\n      currentId\n    });\n  }, []);\n  index(() => {\n    if (state.currentId) {\n      if (initialCurrentIdRef.current === null) {\n        initialCurrentIdRef.current = state.currentId;\n      } else if (!state.isInstantPhase) {\n        setState({\n          isInstantPhase: true\n        });\n      }\n    } else {\n      if (state.isInstantPhase) {\n        setState({\n          isInstantPhase: false\n        });\n      }\n      initialCurrentIdRef.current = null;\n    }\n  }, [state.currentId, state.isInstantPhase]);\n  return /*#__PURE__*/React.createElement(FloatingDelayGroupContext.Provider, {\n    value: React.useMemo(() => ({\n      ...state,\n      setState,\n      setCurrentId\n    }), [state, setCurrentId])\n  }, children);\n}\n/**\n * Enables grouping when called inside a component that's a child of a\n * `FloatingDelayGroup`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction useDelayGroup(context, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    open,\n    onOpenChange,\n    floatingId\n  } = context;\n  const {\n    id: optionId,\n    enabled = true\n  } = options;\n  const id = optionId != null ? optionId : floatingId;\n  const groupContext = useDelayGroupContext();\n  const {\n    currentId,\n    setCurrentId,\n    initialDelay,\n    setState,\n    timeoutMs\n  } = groupContext;\n  index(() => {\n    if (!enabled) return;\n    if (!currentId) return;\n    setState({\n      delay: {\n        open: 1,\n        close: getDelay(initialDelay, 'close')\n      }\n    });\n    if (currentId !== id) {\n      onOpenChange(false);\n    }\n  }, [enabled, id, onOpenChange, setState, currentId, initialDelay]);\n  index(() => {\n    function unset() {\n      onOpenChange(false);\n      setState({\n        delay: initialDelay,\n        currentId: null\n      });\n    }\n    if (!enabled) return;\n    if (!currentId) return;\n    if (!open && currentId === id) {\n      if (timeoutMs) {\n        const timeout = window.setTimeout(unset, timeoutMs);\n        return () => {\n          clearTimeout(timeout);\n        };\n      }\n      unset();\n    }\n  }, [enabled, open, setState, currentId, id, onOpenChange, initialDelay, timeoutMs]);\n  index(() => {\n    if (!enabled) return;\n    if (setCurrentId === NOOP || !open) return;\n    setCurrentId(id);\n  }, [enabled, open, setCurrentId, id]);\n  return groupContext;\n}\n\nlet rafId = 0;\nfunction enqueueFocus(el, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    preventScroll = false,\n    cancelPrevious = true,\n    sync = false\n  } = options;\n  cancelPrevious && cancelAnimationFrame(rafId);\n  const exec = () => el == null ? void 0 : el.focus({\n    preventScroll\n  });\n  if (sync) {\n    exec();\n  } else {\n    rafId = requestAnimationFrame(exec);\n  }\n}\n\nfunction getAncestors(nodes, id) {\n  var _nodes$find;\n  let allAncestors = [];\n  let currentParentId = (_nodes$find = nodes.find(node => node.id === id)) == null ? void 0 : _nodes$find.parentId;\n  while (currentParentId) {\n    const currentNode = nodes.find(node => node.id === currentParentId);\n    currentParentId = currentNode == null ? void 0 : currentNode.parentId;\n    if (currentNode) {\n      allAncestors = allAncestors.concat(currentNode);\n    }\n  }\n  return allAncestors;\n}\n\nfunction getChildren(nodes, id) {\n  let allChildren = nodes.filter(node => {\n    var _node$context;\n    return node.parentId === id && ((_node$context = node.context) == null ? void 0 : _node$context.open);\n  });\n  let currentChildren = allChildren;\n  while (currentChildren.length) {\n    currentChildren = nodes.filter(node => {\n      var _currentChildren;\n      return (_currentChildren = currentChildren) == null ? void 0 : _currentChildren.some(n => {\n        var _node$context2;\n        return node.parentId === n.id && ((_node$context2 = node.context) == null ? void 0 : _node$context2.open);\n      });\n    });\n    allChildren = allChildren.concat(currentChildren);\n  }\n  return allChildren;\n}\nfunction getDeepestNode(nodes, id) {\n  let deepestNodeId;\n  let maxDepth = -1;\n  function findDeepest(nodeId, depth) {\n    if (depth > maxDepth) {\n      deepestNodeId = nodeId;\n      maxDepth = depth;\n    }\n    const children = getChildren(nodes, nodeId);\n    children.forEach(child => {\n      findDeepest(child.id, depth + 1);\n    });\n  }\n  findDeepest(id, 0);\n  return nodes.find(node => node.id === deepestNodeId);\n}\n\n// Modified to add conditional `aria-hidden` support:\n// https://github.com/theKashey/aria-hidden/blob/9220c8f4a4fd35f63bee5510a9f41a37264382d4/src/index.ts\nlet counterMap = /*#__PURE__*/new WeakMap();\nlet uncontrolledElementsSet = /*#__PURE__*/new WeakSet();\nlet markerMap = {};\nlet lockCount$1 = 0;\nconst supportsInert = () => typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\nconst unwrapHost = node => node && (node.host || unwrapHost(node.parentNode));\nconst correctElements = (parent, targets) => targets.map(target => {\n  if (parent.contains(target)) {\n    return target;\n  }\n  const correctedTarget = unwrapHost(target);\n  if (parent.contains(correctedTarget)) {\n    return correctedTarget;\n  }\n  return null;\n}).filter(x => x != null);\nfunction applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, inert) {\n  const markerName = 'data-floating-ui-inert';\n  const controlAttribute = inert ? 'inert' : ariaHidden ? 'aria-hidden' : null;\n  const avoidElements = correctElements(body, uncorrectedAvoidElements);\n  const elementsToKeep = new Set();\n  const elementsToStop = new Set(avoidElements);\n  const hiddenElements = [];\n  if (!markerMap[markerName]) {\n    markerMap[markerName] = new WeakMap();\n  }\n  const markerCounter = markerMap[markerName];\n  avoidElements.forEach(keep);\n  deep(body);\n  elementsToKeep.clear();\n  function keep(el) {\n    if (!el || elementsToKeep.has(el)) {\n      return;\n    }\n    elementsToKeep.add(el);\n    el.parentNode && keep(el.parentNode);\n  }\n  function deep(parent) {\n    if (!parent || elementsToStop.has(parent)) {\n      return;\n    }\n    [].forEach.call(parent.children, node => {\n      if (getNodeName(node) === 'script') return;\n      if (elementsToKeep.has(node)) {\n        deep(node);\n      } else {\n        const attr = controlAttribute ? node.getAttribute(controlAttribute) : null;\n        const alreadyHidden = attr !== null && attr !== 'false';\n        const counterValue = (counterMap.get(node) || 0) + 1;\n        const markerValue = (markerCounter.get(node) || 0) + 1;\n        counterMap.set(node, counterValue);\n        markerCounter.set(node, markerValue);\n        hiddenElements.push(node);\n        if (counterValue === 1 && alreadyHidden) {\n          uncontrolledElementsSet.add(node);\n        }\n        if (markerValue === 1) {\n          node.setAttribute(markerName, '');\n        }\n        if (!alreadyHidden && controlAttribute) {\n          node.setAttribute(controlAttribute, 'true');\n        }\n      }\n    });\n  }\n  lockCount$1++;\n  return () => {\n    hiddenElements.forEach(element => {\n      const counterValue = (counterMap.get(element) || 0) - 1;\n      const markerValue = (markerCounter.get(element) || 0) - 1;\n      counterMap.set(element, counterValue);\n      markerCounter.set(element, markerValue);\n      if (!counterValue) {\n        if (!uncontrolledElementsSet.has(element) && controlAttribute) {\n          element.removeAttribute(controlAttribute);\n        }\n        uncontrolledElementsSet.delete(element);\n      }\n      if (!markerValue) {\n        element.removeAttribute(markerName);\n      }\n    });\n    lockCount$1--;\n    if (!lockCount$1) {\n      counterMap = new WeakMap();\n      counterMap = new WeakMap();\n      uncontrolledElementsSet = new WeakSet();\n      markerMap = {};\n    }\n  };\n}\nfunction markOthers(avoidElements, ariaHidden, inert) {\n  if (ariaHidden === void 0) {\n    ariaHidden = false;\n  }\n  if (inert === void 0) {\n    inert = false;\n  }\n  const body = getDocument(avoidElements[0]).body;\n  return applyAttributeToOthers(avoidElements.concat(Array.from(body.querySelectorAll('[aria-live]'))), body, ariaHidden, inert);\n}\n\nconst getTabbableOptions = () => ({\n  getShadowRoot: true,\n  displayCheck:\n  // JSDOM does not support the `tabbable` library. To solve this we can\n  // check if `ResizeObserver` is a real function (not polyfilled), which\n  // determines if the current environment is JSDOM-like.\n  typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, direction) {\n  const allTabbable = tabbable(container, getTabbableOptions());\n  if (direction === 'prev') {\n    allTabbable.reverse();\n  }\n  const activeIndex = allTabbable.indexOf(activeElement(getDocument(container)));\n  const nextTabbableElements = allTabbable.slice(activeIndex + 1);\n  return nextTabbableElements[0];\n}\nfunction getNextTabbable() {\n  return getTabbableIn(document.body, 'next');\n}\nfunction getPreviousTabbable() {\n  return getTabbableIn(document.body, 'prev');\n}\nfunction isOutsideEvent(event, container) {\n  const containerElement = container || event.currentTarget;\n  const relatedTarget = event.relatedTarget;\n  return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nfunction disableFocusInside(container) {\n  const tabbableElements = tabbable(container, getTabbableOptions());\n  tabbableElements.forEach(element => {\n    element.dataset.tabindex = element.getAttribute('tabindex') || '';\n    element.setAttribute('tabindex', '-1');\n  });\n}\nfunction enableFocusInside(container) {\n  const elements = container.querySelectorAll('[data-tabindex]');\n  elements.forEach(element => {\n    const tabindex = element.dataset.tabindex;\n    delete element.dataset.tabindex;\n    if (tabindex) {\n      element.setAttribute('tabindex', tabindex);\n    } else {\n      element.removeAttribute('tabindex');\n    }\n  });\n}\n\n// See Diego Haz's Sandbox for making this logic work well on Safari/iOS:\n// https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/FocusTrap.tsx\n\nconst HIDDEN_STYLES = {\n  border: 0,\n  clip: 'rect(0 0 0 0)',\n  height: '1px',\n  margin: '-1px',\n  overflow: 'hidden',\n  padding: 0,\n  position: 'fixed',\n  whiteSpace: 'nowrap',\n  width: '1px',\n  top: 0,\n  left: 0\n};\nlet timeoutId;\nfunction setActiveElementOnTab(event) {\n  if (event.key === 'Tab') {\n    event.target;\n    clearTimeout(timeoutId);\n  }\n}\nconst FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n  const [role, setRole] = React.useState();\n  index(() => {\n    if (isSafari()) {\n      // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n      // on VoiceOver does trigger the onFocus event, so we can use the focus\n      // trap element. On Safari, only buttons trigger the onFocus event.\n      // NB: \"group\" role in the Sandbox no longer appears to work, must be a\n      // button role.\n      setRole('button');\n    }\n    document.addEventListener('keydown', setActiveElementOnTab);\n    return () => {\n      document.removeEventListener('keydown', setActiveElementOnTab);\n    };\n  }, []);\n  const restProps = {\n    ref,\n    tabIndex: 0,\n    // Role is only for VoiceOver\n    role,\n    'aria-hidden': role ? undefined : true,\n    [createAttribute('focus-guard')]: '',\n    style: HIDDEN_STYLES\n  };\n  return /*#__PURE__*/React.createElement(\"span\", _extends({}, props, restProps));\n});\n\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nconst attr = /*#__PURE__*/createAttribute('portal');\n/**\n * @see https://floating-ui.com/docs/FloatingPortal#usefloatingportalnode\n */\nfunction useFloatingPortalNode(props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    id,\n    root\n  } = props;\n  const uniqueId = useId();\n  const portalContext = usePortalContext();\n  const [portalNode, setPortalNode] = React.useState(null);\n  const portalNodeRef = React.useRef(null);\n  index(() => {\n    return () => {\n      portalNode == null || portalNode.remove();\n      // Allow the subsequent layout effects to create a new node on updates.\n      // The portal node will still be cleaned up on unmount.\n      // https://github.com/floating-ui/floating-ui/issues/2454\n      queueMicrotask(() => {\n        portalNodeRef.current = null;\n      });\n    };\n  }, [portalNode]);\n  index(() => {\n    // Wait for the uniqueId to be generated before creating the portal node in\n    // React <18 (using `useFloatingId` instead of the native `useId`).\n    // https://github.com/floating-ui/floating-ui/issues/2778\n    if (!uniqueId) return;\n    if (portalNodeRef.current) return;\n    const existingIdRoot = id ? document.getElementById(id) : null;\n    if (!existingIdRoot) return;\n    const subRoot = document.createElement('div');\n    subRoot.id = uniqueId;\n    subRoot.setAttribute(attr, '');\n    existingIdRoot.appendChild(subRoot);\n    portalNodeRef.current = subRoot;\n    setPortalNode(subRoot);\n  }, [id, uniqueId]);\n  index(() => {\n    // Wait for the root to exist before creating the portal node. The root must\n    // be stored in state, not a ref, for this to work reactively.\n    if (root === null) return;\n    if (!uniqueId) return;\n    if (portalNodeRef.current) return;\n    let container = root || (portalContext == null ? void 0 : portalContext.portalNode);\n    if (container && !isElement(container)) container = container.current;\n    container = container || document.body;\n    let idWrapper = null;\n    if (id) {\n      idWrapper = document.createElement('div');\n      idWrapper.id = id;\n      container.appendChild(idWrapper);\n    }\n    const subRoot = document.createElement('div');\n    subRoot.id = uniqueId;\n    subRoot.setAttribute(attr, '');\n    container = idWrapper || container;\n    container.appendChild(subRoot);\n    portalNodeRef.current = subRoot;\n    setPortalNode(subRoot);\n  }, [id, root, uniqueId, portalContext]);\n  return portalNode;\n}\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n */\nfunction FloatingPortal(props) {\n  const {\n    children,\n    id,\n    root,\n    preserveTabOrder = true\n  } = props;\n  const portalNode = useFloatingPortalNode({\n    id,\n    root\n  });\n  const [focusManagerState, setFocusManagerState] = React.useState(null);\n  const beforeOutsideRef = React.useRef(null);\n  const afterOutsideRef = React.useRef(null);\n  const beforeInsideRef = React.useRef(null);\n  const afterInsideRef = React.useRef(null);\n  const modal = focusManagerState == null ? void 0 : focusManagerState.modal;\n  const open = focusManagerState == null ? void 0 : focusManagerState.open;\n  const shouldRenderGuards =\n  // The FocusManager and therefore floating element are currently open/\n  // rendered.\n  !!focusManagerState &&\n  // Guards are only for non-modal focus management.\n  !focusManagerState.modal &&\n  // Don't render if unmount is transitioning.\n  focusManagerState.open && preserveTabOrder && !!(root || portalNode);\n\n  // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n  React.useEffect(() => {\n    if (!portalNode || !preserveTabOrder || modal) {\n      return;\n    }\n\n    // Make sure elements inside the portal element are tabbable only when the\n    // portal has already been focused, either by tabbing into a focus trap\n    // element outside or using the mouse.\n    function onFocus(event) {\n      if (portalNode && isOutsideEvent(event)) {\n        const focusing = event.type === 'focusin';\n        const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n        manageFocus(portalNode);\n      }\n    }\n    // Listen to the event on the capture phase so they run before the focus\n    // trap elements onFocus prop is called.\n    portalNode.addEventListener('focusin', onFocus, true);\n    portalNode.addEventListener('focusout', onFocus, true);\n    return () => {\n      portalNode.removeEventListener('focusin', onFocus, true);\n      portalNode.removeEventListener('focusout', onFocus, true);\n    };\n  }, [portalNode, preserveTabOrder, modal]);\n  React.useEffect(() => {\n    if (!portalNode) return;\n    if (open) return;\n    enableFocusInside(portalNode);\n  }, [open, portalNode]);\n  return /*#__PURE__*/React.createElement(PortalContext.Provider, {\n    value: React.useMemo(() => ({\n      preserveTabOrder,\n      beforeOutsideRef,\n      afterOutsideRef,\n      beforeInsideRef,\n      afterInsideRef,\n      portalNode,\n      setFocusManagerState\n    }), [preserveTabOrder, portalNode])\n  }, shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(FocusGuard, {\n    \"data-type\": \"outside\",\n    ref: beforeOutsideRef,\n    onFocus: event => {\n      if (isOutsideEvent(event, portalNode)) {\n        var _beforeInsideRef$curr;\n        (_beforeInsideRef$curr = beforeInsideRef.current) == null || _beforeInsideRef$curr.focus();\n      } else {\n        const prevTabbable = getPreviousTabbable() || (focusManagerState == null ? void 0 : focusManagerState.refs.domReference.current);\n        prevTabbable == null || prevTabbable.focus();\n      }\n    }\n  }), shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(\"span\", {\n    \"aria-owns\": portalNode.id,\n    style: HIDDEN_STYLES\n  }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(FocusGuard, {\n    \"data-type\": \"outside\",\n    ref: afterOutsideRef,\n    onFocus: event => {\n      if (isOutsideEvent(event, portalNode)) {\n        var _afterInsideRef$curre;\n        (_afterInsideRef$curre = afterInsideRef.current) == null || _afterInsideRef$curre.focus();\n      } else {\n        const nextTabbable = getNextTabbable() || (focusManagerState == null ? void 0 : focusManagerState.refs.domReference.current);\n        nextTabbable == null || nextTabbable.focus();\n        (focusManagerState == null ? void 0 : focusManagerState.closeOnFocusOut) && (focusManagerState == null ? void 0 : focusManagerState.onOpenChange(false, event.nativeEvent, 'focus-out'));\n      }\n    }\n  }));\n}\nconst usePortalContext = () => React.useContext(PortalContext);\n\nconst FOCUSABLE_ATTRIBUTE = 'data-floating-ui-focusable';\nfunction getFloatingFocusElement(floatingElement) {\n  if (!floatingElement) {\n    return null;\n  }\n  // Try to find the element that has `{...getFloatingProps()}` spread on it.\n  // This indicates the floating element is acting as a positioning wrapper, and\n  // so focus should be managed on the child element with the event handlers and\n  // aria props.\n  return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(\"[\" + FOCUSABLE_ATTRIBUTE + \"]\") || floatingElement;\n}\n\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction addPreviouslyFocusedElement(element) {\n  previouslyFocusedElements = previouslyFocusedElements.filter(el => el.isConnected);\n  let tabbableEl = element;\n  if (!tabbableEl || getNodeName(tabbableEl) === 'body') return;\n  if (!isTabbable(tabbableEl, getTabbableOptions())) {\n    const tabbableChild = tabbable(tabbableEl, getTabbableOptions())[0];\n    if (tabbableChild) {\n      tabbableEl = tabbableChild;\n    }\n  }\n  previouslyFocusedElements.push(tabbableEl);\n  if (previouslyFocusedElements.length > LIST_LIMIT) {\n    previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n  }\n}\nfunction getPreviouslyFocusedElement() {\n  return previouslyFocusedElements.slice().reverse().find(el => el.isConnected);\n}\nconst VisuallyHiddenDismiss = /*#__PURE__*/React.forwardRef(function VisuallyHiddenDismiss(props, ref) {\n  return /*#__PURE__*/React.createElement(\"button\", _extends({}, props, {\n    type: \"button\",\n    ref: ref,\n    tabIndex: -1,\n    style: HIDDEN_STYLES\n  }));\n});\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n */\nfunction FloatingFocusManager(props) {\n  const {\n    context,\n    children,\n    disabled = false,\n    order = ['content'],\n    guards: _guards = true,\n    initialFocus = 0,\n    returnFocus = true,\n    restoreFocus = false,\n    modal = true,\n    visuallyHiddenDismiss = false,\n    closeOnFocusOut = true\n  } = props;\n  const {\n    open,\n    refs,\n    nodeId,\n    onOpenChange,\n    events,\n    dataRef,\n    floatingId,\n    elements: {\n      domReference,\n      floating\n    }\n  } = context;\n  const ignoreInitialFocus = typeof initialFocus === 'number' && initialFocus < 0;\n  // If the reference is a combobox and is typeable (e.g. input/textarea),\n  // there are different focus semantics. The guards should not be rendered, but\n  // aria-hidden should be applied to all nodes still. Further, the visually\n  // hidden dismiss button should only appear at the end of the list, not the\n  // start.\n  const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n\n  // Force the guards to be rendered if the `inert` attribute is not supported.\n  const guards = supportsInert() ? _guards : true;\n  const orderRef = useLatestRef(order);\n  const initialFocusRef = useLatestRef(initialFocus);\n  const returnFocusRef = useLatestRef(returnFocus);\n  const tree = useFloatingTree();\n  const portalContext = usePortalContext();\n  const startDismissButtonRef = React.useRef(null);\n  const endDismissButtonRef = React.useRef(null);\n  const preventReturnFocusRef = React.useRef(false);\n  const isPointerDownRef = React.useRef(false);\n  const tabbableIndexRef = React.useRef(-1);\n  const isInsidePortal = portalContext != null;\n  const floatingFocusElement = getFloatingFocusElement(floating);\n  const getTabbableContent = useEffectEvent(function (container) {\n    if (container === void 0) {\n      container = floatingFocusElement;\n    }\n    return container ? tabbable(container, getTabbableOptions()) : [];\n  });\n  const getTabbableElements = useEffectEvent(container => {\n    const content = getTabbableContent(container);\n    return orderRef.current.map(type => {\n      if (domReference && type === 'reference') {\n        return domReference;\n      }\n      if (floatingFocusElement && type === 'floating') {\n        return floatingFocusElement;\n      }\n      return content;\n    }).filter(Boolean).flat();\n  });\n  React.useEffect(() => {\n    if (disabled) return;\n    if (!modal) return;\n    function onKeyDown(event) {\n      if (event.key === 'Tab') {\n        // The focus guards have nothing to focus, so we need to stop the event.\n        if (contains(floatingFocusElement, activeElement(getDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n          stopEvent(event);\n        }\n        const els = getTabbableElements();\n        const target = getTarget(event);\n        if (orderRef.current[0] === 'reference' && target === domReference) {\n          stopEvent(event);\n          if (event.shiftKey) {\n            enqueueFocus(els[els.length - 1]);\n          } else {\n            enqueueFocus(els[1]);\n          }\n        }\n        if (orderRef.current[1] === 'floating' && target === floatingFocusElement && event.shiftKey) {\n          stopEvent(event);\n          enqueueFocus(els[0]);\n        }\n      }\n    }\n    const doc = getDocument(floatingFocusElement);\n    doc.addEventListener('keydown', onKeyDown);\n    return () => {\n      doc.removeEventListener('keydown', onKeyDown);\n    };\n  }, [disabled, domReference, floatingFocusElement, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent, getTabbableElements]);\n  React.useEffect(() => {\n    if (disabled) return;\n    if (!floating) return;\n    function handleFocusIn(event) {\n      const target = getTarget(event);\n      const tabbableContent = getTabbableContent();\n      const tabbableIndex = tabbableContent.indexOf(target);\n      if (tabbableIndex !== -1) {\n        tabbableIndexRef.current = tabbableIndex;\n      }\n    }\n    floating.addEventListener('focusin', handleFocusIn);\n    return () => {\n      floating.removeEventListener('focusin', handleFocusIn);\n    };\n  }, [disabled, floating, getTabbableContent]);\n  React.useEffect(() => {\n    if (disabled) return;\n    if (!closeOnFocusOut) return;\n\n    // In Safari, buttons lose focus when pressing them.\n    function handlePointerDown() {\n      isPointerDownRef.current = true;\n      setTimeout(() => {\n        isPointerDownRef.current = false;\n      });\n    }\n    function handleFocusOutside(event) {\n      const relatedTarget = event.relatedTarget;\n      queueMicrotask(() => {\n        const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext == null ? void 0 : portalContext.portalNode, relatedTarget) || relatedTarget != null && relatedTarget.hasAttribute(createAttribute('focus-guard')) || tree && (getChildren(tree.nodesRef.current, nodeId).find(node => {\n          var _node$context, _node$context2;\n          return contains((_node$context = node.context) == null ? void 0 : _node$context.elements.floating, relatedTarget) || contains((_node$context2 = node.context) == null ? void 0 : _node$context2.elements.domReference, relatedTarget);\n        }) || getAncestors(tree.nodesRef.current, nodeId).find(node => {\n          var _node$context3, _node$context4;\n          return ((_node$context3 = node.context) == null ? void 0 : _node$context3.elements.floating) === relatedTarget || ((_node$context4 = node.context) == null ? void 0 : _node$context4.elements.domReference) === relatedTarget;\n        })));\n\n        // Restore focus to the previous tabbable element index to prevent\n        // focus from being lost outside the floating tree.\n        if (restoreFocus && movedToUnrelatedNode && activeElement(getDocument(floatingFocusElement)) === getDocument(floatingFocusElement).body) {\n          // Let `FloatingPortal` effect knows that focus is still inside the\n          // floating tree.\n          if (isHTMLElement(floatingFocusElement)) {\n            floatingFocusElement.focus();\n          }\n          const prevTabbableIndex = tabbableIndexRef.current;\n          const tabbableContent = getTabbableContent();\n          const nodeToFocus = tabbableContent[prevTabbableIndex] || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n          if (isHTMLElement(nodeToFocus)) {\n            nodeToFocus.focus();\n          }\n        }\n\n        // Focus did not move inside the floating tree, and there are no tabbable\n        // portal guards to handle closing.\n        if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current &&\n        // Fix React 18 Strict Mode returnFocus due to double rendering.\n        relatedTarget !== getPreviouslyFocusedElement()) {\n          preventReturnFocusRef.current = true;\n          onOpenChange(false, event, 'focus-out');\n        }\n      });\n    }\n    if (floating && isHTMLElement(domReference)) {\n      domReference.addEventListener('focusout', handleFocusOutside);\n      domReference.addEventListener('pointerdown', handlePointerDown);\n      floating.addEventListener('focusout', handleFocusOutside);\n      return () => {\n        domReference.removeEventListener('focusout', handleFocusOutside);\n        domReference.removeEventListener('pointerdown', handlePointerDown);\n        floating.removeEventListener('focusout', handleFocusOutside);\n      };\n    }\n  }, [disabled, domReference, floating, floatingFocusElement, modal, nodeId, tree, portalContext, onOpenChange, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox]);\n  React.useEffect(() => {\n    var _portalContext$portal;\n    if (disabled) return;\n\n    // Don't hide portals nested within the parent portal.\n    const portalNodes = Array.from((portalContext == null || (_portalContext$portal = portalContext.portalNode) == null ? void 0 : _portalContext$portal.querySelectorAll(\"[\" + createAttribute('portal') + \"]\")) || []);\n    if (floating) {\n      const insideElements = [floating, ...portalNodes, startDismissButtonRef.current, endDismissButtonRef.current, orderRef.current.includes('reference') || isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n      const cleanup = modal || isUntrappedTypeableCombobox ? markOthers(insideElements, guards, !guards) : markOthers(insideElements);\n      return () => {\n        cleanup();\n      };\n    }\n  }, [disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, guards]);\n  index(() => {\n    if (disabled || !isHTMLElement(floatingFocusElement)) return;\n    const doc = getDocument(floatingFocusElement);\n    const previouslyFocusedElement = activeElement(doc);\n\n    // Wait for any layout effect state setters to execute to set `tabIndex`.\n    queueMicrotask(() => {\n      const focusableElements = getTabbableElements(floatingFocusElement);\n      const initialFocusValue = initialFocusRef.current;\n      const elToFocus = (typeof initialFocusValue === 'number' ? focusableElements[initialFocusValue] : initialFocusValue.current) || floatingFocusElement;\n      const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n      if (!ignoreInitialFocus && !focusAlreadyInsideFloatingEl && open) {\n        enqueueFocus(elToFocus, {\n          preventScroll: elToFocus === floatingFocusElement\n        });\n      }\n    });\n  }, [disabled, open, floatingFocusElement, ignoreInitialFocus, getTabbableElements, initialFocusRef]);\n  index(() => {\n    if (disabled || !floatingFocusElement) return;\n    let preventReturnFocusScroll = false;\n    const doc = getDocument(floatingFocusElement);\n    const previouslyFocusedElement = activeElement(doc);\n    const contextData = dataRef.current;\n    let openEvent = contextData.openEvent;\n    addPreviouslyFocusedElement(previouslyFocusedElement);\n\n    // Dismissing via outside press should always ignore `returnFocus` to\n    // prevent unwanted scrolling.\n    function onOpenChange(_ref) {\n      let {\n        open,\n        reason,\n        event,\n        nested\n      } = _ref;\n      if (open) {\n        openEvent = event;\n      }\n      if (reason === 'escape-key' && refs.domReference.current) {\n        addPreviouslyFocusedElement(refs.domReference.current);\n      }\n      if (reason === 'hover' && event.type === 'mouseleave') {\n        preventReturnFocusRef.current = true;\n      }\n      if (reason !== 'outside-press') return;\n      if (nested) {\n        preventReturnFocusRef.current = false;\n        preventReturnFocusScroll = true;\n      } else {\n        preventReturnFocusRef.current = !(isVirtualClick(event) || isVirtualPointerEvent(event));\n      }\n    }\n    events.on('openchange', onOpenChange);\n    const fallbackEl = doc.createElement('span');\n    fallbackEl.setAttribute('tabindex', '-1');\n    fallbackEl.setAttribute('aria-hidden', 'true');\n    Object.assign(fallbackEl.style, HIDDEN_STYLES);\n    if (isInsidePortal && domReference) {\n      domReference.insertAdjacentElement('afterend', fallbackEl);\n    }\n    function getReturnElement() {\n      if (typeof returnFocusRef.current === 'boolean') {\n        return getPreviouslyFocusedElement() || fallbackEl;\n      }\n      return returnFocusRef.current.current || fallbackEl;\n    }\n    return () => {\n      events.off('openchange', onOpenChange);\n      const activeEl = activeElement(doc);\n      const isFocusInsideFloatingTree = contains(floating, activeEl) || tree && getChildren(tree.nodesRef.current, nodeId).some(node => {\n        var _node$context5;\n        return contains((_node$context5 = node.context) == null ? void 0 : _node$context5.elements.floating, activeEl);\n      });\n      const shouldFocusReference = isFocusInsideFloatingTree || openEvent && ['click', 'mousedown'].includes(openEvent.type);\n      if (shouldFocusReference && refs.domReference.current) {\n        addPreviouslyFocusedElement(refs.domReference.current);\n      }\n      const returnElement = getReturnElement();\n      queueMicrotask(() => {\n        if (\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n        returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(returnElement) && (\n        // If the focus moved somewhere else after mount, avoid returning focus\n        // since it likely entered a different element which should be\n        // respected: https://github.com/floating-ui/floating-ui/issues/2607\n        returnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n          returnElement.focus({\n            preventScroll: preventReturnFocusScroll\n          });\n        }\n        fallbackEl.remove();\n      });\n    };\n  }, [disabled, floating, floatingFocusElement, returnFocusRef, dataRef, refs, events, tree, nodeId, isInsidePortal, domReference]);\n  React.useEffect(() => {\n    // The `returnFocus` cleanup behavior is inside a microtask; ensure we\n    // wait for it to complete before resetting the flag.\n    queueMicrotask(() => {\n      preventReturnFocusRef.current = false;\n    });\n  }, [disabled]);\n\n  // Synchronize the `context` & `modal` value to the FloatingPortal context.\n  // It will decide whether or not it needs to render its own guards.\n  index(() => {\n    if (disabled) return;\n    if (!portalContext) return;\n    portalContext.setFocusManagerState({\n      modal,\n      closeOnFocusOut,\n      open,\n      onOpenChange,\n      refs\n    });\n    return () => {\n      portalContext.setFocusManagerState(null);\n    };\n  }, [disabled, portalContext, modal, open, onOpenChange, refs, closeOnFocusOut]);\n  index(() => {\n    if (disabled) return;\n    if (!floatingFocusElement) return;\n    if (typeof MutationObserver !== 'function') return;\n    if (ignoreInitialFocus) return;\n    const handleMutation = () => {\n      const tabIndex = floatingFocusElement.getAttribute('tabindex');\n      const tabbableContent = getTabbableContent();\n      const activeEl = activeElement(getDocument(floating));\n      const tabbableIndex = tabbableContent.indexOf(activeEl);\n      if (tabbableIndex !== -1) {\n        tabbableIndexRef.current = tabbableIndex;\n      }\n      if (orderRef.current.includes('floating') || activeEl !== refs.domReference.current && tabbableContent.length === 0) {\n        if (tabIndex !== '0') {\n          floatingFocusElement.setAttribute('tabindex', '0');\n        }\n      } else if (tabIndex !== '-1') {\n        floatingFocusElement.setAttribute('tabindex', '-1');\n      }\n    };\n    handleMutation();\n    const observer = new MutationObserver(handleMutation);\n    observer.observe(floatingFocusElement, {\n      childList: true,\n      subtree: true,\n      attributes: true\n    });\n    return () => {\n      observer.disconnect();\n    };\n  }, [disabled, floating, floatingFocusElement, refs, orderRef, getTabbableContent, ignoreInitialFocus]);\n  function renderDismissButton(location) {\n    if (disabled || !visuallyHiddenDismiss || !modal) {\n      return null;\n    }\n    return /*#__PURE__*/React.createElement(VisuallyHiddenDismiss, {\n      ref: location === 'start' ? startDismissButtonRef : endDismissButtonRef,\n      onClick: event => onOpenChange(false, event.nativeEvent)\n    }, typeof visuallyHiddenDismiss === 'string' ? visuallyHiddenDismiss : 'Dismiss');\n  }\n  const shouldRenderGuards = !disabled && guards && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n  return /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderGuards && /*#__PURE__*/React.createElement(FocusGuard, {\n    \"data-type\": \"inside\",\n    ref: portalContext == null ? void 0 : portalContext.beforeInsideRef,\n    onFocus: event => {\n      if (modal) {\n        const els = getTabbableElements();\n        enqueueFocus(order[0] === 'reference' ? els[0] : els[els.length - 1]);\n      } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n        preventReturnFocusRef.current = false;\n        if (isOutsideEvent(event, portalContext.portalNode)) {\n          const nextTabbable = getNextTabbable() || domReference;\n          nextTabbable == null || nextTabbable.focus();\n        } else {\n          var _portalContext$before;\n          (_portalContext$before = portalContext.beforeOutsideRef.current) == null || _portalContext$before.focus();\n        }\n      }\n    }\n  }), !isUntrappedTypeableCombobox && renderDismissButton('start'), children, renderDismissButton('end'), shouldRenderGuards && /*#__PURE__*/React.createElement(FocusGuard, {\n    \"data-type\": \"inside\",\n    ref: portalContext == null ? void 0 : portalContext.afterInsideRef,\n    onFocus: event => {\n      if (modal) {\n        enqueueFocus(getTabbableElements()[0]);\n      } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n        if (closeOnFocusOut) {\n          preventReturnFocusRef.current = true;\n        }\n        if (isOutsideEvent(event, portalContext.portalNode)) {\n          const prevTabbable = getPreviousTabbable() || domReference;\n          prevTabbable == null || prevTabbable.focus();\n        } else {\n          var _portalContext$afterO;\n          (_portalContext$afterO = portalContext.afterOutsideRef.current) == null || _portalContext$afterO.focus();\n        }\n      }\n    }\n  }));\n}\n\nlet lockCount = 0;\nfunction enableScrollLock() {\n  const isIOS = /iP(hone|ad|od)|iOS/.test(getPlatform());\n  const bodyStyle = document.body.style;\n  // RTL <body> scrollbar\n  const scrollbarX = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft;\n  const paddingProp = scrollbarX ? 'paddingLeft' : 'paddingRight';\n  const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n  const scrollX = bodyStyle.left ? parseFloat(bodyStyle.left) : window.scrollX;\n  const scrollY = bodyStyle.top ? parseFloat(bodyStyle.top) : window.scrollY;\n  bodyStyle.overflow = 'hidden';\n  if (scrollbarWidth) {\n    bodyStyle[paddingProp] = scrollbarWidth + \"px\";\n  }\n\n  // Only iOS doesn't respect `overflow: hidden` on document.body, and this\n  // technique has fewer side effects.\n  if (isIOS) {\n    var _window$visualViewpor, _window$visualViewpor2;\n    // iOS 12 does not support `visualViewport`.\n    const offsetLeft = ((_window$visualViewpor = window.visualViewport) == null ? void 0 : _window$visualViewpor.offsetLeft) || 0;\n    const offsetTop = ((_window$visualViewpor2 = window.visualViewport) == null ? void 0 : _window$visualViewpor2.offsetTop) || 0;\n    Object.assign(bodyStyle, {\n      position: 'fixed',\n      top: -(scrollY - Math.floor(offsetTop)) + \"px\",\n      left: -(scrollX - Math.floor(offsetLeft)) + \"px\",\n      right: '0'\n    });\n  }\n  return () => {\n    Object.assign(bodyStyle, {\n      overflow: '',\n      [paddingProp]: ''\n    });\n    if (isIOS) {\n      Object.assign(bodyStyle, {\n        position: '',\n        top: '',\n        left: '',\n        right: ''\n      });\n      window.scrollTo(scrollX, scrollY);\n    }\n  };\n}\nlet cleanup = () => {};\n\n/**\n * Provides base styling for a fixed overlay element to dim content or block\n * pointer events behind a floating element.\n * It's a regular `<div>`, so it can be styled via any CSS solution you prefer.\n * @see https://floating-ui.com/docs/FloatingOverlay\n */\nconst FloatingOverlay = /*#__PURE__*/React.forwardRef(function FloatingOverlay(props, ref) {\n  const {\n    lockScroll = false,\n    ...rest\n  } = props;\n  index(() => {\n    if (!lockScroll) return;\n    lockCount++;\n    if (lockCount === 1) {\n      cleanup = enableScrollLock();\n    }\n    return () => {\n      lockCount--;\n      if (lockCount === 0) {\n        cleanup();\n      }\n    };\n  }, [lockScroll]);\n  return /*#__PURE__*/React.createElement(\"div\", _extends({\n    ref: ref\n  }, rest, {\n    style: {\n      position: 'fixed',\n      overflow: 'auto',\n      top: 0,\n      right: 0,\n      bottom: 0,\n      left: 0,\n      ...rest.style\n    }\n  }));\n});\n\nfunction isButtonTarget(event) {\n  return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';\n}\nfunction isSpaceIgnored(element) {\n  return isTypeableElement(element);\n}\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nfunction useClick(context, props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    open,\n    onOpenChange,\n    dataRef,\n    elements: {\n      domReference\n    }\n  } = context;\n  const {\n    enabled = true,\n    event: eventOption = 'click',\n    toggle = true,\n    ignoreMouse = false,\n    keyboardHandlers = true,\n    stickIfOpen = true\n  } = props;\n  const pointerTypeRef = React.useRef();\n  const didKeyDownRef = React.useRef(false);\n  const reference = React.useMemo(() => ({\n    onPointerDown(event) {\n      pointerTypeRef.current = event.pointerType;\n    },\n    onMouseDown(event) {\n      const pointerType = pointerTypeRef.current;\n\n      // Ignore all buttons except for the \"main\" button.\n      // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n      if (event.button !== 0) return;\n      if (eventOption === 'click') return;\n      if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;\n      if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'mousedown' : true)) {\n        onOpenChange(false, event.nativeEvent, 'click');\n      } else {\n        // Prevent stealing focus from the floating element\n        event.preventDefault();\n        onOpenChange(true, event.nativeEvent, 'click');\n      }\n    },\n    onClick(event) {\n      const pointerType = pointerTypeRef.current;\n      if (eventOption === 'mousedown' && pointerTypeRef.current) {\n        pointerTypeRef.current = undefined;\n        return;\n      }\n      if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;\n      if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'click' : true)) {\n        onOpenChange(false, event.nativeEvent, 'click');\n      } else {\n        onOpenChange(true, event.nativeEvent, 'click');\n      }\n    },\n    onKeyDown(event) {\n      pointerTypeRef.current = undefined;\n      if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {\n        return;\n      }\n      if (event.key === ' ' && !isSpaceIgnored(domReference)) {\n        // Prevent scrolling\n        event.preventDefault();\n        didKeyDownRef.current = true;\n      }\n      if (event.key === 'Enter') {\n        if (open && toggle) {\n          onOpenChange(false, event.nativeEvent, 'click');\n        } else {\n          onOpenChange(true, event.nativeEvent, 'click');\n        }\n      }\n    },\n    onKeyUp(event) {\n      if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {\n        return;\n      }\n      if (event.key === ' ' && didKeyDownRef.current) {\n        didKeyDownRef.current = false;\n        if (open && toggle) {\n          onOpenChange(false, event.nativeEvent, 'click');\n        } else {\n          onOpenChange(true, event.nativeEvent, 'click');\n        }\n      }\n    }\n  }), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, stickIfOpen, toggle]);\n  return React.useMemo(() => enabled ? {\n    reference\n  } : {}, [enabled, reference]);\n}\n\nfunction createVirtualElement(domElement, data) {\n  let offsetX = null;\n  let offsetY = null;\n  let isAutoUpdateEvent = false;\n  return {\n    contextElement: domElement || undefined,\n    getBoundingClientRect() {\n      var _data$dataRef$current;\n      const domRect = (domElement == null ? void 0 : domElement.getBoundingClientRect()) || {\n        width: 0,\n        height: 0,\n        x: 0,\n        y: 0\n      };\n      const isXAxis = data.axis === 'x' || data.axis === 'both';\n      const isYAxis = data.axis === 'y' || data.axis === 'both';\n      const canTrackCursorOnAutoUpdate = ['mouseenter', 'mousemove'].includes(((_data$dataRef$current = data.dataRef.current.openEvent) == null ? void 0 : _data$dataRef$current.type) || '') && data.pointerType !== 'touch';\n      let width = domRect.width;\n      let height = domRect.height;\n      let x = domRect.x;\n      let y = domRect.y;\n      if (offsetX == null && data.x && isXAxis) {\n        offsetX = domRect.x - data.x;\n      }\n      if (offsetY == null && data.y && isYAxis) {\n        offsetY = domRect.y - data.y;\n      }\n      x -= offsetX || 0;\n      y -= offsetY || 0;\n      width = 0;\n      height = 0;\n      if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {\n        width = data.axis === 'y' ? domRect.width : 0;\n        height = data.axis === 'x' ? domRect.height : 0;\n        x = isXAxis && data.x != null ? data.x : x;\n        y = isYAxis && data.y != null ? data.y : y;\n      } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {\n        height = data.axis === 'x' ? domRect.height : height;\n        width = data.axis === 'y' ? domRect.width : width;\n      }\n      isAutoUpdateEvent = true;\n      return {\n        width,\n        height,\n        x,\n        y,\n        top: y,\n        right: x + width,\n        bottom: y + height,\n        left: x\n      };\n    }\n  };\n}\nfunction isMouseBasedEvent(event) {\n  return event != null && event.clientX != null;\n}\n/**\n * Positions the floating element relative to a client point (in the viewport),\n * such as the mouse position. By default, it follows the mouse cursor.\n * @see https://floating-ui.com/docs/useClientPoint\n */\nfunction useClientPoint(context, props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    open,\n    dataRef,\n    elements: {\n      floating,\n      domReference\n    },\n    refs\n  } = context;\n  const {\n    enabled = true,\n    axis = 'both',\n    x = null,\n    y = null\n  } = props;\n  const initialRef = React.useRef(false);\n  const cleanupListenerRef = React.useRef(null);\n  const [pointerType, setPointerType] = React.useState();\n  const [reactive, setReactive] = React.useState([]);\n  const setReference = useEffectEvent((x, y) => {\n    if (initialRef.current) return;\n\n    // Prevent setting if the open event was not a mouse-like one\n    // (e.g. focus to open, then hover over the reference element).\n    // Only apply if the event exists.\n    if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {\n      return;\n    }\n    refs.setPositionReference(createVirtualElement(domReference, {\n      x,\n      y,\n      axis,\n      dataRef,\n      pointerType\n    }));\n  });\n  const handleReferenceEnterOrMove = useEffectEvent(event => {\n    if (x != null || y != null) return;\n    if (!open) {\n      setReference(event.clientX, event.clientY);\n    } else if (!cleanupListenerRef.current) {\n      // If there's no cleanup, there's no listener, but we want to ensure\n      // we add the listener if the cursor landed on the floating element and\n      // then back on the reference (i.e. it's interactive).\n      setReactive([]);\n    }\n  });\n\n  // If the pointer is a mouse-like pointer, we want to continue following the\n  // mouse even if the floating element is transitioning out. On touch\n  // devices, this is undesirable because the floating element will move to\n  // the dismissal touch point.\n  const openCheck = isMouseLikePointerType(pointerType) ? floating : open;\n  const addListener = React.useCallback(() => {\n    // Explicitly specified `x`/`y` coordinates shouldn't add a listener.\n    if (!openCheck || !enabled || x != null || y != null) return;\n    const win = getWindow(floating);\n    function handleMouseMove(event) {\n      const target = getTarget(event);\n      if (!contains(floating, target)) {\n        setReference(event.clientX, event.clientY);\n      } else {\n        win.removeEventListener('mousemove', handleMouseMove);\n        cleanupListenerRef.current = null;\n      }\n    }\n    if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {\n      win.addEventListener('mousemove', handleMouseMove);\n      const cleanup = () => {\n        win.removeEventListener('mousemove', handleMouseMove);\n        cleanupListenerRef.current = null;\n      };\n      cleanupListenerRef.current = cleanup;\n      return cleanup;\n    }\n    refs.setPositionReference(domReference);\n  }, [openCheck, enabled, x, y, floating, dataRef, refs, domReference, setReference]);\n  React.useEffect(() => {\n    return addListener();\n  }, [addListener, reactive]);\n  React.useEffect(() => {\n    if (enabled && !floating) {\n      initialRef.current = false;\n    }\n  }, [enabled, floating]);\n  React.useEffect(() => {\n    if (!enabled && open) {\n      initialRef.current = true;\n    }\n  }, [enabled, open]);\n  index(() => {\n    if (enabled && (x != null || y != null)) {\n      initialRef.current = false;\n      setReference(x, y);\n    }\n  }, [enabled, x, y, setReference]);\n  const reference = React.useMemo(() => {\n    function setPointerTypeRef(_ref) {\n      let {\n        pointerType\n      } = _ref;\n      setPointerType(pointerType);\n    }\n    return {\n      onPointerDown: setPointerTypeRef,\n      onPointerEnter: setPointerTypeRef,\n      onMouseMove: handleReferenceEnterOrMove,\n      onMouseEnter: handleReferenceEnterOrMove\n    };\n  }, [handleReferenceEnterOrMove]);\n  return React.useMemo(() => enabled ? {\n    reference\n  } : {}, [enabled, reference]);\n}\n\nconst bubbleHandlerKeys = {\n  pointerdown: 'onPointerDown',\n  mousedown: 'onMouseDown',\n  click: 'onClick'\n};\nconst captureHandlerKeys = {\n  pointerdown: 'onPointerDownCapture',\n  mousedown: 'onMouseDownCapture',\n  click: 'onClickCapture'\n};\nconst normalizeProp = normalizable => {\n  var _normalizable$escapeK, _normalizable$outside;\n  return {\n    escapeKey: typeof normalizable === 'boolean' ? normalizable : (_normalizable$escapeK = normalizable == null ? void 0 : normalizable.escapeKey) != null ? _normalizable$escapeK : false,\n    outsidePress: typeof normalizable === 'boolean' ? normalizable : (_normalizable$outside = normalizable == null ? void 0 : normalizable.outsidePress) != null ? _normalizable$outside : true\n  };\n};\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nfunction useDismiss(context, props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    open,\n    onOpenChange,\n    elements,\n    dataRef\n  } = context;\n  const {\n    enabled = true,\n    escapeKey = true,\n    outsidePress: unstable_outsidePress = true,\n    outsidePressEvent = 'pointerdown',\n    referencePress = false,\n    referencePressEvent = 'pointerdown',\n    ancestorScroll = false,\n    bubbles,\n    capture\n  } = props;\n  const tree = useFloatingTree();\n  const outsidePressFn = useEffectEvent(typeof unstable_outsidePress === 'function' ? unstable_outsidePress : () => false);\n  const outsidePress = typeof unstable_outsidePress === 'function' ? outsidePressFn : unstable_outsidePress;\n  const insideReactTreeRef = React.useRef(false);\n  const endedOrStartedInsideRef = React.useRef(false);\n  const {\n    escapeKey: escapeKeyBubbles,\n    outsidePress: outsidePressBubbles\n  } = normalizeProp(bubbles);\n  const {\n    escapeKey: escapeKeyCapture,\n    outsidePress: outsidePressCapture\n  } = normalizeProp(capture);\n  const isComposingRef = React.useRef(false);\n  const closeOnEscapeKeyDown = useEffectEvent(event => {\n    var _dataRef$current$floa;\n    if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n      return;\n    }\n\n    // Wait until IME is settled. Pressing `Escape` while composing should\n    // close the compose menu, but not the floating element.\n    if (isComposingRef.current) {\n      return;\n    }\n    const nodeId = (_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.nodeId;\n    const children = tree ? getChildren(tree.nodesRef.current, nodeId) : [];\n    if (!escapeKeyBubbles) {\n      event.stopPropagation();\n      if (children.length > 0) {\n        let shouldDismiss = true;\n        children.forEach(child => {\n          var _child$context;\n          if ((_child$context = child.context) != null && _child$context.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n            shouldDismiss = false;\n            return;\n          }\n        });\n        if (!shouldDismiss) {\n          return;\n        }\n      }\n    }\n    onOpenChange(false, isReactEvent(event) ? event.nativeEvent : event, 'escape-key');\n  });\n  const closeOnEscapeKeyDownCapture = useEffectEvent(event => {\n    var _getTarget2;\n    const callback = () => {\n      var _getTarget;\n      closeOnEscapeKeyDown(event);\n      (_getTarget = getTarget(event)) == null || _getTarget.removeEventListener('keydown', callback);\n    };\n    (_getTarget2 = getTarget(event)) == null || _getTarget2.addEventListener('keydown', callback);\n  });\n  const closeOnPressOutside = useEffectEvent(event => {\n    var _dataRef$current$floa2;\n    // Given developers can stop the propagation of the synthetic event,\n    // we can only be confident with a positive value.\n    const insideReactTree = insideReactTreeRef.current;\n    insideReactTreeRef.current = false;\n\n    // When click outside is lazy (`click` event), handle dragging.\n    // Don't close if:\n    // - The click started inside the floating element.\n    // - The click ended inside the floating element.\n    const endedOrStartedInside = endedOrStartedInsideRef.current;\n    endedOrStartedInsideRef.current = false;\n    if (outsidePressEvent === 'click' && endedOrStartedInside) {\n      return;\n    }\n    if (insideReactTree) {\n      return;\n    }\n    if (typeof outsidePress === 'function' && !outsidePress(event)) {\n      return;\n    }\n    const target = getTarget(event);\n    const inertSelector = \"[\" + createAttribute('inert') + \"]\";\n    const markers = getDocument(elements.floating).querySelectorAll(inertSelector);\n    let targetRootAncestor = isElement(target) ? target : null;\n    while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n      const nextParent = getParentNode(targetRootAncestor);\n      if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n        break;\n      }\n      targetRootAncestor = nextParent;\n    }\n\n    // Check if the click occurred on a third-party element injected after the\n    // floating element rendered.\n    if (markers.length && isElement(target) && !isRootElement(target) &&\n    // Clicked on a direct ancestor (e.g. FloatingOverlay).\n    !contains(target, elements.floating) &&\n    // If the target root element contains none of the markers, then the\n    // element was injected after the floating element rendered.\n    Array.from(markers).every(marker => !contains(targetRootAncestor, marker))) {\n      return;\n    }\n\n    // Check if the click occurred on the scrollbar\n    if (isHTMLElement(target) && floating) {\n      // In Firefox, `target.scrollWidth > target.clientWidth` for inline\n      // elements.\n      const canScrollX = target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n      const canScrollY = target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n      let xCond = canScrollY && event.offsetX > target.clientWidth;\n\n      // In some browsers it is possible to change the <body> (or window)\n      // scrollbar to the left side, but is very rare and is difficult to\n      // check for. Plus, for modal dialogs with backdrops, it is more\n      // important that the backdrop is checked but not so much the window.\n      if (canScrollY) {\n        const isRTL = getComputedStyle(target).direction === 'rtl';\n        if (isRTL) {\n          xCond = event.offsetX <= target.offsetWidth - target.clientWidth;\n        }\n      }\n      if (xCond || canScrollX && event.offsetY > target.clientHeight) {\n        return;\n      }\n    }\n    const nodeId = (_dataRef$current$floa2 = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa2.nodeId;\n    const targetIsInsideChildren = tree && getChildren(tree.nodesRef.current, nodeId).some(node => {\n      var _node$context;\n      return isEventTargetWithin(event, (_node$context = node.context) == null ? void 0 : _node$context.elements.floating);\n    });\n    if (isEventTargetWithin(event, elements.floating) || isEventTargetWithin(event, elements.domReference) || targetIsInsideChildren) {\n      return;\n    }\n    const children = tree ? getChildren(tree.nodesRef.current, nodeId) : [];\n    if (children.length > 0) {\n      let shouldDismiss = true;\n      children.forEach(child => {\n        var _child$context2;\n        if ((_child$context2 = child.context) != null && _child$context2.open && !child.context.dataRef.current.__outsidePressBubbles) {\n          shouldDismiss = false;\n          return;\n        }\n      });\n      if (!shouldDismiss) {\n        return;\n      }\n    }\n    onOpenChange(false, event, 'outside-press');\n  });\n  const closeOnPressOutsideCapture = useEffectEvent(event => {\n    var _getTarget4;\n    const callback = () => {\n      var _getTarget3;\n      closeOnPressOutside(event);\n      (_getTarget3 = getTarget(event)) == null || _getTarget3.removeEventListener(outsidePressEvent, callback);\n    };\n    (_getTarget4 = getTarget(event)) == null || _getTarget4.addEventListener(outsidePressEvent, callback);\n  });\n  React.useEffect(() => {\n    if (!open || !enabled) {\n      return;\n    }\n    dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n    dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n    let compositionTimeout = -1;\n    function onScroll(event) {\n      onOpenChange(false, event, 'ancestor-scroll');\n    }\n    function handleCompositionStart() {\n      window.clearTimeout(compositionTimeout);\n      isComposingRef.current = true;\n    }\n    function handleCompositionEnd() {\n      // Safari fires `compositionend` before `keydown`, so we need to wait\n      // until the next tick to set `isComposing` to `false`.\n      // https://bugs.webkit.org/show_bug.cgi?id=165004\n      compositionTimeout = window.setTimeout(() => {\n        isComposingRef.current = false;\n      },\n      // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n      // Only apply to WebKit for the test to remain 0ms.\n      isWebKit() ? 5 : 0);\n    }\n    const doc = getDocument(elements.floating);\n    if (escapeKey) {\n      doc.addEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n      doc.addEventListener('compositionstart', handleCompositionStart);\n      doc.addEventListener('compositionend', handleCompositionEnd);\n    }\n    outsidePress && doc.addEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n    let ancestors = [];\n    if (ancestorScroll) {\n      if (isElement(elements.domReference)) {\n        ancestors = getOverflowAncestors(elements.domReference);\n      }\n      if (isElement(elements.floating)) {\n        ancestors = ancestors.concat(getOverflowAncestors(elements.floating));\n      }\n      if (!isElement(elements.reference) && elements.reference && elements.reference.contextElement) {\n        ancestors = ancestors.concat(getOverflowAncestors(elements.reference.contextElement));\n      }\n    }\n\n    // Ignore the visual viewport for scrolling dismissal (allow pinch-zoom)\n    ancestors = ancestors.filter(ancestor => {\n      var _doc$defaultView;\n      return ancestor !== ((_doc$defaultView = doc.defaultView) == null ? void 0 : _doc$defaultView.visualViewport);\n    });\n    ancestors.forEach(ancestor => {\n      ancestor.addEventListener('scroll', onScroll, {\n        passive: true\n      });\n    });\n    return () => {\n      if (escapeKey) {\n        doc.removeEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n        doc.removeEventListener('compositionstart', handleCompositionStart);\n        doc.removeEventListener('compositionend', handleCompositionEnd);\n      }\n      outsidePress && doc.removeEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n      ancestors.forEach(ancestor => {\n        ancestor.removeEventListener('scroll', onScroll);\n      });\n      window.clearTimeout(compositionTimeout);\n    };\n  }, [dataRef, elements, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture]);\n  React.useEffect(() => {\n    insideReactTreeRef.current = false;\n  }, [outsidePress, outsidePressEvent]);\n  const reference = React.useMemo(() => ({\n    onKeyDown: closeOnEscapeKeyDown,\n    [bubbleHandlerKeys[referencePressEvent]]: event => {\n      if (referencePress) {\n        onOpenChange(false, event.nativeEvent, 'reference-press');\n      }\n    }\n  }), [closeOnEscapeKeyDown, onOpenChange, referencePress, referencePressEvent]);\n  const floating = React.useMemo(() => ({\n    onKeyDown: closeOnEscapeKeyDown,\n    onMouseDown() {\n      endedOrStartedInsideRef.current = true;\n    },\n    onMouseUp() {\n      endedOrStartedInsideRef.current = true;\n    },\n    [captureHandlerKeys[outsidePressEvent]]: () => {\n      insideReactTreeRef.current = true;\n    }\n  }), [closeOnEscapeKeyDown, outsidePressEvent]);\n  return React.useMemo(() => enabled ? {\n    reference,\n    floating\n  } : {}, [enabled, reference, floating]);\n}\n\nfunction useFloatingRootContext(options) {\n  const {\n    open = false,\n    onOpenChange: onOpenChangeProp,\n    elements: elementsProp\n  } = options;\n  const floatingId = useId();\n  const dataRef = React.useRef({});\n  const [events] = React.useState(() => createPubSub());\n  const nested = useFloatingParentNodeId() != null;\n  if (process.env.NODE_ENV !== \"production\") {\n    const optionDomReference = elementsProp.reference;\n    if (optionDomReference && !isElement(optionDomReference)) {\n      error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `refs.setPositionReference()`', 'instead.');\n    }\n  }\n  const [positionReference, setPositionReference] = React.useState(elementsProp.reference);\n  const onOpenChange = useEffectEvent((open, event, reason) => {\n    dataRef.current.openEvent = open ? event : undefined;\n    events.emit('openchange', {\n      open,\n      event,\n      reason,\n      nested\n    });\n    onOpenChangeProp == null || onOpenChangeProp(open, event, reason);\n  });\n  const refs = React.useMemo(() => ({\n    setPositionReference\n  }), []);\n  const elements = React.useMemo(() => ({\n    reference: positionReference || elementsProp.reference || null,\n    floating: elementsProp.floating || null,\n    domReference: elementsProp.reference\n  }), [positionReference, elementsProp.reference, elementsProp.floating]);\n  return React.useMemo(() => ({\n    dataRef,\n    open,\n    onOpenChange,\n    elements,\n    events,\n    floatingId,\n    refs\n  }), [open, onOpenChange, elements, events, floatingId, refs]);\n}\n\n/**\n * Provides data to position a floating element and context to add interactions.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    nodeId\n  } = options;\n  const internalRootContext = useFloatingRootContext({\n    ...options,\n    elements: {\n      reference: null,\n      floating: null,\n      ...options.elements\n    }\n  });\n  const rootContext = options.rootContext || internalRootContext;\n  const computedElements = rootContext.elements;\n  const [_domReference, setDomReference] = React.useState(null);\n  const [positionReference, _setPositionReference] = React.useState(null);\n  const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;\n  const domReference = optionDomReference || _domReference;\n  const domReferenceRef = React.useRef(null);\n  const tree = useFloatingTree();\n  index(() => {\n    if (domReference) {\n      domReferenceRef.current = domReference;\n    }\n  }, [domReference]);\n  const position = useFloating$1({\n    ...options,\n    elements: {\n      ...computedElements,\n      ...(positionReference && {\n        reference: positionReference\n      })\n    }\n  });\n  const setPositionReference = React.useCallback(node => {\n    const computedPositionReference = isElement(node) ? {\n      getBoundingClientRect: () => node.getBoundingClientRect(),\n      contextElement: node\n    } : node;\n    // Store the positionReference in state if the DOM reference is specified externally via the\n    // `elements.reference` option. This ensures that it won't be overridden on future renders.\n    _setPositionReference(computedPositionReference);\n    position.refs.setReference(computedPositionReference);\n  }, [position.refs]);\n  const setReference = React.useCallback(node => {\n    if (isElement(node) || node === null) {\n      domReferenceRef.current = node;\n      setDomReference(node);\n    }\n\n    // Backwards-compatibility for passing a virtual element to `reference`\n    // after it has set the DOM reference.\n    if (isElement(position.refs.reference.current) || position.refs.reference.current === null ||\n    // Don't allow setting virtual elements using the old technique back to\n    // `null` to support `positionReference` + an unstable `reference`\n    // callback ref.\n    node !== null && !isElement(node)) {\n      position.refs.setReference(node);\n    }\n  }, [position.refs]);\n  const refs = React.useMemo(() => ({\n    ...position.refs,\n    setReference,\n    setPositionReference,\n    domReference: domReferenceRef\n  }), [position.refs, setReference, setPositionReference]);\n  const elements = React.useMemo(() => ({\n    ...position.elements,\n    domReference: domReference\n  }), [position.elements, domReference]);\n  const context = React.useMemo(() => ({\n    ...position,\n    ...rootContext,\n    refs,\n    elements,\n    nodeId\n  }), [position, refs, elements, nodeId, rootContext]);\n  index(() => {\n    rootContext.dataRef.current.floatingContext = context;\n    const node = tree == null ? void 0 : tree.nodesRef.current.find(node => node.id === nodeId);\n    if (node) {\n      node.context = context;\n    }\n  });\n  return React.useMemo(() => ({\n    ...position,\n    context,\n    refs,\n    elements\n  }), [position, refs, elements, context]);\n}\n\n/**\n * Opens the floating element while the reference element has focus, like CSS\n * `:focus`.\n * @see https://floating-ui.com/docs/useFocus\n */\nfunction useFocus(context, props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    open,\n    onOpenChange,\n    events,\n    dataRef,\n    elements\n  } = context;\n  const {\n    enabled = true,\n    visibleOnly = true\n  } = props;\n  const blockFocusRef = React.useRef(false);\n  const timeoutRef = React.useRef();\n  const keyboardModalityRef = React.useRef(true);\n  React.useEffect(() => {\n    if (!enabled) return;\n    const win = getWindow(elements.domReference);\n\n    // If the reference was focused and the user left the tab/window, and the\n    // floating element was not open, the focus should be blocked when they\n    // return to the tab/window.\n    function onBlur() {\n      if (!open && isHTMLElement(elements.domReference) && elements.domReference === activeElement(getDocument(elements.domReference))) {\n        blockFocusRef.current = true;\n      }\n    }\n    function onKeyDown() {\n      keyboardModalityRef.current = true;\n    }\n    win.addEventListener('blur', onBlur);\n    win.addEventListener('keydown', onKeyDown, true);\n    return () => {\n      win.removeEventListener('blur', onBlur);\n      win.removeEventListener('keydown', onKeyDown, true);\n    };\n  }, [elements.domReference, open, enabled]);\n  React.useEffect(() => {\n    if (!enabled) return;\n    function onOpenChange(_ref) {\n      let {\n        reason\n      } = _ref;\n      if (reason === 'reference-press' || reason === 'escape-key') {\n        blockFocusRef.current = true;\n      }\n    }\n    events.on('openchange', onOpenChange);\n    return () => {\n      events.off('openchange', onOpenChange);\n    };\n  }, [events, enabled]);\n  React.useEffect(() => {\n    return () => {\n      clearTimeout(timeoutRef.current);\n    };\n  }, []);\n  const reference = React.useMemo(() => ({\n    onPointerDown(event) {\n      if (isVirtualPointerEvent(event.nativeEvent)) return;\n      keyboardModalityRef.current = false;\n    },\n    onMouseLeave() {\n      blockFocusRef.current = false;\n    },\n    onFocus(event) {\n      if (blockFocusRef.current) return;\n      const target = getTarget(event.nativeEvent);\n      if (visibleOnly && isElement(target)) {\n        try {\n          // Mac Safari unreliably matches `:focus-visible` on the reference\n          // if focus was outside the page initially - use the fallback\n          // instead.\n          if (isSafari() && isMac()) throw Error();\n          if (!target.matches(':focus-visible')) return;\n        } catch (e) {\n          // Old browsers will throw an error when using `:focus-visible`.\n          if (!keyboardModalityRef.current && !isTypeableElement(target)) {\n            return;\n          }\n        }\n      }\n      onOpenChange(true, event.nativeEvent, 'focus');\n    },\n    onBlur(event) {\n      blockFocusRef.current = false;\n      const relatedTarget = event.relatedTarget;\n      const nativeEvent = event.nativeEvent;\n\n      // Hit the non-modal focus management portal guard. Focus will be\n      // moved into the floating element immediately after.\n      const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute('focus-guard')) && relatedTarget.getAttribute('data-type') === 'outside';\n\n      // Wait for the window blur listener to fire.\n      timeoutRef.current = window.setTimeout(() => {\n        var _dataRef$current$floa;\n        const activeEl = activeElement(elements.domReference ? elements.domReference.ownerDocument : document);\n\n        // Focus left the page, keep it open.\n        if (!relatedTarget && activeEl === elements.domReference) return;\n\n        // When focusing the reference element (e.g. regular click), then\n        // clicking into the floating element, prevent it from hiding.\n        // Note: it must be focusable, e.g. `tabindex=\"-1\"`.\n        // We can not rely on relatedTarget to point to the correct element\n        // as it will only point to the shadow host of the newly focused element\n        // and not the element that actually has received focus if it is located\n        // inside a shadow root.\n        if (contains((_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.refs.floating.current, activeEl) || contains(elements.domReference, activeEl) || movedToFocusGuard) {\n          return;\n        }\n        onOpenChange(false, nativeEvent, 'focus');\n      });\n    }\n  }), [dataRef, elements.domReference, onOpenChange, visibleOnly]);\n  return React.useMemo(() => enabled ? {\n    reference\n  } : {}, [enabled, reference]);\n}\n\nconst ACTIVE_KEY = 'active';\nconst SELECTED_KEY = 'selected';\nfunction mergeProps(userProps, propsList, elementKey) {\n  const map = new Map();\n  const isItem = elementKey === 'item';\n  let domUserProps = userProps;\n  if (isItem && userProps) {\n    const {\n      [ACTIVE_KEY]: _,\n      [SELECTED_KEY]: __,\n      ...validProps\n    } = userProps;\n    domUserProps = validProps;\n  }\n  return {\n    ...(elementKey === 'floating' && {\n      tabIndex: -1,\n      [FOCUSABLE_ATTRIBUTE]: ''\n    }),\n    ...domUserProps,\n    ...propsList.map(value => {\n      const propsOrGetProps = value ? value[elementKey] : null;\n      if (typeof propsOrGetProps === 'function') {\n        return userProps ? propsOrGetProps(userProps) : null;\n      }\n      return propsOrGetProps;\n    }).concat(userProps).reduce((acc, props) => {\n      if (!props) {\n        return acc;\n      }\n      Object.entries(props).forEach(_ref => {\n        let [key, value] = _ref;\n        if (isItem && [ACTIVE_KEY, SELECTED_KEY].includes(key)) {\n          return;\n        }\n        if (key.indexOf('on') === 0) {\n          if (!map.has(key)) {\n            map.set(key, []);\n          }\n          if (typeof value === 'function') {\n            var _map$get;\n            (_map$get = map.get(key)) == null || _map$get.push(value);\n            acc[key] = function () {\n              var _map$get2;\n              for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n                args[_key] = arguments[_key];\n              }\n              return (_map$get2 = map.get(key)) == null ? void 0 : _map$get2.map(fn => fn(...args)).find(val => val !== undefined);\n            };\n          }\n        } else {\n          acc[key] = value;\n        }\n      });\n      return acc;\n    }, {})\n  };\n}\n/**\n * Merges an array of interaction hooks' props into prop getters, allowing\n * event handler functions to be composed together without overwriting one\n * another.\n * @see https://floating-ui.com/docs/useInteractions\n */\nfunction useInteractions(propsList) {\n  if (propsList === void 0) {\n    propsList = [];\n  }\n  const referenceDeps = propsList.map(key => key == null ? void 0 : key.reference);\n  const floatingDeps = propsList.map(key => key == null ? void 0 : key.floating);\n  const itemDeps = propsList.map(key => key == null ? void 0 : key.item);\n  const getReferenceProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'reference'),\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  referenceDeps);\n  const getFloatingProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'floating'),\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  floatingDeps);\n  const getItemProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'item'),\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  itemDeps);\n  return React.useMemo(() => ({\n    getReferenceProps,\n    getFloatingProps,\n    getItemProps\n  }), [getReferenceProps, getFloatingProps, getItemProps]);\n}\n\nlet isPreventScrollSupported = false;\nfunction doSwitch(orientation, vertical, horizontal) {\n  switch (orientation) {\n    case 'vertical':\n      return vertical;\n    case 'horizontal':\n      return horizontal;\n    default:\n      return vertical || horizontal;\n  }\n}\nfunction isMainOrientationKey(key, orientation) {\n  const vertical = key === ARROW_UP || key === ARROW_DOWN;\n  const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n  return doSwitch(orientation, vertical, horizontal);\n}\nfunction isMainOrientationToEndKey(key, orientation, rtl) {\n  const vertical = key === ARROW_DOWN;\n  const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n  return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nfunction isCrossOrientationOpenKey(key, orientation, rtl) {\n  const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n  const horizontal = key === ARROW_DOWN;\n  return doSwitch(orientation, vertical, horizontal);\n}\nfunction isCrossOrientationCloseKey(key, orientation, rtl) {\n  const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n  const horizontal = key === ARROW_UP;\n  return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nfunction useListNavigation(context, props) {\n  const {\n    open,\n    onOpenChange,\n    elements\n  } = context;\n  const {\n    listRef,\n    activeIndex,\n    onNavigate: unstable_onNavigate = () => {},\n    enabled = true,\n    selectedIndex = null,\n    allowEscape = false,\n    loop = false,\n    nested = false,\n    rtl = false,\n    virtual = false,\n    focusItemOnOpen = 'auto',\n    focusItemOnHover = true,\n    openOnArrowKeyDown = true,\n    disabledIndices = undefined,\n    orientation = 'vertical',\n    cols = 1,\n    scrollItemIntoView = true,\n    virtualItemRef,\n    itemSizes,\n    dense = false\n  } = props;\n  if (process.env.NODE_ENV !== \"production\") {\n    if (allowEscape) {\n      if (!loop) {\n        warn('`useListNavigation` looping must be enabled to allow escaping.');\n      }\n      if (!virtual) {\n        warn('`useListNavigation` must be virtual to allow escaping.');\n      }\n    }\n    if (orientation === 'vertical' && cols > 1) {\n      warn('In grid list navigation mode (`cols` > 1), the `orientation` should', 'be either \"horizontal\" or \"both\".');\n    }\n  }\n  const floatingFocusElement = getFloatingFocusElement(elements.floating);\n  const floatingFocusElementRef = useLatestRef(floatingFocusElement);\n  const parentId = useFloatingParentNodeId();\n  const tree = useFloatingTree();\n  const onNavigate = useEffectEvent(unstable_onNavigate);\n  const typeableComboboxReference = isTypeableCombobox(elements.domReference);\n  const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n  const indexRef = React.useRef(selectedIndex != null ? selectedIndex : -1);\n  const keyRef = React.useRef(null);\n  const isPointerModalityRef = React.useRef(true);\n  const previousOnNavigateRef = React.useRef(onNavigate);\n  const previousMountedRef = React.useRef(!!elements.floating);\n  const previousOpenRef = React.useRef(open);\n  const forceSyncFocus = React.useRef(false);\n  const forceScrollIntoViewRef = React.useRef(false);\n  const disabledIndicesRef = useLatestRef(disabledIndices);\n  const latestOpenRef = useLatestRef(open);\n  const scrollItemIntoViewRef = useLatestRef(scrollItemIntoView);\n  const selectedIndexRef = useLatestRef(selectedIndex);\n  const [activeId, setActiveId] = React.useState();\n  const [virtualId, setVirtualId] = React.useState();\n  const focusItem = useEffectEvent(function (listRef, indexRef, forceScrollIntoView) {\n    if (forceScrollIntoView === void 0) {\n      forceScrollIntoView = false;\n    }\n    function runFocus(item) {\n      if (virtual) {\n        setActiveId(item.id);\n        tree == null || tree.events.emit('virtualfocus', item);\n        if (virtualItemRef) {\n          virtualItemRef.current = item;\n        }\n      } else {\n        enqueueFocus(item, {\n          preventScroll: true,\n          // Mac Safari does not move the virtual cursor unless the focus call\n          // is sync. However, for the very first focus call, we need to wait\n          // for the position to be ready in order to prevent unwanted\n          // scrolling. This means the virtual cursor will not move to the first\n          // item when first opening the floating element, but will on\n          // subsequent calls. `preventScroll` is supported in modern Safari,\n          // so we can use that instead.\n          // iOS Safari must be async or the first item will not be focused.\n          sync: isMac() && isSafari() ? isPreventScrollSupported || forceSyncFocus.current : false\n        });\n      }\n    }\n    const initialItem = listRef.current[indexRef.current];\n    if (initialItem) {\n      runFocus(initialItem);\n    }\n    requestAnimationFrame(() => {\n      const waitedItem = listRef.current[indexRef.current] || initialItem;\n      if (!waitedItem) return;\n      if (!initialItem) {\n        runFocus(waitedItem);\n      }\n      const scrollIntoViewOptions = scrollItemIntoViewRef.current;\n      const shouldScrollIntoView = scrollIntoViewOptions && item && (forceScrollIntoView || !isPointerModalityRef.current);\n      if (shouldScrollIntoView) {\n        // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n        // by all browsers.\n        waitedItem.scrollIntoView == null || waitedItem.scrollIntoView(typeof scrollIntoViewOptions === 'boolean' ? {\n          block: 'nearest',\n          inline: 'nearest'\n        } : scrollIntoViewOptions);\n      }\n    });\n  });\n  index(() => {\n    document.createElement('div').focus({\n      get preventScroll() {\n        isPreventScrollSupported = true;\n        return false;\n      }\n    });\n  }, []);\n\n  // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n  // element. Also, reset `activeIndex` upon closing the floating element.\n  index(() => {\n    if (!enabled) return;\n    if (open && elements.floating) {\n      if (focusItemOnOpenRef.current && selectedIndex != null) {\n        // Regardless of the pointer modality, we want to ensure the selected\n        // item comes into view when the floating element is opened.\n        forceScrollIntoViewRef.current = true;\n        indexRef.current = selectedIndex;\n        onNavigate(selectedIndex);\n      }\n    } else if (previousMountedRef.current) {\n      // Since the user can specify `onNavigate` conditionally\n      // (onNavigate: open ? setActiveIndex : setSelectedIndex),\n      // we store and call the previous function.\n      indexRef.current = -1;\n      previousOnNavigateRef.current(null);\n    }\n  }, [enabled, open, elements.floating, selectedIndex, onNavigate]);\n\n  // Sync `activeIndex` to be the focused item while the floating element is\n  // open.\n  index(() => {\n    if (!enabled) return;\n    if (open && elements.floating) {\n      if (activeIndex == null) {\n        forceSyncFocus.current = false;\n        if (selectedIndexRef.current != null) {\n          return;\n        }\n\n        // Reset while the floating element was open (e.g. the list changed).\n        if (previousMountedRef.current) {\n          indexRef.current = -1;\n          focusItem(listRef, indexRef);\n        }\n\n        // Initial sync.\n        if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n          let runs = 0;\n          const waitForListPopulated = () => {\n            if (listRef.current[0] == null) {\n              // Avoid letting the browser paint if possible on the first try,\n              // otherwise use rAF. Don't try more than twice, since something\n              // is wrong otherwise.\n              if (runs < 2) {\n                const scheduler = runs ? requestAnimationFrame : queueMicrotask;\n                scheduler(waitForListPopulated);\n              }\n              runs++;\n            } else {\n              indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, orientation, rtl) || nested ? getMinIndex(listRef, disabledIndicesRef.current) : getMaxIndex(listRef, disabledIndicesRef.current);\n              keyRef.current = null;\n              onNavigate(indexRef.current);\n            }\n          };\n          waitForListPopulated();\n        }\n      } else if (!isIndexOutOfBounds(listRef, activeIndex)) {\n        indexRef.current = activeIndex;\n        focusItem(listRef, indexRef, forceScrollIntoViewRef.current);\n        forceScrollIntoViewRef.current = false;\n      }\n    }\n  }, [enabled, open, elements.floating, activeIndex, selectedIndexRef, nested, listRef, orientation, rtl, onNavigate, focusItem, disabledIndicesRef]);\n\n  // Ensure the parent floating element has focus when a nested child closes\n  // to allow arrow key navigation to work after the pointer leaves the child.\n  index(() => {\n    var _nodes$find;\n    if (!enabled || elements.floating || !tree || virtual || !previousMountedRef.current) {\n      return;\n    }\n    const nodes = tree.nodesRef.current;\n    const parent = (_nodes$find = nodes.find(node => node.id === parentId)) == null || (_nodes$find = _nodes$find.context) == null ? void 0 : _nodes$find.elements.floating;\n    const activeEl = activeElement(getDocument(elements.floating));\n    const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n    if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n      parent.focus({\n        preventScroll: true\n      });\n    }\n  }, [enabled, elements.floating, tree, parentId, virtual]);\n  index(() => {\n    if (!enabled) return;\n    if (!tree) return;\n    if (!virtual) return;\n    if (parentId) return;\n    function handleVirtualFocus(item) {\n      setVirtualId(item.id);\n      if (virtualItemRef) {\n        virtualItemRef.current = item;\n      }\n    }\n    tree.events.on('virtualfocus', handleVirtualFocus);\n    return () => {\n      tree.events.off('virtualfocus', handleVirtualFocus);\n    };\n  }, [enabled, tree, virtual, parentId, virtualItemRef]);\n  index(() => {\n    previousOnNavigateRef.current = onNavigate;\n    previousMountedRef.current = !!elements.floating;\n  });\n  index(() => {\n    if (!open) {\n      keyRef.current = null;\n    }\n  }, [open]);\n  index(() => {\n    previousOpenRef.current = open;\n  }, [open]);\n  const hasActiveIndex = activeIndex != null;\n  const item = React.useMemo(() => {\n    function syncCurrentTarget(currentTarget) {\n      if (!open) return;\n      const index = listRef.current.indexOf(currentTarget);\n      if (index !== -1) {\n        onNavigate(index);\n      }\n    }\n    const props = {\n      onFocus(_ref) {\n        let {\n          currentTarget\n        } = _ref;\n        syncCurrentTarget(currentTarget);\n      },\n      onClick: _ref2 => {\n        let {\n          currentTarget\n        } = _ref2;\n        return currentTarget.focus({\n          preventScroll: true\n        });\n      },\n      // Safari\n      ...(focusItemOnHover && {\n        onMouseMove(_ref3) {\n          let {\n            currentTarget\n          } = _ref3;\n          syncCurrentTarget(currentTarget);\n        },\n        onPointerLeave(_ref4) {\n          let {\n            pointerType\n          } = _ref4;\n          if (!isPointerModalityRef.current || pointerType === 'touch') {\n            return;\n          }\n          indexRef.current = -1;\n          focusItem(listRef, indexRef);\n          onNavigate(null);\n          if (!virtual) {\n            enqueueFocus(floatingFocusElementRef.current, {\n              preventScroll: true\n            });\n          }\n        }\n      })\n    };\n    return props;\n  }, [open, floatingFocusElementRef, focusItem, focusItemOnHover, listRef, onNavigate, virtual]);\n  const commonOnKeyDown = useEffectEvent(event => {\n    isPointerModalityRef.current = false;\n    forceSyncFocus.current = true;\n\n    // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n    // don't appear to suffer from this. `event.isComposing` is avoided due to\n    // Safari not supporting it properly (although it's not needed in the first\n    // place for Safari, just avoiding any possible issues).\n    if (event.which === 229) {\n      return;\n    }\n\n    // If the floating element is animating out, ignore navigation. Otherwise,\n    // the `activeIndex` gets set to 0 despite not being open so the next time\n    // the user ArrowDowns, the first item won't be focused.\n    if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n      return;\n    }\n    if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl)) {\n      stopEvent(event);\n      onOpenChange(false, event.nativeEvent, 'list-navigation');\n      if (isHTMLElement(elements.domReference)) {\n        if (virtual) {\n          tree == null || tree.events.emit('virtualfocus', elements.domReference);\n        } else {\n          elements.domReference.focus();\n        }\n      }\n      return;\n    }\n    const currentIndex = indexRef.current;\n    const minIndex = getMinIndex(listRef, disabledIndices);\n    const maxIndex = getMaxIndex(listRef, disabledIndices);\n    if (!typeableComboboxReference) {\n      if (event.key === 'Home') {\n        stopEvent(event);\n        indexRef.current = minIndex;\n        onNavigate(indexRef.current);\n      }\n      if (event.key === 'End') {\n        stopEvent(event);\n        indexRef.current = maxIndex;\n        onNavigate(indexRef.current);\n      }\n    }\n\n    // Grid navigation.\n    if (cols > 1) {\n      const sizes = itemSizes || Array.from({\n        length: listRef.current.length\n      }, () => ({\n        width: 1,\n        height: 1\n      }));\n      // To calculate movements on the grid, we use hypothetical cell indices\n      // as if every item was 1x1, then convert back to real indices.\n      const cellMap = buildCellMap(sizes, cols, dense);\n      const minGridIndex = cellMap.findIndex(index => index != null && !isDisabled(listRef.current, index, disabledIndices));\n      // last enabled index\n      const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isDisabled(listRef.current, index, disabledIndices) ? cellIndex : foundIndex, -1);\n      const index = cellMap[getGridNavigatedIndex({\n        current: cellMap.map(itemIndex => itemIndex != null ? listRef.current[itemIndex] : null)\n      }, {\n        event,\n        orientation,\n        loop,\n        rtl,\n        cols,\n        // treat undefined (empty grid spaces) as disabled indices so we\n        // don't end up in them\n        disabledIndices: getCellIndices([...(disabledIndices || listRef.current.map((_, index) => isDisabled(listRef.current, index) ? index : undefined)), undefined], cellMap),\n        minIndex: minGridIndex,\n        maxIndex: maxGridIndex,\n        prevIndex: getCellIndexOfCorner(indexRef.current > maxIndex ? minIndex : indexRef.current, sizes, cellMap, cols,\n        // use a corner matching the edge closest to the direction\n        // we're moving in so we don't end up in the same item. Prefer\n        // top/left over bottom/right.\n        event.key === ARROW_DOWN ? 'bl' : event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT) ? 'tr' : 'tl'),\n        stopEvent: true\n      })];\n      if (index != null) {\n        indexRef.current = index;\n        onNavigate(indexRef.current);\n      }\n      if (orientation === 'both') {\n        return;\n      }\n    }\n    if (isMainOrientationKey(event.key, orientation)) {\n      stopEvent(event);\n\n      // Reset the index if no item is focused.\n      if (open && !virtual && activeElement(event.currentTarget.ownerDocument) === event.currentTarget) {\n        indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n        onNavigate(indexRef.current);\n        return;\n      }\n      if (isMainOrientationToEndKey(event.key, orientation, rtl)) {\n        if (loop) {\n          indexRef.current = currentIndex >= maxIndex ? allowEscape && currentIndex !== listRef.current.length ? -1 : minIndex : findNonDisabledIndex(listRef, {\n            startingIndex: currentIndex,\n            disabledIndices\n          });\n        } else {\n          indexRef.current = Math.min(maxIndex, findNonDisabledIndex(listRef, {\n            startingIndex: currentIndex,\n            disabledIndices\n          }));\n        }\n      } else {\n        if (loop) {\n          indexRef.current = currentIndex <= minIndex ? allowEscape && currentIndex !== -1 ? listRef.current.length : maxIndex : findNonDisabledIndex(listRef, {\n            startingIndex: currentIndex,\n            decrement: true,\n            disabledIndices\n          });\n        } else {\n          indexRef.current = Math.max(minIndex, findNonDisabledIndex(listRef, {\n            startingIndex: currentIndex,\n            decrement: true,\n            disabledIndices\n          }));\n        }\n      }\n      if (isIndexOutOfBounds(listRef, indexRef.current)) {\n        onNavigate(null);\n      } else {\n        onNavigate(indexRef.current);\n      }\n    }\n  });\n  const ariaActiveDescendantProp = React.useMemo(() => {\n    return virtual && open && hasActiveIndex && {\n      'aria-activedescendant': virtualId || activeId\n    };\n  }, [virtual, open, hasActiveIndex, virtualId, activeId]);\n  const floating = React.useMemo(() => {\n    return {\n      'aria-orientation': orientation === 'both' ? undefined : orientation,\n      ...(!isTypeableCombobox(elements.domReference) && ariaActiveDescendantProp),\n      onKeyDown: commonOnKeyDown,\n      onPointerMove() {\n        isPointerModalityRef.current = true;\n      }\n    };\n  }, [ariaActiveDescendantProp, commonOnKeyDown, elements.domReference, orientation]);\n  const reference = React.useMemo(() => {\n    function checkVirtualMouse(event) {\n      if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n        focusItemOnOpenRef.current = true;\n      }\n    }\n    function checkVirtualPointer(event) {\n      // `pointerdown` fires first, reset the state then perform the checks.\n      focusItemOnOpenRef.current = focusItemOnOpen;\n      if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n        focusItemOnOpenRef.current = true;\n      }\n    }\n    return {\n      ...ariaActiveDescendantProp,\n      onKeyDown(event) {\n        isPointerModalityRef.current = false;\n        const isArrowKey = event.key.startsWith('Arrow');\n        const isHomeOrEndKey = ['Home', 'End'].includes(event.key);\n        const isMoveKey = isArrowKey || isHomeOrEndKey;\n        const isCrossOpenKey = isCrossOrientationOpenKey(event.key, orientation, rtl);\n        const isCrossCloseKey = isCrossOrientationCloseKey(event.key, orientation, rtl);\n        const isMainKey = isMainOrientationKey(event.key, orientation);\n        const isNavigationKey = (nested ? isCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n        if (virtual && open) {\n          const rootNode = tree == null ? void 0 : tree.nodesRef.current.find(node => node.parentId == null);\n          const deepestNode = tree && rootNode ? getDeepestNode(tree.nodesRef.current, rootNode.id) : null;\n          if (isMoveKey && deepestNode && virtualItemRef) {\n            const eventObject = new KeyboardEvent('keydown', {\n              key: event.key,\n              bubbles: true\n            });\n            if (isCrossOpenKey || isCrossCloseKey) {\n              var _deepestNode$context, _deepestNode$context2;\n              const isCurrentTarget = ((_deepestNode$context = deepestNode.context) == null ? void 0 : _deepestNode$context.elements.domReference) === event.currentTarget;\n              const dispatchItem = isCrossCloseKey && !isCurrentTarget ? (_deepestNode$context2 = deepestNode.context) == null ? void 0 : _deepestNode$context2.elements.domReference : isCrossOpenKey ? listRef.current.find(item => (item == null ? void 0 : item.id) === activeId) : null;\n              if (dispatchItem) {\n                stopEvent(event);\n                dispatchItem.dispatchEvent(eventObject);\n                setVirtualId(undefined);\n              }\n            }\n            if ((isMainKey || isHomeOrEndKey) && deepestNode.context) {\n              if (deepestNode.context.open && deepestNode.parentId && event.currentTarget !== deepestNode.context.elements.domReference) {\n                var _deepestNode$context$;\n                stopEvent(event);\n                (_deepestNode$context$ = deepestNode.context.elements.domReference) == null || _deepestNode$context$.dispatchEvent(eventObject);\n                return;\n              }\n            }\n          }\n          return commonOnKeyDown(event);\n        }\n\n        // If a floating element should not open on arrow key down, avoid\n        // setting `activeIndex` while it's closed.\n        if (!open && !openOnArrowKeyDown && isArrowKey) {\n          return;\n        }\n        if (isNavigationKey) {\n          keyRef.current = nested && isMainKey ? null : event.key;\n        }\n        if (nested) {\n          if (isCrossOpenKey) {\n            stopEvent(event);\n            if (open) {\n              indexRef.current = getMinIndex(listRef, disabledIndicesRef.current);\n              onNavigate(indexRef.current);\n            } else {\n              onOpenChange(true, event.nativeEvent, 'list-navigation');\n            }\n          }\n          return;\n        }\n        if (isMainKey) {\n          if (selectedIndex != null) {\n            indexRef.current = selectedIndex;\n          }\n          stopEvent(event);\n          if (!open && openOnArrowKeyDown) {\n            onOpenChange(true, event.nativeEvent, 'list-navigation');\n          } else {\n            commonOnKeyDown(event);\n          }\n          if (open) {\n            onNavigate(indexRef.current);\n          }\n        }\n      },\n      onFocus() {\n        if (open && !virtual) {\n          onNavigate(null);\n        }\n      },\n      onPointerDown: checkVirtualPointer,\n      onMouseDown: checkVirtualMouse,\n      onClick: checkVirtualMouse\n    };\n  }, [activeId, ariaActiveDescendantProp, commonOnKeyDown, disabledIndicesRef, focusItemOnOpen, listRef, nested, onNavigate, onOpenChange, open, openOnArrowKeyDown, orientation, rtl, selectedIndex, tree, virtual, virtualItemRef]);\n  return React.useMemo(() => enabled ? {\n    reference,\n    floating,\n    item\n  } : {}, [enabled, reference, floating, item]);\n}\n\nconst componentRoleToAriaRoleMap = /*#__PURE__*/new Map([['select', 'listbox'], ['combobox', 'listbox'], ['label', false]]);\n\n/**\n * Adds base screen reader props to the reference and floating elements for a\n * given floating element `role`.\n * @see https://floating-ui.com/docs/useRole\n */\nfunction useRole(context, props) {\n  var _componentRoleToAriaR;\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    open,\n    floatingId\n  } = context;\n  const {\n    enabled = true,\n    role = 'dialog'\n  } = props;\n  const ariaRole = (_componentRoleToAriaR = componentRoleToAriaRoleMap.get(role)) != null ? _componentRoleToAriaR : role;\n  const referenceId = useId();\n  const parentId = useFloatingParentNodeId();\n  const isNested = parentId != null;\n  const reference = React.useMemo(() => {\n    if (ariaRole === 'tooltip' || role === 'label') {\n      return {\n        [\"aria-\" + (role === 'label' ? 'labelledby' : 'describedby')]: open ? floatingId : undefined\n      };\n    }\n    return {\n      'aria-expanded': open ? 'true' : 'false',\n      'aria-haspopup': ariaRole === 'alertdialog' ? 'dialog' : ariaRole,\n      'aria-controls': open ? floatingId : undefined,\n      ...(ariaRole === 'listbox' && {\n        role: 'combobox'\n      }),\n      ...(ariaRole === 'menu' && {\n        id: referenceId\n      }),\n      ...(ariaRole === 'menu' && isNested && {\n        role: 'menuitem'\n      }),\n      ...(role === 'select' && {\n        'aria-autocomplete': 'none'\n      }),\n      ...(role === 'combobox' && {\n        'aria-autocomplete': 'list'\n      })\n    };\n  }, [ariaRole, floatingId, isNested, open, referenceId, role]);\n  const floating = React.useMemo(() => {\n    const floatingProps = {\n      id: floatingId,\n      ...(ariaRole && {\n        role: ariaRole\n      })\n    };\n    if (ariaRole === 'tooltip' || role === 'label') {\n      return floatingProps;\n    }\n    return {\n      ...floatingProps,\n      ...(ariaRole === 'menu' && {\n        'aria-labelledby': referenceId\n      })\n    };\n  }, [ariaRole, floatingId, referenceId, role]);\n  const item = React.useCallback(_ref => {\n    let {\n      active,\n      selected\n    } = _ref;\n    const commonProps = {\n      role: 'option',\n      ...(active && {\n        id: floatingId + \"-option\"\n      })\n    };\n\n    // For `menu`, we are unable to tell if the item is a `menuitemradio`\n    // or `menuitemcheckbox`. For backwards-compatibility reasons, also\n    // avoid defaulting to `menuitem` as it may overwrite custom role props.\n    switch (role) {\n      case 'select':\n        return {\n          ...commonProps,\n          'aria-selected': active && selected\n        };\n      case 'combobox':\n        {\n          return {\n            ...commonProps,\n            ...(active && {\n              'aria-selected': true\n            })\n          };\n        }\n    }\n    return {};\n  }, [floatingId, role]);\n  return React.useMemo(() => enabled ? {\n    reference,\n    floating,\n    item\n  } : {}, [enabled, reference, floating, item]);\n}\n\n// Converts a JS style key like `backgroundColor` to a CSS transition-property\n// like `background-color`.\nconst camelCaseToKebabCase = str => str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? '-' : '') + $.toLowerCase());\nfunction execWithArgsOrReturn(valueOrFn, args) {\n  return typeof valueOrFn === 'function' ? valueOrFn(args) : valueOrFn;\n}\nfunction useDelayUnmount(open, durationMs) {\n  const [isMounted, setIsMounted] = React.useState(open);\n  if (open && !isMounted) {\n    setIsMounted(true);\n  }\n  React.useEffect(() => {\n    if (!open && isMounted) {\n      const timeout = setTimeout(() => setIsMounted(false), durationMs);\n      return () => clearTimeout(timeout);\n    }\n  }, [open, isMounted, durationMs]);\n  return isMounted;\n}\n/**\n * Provides a status string to apply CSS transitions to a floating element,\n * correctly handling placement-aware transitions.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstatus\n */\nfunction useTransitionStatus(context, props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    open,\n    elements: {\n      floating\n    }\n  } = context;\n  const {\n    duration = 250\n  } = props;\n  const isNumberDuration = typeof duration === 'number';\n  const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n  const [status, setStatus] = React.useState('unmounted');\n  const isMounted = useDelayUnmount(open, closeDuration);\n  if (!isMounted && status === 'close') {\n    setStatus('unmounted');\n  }\n  index(() => {\n    if (!floating) return;\n    if (open) {\n      setStatus('initial');\n      const frame = requestAnimationFrame(() => {\n        setStatus('open');\n      });\n      return () => {\n        cancelAnimationFrame(frame);\n      };\n    }\n    setStatus('close');\n  }, [open, floating]);\n  return {\n    isMounted,\n    status\n  };\n}\n/**\n * Provides styles to apply CSS transitions to a floating element, correctly\n * handling placement-aware transitions. Wrapper around `useTransitionStatus`.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstyles\n */\nfunction useTransitionStyles(context, props) {\n  if (props === void 0) {\n    props = {};\n  }\n  const {\n    initial: unstable_initial = {\n      opacity: 0\n    },\n    open: unstable_open,\n    close: unstable_close,\n    common: unstable_common,\n    duration = 250\n  } = props;\n  const placement = context.placement;\n  const side = placement.split('-')[0];\n  const fnArgs = React.useMemo(() => ({\n    side,\n    placement\n  }), [side, placement]);\n  const isNumberDuration = typeof duration === 'number';\n  const openDuration = (isNumberDuration ? duration : duration.open) || 0;\n  const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n  const [styles, setStyles] = React.useState(() => ({\n    ...execWithArgsOrReturn(unstable_common, fnArgs),\n    ...execWithArgsOrReturn(unstable_initial, fnArgs)\n  }));\n  const {\n    isMounted,\n    status\n  } = useTransitionStatus(context, {\n    duration\n  });\n  const initialRef = useLatestRef(unstable_initial);\n  const openRef = useLatestRef(unstable_open);\n  const closeRef = useLatestRef(unstable_close);\n  const commonRef = useLatestRef(unstable_common);\n  index(() => {\n    const initialStyles = execWithArgsOrReturn(initialRef.current, fnArgs);\n    const closeStyles = execWithArgsOrReturn(closeRef.current, fnArgs);\n    const commonStyles = execWithArgsOrReturn(commonRef.current, fnArgs);\n    const openStyles = execWithArgsOrReturn(openRef.current, fnArgs) || Object.keys(initialStyles).reduce((acc, key) => {\n      acc[key] = '';\n      return acc;\n    }, {});\n    if (status === 'initial') {\n      setStyles(styles => ({\n        transitionProperty: styles.transitionProperty,\n        ...commonStyles,\n        ...initialStyles\n      }));\n    }\n    if (status === 'open') {\n      setStyles({\n        transitionProperty: Object.keys(openStyles).map(camelCaseToKebabCase).join(','),\n        transitionDuration: openDuration + \"ms\",\n        ...commonStyles,\n        ...openStyles\n      });\n    }\n    if (status === 'close') {\n      const styles = closeStyles || initialStyles;\n      setStyles({\n        transitionProperty: Object.keys(styles).map(camelCaseToKebabCase).join(','),\n        transitionDuration: closeDuration + \"ms\",\n        ...commonStyles,\n        ...styles\n      });\n    }\n  }, [closeDuration, closeRef, initialRef, openRef, commonRef, openDuration, status, fnArgs]);\n  return {\n    isMounted,\n    styles\n  };\n}\n\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nfunction useTypeahead(context, props) {\n  var _ref;\n  const {\n    open,\n    dataRef\n  } = context;\n  const {\n    listRef,\n    activeIndex,\n    onMatch: unstable_onMatch,\n    onTypingChange: unstable_onTypingChange,\n    enabled = true,\n    findMatch = null,\n    resetMs = 750,\n    ignoreKeys = [],\n    selectedIndex = null\n  } = props;\n  const timeoutIdRef = React.useRef();\n  const stringRef = React.useRef('');\n  const prevIndexRef = React.useRef((_ref = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref : -1);\n  const matchIndexRef = React.useRef(null);\n  const onMatch = useEffectEvent(unstable_onMatch);\n  const onTypingChange = useEffectEvent(unstable_onTypingChange);\n  const findMatchRef = useLatestRef(findMatch);\n  const ignoreKeysRef = useLatestRef(ignoreKeys);\n  index(() => {\n    if (open) {\n      clearTimeout(timeoutIdRef.current);\n      matchIndexRef.current = null;\n      stringRef.current = '';\n    }\n  }, [open]);\n  index(() => {\n    // Sync arrow key navigation but not typeahead navigation.\n    if (open && stringRef.current === '') {\n      var _ref2;\n      prevIndexRef.current = (_ref2 = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref2 : -1;\n    }\n  }, [open, selectedIndex, activeIndex]);\n  const setTypingChange = useEffectEvent(value => {\n    if (value) {\n      if (!dataRef.current.typing) {\n        dataRef.current.typing = value;\n        onTypingChange(value);\n      }\n    } else {\n      if (dataRef.current.typing) {\n        dataRef.current.typing = value;\n        onTypingChange(value);\n      }\n    }\n  });\n  const onKeyDown = useEffectEvent(event => {\n    function getMatchingIndex(list, orderedList, string) {\n      const str = findMatchRef.current ? findMatchRef.current(orderedList, string) : orderedList.find(text => (text == null ? void 0 : text.toLocaleLowerCase().indexOf(string.toLocaleLowerCase())) === 0);\n      return str ? list.indexOf(str) : -1;\n    }\n    const listContent = listRef.current;\n    if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n      if (getMatchingIndex(listContent, listContent, stringRef.current) === -1) {\n        setTypingChange(false);\n      } else if (event.key === ' ') {\n        stopEvent(event);\n      }\n    }\n    if (listContent == null || ignoreKeysRef.current.includes(event.key) ||\n    // Character key.\n    event.key.length !== 1 ||\n    // Modifier key.\n    event.ctrlKey || event.metaKey || event.altKey) {\n      return;\n    }\n    if (open && event.key !== ' ') {\n      stopEvent(event);\n      setTypingChange(true);\n    }\n\n    // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n    // allow it in this case, too.\n    const allowRapidSuccessionOfFirstLetter = listContent.every(text => {\n      var _text$, _text$2;\n      return text ? ((_text$ = text[0]) == null ? void 0 : _text$.toLocaleLowerCase()) !== ((_text$2 = text[1]) == null ? void 0 : _text$2.toLocaleLowerCase()) : true;\n    });\n\n    // Allows the user to cycle through items that start with the same letter\n    // in rapid succession.\n    if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n      stringRef.current = '';\n      prevIndexRef.current = matchIndexRef.current;\n    }\n    stringRef.current += event.key;\n    clearTimeout(timeoutIdRef.current);\n    timeoutIdRef.current = setTimeout(() => {\n      stringRef.current = '';\n      prevIndexRef.current = matchIndexRef.current;\n      setTypingChange(false);\n    }, resetMs);\n    const prevIndex = prevIndexRef.current;\n    const index = getMatchingIndex(listContent, [...listContent.slice((prevIndex || 0) + 1), ...listContent.slice(0, (prevIndex || 0) + 1)], stringRef.current);\n    if (index !== -1) {\n      onMatch(index);\n      matchIndexRef.current = index;\n    } else if (event.key !== ' ') {\n      stringRef.current = '';\n      setTypingChange(false);\n    }\n  });\n  const reference = React.useMemo(() => ({\n    onKeyDown\n  }), [onKeyDown]);\n  const floating = React.useMemo(() => {\n    return {\n      onKeyDown,\n      onKeyUp(event) {\n        if (event.key === ' ') {\n          setTypingChange(false);\n        }\n      }\n    };\n  }, [onKeyDown, setTypingChange]);\n  return React.useMemo(() => enabled ? {\n    reference,\n    floating\n  } : {}, [enabled, reference, floating]);\n}\n\nfunction getArgsWithCustomFloatingHeight(state, height) {\n  return {\n    ...state,\n    rects: {\n      ...state.rects,\n      floating: {\n        ...state.rects.floating,\n        height\n      }\n    }\n  };\n}\n/**\n * Positions the floating element such that an inner element inside of it is\n * anchored to the reference element.\n * @see https://floating-ui.com/docs/inner\n */\nconst inner = props => ({\n  name: 'inner',\n  options: props,\n  async fn(state) {\n    const {\n      listRef,\n      overflowRef,\n      onFallbackChange,\n      offset: innerOffset = 0,\n      index = 0,\n      minItemsVisible = 4,\n      referenceOverflowThreshold = 0,\n      scrollRef,\n      ...detectOverflowOptions\n    } = evaluate(props, state);\n    const {\n      rects,\n      elements: {\n        floating\n      }\n    } = state;\n    const item = listRef.current[index];\n    const scrollEl = (scrollRef == null ? void 0 : scrollRef.current) || floating;\n\n    // Valid combinations:\n    // 1. Floating element is the scrollRef and has a border (default)\n    // 2. Floating element is not the scrollRef, floating element has a border\n    // 3. Floating element is not the scrollRef, scrollRef has a border\n    // Floating > {...getFloatingProps()} wrapper > scrollRef > items is not\n    // allowed as VoiceOver doesn't work.\n    const clientTop = floating.clientTop || scrollEl.clientTop;\n    const floatingIsBordered = floating.clientTop !== 0;\n    const scrollElIsBordered = scrollEl.clientTop !== 0;\n    const floatingIsScrollEl = floating === scrollEl;\n    if (process.env.NODE_ENV !== \"production\") {\n      if (!state.placement.startsWith('bottom')) {\n        warn('`placement` side must be \"bottom\" when using the `inner`', 'middleware.');\n      }\n    }\n    if (!item) {\n      return {};\n    }\n    const nextArgs = {\n      ...state,\n      ...(await offset(-item.offsetTop - floating.clientTop - rects.reference.height / 2 - item.offsetHeight / 2 - innerOffset).fn(state))\n    };\n    const overflow = await detectOverflow(getArgsWithCustomFloatingHeight(nextArgs, scrollEl.scrollHeight + clientTop + floating.clientTop), detectOverflowOptions);\n    const refOverflow = await detectOverflow(nextArgs, {\n      ...detectOverflowOptions,\n      elementContext: 'reference'\n    });\n    const diffY = max(0, overflow.top);\n    const nextY = nextArgs.y + diffY;\n    const isScrollable = scrollEl.scrollHeight > scrollEl.clientHeight;\n    const rounder = isScrollable ? v => v : round;\n    const maxHeight = rounder(max(0, scrollEl.scrollHeight + (floatingIsBordered && floatingIsScrollEl || scrollElIsBordered ? clientTop * 2 : 0) - diffY - max(0, overflow.bottom)));\n    scrollEl.style.maxHeight = maxHeight + \"px\";\n    scrollEl.scrollTop = diffY;\n\n    // There is not enough space, fallback to standard anchored positioning\n    if (onFallbackChange) {\n      const shouldFallback = scrollEl.offsetHeight < item.offsetHeight * min(minItemsVisible, listRef.current.length) - 1 || refOverflow.top >= -referenceOverflowThreshold || refOverflow.bottom >= -referenceOverflowThreshold;\n      ReactDOM.flushSync(() => onFallbackChange(shouldFallback));\n    }\n    if (overflowRef) {\n      overflowRef.current = await detectOverflow(getArgsWithCustomFloatingHeight({\n        ...nextArgs,\n        y: nextY\n      }, scrollEl.offsetHeight + clientTop + floating.clientTop), detectOverflowOptions);\n    }\n    return {\n      y: nextY\n    };\n  }\n});\n/**\n * Changes the `inner` middleware's `offset` upon a `wheel` event to\n * expand the floating element's height, revealing more list items.\n * @see https://floating-ui.com/docs/inner\n */\nfunction useInnerOffset(context, props) {\n  const {\n    open,\n    elements\n  } = context;\n  const {\n    enabled = true,\n    overflowRef,\n    scrollRef,\n    onChange: unstable_onChange\n  } = props;\n  const onChange = useEffectEvent(unstable_onChange);\n  const controlledScrollingRef = React.useRef(false);\n  const prevScrollTopRef = React.useRef(null);\n  const initialOverflowRef = React.useRef(null);\n  React.useEffect(() => {\n    if (!enabled) return;\n    function onWheel(e) {\n      if (e.ctrlKey || !el || overflowRef.current == null) {\n        return;\n      }\n      const dY = e.deltaY;\n      const isAtTop = overflowRef.current.top >= -0.5;\n      const isAtBottom = overflowRef.current.bottom >= -0.5;\n      const remainingScroll = el.scrollHeight - el.clientHeight;\n      const sign = dY < 0 ? -1 : 1;\n      const method = dY < 0 ? 'max' : 'min';\n      if (el.scrollHeight <= el.clientHeight) {\n        return;\n      }\n      if (!isAtTop && dY > 0 || !isAtBottom && dY < 0) {\n        e.preventDefault();\n        ReactDOM.flushSync(() => {\n          onChange(d => d + Math[method](dY, remainingScroll * sign));\n        });\n      } else if (/firefox/i.test(getUserAgent())) {\n        // Needed to propagate scrolling during momentum scrolling phase once\n        // it gets limited by the boundary. UX improvement, not critical.\n        el.scrollTop += dY;\n      }\n    }\n    const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n    if (open && el) {\n      el.addEventListener('wheel', onWheel);\n\n      // Wait for the position to be ready.\n      requestAnimationFrame(() => {\n        prevScrollTopRef.current = el.scrollTop;\n        if (overflowRef.current != null) {\n          initialOverflowRef.current = {\n            ...overflowRef.current\n          };\n        }\n      });\n      return () => {\n        prevScrollTopRef.current = null;\n        initialOverflowRef.current = null;\n        el.removeEventListener('wheel', onWheel);\n      };\n    }\n  }, [enabled, open, elements.floating, overflowRef, scrollRef, onChange]);\n  const floating = React.useMemo(() => ({\n    onKeyDown() {\n      controlledScrollingRef.current = true;\n    },\n    onWheel() {\n      controlledScrollingRef.current = false;\n    },\n    onPointerMove() {\n      controlledScrollingRef.current = false;\n    },\n    onScroll() {\n      const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n      if (!overflowRef.current || !el || !controlledScrollingRef.current) {\n        return;\n      }\n      if (prevScrollTopRef.current !== null) {\n        const scrollDiff = el.scrollTop - prevScrollTopRef.current;\n        if (overflowRef.current.bottom < -0.5 && scrollDiff < -1 || overflowRef.current.top < -0.5 && scrollDiff > 1) {\n          ReactDOM.flushSync(() => onChange(d => d + scrollDiff));\n        }\n      }\n\n      // [Firefox] Wait for the height change to have been applied.\n      requestAnimationFrame(() => {\n        prevScrollTopRef.current = el.scrollTop;\n      });\n    }\n  }), [elements.floating, onChange, overflowRef, scrollRef]);\n  return React.useMemo(() => enabled ? {\n    floating\n  } : {}, [enabled, floating]);\n}\n\nfunction isPointInPolygon(point, polygon) {\n  const [x, y] = point;\n  let isInside = false;\n  const length = polygon.length;\n  for (let i = 0, j = length - 1; i < length; j = i++) {\n    const [xi, yi] = polygon[i] || [0, 0];\n    const [xj, yj] = polygon[j] || [0, 0];\n    const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;\n    if (intersect) {\n      isInside = !isInside;\n    }\n  }\n  return isInside;\n}\nfunction isInside(point, rect) {\n  return point[0] >= rect.x && point[0] <= rect.x + rect.width && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nfunction safePolygon(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    buffer = 0.5,\n    blockPointerEvents = false,\n    requireIntent = true\n  } = options;\n  let timeoutId;\n  let hasLanded = false;\n  let lastX = null;\n  let lastY = null;\n  let lastCursorTime = performance.now();\n  function getCursorSpeed(x, y) {\n    const currentTime = performance.now();\n    const elapsedTime = currentTime - lastCursorTime;\n    if (lastX === null || lastY === null || elapsedTime === 0) {\n      lastX = x;\n      lastY = y;\n      lastCursorTime = currentTime;\n      return null;\n    }\n    const deltaX = x - lastX;\n    const deltaY = y - lastY;\n    const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n    const speed = distance / elapsedTime; // px / ms\n\n    lastX = x;\n    lastY = y;\n    lastCursorTime = currentTime;\n    return speed;\n  }\n  const fn = _ref => {\n    let {\n      x,\n      y,\n      placement,\n      elements,\n      onClose,\n      nodeId,\n      tree\n    } = _ref;\n    return function onMouseMove(event) {\n      function close() {\n        clearTimeout(timeoutId);\n        onClose();\n      }\n      clearTimeout(timeoutId);\n      if (!elements.domReference || !elements.floating || placement == null || x == null || y == null) {\n        return;\n      }\n      const {\n        clientX,\n        clientY\n      } = event;\n      const clientPoint = [clientX, clientY];\n      const target = getTarget(event);\n      const isLeave = event.type === 'mouseleave';\n      const isOverFloatingEl = contains(elements.floating, target);\n      const isOverReferenceEl = contains(elements.domReference, target);\n      const refRect = elements.domReference.getBoundingClientRect();\n      const rect = elements.floating.getBoundingClientRect();\n      const side = placement.split('-')[0];\n      const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n      const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n      const isOverReferenceRect = isInside(clientPoint, refRect);\n      const isFloatingWider = rect.width > refRect.width;\n      const isFloatingTaller = rect.height > refRect.height;\n      const left = (isFloatingWider ? refRect : rect).left;\n      const right = (isFloatingWider ? refRect : rect).right;\n      const top = (isFloatingTaller ? refRect : rect).top;\n      const bottom = (isFloatingTaller ? refRect : rect).bottom;\n      if (isOverFloatingEl) {\n        hasLanded = true;\n        if (!isLeave) {\n          return;\n        }\n      }\n      if (isOverReferenceEl) {\n        hasLanded = false;\n      }\n      if (isOverReferenceEl && !isLeave) {\n        hasLanded = true;\n        return;\n      }\n\n      // Prevent overlapping floating element from being stuck in an open-close\n      // loop: https://github.com/floating-ui/floating-ui/issues/1910\n      if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {\n        return;\n      }\n\n      // If any nested child is open, abort.\n      if (tree && getChildren(tree.nodesRef.current, nodeId).some(_ref2 => {\n        let {\n          context\n        } = _ref2;\n        return context == null ? void 0 : context.open;\n      })) {\n        return;\n      }\n\n      // If the pointer is leaving from the opposite side, the \"buffer\" logic\n      // creates a point where the floating element remains open, but should be\n      // ignored.\n      // A constant of 1 handles floating point rounding errors.\n      if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n        return close();\n      }\n\n      // Ignore when the cursor is within the rectangular trough between the\n      // two elements. Since the triangle is created from the cursor point,\n      // which can start beyond the ref element's edge, traversing back and\n      // forth from the ref to the floating element can cause it to close. This\n      // ensures it always remains open in that case.\n      let rectPoly = [];\n      switch (side) {\n        case 'top':\n          rectPoly = [[left, refRect.top + 1], [left, rect.bottom - 1], [right, rect.bottom - 1], [right, refRect.top + 1]];\n          break;\n        case 'bottom':\n          rectPoly = [[left, rect.top + 1], [left, refRect.bottom - 1], [right, refRect.bottom - 1], [right, rect.top + 1]];\n          break;\n        case 'left':\n          rectPoly = [[rect.right - 1, bottom], [rect.right - 1, top], [refRect.left + 1, top], [refRect.left + 1, bottom]];\n          break;\n        case 'right':\n          rectPoly = [[refRect.right - 1, bottom], [refRect.right - 1, top], [rect.left + 1, top], [rect.left + 1, bottom]];\n          break;\n      }\n      function getPolygon(_ref3) {\n        let [x, y] = _ref3;\n        switch (side) {\n          case 'top':\n            {\n              const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n              const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n              const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.bottom - buffer : isFloatingWider ? rect.bottom - buffer : rect.top], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.bottom - buffer : rect.top : rect.bottom - buffer]];\n              return [cursorPointOne, cursorPointTwo, ...commonPoints];\n            }\n          case 'bottom':\n            {\n              const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n              const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n              const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.top + buffer : isFloatingWider ? rect.top + buffer : rect.bottom], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.top + buffer : rect.bottom : rect.top + buffer]];\n              return [cursorPointOne, cursorPointTwo, ...commonPoints];\n            }\n          case 'left':\n            {\n              const cursorPointOne = [x + buffer + 1, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n              const cursorPointTwo = [x + buffer + 1, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n              const commonPoints = [[cursorLeaveFromBottom ? rect.right - buffer : isFloatingTaller ? rect.right - buffer : rect.left, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.right - buffer : rect.left : rect.right - buffer, rect.bottom]];\n              return [...commonPoints, cursorPointOne, cursorPointTwo];\n            }\n          case 'right':\n            {\n              const cursorPointOne = [x - buffer, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n              const cursorPointTwo = [x - buffer, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n              const commonPoints = [[cursorLeaveFromBottom ? rect.left + buffer : isFloatingTaller ? rect.left + buffer : rect.right, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.left + buffer : rect.right : rect.left + buffer, rect.bottom]];\n              return [cursorPointOne, cursorPointTwo, ...commonPoints];\n            }\n        }\n      }\n      if (isPointInPolygon([clientX, clientY], rectPoly)) {\n        return;\n      }\n      if (hasLanded && !isOverReferenceRect) {\n        return close();\n      }\n      if (!isLeave && requireIntent) {\n        const cursorSpeed = getCursorSpeed(event.clientX, event.clientY);\n        const cursorSpeedThreshold = 0.1;\n        if (cursorSpeed !== null && cursorSpeed < cursorSpeedThreshold) {\n          return close();\n        }\n      }\n      if (!isPointInPolygon([clientX, clientY], getPolygon([x, y]))) {\n        close();\n      } else if (!hasLanded && requireIntent) {\n        timeoutId = window.setTimeout(close, 40);\n      }\n    };\n  };\n  fn.__options = {\n    blockPointerEvents\n  };\n  return fn;\n}\n\nexport { Composite, CompositeItem, FloatingArrow, FloatingDelayGroup, FloatingFocusManager, FloatingList, FloatingNode, FloatingOverlay, FloatingPortal, FloatingTree, inner, safePolygon, useClick, useClientPoint, useDelayGroup, useDelayGroupContext, useDismiss, useFloating, useFloatingNodeId, useFloatingParentNodeId, useFloatingPortalNode, useFloatingRootContext, useFloatingTree, useFocus, useHover, useId, useInnerOffset, useInteractions, useListItem, useListNavigation, useMergeRefs, useRole, useTransitionStatus, useTransitionStyles, useTypeahead };\n","/**\n * @private\n * Hook for forked callbacks that accepts same parameters.\n * @param callbacks {Array<T extends (...args: never[]) => unknown | undefined>} list of callbacks\n * @returns {(...args: Parameters<T>) => void}\n */\nfunction useForkCallback(...callbacks) {\n  return (...args) => {\n    callbacks.forEach(callback => callback?.(...args));\n  };\n}\nexport default useForkCallback;\n//# sourceMappingURL=useForkCallback.js.map","export const MEDIUM_MIN_WIDTH = 106;\nexport const LARGE_MIN_WIDTH = 130;\nexport const TEXT_MEDIUM_HEIGHT = 3;\nexport const CONTAINED_MEDIUM_HEIGHT = 3.5;\nexport const TEXT_LARGE_HEIGHT = 3.5;\nexport const CONTAINED_LARGE_HEIGHT = 4.5;\nexport const TEXT_MEDIUM_BUTTON_SIZE = '3rem';\nexport const CONTAINED_MEDIUM_BUTTON_SIZE = '2.5rem';\nexport const LARGE_BUTTON_SIZE = '3.5rem';\nexport const MEDIUM_INPUT_WIDTH = '3rem';\nexport const LARGE_INPUT_WIDTH = '4rem';\nexport const TEXT_PADDING = '0rem';\nexport const CONTAINED_PADDING = '0.5rem';\nexport const CONTAINED_MEDIUM_BUTTON_MIN_HEIGHT = '3.5rem';\nexport const CONTAINED_LARGE_BUTTON_MIN_HEIGHT = '4.5rem';\nexport const TEXT_MEDIUM_FONT_SIZE = '1.8rem';\nexport const CONTAINED_MEDIUM_FONT_SIZE = '1.9rem';\nexport const LARGE_FONT_SIZE = '2.3rem';\nexport const INPUT_FONT_SIZE = '1.6rem';\nexport const DEFAULT_MIN_VALUE = 0;\nexport const DEFAULT_MAX_VALUE = Number.POSITIVE_INFINITY;\n//# sourceMappingURL=constants.js.map","import { generateUtilityClass, generateUtilityClasses } from '@ori-ui/mui-bundle/base';\nexport function getQuantityPickerUtilityClass(slot) {\n  return generateUtilityClass('OriMuiQuantityPicker', slot);\n}\nconst quantityPickerClasses = generateUtilityClasses('OriMuiQuantityPicker', ['root', 'input', 'focused', 'disabled', 'readOnly', 'iconButton', 'increaseButton', 'decreaseButton', 'containedLarge', 'containedMedium', 'textLarge', 'textMedium', 'sizeLarge', 'sizeMedium']);\nexport default quantityPickerClasses;\n//# sourceMappingURL=quantityPickerClasses.js.map","import { FloatingArrow } from '@floating-ui/react';\nimport { unstable_composeClasses as composeClasses } from '@ori-ui/mui-bundle/base';\nimport { InputBase, styled } from '@ori-ui/mui-bundle/material';\nimport IconButton from '../IconButton';\nimport { capitalize } from '../utils';\nimport { TEXT_MEDIUM_BUTTON_SIZE, INPUT_FONT_SIZE, CONTAINED_MEDIUM_BUTTON_MIN_HEIGHT, CONTAINED_LARGE_BUTTON_MIN_HEIGHT } from './constants';\nimport { getQuantityPickerUtilityClass } from './quantityPickerClasses';\nexport const getQuantityPickerSlots = ownerState => {\n  const {\n    disabled,\n    focused,\n    readOnly,\n    size,\n    variant\n  } = ownerState;\n  return {\n    root: ['root', disabled && 'disabled', readOnly && 'readOnly', `${variant}${capitalize(size)}`],\n    input: ['input', focused && 'focused', `size${capitalize(size)}`],\n    iconButton: ['iconButton', `${variant}${capitalize(size)}`],\n    increaseButton: ['increaseButton'],\n    decreaseButton: ['decreaseButton']\n  };\n};\nexport const useUtilityClasses = ownerState => {\n  const {\n    classes\n  } = ownerState;\n  const slots = getQuantityPickerSlots(ownerState);\n  return composeClasses(slots, getQuantityPickerUtilityClass, classes);\n};\nexport const QuantityPickerRoot = styled('div', {\n  name: 'MuiOriQuantityPicker',\n  slot: 'Root',\n  overridesResolver: ({\n    ownerState\n  }, styles) => [styles.root, ownerState.disabled && styles.disabled, ownerState.readOnly && styles.readOnly, styles[`${ownerState.variant}${capitalize(ownerState.size)}`]]\n})(({\n  theme,\n  ownerState\n}) => ({\n  display: 'grid',\n  gridTemplateColumns: ownerState.cssProps.holder.gridTemplateColumns,\n  justifyContent: 'space-between',\n  alignContent: 'space-around',\n  boxSizing: 'border-box',\n  minWidth: ownerState.cssProps.holder.minWidth,\n  width: ownerState.cssProps.holder.width,\n  height: ownerState.cssProps.holder.height,\n  minHeight: TEXT_MEDIUM_BUTTON_SIZE,\n  ...(ownerState.variant === 'contained' && ownerState.size === 'medium' && {\n    minHeight: CONTAINED_MEDIUM_BUTTON_MIN_HEIGHT\n  }),\n  ...(ownerState.variant === 'contained' && ownerState.size === 'large' && {\n    minHeight: CONTAINED_LARGE_BUTTON_MIN_HEIGHT\n  }),\n  overflow: 'hidden',\n  background: ownerState.cssProps.holder.background,\n  padding: ownerState.cssProps.holder.padding,\n  borderRadius: ownerState.cssProps.holder.borderRadius,\n  boxShadow: ownerState.cssProps.holder.boxShadow,\n  ...(ownerState.expandOnFocus && {\n    gridTemplateColumns: '0 3.4rem 0',\n    minHeight: '2.6rem',\n    transition: theme.transitions.create(['width', 'translate'], {\n      duration: theme.transitions.duration.short\n    }),\n    ...(ownerState.focused && {\n      gridTemplateColumns: '2.6rem 3.4rem 2.6rem',\n      minWidth: '10.2rem',\n      width: '10.2rem'\n    })\n  })\n}));\nexport const InputRoot = styled(InputBase, {\n  name: 'MuiOriQuantityPicker',\n  slot: 'Input',\n  overridesResolver: ({\n    ownerState\n  }, styles) => [styles.input, ownerState.focused && styles.focused, styles[`size${capitalize(ownerState.size)}`]]\n})(({\n  theme,\n  ownerState\n}) => ({\n  margin: 0,\n  padding: 0,\n  minWidth: ownerState.cssProps.input.minWidth,\n  width: ownerState.cssProps.input.width,\n  height: ownerState.cssProps.input.height,\n  transition: theme.transitions.create(['border'], {\n    duration: theme.transitions.duration.short\n  }),\n  border: '1px solid transparent',\n  borderRadius: theme.shape.mediumComponentRadius,\n  alignSelf: 'center',\n  fontSize: INPUT_FONT_SIZE,\n  '&:hover': {\n    border: `1px solid ${theme.palette.grey[200]}`,\n    // Reset on touch devices, it doesn't add specificity\n    '@media (hover: none)': {\n      borderColor: theme.palette.grey[200]\n    }\n  },\n  ...(ownerState.focused && {\n    border: `1px solid ${theme.palette.grey[200]}`\n  }),\n  ...(ownerState.readOnly && {\n    border: 'none'\n  }),\n  [`& input`]: {\n    fontSize: INPUT_FONT_SIZE,\n    textAlign: 'center',\n    padding: 0,\n    ...(ownerState.readOnly && {\n      cursor: 'default'\n    })\n  },\n  ...(ownerState.disabled && {\n    color: theme.palette.text.disabled,\n    borderColor: 'transparent'\n  })\n}));\nexport const IncreaseButtonWrapper = styled('div')(({\n  theme\n}) => ({\n  boxSizing: 'border-box',\n  lineHeight: 1\n}));\nexport const IconButtonRoot = styled(IconButton, {\n  name: 'MuiOriQuantityPicker',\n  slot: 'iconButton',\n  overridesResolver: ({\n    ownerState\n  }, styles) => [styles.iconButton, styles[`${ownerState.variant}${capitalize(ownerState.size)}`]]\n})(({\n  theme,\n  ownerState\n}) => ({\n  fontSize: ownerState.cssProps.button.fontSize,\n  width: ownerState.cssProps.button.width,\n  height: ownerState.cssProps.button.height,\n  ...(ownerState.expandOnFocus && {\n    display: 'none',\n    ...(ownerState.focused && {\n      display: 'initial',\n      lineHeight: 0.75\n    })\n  })\n}));\nexport const TooltipContainer = styled('div')(({\n  theme\n}) => ({\n  boxSizing: 'border-box',\n  padding: theme.spacing(4),\n  maxWidth: 200,\n  margin: 0,\n  background: theme.palette.common.white,\n  borderRadius: theme.shape.borderRadius,\n  color: theme.palette.text.primary,\n  fontSize: theme.typography.body1.fontSize,\n  boxShadow: theme.shadows[3]\n}));\nexport const TooltipArrow = styled(FloatingArrow)(({\n  theme\n}) => ({\n  fill: theme.palette.common.white\n}));\n//# sourceMappingURL=quantityPickerStyled.js.map","/* eslint-disable no-console -- it is the point of this helper */\nimport { useCallback } from 'react';\nfunction getTime() {\n  const date = new Date();\n  const minutes = `0${date.getMinutes()}`;\n  const seconds = `0${date.getSeconds()}`;\n  const milliseconds = `00${date.getMilliseconds()}`;\n  const LAST_TWO_DIGITS = -2;\n  const LAST_THREE_DIGITS = -3;\n  return `${date.getHours()}:${minutes.slice(LAST_TWO_DIGITS)}:${seconds.slice(LAST_TWO_DIGITS)}.${milliseconds.slice(LAST_THREE_DIGITS)}`;\n}\nfunction isDebugEnabled() {\n  try {\n    const serializedData = localStorage.getItem('ori-ui-quantity-picker-debug');\n    if (serializedData) {\n      const value = JSON.parse(serializedData);\n      return value === 4;\n    }\n    return false;\n  } catch (error) {\n    return false;\n  }\n}\nexport function useDebug(key) {\n  const isEnabled = isDebugEnabled();\n  const log = useCallback((...args) => {\n    if (!isEnabled) {\n      return;\n    }\n    console.log(`%c🔶 ${getTime()} ${key}`, 'color:#FFA07A;background:#1c1c1c;', ...args);\n  }, [isEnabled, key]);\n  return {\n    log\n  };\n}\n//# sourceMappingURL=useDebug.js.map","export const Name = 'quantity-picker-clicked';\nexport const QuantityPickerClickedEvent = Name;\n//# sourceMappingURL=QuantityPickerClickEvent.js.map","import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';\nimport * as QuantityPickerClick from './QuantityPickerClickEvent';\nimport { useControlledQuantityPicker } from './useControlledQuantityPicker';\nimport { useDebug } from './useDebug';\nimport { useUncontrolledQuantityPicker } from './useUncontrolledQuantityPicker';\n/**\n * Use QuantityPicker - logic for QuantityPicker with increase and decrease events\n * Can be uses with controlled or uncontrolled manner\n * @param {UseQuantityPickerProps} props\n */\nexport function useQuantityPicker(props) {\n  const autoId = useId();\n  const {\n    id = autoId,\n    InputProps,\n    value,\n    visibilityTriggerClicked = false\n  } = props;\n  const [lastIncreased, setLastIncreased] = useState('');\n  const [loadOnClick, setLoadOnClick] = useState(visibilityTriggerClicked);\n  const {\n    log\n  } = useDebug(`ID-${id}`);\n  const triggerClickEvent = useCallback(identifier => {\n    const event = new CustomEvent(QuantityPickerClick.Name, {\n      detail: {\n        id: identifier\n      }\n    });\n    window.dispatchEvent(event);\n  }, []);\n\n  /** Called on clickAway to reset lastIncreased when clicking on other lickers and/or other links */\n  const resetLastIncreased = useCallback(source => {\n    log(source, 'reset tooltip triggers');\n    setLastIncreased('');\n    setLoadOnClick(false);\n  }, [log]);\n  const handleKeyDown = useCallback(({\n    currentTarget,\n    key\n  }) => {\n    if (key === 'Enter') {\n      currentTarget.blur();\n    }\n  }, []);\n\n  /** Set last increased for newly initiated.\n   * In case that the value is set to zero, on next increase will be set as newly initiated again.\n   */\n  useEffect(() => {\n    if (loadOnClick && typeof value === 'number' && value === 1) {\n      setLastIncreased(id);\n    }\n    triggerClickEvent(id);\n    setLoadOnClick(false);\n  }, [id, loadOnClick, triggerClickEvent, value]);\n  const onQuantityPickerClickListener = event => {\n    if (event.detail.id !== id) {\n      resetLastIncreased(`action on ${event.detail.id} ➡️`);\n    }\n  };\n  useEffect(() => {\n    window.addEventListener(QuantityPickerClick.Name, onQuantityPickerClickListener);\n    return () => {\n      window.removeEventListener(QuantityPickerClick.Name, onQuantityPickerClickListener);\n    };\n  });\n  const innerProps = {\n    ...props,\n    id,\n    loadOnClick,\n    log,\n    setLastIncreased,\n    triggerClickEvent\n  };\n  const {\n    current: isControlled\n  } = useRef(value != null);\n  const controlled = useControlledQuantityPicker(innerProps);\n  const uncontrolled = useUncontrolledQuantityPicker(innerProps);\n  const logBase = useMemo(() => {\n    const increase = lastIncreased === id ? '🟢LAST INCREASED' : '🟡';\n    const opened = visibilityTriggerClicked && loadOnClick ? '🆕 LAST OPENED' : '';\n    return [increase, opened];\n  }, [id, lastIncreased, loadOnClick, visibilityTriggerClicked]);\n  if (isControlled) {\n    return {\n      ...controlled,\n      InputProps: {\n        ...InputProps\n      },\n      lastIncreased,\n      handleKeyDown,\n      logBase\n    };\n  }\n  return {\n    ...uncontrolled,\n    InputProps: {\n      ...InputProps\n    },\n    lastIncreased,\n    handleKeyDown,\n    logBase\n  };\n}\n//# sourceMappingURL=useQuantityPicker.js.map","import { useCallback } from 'react';\n/**\n * @param {UseQuantityPickerInnerProps} Props\n * @private\n */\nexport function useControlledQuantityPicker(props) {\n  const {\n    groupValue,\n    id,\n    log,\n    onChange,\n    setLastIncreased,\n    triggerClickEvent,\n    value\n  } = props;\n  const onIncrease = useCallback(() => {\n    triggerClickEvent(id);\n    if (typeof value !== 'number') {\n      return;\n    }\n    setLastIncreased(id);\n    log('onIncrease:', value + 1);\n    onChange?.(value + 1, id, 'increase');\n  }, [id, log, onChange, setLastIncreased, triggerClickEvent, value]);\n  const onDecrease = useCallback(() => {\n    triggerClickEvent(id);\n    setLastIncreased('');\n    if (typeof value !== 'number') {\n      return;\n    }\n    log('onDecrease:', value - 1);\n    onChange?.(value - 1, id, 'decrease');\n  }, [id, log, onChange, setLastIncreased, triggerClickEvent, value]);\n  const handleInputElement = useCallback((action, inputValue) => {\n    const source = action === 'change' ? 'input-change' : 'input-blur';\n    log(`on ${source} inputValue is:`, inputValue);\n    if (inputValue === '' || inputValue === '-') {\n      onChange?.(inputValue, id, source);\n      return;\n    }\n    const num = Number.parseInt(inputValue, 10);\n    if (!Number.isNaN(num)) {\n      onChange?.(num, id, source);\n    }\n  }, [id, log, onChange]);\n  const handleChange = useCallback(({\n    currentTarget\n  }) => {\n    triggerClickEvent(id);\n    setLastIncreased('');\n    handleInputElement('change', currentTarget.value);\n  }, [handleInputElement, id, setLastIncreased, triggerClickEvent]);\n  const handleBlur = useCallback(({\n    currentTarget\n  }) => {\n    triggerClickEvent(id);\n    setLastIncreased(id);\n    handleInputElement('blur', currentTarget.value);\n  }, [handleInputElement, id, setLastIncreased, triggerClickEvent]);\n  return {\n    ...props,\n    groupValue: groupValue ?? 0,\n    handleBlur,\n    handleChange,\n    id,\n    onDecrease,\n    onIncrease,\n    value: value\n  };\n}\n//# sourceMappingURL=useControlledQuantityPicker.js.map","import { useCallback, useEffect, useState } from 'react';\nimport { DEFAULT_MAX_VALUE, DEFAULT_MIN_VALUE } from './constants';\n/**\n * @param {UseQuantityPickerInnerProps} Props\n * @private\n */\nexport function useUncontrolledQuantityPicker(props) {\n  const {\n    id,\n    initialValue,\n    loadOnClick,\n    log,\n    maxValue,\n    minValue,\n    onChange,\n    setLastIncreased,\n    triggerClickEvent\n  } = props;\n  const [internalValue, setInternalValue] = useState(initialValue ?? minValue ?? 1);\n  const onIncrease = useCallback(() => {\n    triggerClickEvent(id);\n    setLastIncreased(id);\n    if (typeof internalValue !== 'number' || internalValue === (maxValue ?? DEFAULT_MAX_VALUE)) {\n      return;\n    }\n    setInternalValue(internalValue + 1);\n    log('onIncrease:', internalValue + 1);\n    onChange?.(internalValue + 1, id, 'increase');\n  }, [triggerClickEvent, id, setLastIncreased, internalValue, maxValue, log, onChange]);\n  const onDecrease = useCallback(() => {\n    triggerClickEvent(id);\n    setLastIncreased('');\n    if (typeof internalValue !== 'number' || internalValue === (minValue ?? DEFAULT_MIN_VALUE)) {\n      return;\n    }\n    setInternalValue(internalValue - 1);\n    log('onDecrease:', internalValue - 1);\n    onChange?.(internalValue - 1, id, 'decrease');\n  }, [triggerClickEvent, id, setLastIncreased, internalValue, minValue, log, onChange]);\n\n  // in uncontrolled version we use same logic for blur and enter pressed\n  const handleInputElement = useCallback(inputValue => {\n    const source = 'input-blur';\n    const num = Number.parseInt(inputValue, 10);\n    if (!Number.isNaN(num) && num >= (minValue ?? DEFAULT_MIN_VALUE) && num <= (maxValue ?? DEFAULT_MAX_VALUE)) {\n      setInternalValue(num);\n      onChange?.(num, id, source);\n      return;\n    }\n    const fallbackValue = initialValue ?? minValue ?? 1;\n    setInternalValue(fallbackValue);\n    onChange?.(fallbackValue, id, source);\n  }, [id, initialValue, maxValue, minValue, onChange]);\n  const handleChange = useCallback(({\n    currentTarget\n  }) => {\n    triggerClickEvent(id);\n    setLastIncreased('');\n    if (currentTarget.value === '' || currentTarget.value === '-') {\n      setInternalValue(currentTarget.value);\n      return;\n    }\n    const num = Number.parseInt(currentTarget.value, 10);\n    if (Number.isNaN(num)) {\n      return;\n    }\n    if (num >= (minValue ?? DEFAULT_MIN_VALUE) && num <= (maxValue ?? DEFAULT_MAX_VALUE)) {\n      setInternalValue(num);\n      onChange?.(num, id, 'input-change');\n    }\n  }, [triggerClickEvent, id, setLastIncreased, minValue, maxValue, onChange]);\n  const handleBlur = useCallback(({\n    currentTarget\n  }) => {\n    triggerClickEvent(id);\n    setLastIncreased(id);\n    handleInputElement(currentTarget.value);\n  }, [triggerClickEvent, id, setLastIncreased, handleInputElement]);\n\n  /** Set last increased for newly initiated with value grater than zero.\n   * In case that the value is set to zero, on next increase will be set as newly initiated again.\n   */\n  useEffect(() => {\n    if (loadOnClick && typeof internalValue === 'number' && internalValue === 1) {\n      setLastIncreased(id);\n    }\n  }, [id, internalValue, loadOnClick, setLastIncreased]);\n  return {\n    ...props,\n    groupValue: 0,\n    handleBlur,\n    handleChange,\n    id,\n    onDecrease,\n    onIncrease,\n    value: internalValue\n  };\n}\n//# sourceMappingURL=useUncontrolledQuantityPicker.js.map","import { useFloating, offset, shift, flip, arrow, autoUpdate, useDismiss, useRole, useInteractions, useTransitionStyles } from '@floating-ui/react';\nimport { Add, Remove } from '@ori-ui/icons';\nimport { useThemeProps, ClickAwayListener } from '@ori-ui/mui-bundle/material';\nimport clsx from 'clsx';\nimport { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useForkCallback } from '../utils';\nimport { DEFAULT_MAX_VALUE, DEFAULT_MIN_VALUE } from './constants';\nimport { IconButtonRoot, IncreaseButtonWrapper, InputRoot, QuantityPickerRoot, TooltipArrow, TooltipContainer, useUtilityClasses } from './quantityPickerStyled';\nimport { useDebug } from './useDebug';\nimport { useQuantityPicker } from './useQuantityPicker';\nimport { useVisualProps } from './useVisualProps';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const QuantityPicker = /*#__PURE__*/forwardRef((inProps, ref) => {\n  const props = useThemeProps({\n    props: inProps,\n    name: 'MuiOriQuantityPicker'\n  });\n  const {\n    className,\n    component = 'div',\n    DecreaseIconButtonProps = {},\n    disabled = false,\n    expanded,\n    expandOnFocus = false,\n    height,\n    IncreaseIconButtonProps = {},\n    InputProps: InputBaseProps = {},\n    labelsTranslations = {},\n    onChange,\n    onClickAway,\n    onFocus,\n    minValue = DEFAULT_MIN_VALUE,\n    readOnly = false,\n    required,\n    size = 'medium',\n    tooltipMaxText,\n    variant = 'contained',\n    width,\n    maxValue = DEFAULT_MAX_VALUE,\n    maxGroupValue = maxValue,\n    tooltipMaxDisabled = false,\n    ...otherProps\n  } = props;\n  const [focused, setFocused] = useState(expanded ?? false);\n  const {\n    groupValue,\n    handleBlur,\n    handleChange,\n    handleKeyDown,\n    id,\n    InputProps,\n    lastIncreased,\n    logBase,\n    onDecrease,\n    onIncrease,\n    value\n  } = useQuantityPicker(props);\n  const {\n    log\n  } = useDebug(`ID-${id}`);\n  const {\n    cssProps,\n    buttonProps\n  } = useVisualProps(props);\n  const ownerState = {\n    ...props,\n    cssProps,\n    disabled,\n    expandOnFocus,\n    focused,\n    readOnly,\n    size,\n    variant\n  };\n  useEffect(() => {\n    if (typeof expanded === 'boolean') {\n      setFocused(expanded);\n    }\n  }, [expanded]);\n  const handleClickAway = useCallback(() => {\n    if (typeof expanded === 'boolean') {\n      return;\n    }\n    setFocused(false);\n  }, [expanded]);\n  const handleFocus = useCallback(() => {\n    if (typeof expanded === 'boolean') {\n      return;\n    }\n    setFocused(true);\n  }, [expanded]);\n  const handleFocusForked = useForkCallback(handleFocus, onFocus);\n  const handleClickAwayForked = useForkCallback(handleClickAway, onClickAway);\n  const classes = useUtilityClasses(ownerState);\n  const inputRef = useRef(null);\n  const [tooltipMaxOpen, setTooltipMaxOpen] = useState(false);\n  const arrowRef = useRef(null);\n  const {\n    refs: {\n      setReference,\n      setFloating\n    },\n    floatingStyles,\n    context\n  } = useFloating({\n    open: tooltipMaxOpen,\n    onOpenChange: setTooltipMaxOpen,\n    placement: 'top',\n    strategy: 'fixed',\n    middleware: [offset(15), shift(), flip(), arrow({\n      element: arrowRef\n    })],\n    whileElementsMounted: autoUpdate\n  });\n  const maxReached = useMemo(() => {\n    const max = Math.min(maxValue, maxGroupValue);\n    return value >= max || groupValue >= maxGroupValue;\n  }, [groupValue, maxGroupValue, maxValue, value]);\n  const dismiss = useDismiss(context);\n  const role = useRole(context, {\n    role: 'alertdialog'\n  });\n  const {\n    getReferenceProps,\n    getFloatingProps\n  } = useInteractions([dismiss, role]);\n  const {\n    styles: transitionStyles\n  } = useTransitionStyles(context, {\n    initial: {\n      opacity: 0,\n      transform: 'scale(0.8)'\n    }\n  });\n  const isTooltipMaxUsable = useMemo(() => {\n    if (!tooltipMaxDisabled && typeof tooltipMaxText === 'string' && Boolean(tooltipMaxText) && maxValue < DEFAULT_MAX_VALUE) {\n      return true;\n    }\n    return false;\n  }, [maxValue, tooltipMaxDisabled, tooltipMaxText]);\n  useEffect(() => {\n    setTooltipMaxOpen(maxReached && lastIncreased === id);\n  }, [id, lastIncreased, maxReached]);\n  const showTooltip = useCallback(() => {\n    setTooltipMaxOpen(true);\n  }, []);\n  const increaseWrapper = useMemo(() => {\n    const wrapperAttributes = {\n      tabIndex: -1\n    };\n    if (isTooltipMaxUsable) {\n      wrapperAttributes.ref = setReference;\n      const referenceProps = getReferenceProps();\n      for (const key in referenceProps) {\n        if (Object.hasOwn(referenceProps, key)) {\n          const propKey = key;\n          wrapperAttributes[propKey] = referenceProps[key];\n        }\n      }\n    }\n    if (isTooltipMaxUsable && maxReached) {\n      wrapperAttributes.role = 'button';\n      wrapperAttributes.tabIndex = 0;\n      wrapperAttributes.onClick = showTooltip;\n      wrapperAttributes.onKeyDown = showTooltip;\n    }\n    return wrapperAttributes;\n  }, [getReferenceProps, isTooltipMaxUsable, maxReached, setReference, showTooltip]);\n  const logMax = useMemo(() => {\n    const newLine = '\\r\\n ';\n    const values = `value / maxValue:  ${value} / ${maxValue}`;\n    const groups = `➖ groupValue / maxGroupValue:  ${groupValue} / ${maxGroupValue}`;\n    const max = maxReached ? '🔝MAX IS REACHED' : '';\n    const tooltip = isTooltipMaxUsable ? tooltipMaxOpen ? ' 🪧 tooltip is opened' : '' : ' ⚠️ tooltip is not usable';\n    return [newLine, values, groups, newLine, max, tooltip];\n  }, [groupValue, isTooltipMaxUsable, maxGroupValue, maxReached, maxValue, tooltipMaxOpen, value]);\n  log(...logBase, ...logMax);\n\n  // preparing input props\n  const {\n    inputProps,\n    ...otherInputProps\n  } = InputProps;\n  const inputElementProps = useMemo(() => ({\n    'aria-label': labelsTranslations?.inputLabel ?? 'Quantity',\n    ...inputProps\n  }), [inputProps, labelsTranslations.inputLabel]);\n  return /*#__PURE__*/_jsx(ClickAwayListener, {\n    onClickAway: handleClickAwayForked,\n    children: /*#__PURE__*/_jsxs(QuantityPickerRoot, {\n      ...otherProps,\n      ref: ref,\n      ownerState: ownerState,\n      className: clsx(classes.root, className),\n      as: component,\n      onFocus: handleFocusForked,\n      children: [/*#__PURE__*/_jsx(IconButtonRoot, {\n        disableElevation: true,\n        ownerState: ownerState,\n        disabled: disabled || value <= minValue,\n        className: clsx(classes.iconButton, classes.decreaseButton),\n        \"aria-label\": labelsTranslations?.decreaseButtonLabel ?? 'Decrease quantity',\n        ...buttonProps,\n        ...DecreaseIconButtonProps,\n        onClick: onDecrease,\n        children: /*#__PURE__*/_jsx(Remove, {\n          fontSize: \"inherit\"\n        })\n      }), /*#__PURE__*/_jsx(InputRoot, {\n        inputRef: inputRef,\n        ownerState: ownerState,\n        readOnly: readOnly,\n        required: required,\n        value: value,\n        disabled: disabled,\n        className: classes.input,\n        ...InputBaseProps,\n        ...otherInputProps,\n        inputProps: inputElementProps,\n        onChange: handleChange,\n        onBlur: handleBlur,\n        onKeyDown: handleKeyDown\n      }), /*#__PURE__*/_jsx(IncreaseButtonWrapper, {\n        ...increaseWrapper,\n        children: /*#__PURE__*/_jsx(IconButtonRoot, {\n          disableElevation: true,\n          ownerState: ownerState,\n          disabled: disabled || maxReached,\n          className: clsx(classes.iconButton, classes.increaseButton),\n          \"aria-label\": labelsTranslations?.increaseButtonLabel ?? 'Increase quantity',\n          ...buttonProps,\n          ...IncreaseIconButtonProps,\n          onClick: onIncrease,\n          children: /*#__PURE__*/_jsx(Add, {\n            fontSize: \"inherit\"\n          })\n        })\n      }), isTooltipMaxUsable && tooltipMaxOpen ? /*#__PURE__*/_jsx(\"div\", {\n        ref: setFloating,\n        style: {\n          ...floatingStyles,\n          zIndex: 1\n        },\n        ...getFloatingProps(),\n        children: /*#__PURE__*/_jsxs(TooltipContainer, {\n          style: transitionStyles,\n          children: [/*#__PURE__*/_jsx(TooltipArrow, {\n            ref: arrowRef,\n            tipRadius: 2,\n            height: 8,\n            context: context\n          }), tooltipMaxText]\n        })\n      }) : null]\n    })\n  });\n});\nexport default QuantityPicker;\n//# sourceMappingURL=QuantityPicker.js.map","import { useTheme } from '@ori-ui/mui';\nimport { useMemo } from 'react';\nimport { TEXT_MEDIUM_HEIGHT, TEXT_LARGE_HEIGHT, CONTAINED_MEDIUM_HEIGHT, CONTAINED_LARGE_HEIGHT, CONTAINED_MEDIUM_BUTTON_SIZE, MEDIUM_INPUT_WIDTH, TEXT_MEDIUM_BUTTON_SIZE, MEDIUM_MIN_WIDTH, CONTAINED_PADDING, TEXT_PADDING, CONTAINED_MEDIUM_FONT_SIZE, TEXT_MEDIUM_FONT_SIZE, LARGE_BUTTON_SIZE, LARGE_INPUT_WIDTH, LARGE_MIN_WIDTH, LARGE_FONT_SIZE } from './constants';\nexport function useVisualProps(props) {\n  const theme = useTheme();\n  const {\n    elevation = 2,\n    expandOnFocus = false,\n    height,\n    IconButtonProps = {},\n    size = 'medium',\n    variant = 'contained',\n    width\n  } = props;\n  const pickerHeight = useMemo(() => {\n    if (typeof height === 'number' && height >= TEXT_MEDIUM_HEIGHT) {\n      if (variant === 'text' && size === 'medium' && height > TEXT_MEDIUM_HEIGHT) {\n        return `${height}rem`;\n      }\n      if (variant === 'text' && size === 'large' && height > TEXT_LARGE_HEIGHT) {\n        return `${height}rem`;\n      }\n      if (variant === 'contained' && size === 'medium' && height > CONTAINED_MEDIUM_HEIGHT) {\n        return `${height}rem`;\n      }\n      if (variant === 'contained' && size === 'large' && height > CONTAINED_LARGE_HEIGHT) {\n        return `${height}rem`;\n      }\n    }\n    return undefined;\n  }, [height, size, variant]);\n  const cssProps = useMemo(() => {\n    const shadowLevel = elevation >= 0 && elevation <= 24 ? Math.floor(elevation) : 2;\n    const pickerWidth = typeof width === 'undefined' ? '100%' : typeof width === 'number' ? `${width}px` : width;\n    const contained = variant === 'contained';\n    const pickerCssProps = {\n      holder: {\n        gridTemplateColumns: contained ? `${CONTAINED_MEDIUM_BUTTON_SIZE} ${MEDIUM_INPUT_WIDTH} ${CONTAINED_MEDIUM_BUTTON_SIZE}` : `${TEXT_MEDIUM_BUTTON_SIZE} ${MEDIUM_INPUT_WIDTH} ${TEXT_MEDIUM_BUTTON_SIZE}`,\n        height: contained ? `${CONTAINED_MEDIUM_HEIGHT}rem` : `${TEXT_MEDIUM_HEIGHT}rem`,\n        minWidth: MEDIUM_MIN_WIDTH,\n        width: pickerWidth,\n        padding: contained ? CONTAINED_PADDING : TEXT_PADDING,\n        borderRadius: contained ? 100 : 0,\n        background: contained ? theme.palette.common.white : 'transparent',\n        boxShadow: contained ? theme.shadows[shadowLevel] ?? 'none' : 'none'\n      },\n      button: {\n        fontSize: contained ? CONTAINED_MEDIUM_FONT_SIZE : TEXT_MEDIUM_FONT_SIZE,\n        width: contained ? CONTAINED_MEDIUM_BUTTON_SIZE : TEXT_MEDIUM_BUTTON_SIZE,\n        height: contained ? CONTAINED_MEDIUM_BUTTON_SIZE : TEXT_MEDIUM_BUTTON_SIZE\n      },\n      input: {\n        minWidth: MEDIUM_INPUT_WIDTH,\n        width: MEDIUM_INPUT_WIDTH,\n        height: contained ? CONTAINED_MEDIUM_BUTTON_SIZE : TEXT_MEDIUM_BUTTON_SIZE\n      }\n    };\n    if (size === 'large') {\n      pickerCssProps.holder.gridTemplateColumns = `${LARGE_BUTTON_SIZE} ${LARGE_INPUT_WIDTH} ${LARGE_BUTTON_SIZE}`;\n      pickerCssProps.holder.height = contained ? `${CONTAINED_LARGE_HEIGHT}rem` : `${TEXT_LARGE_HEIGHT}rem`;\n      pickerCssProps.holder.minWidth = LARGE_MIN_WIDTH;\n      pickerCssProps.button.fontSize = LARGE_FONT_SIZE;\n      pickerCssProps.input.minWidth = LARGE_INPUT_WIDTH;\n      pickerCssProps.input.width = LARGE_INPUT_WIDTH;\n      pickerCssProps.input.height = LARGE_BUTTON_SIZE;\n      pickerCssProps.button.width = LARGE_BUTTON_SIZE;\n      pickerCssProps.button.height = LARGE_BUTTON_SIZE;\n    }\n    if (pickerHeight) {\n      pickerCssProps.holder.height = pickerHeight;\n    }\n    if (expandOnFocus) {\n      pickerCssProps.holder.background = 'transparent';\n      pickerCssProps.holder.boxShadow = 'none';\n      pickerCssProps.holder.padding = '0';\n      pickerCssProps.holder.minWidth = 26;\n      pickerCssProps.holder.width = '34px';\n      pickerCssProps.holder.height = '26px';\n      pickerCssProps.input.minWidth = '34px';\n      pickerCssProps.input.width = '34px';\n      pickerCssProps.input.height = '26px';\n      pickerCssProps.button.fontSize = '20px';\n      pickerCssProps.button.width = '26px';\n      pickerCssProps.button.height = '26px';\n    }\n    return pickerCssProps;\n  }, [elevation, expandOnFocus, pickerHeight, size, theme.palette.common.white, theme.shadows, variant, width]);\n  const buttonProps = useMemo(() => {\n    const baseProps = {\n      ...IconButtonProps\n    };\n    baseProps.type = 'button';\n    baseProps.size = 'small';\n    baseProps.variant = 'contained';\n    baseProps.color = 'secondary';\n    if (expandOnFocus) {\n      return baseProps;\n    }\n    if (size === 'large') {\n      baseProps.size = 'medium';\n    }\n    if (variant === 'text') {\n      baseProps.size = 'medium';\n    }\n    if (variant === 'contained') {\n      baseProps.variant = 'text';\n      baseProps.color = 'default';\n    }\n    return baseProps;\n  }, [IconButtonProps, expandOnFocus, size, variant]);\n  return {\n    cssProps,\n    buttonProps\n  };\n}\n//# sourceMappingURL=useVisualProps.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M12.5 5.5a.5.5 0 0 0-1 0v6h-6a.5.5 0 0 0 0 1h6v6a.5.5 0 0 0 1 0v-6h6a.5.5 0 0 0 0-1h-6z\"\n}), 'Add');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M6.434 9H4.5a1.5 1.5 0 0 0-1.486 1.703l1.227 9A1.5 1.5 0 0 0 5.728 21h12.254a1.5 1.5 0 0 0 1.486-1.297l1.227-9A1.5 1.5 0 0 0 19.21 9h-1.933c-.087-2.548-.848-4.078-1.933-4.96C14.208 3.118 12.826 3 11.855 3c-.975 0-2.355.126-3.49 1.051C7.282 4.936 6.521 6.464 6.434 9m1 0c.086-2.329.778-3.533 1.564-4.174.858-.7 1.942-.826 2.857-.826.917 0 2 .12 2.857.817.785.637 1.477 1.84 1.563 4.183zm8.868 1 .053 1.448a.5.5 0 0 0 1-.018c0-.528-.013-.987-.037-1.43h1.891a.5.5 0 0 1 .495.568l-1.227 9a.5.5 0 0 1-.495.432H5.728a.5.5 0 0 1-.496-.432l-1.227-9A.5.5 0 0 1 4.5 10h1.905q-.001.372.01.756.009.333.01.674a.5.5 0 1 0 1 0c0-.285-.006-.535-.012-.766-.005-.236-.01-.452-.008-.664z\"\n}), 'AddToBag');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M19.2 9c.9 0 1.6.8 1.5 1.7l-1.2 9c-.1.7-.7 1.3-1.5 1.3H5.7c-.7 0-1.4-.6-1.5-1.3l-1.2-9C2.9 9.8 3.6 9 4.5 9h1.9c.1-2.5.9-4.1 2-4.9 1.1-1 2.5-1.1 3.5-1.1s2.4.1 3.5 1 1.8 2.5 1.9 5zM7.4 11.4V10h-1v1.4c0 .3.2.5.5.5s.5-.2.5-.5m0-2.4h9c-.1-2.4-.8-3.6-1.6-4.2-.9-.7-2-.8-2.9-.8-1 0-2 .1-2.9.8-.8.7-1.5 1.9-1.6 4.2m10 2.4V10h-1v1.4c0 .3.2.5.5.5s.5-.2.5-.5\"\n}), 'AddToBagFilled');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M11.562 5.732A2.5 2.5 0 0 1 13.329 5h4.172a1.5 1.5 0 0 1 1.5 1.5v4.172a2.5 2.5 0 0 1-.732 1.767l-6.5 6.5a2.5 2.5 0 0 1-3.536 0l-3.171-3.171a2.5 2.5 0 0 1 0-3.536zM16 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2\"\n}), 'DiscountTagFilled');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M3.5 4a.5.5 0 0 0 0 1h1.248a1 1 0 0 1 .984.821l1.552 8.537A2 2 0 0 0 9.252 16H16.5a.5.5 0 0 0 0-1H9.252a1 1 0 0 1-.984-.821L8.054 13h8.165a1.5 1.5 0 0 0 1.455-1.136l1-4A1.5 1.5 0 0 0 17.22 6H6.781l-.065-.358A2 2 0 0 0 4.748 4zm12.72 8H7.871l-.91-5H17.22a.5.5 0 0 1 .485.621l-1 4a.5.5 0 0 1-.485.379M11 18.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 18a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1m7.5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m-1.5-.5a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1\"\n}), 'EmptyBasket');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M3 4.5a.5.5 0 0 1 .5-.5h1.248a2 2 0 0 1 1.968 1.642L6.78 6h10.438a1.5 1.5 0 0 1 1.455 1.864l-1 4A1.5 1.5 0 0 1 16.22 13H8.054l.214 1.179a1 1 0 0 0 .984.821H16.5a.5.5 0 0 1 0 1H9.252a2 2 0 0 1-1.968-1.642L5.732 5.82A1 1 0 0 0 4.748 5H3.5a.5.5 0 0 1-.5-.5M9.5 20a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M9 18.5a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0m6.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m-.5-1.5a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0\"\n}), 'EmptyBasketFilled');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"m12 20.5-.243.437-.002-.001-.006-.003-.021-.012-.08-.046-.293-.173a29 29 0 0 1-4.187-3.078C4.906 15.613 2.5 12.734 2.5 9.5c0-1.6.468-2.875 1.242-3.796A4.67 4.67 0 0 1 6.68 4.092c1.947-.28 4.088.582 5.321 2.528 1.233-1.946 3.374-2.809 5.321-2.528a4.67 4.67 0 0 1 2.937 1.612C21.032 6.624 21.5 7.9 21.5 9.5c0 3.233-2.406 6.113-4.668 8.124a29 29 0 0 1-4.531 3.28l-.029.017-.02.012-.007.003h-.001s-.001.001-.244-.436M4.508 6.348C3.907 7.063 3.5 8.1 3.5 9.5c0 2.767 2.094 5.387 4.332 7.376A28 28 0 0 0 12 19.922l.129-.077a28 28 0 0 0 4.04-2.97C18.406 14.887 20.5 12.267 20.5 9.5c0-1.4-.407-2.437-1.008-3.152a3.67 3.67 0 0 0-2.313-1.266c-1.781-.257-3.81.675-4.719 2.808L12 8.97l-.46-1.08c-.909-2.133-2.938-3.065-4.719-2.808a3.67 3.67 0 0 0-2.313 1.266M12 20.5l.244.437a.5.5 0 0 1-.487 0z\"\n}), 'Heart');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M11.757 20.937 12 20.5za.5.5 0 0 0 .486 0L12 20.5l.243.437.002-.001.006-.003.021-.012.029-.016.05-.03q.104-.06.294-.173a29 29 0 0 0 4.187-3.078c2.262-2.011 4.668-4.89 4.668-8.124 0-1.6-.468-2.875-1.242-3.796a4.67 4.67 0 0 0-2.937-1.612c-1.947-.28-4.088.582-5.321 2.528-1.233-1.946-3.374-2.809-5.321-2.528a4.67 4.67 0 0 0-2.937 1.612C2.968 6.624 2.5 7.9 2.5 9.5c0 3.233 2.406 6.113 4.668 8.124a29 29 0 0 0 4.56 3.297l.02.012.007.003z\"\n}), 'HeartFilled');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M13.5 4c0 .234-.054.455-.15.653A6 6 0 0 1 18 10.5V13c0 .503.323.868.83 1.311l.134.117c.2.172.423.364.597.56.221.25.439.583.439 1.012v.5a1.5 1.5 0 0 1-1.5 1.5h-3.6a3.5 3.5 0 0 1-.633 1.426C13.754 20.095 12.98 20.5 12 20.5s-1.753-.405-2.268-1.074A3.5 3.5 0 0 1 9.101 18H5.5A1.5 1.5 0 0 1 4 16.5V16c0-.429.217-.763.439-1.012.174-.196.397-.388.596-.56l.136-.117C5.677 13.868 6 13.503 6 13v-2.5a6 6 0 0 1 4.65-5.847A1.5 1.5 0 1 1 13.5 4m-1.5.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M18.5 17a.5.5 0 0 0 .5-.5V16c0-.071-.032-.175-.186-.347a5 5 0 0 0-.475-.444l-.168-.145C17.677 14.632 17 13.997 17 13v-2.5a5 5 0 0 0-10 0V13c0 .997-.677 1.632-1.17 2.064l-.169.145c-.193.167-.35.302-.475.444-.153.172-.186.276-.186.347v.5a.5.5 0 0 0 .5.5zm-4.63 1h-3.74c.09.318.223.594.395.816.321.418.798.684 1.475.684s1.154-.266 1.475-.684c.172-.223.306-.498.395-.816\"\n}), 'Notification');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M13.5 4c0 .234-.054.455-.15.653A6 6 0 0 1 18 10.5V13c0 .503.323.868.83 1.311l.134.117c.2.172.423.364.597.56.221.25.439.583.439 1.012v.5a1.5 1.5 0 0 1-1.5 1.5h-3.6a3.5 3.5 0 0 1-.633 1.426C13.754 20.095 12.98 20.5 12 20.5s-1.753-.405-2.268-1.074A3.5 3.5 0 0 1 9.101 18H5.5A1.5 1.5 0 0 1 4 16.5V16c0-.429.217-.763.439-1.012.174-.196.397-.388.596-.56l.136-.117C5.677 13.868 6 13.503 6 13v-2.5a6 6 0 0 1 4.65-5.847A1.5 1.5 0 1 1 13.5 4m-1.5.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M10.13 18c.09.318.223.594.395.816.321.418.798.684 1.475.684s1.154-.266 1.475-.684c.172-.223.306-.498.395-.816z\"\n}), 'NotificationFilled');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M12 5.75A6.25 6.25 0 0 0 5.75 12a.75.75 0 0 1-1.5 0 7.75 7.75 0 1 1 4.11 6.844.75.75 0 0 1 .706-1.324A6.25 6.25 0 1 0 12 5.75\"\n}), 'OriflameSpinner');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M13.133 4a1.5 1.5 0 0 0-1.489 1.686L13 16.531V18.5a1.5 1.5 0 0 0 1.5 1.5h2a1.5 1.5 0 0 0 1.5-1.5v-1.969l1.356-10.845A1.5 1.5 0 0 0 17.867 4zM14 18.5V17h3v1.5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5m4.363-12.938L17.06 16h-3.12L12.637 5.562A.5.5 0 0 1 13.133 5h4.734a.5.5 0 0 1 .496.562M6 18.5a1.5 1.5 0 0 0 3 0V8.651l1.315-1.972c.478-.718.268-1.732-.52-2.156a4 4 0 0 0-.978-.39C8.448 4.041 8.032 4 7.5 4c-.527 0-.938.045-1.302.137a4 4 0 0 0-.96.385c-.793.423-1.026 1.448-.537 2.18L6 8.652zM5.709 5.405c.258-.137.475-.234.734-.299C6.704 5.04 7.029 5 7.5 5c.482 0 .812.038 1.078.103.263.065.483.16.744.3.24.13.33.467.161.72L8.233 8H6.767L5.533 6.148a.52.52 0 0 1 .176-.743M7 9h1v9.5a.5.5 0 0 1-1 0z\"\n}), 'Products');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M5 12a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 0 1h-13A.5.5 0 0 1 5 12\"\n}), 'Remove');\n//# sourceMappingURL=index.js.map","import { createSvgIcon } from '@ori-ui/mui-bundle/material/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n  d: \"M13.685 5.34a1.48 1.48 0 0 1 1.81 1.048l1.902 7.15a1.476 1.476 0 0 1-1.046 1.802 1.47 1.47 0 0 1-1.696-.765c-.684-.204-1.608-.195-2.55-.061a13 13 0 0 0-1.808.396l1.458 1.545A1.337 1.337 0 1 1 9.8 18.28l-2.254-2.44-.056.02-.07.017c-.444.08-1.102.195-1.73-.048-.673-.26-1.19-.873-1.502-1.953-.32-1.11-.14-1.916.3-2.492.391-.51.947-.773 1.258-.92l.045-.021.042-.018 1.95-.716.15-.052C8.946 9.306 10.982 8.6 12.629 7.1a1.477 1.477 0 0 1 1.057-1.758m.259.967a.477.477 0 0 0-.34.578l.064.25 1.852 6.913a.467.467 0 0 0 .572.327.477.477 0 0 0 .339-.58l-1.903-7.15a.477.477 0 0 0-.584-.338m-4.686 8.96-.673.225 1.95 2.11a.337.337 0 1 0 .492-.461zm8.907-9.219a.5.5 0 0 0-.934-.356l-.6 1.57a.5.5 0 1 0 .935.357zm-.28 2.87a.5.5 0 1 0 .258.966l1.316-.352a.5.5 0 0 0-.259-.966zm.6 2.132a.5.5 0 1 0-.63.776l1.303 1.06a.5.5 0 1 0 .631-.775z\"\n}), 'SuperdealFilled');\n//# sourceMappingURL=index.js.map","export const Name = 'toggle-favorite';\nexport const ToggleFavorite = Name;\n//# sourceMappingURL=index.js.map","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n    if (!getRandomValues) {\n        if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n            throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n        }\n        getRandomValues = crypto.getRandomValues.bind(crypto);\n    }\n    return getRandomValues(rnds8);\n}\n","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n    byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n    return (byteToHex[arr[offset + 0]] +\n        byteToHex[arr[offset + 1]] +\n        byteToHex[arr[offset + 2]] +\n        byteToHex[arr[offset + 3]] +\n        '-' +\n        byteToHex[arr[offset + 4]] +\n        byteToHex[arr[offset + 5]] +\n        '-' +\n        byteToHex[arr[offset + 6]] +\n        byteToHex[arr[offset + 7]] +\n        '-' +\n        byteToHex[arr[offset + 8]] +\n        byteToHex[arr[offset + 9]] +\n        '-' +\n        byteToHex[arr[offset + 10]] +\n        byteToHex[arr[offset + 11]] +\n        byteToHex[arr[offset + 12]] +\n        byteToHex[arr[offset + 13]] +\n        byteToHex[arr[offset + 14]] +\n        byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n    const uuid = unsafeStringify(arr, offset);\n    if (!validate(uuid)) {\n        throw TypeError('Stringified UUID is invalid');\n    }\n    return uuid;\n}\nexport default stringify;\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n    if (native.randomUUID && !buf && !options) {\n        return native.randomUUID();\n    }\n    options = options || {};\n    const rnds = options.random ?? options.rng?.() ?? rng();\n    if (rnds.length < 16) {\n        throw new Error('Random bytes length must be >= 16');\n    }\n    rnds[6] = (rnds[6] & 0x0f) | 0x40;\n    rnds[8] = (rnds[8] & 0x3f) | 0x80;\n    if (buf) {\n        offset = offset || 0;\n        if (offset < 0 || offset + 16 > buf.length) {\n            throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n        }\n        for (let i = 0; i < 16; ++i) {\n            buf[offset + i] = rnds[i];\n        }\n        return buf;\n    }\n    return unsafeStringify(rnds);\n}\nexport default v4;\n","import { styled } from '@ori-ui/mui';\nexport const HeartRoot = styled('span')(({\n  theme\n}) => ({\n  color: theme.palette.pink[300],\n  fontSize: 0,\n  left: '50%',\n  opacity: 0.5,\n  position: 'absolute',\n  top: '50%',\n  transform: 'translate(-50%, -50%)',\n  transition: 'transform 1000ms ease 0ms, opacity 500ms ease 400ms',\n  zIndex: 1\n}));\nexport const Animation = styled('div')({\n  height: '100%',\n  position: 'relative',\n  width: '100%'\n});\nexport const Parent = styled('div')({\n  height: '100%',\n  position: 'relative',\n  transition: 'transform 0.175s linear',\n  width: '100%',\n  zIndex: 10\n});\nexport const Group = styled('div')({\n  fontSize: '3.5rem'\n});\n//# sourceMappingURL=styles.js.map","import { HeartFilled } from '@ori-ui/icons';\nimport { useEffect, useRef } from 'react';\nimport { HeartRoot } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst SPREAD_FACTOR = 30;\nconst FONT_SCALE = 5;\nexport const Heart = ({\n  angle,\n  index\n}) => {\n  const element = useRef(null);\n  const x = Math.cos(angle) * SPREAD_FACTOR;\n  const y = Math.sin(angle) * SPREAD_FACTOR;\n  const spreadX = Math.floor(Math.random() * SPREAD_FACTOR) + (x - SPREAD_FACTOR / 2);\n  const spreadY = Math.floor(Math.random() * SPREAD_FACTOR) + (y - SPREAD_FACTOR / 2);\n  useEffect(() => {\n    window.requestAnimationFrame(() => {\n      if (element.current) {\n        element.current.style.transform = `translate(calc(-50% + ${spreadX}px), calc(-50% + ${spreadY}px))`;\n        element.current.style.fontSize = `${(index + 1) / FONT_SCALE}em`;\n        element.current.style.opacity = '0';\n      }\n    });\n  }, [index, spreadX, spreadY]);\n  return /*#__PURE__*/_jsx(HeartRoot, {\n    ref: element,\n    children: /*#__PURE__*/_jsx(HeartFilled, {\n      fontSize: \"inherit\"\n    })\n  });\n};\n//# sourceMappingURL=Heart.js.map","import { useEffect, useState } from 'react';\nimport { v4 } from 'uuid';\nimport { HEARTS_ANIMATION, HEARTS_ANIMATION_GROUP } from '../../common';\nimport { Heart } from './Heart';\nimport { Animation, Group, Parent } from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const HeartsAnimation = ({\n  children,\n  onClick,\n  shouldAnimationRun,\n  state\n}) => {\n  const [hearts, setHearts] = useState([]);\n  useEffect(() => {\n    if (!state || !shouldAnimationRun) {\n      return undefined;\n    }\n    const angle = Math.random() * Math.PI * 2;\n    const heartsGroup = {\n      angle,\n      id: v4(),\n      length: 3\n    };\n    window.requestAnimationFrame(() => {\n      setHearts(prevState => [...prevState, heartsGroup]);\n    });\n    const timeout = setTimeout(() => {\n      window.requestAnimationFrame(() => {\n        setHearts(() => []);\n      });\n    }, 1500);\n    return () => {\n      clearTimeout(timeout);\n    };\n  }, [state, shouldAnimationRun]);\n  return /*#__PURE__*/_jsxs(Animation, {\n    \"data-testid\": HEARTS_ANIMATION,\n    onClick: onClick,\n    children: [/*#__PURE__*/_jsx(Parent, {\n      children: children\n    }), hearts.map(group => /*#__PURE__*/_jsx(Group, {\n      \"data-testid\": HEARTS_ANIMATION_GROUP,\n      children: Array.from({\n        length: group.length\n      }, (value, index) => /*#__PURE__*/_jsx(Heart, {\n        angle: group.angle,\n        index: index\n      }, index))\n    }, group.id))]\n  });\n};\n//# sourceMappingURL=HeartsAnimation.js.map","export const HEARTS_ANIMATION_GROUP = 'heartsAnimationGroup';\nexport const HEARTS_ANIMATION = 'heartsAnimation';\nexport const OUTLINED_ICON_TEST_ID = 'HeartIcon';\nexport const FILLED_ICON_TEST_ID = 'HeartFilledIcon';\n//# sourceMappingURL=constants.js.map","import { styled } from '@ori-ui/mui';\nimport { shouldForwardProp } from '@ori/presentation-utils';\nexport const Filled = styled('div', {\n  shouldForwardProp: shouldForwardProp()\n})(({\n  theme,\n  isFavorite\n}) => ({\n  color: theme.palette.pink[300],\n  display: 'none',\n  ...(isFavorite && {\n    display: 'flex'\n  })\n}));\nexport const Outlined = styled('div', {\n  shouldForwardProp: shouldForwardProp()\n})(({\n  theme,\n  isFavorite\n}) => ({\n  color: theme.palette.text.secondary,\n  display: 'flex',\n  ...(isFavorite && {\n    display: 'none'\n  })\n}));\nexport const HeartIconRoot = styled('div')(({\n  theme\n}) => ({\n  alignItems: 'center',\n  display: 'flex',\n  fontSize: 'inherit',\n  height: '100%',\n  justifyContent: 'center',\n  width: '100%',\n  [theme.breakpoints.up('md')]: {\n    '&:hover .filledIcon': {\n      display: 'flex'\n    },\n    '&:hover .outlinedIcon': {\n      display: 'none'\n    }\n  }\n}));\n//# sourceMappingURL=styles.js.map","import { Heart, HeartFilled } from '@ori-ui/icons';\nimport { Filled, HeartIconRoot, Outlined } from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const HeartIcon = ({\n  isFavorite\n}) => /*#__PURE__*/_jsxs(HeartIconRoot, {\n  children: [/*#__PURE__*/_jsx(Filled, {\n    isFavorite: isFavorite,\n    className: \"filledIcon\",\n    children: /*#__PURE__*/_jsx(HeartFilled, {\n      fontSize: \"inherit\"\n    })\n  }), /*#__PURE__*/_jsx(Outlined, {\n    isFavorite: isFavorite,\n    className: \"outlinedIcon\",\n    children: /*#__PURE__*/_jsx(Heart, {\n      fontSize: \"inherit\"\n    })\n  })]\n});\n//# sourceMappingURL=HeartIcon.js.map","import * as FavoritesUpdatedEvent from '@ori-events/favorites-updated';\nimport * as RequestFavoritesEvent from '@ori-events/request-favorites';\nimport * as ToggleFavoriteEvent from '@ori-events/toggle-favorite';\nimport { useCallback, useEffect, useState } from 'react';\nimport { HeartsAnimation } from '../HeartsAnimation';\nimport { HeartIcon } from './HeartIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst renderHeart = (isInFavorites, shouldAnimationRun, onClick) => /*#__PURE__*/_jsx(HeartsAnimation, {\n  state: isInFavorites,\n  shouldAnimationRun: shouldAnimationRun,\n  onClick: onClick,\n  children: /*#__PURE__*/_jsx(HeartIcon, {\n    isFavorite: isInFavorites\n  })\n});\nexport const FavoritesHeart = ({\n  code,\n  isFavorite,\n  placement,\n  position,\n  render,\n  shades\n}) => {\n  const [isInFavorites, setIsInFavorites] = useState(isFavorite ?? false);\n  const shadesCodes = shades?.map(shade => shade.productCode);\n  const [shouldAnimationRun, setShouldAnimationRun] = useState(false);\n  const toggleFavorite = useCallback(() => {\n    window.dispatchEvent(new CustomEvent(ToggleFavoriteEvent.Name, {\n      detail: {\n        code,\n        placement,\n        position,\n        requestedState: !isInFavorites\n      }\n    }));\n  }, [code, isInFavorites, placement, position]);\n  const handleClick = useCallback(event => {\n    event.preventDefault();\n    event.stopPropagation();\n    if (!isInFavorites) {\n      setShouldAnimationRun(true);\n    }\n    toggleFavorite();\n  }, [isInFavorites, toggleFavorite]);\n  useEffect(() => {\n    if (!code) {\n      return undefined;\n    }\n    const onFavoriteUpdate = ({\n      detail: {\n        favorites\n      }\n    }) => {\n      const codes = new Set([code, ...(shadesCodes ?? [])]);\n      const isProductInFavorites = favorites.some(productCode => codes.has(productCode));\n      setIsInFavorites(isProductInFavorites);\n    };\n    setShouldAnimationRun(false);\n    window.addEventListener(FavoritesUpdatedEvent.Name, onFavoriteUpdate);\n    window.dispatchEvent(new CustomEvent(RequestFavoritesEvent.Name));\n    return () => window.removeEventListener(FavoritesUpdatedEvent.Name, onFavoriteUpdate);\n  }, [code, shadesCodes]);\n  useEffect(() => {\n    const providerExists = Boolean(document.querySelector('#favorites-provider-config'));\n    if (providerExists) {\n      window.dispatchEvent(new CustomEvent(RequestFavoritesEvent.Name));\n    }\n  }, []);\n  const rendered = render?.(renderHeart(isInFavorites, shouldAnimationRun), handleClick);\n  return rendered ?? renderHeart(isInFavorites, shouldAnimationRun, handleClick);\n};\n//# sourceMappingURL=FavoritesHeart.js.map","export const getDesktopSize = desktopSize => ({\n  ...(desktopSize === 'small' ? {\n    height: 20,\n    width: 20,\n    fontSize: '1.4rem'\n  } : {}),\n  ...(desktopSize === 'medium' ? {\n    height: 36,\n    width: 36,\n    fontSize: '2.4rem'\n  } : {}),\n  ...(desktopSize === 'large' ? {\n    height: 45,\n    width: 45,\n    fontSize: '2.7rem'\n  } : {})\n});\n//# sourceMappingURL=utils.js.map","import { IconButton } from '@ori-ui/components';\nimport { styled } from '@ori-ui/mui';\nimport { shouldNotForwardProp } from '@ori/presentation-utils';\nimport { getDesktopSize } from './utils';\nexport const FavoritesIconButton = styled(IconButton, {\n  shouldForwardProp: shouldNotForwardProp(['desktopSize'])\n})(({\n  desktopSize,\n  theme\n}) => ({\n  [theme.breakpoints.up('sm')]: {\n    ...getDesktopSize(desktopSize)\n  }\n}));\n//# sourceMappingURL=styles.js.map","import { useCallback } from 'react';\nimport { FavoritesHeart } from '../FavoritesHeart';\nimport { FavoritesIconButton } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const FavoritesHeartIconButton = ({\n  code,\n  placement,\n  position,\n  shades,\n  onClick,\n  ...restProps\n}) => {\n  const handleClick = useCallback(e => {\n    e.preventDefault();\n    e.stopPropagation();\n    onClick?.(e);\n  }, [onClick]);\n  const renderFavoritesHeart = useCallback((heart, onFavoritesHeartClick) => /*#__PURE__*/_jsx(FavoritesIconButton, {\n    color: \"default\",\n    size: \"large\",\n    variant: \"contained\",\n    onClick: onClick ? handleClick : onFavoritesHeartClick,\n    ...restProps,\n    children: heart\n  }), [handleClick, onClick, restProps]);\n  return /*#__PURE__*/_jsx(FavoritesHeart, {\n    code: code,\n    placement: placement,\n    position: position,\n    shades: shades,\n    render: renderFavoritesHeart\n  });\n};\n//# sourceMappingURL=FavoritesHeartIconButton.js.map","export const FONT_SANS_ORI = 'SansOri, SansOriFallback, sans-serif';\nexport const CAROUSEL = 'Carousel';\nexport const CAROUSEL_WRAPPER = 'CarouselWrapper';\nexport const CAROUSEL_PREVIOUS_ARROW = 'CarouselPreviousArrow';\nexport const CAROUSEL_NEXT_ARROW = 'CarouselNextArrow';\nexport const CAROUSEL_SLIDE = 'CarouselSlide';\nexport const IMAGE = 'Image';\nexport const VIDEO = 'VideoWrapper';\nexport const VIDEO_PLAY_BUTTON = 'VideoPlayButton';\nexport const VIDEO_PLAYER = 'VideoPlayer';\nexport const IMAGE_PLACEHOLDER = 'ImagePlaceholder';\nexport const IMAGE_PLACEHOLDER_BACKGROUND = 'ImagePlaceholderBackground';\nexport const PAGINATION_STEP = 'PaginationStep';\n//# sourceMappingURL=carousel.js.map","import { Skeleton, styled } from '@ori-ui/mui';\nimport { shouldForwardProp } from '@ori/presentation-utils';\nexport const Root = styled('div', {\n  name: 'ImagePlaceholder',\n  shouldForwardProp: shouldForwardProp()\n})(({\n  theme,\n  height,\n  isLoadingPlaceholder,\n  isSquare,\n  width,\n  absolute\n}) => ({\n  alignItems: 'center',\n  aspectRatio: isSquare ? '1 / 1' : undefined,\n  background: isLoadingPlaceholder ? 'unset' : theme.palette.grey[100],\n  boxSizing: 'content-box',\n  color: theme.palette.grey[200],\n  display: 'flex',\n  height: height ?? '100%',\n  justifyContent: 'center',\n  left: '0',\n  position: (Boolean(isSquare) || Boolean(width) || Boolean(height)) && !absolute ? 'relative' : 'absolute',\n  top: '0',\n  width: width ?? '100%',\n  svg: {\n    height: '100%',\n    maxWidth: '130px',\n    width: '40%',\n    zIndex: 1\n  }\n}));\nexport const Background = styled(Skeleton)(({\n  theme\n}) => ({\n  background: theme.palette.grey[100],\n  position: 'absolute'\n}));\n//# sourceMappingURL=styles.js.map","import { Products } from '@ori-ui/icons';\nimport useTestId from '@ori/testid-generator';\nimport { IMAGE_PLACEHOLDER, IMAGE_PLACEHOLDER_BACKGROUND } from '../../common';\nimport { Background, Root } from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ImagePlaceholder = ({\n  height,\n  isLoadingPlaceholder,\n  isSquare,\n  testId,\n  width,\n  ...htmlDivElementProps\n}) => {\n  const {\n    getTestId\n  } = useTestId();\n  return /*#__PURE__*/_jsxs(Root, {\n    ...htmlDivElementProps,\n    height: height,\n    isSquare: isSquare,\n    width: width,\n    \"data-testid\": testId ?? getTestId(IMAGE_PLACEHOLDER),\n    children: [/*#__PURE__*/_jsx(Products, {\n      fontSize: \"inherit\"\n    }), isLoadingPlaceholder ? /*#__PURE__*/_jsx(Background, {\n      animation: \"wave\",\n      height: \"100%\",\n      variant: \"rectangular\",\n      width: \"100%\",\n      \"data-testid\": getTestId(IMAGE_PLACEHOLDER_BACKGROUND)\n    }) : null]\n  });\n};\n//# sourceMappingURL=ImagePlaceholder.js.map","import { generateUtilityClasses } from '@ori-ui/mui';\nexport const shadeClasses = generateUtilityClasses('Shade', ['root', 'clearIcon']);\n//# sourceMappingURL=shadeClasses.js.map","export const getShadeBackground = (shade, theme) => {\n  const {\n    hexColors,\n    imageUrl\n  } = shade;\n  if (hexColors?.length === 1 && hexColors[0]) {\n    return hexColors[0];\n  }\n  if (hexColors && hexColors.length > 1) {\n    return `linear-gradient(to right, ${hexColors[0]}, ${hexColors[0]} 50%, ${hexColors[1]} 50%)`;\n  }\n  if (imageUrl) {\n    return `url(${imageUrl})`;\n  }\n  return theme.palette.common.white;\n};\n//# sourceMappingURL=getShadeBackground.js.map","export const SHADES_SIZE = 35;\nexport const SHADES_SIZE_CURRENT = 41;\nexport const SHADE_CLEAR_ICON_SIZE = '19px';\nexport const SHADES_SMALL_SIZE = 14;\nexport const SHADE_CLEAR_ICON_SMALL_SIZE = '10px';\nexport const SHADES_INLINE_SIZE = 10;\nexport const WHITE_COLORS = ['white', '#fff', '#FFF', '#ffff', '#FFFF', '#ffffff', '#FFFFFF'];\n//# sourceMappingURL=constants.js.map","import { WHITE_COLORS } from '../constants';\nexport const getBoxShadow = (background, theme) => WHITE_COLORS.includes(background) ? theme.palette.blueGrey[100] : theme.palette.common.white;\n//# sourceMappingURL=getBoxShadow.js.map","import { WHITE_COLORS } from '../constants';\nimport { getShadeBackground } from './getShadeBackground';\nexport const getShadeClearIconColor = (shade, theme) => WHITE_COLORS.includes(getShadeBackground(shade, theme)) ? theme.palette.grey[700] : theme.palette.common.white;\n//# sourceMappingURL=getShadeClearIconColor.js.map","import { SHADE_CLEAR_ICON_SIZE, SHADE_CLEAR_ICON_SMALL_SIZE } from '../constants';\nimport { ShadeSize } from '../types';\nexport const getShadeClearIconSize = size => size === ShadeSize.Medium ? SHADE_CLEAR_ICON_SIZE : SHADE_CLEAR_ICON_SMALL_SIZE;\n//# sourceMappingURL=getShadeClearIconSize.js.map","import { Clear } from '@ori-ui/icons';\nimport { SHADOW_LEVEL1, styled } from '@ori-ui/mui';\nimport { shouldForwardProp, shouldNotForwardProp } from '@ori/presentation-utils';\nimport { ShadeSize } from './types';\nimport { getBoxShadow, getShadeBackground, getShadeBorder, getShadeClearIconColor, getShadeClearIconSize, getShadeRootSize } from './utils';\nexport const ShadeRoot = styled('span', {\n  shouldForwardProp: shouldForwardProp()\n})(({\n  currentShade,\n  isClickable,\n  shade,\n  size,\n  theme\n}) => {\n  const isCurrent = currentShade?.productCode === shade.productCode;\n  const background = getShadeBackground(shade, theme);\n  const border = getShadeBorder(background, theme);\n  const shadeRootSize = getShadeRootSize(size, border, isCurrent);\n  const style = {\n    background,\n    backgroundSize: 'cover',\n    border,\n    borderRadius: '50%',\n    boxSizing: 'content-box',\n    cursor: isClickable ? 'pointer' : 'default',\n    position: 'relative',\n    display: size === ShadeSize.Inline ? 'inline-block' : 'flex',\n    height: shadeRootSize,\n    width: shadeRootSize\n  };\n  if (isCurrent) {\n    style.boxShadow = SHADOW_LEVEL1;\n    style['&::before'] = {\n      border: '1px solid transparent',\n      borderRadius: '50%',\n      boxShadow: `inset 0 0px 0 2px ${getBoxShadow(background, theme)}`,\n      content: '\"\"',\n      display: 'block',\n      height: 'calc(100% - 2px)',\n      position: 'absolute',\n      width: 'calc(100% - 2px)'\n    };\n  }\n  return style;\n});\nexport const ShadeClearIcon = styled(Clear, {\n  shouldForwardProp: shouldNotForwardProp(['size', 'shade'])\n})(({\n  shade,\n  size,\n  theme\n}) => ({\n  color: getShadeClearIconColor(shade, theme),\n  alignSelf: 'center',\n  margin: '0 auto',\n  width: getShadeClearIconSize(size),\n  height: getShadeClearIconSize(size)\n}));\n//# sourceMappingURL=styles.js.map","import { WHITE_COLORS } from '../constants';\nexport const getShadeBorder = (background, theme) => WHITE_COLORS.includes(background) ? `1px solid ${theme.palette.grey[200]}` : undefined;\n//# sourceMappingURL=getShadeBorder.js.map","import { SHADES_SIZE, SHADES_SMALL_SIZE, SHADES_INLINE_SIZE, SHADES_SIZE_CURRENT } from '../constants';\nimport { ShadeSize } from '../types';\nexport const getShadeRootSize = (size, border, isCurrent) => {\n  let rootSize = 0;\n  switch (size) {\n    case ShadeSize.Small:\n      rootSize = SHADES_SMALL_SIZE;\n      break;\n    case ShadeSize.Inline:\n      rootSize = SHADES_INLINE_SIZE;\n      break;\n    default:\n      rootSize = isCurrent ? SHADES_SIZE_CURRENT : SHADES_SIZE;\n  }\n  if (border !== undefined) {\n    rootSize -= 2;\n  }\n  return `${rootSize}px`;\n};\n//# sourceMappingURL=getShadeRootSize.js.map","import clsx from 'clsx';\nimport { useCallback } from 'react';\nimport { shadeClasses } from './shadeClasses';\nimport { ShadeClearIcon, ShadeRoot } from './styles';\nimport { ShadeSize } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Shade = ({\n  shade,\n  currentShade,\n  size = ShadeSize.Medium,\n  testId,\n  onShadeClick,\n  className\n}) => {\n  const rootClassName = clsx(shadeClasses.root, className);\n  const onClick = useCallback(() => {\n    onShadeClick?.(shade);\n  }, [onShadeClick, shade]);\n  const onKeyDown = useCallback(event => {\n    if (event.key === 'Enter') {\n      onClick();\n    }\n  }, [onClick]);\n  return /*#__PURE__*/_jsx(ShadeRoot, {\n    className: rootClassName,\n    currentShade: currentShade,\n    isClickable: onShadeClick !== undefined,\n    shade: shade,\n    size: size,\n    \"data-testid\": testId,\n    tabIndex: 0,\n    role: \"button\",\n    onKeyDown: onKeyDown,\n    onClick: onClick,\n    children: shade.canBeSold ? null : /*#__PURE__*/_jsx(ShadeClearIcon, {\n      shade: shade,\n      size: size,\n      className: shadeClasses.clearIcon\n    })\n  });\n};\n//# sourceMappingURL=Shade.js.map","export let ShadeSize = /*#__PURE__*/function (ShadeSize) {\n  ShadeSize[\"Medium\"] = \"medium\";\n  ShadeSize[\"Small\"] = \"small\";\n  ShadeSize[\"Inline\"] = \"inline\";\n  return ShadeSize;\n}({});\n//# sourceMappingURL=types.js.map","import { useCallback, useState } from 'react';\nexport const useDisclose = ({\n  open: openProp,\n  defaultOpen\n} = {}) => {\n  const [isOpen, setIsOpen] = useState(defaultOpen ?? false);\n  const open = openProp ?? isOpen;\n  const onOpen = useCallback(() => {\n    setIsOpen(true);\n  }, []);\n  const onClose = useCallback(() => {\n    setIsOpen(false);\n  }, []);\n  const onToggle = useCallback(() => {\n    setIsOpen(prev => !prev);\n  }, []);\n  return {\n    open,\n    onOpen,\n    onClose,\n    onToggle\n  };\n};\n//# sourceMappingURL=useDisclose.js.map","import { useMediaQuery } from '@ori-ui/mui';\nexport const useIsMobile = ({\n  options\n} = {}) => useMediaQuery(theme => theme.breakpoints.down('sm'), options);\n//# sourceMappingURL=useIsMobile.js.map","/* istanbul ignore file */\n//\n// DO NOT EDIT!\n// This file was autogenerated by Eddie.\n// Changes may cause incorrect behavior and will be lost when the file is regenerated.\n//\n// Run `npx eddie update workspace` to regenerate.\n//\n\nexport const APP_NAME = 'product-box';\nexport const PACKAGE_NAME = '@ori/product-box';\nexport const TEAM_NAME = 'Presentation';\nexport const EMOTION_CACHE_KEY = `${APP_NAME}-emotion-cache-key`;\nexport const APP_ROOT_ELEMENT_ID = `${APP_NAME}-root`;\n//# sourceMappingURL=constants-generated.js.map","import { createContext, useMemo } from 'react';\nimport { ProductBoxMode } from '../models/ProductBoxMode';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const productContext = /*#__PURE__*/createContext({\n  addToBasketMethod: undefined,\n  code: '',\n  isLink: true,\n  image: '',\n  name: '',\n  rating: 0,\n  ratingCount: 0,\n  url: '',\n  mode: ProductBoxMode.Concept\n});\nconst {\n  Provider\n} = productContext;\nexport const ProductProvider = ({\n  children,\n  value\n}) => /*#__PURE__*/_jsx(Provider, {\n  value: useMemo(() => value, [value]),\n  children: children\n});\n//# sourceMappingURL=productContext.js.map","import { Logger } from '@ori/logger';\nimport { APP_NAME, TEAM_NAME } from './constants-generated';\nexport const mainLogger = new Logger(APP_NAME, {\n  teamName: TEAM_NAME\n});\n//# sourceMappingURL=logger.js.map","import { ErrorBoundary as EBoundary } from '@ori/logger';\nimport { ProductBoxSkeleton } from './ProductBoxSkeleton';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ErrorBoundary = ({\n  children,\n  logger\n}) => /*#__PURE__*/_jsx(EBoundary, {\n  fallback: /*#__PURE__*/_jsx(ProductBoxSkeleton, {\n    animation: \"pulse\"\n  }),\n  logger: logger,\n  children: children\n});\n//# sourceMappingURL=ErrorBoundary.js.map","export const IMAGE_SIZE_MULTIPLIER = 1;\n//# sourceMappingURL=constants.js.map","export const BACKGROUND_PARAM = 'bc';\nexport const IMAGE_BACKGROUND_PARAM = 'ib';\nexport const HEIGHT_PARAM = 'h';\nexport const IMAGE_FORMAT_PARAM = 'imageFormat';\nexport const QUALITY_PARAM = 'q';\nexport const WIDTH_PARAM = 'w';\n//# sourceMappingURL=index.js.map","import { createVariant } from '../internal/createVariant';\nimport { getBackgroundColorForVariants } from '../internal/getBackgroundColorForVariants';\nimport { sanitizeUrlFromWrongParams } from '../internal/sanitizeUrlFromWrongParams';\n/**\n * Function provides images urls base on the needs of the developer.\n * It allows to customize width, height and quality for each variant\n * and one background color for all variants.\n * @param entryData\n * @returns ImageVariant[]\n */\nexport const getImageVariants = entryData => {\n  if (!entryData?.url) {\n    throw new TypeError('You need to provide a base url with entry data');\n  }\n  const baseUrl = new URL(entryData.url);\n  const backgroundColor = getBackgroundColorForVariants(baseUrl, entryData.backgroundColor);\n  sanitizeUrlFromWrongParams(baseUrl);\n  const variants = Object.values(entryData.params).filter(variant => Boolean(variant.width)).map(variant => createVariant({\n    variant,\n    baseUrl,\n    backgroundColor,\n    imageSizeMultiplier: entryData.imageSizeMultiplier,\n    excludeWidthFromUrl: entryData.excludeWidthFromUrl,\n    imageFormat: entryData.imageFormat\n  }));\n  return variants;\n};\n//# sourceMappingURL=getImageVariants.js.map","import { IMAGE_BACKGROUND_PARAM } from './constants';\nexport const getBackgroundColorForVariants = (url, backgroundColor) => {\n  if (typeof backgroundColor === 'undefined') {\n    return url.searchParams.get(IMAGE_BACKGROUND_PARAM);\n  }\n  return backgroundColor;\n};\n//# sourceMappingURL=getBackgroundColorForVariants.js.map","import { BACKGROUND_PARAM, HEIGHT_PARAM, IMAGE_BACKGROUND_PARAM, QUALITY_PARAM, WIDTH_PARAM } from './constants';\nexport const sanitizeUrlFromWrongParams = url => {\n  url.searchParams.delete(HEIGHT_PARAM);\n  url.searchParams.delete(QUALITY_PARAM);\n  url.searchParams.delete(WIDTH_PARAM);\n  url.searchParams.delete(BACKGROUND_PARAM);\n  url.searchParams.delete(IMAGE_BACKGROUND_PARAM);\n};\n//# sourceMappingURL=sanitizeUrlFromWrongParams.js.map","import { IMAGE_SIZE_MULTIPLIER } from '../constants';\nimport { BACKGROUND_PARAM, HEIGHT_PARAM, IMAGE_BACKGROUND_PARAM, IMAGE_FORMAT_PARAM, QUALITY_PARAM, WIDTH_PARAM } from './constants';\nexport const createVariant = ({\n  baseUrl,\n  variant,\n  backgroundColor,\n  imageSizeMultiplier = IMAGE_SIZE_MULTIPLIER,\n  excludeWidthFromUrl,\n  imageFormat\n}) => {\n  const variantURL = new URL(baseUrl.toString());\n  if (!excludeWidthFromUrl) {\n    const width = variant.width * imageSizeMultiplier;\n    variantURL.searchParams.set(WIDTH_PARAM, width.toString());\n  }\n  if (typeof backgroundColor === 'string') {\n    variantURL.searchParams.set(BACKGROUND_PARAM, backgroundColor);\n    variantURL.searchParams.set(IMAGE_BACKGROUND_PARAM, backgroundColor);\n  }\n  if (variant.height !== undefined) {\n    const height = variant.height * imageSizeMultiplier;\n    variantURL.searchParams.set(HEIGHT_PARAM, height.toString());\n  }\n  if (variant.quality !== undefined) {\n    variantURL.searchParams.set(QUALITY_PARAM, variant.quality.toString());\n  }\n  if (imageFormat) {\n    variantURL.searchParams.set(IMAGE_FORMAT_PARAM, imageFormat);\n  }\n  return {\n    width: variant.width,\n    url: variantURL.toString()\n  };\n};\n//# sourceMappingURL=createVariant.js.map","/**\n * Function generates srcSets based on passed array of Images.\n * @param images\n * @returns srcSet string\n */\nexport const generateSrcSet = images => images.map(variant => `${variant.url} ${variant.width}w`).join(',');\n//# sourceMappingURL=generateSrcSet.js.map","import { useContext } from 'react';\nimport { productContext } from '../../context';\nexport const useProduct = () => useContext(productContext);\n//# sourceMappingURL=useProduct.js.map","import { styled } from '@ori-ui/mui';\nexport const ImageRoot = styled('img')({\n  height: '100%',\n  left: '50%',\n  maxHeight: '100%',\n  maxWidth: '100%',\n  objectFit: 'contain',\n  overflow: 'hidden',\n  position: 'absolute',\n  top: '50%',\n  transition: 'filter 400ms, opacity 400ms, transform 500ms !important',\n  width: '100%',\n  transform: 'translate(-50%, -50%) scale(1)'\n});\n//# sourceMappingURL=styles.js.map","import { useTheme } from '@ori-ui/mui';\nimport { generateSrcSet, getImageVariants } from '@ori/image-sizes-helper';\nimport { ImagePlaceholder } from '@ori/presentation-components';\nimport useTestId from '@ori/testid-generator';\nimport { ALT_IMG, IMG } from '../../constants';\nimport { useProduct } from '../../hooks/internal';\nimport { ImageRoot } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ProductImage = () => {\n  const {\n    getTestId\n  } = useTestId();\n  const {\n    palette\n  } = useTheme();\n  const {\n    code,\n    image,\n    name\n  } = useProduct();\n  if (!image) {\n    return /*#__PURE__*/_jsx(ImagePlaceholder, {\n      testId: `${getTestId(ALT_IMG)}-${code}`\n    });\n  }\n  const imagesVariants = {\n    url: image,\n    backgroundColor: palette.grey[100],\n    imageFormat: 'WebP',\n    imageSizeMultiplier: 2,\n    params: [{\n      width: 300,\n      height: 300,\n      quality: 90\n    }]\n  };\n  const images = getImageVariants(imagesVariants);\n  return /*#__PURE__*/_jsx(ImageRoot, {\n    alt: name,\n    className: \"imageZoom\",\n    \"data-testid\": `${getTestId(IMG)}-${code}`,\n    loading: \"lazy\",\n    sizes: \"300px\",\n    src: images.at(-1)?.url,\n    srcSet: generateSrcSet(images)\n  });\n};\n//# sourceMappingURL=ProductImage.js.map","import { NEW, NEW_EDITION, NEW_EDITION_AVAILABLE, OFFER, SUPER_DEAL } from '../../common';\nexport const dealLabelTypes = new Set([NEW, NEW_EDITION, NEW_EDITION_AVAILABLE, OFFER, SUPER_DEAL]);\nexport const isDealLabel = label =>\n// Type casting used so that there can be type checking in DEAL_LABEL_TYPES and yet it can\n// be used for checking whether label has type DealLabelType.\ndealLabelTypes.has(label ?? '');\n//# sourceMappingURL=isDealLabel.js.map","export const getPointsBackground = ({\n  background,\n  productPoints,\n  userPoints\n}) => {\n  if (background) {\n    return background;\n  }\n  return productPoints != null && userPoints != null && userPoints >= productPoints ? 'dark' : 'light';\n};\n//# sourceMappingURL=getPointsBackground.js.map","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFabUtilityClass(slot) {\n  return generateUtilityClass('MuiFab', slot);\n}\nconst fabClasses = generateUtilityClasses('MuiFab', ['root', 'primary', 'secondary', 'extended', 'circular', 'focusVisible', 'disabled', 'colorInherit', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'info', 'error', 'warning', 'success']);\nexport default fabClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"disabled\", \"disableFocusRipple\", \"focusVisibleClassName\", \"size\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nimport { useDefaultProps } from '../DefaultPropsProvider';\nimport fabClasses, { getFabUtilityClass } from './fabClasses';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n  const {\n    color,\n    variant,\n    classes,\n    size\n  } = ownerState;\n  const slots = {\n    root: ['root', variant, `size${capitalize(size)}`, color === 'inherit' ? 'colorInherit' : color]\n  };\n  const composedClasses = composeClasses(slots, getFabUtilityClass, classes);\n  return _extends({}, classes, composedClasses);\n};\nconst FabRoot = styled(ButtonBase, {\n  name: 'MuiFab',\n  slot: 'Root',\n  shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n  overridesResolver: (props, styles) => {\n    const {\n      ownerState\n    } = props;\n    return [styles.root, styles[ownerState.variant], styles[`size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, styles[capitalize(ownerState.size)], styles[ownerState.color]];\n  }\n})(({\n  theme,\n  ownerState\n}) => {\n  var _theme$palette$getCon, _theme$palette;\n  return _extends({}, theme.typography.button, {\n    minHeight: 36,\n    transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {\n      duration: theme.transitions.duration.short\n    }),\n    borderRadius: '50%',\n    padding: 0,\n    minWidth: 0,\n    width: 56,\n    height: 56,\n    zIndex: (theme.vars || theme).zIndex.fab,\n    boxShadow: (theme.vars || theme).shadows[6],\n    '&:active': {\n      boxShadow: (theme.vars || theme).shadows[12]\n    },\n    color: theme.vars ? theme.vars.palette.text.primary : (_theme$palette$getCon = (_theme$palette = theme.palette).getContrastText) == null ? void 0 : _theme$palette$getCon.call(_theme$palette, theme.palette.grey[300]),\n    backgroundColor: (theme.vars || theme).palette.grey[300],\n    '&:hover': {\n      backgroundColor: (theme.vars || theme).palette.grey.A100,\n      // Reset on touch devices, it doesn't add specificity\n      '@media (hover: none)': {\n        backgroundColor: (theme.vars || theme).palette.grey[300]\n      },\n      textDecoration: 'none'\n    },\n    [`&.${fabClasses.focusVisible}`]: {\n      boxShadow: (theme.vars || theme).shadows[6]\n    }\n  }, ownerState.size === 'small' && {\n    width: 40,\n    height: 40\n  }, ownerState.size === 'medium' && {\n    width: 48,\n    height: 48\n  }, ownerState.variant === 'extended' && {\n    borderRadius: 48 / 2,\n    padding: '0 16px',\n    width: 'auto',\n    minHeight: 'auto',\n    minWidth: 48,\n    height: 48\n  }, ownerState.variant === 'extended' && ownerState.size === 'small' && {\n    width: 'auto',\n    padding: '0 8px',\n    borderRadius: 34 / 2,\n    minWidth: 34,\n    height: 34\n  }, ownerState.variant === 'extended' && ownerState.size === 'medium' && {\n    width: 'auto',\n    padding: '0 16px',\n    borderRadius: 40 / 2,\n    minWidth: 40,\n    height: 40\n  }, ownerState.color === 'inherit' && {\n    color: 'inherit'\n  });\n}, ({\n  theme,\n  ownerState\n}) => _extends({}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && (theme.vars || theme).palette[ownerState.color] != null && {\n  color: (theme.vars || theme).palette[ownerState.color].contrastText,\n  backgroundColor: (theme.vars || theme).palette[ownerState.color].main,\n  '&:hover': {\n    backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,\n    // Reset on touch devices, it doesn't add specificity\n    '@media (hover: none)': {\n      backgroundColor: (theme.vars || theme).palette[ownerState.color].main\n    }\n  }\n}), ({\n  theme\n}) => ({\n  [`&.${fabClasses.disabled}`]: {\n    color: (theme.vars || theme).palette.action.disabled,\n    boxShadow: (theme.vars || theme).shadows[0],\n    backgroundColor: (theme.vars || theme).palette.action.disabledBackground\n  }\n}));\nconst Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {\n  const props = useDefaultProps({\n    props: inProps,\n    name: 'MuiFab'\n  });\n  const {\n      children,\n      className,\n      color = 'default',\n      component = 'button',\n      disabled = false,\n      disableFocusRipple = false,\n      focusVisibleClassName,\n      size = 'large',\n      variant = 'circular'\n    } = props,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  const ownerState = _extends({}, props, {\n    color,\n    component,\n    disabled,\n    disableFocusRipple,\n    size,\n    variant\n  });\n  const classes = useUtilityClasses(ownerState);\n  return /*#__PURE__*/_jsx(FabRoot, _extends({\n    className: clsx(classes.root, className),\n    component: component,\n    disabled: disabled,\n    focusRipple: !disableFocusRipple,\n    focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n    ownerState: ownerState,\n    ref: ref\n  }, other, {\n    classes: classes,\n    children: children\n  }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Fab.propTypes /* remove-proptypes */ = {\n  // ┌────────────────────────────── Warning ──────────────────────────────┐\n  // │ These PropTypes are generated from the TypeScript type definitions. │\n  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │\n  // └─────────────────────────────────────────────────────────────────────┘\n  /**\n   * The content of the component.\n   */\n  children: PropTypes.node,\n  /**\n   * Override or extend the styles applied to the component.\n   */\n  classes: PropTypes.object,\n  /**\n   * @ignore\n   */\n  className: PropTypes.string,\n  /**\n   * The color of the component.\n   * It supports both default and custom theme colors, which can be added as shown in the\n   * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n   * @default 'default'\n   */\n  color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n  /**\n   * The component used for the root node.\n   * Either a string to use a HTML element or a component.\n   */\n  component: PropTypes.elementType,\n  /**\n   * If `true`, the component is disabled.\n   * @default false\n   */\n  disabled: PropTypes.bool,\n  /**\n   * If `true`, the  keyboard focus ripple is disabled.\n   * @default false\n   */\n  disableFocusRipple: PropTypes.bool,\n  /**\n   * If `true`, the ripple effect is disabled.\n   */\n  disableRipple: PropTypes.bool,\n  /**\n   * @ignore\n   */\n  focusVisibleClassName: PropTypes.string,\n  /**\n   * The URL to link to when the button is clicked.\n   * If defined, an `a` element will be used as the root node.\n   */\n  href: PropTypes.string,\n  /**\n   * The size of the component.\n   * `small` is equivalent to the dense button styling.\n   * @default 'large'\n   */\n  size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n  /**\n   * The system prop that allows defining system overrides as well as additional CSS styles.\n   */\n  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n  /**\n   * The variant to use.\n   * @default 'circular'\n   */\n  variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'extended']), PropTypes.string])\n} : void 0;\nexport default Fab;","import { Fab, Tooltip as MuiTooltip, styled } from '@ori-ui/mui';\nimport { shouldForwardProp, shouldNotForwardProp } from '@ori/presentation-utils';\nexport const Deal = styled('div', {\n  shouldForwardProp: shouldForwardProp()\n})({\n  zIndex: 1\n});\nexport const CIRCLE_SIZE = 45;\nconst CIRCLE_SIZE_SMALL = 35;\nconst FONT_SIZE = '2.9rem';\nconst FONT_SIZE_SUPER_SMALL = '2rem';\nconst FONT_SIZE_OFFER_SMALL = '2.3rem';\nexport const Root = styled('div', {\n  shouldForwardProp: shouldForwardProp()\n})(({\n  isOffer,\n  isSuper,\n  offerLabelSmallerOnMobile,\n  theme\n}) => ({\n  alignItems: 'center',\n  background: theme.palette.offer.light,\n  borderRadius: '50%',\n  color: theme.palette.offer.main,\n  display: 'flex',\n  fontSize: FONT_SIZE,\n  fontWeight: theme.typography.fontWeightBold,\n  height: CIRCLE_SIZE,\n  justifyContent: 'center',\n  position: 'relative',\n  width: CIRCLE_SIZE,\n  ...(isSuper && offerLabelSmallerOnMobile && {\n    fontSize: FONT_SIZE_SUPER_SMALL,\n    height: CIRCLE_SIZE_SMALL,\n    width: CIRCLE_SIZE_SMALL\n  }),\n  ...(isOffer && offerLabelSmallerOnMobile && {\n    fontSize: FONT_SIZE_OFFER_SMALL,\n    height: CIRCLE_SIZE_SMALL,\n    width: CIRCLE_SIZE_SMALL\n  }),\n  [theme.breakpoints.up('md')]: {\n    fontSize: FONT_SIZE,\n    height: CIRCLE_SIZE,\n    width: CIRCLE_SIZE\n  }\n}));\nexport const Tooltip = styled(MuiTooltip)(() => ({\n  borderRadius: '100%',\n  maxWidth: 300,\n  textAlign: 'left',\n  zIndex: 2\n}));\nexport const TooltipFab = styled(Fab, {\n  shouldForwardProp: shouldNotForwardProp(['offerLabelSmallerOnMobile'])\n})(({\n  offerLabelSmallerOnMobile,\n  theme\n}) => ({\n  boxShadow: 'none',\n  height: 'inherit',\n  minHeight: 'unset',\n  width: 'inherit',\n  svg: {\n    fontSize: offerLabelSmallerOnMobile ? FONT_SIZE_OFFER_SMALL : FONT_SIZE\n  },\n  [theme.breakpoints.up('md')]: {\n    svg: {\n      fontSize: FONT_SIZE\n    }\n  }\n}));\nexport const CatalogueLink = styled('a')(() => ({\n  textDecoration: 'underline'\n}));\n//# sourceMappingURL=styles.js.map","import { ClickAwayListener, Typography } from '@ori-ui/mui';\nimport { useDisclose } from '@ori/presentation-hooks';\nimport { useCallback } from 'react';\nimport { CATALOGUE_OFFER_TOOLTIP } from '../../common';\nimport { Tooltip, TooltipFab } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst OFFER_TOOLTIP_LEAVE_DELAY = 2000;\nexport const CatalogueOfferTooltip = ({\n  children,\n  offerLabelSmallerOnMobile,\n  title\n}) => {\n  const {\n    onClose,\n    onOpen,\n    onToggle,\n    open\n  } = useDisclose();\n  const toggleTooltip = useCallback(e => {\n    e.preventDefault();\n    onToggle();\n  }, [onToggle]);\n  return /*#__PURE__*/_jsx(ClickAwayListener, {\n    mouseEvent: false,\n    onClickAway: onClose,\n    children: /*#__PURE__*/_jsx(Tooltip, {\n      disableTouchListener: true,\n      leaveDelay: OFFER_TOOLTIP_LEAVE_DELAY,\n      open: open,\n      placement: \"bottom-start\",\n      PopperProps: {\n        disablePortal: true\n      },\n      title: /*#__PURE__*/_jsx(Typography, {\n        children: title\n      }),\n      \"data-testid\": CATALOGUE_OFFER_TOOLTIP,\n      onClose: onClose,\n      onOpen: onOpen,\n      children: /*#__PURE__*/_jsx(TooltipFab, {\n        disableRipple: true,\n        offerLabelSmallerOnMobile: offerLabelSmallerOnMobile,\n        onTouchEnd: toggleTooltip,\n        children: children\n      })\n    })\n  });\n};\n//# sourceMappingURL=CatalogueOfferTooltip.js.map","import { CatalogueOfferTooltip } from './CatalogueOfferTooltip';\nimport { CatalogueLink } from './styles';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const CatalogueOfferLabel = ({\n  tooltipTitle,\n  catalogueLabel,\n  catalogueUrl,\n  children,\n  offerLabelSmallerOnMobile\n}) => {\n  if (catalogueLabel && catalogueUrl) {\n    return /*#__PURE__*/_jsx(CatalogueOfferTooltip, {\n      offerLabelSmallerOnMobile: offerLabelSmallerOnMobile,\n      title: /*#__PURE__*/_jsxs(_Fragment, {\n        children: [`${tooltipTitle} `, /*#__PURE__*/_jsx(CatalogueLink, {\n          href: catalogueUrl,\n          children: catalogueLabel\n        })]\n      }),\n      children: children\n    });\n  }\n  return /*#__PURE__*/_jsx(CatalogueOfferTooltip, {\n    title: tooltipTitle,\n    children: children\n  });\n};\n//# sourceMappingURL=CatalogueOfferLabel.js.map","import { DiscountTagFilled, SuperdealFilled } from '@ori-ui/icons';\nimport { Chip } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport { LABEL_NEW, LABEL_OFFER, LABEL_SUPER_DEAL, NEW_EDITION_LABEL, NEW_EDITION_AVAILABLE_LABEL } from '../../common';\nimport { CatalogueOfferLabel } from './CatalogueOfferLabel';\nimport { Root } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const InnerDealLabel = ({\n  label,\n  type,\n  catalogueLabel,\n  catalogueUrl,\n  offerLabelSmallerOnMobile,\n  productCode,\n  tooltipTitle,\n  size = 'medium'\n}) => {\n  const {\n    getTestId\n  } = useTestId();\n  if (type === 'Offer' && tooltipTitle) {\n    return /*#__PURE__*/_jsx(CatalogueOfferLabel, {\n      catalogueLabel: catalogueLabel,\n      catalogueUrl: catalogueUrl,\n      offerLabelSmallerOnMobile: offerLabelSmallerOnMobile,\n      tooltipTitle: tooltipTitle,\n      children: /*#__PURE__*/_jsx(Root, {\n        isSuper: true,\n        \"aria-label\": label ?? undefined,\n        offerLabelSmallerOnMobile: offerLabelSmallerOnMobile,\n        \"data-testid\": `${getTestId(LABEL_OFFER)}-${productCode}`,\n        children: /*#__PURE__*/_jsx(DiscountTagFilled, {})\n      })\n    });\n  }\n  switch (type) {\n    case 'Offer':\n      return /*#__PURE__*/_jsx(Root, {\n        isOffer: true,\n        offerLabelSmallerOnMobile: offerLabelSmallerOnMobile,\n        \"data-testid\": `${getTestId(LABEL_OFFER)}-${productCode}`,\n        title: label ?? undefined,\n        children: /*#__PURE__*/_jsx(DiscountTagFilled, {\n          fontSize: \"inherit\"\n        })\n      });\n    case 'SuperDeal':\n      return /*#__PURE__*/_jsx(Root, {\n        isSuper: true,\n        offerLabelSmallerOnMobile: offerLabelSmallerOnMobile,\n        \"data-testid\": `${getTestId(LABEL_SUPER_DEAL)}-${productCode}`,\n        title: label ?? undefined,\n        children: /*#__PURE__*/_jsx(SuperdealFilled, {\n          fontSize: \"inherit\"\n        })\n      });\n    case 'NewEditionAvailable':\n      return /*#__PURE__*/_jsx(Chip, {\n        label: label,\n        size: size,\n        color: \"primary\",\n        \"data-testid\": `${getTestId(NEW_EDITION_AVAILABLE_LABEL)}-${productCode}`\n      });\n    case 'NewEdition':\n      return /*#__PURE__*/_jsx(Chip, {\n        label: label,\n        size: size,\n        color: \"primary\",\n        \"data-testid\": `${getTestId(NEW_EDITION_LABEL)}-${productCode}`\n      });\n    case 'New':\n      return /*#__PURE__*/_jsx(Chip, {\n        label: label,\n        size: size,\n        color: \"primary\",\n        \"data-testid\": `${getTestId(LABEL_NEW)}-${productCode}`\n      });\n    default:\n      return null;\n  }\n};\n//# sourceMappingURL=InnerDealLabel.js.map","import { styled } from '@ori-ui/mui';\nimport { DealLabel } from '@ori/presentation-components';\nimport { shouldForwardProp } from '@ori/presentation-utils';\nexport const PointsAndLabelsWrapper = styled('div')({\n  display: 'flex',\n  flexDirection: 'column',\n  position: 'absolute',\n  top: 0,\n  width: '100%'\n});\nexport const Points = styled('div', {\n  shouldForwardProp: shouldForwardProp()\n})(({\n  theme,\n  background\n}) => ({\n  alignItems: 'center',\n  background: background === 'dark' ? theme.palette.primary.main : theme.palette.grey[200],\n  borderRadius: '50%',\n  color: background === 'dark' ? theme.palette.text.primary : theme.palette.grey.A400,\n  display: 'flex',\n  fontSize: '1.4rem',\n  fontWeight: theme.typography.fontWeightBold,\n  height: 35,\n  justifyContent: 'center',\n  left: 10,\n  position: 'absolute',\n  top: 10,\n  width: 35,\n  zIndex: 1,\n  [theme.breakpoints.up('sm')]: {\n    fontSize: '1.8rem',\n    height: 45,\n    width: 45\n  }\n}));\nexport const Deal = styled(DealLabel)(({\n  theme\n}) => ({\n  margin: theme.spacing(3, 3, 0, 3)\n}));\n//# sourceMappingURL=styles.js.map","import useTestId from '@ori/testid-generator';\nimport { DEAL_LABEL } from '../../common';\nimport { InnerDealLabel } from './InnerDealLabel';\nimport { isDealLabel } from './isDealLabel';\nimport { Deal } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DealLabel = ({\n  label,\n  type,\n  catalogueLabel,\n  catalogueUrl,\n  className,\n  offerLabelSmallerOnMobile,\n  productCode,\n  tooltipTitle,\n  size\n}) => {\n  const {\n    getTestId\n  } = useTestId();\n  if (!isDealLabel(type) || !label) {\n    return null;\n  }\n  return /*#__PURE__*/_jsx(Deal, {\n    className: className,\n    \"data-testid\": `${getTestId(DEAL_LABEL)}-${productCode}`,\n    children: /*#__PURE__*/_jsx(InnerDealLabel, {\n      catalogueLabel: catalogueLabel,\n      catalogueUrl: catalogueUrl,\n      label: label,\n      offerLabelSmallerOnMobile: offerLabelSmallerOnMobile,\n      productCode: productCode,\n      tooltipTitle: tooltipTitle,\n      type: type,\n      size: size\n    })\n  });\n};\n//# sourceMappingURL=DealLabel.js.map","import { isDealLabel } from '@ori/presentation-components';\nimport useTestId from '@ori/testid-generator';\nimport { useProduct } from '../../hooks/internal';\nimport { getPointsBackground } from '../../utils/internal';\nimport { Deal, Points, PointsAndLabelsWrapper } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PointsOrDealLabel = () => {\n  const {\n    getTestId\n  } = useTestId();\n  const {\n    code,\n    labels,\n    points\n  } = useProduct();\n  const {\n    background,\n    currency,\n    productPoints,\n    userPoints\n  } = points ?? {};\n  if (productPoints != null && currency == null) {\n    return /*#__PURE__*/_jsx(PointsAndLabelsWrapper, {\n      children: /*#__PURE__*/_jsx(Points, {\n        background: getPointsBackground({\n          background,\n          productPoints,\n          userPoints\n        }),\n        \"data-testid\": `${getTestId('points')}-${code}`,\n        children: productPoints\n      })\n    });\n  }\n  const {\n    labelKey = null,\n    title = null\n  } = labels?.deal ?? {};\n  if (isDealLabel(labelKey) && title) {\n    return /*#__PURE__*/_jsx(PointsAndLabelsWrapper, {\n      children: /*#__PURE__*/_jsx(Deal, {\n        offerLabelSmallerOnMobile: true,\n        label: title,\n        type: labelKey,\n        productCode: code\n      })\n    });\n  }\n  return null;\n};\n//# sourceMappingURL=PointsOrDealLabel.js.map","export const Name = 'open-shade-picker';\nexport const OpenFeedShadePicker = Name;\nexport let ShadePickerMode = /*#__PURE__*/function (ShadePickerMode) {\n  ShadePickerMode[\"Favorites\"] = \"favorites\";\n  ShadePickerMode[\"QuickBuy\"] = \"quickBuy\";\n  return ShadePickerMode;\n}({});\n//# sourceMappingURL=event.js.map","export const QUICK_BUY = 'quick-buy';\nexport const QUICK_BUY_LOADING_ICON = 'QuickBuySuccessIcon';\nexport const QUICK_BUY_OUTLINED_ICON = 'QuickBuyOutlinedIcon';\nexport const QUICK_BUY_OUTLINED_CN_ICON = 'QuickBuyOutlinedCnIcon';\nexport const QUICK_BUY_FILLED_ICON = 'QuickBuyFilledIcon';\nexport const QUICK_BUY_FILLED_CN_ICON = 'QuickBuyFilledCnIcon';\nexport const QUICK_BUY_BUTTON_STATE_DEFAULT = 'default';\nexport const QUICK_BUY_BUTTON_STATE_ERROR = 'error';\nexport const QUICK_BUY_BUTTON_STATE_LOADING = 'loading';\nexport const QUICK_BUY_BUTTON_STATE_SUCCESS = 'success';\nexport const QUICK_BUY_BUTTON_STATE_WAITING = 'waiting';\nexport const ICON_BUTTON_SIZE = 45;\nexport const ICON_BUTTON_PHONE_SIZE = 35;\nexport const ICON_BUTTON_SKELETON = 'IconButtonSkeleton';\n//# sourceMappingURL=quickBuyButton.js.map","export let Markets = /*#__PURE__*/function (Markets) {\n  Markets[\"CN\"] = \"cn\";\n  return Markets;\n}({});\nexport const getQuickBuyColor = ({\n  tenant,\n  disabled,\n  theme\n}) => {\n  if (disabled) {\n    return theme.palette.action.disabled;\n  }\n  return tenant === Markets.CN ? theme.palette.superApp.main : theme.palette.text.primary;\n};\n//# sourceMappingURL=helpers.js.map","import { useEffect } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- GlobalEvent type is generic\n\n/**\n * Custom hook that registers global event listeners on the window object when the component mounts,\n * and removes them when the component unmounts.\n *\n * @example\n * ```typescript\n * useGlobalEvents([\n *   { name: 'click', listener: (event: MouseEvent) => console.log(event) },\n *   { name: 'keydown', listener: (event: KeyboardEvent) => console.log(event.key) },\n * ]);\n * ```\n */\nexport const useGlobalEvents = events => {\n  useEffect(() => {\n    const controller = new AbortController();\n    const {\n      signal\n    } = controller;\n    events.forEach(({\n      name,\n      listener,\n      options\n    }) => {\n      const finalOptions = typeof options === 'object' ? {\n        ...options,\n        signal\n      } : {\n        capture: options,\n        signal\n      };\n      window.addEventListener(name, listener, finalOptions);\n    });\n    return () => {\n      controller.abort();\n    };\n  }, [events]);\n};\n//# sourceMappingURL=useGlobalEvents.js.map","export const getDesktopSize = desktopSize => ({\n  ...(desktopSize === 'small' ? {\n    height: 20,\n    width: 20,\n    fontSize: '1.4rem'\n  } : {}),\n  ...(desktopSize === 'medium' ? {\n    height: 36,\n    width: 36,\n    fontSize: '2.4rem'\n  } : {}),\n  ...(desktopSize === 'large' ? {\n    height: 45,\n    width: 45,\n    fontSize: '2.7rem'\n  } : {})\n});\n//# sourceMappingURL=getDesktopSize.js.map","import { IconButton } from '@ori-ui/components';\nimport { keyframes, styled, svgIconClasses } from '@ori-ui/mui';\nimport { shouldNotForwardProp } from '@ori/presentation-utils';\nimport { QUICK_BUY_BUTTON_STATE_LOADING, QUICK_BUY_BUTTON_STATE_SUCCESS, QUICK_BUY_BUTTON_STATE_WAITING } from '../../common';\nimport { getDesktopSize } from '../../utils';\nimport { getQuickBuyColor, Markets } from './helpers';\nconst rotating = keyframes`\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n`;\nexport const Root = styled(IconButton, {\n  name: 'QuickBuyRoot',\n  shouldForwardProp: shouldNotForwardProp(['desktopSize', 'state', 'tenant'])\n})(({\n  desktopSize,\n  hidden,\n  state,\n  tenant,\n  theme,\n  disabled\n}) => ({\n  visibility: hidden ? 'hidden' : 'visible',\n  color: getQuickBuyColor({\n    disabled,\n    tenant,\n    theme\n  }),\n  '& svg': {\n    fill: getQuickBuyColor({\n      disabled,\n      tenant,\n      theme\n    })\n  },\n  '&:hover': {\n    color: tenant === Markets.CN ? theme.palette.superApp.dark : theme.palette.default.main,\n    '& svg': {\n      fill: tenant === Markets.CN ? theme.palette.superApp.dark : theme.palette.default.main\n    }\n  },\n  [theme.breakpoints.up('sm')]: {\n    ...getDesktopSize(desktopSize)\n  },\n  ...(state === QUICK_BUY_BUTTON_STATE_LOADING ? {\n    cursor: 'default',\n    [`.${svgIconClasses.root}`]: {\n      animation: `${rotating} 1s linear infinite`\n    },\n    [`.${svgIconClasses.root} path`]: {\n      fill: tenant === Markets.CN ? theme.palette.superApp.dark : theme.palette.default.main\n    }\n  } : {}),\n  ...(state === QUICK_BUY_BUTTON_STATE_SUCCESS || state === QUICK_BUY_BUTTON_STATE_WAITING ? {\n    cursor: 'default'\n  } : {})\n}));\n//# sourceMappingURL=styles.js.map","import * as AddToBasketEvent from '@ori-events/add-to-basket';\nimport { EmptyBasket, AddToBag, AddToBagFilled, OriflameSpinner, EmptyBasketFilled } from '@ori-ui/icons';\nimport useTestId from '@ori/testid-generator';\nimport { useCallback, useState } from 'react';\nimport { QUICK_BUY_BUTTON_STATE_DEFAULT, QUICK_BUY_BUTTON_STATE_LOADING, QUICK_BUY_BUTTON_STATE_SUCCESS, QUICK_BUY_FILLED_CN_ICON, QUICK_BUY_FILLED_ICON, QUICK_BUY_LOADING_ICON, QUICK_BUY_OUTLINED_CN_ICON, QUICK_BUY_OUTLINED_ICON } from '../../common';\nimport { Markets } from './helpers';\nimport { useOnClickEvent, useQuickBuyEvents } from './hooks';\nimport { Root } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst renderIcon = (state, tenant, hover) => {\n  switch (state) {\n    case QUICK_BUY_BUTTON_STATE_LOADING:\n      return /*#__PURE__*/_jsx(OriflameSpinner, {\n        \"data-testid\": QUICK_BUY_LOADING_ICON,\n        fontSize: \"inherit\"\n      });\n    case QUICK_BUY_BUTTON_STATE_SUCCESS:\n      if (tenant === Markets.CN) {\n        return /*#__PURE__*/_jsx(EmptyBasketFilled, {\n          \"data-testid\": QUICK_BUY_FILLED_CN_ICON,\n          fontSize: \"inherit\"\n        });\n      }\n      return /*#__PURE__*/_jsx(AddToBagFilled, {\n        \"data-testid\": QUICK_BUY_FILLED_ICON,\n        fontSize: \"inherit\"\n      });\n    default:\n      if (hover) {\n        if (tenant === Markets.CN) {\n          return /*#__PURE__*/_jsx(EmptyBasketFilled, {\n            \"data-testid\": QUICK_BUY_FILLED_CN_ICON,\n            fontSize: \"inherit\"\n          });\n        }\n        return /*#__PURE__*/_jsx(AddToBagFilled, {\n          \"data-testid\": QUICK_BUY_FILLED_ICON,\n          fontSize: \"inherit\"\n        });\n      }\n      if (tenant === Markets.CN) {\n        return /*#__PURE__*/_jsx(EmptyBasket, {\n          \"data-testid\": QUICK_BUY_OUTLINED_CN_ICON,\n          fontSize: \"inherit\"\n        });\n      }\n      return /*#__PURE__*/_jsx(AddToBag, {\n        \"data-testid\": QUICK_BUY_OUTLINED_ICON,\n        fontSize: \"inherit\"\n      });\n  }\n};\nexport const QuickBuyButton = ({\n  addToBasketMethod,\n  currentPrice,\n  currentProductCode,\n  lineNumber,\n  name,\n  originalItemCode,\n  placement,\n  position,\n  tenant = '',\n  hasAutoSubscription,\n  isMultiShade,\n  onQuickBuyButtonClick,\n  ...restProps\n}) => {\n  const [state, setState] = useState(QUICK_BUY_BUTTON_STATE_DEFAULT);\n  const {\n    getTestId\n  } = useTestId();\n  useQuickBuyEvents({\n    currentProductCode,\n    setState\n  });\n  const onClickEvent = useOnClickEvent({\n    addToBasketMethod,\n    currentPrice,\n    currentProductCode,\n    lineNumber,\n    name,\n    originalItemCode,\n    placement,\n    position,\n    isMultiShade,\n    hasAutoSubscription,\n    onQuickBuyButtonClick\n  });\n  const dispatchOnClickEvent = useCallback(() => {\n    if (onClickEvent instanceof CustomEvent) {\n      if (onClickEvent.type === AddToBasketEvent.Name) {\n        setState(QUICK_BUY_BUTTON_STATE_LOADING);\n      }\n      window.dispatchEvent(onClickEvent);\n    }\n  }, [onClickEvent]);\n  const onClick = useCallback(event => {\n    event.preventDefault();\n    event.stopPropagation();\n    if (onClickEvent instanceof CustomEvent && state === QUICK_BUY_BUTTON_STATE_DEFAULT) {\n      if (onQuickBuyButtonClick) {\n        onQuickBuyButtonClick({\n          event: onClickEvent,\n          initialState: state,\n          setState\n        });\n      } else {\n        dispatchOnClickEvent();\n      }\n    }\n  }, [dispatchOnClickEvent, onClickEvent, onQuickBuyButtonClick, state]);\n  return /*#__PURE__*/_jsx(Root, {\n    \"data-testid\": `${getTestId('quick-buy')}-${currentProductCode}`,\n    color: \"default\",\n    hoverIcon: renderIcon(state, tenant, true),\n    size: \"large\",\n    state: state,\n    tenant: tenant,\n    variant: \"contained\",\n    onClick: onClick,\n    ...restProps,\n    children: renderIcon(state, tenant, false)\n  });\n};\n//# sourceMappingURL=QuickBuyButton.js.map","import * as AddBackorderDemandEvent from '@ori-events/add-backorder-demand';\nimport * as AddToBasketEvent from '@ori-events/add-to-basket';\nimport * as AddToBasketFailedEvent from '@ori-events/add-to-basket-failed';\nimport * as BasketUpdatedEvent from '@ori-events/basket-updated';\nimport * as LoyaltyDialogResultEvent from '@ori-events/loyalty-dialog-result';\nimport * as OpenProductInfoDialog from '@ori-events/open-product-info-dialog';\nimport * as OpenShadePicker from '@ori-events/open-shade-picker';\nimport { useGlobalEvents } from '@ori/presentation-hooks';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { QUICK_BUY_BUTTON_STATE_DEFAULT, QUICK_BUY_BUTTON_STATE_ERROR, QUICK_BUY_BUTTON_STATE_LOADING, QUICK_BUY_BUTTON_STATE_SUCCESS, QUICK_BUY_BUTTON_STATE_WAITING } from '../../common';\nexport const useOnClickEvent = ({\n  addToBasketMethod,\n  currentPrice,\n  currentProductCode,\n  lineNumber,\n  name,\n  placement,\n  originalItemCode,\n  position,\n  hasAutoSubscription,\n  isMultiShade\n}) => {\n  const event = useMemo(() => {\n    if (hasAutoSubscription) {\n      return new CustomEvent(OpenProductInfoDialog.Name, {\n        detail: {\n          mode: OpenProductInfoDialog.DialogMode.StandardBuy,\n          placement,\n          productCodes: [currentProductCode]\n        }\n      });\n    } else if (isMultiShade) {\n      return new CustomEvent(OpenShadePicker.Name, {\n        detail: {\n          placement,\n          productCode: currentProductCode\n        }\n      });\n    } else if (lineNumber == null) {\n      return new CustomEvent(AddToBasketEvent.Name, {\n        detail: {\n          formattedPrice: currentPrice,\n          itemCode: currentProductCode,\n          localName: name,\n          method: addToBasketMethod,\n          originalItemCode,\n          placement,\n          position,\n          quantity: 1\n        }\n      });\n    }\n    return new CustomEvent(AddBackorderDemandEvent.Name, {\n      detail: {\n        formattedPrice: currentPrice,\n        itemCode: currentProductCode,\n        lineNumber,\n        localName: name,\n        placement,\n        position,\n        quantity: 1\n      }\n    });\n  }, [addToBasketMethod, currentPrice, currentProductCode, hasAutoSubscription, isMultiShade, lineNumber, name, originalItemCode, placement, position]);\n  return event;\n};\nexport const useQuickBuyEvents = ({\n  currentProductCode,\n  setState\n}) => {\n  const timeoutRef = useRef();\n  const clearAndResetState = useCallback((state, delay) => {\n    clearTimeout(timeoutRef.current);\n    setState(state);\n    timeoutRef.current = setTimeout(() => setState(QUICK_BUY_BUTTON_STATE_DEFAULT), delay);\n  }, [setState]);\n  const eventHandlers = useMemo(() => [{\n    name: AddToBasketEvent.Name,\n    listener: ({\n      detail\n    }) => {\n      if (detail.itemCode === currentProductCode) {\n        setState(QUICK_BUY_BUTTON_STATE_LOADING);\n      } else {\n        setState(QUICK_BUY_BUTTON_STATE_WAITING);\n      }\n    }\n  }, {\n    name: AddToBasketFailedEvent.Name,\n    listener: () => {\n      clearAndResetState(QUICK_BUY_BUTTON_STATE_ERROR, 300);\n    }\n  }, {\n    name: BasketUpdatedEvent.Name,\n    listener: ({\n      detail\n    }) => {\n      if (detail.lastAddedItem?.itemCode === currentProductCode) {\n        clearAndResetState(QUICK_BUY_BUTTON_STATE_SUCCESS, 3000);\n      } else {\n        setState(QUICK_BUY_BUTTON_STATE_DEFAULT);\n      }\n    }\n  }, {\n    name: LoyaltyDialogResultEvent.Name,\n    listener: ({\n      detail\n    }) => {\n      if (detail.result === LoyaltyDialogResultEvent.LoyaltyDialogResults.CLOSE) {\n        setState(QUICK_BUY_BUTTON_STATE_DEFAULT);\n      }\n    }\n  }], [clearAndResetState, currentProductCode, setState]);\n  useGlobalEvents(eventHandlers);\n  useEffect(() => () => {\n    clearTimeout(timeoutRef.current);\n  }, []);\n};\n//# sourceMappingURL=hooks.js.map","export const Name = 'product-box-disabled-quickbuy-clicked';\nexport const ProductBoxDisabledQuickBuyClicked = Name;\n//# sourceMappingURL=index.js.map","/* istanbul ignore file */\n\n/**\n * DO NOT EDIT!\n * This file was autogenerated by npm script `localizations-codegen`.\n * Changes may cause incorrect behavior and will be lost when the file is regenerated.\n *\n * Run `npx localizations-codegen` to regenerate.\n */\nimport { useTranslationsFromNamespace } from '@ori/i18n';\n/**\n * A hook for accessing translations within a specific namespace along with a formatting function.\n *\n * @returns The translations within the specified namespace and a formatting function.\n */\nexport const useTranslations = () => useTranslationsFromNamespace();\n//# sourceMappingURL=useTranslations.js.map","import { IconButton } from '@ori-ui/components';\nimport { styled } from '@ori-ui/mui';\nimport { shouldForwardProp, shouldNotForwardProp } from '@ori/presentation-utils';\nexport const IconWrapper = styled('div', {\n  shouldForwardProp: shouldForwardProp()\n})(({\n  theme,\n  position = 'bottom'\n}) => ({\n  bottom: position === 'bottom' ? theme.spacing(2) : 'initial',\n  top: position === 'top' ? theme.spacing(2) : 'initial',\n  display: 'flex',\n  flexDirection: 'column-reverse',\n  position: 'absolute',\n  right: theme.spacing(2),\n  zIndex: 2,\n  gap: theme.spacing(1),\n  [theme.breakpoints.up('sm')]: {\n    gap: theme.spacing(2)\n  }\n}));\nexport const IconButtonWithFixedSize = styled(IconButton, {\n  shouldForwardProp: shouldNotForwardProp(['buttonSize', 'iconSize'])\n})(({\n  buttonSize,\n  iconSize,\n  theme\n}) => ({\n  height: buttonSize,\n  width: buttonSize,\n  '& svg': {\n    fontSize: iconSize\n  },\n  [theme.breakpoints.up('sm')]: {\n    height: buttonSize,\n    width: buttonSize,\n    '& svg': {\n      fontSize: iconSize\n    }\n  }\n}));\nexport const QuantityPickerWrapper = styled('div')(({\n  theme\n}) => ({\n  bottom: theme.spacing(2),\n  padding: theme.spacing(0, 2),\n  position: 'absolute',\n  right: 0,\n  width: '100%',\n  zIndex: 2\n}));\nexport const NotifyMeIconButton = styled(IconButton)(({\n  theme\n}) => ({\n  [theme.breakpoints.up('sm')]: {\n    height: 45,\n    width: 45,\n    fontSize: '2.7rem'\n  }\n}));\n//# sourceMappingURL=styles.js.map","import * as OpenBackInStockNotificationDialog from '@ori-events/open-back-in-stock-notification-dialog';\nimport { NotificationFilled, Notification } from '@ori-ui/icons';\nimport useTestId from '@ori/testid-generator';\nimport { useCallback } from 'react';\nimport { NOTIFICATION, NOTIFICATION_FILLED, NOTIFY_ME } from '../../constants';\nimport { NotifyMeIconButton } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const NotifyMe = ({\n  code,\n  disabled,\n  onNotifyMeButtonClick\n}) => {\n  const {\n    getTestId\n  } = useTestId();\n  const onClickHandler = useCallback(event => {\n    event.preventDefault();\n    event.stopPropagation();\n    if (onNotifyMeButtonClick) {\n      onNotifyMeButtonClick();\n    } else {\n      window.dispatchEvent(new CustomEvent(OpenBackInStockNotificationDialog.Name, {\n        detail: {\n          code\n        }\n      }));\n    }\n  }, [code, onNotifyMeButtonClick]);\n  return /*#__PURE__*/_jsx(NotifyMeIconButton, {\n    \"data-testid\": `${getTestId(NOTIFY_ME)}-${code}`,\n    color: \"default\",\n    disabled: disabled,\n    hoverIcon: /*#__PURE__*/_jsx(NotificationFilled, {\n      \"data-testid\": getTestId(NOTIFICATION_FILLED),\n      fontSize: \"inherit\"\n    }),\n    size: \"medium\",\n    variant: \"contained\",\n    onClick: onClickHandler,\n    children: /*#__PURE__*/_jsx(Notification, {\n      \"data-testid\": getTestId(NOTIFICATION),\n      fontSize: \"inherit\"\n    })\n  });\n};\n//# sourceMappingURL=NotifyMe.js.map","import { ClickAwayListener, Tooltip } from '@ori-ui/mui';\nimport { QuickBuyButton } from '@ori/presentation-components';\nimport { useDisclose } from '@ori/presentation-hooks';\nimport { useProduct } from '../../hooks/internal';\nimport { useQuickBuyButtonTooltipHandlers } from '../../hooks/internal/useQuickBuyButtonTooltipHandlers';\nimport { useTranslations } from '../../hooks/useTranslations';\nimport { ProductBoxMode } from '../../models';\nimport { NotifyMe } from './NotifyMe';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const BuyOrNotifyMe = () => {\n  const {\n    addToBasketMethod,\n    analyticsData,\n    buttons,\n    code,\n    name,\n    price,\n    tenant,\n    quantityPicker,\n    isMultiShade,\n    hasAutoSubscription,\n    onQuickBuyButtonClick,\n    onNotifyMeButtonClick,\n    mode\n  } = useProduct();\n  const {\n    notifyMe,\n    quickBuy: quickBuyButton\n  } = buttons ?? {};\n  const {\n    translations\n  } = useTranslations();\n  const onQuickBuyClick = onQuickBuyButtonClick ? () => onQuickBuyButtonClick({\n    newValue: 1,\n    id: code,\n    source: 'increase'\n  }) : undefined;\n  const {\n    open,\n    onClose,\n    onToggle\n  } = useDisclose();\n  const {\n    onQuickBuyButtonClick: onQuickBuyButtonWithTooltipClick\n  } = useQuickBuyButtonTooltipHandlers({\n    onClose,\n    onToggle,\n    open\n  });\n  if (quickBuyButton?.visible) {\n    return /*#__PURE__*/_jsx(ClickAwayListener, {\n      onClickAway: onClose,\n      children: /*#__PURE__*/_jsx(Tooltip, {\n        title: quickBuyButton.disabled ? quantityPicker?.tooltipMaxText : null,\n        open: open,\n        placement: \"top\",\n        children: /*#__PURE__*/_jsx(\"div\", {\n          ...(quickBuyButton.disabled ? {\n            role: 'button',\n            tabIndex: 0,\n            onClick: onQuickBuyButtonWithTooltipClick,\n            onKeyDown: onClose\n          } : {}),\n          children: /*#__PURE__*/_jsx(QuickBuyButton, {\n            \"aria-label\": translations.quickBuy,\n            currentPrice: price?.currentFormatted ?? '',\n            currentProductCode: code,\n            disabled: quickBuyButton.disabled,\n            name: name,\n            addToBasketMethod: addToBasketMethod,\n            placement: analyticsData?.placement,\n            position: analyticsData?.position,\n            size: \"medium\",\n            desktopSize: \"large\",\n            tenant: tenant,\n            hidden: quantityPicker?.visible,\n            hasAutoSubscription: hasAutoSubscription,\n            isMultiShade: mode === ProductBoxMode.Concept ? isMultiShade : false,\n            onQuickBuyButtonClick: quickBuyButton.trigger ? onQuickBuyClick : undefined\n          })\n        })\n      })\n    });\n  }\n  if (notifyMe?.visible) {\n    return /*#__PURE__*/_jsx(NotifyMe, {\n      code: code,\n      disabled: notifyMe.disabled,\n      onNotifyMeButtonClick: notifyMe.trigger ? onNotifyMeButtonClick : undefined\n    });\n  }\n  return null;\n};\n//# sourceMappingURL=BuyOrNotifyMe.js.map","import * as ProductBoxDisabledQuickBuyClicked from '@ori-events/product-box-disabled-quickbuy-clicked';\nimport { useGlobalEvents } from '@ori/presentation-hooks';\nimport { useCallback, useMemo } from 'react';\nimport { useProduct } from './useProduct';\nexport const useQuickBuyButtonTooltipHandlers = ({\n  onClose,\n  onToggle,\n  open\n}) => {\n  const {\n    code,\n    quantityPicker,\n    buttons\n  } = useProduct();\n  const {\n    quickBuy: quickBuyButton\n  } = buttons ?? {};\n  const onOtherDisabledQuickBuyClick = useCallback(({\n    detail\n  }) => {\n    if (detail.productCode === code) {\n      return;\n    }\n    onClose();\n  }, [code, onClose]);\n  const onQuickBuyButtonClick = useCallback(() => {\n    if (quickBuyButton?.disabled && Boolean(quantityPicker?.tooltipMaxText && !open)) {\n      window.dispatchEvent(new CustomEvent(ProductBoxDisabledQuickBuyClicked.Name, {\n        detail: {\n          productCode: code\n        }\n      }));\n    }\n    onToggle();\n  }, [code, onToggle, open, quantityPicker?.tooltipMaxText, quickBuyButton?.disabled]);\n  const events = useMemo(() => [{\n    name: ProductBoxDisabledQuickBuyClicked.Name,\n    listener: onOtherDisabledQuickBuyClick\n  }], [onOtherDisabledQuickBuyClick]);\n  useGlobalEvents(events);\n  return {\n    onQuickBuyButtonClick\n  };\n};\n//# sourceMappingURL=useQuickBuyButtonTooltipHandlers.js.map","import { FavoritesHeartIconButton } from '@ori/favorites-heart';\nimport useTestId from '@ori/testid-generator';\nimport { FAVORITE } from '../../constants';\nimport { useTranslations } from '../../hooks/useTranslations';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Favorites = ({\n  analyticsData,\n  code,\n  disabled,\n  onFavoritesButtonClick,\n  shades\n}) => {\n  const {\n    translations\n  } = useTranslations();\n  const {\n    getTestId\n  } = useTestId();\n  return /*#__PURE__*/_jsx(FavoritesHeartIconButton, {\n    \"aria-label\": translations.favorites,\n    code: code,\n    \"data-testid\": `${getTestId(FAVORITE)}-${code}`,\n    disabled: disabled,\n    placement: analyticsData?.placement,\n    position: analyticsData?.position,\n    shades: shades,\n    size: \"medium\",\n    desktopSize: \"large\",\n    onClick: onFavoritesButtonClick\n  });\n};\nexport default Favorites;\n//# sourceMappingURL=Favorites.js.map","import { useCallback } from 'react';\nimport { useProduct } from '../../hooks/internal';\nimport { openShadePicker } from '../../utils/internal/openShadePicker';\nimport { BuyOrNotifyMe } from './BuyOrNotifyMe';\nimport Favorites from './Favorites';\nimport { IconWrapper } from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const BottomIconButtons = () => {\n  const {\n    analyticsData,\n    buttons,\n    code,\n    shades,\n    onFavoritesButtonClick\n  } = useProduct();\n  const {\n    visible,\n    disabled,\n    trigger\n  } = buttons?.favorites ?? {};\n\n  // istanbul ignore next -- no need to test onClick and preventDefault and stopPropagation\n  const onClick = useCallback(event => {\n    event.preventDefault();\n    event.stopPropagation();\n  }, []);\n  return /*#__PURE__*/_jsxs(IconWrapper, {\n    onClick: onClick,\n    children: [/*#__PURE__*/_jsx(BuyOrNotifyMe, {}), visible ? /*#__PURE__*/_jsx(Favorites, {\n      code: code,\n      disabled: disabled,\n      shades: shades ?? undefined,\n      analyticsData: analyticsData,\n      onFavoritesButtonClick: trigger ? onFavoritesButtonClick ?? openShadePicker(code, analyticsData?.placement) : undefined\n    }) : null]\n  });\n};\n//# sourceMappingURL=BottomIconButtons.js.map","import * as OpenShadePicker from '@ori-events/open-shade-picker';\nimport { ShadePickerMode } from '@ori-events/open-shade-picker';\nexport const openShadePicker = (productCode, placement) => () => window.dispatchEvent(new CustomEvent(OpenShadePicker.Name, {\n  detail: {\n    mode: ShadePickerMode.Favorites,\n    placement,\n    productCode\n  }\n}));\n//# sourceMappingURL=openShadePicker.js.map","import { generateUtilityClass, generateUtilityClasses } from '@ori-ui/mui-bundle/base';\nexport function getStarRatingUtilityClass(slot) {\n  return generateUtilityClass('MuiOriStarRating', slot);\n}\nconst starRatingClasses = generateUtilityClasses('MuiOriStarRating', ['root', 'star', 'textRating', 'emptyStar', 'fullStar', 'halfStar']);\nexport default starRatingClasses;\n//# sourceMappingURL=starRatingClasses.js.map","import { FavouriteFilled } from '@ori-ui/icons';\nimport { unstable_composeClasses as composeClasses } from '@ori-ui/mui-bundle/base';\nimport { useThemeProps, styled } from '@ori-ui/mui-bundle/material';\nimport clsx from 'clsx';\nimport { forwardRef, Fragment, memo, useCallback, useMemo } from 'react';\nimport starRatingClasses, { getStarRatingUtilityClass } from './starRatingClasses';\n\n/**\n * Helper function to round value to one decimal place if necessary.\n * Normal round function rounds to decimal value even if its not necessary.\n * @param num value to be rounded\n * @returns Special rounded value only if needed. 10.4444 => 10.4; 10 => 10\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst roundUtil = (num, decimalPlaces = 1) => {\n  const baseNumber = Number(`${num}e+${decimalPlaces}`);\n  return +`${Math.round(baseNumber)}e-${decimalPlaces}`;\n};\nexport const getStarRatingSlots = _ => ({\n  root: ['root'],\n  star: ['star'],\n  textRating: ['textRating'],\n  emptyStar: ['emptyStar'],\n  fullStar: ['fullStar'],\n  halfStar: ['halfStar']\n});\nconst useUtilityClasses = ownerState => {\n  const {\n    classes\n  } = ownerState;\n  const slots = getStarRatingSlots(ownerState);\n  return composeClasses(slots, getStarRatingUtilityClass, classes);\n};\nconst StarRatingRoot = styled('span', {\n  name: 'MuiOriStarRating',\n  slot: 'Root',\n  overridesResolver: (_, styles) => [styles.root, {\n    [`.${starRatingClasses.textRating}`]: styles.textRating\n  }]\n})(({\n  theme\n}) => ({\n  display: 'flex',\n  alignItems: 'center',\n  gap: '5px',\n  [`.${starRatingClasses.textRating}`]: {\n    fontSize: '75%',\n    marginLeft: '5px',\n    fontWeight: theme.typography.fontWeightMedium,\n    color: theme.palette.grey['700']\n  }\n}));\nconst StarHalfWrap = styled('div', {\n  name: 'MuiOriStarRating',\n  slot: 'HalfStarWrap'\n})({\n  position: 'relative',\n  display: 'flex'\n});\nconst StyledStarIcon = styled(FavouriteFilled, {\n  name: 'MuiOriStarRating',\n  slot: 'Star',\n  shouldForwardProp: prop => prop !== 'starPercentageWidth',\n  overridesResolver: ({\n    ownerState: {\n      starType\n    }\n  }, styles) => [styles.star, styles[`${starType}Star`]]\n})(({\n  theme,\n  ownerState: {\n    starType,\n    starPercentageWidth\n  }\n}) => ({\n  fontSize: '1.46em',\n  // To get rid of mui icon spaces in icons\n  margin: '0 -4px',\n  ...(starType === 'empty' && {\n    color: theme.palette.grey['200']\n  }),\n  ...(starType === 'half' && {\n    position: 'absolute',\n    left: 0,\n    top: 0,\n    // Star is rendered as a whole, we only show part of it. For this we use clip-path css property and rotate after clipping.\n    // Clipping value is not exactly percentage value - its \"100% - somePercentageValue%\"\n    clipPath: `inset(0 0 0 ${100 - (starPercentageWidth ?? 50)}%)`,\n    transform: 'rotateY(180deg)',\n    zIndex: 1\n  }),\n  ...((starType === 'half' || starType === 'full') && {\n    color: theme.palette.default.dark\n  })\n}));\nconst StarRatingItem = /*#__PURE__*/memo(props => /*#__PURE__*/_jsx(StyledStarIcon, {\n  ownerState: props,\n  \"data-star-type\": props.starType,\n  className: props.className\n}));\nconst StarRatingText = /*#__PURE__*/memo(({\n  formattedValue,\n  showTextRating,\n  showVotes,\n  votes\n}) => {\n  if (showVotes) {\n    return /*#__PURE__*/_jsxs(\"span\", {\n      className: starRatingClasses.textRating,\n      children: [\"(\", votes, \")\"]\n    });\n  } else if (showTextRating) {\n    return /*#__PURE__*/_jsxs(\"span\", {\n      className: starRatingClasses.textRating,\n      children: [\"(\", formattedValue, \")\"]\n    });\n  }\n  return null;\n});\nexport const StarRating = /*#__PURE__*/forwardRef((inProps, ref) => {\n  const props = useThemeProps({\n    props: inProps,\n    name: 'MuiOriStarRating'\n  });\n  const {\n    max,\n    value,\n    showTextRating = false,\n    showVotes = false,\n    votes,\n    precise = false,\n    component = 'div',\n    className,\n    ...rest\n  } = props;\n  const stars = useMemo(() => Array.from({\n    length: max\n  }).map((_, index) => index).map(index => {\n    let result = value - index;\n    let halfStarSize = 0;\n    const halfStarCeiling = precise ? 0.9 : 0.5;\n    let starType = 'empty';\n    if (!precise) {\n      // we round to closest 0.5, because we only want 0.5 or full numbers\n      result = Math.round(result / 0.5) * 0.5;\n    }\n    if (result > 0) {\n      if (result <= halfStarCeiling) {\n        starType = 'half';\n      } else {\n        starType = 'full';\n      }\n    }\n    if (starType === 'half') {\n      halfStarSize = 100 * result / 1;\n    }\n    return {\n      starId: index,\n      starType,\n      halfStarSize\n    };\n  }), [max, value, precise]);\n  const classes = useUtilityClasses(props);\n  const formattedValue = useMemo(() => roundUtil(value), [value]);\n  const constructStarClassName = useCallback(starType => clsx(classes[`${starType}Star`], classes.star), [classes]);\n  return /*#__PURE__*/_jsxs(StarRatingRoot, {\n    ref: ref,\n    as: component,\n    title: `${formattedValue}/${max} ★`,\n    className: clsx(classes.root, className),\n    ownerState: props,\n    ...rest,\n    children: [stars.map(({\n      starType,\n      halfStarSize,\n      starId\n    }) => {\n      const starClassName = constructStarClassName(starType);\n      return /*#__PURE__*/_jsxs(Fragment, {\n        children: [(starType === 'full' || starType === 'empty') && /*#__PURE__*/_jsx(StarRatingItem, {\n          className: starClassName,\n          starType: starType\n        }), starType === 'half' && /*#__PURE__*/_jsxs(StarHalfWrap, {\n          ownerState: props,\n          children: [/*#__PURE__*/_jsx(StarRatingItem, {\n            className: starClassName,\n            starPercentageWidth: halfStarSize,\n            starType: starType\n          }), /*#__PURE__*/_jsx(StarRatingItem, {\n            className: constructStarClassName('empty'),\n            starType: \"empty\"\n          })]\n        })]\n      }, starId);\n    }), /*#__PURE__*/_jsx(StarRatingText, {\n      showVotes: showVotes,\n      votes: votes,\n      showTextRating: showTextRating,\n      formattedValue: formattedValue\n    })]\n  });\n});\nexport default StarRating;\n//# sourceMappingURL=StarRating.js.map","import { starRatingClasses, StarRating as Stars } from '@ori-ui/components';\nimport { styled } from '@ori-ui/mui';\nexport const Root = styled('div')(({\n  theme\n}) => ({\n  alignItems: 'center',\n  display: 'flex',\n  gap: theme.spacing(1)\n}));\nexport const StarRating = styled(Stars)(() => ({\n  fontSize: '1.4rem',\n  [`.${starRatingClasses.star}`]: {\n    margin: '0 -3px'\n  }\n}));\n//# sourceMappingURL=styles.js.map","import { Typography } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport { RATING } from '../../constants';\nimport { useProduct } from '../../hooks/internal';\nimport { Root, StarRating } from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const Rating = () => {\n  const {\n    getTestId\n  } = useTestId();\n  const {\n    code,\n    hideRating,\n    rating,\n    ratingCount\n  } = useProduct();\n  if (hideRating) {\n    return null;\n  }\n  return /*#__PURE__*/_jsxs(Root, {\n    children: [/*#__PURE__*/_jsx(StarRating, {\n      value: rating,\n      max: 5,\n      showTextRating: false,\n      \"data-testid\": `${getTestId(RATING)}-${code}`\n    }), /*#__PURE__*/_jsxs(Typography, {\n      variant: \"overline\",\n      color: \"textPrimary\",\n      fontWeight: \"bold\",\n      children: [\"(\", ratingCount, \")\"]\n    })]\n  });\n};\n//# sourceMappingURL=Rating.js.map","export const MAX_VISIBLE_SHADES_COUNT = 6;\nexport const PRODUCT_BOX_SHADE_TEST_ID = 'product-box-shade';\n//# sourceMappingURL=constants.js.map","import { styled, Typography } from '@ori-ui/mui';\nexport const Root = styled('div')(({\n  theme\n}) => ({\n  alignItems: 'center',\n  display: 'flex',\n  gap: theme.spacing(1),\n  height: 14,\n  overflow: 'hidden'\n}));\nexport const Name = styled(Typography)(({\n  theme\n}) => ({\n  color: theme.palette.grey.A700,\n  boxOrient: 'vertical',\n  display: '-webkit-box',\n  lineClamp: 1,\n  overflow: 'hidden',\n  textOverflow: 'ellipsis',\n  WebkitBoxOrient: 'vertical',\n  WebkitLineClamp: 1\n}));\nexport const ShadeWrapper = styled('div')({\n  flexShrink: 0\n});\n//# sourceMappingURL=styles.js.map","import { Shade, ShadeSize } from '@ori/presentation-components';\nimport { useMemo } from 'react';\nimport { useProduct } from '../../../../hooks/internal';\nimport { PRODUCT_BOX_SHADE_TEST_ID } from '../../constants';\nimport { Name, Root, ShadeWrapper } from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ShadeWithName = () => {\n  const {\n    code,\n    shades,\n    isMultiShade\n  } = useProduct();\n  const currentShade = useMemo(() => shades?.find(shade => shade.productCode === code), [code, shades]);\n  if (!currentShade?.shadeName || !isMultiShade) {\n    return null;\n  }\n  return /*#__PURE__*/_jsxs(Root, {\n    children: [/*#__PURE__*/_jsx(ShadeWrapper, {\n      children: /*#__PURE__*/_jsx(Shade, {\n        shade: {\n          canBeSold: true,\n          ...currentShade\n        },\n        size: ShadeSize.Small,\n        testId: PRODUCT_BOX_SHADE_TEST_ID\n      })\n    }), /*#__PURE__*/_jsx(Name, {\n      variant: \"caption\",\n      children: currentShade.shadeName\n    })]\n  });\n};\n//# sourceMappingURL=ShadeWithName.js.map","import { styled } from '@ori-ui/mui';\nexport const ShadesRoot = styled('div')(({\n  theme\n}) => ({\n  alignItems: 'center',\n  display: 'flex',\n  gap: theme.spacing(1),\n  height: 14,\n  overflow: 'hidden'\n}));\nexport const HiddenShadesCount = styled('div')(({\n  theme\n}) => ({\n  color: theme.palette.text.primary,\n  fontSize: '1rem',\n  fontWeight: theme.typography.fontWeightBold\n}));\n//# sourceMappingURL=styles.js.map","import { Shade, ShadeSize } from '@ori/presentation-components';\nimport { useMemo } from 'react';\nimport { PRODUCT_BOX_SHADE_TEST_ID } from '../constants';\nimport { HiddenShadesCount } from '../styles';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nexport const InnerShades = ({\n  maxVisibleShadesCount,\n  shades\n}) => {\n  // istanbul ignore next -- not reachable as root component is not rendered when there are less than 2 shades\n\n  const elements = useMemo(() => shades.slice(0, maxVisibleShadesCount).map(shade => /*#__PURE__*/_jsx(Shade, {\n    shade: {\n      canBeSold: true,\n      ...shade\n    },\n    size: ShadeSize.Small,\n    testId: PRODUCT_BOX_SHADE_TEST_ID\n  }, shade.productCode)), [maxVisibleShadesCount, shades]);\n  return /*#__PURE__*/_jsxs(_Fragment, {\n    children: [elements, shades.length > maxVisibleShadesCount ? /*#__PURE__*/_jsxs(HiddenShadesCount, {\n      children: [\"+\", shades.length - maxVisibleShadesCount]\n    }) : null]\n  });\n};\n//# sourceMappingURL=ShadesResponsive.js.map","import useTestId from '@ori/testid-generator';\nimport { useMemo } from 'react';\nimport { SHADES } from '../../constants';\nimport { useProduct } from '../../hooks/internal';\nimport { ProductBoxMode } from '../../models';\nimport { filterDiscontinuedShade } from '../../utils/internal';\nimport { ShadeWithName } from './components/ShadeWithName';\nimport { InnerShades } from './components/ShadesResponsive';\nimport { MAX_VISIBLE_SHADES_COUNT } from './constants';\nimport { ShadesRoot } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Shades = () => {\n  const {\n    getTestId\n  } = useTestId();\n  const {\n    code,\n    shades,\n    mode\n  } = useProduct();\n  const filteredShades = useMemo(() => shades?.filter(filterDiscontinuedShade) ?? [], [shades]);\n  if (mode === ProductBoxMode.Product) {\n    return /*#__PURE__*/_jsx(ShadeWithName, {});\n  }\n  if (filteredShades.length < 2) {\n    return null;\n  }\n  return /*#__PURE__*/_jsx(ShadesRoot, {\n    \"data-testid\": getTestId(`${SHADES}-${code}`),\n    children: /*#__PURE__*/_jsx(InnerShades, {\n      maxVisibleShadesCount: MAX_VISIBLE_SHADES_COUNT,\n      shades: filteredShades\n    })\n  });\n};\n//# sourceMappingURL=Shades.js.map","export const PRICES = 'prices';\nexport const CURRENT_PRICE = 'current-price';\nexport const OLD_PRICE = 'old-price';\n//# sourceMappingURL=constants.js.map","export const getCurrentPriceColor = (theme, oldPriceVisible) => oldPriceVisible ? theme.palette.offer.main : theme.palette.text.primary;\n//# sourceMappingURL=getCurrentPriceColor.js.map","import { Typography, styled } from '@ori-ui/mui';\nimport { shouldNotForwardProp } from '@ori/presentation-utils';\nimport { getCurrentPriceColor } from './utils';\nexport const Root = styled('div')(({\n  theme\n}) => ({\n  display: 'flex',\n  flexDirection: 'column',\n  gap: theme.spacing(1)\n}));\nexport const PricesHolder = styled('div')(({\n  theme\n}) => ({\n  display: 'flex',\n  flexGrow: 1,\n  gap: theme.spacing(1, 2),\n  justifyContent: 'flex-start',\n  flexWrap: 'wrap'\n}));\nexport const CurrentPrice = styled(Typography, {\n  shouldForwardProp: shouldNotForwardProp(['useOfferColor'])\n})(({\n  useOfferColor,\n  theme\n}) => ({\n  color: getCurrentPriceColor(theme, useOfferColor),\n  overflow: 'hidden'\n}));\nexport const OldPrice = styled(Typography, {\n  shouldForwardProp: shouldNotForwardProp(['useLineThrough'])\n})(({\n  useLineThrough,\n  theme\n}) => ({\n  color: theme.palette.grey.A700,\n  overflow: 'hidden',\n  textDecoration: useLineThrough ? 'line-through' : undefined\n}));\nexport const CurrentPriceAndPoints = styled('div')({\n  alignItems: 'center',\n  display: 'flex',\n  flexDirection: 'row'\n});\nexport const CurrencyWrapper = styled('span')({\n  display: 'flex',\n  fontSize: '1.6rem'\n});\nexport const GamificationPricesHolder = styled('div')(({\n  theme\n}) => ({\n  display: 'flex',\n  flexDirection: 'column',\n  gap: theme.spacing(1)\n}));\nexport const GamificationCurrentPrice = styled(CurrentPrice)(({\n  theme\n}) => ({\n  display: 'flex',\n  flexDirection: 'row',\n  gap: theme.spacing(1)\n}));\nexport const Plus = styled('span')({\n  alignItems: 'center',\n  display: 'flex',\n  marginTop: -3\n});\nexport const MrpStatement = styled(Typography)(({\n  theme\n}) => ({\n  color: theme.palette.text.secondary\n}));\n//# sourceMappingURL=styles.js.map","import { parseNumberFromString } from '@ori/presentation-utils';\nexport const isOldPriceVisible = ({\n  currentFormatted,\n  old\n}) => old != null && parseNumberFromString(old) > parseNumberFromString(currentFormatted);\n//# sourceMappingURL=isOldPriceVisible.js.map","import useTestId from '@ori/testid-generator';\nimport { useProduct } from '../../hooks/internal';\nimport { useTranslations } from '../../hooks/useTranslations';\nimport { CURRENT_PRICE, OLD_PRICE, PRICES } from './constants';\nimport { CurrencyWrapper, CurrentPrice, CurrentPriceAndPoints, GamificationCurrentPrice, GamificationPricesHolder, MrpStatement, OldPrice, Plus, PricesHolder, Root } from './styles';\nimport { isOldPriceVisible } from './utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const PricesSection = () => {\n  const {\n    getTestId\n  } = useTestId();\n  const {\n    code,\n    mrpStatementEnabled,\n    price,\n    points\n  } = useProduct();\n  const {\n    translations\n  } = useTranslations();\n  if (!price?.currentFormatted) {\n    return null;\n  }\n  const {\n    currentFormatted,\n    old\n  } = price;\n  const oldPriceVisible = isOldPriceVisible({\n    currentFormatted,\n    old\n  });\n  const {\n    currency: Currency,\n    productPoints\n  } = points ?? {};\n  return /*#__PURE__*/_jsxs(Root, {\n    \"data-testid\": getTestId(`${PRICES}-${code}`),\n    children: [Currency != null && productPoints != null ? /*#__PURE__*/_jsxs(GamificationPricesHolder, {\n      children: [/*#__PURE__*/_jsxs(GamificationCurrentPrice, {\n        \"data-testid\": getTestId(`${CURRENT_PRICE}-${code}`),\n        fontWeight: \"bold\",\n        children: [/*#__PURE__*/_jsxs(CurrentPriceAndPoints, {\n          children: [productPoints, /*#__PURE__*/_jsx(CurrencyWrapper, {\n            children: /*#__PURE__*/_jsx(Currency, {\n              fontSize: \"inherit\"\n            })\n          })]\n        }), /*#__PURE__*/_jsx(Plus, {\n          children: \"+\"\n        }), currentFormatted]\n      }), oldPriceVisible ? /*#__PURE__*/_jsxs(OldPrice, {\n        \"data-testid\": getTestId(`${OLD_PRICE}-${code}`),\n        children: [mrpStatementEnabled ? translations.mrp : translations.regularPrice, \" \", old]\n      }) : null]\n    }) : /*#__PURE__*/_jsxs(PricesHolder, {\n      children: [/*#__PURE__*/_jsxs(CurrentPrice, {\n        \"data-testid\": getTestId(`${CURRENT_PRICE}-${code}`),\n        fontWeight: \"bold\",\n        useOfferColor: oldPriceVisible,\n        children: [!oldPriceVisible && mrpStatementEnabled ? `${translations.mrp} ` : null, currentFormatted]\n      }), oldPriceVisible ? /*#__PURE__*/_jsxs(OldPrice, {\n        \"data-testid\": getTestId(`${OLD_PRICE}-${code}`),\n        children: [mrpStatementEnabled ? `${translations.mrp} ` : null, /*#__PURE__*/_jsx(\"s\", {\n          children: old\n        })]\n      }) : null]\n    }), mrpStatementEnabled ? /*#__PURE__*/_jsx(MrpStatement, {\n      variant: \"caption\",\n      children: translations.mrpStatement\n    }) : null]\n  });\n};\n//# sourceMappingURL=PricesSection.js.map","export const REMOVE_ICON_BUTTON_SIZE = 25;\nexport const REMOVE_ICON_BUTTON_ICON_SIZE = '1.6rem';\nexport const QUANTITY_PICKER = 'quantity-picker';\n//# sourceMappingURL=constants.js.map","import { QuantityPicker as QuantityPickerComponent } from '@ori-ui/components';\nimport { Fade } from '@ori-ui/mui';\nimport { useIsMobile } from '@ori/presentation-hooks';\nimport useTestId from '@ori/testid-generator';\nimport { useCallback } from 'react';\nimport { useProduct } from '../../hooks/internal';\nimport { QUANTITY_PICKER } from './constants';\nimport { QuantityPickerWrapper } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const QuantityPicker = () => {\n  const {\n    getTestId\n  } = useTestId();\n  const {\n    code,\n    quantityPicker,\n    onQuickBuyButtonClick\n  } = useProduct();\n  const isMobile = useIsMobile();\n  // istanbul ignore next -- no need to test mobile size\n  const size = isMobile ? 'medium' : 'large';\n  const onChange = useCallback((newValue, id, source) => {\n    onQuickBuyButtonClick?.({\n      newValue,\n      id,\n      source\n    });\n  }, [onQuickBuyButtonClick]);\n  const {\n    visible,\n    onClick,\n    ...restQuantityPicker\n  } = quantityPicker ?? {};\n  const onQuantityPickerClick = useCallback(event => {\n    event.preventDefault();\n    event.stopPropagation();\n    onClick?.(event);\n  }, [onClick]);\n  if (!visible) {\n    return null;\n  }\n  return /*#__PURE__*/_jsx(QuantityPickerWrapper, {\n    \"data-testid\": getTestId(QUANTITY_PICKER),\n    children: /*#__PURE__*/_jsx(Fade, {\n      in: true,\n      timeout: 500,\n      children: /*#__PURE__*/_jsx(QuantityPickerComponent, {\n        id: code,\n        size: size,\n        onChange: onChange,\n        onClick: onQuantityPickerClick,\n        ...restQuantityPicker\n      })\n    })\n  });\n};\n//# sourceMappingURL=QuantityPicker.js.map","import { Clear } from '@ori-ui/icons';\nimport useTestId from '@ori/testid-generator';\nimport { useCallback } from 'react';\nimport { REMOVE } from '../../constants';\nimport { REMOVE_ICON_BUTTON_ICON_SIZE, REMOVE_ICON_BUTTON_SIZE } from './constants';\nimport { IconButtonWithFixedSize } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Remove = ({\n  code,\n  disabled,\n  onRemoveButtonClick\n}) => {\n  const {\n    getTestId\n  } = useTestId();\n  const onClickHandler = useCallback(event => {\n    event.preventDefault();\n    event.stopPropagation();\n    if (onRemoveButtonClick) {\n      onRemoveButtonClick();\n    }\n  }, [onRemoveButtonClick]);\n  return /*#__PURE__*/_jsx(IconButtonWithFixedSize, {\n    buttonSize: REMOVE_ICON_BUTTON_SIZE,\n    \"data-testid\": `${getTestId(REMOVE)}-${code}`,\n    disabled: disabled,\n    iconSize: REMOVE_ICON_BUTTON_ICON_SIZE,\n    variant: \"contained\",\n    color: \"default\",\n    onClick: onClickHandler,\n    children: /*#__PURE__*/_jsx(Clear, {\n      fontSize: \"inherit\"\n    })\n  });\n};\n//# sourceMappingURL=Remove.js.map","import React from 'react';\nimport { useProduct } from '../../hooks/internal';\nimport { Remove } from './Remove';\nimport { IconWrapper } from './styles';\n\n/*\n * This component is responsible for rendering the top icon buttons in the ProductBox component.\n * Should not be used together with PointsOrDealLabel and BottomIconButtons\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const TopIconButtons = () => {\n  const {\n    buttons,\n    code,\n    onRemoveButtonClick\n  } = useProduct();\n  const {\n    disabled,\n    trigger,\n    visible\n  } = buttons?.remove ?? {};\n  if (!visible) {\n    return null;\n  }\n  return /*#__PURE__*/_jsx(IconWrapper, {\n    position: \"top\",\n    children: /*#__PURE__*/_jsx(Remove, {\n      code: code,\n      disabled: disabled,\n      onRemoveButtonClick: trigger ? onRemoveButtonClick : undefined\n    })\n  });\n};\n//# sourceMappingURL=TopIconButtons.js.map","export const Name = 'product-click';\nexport const ProductClick = Name;\n//# sourceMappingURL=index.js.map","import useTestId from '@ori/testid-generator';\nimport { BottomIconButtons, PointsOrDealLabel, PricesSection, ProductImage, Rating, Shades } from '../components';\nimport { QuantityPicker } from '../components/IconButtons/QuantityPicker';\nimport { TopIconButtons } from '../components/IconButtons/TopIconButtons';\nimport { useOnClick, useProduct } from '../hooks/internal';\nimport { Brand, ImageWrapper, Name, NamesWrapper, Ppa, ProductBoxRoot } from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const InnerProductBox = () => {\n  const onClick = useOnClick();\n  const {\n    brand,\n    className,\n    code,\n    labels,\n    name,\n    url,\n    isLink\n  } = useProduct();\n  const {\n    getTestId\n  } = useTestId();\n  const {\n    labelKey = null,\n    title = null\n  } = labels?.ppa ?? {};\n  return /*#__PURE__*/_jsxs(ProductBoxRoot, {\n    isLink: isLink,\n    className: className,\n    href: isLink ? url : undefined,\n    \"data-testid\": getTestId(code),\n    onClick: isLink ? onClick : undefined,\n    children: [/*#__PURE__*/_jsxs(\"div\", {\n      children: [/*#__PURE__*/_jsxs(ImageWrapper, {\n        children: [/*#__PURE__*/_jsx(TopIconButtons, {}), /*#__PURE__*/_jsx(ProductImage, {}), /*#__PURE__*/_jsx(PointsOrDealLabel, {}), /*#__PURE__*/_jsx(BottomIconButtons, {}), /*#__PURE__*/_jsx(QuantityPicker, {})]\n      }), /*#__PURE__*/_jsx(Ppa, {\n        shouldRenderEmptyLabel: true,\n        label: title,\n        productCode: code,\n        size: \"small\",\n        type: labelKey,\n        maxLines: 1\n      })]\n    }), /*#__PURE__*/_jsx(Rating, {}), /*#__PURE__*/_jsxs(NamesWrapper, {\n      children: [/*#__PURE__*/_jsx(Brand, {\n        variant: \"caption\",\n        \"data-testid\": `${getTestId('brand')}-${code}`,\n        children: brand ?? ''\n      }), /*#__PURE__*/_jsx(Name, {\n        \"data-testid\": `${getTestId('name')}-${code}`,\n        children: name\n      })]\n    }), /*#__PURE__*/_jsx(Shades, {}), /*#__PURE__*/_jsx(PricesSection, {})]\n  });\n};\n//# sourceMappingURL=InnerProductBox.js.map","import * as ProductClickEvent from '@ori-events/product-click';\nimport { useCallback } from 'react';\nimport { useProduct } from './useProduct';\nexport const useOnClick = () => {\n  const {\n    analyticsData,\n    brand,\n    code,\n    image,\n    name,\n    price,\n    onProductBoxClick\n  } = useProduct();\n  return useCallback(event => {\n    const dispatchAnalytics = () => {\n      const customEvent = new CustomEvent(ProductClickEvent.Name, {\n        detail: {\n          products: [{\n            itemCode: code,\n            formattedPrice: price?.currentFormatted,\n            localName: name,\n            globalName: '',\n            localCategoryName: '',\n            globalCategoryName: '',\n            localBrandName: brand ?? '',\n            globalBrandName: '',\n            media: image ? [image] : []\n          }],\n          ...analyticsData\n        }\n      });\n      window.dispatchEvent(customEvent);\n    };\n    dispatchAnalytics();\n    if (onProductBoxClick) {\n      event.preventDefault();\n      event.stopPropagation();\n      onProductBoxClick();\n    }\n  }, [analyticsData, brand, code, price?.currentFormatted, image, name, onProductBoxClick]);\n};\n//# sourceMappingURL=useOnClick.js.map","// istanbul ignore file -- No need to test containers for translations\nimport { TranslationsNamespaceProvider, TranslationsProvider, useLanguage } from '@ori/i18n';\nimport { useMemo } from 'react';\nimport { defaultTranslations, translationsNamespace } from '../constants';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Translations = ({\n  translations = defaultTranslations,\n  children,\n  withTranslationsProvider = true\n}) => {\n  const {\n    language\n  } = useLanguage();\n  const mergedTranslations = useMemo(() => ({\n    ...defaultTranslations,\n    ...translations\n  }), [translations]);\n  if (!withTranslationsProvider) {\n    return /*#__PURE__*/_jsx(TranslationsNamespaceProvider, {\n      namespace: translationsNamespace,\n      children: children\n    });\n  }\n  return /*#__PURE__*/_jsx(TranslationsProvider, {\n    defaultTranslationsWithNamespaces: {\n      [translationsNamespace]: defaultTranslations\n    },\n    language: language || 'en-GB',\n    translationsWithNamespaces: {\n      [translationsNamespace]: mergedTranslations\n    },\n    children: /*#__PURE__*/_jsx(TranslationsNamespaceProvider, {\n      namespace: translationsNamespace,\n      children: children\n    })\n  });\n};\n//# sourceMappingURL=Translations.js.map","import { Team, TestIdProvider } from '@ori/testid-generator';\nimport { APP_NAME } from '../constants-generated';\nimport { ProductProvider } from '../context';\nimport { mainLogger } from '../logger';\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { InnerProductBox } from './InnerProductBox';\nimport { Translations } from './Translations';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst childLogger = mainLogger.createChild('ProductBox');\nexport const ProductBox = ({\n  translations,\n  withTranslationsProvider,\n  ...props\n}) => /*#__PURE__*/_jsx(ErrorBoundary, {\n  logger: childLogger,\n  children: /*#__PURE__*/_jsx(TestIdProvider, {\n    team: Team.Presentation,\n    project: APP_NAME,\n    children: /*#__PURE__*/_jsx(Translations, {\n      translations: translations,\n      withTranslationsProvider: withTranslationsProvider,\n      children: /*#__PURE__*/_jsx(ProductProvider, {\n        value: props,\n        children: /*#__PURE__*/_jsx(InnerProductBox, {})\n      })\n    })\n  })\n});\n//# sourceMappingURL=ProductBox.js.map"],"names":["mapEventPropToEvent","eventProp","substring","toLowerCase","ClickAwayListener","props","children","disableReactTree","mouseEvent","onClickAway","touchEvent","movedRef","nodeRef","activatedRef","syntheticEventRef","setTimeout","current","handleRef","ref","handleClickAway","event","insideReactTree","doc","documentElement","clientWidth","clientX","clientHeight","clientY","clickedRootScrollbar","insideDOM","composedPath","indexOf","contains","target","createHandleSynthetic","handlerName","childrenPropsHandler","childrenProps","mappedTouchEvent","handleTouchMove","addEventListener","removeEventListener","mappedMouseEvent","useMediaQueryOld","query","defaultMatches","matchMedia","ssrMatchMedia","noSsr","match","setMatch","matches","active","queryList","updateMatch","addListener","removeListener","maybeReactUseSyncExternalStore","useMediaQueryNew","getDefaultSnapshot","getServerSnapshot","getSnapshot","subscribe","mediaQueryList","notify","useMediaQuery","queryInput","options","theme","supportMatchMedia","window","name","replace","undefined","Name","LoyaltyDialogResults","Results","BUY_FOR_MONEY","BUY_FOR_POINTS","isLoyaltyCloseResult","result","CLOSE","DialogMode","hasWindow","node","isNode","nodeName","_node$ownerDocument","ownerDocument","defaultView","getDocumentElement","_ref","document","value","Node","Element","HTMLElement","isShadowRoot","ShadowRoot","isOverflowElement","element","overflow","overflowX","overflowY","display","getComputedStyle","test","includes","isTableElement","isTopLayer","some","selector","e","isContainingBlock","elementOrCss","webkit","isWebKit","css","containerType","backdropFilter","filter","willChange","contain","CSS","supports","isLastTraversableNode","getNodeScroll","scrollLeft","scrollTop","scrollX","scrollY","getParentNode","assignedSlot","parentNode","host","getNearestOverflowAncestor","body","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","concat","visualViewport","parent","Object","getPrototypeOf","child","rootNode","getRootNode","next","isEventTargetWithin","Math","min","max","round","floor","createCoords","v","x","y","oppositeSideMap","left","right","bottom","top","oppositeAlignmentMap","start","end","clamp","param","placement","split","axis","getAxisLength","getAlignmentAxis","alignment","getOppositePlacement","side","padding","expandPaddingObject","rect","width","height","computeCoordsFromPlacement","rtl","reference","floating","sideAxis","alignmentAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","async","state","_await$platform$isEle","platform","rects","elements","strategy","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","getClippingRect","isElement","contextElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","getCssDimensions","parseFloat","hasOffset","offsetWidth","offsetHeight","shouldFallback","$","unwrapElement","domElement","getBoundingClientRect","Number","isFinite","noOffsets","getVisualOffsets","offsetLeft","offsetTop","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","isFixed","floatingOffsetParent","shouldAddVisualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","getWindowScrollBarX","leftScroll","getHTMLOffset","scroll","ignoreScrollbarX","htmlRect","getClientRectFromClippingAncestor","clippingAncestor","html","visualViewportBased","getViewportRect","scrollWidth","scrollHeight","direction","getDocumentRect","getInnerBoundingClientRect","hasFixedPositionAncestor","stopNode","position","getRectRelativeToOffsetParent","isOffsetParentAnElement","offsets","offsetRect","htmlOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","svgOffsetParent","currentNode","getContainingBlock","topLayer","clippingAncestors","cache","cachedResult","get","el","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","ancestor","set","getClippingElementAncestors","this","_c","firstClippingAncestor","clippingRect","reduce","accRect","getElementRects","data","getOffsetParentFn","getDimensionsFn","getDimensions","floatingDimensions","getClientRects","Array","from","isRTL","rectsAreEqual","a","b","autoUpdate","update","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","IntersectionObserver","animationFrame","referenceEl","ancestors","forEach","passive","cleanupIo","onMove","timeoutId","io","root","cleanup","_io","clearTimeout","disconnect","refresh","skip","threshold","elementRectForRootMargin","rootMargin","isFirstUpdate","handleObserve","entries","ratio","intersectionRatio","observe","observeMove","frameId","reobserveFrame","resizeObserver","firstEntry","unobserve","cancelAnimationFrame","requestAnimationFrame","_resizeObserver","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","fn","_middlewareData$offse","_middlewareData$arrow","middlewareData","diffCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","convertValueToCoords","offset","arrow","alignmentOffset","checkMainAxis","checkCrossAxis","limiter","detectOverflowOptions","mainAxisCoord","crossAxisCoord","maxSide","limitedCoords","enabled","_middlewareData$flip","initialPlacement","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment","initialSideAxis","isBasePlacement","oppositePlacement","getExpandedPlacements","hasFallbackAxisSideDirection","push","isStart","lr","rl","tb","bt","getSideList","map","getOppositeAxisPlacements","placements","overflows","overflowsData","flip","sides","length","mainAlignmentSide","every","_middlewareData$flip2","_overflowsData$filter","nextIndex","index","nextPlacement","reset","resetPlacement","d","sort","_overflowsData$filter2","currentSideAxis","acc","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","shouldAddOffset","centerOffset","Map","mergedOptions","platformWithCache","config","middleware","validMiddleware","Boolean","statefulPlacement","resetCount","i","nextX","nextY","computePosition","useLayoutEffect","useEffect","deepEqual","toString","keys","isArray","hasOwnProperty","call","key","$$typeof","getDPR","devicePixelRatio","roundByDPR","dpr","useLatestRef","arrow$1","deps","SafeReact","useSafeInsertionEffect","useInsertionEffect","useEffectEvent","callback","_len","arguments","args","_key","ARROW_UP","ARROW_DOWN","ARROW_LEFT","ARROW_RIGHT","horizontalKeys","verticalKeys","_extends","assign","bind","source","prototype","apply","serverHandoffComplete","count","genId","random","slice","useId","id","setId","FloatingArrow","context","shift","tipRadius","strokeWidth","staticOffset","stroke","style","transform","restStyle","rest","clipPathId","setIsRTL","isVerticalSide","computedStaticOffset","computedStrokeWidth","halfStrokeWidth","svgX","svgY","isCustomShape","yOffsetProp","xOffsetProp","arrowX","arrowY","dValue","rotation","viewBox","pointerEvents","t","join","clipPath","fill","createPubSub","emit","_map$get","handler","on","listener","off","_map$get2","l","FloatingNodeContext","FloatingTreeContext","useFloatingParentNodeId","_React$useContext","useFloatingTree","createAttribute","useRef","getChildren","nodes","allChildren","_node$context","parentId","open","currentChildren","_currentChildren","n","_node$context2","FOCUSABLE_ATTRIBUTE","bubbleHandlerKeys","pointerdown","mousedown","click","captureHandlerKeys","normalizeProp","normalizable","_normalizable$escapeK","_normalizable$outside","escapeKey","outsidePress","nodeId","internalRootContext","onOpenChange","onOpenChangeProp","elementsProp","floatingId","dataRef","events","nested","positionReference","setPositionReference","reason","openEvent","refs","domReference","useFloatingRootContext","rootContext","computedElements","_domReference","setDomReference","_setPositionReference","domReferenceRef","tree","externalReference","externalFloating","whileElementsMounted","setData","isPositioned","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","referenceRef","setFloating","floatingRef","floatingEl","hasWhileElementsMounted","whileElementsMountedRef","platformRef","openRef","then","fullData","isMountedRef","floatingStyles","initialStyles","useFloating","computedPositionReference","floatingContext","nodesRef","find","ACTIVE_KEY","SELECTED_KEY","mergeProps","userProps","propsList","elementKey","isItem","domUserProps","_","__","validProps","tabIndex","propsOrGetProps","has","val","componentRoleToAriaRoleMap","camelCaseToKebabCase","str","ofs","execWithArgsOrReturn","valueOrFn","useTransitionStatus","duration","closeDuration","close","status","setStatus","isMounted","durationMs","setIsMounted","timeout","useDelayUnmount","frame","callbacks","TEXT_MEDIUM_BUTTON_SIZE","CONTAINED_MEDIUM_BUTTON_SIZE","LARGE_BUTTON_SIZE","MEDIUM_INPUT_WIDTH","LARGE_INPUT_WIDTH","INPUT_FONT_SIZE","DEFAULT_MIN_VALUE","DEFAULT_MAX_VALUE","POSITIVE_INFINITY","getQuantityPickerUtilityClass","slot","generateUtilityClass","useUtilityClasses","ownerState","classes","slots","disabled","focused","readOnly","size","variant","capitalize","input","iconButton","increaseButton","decreaseButton","getQuantityPickerSlots","composeClasses","QuantityPickerRoot","styled","overridesResolver","styles","gridTemplateColumns","cssProps","holder","justifyContent","alignContent","boxSizing","minWidth","minHeight","background","borderRadius","boxShadow","expandOnFocus","transition","transitions","create","short","InputRoot","InputBase","margin","border","shape","mediumComponentRadius","alignSelf","fontSize","palette","grey","borderColor","textAlign","cursor","color","text","IncreaseButtonWrapper","lineHeight","IconButtonRoot","IconButton","button","TooltipContainer","spacing","maxWidth","common","white","primary","typography","body1","shadows","TooltipArrow","useDebug","isEnabled","serializedData","localStorage","getItem","JSON","parse","error","isDebugEnabled","log","useCallback","console","date","Date","minutes","getMinutes","seconds","getSeconds","milliseconds","getMilliseconds","getHours","getTime","useQuantityPicker","autoId","InputProps","visibilityTriggerClicked","lastIncreased","setLastIncreased","useState","loadOnClick","setLoadOnClick","triggerClickEvent","identifier","CustomEvent","detail","dispatchEvent","resetLastIncreased","handleKeyDown","currentTarget","blur","onQuantityPickerClickListener","innerProps","isControlled","controlled","groupValue","onChange","onIncrease","onDecrease","handleInputElement","action","inputValue","num","parseInt","isNaN","handleChange","handleBlur","useControlledQuantityPicker","uncontrolled","initialValue","maxValue","minValue","internalValue","setInternalValue","fallbackValue","useUncontrolledQuantityPicker","logBase","useMemo","QuantityPicker","forwardRef","inProps","useThemeProps","className","component","DecreaseIconButtonProps","expanded","IncreaseIconButtonProps","InputBaseProps","labelsTranslations","onFocus","required","tooltipMaxText","maxGroupValue","tooltipMaxDisabled","otherProps","setFocused","buttonProps","useTheme","elevation","IconButtonProps","pickerHeight","shadowLevel","contained","pickerCssProps","baseProps","type","useVisualProps","handleFocus","handleFocusForked","handleClickAwayForked","inputRef","tooltipMaxOpen","setTooltipMaxOpen","arrowRef","maxReached","dismiss","unstable_outsidePress","outsidePressEvent","referencePress","referencePressEvent","bubbles","capture","outsidePressFn","insideReactTreeRef","endedOrStartedInsideRef","escapeKeyBubbles","outsidePressBubbles","escapeKeyCapture","outsidePressCapture","isComposingRef","closeOnEscapeKeyDown","_dataRef$current$floa","stopPropagation","shouldDismiss","_child$context","__escapeKeyBubbles","isReactEvent","nativeEvent","closeOnEscapeKeyDownCapture","_getTarget2","_getTarget","closeOnPressOutside","_dataRef$current$floa2","endedOrStartedInside","inertSelector","markers","querySelectorAll","targetRootAncestor","nextParent","marker","canScrollX","canScrollY","xCond","offsetX","offsetY","targetIsInsideChildren","_child$context2","__outsidePressBubbles","closeOnPressOutsideCapture","_getTarget4","_getTarget3","compositionTimeout","onScroll","handleCompositionStart","handleCompositionEnd","_doc$defaultView","onKeyDown","onMouseDown","onMouseUp","useDismiss","role","_componentRoleToAriaR","ariaRole","referenceId","isNested","floatingProps","item","selected","commonProps","useRole","getReferenceProps","getFloatingProps","referenceDeps","floatingDeps","itemDeps","getItemProps","useInteractions","transitionStyles","initial","unstable_initial","opacity","unstable_open","unstable_close","unstable_common","fnArgs","isNumberDuration","openDuration","setStyles","initialRef","closeRef","commonRef","closeStyles","commonStyles","openStyles","transitionProperty","transitionDuration","useTransitionStyles","isTooltipMaxUsable","showTooltip","increaseWrapper","wrapperAttributes","referenceProps","hasOwn","onClick","inputProps","otherInputProps","inputElementProps","inputLabel","clsx","as","disableElevation","decreaseButtonLabel","Remove","onBlur","increaseButtonLabel","Add","A","zIndex","randomUUID","crypto","getRandomValues","rnds8","Uint8Array","byteToHex","unsafeStringify","arr","buf","rnds","rng","Error","RangeError","HeartRoot","pink","Animation","Parent","Group","SPREAD_FACTOR","Heart","angle","cos","sin","spreadX","spreadY","HeartFilled","HeartsAnimation","shouldAnimationRun","hearts","setHearts","heartsGroup","PI","prevState","group","Filled","shouldForwardProp","isFavorite","Outlined","secondary","HeartIconRoot","alignItems","breakpoints","up","HeartIcon","renderHeart","isInFavorites","FavoritesHeart","code","render","shades","setIsInFavorites","shadesCodes","shade","productCode","setShouldAnimationRun","toggleFavorite","requestedState","handleClick","preventDefault","onFavoriteUpdate","favorites","codes","Set","isProductInFavorites","querySelector","rendered","getDesktopSize","desktopSize","FavoritesIconButton","FavoritesHeartIconButton","restProps","renderFavoritesHeart","heart","onFavoritesHeartClick","CAROUSEL","CAROUSEL_WRAPPER","CAROUSEL_PREVIOUS_ARROW","CAROUSEL_NEXT_ARROW","CAROUSEL_SLIDE","IMAGE_PLACEHOLDER","IMAGE_PLACEHOLDER_BACKGROUND","PAGINATION_STEP","Root","isLoadingPlaceholder","isSquare","absolute","aspectRatio","svg","Background","Skeleton","ImagePlaceholder","testId","htmlDivElementProps","getTestId","useTestId","Products","animation","shadeClasses","getShadeBackground","hexColors","imageUrl","WHITE_COLORS","getBoxShadow","blueGrey","getShadeClearIconColor","getShadeClearIconSize","Medium","ShadeRoot","currentShade","isClickable","isCurrent","getShadeBorder","shadeRootSize","rootSize","Small","Inline","getShadeRootSize","backgroundSize","content","ShadeClearIcon","Clear","Shade","onShadeClick","rootClassName","canBeSold","clearIcon","ShadeSize","useDisclose","openProp","defaultOpen","isOpen","setIsOpen","onOpen","onClose","onToggle","prev","useIsMobile","down","APP_NAME","productContext","createContext","addToBasketMethod","isLink","image","rating","ratingCount","url","mode","ProductBoxMode","Concept","Provider","ProductProvider","mainLogger","teamName","logger","fallback","ProductBoxSkeleton","IMAGE_BACKGROUND_PARAM","getImageVariants","entryData","TypeError","baseUrl","URL","backgroundColor","searchParams","getBackgroundColorForVariants","delete","variants","values","params","imageSizeMultiplier","excludeWidthFromUrl","imageFormat","variantURL","quality","createVariant","generateSrcSet","images","useProduct","useContext","ImageRoot","maxHeight","objectFit","ProductImage","imagesVariants","alt","loading","sizes","src","at","srcSet","dealLabelTypes","isDealLabel","label","getPointsBackground","productPoints","userPoints","getFabUtilityClass","generateUtilityClasses","_excluded","FabRoot","ButtonBase","prop","rootShouldForwardProp","colorInherit","_theme$palette$getCon","_theme$palette","vars","fab","getContrastText","A100","textDecoration","focusVisible","contrastText","main","dark","disabledBackground","disableFocusRipple","focusVisibleClassName","other","composedClasses","focusRipple","Deal","FONT_SIZE","FONT_SIZE_OFFER_SMALL","isOffer","isSuper","offerLabelSmallerOnMobile","offer","light","fontWeight","fontWeightBold","TooltipFab","CatalogueLink","CatalogueOfferTooltip","title","toggleTooltip","disableTouchListener","leaveDelay","PopperProps","disablePortal","Typography","disableRipple","onTouchEnd","CatalogueOfferLabel","tooltipTitle","catalogueLabel","catalogueUrl","href","InnerDealLabel","DiscountTagFilled","SuperdealFilled","Chip","PointsAndLabelsWrapper","flexDirection","Points","A400","PointsOrDealLabel","labels","points","currency","labelKey","deal","ShadePickerMode","QUICK_BUY_FILLED_ICON","QUICK_BUY_FILLED_CN_ICON","QUICK_BUY_BUTTON_STATE_DEFAULT","QUICK_BUY_BUTTON_STATE_LOADING","QUICK_BUY_BUTTON_STATE_SUCCESS","QUICK_BUY_BUTTON_STATE_WAITING","Markets","getQuickBuyColor","tenant","CN","superApp","useGlobalEvents","controller","AbortController","signal","finalOptions","abort","rotating","hidden","visibility","default","svgIconClasses","renderIcon","hover","OriflameSpinner","EmptyBasketFilled","AddToBagFilled","EmptyBasket","AddToBag","QuickBuyButton","currentPrice","currentProductCode","lineNumber","originalItemCode","hasAutoSubscription","isMultiShade","onQuickBuyButtonClick","setState","timeoutRef","clearAndResetState","delay","eventHandlers","itemCode","lastAddedItem","useQuickBuyEvents","onClickEvent","StandardBuy","productCodes","formattedPrice","localName","method","quantity","useOnClickEvent","dispatchOnClickEvent","initialState","hoverIcon","useTranslations","useTranslationsFromNamespace","IconWrapper","gap","IconButtonWithFixedSize","buttonSize","iconSize","QuantityPickerWrapper","NotifyMeIconButton","NotifyMe","onNotifyMeButtonClick","onClickHandler","NotificationFilled","Notification","BuyOrNotifyMe","analyticsData","buttons","price","quantityPicker","notifyMe","quickBuy","quickBuyButton","translations","onQuickBuyClick","newValue","onQuickBuyButtonWithTooltipClick","onOtherDisabledQuickBuyClick","useQuickBuyButtonTooltipHandlers","visible","Tooltip","currentFormatted","trigger","onFavoritesButtonClick","BottomIconButtons","Favorites","getStarRatingUtilityClass","StarRatingRoot","textRating","marginLeft","fontWeightMedium","StarHalfWrap","StyledStarIcon","FavouriteFilled","starType","star","starPercentageWidth","StarRatingItem","memo","StarRatingText","formattedValue","showTextRating","showVotes","votes","precise","stars","halfStarSize","halfStarCeiling","starId","emptyStar","fullStar","halfStar","decimalPlaces","baseNumber","roundUtil","constructStarClassName","starClassName","Fragment","Rating","hideRating","PRODUCT_BOX_SHADE_TEST_ID","A700","boxOrient","lineClamp","textOverflow","WebkitBoxOrient","WebkitLineClamp","ShadeWrapper","flexShrink","ShadeWithName","shadeName","ShadesRoot","HiddenShadesCount","InnerShades","maxVisibleShadesCount","Shades","filteredShades","filterDiscontinuedShade","Product","CURRENT_PRICE","OLD_PRICE","getCurrentPriceColor","oldPriceVisible","PricesHolder","flexGrow","flexWrap","CurrentPrice","useOfferColor","OldPrice","useLineThrough","CurrentPriceAndPoints","CurrencyWrapper","GamificationPricesHolder","GamificationCurrentPrice","Plus","marginTop","MrpStatement","PricesSection","mrpStatementEnabled","old","parseNumberFromString","isOldPriceVisible","Currency","mrp","regularPrice","mrpStatement","restQuantityPicker","onQuantityPickerClick","Fade","in","onRemoveButtonClick","TopIconButtons","remove","InnerProductBox","brand","onProductBoxClick","customEvent","products","globalName","localCategoryName","globalCategoryName","localBrandName","globalBrandName","media","dispatchAnalytics","useOnClick","ppa","shouldRenderEmptyLabel","maxLines","Translations","defaultTranslations","withTranslationsProvider","language","useLanguage","mergedTranslations","TranslationsProvider","defaultTranslationsWithNamespaces","translationsWithNamespaces","TranslationsNamespaceProvider","namespace","childLogger","createChild","ProductBox","TestIdProvider","team","Team","Presentation","project"],"sourceRoot":""}