{"ast":null,"code":"\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport { ConfigContext } from '../config-provider';\nimport useSize from '../config-provider/hooks/useSize';\nimport useStyle from './style';\nexport const SpaceCompactItemContext = /*#__PURE__*/React.createContext(null);\nexport const useCompactItemContext = (prefixCls, direction) => {\n const compactItemContext = React.useContext(SpaceCompactItemContext);\n const compactItemClassnames = React.useMemo(() => {\n if (!compactItemContext) {\n return '';\n }\n const {\n compactDirection,\n isFirstItem,\n isLastItem\n } = compactItemContext;\n const separator = compactDirection === 'vertical' ? '-vertical-' : '-';\n return classNames(`${prefixCls}-compact${separator}item`, {\n [`${prefixCls}-compact${separator}first-item`]: isFirstItem,\n [`${prefixCls}-compact${separator}last-item`]: isLastItem,\n [`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl'\n });\n }, [prefixCls, direction, compactItemContext]);\n return {\n compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,\n compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,\n compactItemClassnames\n };\n};\nexport const NoCompactStyle = _ref => {\n let {\n children\n } = _ref;\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: null\n }, children);\n};\nconst CompactItem = _a => {\n var {\n children\n } = _a,\n otherProps = __rest(_a, [\"children\"]);\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: otherProps\n }, children);\n};\nconst Compact = props => {\n const {\n getPrefixCls,\n direction: directionConfig\n } = React.useContext(ConfigContext);\n const {\n size,\n direction,\n block,\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children\n } = props,\n restProps = __rest(props, [\"size\", \"direction\", \"block\", \"prefixCls\", \"className\", \"rootClassName\", \"children\"]);\n const mergedSize = useSize(ctx => size !== null && size !== void 0 ? size : ctx);\n const prefixCls = getPrefixCls('space-compact', customizePrefixCls);\n const [wrapCSSVar, hashId] = useStyle(prefixCls);\n const clx = classNames(prefixCls, hashId, {\n [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-vertical`]: direction === 'vertical'\n }, className, rootClassName);\n const compactItemContext = React.useContext(SpaceCompactItemContext);\n const childNodes = toArray(children);\n const nodes = React.useMemo(() => childNodes.map((child, i) => {\n const key = (child === null || child === void 0 ? void 0 : child.key) || `${prefixCls}-item-${i}`;\n return /*#__PURE__*/React.createElement(CompactItem, {\n key: key,\n compactSize: mergedSize,\n compactDirection: direction,\n isFirstItem: i === 0 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),\n isLastItem: i === childNodes.length - 1 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))\n }, child);\n }), [size, childNodes, compactItemContext]);\n // =========================== Render ===========================\n if (childNodes.length === 0) {\n return null;\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: clx\n }, restProps), nodes));\n};\nexport default Compact;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","toArray","ConfigContext","useSize","useStyle","SpaceCompactItemContext","createContext","useCompactItemContext","prefixCls","direction","compactItemContext","useContext","compactItemClassnames","useMemo","compactDirection","isFirstItem","isLastItem","separator","compactSize","NoCompactStyle","_ref","children","createElement","Provider","value","CompactItem","_a","otherProps","Compact","props","getPrefixCls","directionConfig","size","block","customizePrefixCls","className","rootClassName","restProps","mergedSize","ctx","wrapCSSVar","hashId","clx","childNodes","nodes","map","child","key","assign"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/space/Compact.js"],"sourcesContent":["\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport { ConfigContext } from '../config-provider';\nimport useSize from '../config-provider/hooks/useSize';\nimport useStyle from './style';\nexport const SpaceCompactItemContext = /*#__PURE__*/React.createContext(null);\nexport const useCompactItemContext = (prefixCls, direction) => {\n const compactItemContext = React.useContext(SpaceCompactItemContext);\n const compactItemClassnames = React.useMemo(() => {\n if (!compactItemContext) {\n return '';\n }\n const {\n compactDirection,\n isFirstItem,\n isLastItem\n } = compactItemContext;\n const separator = compactDirection === 'vertical' ? '-vertical-' : '-';\n return classNames(`${prefixCls}-compact${separator}item`, {\n [`${prefixCls}-compact${separator}first-item`]: isFirstItem,\n [`${prefixCls}-compact${separator}last-item`]: isLastItem,\n [`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl'\n });\n }, [prefixCls, direction, compactItemContext]);\n return {\n compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,\n compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,\n compactItemClassnames\n };\n};\nexport const NoCompactStyle = _ref => {\n let {\n children\n } = _ref;\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: null\n }, children);\n};\nconst CompactItem = _a => {\n var {\n children\n } = _a,\n otherProps = __rest(_a, [\"children\"]);\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: otherProps\n }, children);\n};\nconst Compact = props => {\n const {\n getPrefixCls,\n direction: directionConfig\n } = React.useContext(ConfigContext);\n const {\n size,\n direction,\n block,\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children\n } = props,\n restProps = __rest(props, [\"size\", \"direction\", \"block\", \"prefixCls\", \"className\", \"rootClassName\", \"children\"]);\n const mergedSize = useSize(ctx => size !== null && size !== void 0 ? size : ctx);\n const prefixCls = getPrefixCls('space-compact', customizePrefixCls);\n const [wrapCSSVar, hashId] = useStyle(prefixCls);\n const clx = classNames(prefixCls, hashId, {\n [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-vertical`]: direction === 'vertical'\n }, className, rootClassName);\n const compactItemContext = React.useContext(SpaceCompactItemContext);\n const childNodes = toArray(children);\n const nodes = React.useMemo(() => childNodes.map((child, i) => {\n const key = (child === null || child === void 0 ? void 0 : child.key) || `${prefixCls}-item-${i}`;\n return /*#__PURE__*/React.createElement(CompactItem, {\n key: key,\n compactSize: mergedSize,\n compactDirection: direction,\n isFirstItem: i === 0 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),\n isLastItem: i === childNodes.length - 1 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))\n }, child);\n }), [size, childNodes, compactItemContext]);\n // =========================== Render ===========================\n if (childNodes.length === 0) {\n return null;\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: clx\n }, restProps), nodes));\n};\nexport default Compact;"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,C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