{"version":3,"file":"Popper.mjs","sources":["../../../../../../../../node_modules/@mui/material/Popper/Popper.js"],"sourcesContent":["'use client';\n\nimport { useRtl } from '@mui/system/RtlProvider';\nimport refType from '@mui/utils/refType';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport BasePopper from \"./BasePopper.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n  name: 'MuiPopper',\n  slot: 'Root',\n  overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n * - [Popper](https://mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n  const isRtl = useRtl();\n  const props = useDefaultProps({\n    props: inProps,\n    name: 'MuiPopper'\n  });\n  const {\n    anchorEl,\n    component,\n    components,\n    componentsProps,\n    container,\n    disablePortal,\n    keepMounted,\n    modifiers,\n    open,\n    placement,\n    popperOptions,\n    popperRef,\n    transition,\n    slots,\n    slotProps,\n    ...other\n  } = props;\n  const RootComponent = slots?.root ?? components?.Root;\n  const otherProps = {\n    anchorEl,\n    container,\n    disablePortal,\n    keepMounted,\n    modifiers,\n    open,\n    placement,\n    popperOptions,\n    popperRef,\n    transition,\n    ...other\n  };\n  return /*#__PURE__*/_jsx(PopperRoot, {\n    as: component,\n    direction: isRtl ? 'rtl' : 'ltr',\n    slots: {\n      root: RootComponent\n    },\n    slotProps: slotProps ?? componentsProps,\n    ...otherProps,\n    ref: ref\n  });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.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   * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n   * or a function that returns either.\n   * It's used to set the position of the popper.\n   * The return value will passed as the reference object of the Popper instance.\n   */\n  anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n  /**\n   * Popper render function or node.\n   */\n  children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\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   * The components used for each slot inside the Popper.\n   * Either a string to use a HTML element or a component.\n   *\n   * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n   * @default {}\n   */\n  components: PropTypes.shape({\n    Root: PropTypes.elementType\n  }),\n  /**\n   * The props used for each slot inside the Popper.\n   *\n   * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n   * @default {}\n   */\n  componentsProps: PropTypes.shape({\n    root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n  }),\n  /**\n   * An HTML element or function that returns one.\n   * The `container` will have the portal children appended to it.\n   *\n   * You can also provide a callback, which is called in a React layout effect.\n   * This lets you set the container from a ref, and also makes server-side rendering possible.\n   *\n   * By default, it uses the body of the top-level document object,\n   * so it's simply `document.body` most of the time.\n   */\n  container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n  /**\n   * The `children` will be under the DOM hierarchy of the parent component.\n   * @default false\n   */\n  disablePortal: PropTypes.bool,\n  /**\n   * Always keep the children in the DOM.\n   * This prop can be useful in SEO situation or\n   * when you want to maximize the responsiveness of the Popper.\n   * @default false\n   */\n  keepMounted: PropTypes.bool,\n  /**\n   * Popper.js is based on a \"plugin-like\" architecture,\n   * most of its features are fully encapsulated \"modifiers\".\n   *\n   * A modifier is a function that is called each time Popper.js needs to\n   * compute the position of the popper.\n   * For this reason, modifiers should be very performant to avoid bottlenecks.\n   * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n   */\n  modifiers: PropTypes.arrayOf(PropTypes.shape({\n    data: PropTypes.object,\n    effect: PropTypes.func,\n    enabled: PropTypes.bool,\n    fn: PropTypes.func,\n    name: PropTypes.any,\n    options: PropTypes.object,\n    phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n    requires: PropTypes.arrayOf(PropTypes.string),\n    requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n  })),\n  /**\n   * If `true`, the component is shown.\n   */\n  open: PropTypes.bool.isRequired,\n  /**\n   * Popper placement.\n   * @default 'bottom'\n   */\n  placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n  /**\n   * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n   * @default {}\n   */\n  popperOptions: PropTypes.shape({\n    modifiers: PropTypes.array,\n    onFirstUpdate: PropTypes.func,\n    placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n    strategy: PropTypes.oneOf(['absolute', 'fixed'])\n  }),\n  /**\n   * A ref that points to the used popper instance.\n   */\n  popperRef: refType,\n  /**\n   * The props used for each slot inside the Popper.\n   * @default {}\n   */\n  slotProps: PropTypes.shape({\n    root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n  }),\n  /**\n   * The components used for each slot inside the Popper.\n   * Either a string to use a HTML element or a component.\n   * @default {}\n   */\n  slots: PropTypes.shape({\n    root: PropTypes.elementType\n  }),\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   * Help supporting a react-transition-group/Transition component.\n   * @default false\n   */\n  transition: PropTypes.bool\n} : void 0;\nexport default Popper;"],"names":["BasePopper","React.forwardRef","_jsx"],"mappings":";;;;;;;AAWA,MAAM,UAAU,GAAG,MAAM,CAACA,QAAU,EAAE;AACtC,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;AAC/C,CAAC,CAAC,CAAC,EAAE,CAAC;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,MAAM,gBAAgBC,CAAgB,CAAC,SAAS,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE;AAC3E,EAAE,MAAM,KAAK,GAAG,MAAM,EAAE;AACxB,EAAE,MAAM,KAAK,GAAG,eAAe,CAAC;AAChC,IAAI,KAAK,EAAE,OAAO;AAClB,IAAI,IAAI,EAAE;AACV,GAAG,CAAC;AACJ,EAAE,MAAM;AACR,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,eAAe;AACnB,IAAI,SAAS;AACb,IAAI,aAAa;AACjB,IAAI,WAAW;AACf,IAAI,SAAS;AACb,IAAI,IAAI;AACR,IAAI,SAAS;AACb,IAAI,aAAa;AACjB,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,GAAG;AACP,GAAG,GAAG,KAAK;AACX,EAAE,MAAM,aAAa,GAAG,KAAK,EAAE,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