1 line
12 KiB
JSON
1 line
12 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 LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport RcSwitch from 'rc-switch';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport Wave from '../_util/wave';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport useSize from '../config-provider/hooks/useSize';\nimport useStyle from './style';\nconst InternalSwitch = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n size: customizeSize,\n disabled: customDisabled,\n loading,\n className,\n rootClassName,\n style,\n checked: checkedProp,\n value,\n defaultChecked: defaultCheckedProp,\n defaultValue,\n onChange\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"size\", \"disabled\", \"loading\", \"className\", \"rootClassName\", \"style\", \"checked\", \"value\", \"defaultChecked\", \"defaultValue\", \"onChange\"]);\n const [checked, setChecked] = useMergedState(false, {\n value: checkedProp !== null && checkedProp !== void 0 ? checkedProp : value,\n defaultValue: defaultCheckedProp !== null && defaultCheckedProp !== void 0 ? defaultCheckedProp : defaultValue\n });\n const {\n getPrefixCls,\n direction,\n switch: SWITCH\n } = React.useContext(ConfigContext);\n // ===================== Disabled =====================\n const disabled = React.useContext(DisabledContext);\n const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;\n const prefixCls = getPrefixCls('switch', customizePrefixCls);\n const loadingIcon = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-handle`\n }, loading && /*#__PURE__*/React.createElement(LoadingOutlined, {\n className: `${prefixCls}-loading-icon`\n }));\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const mergedSize = useSize(customizeSize);\n const classes = classNames(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {\n [`${prefixCls}-small`]: mergedSize === 'small',\n [`${prefixCls}-loading`]: loading,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);\n const changeHandler = function () {\n setChecked(arguments.length <= 0 ? undefined : arguments[0]);\n onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, arguments);\n };\n return wrapCSSVar( /*#__PURE__*/React.createElement(Wave, {\n component: \"Switch\"\n }, /*#__PURE__*/React.createElement(RcSwitch, Object.assign({}, restProps, {\n checked: checked,\n onChange: changeHandler,\n prefixCls: prefixCls,\n className: classes,\n style: mergedStyle,\n disabled: mergedDisabled,\n ref: ref,\n loadingIcon: loadingIcon\n }))));\n});\nconst Switch = InternalSwitch;\nSwitch.__ANT_SWITCH = true;\nif (process.env.NODE_ENV !== 'production') {\n Switch.displayName = 'Switch';\n}\nexport default Switch;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","LoadingOutlined","classNames","RcSwitch","useMergedState","Wave","ConfigContext","DisabledContext","useSize","useStyle","InternalSwitch","forwardRef","props","ref","prefixCls","customizePrefixCls","size","customizeSize","disabled","customDisabled","loading","className","rootClassName","style","checked","checkedProp","value","defaultChecked","defaultCheckedProp","defaultValue","onChange","restProps","setChecked","getPrefixCls","direction","switch","SWITCH","useContext","mergedDisabled","loadingIcon","createElement","wrapCSSVar","hashId","cssVarCls","mergedSize","classes","mergedStyle","assign","changeHandler","arguments","undefined","apply","component","Switch","__ANT_SWITCH","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/switch/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 LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport RcSwitch from 'rc-switch';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport Wave from '../_util/wave';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport useSize from '../config-provider/hooks/useSize';\nimport useStyle from './style';\nconst InternalSwitch = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n size: customizeSize,\n disabled: customDisabled,\n loading,\n className,\n rootClassName,\n style,\n checked: checkedProp,\n value,\n defaultChecked: defaultCheckedProp,\n defaultValue,\n onChange\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"size\", \"disabled\", \"loading\", \"className\", \"rootClassName\", \"style\", \"checked\", \"value\", \"defaultChecked\", \"defaultValue\", \"onChange\"]);\n const [checked, setChecked] = useMergedState(false, {\n value: checkedProp !== null && checkedProp !== void 0 ? checkedProp : value,\n defaultValue: defaultCheckedProp !== null && defaultCheckedProp !== void 0 ? defaultCheckedProp : defaultValue\n });\n const {\n getPrefixCls,\n direction,\n switch: SWITCH\n } = React.useContext(ConfigContext);\n // ===================== Disabled =====================\n const disabled = React.useContext(DisabledContext);\n const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;\n const prefixCls = getPrefixCls('switch', customizePrefixCls);\n const loadingIcon = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-handle`\n }, loading && /*#__PURE__*/React.createElement(LoadingOutlined, {\n className: `${prefixCls}-loading-icon`\n }));\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const mergedSize = useSize(customizeSize);\n const classes = classNames(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {\n [`${prefixCls}-small`]: mergedSize === 'small',\n [`${prefixCls}-loading`]: loading,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);\n const changeHandler = function () {\n setChecked(arguments.length <= 0 ? undefined : arguments[0]);\n onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, arguments);\n };\n return wrapCSSVar( /*#__PURE__*/React.createElement(Wave, {\n component: \"Switch\"\n }, /*#__PURE__*/React.createElement(RcSwitch, Object.assign({}, restProps, {\n checked: checked,\n onChange: changeHandler,\n prefixCls: prefixCls,\n className: classes,\n style: mergedStyle,\n disabled: mergedDisabled,\n ref: ref,\n loadingIcon: loadingIcon\n }))));\n});\nconst Switch = InternalSwitch;\nSwitch.__ANT_SWITCH = true;\nif (process.env.NODE_ENV !== 'production') {\n Switch.displayName = 'Switch';\n}\nexport default Switch;"],"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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