{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectDestructuringEmpty from \"@babel/runtime/helpers/esm/objectDestructuringEmpty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"className\", \"style\", \"motion\", \"motionNodes\", \"motionType\", \"onMotionStart\", \"onMotionEnd\", \"active\", \"treeNodeRequiredProps\"];\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport * as React from 'react';\nimport { TreeContext } from \"./contextTypes\";\nimport TreeNode from \"./TreeNode\";\nimport useUnmount from \"./useUnmount\";\nimport { getTreeNodeProps } from \"./utils/treeUtil\";\nvar MotionTreeNode = function MotionTreeNode(_ref, ref) {\n var className = _ref.className,\n style = _ref.style,\n motion = _ref.motion,\n motionNodes = _ref.motionNodes,\n motionType = _ref.motionType,\n onOriginMotionStart = _ref.onMotionStart,\n onOriginMotionEnd = _ref.onMotionEnd,\n active = _ref.active,\n treeNodeRequiredProps = _ref.treeNodeRequiredProps,\n props = _objectWithoutProperties(_ref, _excluded);\n var _React$useState = React.useState(true),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n visible = _React$useState2[0],\n setVisible = _React$useState2[1];\n var _React$useContext = React.useContext(TreeContext),\n prefixCls = _React$useContext.prefixCls;\n\n // Calculate target visible here.\n // And apply in effect to make `leave` motion work.\n var targetVisible = motionNodes && motionType !== 'hide';\n useLayoutEffect(function () {\n if (motionNodes) {\n if (targetVisible !== visible) {\n setVisible(targetVisible);\n }\n }\n }, [motionNodes]);\n var triggerMotionStart = function triggerMotionStart() {\n if (motionNodes) {\n onOriginMotionStart();\n }\n };\n\n // Should only trigger once\n var triggerMotionEndRef = React.useRef(false);\n var triggerMotionEnd = function triggerMotionEnd() {\n if (motionNodes && !triggerMotionEndRef.current) {\n triggerMotionEndRef.current = true;\n onOriginMotionEnd();\n }\n };\n\n // Effect if unmount\n useUnmount(triggerMotionStart, triggerMotionEnd);\n\n // Motion end event\n var onVisibleChanged = function onVisibleChanged(nextVisible) {\n if (targetVisible === nextVisible) {\n triggerMotionEnd();\n }\n };\n if (motionNodes) {\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n ref: ref,\n visible: visible\n }, motion, {\n motionAppear: motionType === 'show',\n onVisibleChanged: onVisibleChanged\n }), function (_ref2, motionRef) {\n var motionClassName = _ref2.className,\n motionStyle = _ref2.style;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: motionRef,\n className: classNames(\"\".concat(prefixCls, \"-treenode-motion\"), motionClassName),\n style: motionStyle\n }, motionNodes.map(function (treeNode) {\n var restProps = Object.assign({}, (_objectDestructuringEmpty(treeNode.data), treeNode.data)),\n title = treeNode.title,\n key = treeNode.key,\n isStart = treeNode.isStart,\n isEnd = treeNode.isEnd;\n delete restProps.children;\n var treeNodeProps = getTreeNodeProps(key, treeNodeRequiredProps);\n return /*#__PURE__*/React.createElement(TreeNode, _extends({}, restProps, treeNodeProps, {\n title: title,\n active: active,\n data: treeNode.data,\n key: key,\n isStart: isStart,\n isEnd: isEnd\n }));\n }));\n });\n }\n return /*#__PURE__*/React.createElement(TreeNode, _extends({\n domRef: ref,\n className: className,\n style: style\n }, props, {\n active: active\n }));\n};\nMotionTreeNode.displayName = 'MotionTreeNode';\nvar RefMotionTreeNode = /*#__PURE__*/React.forwardRef(MotionTreeNode);\nexport default RefMotionTreeNode;","map":{"version":3,"names":["_extends","_objectDestructuringEmpty","_slicedToArray","_objectWithoutProperties","_excluded","classNames","CSSMotion","useLayoutEffect","React","TreeContext","TreeNode","useUnmount","getTreeNodeProps","MotionTreeNode","_ref","ref","className","style","motion","motionNodes","motionType","onOriginMotionStart","onMotionStart","onOriginMotionEnd","onMotionEnd","active","treeNodeRequiredProps","props","_React$useState","useState","_React$useState2","visible","setVisible","_React$useContext","useContext","prefixCls","targetVisible","triggerMotionStart","triggerMotionEndRef","useRef","triggerMotionEnd","current","onVisibleChanged","nextVisible","createElement","motionAppear","_ref2","motionRef","motionClassName","motionStyle","concat","map","treeNode","restProps","Object","assign","data","title","key","isStart","isEnd","children","treeNodeProps","domRef","displayName","RefMotionTreeNode","forwardRef"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-tree/es/MotionTreeNode.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectDestructuringEmpty from \"@babel/runtime/helpers/esm/objectDestructuringEmpty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"className\", \"style\", \"motion\", \"motionNodes\", \"motionType\", \"onMotionStart\", \"onMotionEnd\", \"active\", \"treeNodeRequiredProps\"];\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport * as React from 'react';\nimport { TreeContext } from \"./contextTypes\";\nimport TreeNode from \"./TreeNode\";\nimport useUnmount from \"./useUnmount\";\nimport { getTreeNodeProps } from \"./utils/treeUtil\";\nvar MotionTreeNode = function MotionTreeNode(_ref, ref) {\n var className = _ref.className,\n style = _ref.style,\n motion = _ref.motion,\n motionNodes = _ref.motionNodes,\n motionType = _ref.motionType,\n onOriginMotionStart = _ref.onMotionStart,\n onOriginMotionEnd = _ref.onMotionEnd,\n active = _ref.active,\n treeNodeRequiredProps = _ref.treeNodeRequiredProps,\n props = _objectWithoutProperties(_ref, _excluded);\n var _React$useState = React.useState(true),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n visible = _React$useState2[0],\n setVisible = _React$useState2[1];\n var _React$useContext = React.useContext(TreeContext),\n prefixCls = _React$useContext.prefixCls;\n\n // Calculate target visible here.\n // And apply in effect to make `leave` motion work.\n var targetVisible = motionNodes && motionType !== 'hide';\n useLayoutEffect(function () {\n if (motionNodes) {\n if (targetVisible !== visible) {\n setVisible(targetVisible);\n }\n }\n }, [motionNodes]);\n var triggerMotionStart = function triggerMotionStart() {\n if (motionNodes) {\n onOriginMotionStart();\n }\n };\n\n // Should only trigger once\n var triggerMotionEndRef = React.useRef(false);\n var triggerMotionEnd = function triggerMotionEnd() {\n if (motionNodes && !triggerMotionEndRef.current) {\n triggerMotionEndRef.current = true;\n onOriginMotionEnd();\n }\n };\n\n // Effect if unmount\n useUnmount(triggerMotionStart, triggerMotionEnd);\n\n // Motion end event\n var onVisibleChanged = function onVisibleChanged(nextVisible) {\n if (targetVisible === nextVisible) {\n triggerMotionEnd();\n }\n };\n if (motionNodes) {\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n ref: ref,\n visible: visible\n }, motion, {\n motionAppear: motionType === 'show',\n onVisibleChanged: onVisibleChanged\n }), function (_ref2, motionRef) {\n var motionClassName = _ref2.className,\n motionStyle = _ref2.style;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: motionRef,\n className: classNames(\"\".concat(prefixCls, \"-treenode-motion\"), motionClassName),\n style: motionStyle\n }, motionNodes.map(function (treeNode) {\n var restProps = Object.assign({}, (_objectDestructuringEmpty(treeNode.data), treeNode.data)),\n title = treeNode.title,\n key = treeNode.key,\n isStart = treeNode.isStart,\n isEnd = treeNode.isEnd;\n delete restProps.children;\n var treeNodeProps = getTreeNodeProps(key, treeNodeRequiredProps);\n return /*#__PURE__*/React.createElement(TreeNode, _extends({}, restProps, treeNodeProps, {\n title: title,\n active: active,\n data: treeNode.data,\n key: key,\n isStart: isStart,\n isEnd: isEnd\n }));\n }));\n });\n }\n return /*#__PURE__*/React.createElement(TreeNode, _extends({\n domRef: ref,\n className: className,\n style: style\n }, props, {\n active: active\n }));\n};\nMotionTreeNode.displayName = 'MotionTreeNode';\nvar RefMotionTreeNode = /*#__PURE__*/React.forwardRef(MotionTreeNode);\nexport default RefMotionTreeNode;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oC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