{"version":3,"sources":["webpack:///./node_modules/rc-trigger/es/utils.js","webpack:///./node_modules/rc-trigger/es/LazyRenderBox.js","webpack:///./node_modules/rc-trigger/es/PopupInner.js","webpack:///./node_modules/rc-trigger/es/Popup.js","webpack:///./node_modules/rc-trigger/es/index.js"],"names":["isPointsEq","a1","a2","isAlignPoint","saveRef","name","component","this","_Component","LazyRenderBox","apply","arguments","prototype","shouldComponentUpdate","nextProps","hiddenClassName","visible","render","_props","props","Children","count","children","className","createElement","only","propTypes","any","string","bool","PopupInner","onMouseEnter","onMouseLeave","onMouseDown","onTouchStart","style","prefixCls","func","Popup","_this","call","state","stretchChecked","targetWidth","undefined","targetHeight","savePopupRef","bind","saveAlignRef","componentDidMount","rootNode","getPopupDomNode","setStretchSize","componentDidUpdate","findDOMNode","popupInstance","getMaskTransitionName","transitionName","maskTransitionName","animation","maskAnimation","getTransitionName","getClassName","currentAlignClassName","getPopupElement","_this2","_state","align","getClassNameFromAlign","destroyPopupOnHide","stretch","sizeStyle","indexOf","height","minHeight","width","minWidth","visibility","setTimeout","alignInstance","forceAlign","popupInnerProps","ref","getZIndexStyle","Animate","exclusive","transitionAppear","target","getAlignTarget","key","monitorWindowResize","onAlign","showProp","xVisible","childrenProps","disabled","zIndex","getMaskElement","maskElement","mask","maskTransition","object","getRootDomNode","node","point","shape","pageX","number","pageY","_this3","popupDomNode","_props2","_state2","$ele","offsetHeight","offsetWidth","setState","getTargetElement","noop","ALL_HANDLERS","IS_REACT_16","contextTypes","rcTrigger","onPopupMouseDown","_React$Component","Trigger","popupVisible","defaultPopupVisible","prevPopupVisible","forEach","h","e","fireEvents","getChildContext","_","prevState","renderComponent","afterPopupVisibleChange","currentDocument","clickOutsideHandler","isClickToHide","isContextMenuToShow","getDocument","addEventListener","onDocumentClick","touchOutsideHandler","contextMenuOutsideHandler1","onContextMenuClose","contextMenuOutsideHandler2","window","clearOutsideHandler","componentWillUnmount","clearDelayTimer","clearTimeout","mouseDownTimeout","getDerivedStateFromProps","_ref","newState","_component","getPopupAlign","popupPlacement","popupAlign","builtinPlacements","placementStr","baseAlign","getAlignFromPlacement","setPopupVisible","event","alignPoint","onPopupVisibleChange","setPoint","delaySetPopupVisible","delayS","delay","delayTimer","remove","createTwoChains","childPros","isClickToShow","action","showAction","_props3","hideAction","isMouseEnterToShow","_props4","isMouseLeaveToHide","_props5","isFocusToShow","_props6","isBlurToHide","_props7","forcePopupAlign","type","childCallback","callback","close","_props8","forceRender","child","newChildProps","onContextMenu","onClick","onMouseMove","onFocus","onBlur","childrenClassName","trigger","cloneElement","ContainerRender","parent","autoMount","getComponent","getContainer","_ref2","portal","Portal","didUpdate","handlePortalUpdate","Component","oneOfType","arrayOf","getPopupClassNameFromAlign","popup","isRequired","popupStyle","popupClassName","popupTransitionName","popupAnimation","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","getPopupContainer","maskClosable","onPopupAlign","childContextTypes","defaultProps","document","_this4","onPopupMouseEnter","onPopupMouseLeave","relatedTarget","contains","focusTime","Date","now","preClickTime","preTouchTime","preventDefault","preTime","Math","min","abs","nextVisible","_context$rcTrigger","context","hasPopupMouseDown","root","_props9","push","points","placement","hasOwnProperty","getAlignPopupClassName","join","_props10","mouseProps","savePopup","popupContainer","position","top","left","body","appendChild"],"mappings":"gRACA,SAASA,EAAWC,EAAIC,EAAIC,GAC1B,OAAIA,EACKF,EAAG,KAAOC,EAAG,GAEfD,EAAG,KAAOC,EAAG,IAAMD,EAAG,KAAOC,EAAG,GAoBlC,SAASE,EAAQC,EAAMC,GAC5BC,KAAKF,GAAQC,E,sCCnBX,EAAgB,SAAUE,GAG5B,SAASC,IAGP,OAFA,IAAgBF,KAAME,GAEf,IAA2BF,KAAMC,EAAWE,MAAMH,KAAMI,YAuBjE,OA5BA,IAAUF,EAAeD,GAQzBC,EAAcG,UAAUC,sBAAwB,SAA+BC,GAC7E,OAAOA,EAAUC,iBAAmBD,EAAUE,SAGhDP,EAAcG,UAAUK,OAAS,WAC/B,IAAIC,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UAAWwK,EACX/J,sBAAuB0K,EAAOjB,4BAC7B6C,EAAY,CACbpM,QAASA,EACTgC,eAAgBwI,EAAOxI,eACvBnE,MAAO6L,EACP7H,KAAMA,EACNH,OAAQA,EACRvC,eAAgByK,EAChBtK,cAAeA,EACfF,mBAAoBA,EACpBwB,IAAK4J,EAAO6B,YAEG,mBAAV7C,EAAuBA,IAAUA,IAI5CvN,KAAK6M,aAAe,WAClB,IAAIjM,EAAQ2N,EAAO3N,MAEfyP,EAAiB/B,SAASrN,cAAc,OAS5C,OANAoP,EAAezO,MAAM0O,SAAW,WAChCD,EAAezO,MAAM2O,IAAM,IAC3BF,EAAezO,MAAM4O,KAAO,IAC5BH,EAAezO,MAAMwC,MAAQ,QACbxD,EAAMqN,kBAAoBrN,EAAMqN,kBAAkB,sBAAYM,IAAW3N,EAAM2H,cAAckI,MACnGC,YAAYL,GACfA,GAGTrQ,KAAKmK,SAAW,SAAUlE,GACPsI,EAAO3N,MAAMqJ,YAEVhE,GAEpBsI,EAAO1H,SAAS,CACdZ,MAAO,CACLE,MAAOF,EAAME,MACbE,MAAOJ,EAAMI,UAKnBrG,KAAKkN,mBAAqB,WACpBqB,EAAOrM,MAAMuF,mBAAqB8G,EAAOrM,MAAMqF,cACjDgH,EAAO3N,MAAMsH,wBAAwBqG,EAAOrM,MAAMqF,eAItDvH,KAAKoQ,UAAY,SAAUpK,GACzBuI,EAAOhF,WAAavD,IAIxB,mBAAS,GAEM","file":"npm.rc-trigger.c920b4ddeb9b68365139.js","sourcesContent":["import _extends from 'babel-runtime/helpers/extends';\nfunction isPointsEq(a1, a2, isAlignPoint) {\n if (isAlignPoint) {\n return a1[0] === a2[0];\n }\n return a1[0] === a2[0] && a1[1] === a2[1];\n}\n\nexport function getAlignFromPlacement(builtinPlacements, placementStr, align) {\n var baseAlign = builtinPlacements[placementStr] || {};\n return _extends({}, baseAlign, align);\n}\n\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n var points = align.points;\n for (var placement in builtinPlacements) {\n if (builtinPlacements.hasOwnProperty(placement)) {\n if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {\n return prefixCls + '-placement-' + placement;\n }\n }\n }\n return '';\n}\n\nexport function saveRef(name, component) {\n this[name] = component;\n}","import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nvar LazyRenderBox = function (_Component) {\n _inherits(LazyRenderBox, _Component);\n\n function LazyRenderBox() {\n _classCallCheck(this, LazyRenderBox);\n\n return _possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return nextProps.hiddenClassName || nextProps.visible;\n };\n\n LazyRenderBox.prototype.render = function render() {\n var _props = this.props,\n hiddenClassName = _props.hiddenClassName,\n visible = _props.visible,\n props = _objectWithoutProperties(_props, ['hiddenClassName', 'visible']);\n\n if (hiddenClassName || React.Children.count(props.children) > 1) {\n if (!visible && hiddenClassName) {\n props.className += ' ' + hiddenClassName;\n }\n return React.createElement('div', props);\n }\n\n return React.Children.only(props.children);\n };\n\n return LazyRenderBox;\n}(Component);\n\nLazyRenderBox.propTypes = {\n children: PropTypes.any,\n className: PropTypes.string,\n visible: PropTypes.bool,\n hiddenClassName: PropTypes.string\n};\n\n\nexport default LazyRenderBox;","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport LazyRenderBox from './LazyRenderBox';\n\nvar PopupInner = function (_Component) {\n _inherits(PopupInner, _Component);\n\n function PopupInner() {\n _classCallCheck(this, PopupInner);\n\n return _possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n PopupInner.prototype.render = function render() {\n var props = this.props;\n var className = props.className;\n if (!props.visible) {\n className += ' ' + props.hiddenClassName;\n }\n return React.createElement(\n 'div',\n {\n className: className,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n onMouseDown: props.onMouseDown,\n onTouchStart: props.onTouchStart,\n style: props.style\n },\n React.createElement(\n LazyRenderBox,\n { className: props.prefixCls + '-content', visible: props.visible },\n props.children\n )\n );\n };\n\n return PopupInner;\n}(Component);\n\nPopupInner.propTypes = {\n hiddenClassName: PropTypes.string,\n className: PropTypes.string,\n prefixCls: PropTypes.string,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseDown: PropTypes.func,\n onTouchStart: PropTypes.func,\n children: PropTypes.any\n};\n\n\nexport default PopupInner;","import _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport Align from 'rc-align';\nimport Animate from 'rc-animate';\nimport PopupInner from './PopupInner';\nimport LazyRenderBox from './LazyRenderBox';\nimport { saveRef } from './utils';\n\nvar Popup = function (_Component) {\n _inherits(Popup, _Component);\n\n function Popup(props) {\n _classCallCheck(this, Popup);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n _this.state = {\n // Used for stretch\n stretchChecked: false,\n targetWidth: undefined,\n targetHeight: undefined\n };\n\n _this.savePopupRef = saveRef.bind(_this, 'popupInstance');\n _this.saveAlignRef = saveRef.bind(_this, 'alignInstance');\n return _this;\n }\n\n Popup.prototype.componentDidMount = function componentDidMount() {\n this.rootNode = this.getPopupDomNode();\n this.setStretchSize();\n };\n\n Popup.prototype.componentDidUpdate = function componentDidUpdate() {\n this.setStretchSize();\n };\n\n // Record size if stretch needed\n\n\n Popup.prototype.getPopupDomNode = function getPopupDomNode() {\n return ReactDOM.findDOMNode(this.popupInstance);\n };\n\n // `target` on `rc-align` can accept as a function to get the bind element or a point.\n // ref: https://www.npmjs.com/package/rc-align\n\n\n Popup.prototype.getMaskTransitionName = function getMaskTransitionName() {\n var props = this.props;\n var transitionName = props.maskTransitionName;\n var animation = props.maskAnimation;\n if (!transitionName && animation) {\n transitionName = props.prefixCls + '-' + animation;\n }\n return transitionName;\n };\n\n Popup.prototype.getTransitionName = function getTransitionName() {\n var props = this.props;\n var transitionName = props.transitionName;\n if (!transitionName && props.animation) {\n transitionName = props.prefixCls + '-' + props.animation;\n }\n return transitionName;\n };\n\n Popup.prototype.getClassName = function getClassName(currentAlignClassName) {\n return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName;\n };\n\n Popup.prototype.getPopupElement = function getPopupElement() {\n var _this2 = this;\n\n var savePopupRef = this.savePopupRef;\n var _state = this.state,\n stretchChecked = _state.stretchChecked,\n targetHeight = _state.targetHeight,\n targetWidth = _state.targetWidth;\n var _props = this.props,\n align = _props.align,\n visible = _props.visible,\n prefixCls = _props.prefixCls,\n style = _props.style,\n getClassNameFromAlign = _props.getClassNameFromAlign,\n destroyPopupOnHide = _props.destroyPopupOnHide,\n stretch = _props.stretch,\n children = _props.children,\n onMouseEnter = _props.onMouseEnter,\n onMouseLeave = _props.onMouseLeave,\n onMouseDown = _props.onMouseDown,\n onTouchStart = _props.onTouchStart;\n\n var className = this.getClassName(this.currentAlignClassName || getClassNameFromAlign(align));\n var hiddenClassName = prefixCls + '-hidden';\n\n if (!visible) {\n this.currentAlignClassName = null;\n }\n\n var sizeStyle = {};\n if (stretch) {\n // Stretch with target\n if (stretch.indexOf('height') !== -1) {\n sizeStyle.height = targetHeight;\n } else if (stretch.indexOf('minHeight') !== -1) {\n sizeStyle.minHeight = targetHeight;\n }\n if (stretch.indexOf('width') !== -1) {\n sizeStyle.width = targetWidth;\n } else if (stretch.indexOf('minWidth') !== -1) {\n sizeStyle.minWidth = targetWidth;\n }\n\n // Delay force align to makes ui smooth\n if (!stretchChecked) {\n sizeStyle.visibility = 'hidden';\n setTimeout(function () {\n if (_this2.alignInstance) {\n _this2.alignInstance.forceAlign();\n }\n }, 0);\n }\n }\n\n var newStyle = _extends({}, sizeStyle, style, this.getZIndexStyle());\n\n var popupInnerProps = {\n className: className,\n prefixCls: prefixCls,\n ref: savePopupRef,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseDown: onMouseDown,\n onTouchStart: onTouchStart,\n style: newStyle\n };\n if (destroyPopupOnHide) {\n return React.createElement(\n Animate,\n {\n component: '',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName()\n },\n visible ? React.createElement(\n Align,\n {\n target: this.getAlignTarget(),\n key: 'popup',\n ref: this.saveAlignRef,\n monitorWindowResize: true,\n align: align,\n onAlign: this.onAlign\n },\n React.createElement(\n PopupInner,\n _extends({\n visible: true\n }, popupInnerProps),\n children\n )\n ) : null\n );\n }\n\n return React.createElement(\n Animate,\n {\n component: '',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName(),\n showProp: 'xVisible'\n },\n React.createElement(\n Align,\n {\n target: this.getAlignTarget(),\n key: 'popup',\n ref: this.saveAlignRef,\n monitorWindowResize: true,\n xVisible: visible,\n childrenProps: { visible: 'xVisible' },\n disabled: !visible,\n align: align,\n onAlign: this.onAlign\n },\n React.createElement(\n PopupInner,\n _extends({\n hiddenClassName: hiddenClassName\n }, popupInnerProps),\n children\n )\n )\n );\n };\n\n Popup.prototype.getZIndexStyle = function getZIndexStyle() {\n var style = {};\n var props = this.props;\n if (props.zIndex !== undefined) {\n style.zIndex = props.zIndex;\n }\n return style;\n };\n\n Popup.prototype.getMaskElement = function getMaskElement() {\n var props = this.props;\n var maskElement = void 0;\n if (props.mask) {\n var maskTransition = this.getMaskTransitionName();\n maskElement = React.createElement(LazyRenderBox, {\n style: this.getZIndexStyle(),\n key: 'mask',\n className: props.prefixCls + '-mask',\n hiddenClassName: props.prefixCls + '-mask-hidden',\n visible: props.visible\n });\n if (maskTransition) {\n maskElement = React.createElement(\n Animate,\n {\n key: 'mask',\n showProp: 'visible',\n transitionAppear: true,\n component: '',\n transitionName: maskTransition\n },\n maskElement\n );\n }\n }\n return maskElement;\n };\n\n Popup.prototype.render = function render() {\n return React.createElement(\n 'div',\n null,\n this.getMaskElement(),\n this.getPopupElement()\n );\n };\n\n return Popup;\n}(Component);\n\nPopup.propTypes = {\n visible: PropTypes.bool,\n style: PropTypes.object,\n getClassNameFromAlign: PropTypes.func,\n onAlign: PropTypes.func,\n getRootDomNode: PropTypes.func,\n align: PropTypes.any,\n destroyPopupOnHide: PropTypes.bool,\n className: PropTypes.string,\n prefixCls: PropTypes.string,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseDown: PropTypes.func,\n onTouchStart: PropTypes.func,\n stretch: PropTypes.string,\n children: PropTypes.node,\n point: PropTypes.shape({\n pageX: PropTypes.number,\n pageY: PropTypes.number\n })\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this3 = this;\n\n this.onAlign = function (popupDomNode, align) {\n var props = _this3.props;\n var currentAlignClassName = props.getClassNameFromAlign(align);\n // FIX: https://github.com/react-component/trigger/issues/56\n // FIX: https://github.com/react-component/tooltip/issues/79\n if (_this3.currentAlignClassName !== currentAlignClassName) {\n _this3.currentAlignClassName = currentAlignClassName;\n popupDomNode.className = _this3.getClassName(currentAlignClassName);\n }\n props.onAlign(popupDomNode, align);\n };\n\n this.setStretchSize = function () {\n var _props2 = _this3.props,\n stretch = _props2.stretch,\n getRootDomNode = _props2.getRootDomNode,\n visible = _props2.visible;\n var _state2 = _this3.state,\n stretchChecked = _state2.stretchChecked,\n targetHeight = _state2.targetHeight,\n targetWidth = _state2.targetWidth;\n\n\n if (!stretch || !visible) {\n if (stretchChecked) {\n _this3.setState({ stretchChecked: false });\n }\n return;\n }\n\n var $ele = getRootDomNode();\n if (!$ele) return;\n\n var height = $ele.offsetHeight;\n var width = $ele.offsetWidth;\n\n if (targetHeight !== height || targetWidth !== width || !stretchChecked) {\n _this3.setState({\n stretchChecked: true,\n targetHeight: height,\n targetWidth: width\n });\n }\n };\n\n this.getTargetElement = function () {\n return _this3.props.getRootDomNode();\n };\n\n this.getAlignTarget = function () {\n var point = _this3.props.point;\n\n if (point) {\n return point;\n }\n return _this3.getTargetElement;\n };\n};\n\nexport default Popup;","import _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { findDOMNode, createPortal } from 'react-dom';\nimport { polyfill } from 'react-lifecycles-compat';\nimport contains from 'rc-util/es/Dom/contains';\nimport addEventListener from 'rc-util/es/Dom/addEventListener';\nimport ContainerRender from 'rc-util/es/ContainerRender';\nimport Portal from 'rc-util/es/Portal';\nimport classNames from 'classnames';\n\nimport { getAlignFromPlacement, getAlignPopupClassName } from './utils';\nimport Popup from './Popup';\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nfunction returnDocument() {\n return window.document;\n}\n\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];\n\nvar IS_REACT_16 = !!createPortal;\n\nvar contextTypes = {\n rcTrigger: PropTypes.shape({\n onPopupMouseDown: PropTypes.func\n })\n};\n\nvar Trigger = function (_React$Component) {\n _inherits(Trigger, _React$Component);\n\n function Trigger(props) {\n _classCallCheck(this, Trigger);\n\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n var popupVisible = void 0;\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n\n ALL_HANDLERS.forEach(function (h) {\n _this['fire' + h] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n Trigger.prototype.getChildContext = function getChildContext() {\n return {\n rcTrigger: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n };\n };\n\n Trigger.prototype.componentDidMount = function componentDidMount() {\n this.componentDidUpdate({}, {\n popupVisible: this.state.popupVisible\n });\n };\n\n Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) {\n var props = this.props;\n var state = this.state;\n var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() {\n if (prevState.popupVisible !== state.popupVisible) {\n props.afterPopupVisibleChange(state.popupVisible);\n }\n };\n if (!IS_REACT_16) {\n this.renderComponent(null, triggerAfterPopupVisibleChange);\n }\n\n // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n if (state.popupVisible) {\n var currentDocument = void 0;\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument();\n this.clickOutsideHandler = addEventListener(currentDocument, 'mousedown', this.onDocumentClick);\n }\n // always hide on mobile\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument();\n this.touchOutsideHandler = addEventListener(currentDocument, 'touchstart', this.onDocumentClick);\n }\n // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument();\n this.contextMenuOutsideHandler1 = addEventListener(currentDocument, 'scroll', this.onContextMenuClose);\n }\n // close popup when trigger type contains 'onContextMenu' and window is blur.\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = addEventListener(window, 'blur', this.onContextMenuClose);\n }\n return;\n }\n\n this.clearOutsideHandler();\n };\n\n Trigger.prototype.componentWillUnmount = function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n };\n\n Trigger.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n };\n\n Trigger.prototype.getPopupDomNode = function getPopupDomNode() {\n // for test\n if (this._component && this._component.getPopupDomNode) {\n return this._component.getPopupDomNode();\n }\n return null;\n };\n\n Trigger.prototype.getPopupAlign = function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);\n }\n return popupAlign;\n };\n\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n\n\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({ popupVisible: popupVisible, prevPopupVisible: prevPopupVisible });\n }\n this.props.onPopupVisibleChange(popupVisible);\n }\n\n // Always record the point position since mouseEnterDelay will delay the show\n if (alignPoint && event) {\n this.setPoint(event);\n }\n };\n\n Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n if (delay) {\n var point = event ? { pageX: event.pageX, pageY: event.pageY } : null;\n this.delayTimer = setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n };\n\n Trigger.prototype.clearDelayTimer = function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n };\n\n Trigger.prototype.clearOutsideHandler = function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n };\n\n Trigger.prototype.createTwoChains = function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n if (childPros[event] && props[event]) {\n return this['fire' + event];\n }\n return childPros[event] || props[event];\n };\n\n Trigger.prototype.isClickToShow = function isClickToShow() {\n var _props = this.props,\n action = _props.action,\n showAction = _props.showAction;\n\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n };\n\n Trigger.prototype.isContextMenuToShow = function isContextMenuToShow() {\n var _props2 = this.props,\n action = _props2.action,\n showAction = _props2.showAction;\n\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n };\n\n Trigger.prototype.isClickToHide = function isClickToHide() {\n var _props3 = this.props,\n action = _props3.action,\n hideAction = _props3.hideAction;\n\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n };\n\n Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() {\n var _props4 = this.props,\n action = _props4.action,\n showAction = _props4.showAction;\n\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n };\n\n Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() {\n var _props5 = this.props,\n action = _props5.action,\n hideAction = _props5.hideAction;\n\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n };\n\n Trigger.prototype.isFocusToShow = function isFocusToShow() {\n var _props6 = this.props,\n action = _props6.action,\n showAction = _props6.showAction;\n\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n };\n\n Trigger.prototype.isBlurToHide = function isBlurToHide() {\n var _props7 = this.props,\n action = _props7.action,\n hideAction = _props7.hideAction;\n\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n };\n\n Trigger.prototype.forcePopupAlign = function forcePopupAlign() {\n if (this.state.popupVisible && this._component && this._component.alignInstance) {\n this._component.alignInstance.forceAlign();\n }\n };\n\n Trigger.prototype.fireEvents = function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n if (childCallback) {\n childCallback(e);\n }\n var callback = this.props[type];\n if (callback) {\n callback(e);\n }\n };\n\n Trigger.prototype.close = function close() {\n this.setPopupVisible(false);\n };\n\n Trigger.prototype.render = function render() {\n var _this3 = this;\n\n var popupVisible = this.state.popupVisible;\n var _props8 = this.props,\n children = _props8.children,\n forceRender = _props8.forceRender,\n alignPoint = _props8.alignPoint,\n className = _props8.className;\n\n var child = React.Children.only(children);\n var newChildProps = { key: 'trigger' };\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n }\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n }\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter;\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n }\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n }\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n }\n\n var childrenClassName = classNames(child && child.props && child.props.className, className);\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n var trigger = React.cloneElement(child, newChildProps);\n\n if (!IS_REACT_16) {\n return React.createElement(\n ContainerRender,\n {\n parent: this,\n visible: popupVisible,\n autoMount: false,\n forceRender: forceRender,\n getComponent: this.getComponent,\n getContainer: this.getContainer\n },\n function (_ref2) {\n var renderComponent = _ref2.renderComponent;\n\n _this3.renderComponent = renderComponent;\n return trigger;\n }\n );\n }\n\n var portal = void 0;\n // prevent unmounting after it's rendered\n if (popupVisible || this._component || forceRender) {\n portal = React.createElement(\n Portal,\n { key: 'portal', getContainer: this.getContainer, didUpdate: this.handlePortalUpdate },\n this.getComponent()\n );\n }\n\n return [trigger, portal];\n };\n\n return Trigger;\n}(React.Component);\n\nTrigger.propTypes = {\n children: PropTypes.any,\n action: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n showAction: PropTypes.any,\n hideAction: PropTypes.any,\n getPopupClassNameFromAlign: PropTypes.any,\n onPopupVisibleChange: PropTypes.func,\n afterPopupVisibleChange: PropTypes.func,\n popup: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n popupStyle: PropTypes.object,\n prefixCls: PropTypes.string,\n popupClassName: PropTypes.string,\n className: PropTypes.string,\n popupPlacement: PropTypes.string,\n builtinPlacements: PropTypes.object,\n popupTransitionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n popupAnimation: PropTypes.any,\n mouseEnterDelay: PropTypes.number,\n mouseLeaveDelay: PropTypes.number,\n zIndex: PropTypes.number,\n focusDelay: PropTypes.number,\n blurDelay: PropTypes.number,\n getPopupContainer: PropTypes.func,\n getDocument: PropTypes.func,\n forceRender: PropTypes.bool,\n destroyPopupOnHide: PropTypes.bool,\n mask: PropTypes.bool,\n maskClosable: PropTypes.bool,\n onPopupAlign: PropTypes.func,\n popupAlign: PropTypes.object,\n popupVisible: PropTypes.bool,\n defaultPopupVisible: PropTypes.bool,\n maskTransitionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n maskAnimation: PropTypes.string,\n stretch: PropTypes.string,\n alignPoint: PropTypes.bool // Maybe we can support user pass position in the future\n};\nTrigger.contextTypes = contextTypes;\nTrigger.childContextTypes = contextTypes;\nTrigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: []\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this4 = this;\n\n this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this4.props.mouseEnterDelay;\n\n _this4.fireEvents('onMouseEnter', e);\n _this4.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n this.onMouseMove = function (e) {\n _this4.fireEvents('onMouseMove', e);\n _this4.setPoint(e);\n };\n\n this.onMouseLeave = function (e) {\n _this4.fireEvents('onMouseLeave', e);\n _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay);\n };\n\n this.onPopupMouseEnter = function () {\n _this4.clearDelayTimer();\n };\n\n this.onPopupMouseLeave = function (e) {\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && _this4._component && _this4._component.getPopupDomNode && contains(_this4._component.getPopupDomNode(), e.relatedTarget)) {\n return;\n }\n _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay);\n };\n\n this.onFocus = function (e) {\n _this4.fireEvents('onFocus', e);\n // incase focusin and focusout\n _this4.clearDelayTimer();\n if (_this4.isFocusToShow()) {\n _this4.focusTime = Date.now();\n _this4.delaySetPopupVisible(true, _this4.props.focusDelay);\n }\n };\n\n this.onMouseDown = function (e) {\n _this4.fireEvents('onMouseDown', e);\n _this4.preClickTime = Date.now();\n };\n\n this.onTouchStart = function (e) {\n _this4.fireEvents('onTouchStart', e);\n _this4.preTouchTime = Date.now();\n };\n\n this.onBlur = function (e) {\n _this4.fireEvents('onBlur', e);\n _this4.clearDelayTimer();\n if (_this4.isBlurToHide()) {\n _this4.delaySetPopupVisible(false, _this4.props.blurDelay);\n }\n };\n\n this.onContextMenu = function (e) {\n e.preventDefault();\n _this4.fireEvents('onContextMenu', e);\n _this4.setPopupVisible(true, e);\n };\n\n this.onContextMenuClose = function () {\n if (_this4.isContextMenuToShow()) {\n _this4.close();\n }\n };\n\n this.onClick = function (event) {\n _this4.fireEvents('onClick', event);\n // focus will trigger click\n if (_this4.focusTime) {\n var preTime = void 0;\n if (_this4.preClickTime && _this4.preTouchTime) {\n preTime = Math.min(_this4.preClickTime, _this4.preTouchTime);\n } else if (_this4.preClickTime) {\n preTime = _this4.preClickTime;\n } else if (_this4.preTouchTime) {\n preTime = _this4.preTouchTime;\n }\n if (Math.abs(preTime - _this4.focusTime) < 20) {\n return;\n }\n _this4.focusTime = 0;\n }\n _this4.preClickTime = 0;\n _this4.preTouchTime = 0;\n\n // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n if (_this4.isClickToShow() && (_this4.isClickToHide() || _this4.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n var nextVisible = !_this4.state.popupVisible;\n if (_this4.isClickToHide() && !nextVisible || nextVisible && _this4.isClickToShow()) {\n _this4.setPopupVisible(!_this4.state.popupVisible, event);\n }\n };\n\n this.onPopupMouseDown = function () {\n var _context$rcTrigger = _this4.context.rcTrigger,\n rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger;\n\n _this4.hasPopupMouseDown = true;\n\n clearTimeout(_this4.mouseDownTimeout);\n _this4.mouseDownTimeout = setTimeout(function () {\n _this4.hasPopupMouseDown = false;\n }, 0);\n\n if (rcTrigger.onPopupMouseDown) {\n rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments);\n }\n };\n\n this.onDocumentClick = function (event) {\n if (_this4.props.mask && !_this4.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n var root = findDOMNode(_this4);\n if (!contains(root, target) && !_this4.hasPopupMouseDown) {\n _this4.close();\n }\n };\n\n this.getRootDomNode = function () {\n return findDOMNode(_this4);\n };\n\n this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _props9 = _this4.props,\n popupPlacement = _props9.popupPlacement,\n builtinPlacements = _props9.builtinPlacements,\n prefixCls = _props9.prefixCls,\n alignPoint = _props9.alignPoint,\n getPopupClassNameFromAlign = _props9.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));\n }\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n return className.join(' ');\n };\n\n this.getComponent = function () {\n var _props10 = _this4.props,\n prefixCls = _props10.prefixCls,\n destroyPopupOnHide = _props10.destroyPopupOnHide,\n popupClassName = _props10.popupClassName,\n action = _props10.action,\n onPopupAlign = _props10.onPopupAlign,\n popupAnimation = _props10.popupAnimation,\n popupTransitionName = _props10.popupTransitionName,\n popupStyle = _props10.popupStyle,\n mask = _props10.mask,\n maskAnimation = _props10.maskAnimation,\n maskTransitionName = _props10.maskTransitionName,\n zIndex = _props10.zIndex,\n popup = _props10.popup,\n stretch = _props10.stretch,\n alignPoint = _props10.alignPoint;\n var _state = _this4.state,\n popupVisible = _state.popupVisible,\n point = _state.point;\n\n\n var align = _this4.getPopupAlign();\n\n var mouseProps = {};\n if (_this4.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this4.onPopupMouseEnter;\n }\n if (_this4.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this4.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this4.onPopupMouseDown;\n mouseProps.onTouchStart = _this4.onPopupMouseDown;\n\n return React.createElement(\n Popup,\n _extends({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n action: action,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this4.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this4.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n ref: _this4.savePopup\n }),\n typeof popup === 'function' ? popup() : popup\n );\n };\n\n this.getContainer = function () {\n var props = _this4.props;\n\n var popupContainer = document.createElement('div');\n // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n var mountNode = props.getPopupContainer ? props.getPopupContainer(findDOMNode(_this4)) : props.getDocument().body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n };\n\n this.setPoint = function (point) {\n var alignPoint = _this4.props.alignPoint;\n\n if (!alignPoint || !point) return;\n\n _this4.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n this.handlePortalUpdate = function () {\n if (_this4.state.prevPopupVisible !== _this4.state.popupVisible) {\n _this4.props.afterPopupVisibleChange(_this4.state.popupVisible);\n }\n };\n\n this.savePopup = function (node) {\n _this4._component = node;\n };\n};\n\npolyfill(Trigger);\n\nexport default Trigger;"],"sourceRoot":""}