{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\", \"value\"],\n _excluded2 = [\"children\"];\nimport * as React from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nfunction convertNodeToOption(node) {\n var _ref = node,\n key = _ref.key,\n _ref$props = _ref.props,\n children = _ref$props.children,\n value = _ref$props.value,\n restProps = _objectWithoutProperties(_ref$props, _excluded);\n return _objectSpread({\n key: key,\n value: value !== undefined ? value : key,\n children: children\n }, restProps);\n}\nexport function convertChildrenToData(nodes) {\n var optionOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return toArray(nodes).map(function (node, index) {\n if (! /*#__PURE__*/React.isValidElement(node) || !node.type) {\n return null;\n }\n var _ref2 = node,\n isSelectOptGroup = _ref2.type.isSelectOptGroup,\n key = _ref2.key,\n _ref2$props = _ref2.props,\n children = _ref2$props.children,\n restProps = _objectWithoutProperties(_ref2$props, _excluded2);\n if (optionOnly || !isSelectOptGroup) {\n return convertNodeToOption(node);\n }\n return _objectSpread(_objectSpread({\n key: \"__RC_SELECT_GRP__\".concat(key === null ? index : key, \"__\"),\n label: key\n }, restProps), {}, {\n options: convertChildrenToData(children)\n });\n }).filter(function (data) {\n return data;\n });\n}","map":{"version":3,"names":["_objectSpread","_objectWithoutProperties","_excluded","_excluded2","React","toArray","convertNodeToOption","node","_ref","key","_ref$props","props","children","value","restProps","undefined","convertChildrenToData","nodes","optionOnly","arguments","length","map","index","isValidElement","type","_ref2","isSelectOptGroup","_ref2$props","concat","label","options","filter","data"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-select/es/utils/legacyUtil.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\", \"value\"],\n _excluded2 = [\"children\"];\nimport * as React from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nfunction convertNodeToOption(node) {\n var _ref = node,\n key = _ref.key,\n _ref$props = _ref.props,\n children = _ref$props.children,\n value = _ref$props.value,\n restProps = _objectWithoutProperties(_ref$props, _excluded);\n return _objectSpread({\n key: key,\n value: value !== undefined ? value : key,\n children: children\n }, restProps);\n}\nexport function convertChildrenToData(nodes) {\n var optionOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return toArray(nodes).map(function (node, index) {\n if (! /*#__PURE__*/React.isValidElement(node) || !node.type) {\n return null;\n }\n var _ref2 = node,\n isSelectOptGroup = _ref2.type.isSelectOptGroup,\n key = _ref2.key,\n _ref2$props = _ref2.props,\n children = _ref2$props.children,\n restProps = _objectWithoutProperties(_ref2$props, _excluded2);\n if (optionOnly || !isSelectOptGroup) {\n return convertNodeToOption(node);\n }\n return _objectSpread(_objectSpread({\n key: \"__RC_SELECT_GRP__\".concat(key === null ? index : key, \"__\"),\n label: key\n }, restProps), {}, {\n options: convertChildrenToData(children)\n });\n }).filter(function (data) {\n return data;\n });\n}"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAOC,wBAAwB,MAAM,oDAAoD;AACzF,IAAIC,SAAS,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC;EACnCC,UAAU,GAAG,CAAC,UAAU,CAAC;AAC3B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,OAAO,MAAM,6BAA6B;AACjD,SAASC,mBAAmBA,CAACC,IAAI,EAAE;EACjC,IAAIC,IAAI,GAAGD,IAAI;IACbE,GAAG,GAAGD,IAAI,CAACC,GAAG;IACdC,UAAU,GAAGF,IAAI,CAACG,KAAK;IACvBC,QAAQ,GAAGF,UAAU,CAACE,QAAQ;IAC9BC,KAAK,GAAGH,UAAU,CAACG,KAAK;IACxBC,SAAS,GAAGb,wBAAwB,CAACS,UAAU,EAAER,SAAS,CAAC;EAC7D,OAA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