PromoCursed/node_modules/.cache/babel-loader/1aef4b4d88b5a34463376bb002f3dde1cef00d846e746da45ecf5b7315ede48b.json
2024-08-20 23:25:37 +04:00

1 line
5.7 KiB
JSON

{"ast":null,"code":"import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport { warning } from 'rc-util';\nexport default function getComponentToken(component, token, defaultToken, options) {\n var customToken = _objectSpread({}, token[component]);\n if (options !== null && options !== void 0 && options.deprecatedTokens) {\n var deprecatedTokens = options.deprecatedTokens;\n deprecatedTokens.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n oldTokenKey = _ref2[0],\n newTokenKey = _ref2[1];\n if (process.env.NODE_ENV !== 'production') {\n warning(!(customToken !== null && customToken !== void 0 && customToken[oldTokenKey]), \"Component Token `\".concat(String(oldTokenKey), \"` of \").concat(String(component), \" is deprecated. Please use `\").concat(String(newTokenKey), \"` instead.\"));\n }\n\n // Should wrap with `if` clause, or there will be `undefined` in object.\n if (customToken !== null && customToken !== void 0 && customToken[oldTokenKey] || customToken !== null && customToken !== void 0 && customToken[newTokenKey]) {\n var _customToken$newToken;\n (_customToken$newToken = customToken[newTokenKey]) !== null && _customToken$newToken !== void 0 ? _customToken$newToken : customToken[newTokenKey] = customToken === null || customToken === void 0 ? void 0 : customToken[oldTokenKey];\n }\n });\n }\n var mergedToken = _objectSpread(_objectSpread({}, defaultToken), customToken);\n\n // Remove same value as global token to minimize size\n Object.keys(mergedToken).forEach(function (key) {\n if (mergedToken[key] === token[key]) {\n delete mergedToken[key];\n }\n });\n return mergedToken;\n}\n;","map":{"version":3,"names":["_slicedToArray","_objectSpread","warning","getComponentToken","component","token","defaultToken","options","customToken","deprecatedTokens","forEach","_ref","_ref2","oldTokenKey","newTokenKey","process","env","NODE_ENV","concat","String","_customToken$newToken","mergedToken","Object","keys","key"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/@ant-design/cssinjs-utils/es/util/getComponentToken.js"],"sourcesContent":["import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport { warning } from 'rc-util';\nexport default function getComponentToken(component, token, defaultToken, options) {\n var customToken = _objectSpread({}, token[component]);\n if (options !== null && options !== void 0 && options.deprecatedTokens) {\n var deprecatedTokens = options.deprecatedTokens;\n deprecatedTokens.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n oldTokenKey = _ref2[0],\n newTokenKey = _ref2[1];\n if (process.env.NODE_ENV !== 'production') {\n warning(!(customToken !== null && customToken !== void 0 && customToken[oldTokenKey]), \"Component Token `\".concat(String(oldTokenKey), \"` of \").concat(String(component), \" is deprecated. Please use `\").concat(String(newTokenKey), \"` instead.\"));\n }\n\n // Should wrap with `if` clause, or there will be `undefined` in object.\n if (customToken !== null && customToken !== void 0 && customToken[oldTokenKey] || customToken !== null && customToken !== void 0 && customToken[newTokenKey]) {\n var _customToken$newToken;\n (_customToken$newToken = customToken[newTokenKey]) !== null && _customToken$newToken !== void 0 ? _customToken$newToken : customToken[newTokenKey] = customToken === null || customToken === void 0 ? void 0 : customToken[oldTokenKey];\n }\n });\n }\n var mergedToken = _objectSpread(_objectSpread({}, defaultToken), customToken);\n\n // Remove same value as global token to minimize size\n Object.keys(mergedToken).forEach(function (key) {\n if (mergedToken[key] === token[key]) {\n delete mergedToken[key];\n }\n });\n return mergedToken;\n}\n;"],"mappings":"AAAA,OAAOA,cAAc,MAAM,0CAA0C;AACrE,OAAOC,aAAa,MAAM,0CAA0C;AACpE,SAASC,OAAO,QAAQ,SAAS;AACjC,eAAe,SAASC,iBAAiBA,CAACC,SAAS,EAAEC,KAAK,EAAEC,YAAY,EAAEC,OAAO,EAAE;EACjF,IAAIC,WAAW,GAAGP,aAAa,CAAC,CAAC,CAAC,EAAEI,KAAK,CAACD,SAAS,CAAC,CAAC;EACrD,IAAIG,OAAO,KAAK,IAAI,IAAI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