PromoCursed/node_modules/.cache/babel-loader/998b7343d07364d08a1303c7a482c05a142eb242b6bf0005be53d052ead31a83.json

1 line
8.9 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport canUseDOM from \"rc-util/es/Dom/canUseDom\";\n// ================= Transition =================\n// Event wrapper. Copy from react source code\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes[\"Webkit\".concat(styleProp)] = \"webkit\".concat(eventName);\n prefixes[\"Moz\".concat(styleProp)] = \"moz\".concat(eventName);\n prefixes[\"ms\".concat(styleProp)] = \"MS\".concat(eventName);\n prefixes[\"O\".concat(styleProp)] = \"o\".concat(eventName.toLowerCase());\n return prefixes;\n}\nexport function getVendorPrefixes(domSupport, win) {\n var prefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n if (domSupport) {\n if (!('AnimationEvent' in win)) {\n delete prefixes.animationend.animation;\n }\n if (!('TransitionEvent' in win)) {\n delete prefixes.transitionend.transition;\n }\n }\n return prefixes;\n}\nvar vendorPrefixes = getVendorPrefixes(canUseDOM(), typeof window !== 'undefined' ? window : {});\nvar style = {};\nif (canUseDOM()) {\n var _document$createEleme = document.createElement('div');\n style = _document$createEleme.style;\n}\nvar prefixedEventNames = {};\nexport function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n }\n var prefixMap = vendorPrefixes[eventName];\n if (prefixMap) {\n var stylePropList = Object.keys(prefixMap);\n var len = stylePropList.length;\n for (var i = 0; i < len; i += 1) {\n var styleProp = stylePropList[i];\n if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {\n prefixedEventNames[eventName] = prefixMap[styleProp];\n return prefixedEventNames[eventName];\n }\n }\n }\n return '';\n}\nvar internalAnimationEndName = getVendorPrefixedEventName('animationend');\nvar internalTransitionEndName = getVendorPrefixedEventName('transitionend');\nexport var supportTransition = !!(internalAnimationEndName && internalTransitionEndName);\nexport var animationEndName = internalAnimationEndName || 'animationend';\nexport var transitionEndName = internalTransitionEndName || 'transitionend';\nexport function getTransitionName(transitionName, transitionType) {\n if (!transitionName) return null;\n if (_typeof(transitionName) === 'object') {\n var type = transitionType.replace(/-\\w/g, function (match) {\n return match[1].toUpperCase();\n });\n return transitionName[type];\n }\n return \"\".concat(transitionName, \"-\").concat(transitionType);\n}","map":{"version":3,"names":["_typeof","canUseDOM","makePrefixMap","styleProp","eventName","prefixes","toLowerCase","concat","getVendorPrefixes","domSupport","win","animationend","transitionend","animation","transition","vendorPrefixes","window","style","_document$createEleme","document","createElement","prefixedEventNames","getVendorPrefixedEventName","prefixMap","stylePropList","Object","keys","len","length","i","prototype","hasOwnProperty","call","internalAnimationEndName","internalTransitionEndName","supportTransition","animationEndName","transitionEndName","getTransitionName","transitionName","transitionType","type","replace","match","toUpperCase"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-motion/es/util/motion.js"],"sourcesContent":["import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport canUseDOM from \"rc-util/es/Dom/canUseDom\";\n// ================= Transition =================\n// Event wrapper. Copy from react source code\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes[\"Webkit\".concat(styleProp)] = \"webkit\".concat(eventName);\n prefixes[\"Moz\".concat(styleProp)] = \"moz\".concat(eventName);\n prefixes[\"ms\".concat(styleProp)] = \"MS\".