{"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 DisabledContext from '../config-provider/DisabledContext';\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: customDisabled,\n action = 'click',\n visibilityToggle = true,\n iconRender = defaultIconRender,\n suffix\n } = props;\n // ===================== Disabled =====================\n const disabled = React.useContext(DisabledContext);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\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 var _a;\n if (mergedDisabled) {\n return;\n }\n if (visible) {\n removePasswordTimeout();\n }\n const nextVisible = !visible;\n setVisible(nextVisible);\n if (typeof visibilityToggle === 'object') {\n (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, nextVisible);\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: (/*#__PURE__*/React.createElement(React.Fragment, null, suffixIcon, suffix))\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","DisabledContext","useRemovePasswordTimeout","Input","defaultIconRender","visible","createElement","actionMap","click","hover","Password","forwardRef","props","ref","disabled","customDisabled","action","visibilityToggle","iconRender","suffix","useContext","mergedDisabled","visibilityControlled","undefined","setVisible","inputRef","useEffect","removePasswordTimeout","onVisibleChange","_a","nextVisible","getIcon","prefixCls","iconTrigger","icon","iconProps","className","key","onMouseDown","preventDefault","onMouseUp","cloneElement","isValidElement","customizePrefixCls","inputPrefixCls","customizeInputPrefixCls","size","restProps","getPrefixCls","suffixIcon","inputClassName","omittedProps","assign","type","Fragment","process","env","NODE_ENV","displayName"],"sources":["/Users/max_liu/max_liu/company/tools_auto_pt/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 DisabledContext from '../config-provider/DisabledContext';\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: customDisabled,\n action = 'click',\n visibilityToggle = true,\n iconRender = defaultIconRender,\n suffix\n } = props;\n // ===================== Disabled =====================\n const disabled = React.useContext(DisabledContext);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\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 var _a;\n if (mergedDisabled) {\n return;\n }\n if (visible) {\n removePasswordTimeout();\n }\n const nextVisible = !visible;\n setVisible(nextVisible);\n if (typeof visibilityToggle === 'object') {\n (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, nextVisible);\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: (/*#__PURE__*/React.createElement(React.Fragment, null, suffixIcon, suffix))\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,CAA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