1 line
7.6 KiB
JSON
1 line
7.6 KiB
JSON
{"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 StarFilled from \"@ant-design/icons/es/icons/StarFilled\";\nimport classNames from 'classnames';\nimport RcRate from 'rc-rate';\nimport { ConfigContext } from '../config-provider';\nimport Tooltip from '../tooltip';\nimport useStyle from './style';\nconst Rate = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls,\n className,\n rootClassName,\n style,\n tooltips,\n character = /*#__PURE__*/React.createElement(StarFilled, null)\n } = props,\n rest = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"tooltips\", \"character\"]);\n const characterRender = (node, _ref) => {\n let {\n index\n } = _ref;\n if (!tooltips) {\n return node;\n }\n return /*#__PURE__*/React.createElement(Tooltip, {\n title: tooltips[index]\n }, node);\n };\n const {\n getPrefixCls,\n direction,\n rate\n } = React.useContext(ConfigContext);\n const ratePrefixCls = getPrefixCls('rate', prefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(ratePrefixCls);\n const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);\n return wrapCSSVar( /*#__PURE__*/React.createElement(RcRate, Object.assign({\n ref: ref,\n character: character,\n characterRender: characterRender\n }, rest, {\n className: classNames(className, rootClassName, hashId, cssVarCls, rate === null || rate === void 0 ? void 0 : rate.className),\n style: mergedStyle,\n prefixCls: ratePrefixCls,\n direction: direction\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Rate.displayName = 'Rate';\n}\nexport default Rate;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","StarFilled","classNames","RcRate","ConfigContext","Tooltip","useStyle","Rate","forwardRef","props","ref","prefixCls","className","rootClassName","style","tooltips","character","createElement","rest","characterRender","node","_ref","index","title","getPrefixCls","direction","rate","useContext","ratePrefixCls","wrapCSSVar","hashId","cssVarCls","mergedStyle","assign","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/rate/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 StarFilled from \"@ant-design/icons/es/icons/StarFilled\";\nimport classNames from 'classnames';\nimport RcRate from 'rc-rate';\nimport { ConfigContext } from '../config-provider';\nimport Tooltip from '../tooltip';\nimport useStyle from './style';\nconst Rate = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls,\n className,\n rootClassName,\n style,\n tooltips,\n character = /*#__PURE__*/React.createElement(StarFilled, null)\n } = props,\n rest = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"tooltips\", \"character\"]);\n const characterRender = (node, _ref) => {\n let {\n index\n } = _ref;\n if (!tooltips) {\n return node;\n }\n return /*#__PURE__*/React.createElement(Tooltip, {\n title: tooltips[index]\n }, node);\n };\n const {\n getPrefixCls,\n direction,\n rate\n } = React.useContext(ConfigContext);\n const ratePrefixCls = getPrefixCls('rate', prefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(ratePrefixCls);\n const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);\n return wrapCSSVar( /*#__PURE__*/React.createElement(RcRate, Object.assign({\n ref: ref,\n character: character,\n characterRender: characterRender\n }, rest, {\n className: classNames(className, rootClassName, hashId, cssVarCls, rate === null || rate === void 0 ? void 0 : rate.className),\n style: mergedStyle,\n prefixCls: ratePrefixCls,\n direction: direction\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Rate.displayName = 'Rate';\n}\nexport default Rate;"],"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,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CAAC,CAACC,CAAC,CAACO,CAAC,CAAC,CAAC,GAAGV,CAAC,CAACG,CAAC,CAACO,CAAC,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