{"ast":null,"code":"\"use client\";\n\nimport React from 'react';\nimport HolderOutlined from \"@ant-design/icons/es/icons/HolderOutlined\";\nimport classNames from 'classnames';\nimport RcTree from 'rc-tree';\nimport initCollapseMotion from '../_util/motion';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport { useToken } from '../theme/internal';\nimport useStyle from './style';\nimport dropIndicatorRender from './utils/dropIndicator';\nimport SwitcherIconCom from './utils/iconUtil';\nconst Tree = /*#__PURE__*/React.forwardRef((props, ref) => {\n  var _a;\n  const {\n    getPrefixCls,\n    direction,\n    virtual,\n    tree\n  } = React.useContext(ConfigContext);\n  const {\n    prefixCls: customizePrefixCls,\n    className,\n    showIcon = false,\n    showLine,\n    switcherIcon,\n    switcherLoadingIcon,\n    blockNode = false,\n    children,\n    checkable = false,\n    selectable = true,\n    draggable,\n    disabled,\n    motion: customMotion,\n    style\n  } = props;\n  const prefixCls = getPrefixCls('tree', customizePrefixCls);\n  const rootPrefixCls = getPrefixCls();\n  const contextDisabled = React.useContext(DisabledContext);\n  const mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;\n  const motion = customMotion !== null && customMotion !== void 0 ? customMotion : Object.assign(Object.assign({}, initCollapseMotion(rootPrefixCls)), {\n    motionAppear: false\n  });\n  const newProps = Object.assign(Object.assign({}, props), {\n    checkable,\n    selectable,\n    showIcon,\n    motion,\n    blockNode,\n    disabled: mergedDisabled,\n    showLine: Boolean(showLine),\n    dropIndicatorRender\n  });\n  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n  const [, token] = useToken();\n  const itemHeight = token.paddingXS / 2 + (((_a = token.Tree) === null || _a === void 0 ? void 0 : _a.titleHeight) || token.controlHeightSM);\n  const draggableConfig = React.useMemo(() => {\n    if (!draggable) {\n      return false;\n    }\n    let mergedDraggable = {};\n    switch (typeof draggable) {\n      case 'function':\n        mergedDraggable.nodeDraggable = draggable;\n        break;\n      case 'object':\n        mergedDraggable = Object.assign({}, draggable);\n        break;\n      default:\n        break;\n      // Do nothing\n    }\n    if (mergedDraggable.icon !== false) {\n      mergedDraggable.icon = mergedDraggable.icon || /*#__PURE__*/React.createElement(HolderOutlined, null);\n    }\n    return mergedDraggable;\n  }, [draggable]);\n  const renderSwitcherIcon = nodeProps => (/*#__PURE__*/React.createElement(SwitcherIconCom, {\n    prefixCls: prefixCls,\n    switcherIcon: switcherIcon,\n    switcherLoadingIcon: switcherLoadingIcon,\n    treeNodeProps: nodeProps,\n    showLine: showLine\n  }));\n  return wrapCSSVar(/*#__PURE__*/\n  // @ts-ignore\n  React.createElement(RcTree, Object.assign({\n    itemHeight: itemHeight,\n    ref: ref,\n    virtual: virtual\n  }, newProps, {\n    // newProps may contain style so declare style below it\n    style: Object.assign(Object.assign({}, tree === null || tree === void 0 ? void 0 : tree.style), style),\n    prefixCls: prefixCls,\n    className: classNames({\n      [`${prefixCls}-icon-hide`]: !showIcon,\n      [`${prefixCls}-block-node`]: blockNode,\n      [`${prefixCls}-unselectable`]: !selectable,\n      [`${prefixCls}-rtl`]: direction === 'rtl',\n      [`${prefixCls}-disabled`]: mergedDisabled\n    }, tree === null || tree === void 0 ? void 0 : tree.className, className, hashId, cssVarCls),\n    direction: direction,\n    checkable: checkable ? /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-checkbox-inner`\n    }) : checkable,\n    selectable: selectable,\n    switcherIcon: renderSwitcherIcon,\n    draggable: draggableConfig\n  }), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n  Tree.displayName = 'Tree';\n}\nexport default Tree;","map":{"version":3,"names":["React","HolderOutlined","classNames","RcTree","initCollapseMotion","ConfigContext","DisabledContext","useToken","useStyle","dropIndicatorRender","SwitcherIconCom","Tree","forwardRef","props","ref","_a","getPrefixCls","direction","virtual","tree","useContext","prefixCls","customizePrefixCls","className","showIcon","showLine","switcherIcon","switcherLoadingIcon","blockNode","children","checkable","selectable","draggable","disabled","motion","customMotion","style","rootPrefixCls","contextDisabled","mergedDisabled","Object","assign","motionAppear","newProps","Boolean","wrapCSSVar","hashId","cssVarCls","token","itemHeight","paddingXS","titleHeight","controlHeightSM","draggableConfig","useMemo","mergedDraggable","nodeDraggable","icon","createElement","renderSwitcherIcon","nodeProps","treeNodeProps","process","env","NODE_ENV","displayName"],"sources":["/Users/nili/Documents/trae_projects/client/node_modules/antd/es/tree/Tree.js"],"sourcesContent":["\"use client\";\n\nimport React from 'react';\nimport HolderOutlined from \"@ant-design/icons/es/icons/HolderOutlined\";\nimport classNames from 'classnames';\nimport RcTree from 'rc-tree';\nimport initCollapseMotion from '../_util/motion';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport { useToken } from '../theme/internal';\nimport useStyle from './style';\nimport dropIndicatorRender from './utils/dropIndicator';\nimport SwitcherIconCom from './utils/iconUtil';\nconst Tree = /*#__PURE__*/React.forwardRef((props, ref) => {\n  var _a;\n  const {\n    getPrefixCls,\n    direction,\n    virtual,\n    tree\n  } = React.useContext(ConfigContext);\n  const {\n    prefixCls: customizePrefixCls,\n    className,\n    showIcon = false,\n    showLine,\n    switcherIcon,\n    switcherLoadingIcon,\n    blockNode = false,\n    children,\n    checkable = false,\n    selectable = true,\n    draggable,\n    disabled,\n    motion: customMotion,\n    style\n  } = props;\n  const prefixCls = getPrefixCls('tree', customizePrefixCls);\n  const rootPrefixCls = getPrefixCls();\n  const contextDisabled = React.useContext(DisabledContext);\n  const mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;\n  const motion = customMotion !== null && customMotion !== void 0 ? customMotion : Object.assign(Object.assign({}, initCollapseMotion(rootPrefixCls)), {\n    motionAppear: false\n  });\n  const newProps = Object.assign(Object.assign({}, props), {\n    checkable,\n    selectable,\n    showIcon,\n    motion,\n    blockNode,\n    disabled: mergedDisabled,\n    showLine: Boolean(showLine),\n    dropIndicatorRender\n  });\n  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n  const [, token] = useToken();\n  const itemHeight = token.paddingXS / 2 + (((_a = token.Tree) === null || _a === void 0 ? void 0 : _a.titleHeight) || token.controlHeightSM);\n  const draggableConfig = React.useMemo(() => {\n    if (!draggable) {\n      return false;\n    }\n    let mergedDraggable = {};\n    switch (typeof draggable) {\n      case 'function':\n        mergedDraggable.nodeDraggable = draggable;\n        break;\n      case 'object':\n        mergedDraggable = Object.assign({}, draggable);\n        break;\n      default:\n        break;\n      // Do nothing\n    }\n    if (mergedDraggable.icon !== false) {\n      mergedDraggable.icon = mergedDraggable.icon || /*#__PURE__*/React.createElement(HolderOutlined, null);\n    }\n    return mergedDraggable;\n  }, [draggable]);\n  const renderSwitcherIcon = nodeProps => (/*#__PURE__*/React.createElement(SwitcherIconCom, {\n    prefixCls: prefixCls,\n    switcherIcon: switcherIcon,\n    switcherLoadingIcon: switcherLoadingIcon,\n    treeNodeProps: nodeProps,\n    showLine: showLine\n  }));\n  return wrapCSSVar(\n  /*#__PURE__*/\n  // @ts-ignore\n  React.createElement(RcTree, Object.assign({\n    itemHeight: itemHeight,\n    ref: ref,\n    virtual: virtual\n  }, newProps, {\n    // newProps may contain style so declare style below it\n    style: Object.assign(Object.assign({}, tree === null || tree === void 0 ? void 0 : tree.style), style),\n    prefixCls: prefixCls,\n    className: classNames({\n      [`${prefixCls}-icon-hide`]: !showIcon,\n      [`${prefixCls}-block-node`]: blockNode,\n      [`${prefixCls}-unselectable`]: !selectable,\n      [`${prefixCls}-rtl`]: direction === 'rtl',\n      [`${prefixCls}-disabled`]: mergedDisabled\n    }, tree === null || tree === void 0 ? void 0 : tree.className, className, hashId, cssVarCls),\n    direction: direction,\n    checkable: checkable ? /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-checkbox-inner`\n    }) : checkable,\n    selectable: selectable,\n    switcherIcon: renderSwitcherIcon,\n    draggable: draggableConfig\n  }), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n  Tree.displayName = 'Tree';\n}\nexport default Tree;"],"mappings":"AAAA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