{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport PopperJs from 'popper.js';\nimport { chainPropTypes, refType, HTMLElementType } from '@material-ui/utils';\nimport { useTheme } from '@material-ui/styles';\nimport Portal from '../Portal';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport setRef from '../utils/setRef';\nimport useForkRef from '../utils/useForkRef';\n\nfunction flipPlacement(placement, theme) {\n  var direction = theme && theme.direction || 'ltr';\n\n  if (direction === 'ltr') {\n    return placement;\n  }\n\n  switch (placement) {\n    case 'bottom-end':\n      return 'bottom-start';\n\n    case 'bottom-start':\n      return 'bottom-end';\n\n    case 'top-end':\n      return 'top-start';\n\n    case 'top-start':\n      return 'top-end';\n\n    default:\n      return placement;\n  }\n}\n\nfunction getAnchorEl(anchorEl) {\n  return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar defaultPopperOptions = {};\n/**\n * Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.\n */\n\nvar Popper = /*#__PURE__*/React.forwardRef(function Popper(props, ref) {\n  var anchorEl = props.anchorEl,\n      children = props.children,\n      container = props.container,\n      _props$disablePortal = props.disablePortal,\n      disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,\n      _props$keepMounted = props.keepMounted,\n      keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,\n      modifiers = props.modifiers,\n      open = props.open,\n      _props$placement = props.placement,\n      initialPlacement = _props$placement === void 0 ? 'bottom' : _props$placement,\n      _props$popperOptions = props.popperOptions,\n      popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions,\n      popperRefProp = props.popperRef,\n      style = props.style,\n      _props$transition = props.transition,\n      transition = _props$transition === void 0 ? false : _props$transition,\n      other = _objectWithoutProperties(props, [\"anchorEl\", \"children\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"style\", \"transition\"]);\n\n  var tooltipRef = React.useRef(null);\n  var ownRef = useForkRef(tooltipRef, ref);\n  var popperRef = React.useRef(null);\n  var handlePopperRef = useForkRef(popperRef, popperRefProp);\n  var handlePopperRefRef = React.useRef(handlePopperRef);\n  useEnhancedEffect(function () {\n    handlePopperRefRef.current = handlePopperRef;\n  }, [handlePopperRef]);\n  React.useImperativeHandle(popperRefProp, function () {\n    return popperRef.current;\n  }, []);\n\n  var _React$useState = React.useState(true),\n      exited = _React$useState[0],\n      setExited = _React$useState[1];\n\n  var theme = useTheme();\n  var rtlPlacement = flipPlacement(initialPlacement, theme);\n  /**\n   * placement initialized from prop but can change during lifetime if modifiers.flip.\n   * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n   */\n\n  var _React$useState2 = React.useState(rtlPlacement),\n      placement = _React$useState2[0],\n      setPlacement = _React$useState2[1];\n\n  React.useEffect(function () {\n    if (popperRef.current) {\n      popperRef.current.update();\n    }\n  });\n  var handleOpen = React.useCallback(function () {\n    if (!tooltipRef.current || !anchorEl || !open) {\n      return;\n    }\n\n    if (popperRef.current) {\n      popperRef.current.destroy();\n      handlePopperRefRef.current(null);\n    }\n\n    var handlePopperUpdate = function handlePopperUpdate(data) {\n      setPlacement(data.placement);\n    };\n\n    var resolvedAnchorEl = getAnchorEl(anchorEl);\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n        var box = resolvedAnchorEl.getBoundingClientRect();\n\n        if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n          console.warn(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n        }\n      }\n    }\n\n    var popper = new PopperJs(getAnchorEl(anchorEl), tooltipRef.current, _extends({\n      placement: rtlPlacement\n    }, popperOptions, {\n      modifiers: _extends({}, disablePortal ? {} : {\n        // It's using scrollParent by default, we can use the viewport when using a portal.\n        preventOverflow: {\n          boundariesElement: 'window'\n        }\n      }, modifiers, popperOptions.modifiers),\n      // We could have been using a custom modifier like react-popper is doing.\n      // But it seems this is the best public API for this use case.\n      onCreate: createChainedFunction(handlePopperUpdate, popperOptions.onCreate),\n      onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate)\n    }));\n    handlePopperRefRef.current(popper);\n  }, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]);\n  var handleRef = React.useCallback(function (node) {\n    setRef(ownRef, node);\n    handleOpen();\n  }, [ownRef, handleOpen]);\n\n  var handleEnter = function handleEnter() {\n    setExited(false);\n  };\n\n  var handleClose = function handleClose() {\n    if (!popperRef.current) {\n      return;\n    }\n\n    popperRef.current.destroy();\n    handlePopperRefRef.current(null);\n  };\n\n  var handleExited = function handleExited() {\n    setExited(true);\n    handleClose();\n  };\n\n  React.useEffect(function () {\n    return function () {\n      handleClose();\n    };\n  }, []);\n  React.useEffect(function () {\n    if (!open && !transition) {\n      // Otherwise handleExited will call this.\n      handleClose();\n    }\n  }, [open, transition]);\n\n  if (!keepMounted && !open && (!transition || exited)) {\n    return null;\n  }\n\n  var childProps = {\n    placement: placement\n  };\n\n  if (transition) {\n    childProps.TransitionProps = {\n      in: open,\n      onEnter: handleEnter,\n      onExited: handleExited\n    };\n  }\n\n  return /*#__PURE__*/React.createElement(Portal, {\n    disablePortal: disablePortal,\n    container: container\n  }, /*#__PURE__*/React.createElement(\"div\", _extends({\n    ref: handleRef,\n    role: \"tooltip\"\n  }, other, {\n    style: _extends({\n      // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n      position: 'fixed',\n      // Fix Popper.js display issue\n      top: 0,\n      left: 0,\n      display: !open && keepMounted && !transition ? 'none' : null\n    }, style)\n  }), typeof children === 'function' ? children(childProps) : children));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes = {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit the d.ts file and run \"yarn proptypes\"     |\n  // ----------------------------------------------------------------------\n\n  /**\n   * A HTML element, [referenceObject](https://popper.js.org/docs/v1/#referenceObject),\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: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), function (props) {\n    if (props.open) {\n      var resolvedAnchorEl = getAnchorEl(props.anchorEl);\n\n      if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n        var box = resolvedAnchorEl.getBoundingClientRect();\n\n        if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n          return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n        }\n      } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.clientWidth !== 'number' || typeof resolvedAnchorEl.clientHeight !== 'number' || typeof resolvedAnchorEl.getBoundingClientRect !== 'function') {\n        return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a referenceObject ', '(https://popper.js.org/docs/v1/#referenceObject).'].join('\\n'));\n      }\n    }\n\n    return null;\n  }),\n\n  /**\n   * Popper render function or node.\n   */\n  children: PropTypes\n  /* @typescript-to-proptypes-ignore */\n  .oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n\n  /**\n   * A HTML element, component instance, or function that returns either.\n   * The `container` will have the portal children appended to it.\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\n  /* @typescript-to-proptypes-ignore */\n  .oneOfType([HTMLElementType, PropTypes.instanceOf(React.Component), PropTypes.func]),\n\n  /**\n   * Disable the portal behavior.\n   * The children stay within it's parent DOM hierarchy.\n   */\n  disablePortal: PropTypes.bool,\n\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   */\n  keepMounted: PropTypes.bool,\n\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/v1/#modifiers).\n   */\n  modifiers: PropTypes.object,\n\n  /**\n   * If `true`, the popper is visible.\n   */\n  open: PropTypes.bool.isRequired,\n\n  /**\n   * Popper placement.\n   */\n  placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n  /**\n   * Options provided to the [`popper.js`](https://popper.js.org/docs/v1/) instance.\n   */\n  popperOptions: PropTypes.object,\n\n  /**\n   * A ref that points to the used popper instance.\n   */\n  popperRef: refType,\n\n  /**\n   * @ignore\n   */\n  style: PropTypes.object,\n\n  /**\n   * Help supporting a react-transition-group/Transition component.\n   */\n  transition: PropTypes.bool\n} : void 0;\nexport default Popper;","map":{"version":3,"sources":["C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/@material-ui/core/esm/Popper/Popper.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","PopperJs","chainPropTypes","refType","HTMLElementType","useTheme","Portal","createChainedFunction","setRef","useForkRef","flipPlacement","placement","theme","direction","getAnchorEl","anchorEl","useEnhancedEffect","window","useLayoutEffect","useEffect","defaultPopperOptions","Popper","forwardRef","props","ref","children","container","_props$disablePortal","disablePortal","_props$keepMounted","keepMounted","modifiers","open","_props$placement","initialPlacement","_props$popperOptions","popperOptions","popperRefProp","popperRef","style","_props$transition","transition","other","tooltipRef","useRef","ownRef","handlePopperRef","handlePopperRefRef","current","useImperativeHandle","_React$useState","useState","exited","setExited","rtlPlacement","_React$useState2","setPlacement","update","handleOpen","useCallback","destroy","handlePopperUpdate","data","resolvedAnchorEl","process","env","NODE_ENV","nodeType","box","getBoundingClientRect","top","left","right","bottom","console","warn","join","popper","preventOverflow","boundariesElement","onCreate","onUpdate","handleRef","node","handleEnter","handleClose","handleExited","childProps","TransitionProps","in","onEnter","onExited","createElement","role","position","display","propTypes","oneOfType","object","func","Error","clientWidth","clientHeight","isRequired","instanceOf","Component","bool","oneOf"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,WAArB;AACA,SAASC,cAAT,EAAyBC,OAAzB,EAAkCC,eAAlC,QAAyD,oBAAzD;AACA,SAASC,QAAT,QAAyB,qBAAzB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,qBAAP,MAAkC,gCAAlC;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,OAAOC,UAAP,MAAuB,qBAAvB;;AAEA,SAASC,aAAT,CAAuBC,SAAvB,EAAkCC,KAAlC,EAAyC;AACvC,MAAIC,SAAS,GAAGD,KAAK,IAAIA,KAAK,CAACC,SAAf,IAA4B,KAA5C;;AAEA,MAAIA,SAAS,KAAK,KAAlB,EAAyB;AACvB,WAAOF,SAAP;AACD;;AAED,UAAQA,SAAR;AACE,SAAK,YAAL;AACE,aAAO,cAAP;;AAEF,SAAK,cAAL;AACE,aAAO,YAAP;;AAEF,SAAK,SAAL;AACE,aAAO,WAAP;;AAEF,SAAK,WAAL;AACE,aAAO,SAAP;;AAEF;AACE,aAAOA,SAAP;AAdJ;AAgBD;;AAED,SAASG,WAAT,CAAqBC,QAArB,EAA+B;AAC7B,SAAO,OAAOA,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ACkG,MAtEoC;;AAwEzD;AACF;AACA;AACElE,EAAAA,IAAI,EAAEhC,SAAS,CAAC0G,IAAV,CAAeH,UA3EoC;;AA6EzD;AACF;AACA;AACE5F,EAAAA,SAAS,EAAEX,SAAS,CAAC2G,KAAV,CAAgB,CAAC,YAAD,EAAe,cAAf,EAA+B,QAA/B,EAAyC,UAAzC,EAAqD,YAArD,EAAmE,MAAnE,EAA2E,WAA3E,EAAwF,aAAxF,EAAuG,OAAvG,EAAgH,SAAhH,EAA2H,WAA3H,EAAwI,KAAxI,CAAhB,CAhF8C;;AAkFzD;AACF;AACA;AACEvE,EAAAA,aAAa,EAAEpC,SAAS,CAACkG,MArFgC;;AAuFzD;AACF;AACA;AACE5D,EAAAA,SAAS,EAAEnC,OA1F8C;;AA4FzD;AACF;AACA;AACEoC,EAAAA,KAAK,EAAEvC,SAAS,CAACkG,MA/FwC;;AAiGzD;AACF;AACA;AACEzD,EAAAA,UAAU,EAAEzC,SAAS,CAAC0G;AApGmC,CAA3D,GAqGI,KAAK,CArGT;AAsGA,eAAerF,MAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport PopperJs from 'popper.js';\nimport { chainPropTypes, refType, HTMLElementType } from '@material-ui/utils';\nimport { useTheme } from '@material-ui/styles';\nimport Portal from '../Portal';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport setRef from '../utils/setRef';\nimport useForkRef from '../utils/useForkRef';\n\nfunction flipPlacement(placement, theme) {\n  var direction = theme && theme.direction || 'ltr';\n\n  if (direction === 'ltr') {\n    return placement;\n  }\n\n  switch (placement) {\n    case 'bottom-end':\n      return 'bottom-start';\n\n    case 'bottom-start':\n      return 'bottom-end';\n\n    case 'top-end':\n      return 'top-start';\n\n    case 'top-start':\n      return 'top-end';\n\n    default:\n      return placement;\n  }\n}\n\nfunction getAnchorEl(anchorEl) {\n  return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar defaultPopperOptions = {};\n/**\n * Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.\n */\n\nvar Popper = /*#__PURE__*/React.forwardRef(function Popper(props, ref) {\n  var anchorEl = props.anchorEl,\n      children = props.children,\n      container = props.container,\n      _props$disablePortal = props.disablePortal,\n      disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,\n      _props$keepMounted = props.keepMounted,\n      keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,\n      modifiers = props.modifiers,\n      open = props.open,\n      _props$placement = props.placement,\n      initialPlacement = _props$placement === void 0 ? 'bottom' : _props$placement,\n      _props$popperOptions = props.popperOptions,\n      popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions,\n      popperRefProp = props.popperRef,\n      style = props.style,\n      _props$transition = props.transition,\n      transition = _props$transition === void 0 ? false : _props$transition,\n      other = _objectWithoutProperties(props, [\"anchorEl\", \"children\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"style\", \"transition\"]);\n\n  var tooltipRef = React.useRef(null);\n  var ownRef = useForkRef(tooltipRef, ref);\n  var popperRef = React.useRef(null);\n  var handlePopperRef = useForkRef(popperRef, popperRefProp);\n  var handlePopperRefRef = React.useRef(handlePopperRef);\n  useEnhancedEffect(function () {\n    handlePopperRefRef.current = handlePopperRef;\n  }, [handlePopperRef]);\n  React.useImperativeHandle(popperRefProp, function () {\n    return popperRef.current;\n  }, []);\n\n  var _React$useState = React.useState(true),\n      exited = _React$useState[0],\n      setExited = _React$useState[1];\n\n  var theme = useTheme();\n  var rtlPlacement = flipPlacement(initialPlacement, theme);\n  /**\n   * placement initialized from prop but can change during lifetime if modifiers.flip.\n   * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n   */\n\n  var _React$useState2 = React.useState(rtlPlacement),\n      placement = _React$useState2[0],\n      setPlacement = _React$useState2[1];\n\n  React.useEffect(function () {\n    if (popperRef.current) {\n      popperRef.current.update();\n    }\n  });\n  var handleOpen = React.useCallback(function () {\n    if (!tooltipRef.current || !anchorEl || !open) {\n      return;\n    }\n\n    if (popperRef.current) {\n      popperRef.current.destroy();\n      handlePopperRefRef.current(null);\n    }\n\n    var handlePopperUpdate = function handlePopperUpdate(data) {\n      setPlacement(data.placement);\n    };\n\n    var resolvedAnchorEl = getAnchorEl(anchorEl);\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n        var box = resolvedAnchorEl.getBoundingClientRect();\n\n        if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n          console.warn(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n        }\n      }\n    }\n\n    var popper = new PopperJs(getAnchorEl(anchorEl), tooltipRef.current, _extends({\n      placement: rtlPlacement\n    }, popperOptions, {\n      modifiers: _extends({}, disablePortal ? {} : {\n        // It's using scrollParent by default, we can use the viewport when using a portal.\n        preventOverflow: {\n          boundariesElement: 'window'\n        }\n      }, modifiers, popperOptions.modifiers),\n      // We could have been using a custom modifier like react-popper is doing.\n      // But it seems this is the best public API for this use case.\n      onCreate: createChainedFunction(handlePopperUpdate, popperOptions.onCreate),\n      onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate)\n    }));\n    handlePopperRefRef.current(popper);\n  }, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]);\n  var handleRef = React.useCallback(function (node) {\n    setRef(ownRef, node);\n    handleOpen();\n  }, [ownRef, handleOpen]);\n\n  var handleEnter = function handleEnter() {\n    setExited(false);\n  };\n\n  var handleClose = function handleClose() {\n    if (!popperRef.current) {\n      return;\n    }\n\n    popperRef.current.destroy();\n    handlePopperRefRef.current(null);\n  };\n\n  var handleExited = function handleExited() {\n    setExited(true);\n    handleClose();\n  };\n\n  React.useEffect(function () {\n    return function () {\n      handleClose();\n    };\n  }, []);\n  React.useEffect(function () {\n    if (!open && !transition) {\n      // Otherwise handleExited will call this.\n      handleClose();\n    }\n  }, [open, transition]);\n\n  if (!keepMounted && !open && (!transition || exited)) {\n    return null;\n  }\n\n  var childProps = {\n    placement: placement\n  };\n\n  if (transition) {\n    childProps.TransitionProps = {\n      in: open,\n      onEnter: handleEnter,\n      onExited: handleExited\n    };\n  }\n\n  return /*#__PURE__*/React.createElement(Portal, {\n    disablePortal: disablePortal,\n    container: container\n  }, /*#__PURE__*/React.createElement(\"div\", _extends({\n    ref: handleRef,\n    role: \"tooltip\"\n  }, other, {\n    style: _extends({\n      // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n      position: 'fixed',\n      // Fix Popper.js display issue\n      top: 0,\n      left: 0,\n      display: !open && keepMounted && !transition ? 'none' : null\n    }, style)\n  }), typeof children === 'function' ? children(childProps) : children));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes = {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit the d.ts file and run \"yarn proptypes\"     |\n  // ----------------------------------------------------------------------\n\n  /**\n   * A HTML element, [referenceObject](https://popper.js.org/docs/v1/#referenceObject),\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: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), function (props) {\n    if (props.open) {\n      var resolvedAnchorEl = getAnchorEl(props.anchorEl);\n\n      if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n        var box = resolvedAnchorEl.getBoundingClientRect();\n\n        if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n          return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n        }\n      } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.clientWidth !== 'number' || typeof resolvedAnchorEl.clientHeight !== 'number' || typeof resolvedAnchorEl.getBoundingClientRect !== 'function') {\n        return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a referenceObject ', '(https://popper.js.org/docs/v1/#referenceObject).'].join('\\n'));\n      }\n    }\n\n    return null;\n  }),\n\n  /**\n   * Popper render function or node.\n   */\n  children: PropTypes\n  /* @typescript-to-proptypes-ignore */\n  .oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n\n  /**\n   * A HTML element, component instance, or function that returns either.\n   * The `container` will have the portal children appended to it.\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\n  /* @typescript-to-proptypes-ignore */\n  .oneOfType([HTMLElementType, PropTypes.instanceOf(React.Component), PropTypes.func]),\n\n  /**\n   * Disable the portal behavior.\n   * The children stay within it's parent DOM hierarchy.\n   */\n  disablePortal: PropTypes.bool,\n\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   */\n  keepMounted: PropTypes.bool,\n\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/v1/#modifiers).\n   */\n  modifiers: PropTypes.object,\n\n  /**\n   * If `true`, the popper is visible.\n   */\n  open: PropTypes.bool.isRequired,\n\n  /**\n   * Popper placement.\n   */\n  placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n  /**\n   * Options provided to the [`popper.js`](https://popper.js.org/docs/v1/) instance.\n   */\n  popperOptions: PropTypes.object,\n\n  /**\n   * A ref that points to the used popper instance.\n   */\n  popperRef: refType,\n\n  /**\n   * @ignore\n   */\n  style: PropTypes.object,\n\n  /**\n   * Help supporting a react-transition-group/Transition component.\n   */\n  transition: PropTypes.bool\n} : void 0;\nexport default Popper;"]},"metadata":{},"sourceType":"module"}