{"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 { isPresetSize, isValidGapNumber } from '../_util/gapSize';\nimport { ConfigContext } from '../config-provider';\nimport Compact from './Compact';\nimport { SpaceContextProvider } from './context';\nimport Item from './Item';\nimport useStyle from './style';\nexport { SpaceContext } from './context';\nconst Space = /*#__PURE__*/React.forwardRef((props, ref) => {\n  var _a, _b;\n  const {\n    getPrefixCls,\n    space,\n    direction: directionConfig\n  } = React.useContext(ConfigContext);\n  const {\n      size = (space === null || space === void 0 ? void 0 : space.size) || 'small',\n      align,\n      className,\n      rootClassName,\n      children,\n      direction = 'horizontal',\n      prefixCls: customizePrefixCls,\n      split,\n      style,\n      wrap = false,\n      classNames: customClassNames,\n      styles\n    } = props,\n    otherProps = __rest(props, [\"size\", \"align\", \"className\", \"rootClassName\", \"children\", \"direction\", \"prefixCls\", \"split\", \"style\", \"wrap\", \"classNames\", \"styles\"]);\n  const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];\n  const isPresetVerticalSize = isPresetSize(verticalSize);\n  const isPresetHorizontalSize = isPresetSize(horizontalSize);\n  const isValidVerticalSize = isValidGapNumber(verticalSize);\n  const isValidHorizontalSize = isValidGapNumber(horizontalSize);\n  const childNodes = toArray(children, {\n    keepEmpty: true\n  });\n  const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;\n  const prefixCls = getPrefixCls('space', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const cls = classNames(prefixCls, space === null || space === void 0 ? void 0 : space.className, hashId, `${prefixCls}-${direction}`, {\n    [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n    [`${prefixCls}-align-${mergedAlign}`]: mergedAlign,\n    [`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize,\n    [`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize\n  }, className, rootClassName);\n  const itemClassName = classNames(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.classNames) === null || _b === void 0 ? void 0 : _b.item);\n  // Calculate latest one\n  let latestIndex = 0;\n  const nodes = childNodes.map((child, i) => {\n    var _a, _b;\n    if (child !== null && child !== undefined) {\n      latestIndex = i;\n    }\n    const key = child && child.key || `${itemClassName}-${i}`;\n    return /*#__PURE__*/React.createElement(Item, {\n      className: itemClassName,\n      key: key,\n      index: i,\n      split: split,\n      style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.styles) === null || _b === void 0 ? void 0 : _b.item\n    }, child);\n  });\n  const spaceContext = React.useMemo(() => ({\n    latestIndex\n  }), [latestIndex]);\n  // =========================== Render ===========================\n  if (childNodes.length === 0) {\n    return null;\n  }\n  const gapStyle = {};\n  if (wrap) {\n    gapStyle.flexWrap = 'wrap';\n  }\n  if (!isPresetHorizontalSize && isValidHorizontalSize) {\n    gapStyle.columnGap = horizontalSize;\n  }\n  if (!isPresetVerticalSize && isValidVerticalSize) {\n    gapStyle.rowGap = verticalSize;\n  }\n  return wrapSSR( /*#__PURE__*/React.createElement(\"div\", Object.assign({\n    ref: ref,\n    className: cls,\n    style: Object.assign(Object.assign(Object.assign({}, gapStyle), space === null || space === void 0 ? void 0 : space.style), style)\n  }, otherProps), /*#__PURE__*/React.createElement(SpaceContextProvider, {\n    value: spaceContext\n  }, nodes)));\n});\nif (process.env.NODE_ENV !== 'production') {\n  Space.displayName = 'Space';\n}\nconst CompoundedSpace = Space;\nCompoundedSpace.Compact = Compact;\nexport default CompoundedSpace;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","toArray","isPresetSize","isValidGapNumber","ConfigContext","Compact","SpaceContextProvider","Item","useStyle","SpaceContext","Space","forwardRef","props","ref","_a","_b","getPrefixCls","space","direction","directionConfig","useContext","size","align","className","rootClassName","children","prefixCls","customizePrefixCls","split","style","wrap","customClassNames","styles","otherProps","horizontalSize","verticalSize","Array","isArray","isPresetVerticalSize","isPresetHorizontalSize","isValidVerticalSize","isValidHorizontalSize","childNodes","keepEmpty","mergedAlign","undefined","wrapSSR","hashId","cls","itemClassName","item","latestIndex","nodes","map","child","key","createElement","index","spaceContext","useMemo","gapStyle","flexWrap","columnGap","rowGap","assign","value","process","env","NODE_ENV","displayName","CompoundedSpace"],"sources":["/var/www/gavt/node_modules/antd/es/space/index.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 { isPresetSize, isValidGapNumber } from '../_util/gapSize';\nimport { ConfigContext } from '../config-provider';\nimport Compact from './Compact';\nimport { SpaceContextProvider } from './context';\nimport Item from './Item';\nimport useStyle from './style';\nexport { SpaceContext } from './context';\nconst Space = /*#__PURE__*/React.forwardRef((props, ref) => {\n  var _a, _b;\n  const {\n    getPrefixCls,\n    space,\n    direction: directionConfig\n  } = React.useContext(ConfigContext);\n  const {\n      size = (space === null || space === void 0 ? void 0 : space.size) || 'small',\n      align,\n      className,\n      rootClassName,\n      children,\n      direction = 'horizontal',\n      prefixCls: customizePrefixCls,\n      split,\n      style,\n      wrap = false,\n      classNames: customClassNames,\n      styles\n    } = props,\n    otherProps = __rest(props, [\"size\", \"align\", \"className\", \"rootClassName\", \"children\", \"direction\", \"prefixCls\", \"split\", \"style\", \"wrap\", \"classNames\", \"styles\"]);\n  const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];\n  const isPresetVerticalSize = isPresetSize(verticalSize);\n  const isPresetHorizontalSize = isPresetSize(horizontalSize);\n  const isValidVerticalSize = isValidGapNumber(verticalSize);\n  const isValidHorizontalSize = isValidGapNumber(horizontalSize);\n  const childNodes = toArray(children, {\n    keepEmpty: true\n  });\n  const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;\n  const prefixCls = getPrefixCls('space', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const cls = classNames(prefixCls, space === null || space === void 0 ? void 0 : space.className, hashId, `${prefixCls}-${direction}`, {\n    [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n    [`${prefixCls}-align-${mergedAlign}`]: mergedAlign,\n    [`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize,\n    [`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize\n  }, className, rootClassName);\n  const itemClassName = classNames(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.classNames) === null || _b === void 0 ? void 0 : _b.item);\n  // Calculate latest one\n  let latestIndex = 0;\n  const nodes = childNodes.map((child, i) => {\n    var _a, _b;\n    if (child !== null && child !== undefined) {\n      latestIndex = i;\n    }\n    const key = child && child.key || `${itemClassName}-${i}`;\n    return /*#__PURE__*/React.createElement(Item, {\n      className: itemClassName,\n      key: key,\n      index: i,\n      split: split,\n      style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.styles) === null || _b === void 0 ? void 0 : _b.item\n    }, child);\n  });\n  const spaceContext = React.useMemo(() => ({\n    latestIndex\n  }), [latestIndex]);\n  // =========================== Render ===========================\n  if (childNodes.length === 0) {\n    return null;\n  }\n  const gapStyle = {};\n  if (wrap) {\n    gapStyle.flexWrap = 'wrap';\n  }\n  if (!isPresetHorizontalSize && isValidHorizontalSize) {\n    gapStyle.columnGap = horizontalSize;\n  }\n  if (!isPresetVerticalSize && isValidVerticalSize) {\n    gapStyle.rowGap = verticalSize;\n  }\n  return wrapSSR( /*#__PURE__*/React.createElement(\"div\", Object.assign({\n    ref: ref,\n    className: cls,\n    style: Object.assign(Object.assign(Object.assign({}, gapStyle), space === null || space === void 0 ? void 0 : space.style), style)\n  }, otherProps), /*#__PURE__*/React.createElement(SpaceContextProvider, {\n    value: spaceContext\n  }, nodes)));\n});\nif (process.env.NODE_ENV !== 'production') {\n  Space.displayName = 'Space';\n}\nconst CompoundedSpace = Space;\nCompoundedSpace.Compact = Compact;\nexport default CompoundedSpace;"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAA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