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

1 line
14 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 { useRef, useState } from 'react';\nimport EyeInvisibleOutlined from \"@ant-design/icons/es/icons/EyeInvisibleOutlined\";\nimport EyeOutlined from \"@ant-design/icons/es/icons/EyeOutlined\";\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { composeRef } from \"rc-util/es/ref\";\nimport { ConfigContext } from '../config-provider';\nimport useRemovePasswordTimeout from './hooks/useRemovePasswordTimeout';\nimport Input from './Input';\nconst defaultIconRender = visible => visible ? /*#__PURE__*/React.createElement(EyeOutlined, null) : /*#__PURE__*/React.createElement(EyeInvisibleOutlined, null);\nconst actionMap = {\n click: 'onClick',\n hover: 'onMouseOver'\n};\nconst Password = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n disabled,\n action = 'click',\n visibilityToggle = true,\n iconRender = defaultIconRender\n } = props;\n const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;\n const [visible, setVisible] = useState(() => visibilityControlled ? visibilityToggle.visible : false);\n const inputRef = useRef(null);\n React.useEffect(() => {\n if (visibilityControlled) {\n setVisible(visibilityToggle.visible);\n }\n }, [visibilityControlled, visibilityToggle]);\n // Remove Password value\n const removePasswordTimeout = useRemovePasswordTimeout(inputRef);\n const onVisibleChange = () => {\n if (disabled) {\n return;\n }\n if (visible) {\n removePasswordTimeout();\n }\n setVisible(prevState => {\n var _a;\n const newState = !prevState;\n if (typeof visibilityToggle === 'object') {\n (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);\n }\n return newState;\n });\n };\n const getIcon = prefixCls => {\n const iconTrigger = actionMap[action] || '';\n const icon = iconRender(visible);\n const iconProps = {\n [iconTrigger]: onVisibleChange,\n className: `${prefixCls}-icon`,\n key: 'passwordIcon',\n onMouseDown: e => {\n // Prevent focused state lost\n // https://github.com/ant-design/ant-design/issues/15173\n e.preventDefault();\n },\n onMouseUp: e => {\n // Prevent caret position change\n // https://github.com/ant-design/ant-design/issues/23524\n e.preventDefault();\n }\n };\n return /*#__PURE__*/React.cloneElement( /*#__PURE__*/React.isValidElement(icon) ? icon : /*#__PURE__*/React.createElement(\"span\", null, icon), iconProps);\n };\n const {\n className,\n prefixCls: customizePrefixCls,\n inputPrefixCls: customizeInputPrefixCls,\n size\n } = props,\n restProps = __rest(props, [\"className\", \"prefixCls\", \"inputPrefixCls\", \"size\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);\n const prefixCls = getPrefixCls('input-password', customizePrefixCls);\n const suffixIcon = visibilityToggle && getIcon(prefixCls);\n const inputClassName = classNames(prefixCls, className, {\n [`${prefixCls}-${size}`]: !!size\n });\n const omittedProps = Object.assign(Object.assign({}, omit(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {\n type: visible ? 'text' : 'password',\n className: inputClassName,\n prefixCls: inputPrefixCls,\n suffix: suffixIcon\n });\n if (size) {\n omittedProps.size = size;\n }\n return /*#__PURE__*/React.createElement(Input, Object.assign({\n ref: composeRef(ref, inputRef)\n }, omittedProps));\n});\nif (process.env.NODE_ENV !== 'production') {\n Password.displayName = 'Input.Password';\n}\nexport default Password;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","useRef","useState","EyeInvisibleOutlined","EyeOutlined","classNames","omit","composeRef","ConfigContext","useRemovePasswordTimeout","Input","defaultIconRender","visible","createElement","actionMap","click","hover","Password","forwardRef","props","ref","disabled","action","visibilityToggle","iconRender","visibilityControlled","undefined","setVisible","inputRef","useEffect","removePasswordTimeout","onVisibleChange","prevState","_a","newState","getIcon","prefixCls","iconTrigger","icon","iconProps","className","key","onMouseDown","preventDefault","onMouseUp","cloneElement","isValidElement","customizePrefixCls","inputPrefixCls","customizeInputPrefixCls","size","restProps","getPrefixCls","useContext","suffixIcon","inputClassName","omittedProps","assign","type","suffix","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/input/Password.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 { useRef, useState } from 'react';\nimport EyeInvisibleOutlined from \"@ant-design/icons/es/icons/EyeInvisibleOutlined\";\nimport EyeOutlined from \"@ant-design/icons/es/icons/EyeOutlined\";\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { composeRef } from \"rc-util/es/ref\";\nimport { ConfigContext } from '../config-provider';\nimport useRemovePasswordTimeout from './hooks/useRemovePasswordTimeout';\nimport Input from './Input';\nconst defaultIconRender = visible => visible ? /*#__PURE__*/React.createElement(EyeOutlined, null) : /*#__PURE__*/React.createElement(EyeInvisibleOutlined, null);\nconst actionMap = {\n click: 'onClick',\n hover: 'onMouseOver'\n};\nconst Password = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n disabled,\n action = 'click',\n visibilityToggle = true,\n iconRender = defaultIconRender\n } = props;\n const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;\n const [visible, setVisible] = useState(() => visibilityControlled ? visibilityToggle.visible : false);\n const inputRef = useRef(null);\n React.useEffect(() => {\n if (visibilityControlled) {\n setVisible(visibilityToggle.visible);\n }\n }, [visibilityControlled, visibilityToggle]);\n // Remove Password value\n const removePasswordTimeout = useRemovePasswordTimeout(inputRef);\n const onVisibleChange = () => {\n if (disabled) {\n return;\n }\n if (visible) {\n removePasswordTimeout();\n }\n setVisible(prevState => {\n var _a;\n const newState = !prevState;\n if (typeof visibilityToggle === 'object') {\n (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);\n }\n return newState;\n });\n };\n const getIcon = prefixCls => {\n const iconTrigger = actionMap[action] || '';\n const icon = iconRender(visible);\n const iconProps = {\n [iconTrigger]: onVisibleChange,\n className: `${prefixCls}-icon`,\n key: 'passwordIcon',\n onMouseDown: e => {\n // Prevent focused state lost\n // https://github.com/ant-design/ant-design/issues/15173\n e.preventDefault();\n },\n onMouseUp: e => {\n // Prevent caret position change\n // https://github.com/ant-design/ant-design/issues/23524\n e.preventDefault();\n }\n };\n return /*#__PURE__*/React.cloneElement( /*#__PURE__*/React.isValidElement(icon) ? icon : /*#__PURE__*/React.createElement(\"span\", null, icon), iconProps);\n };\n const {\n className,\n prefixCls: customizePrefixCls,\n inputPrefixCls: customizeInputPrefixCls,\n size\n } = props,\n restProps = __rest(props, [\"className\", \"prefixCls\", \"inputPrefixCls\", \"size\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);\n const prefixCls = getPrefixCls('input-password', customizePrefixCls);\n const suffixIcon = visibilityToggle && getIcon(prefixCls);\n const inputClassName = classNames(prefixCls, className, {\n [`${prefixCls}-${size}`]: !!size\n });\n const omittedProps = Object.assign(Object.assign({}, omit(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {\n type: visible ? 'text' : 'password',\n className: inputClassName,\n prefixCls: inputPrefixCls,\n suffix: suffixIcon\n });\n if (size) {\n omittedProps.size = size;\n }\n return /*#__PURE__*/React.createElement(Input, Object.assign({\n ref: composeRef(ref, inputRef)\n }, omittedProps));\n});\nif (process.env.NODE_ENV !== 'production') {\n Password.displayName = 'Input.Password';\n}\nexport default Password;"],"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,CAAC,CAAC;EACnG;EACA,OAAOR,CAAC;AACV,CAAC;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