{"ast":null,"code":"\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport * as React from 'react';\nimport { flushSync } from 'react-dom';\nimport classNames from 'classnames';\nimport RcUpload from 'rc-upload';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport { useLocale } from '../locale';\nimport defaultLocale from '../locale/en_US';\nimport useStyle from './style';\nimport UploadList from './UploadList';\nimport { file2Obj, getFileItem, removeFileItem, updateFileList } from './utils';\nexport const LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;\nconst InternalUpload = (props, ref) => {\n const {\n fileList,\n defaultFileList,\n onRemove,\n showUploadList = true,\n listType = 'text',\n onPreview,\n onDownload,\n onChange,\n onDrop,\n previewFile,\n disabled: customDisabled,\n locale: propLocale,\n iconRender,\n isImageUrl,\n progress,\n prefixCls: customizePrefixCls,\n className,\n type = 'select',\n children,\n style,\n itemRender,\n maxCount,\n data = {},\n multiple = false,\n hasControlInside = true,\n action = '',\n accept = '',\n supportServerRender = true,\n rootClassName\n } = props;\n // ===================== Disabled =====================\n const disabled = React.useContext(DisabledContext);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const [mergedFileList, setMergedFileList] = useMergedState(defaultFileList || [], {\n value: fileList,\n postState: list => list !== null && list !== void 0 ? list : []\n });\n const [dragState, setDragState] = React.useState('drop');\n const upload = React.useRef(null);\n const wrapRef = React.useRef(null);\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Upload');\n process.env.NODE_ENV !== \"production\" ? warning('fileList' in props || !('value' in props), 'usage', '`value` is not a valid prop, do you mean `fileList`?') : void 0;\n warning.deprecated(!('transformFile' in props), 'transformFile', 'beforeUpload');\n }\n // Control mode will auto fill file uid if not provided\n React.useMemo(() => {\n const timestamp = Date.now();\n (fileList || []).forEach((file, index) => {\n if (!file.uid && !Object.isFrozen(file)) {\n file.uid = `__AUTO__${timestamp}_${index}__`;\n }\n });\n }, [fileList]);\n const onInternalChange = (file, changedFileList, event) => {\n let cloneList = _toConsumableArray(changedFileList);\n let exceedMaxCount = false;\n // Cut to match count\n if (maxCount === 1) {\n cloneList = cloneList.slice(-1);\n } else if (maxCount) {\n exceedMaxCount = cloneList.length > maxCount;\n cloneList = cloneList.slice(0, maxCount);\n }\n // Prevent React18 auto batch since input[upload] trigger process at same time\n // which makes fileList closure problem\n flushSync(() => {\n setMergedFileList(cloneList);\n });\n const changeInfo = {\n file: file,\n fileList: cloneList\n };\n if (event) {\n changeInfo.event = event;\n }\n if (!exceedMaxCount || file.status === 'removed' ||\n // We should ignore event if current file is exceed `maxCount`\n cloneList.some(f => f.uid === file.uid)) {\n flushSync(() => {\n onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo);\n });\n }\n };\n const mergedBeforeUpload = (file, fileListArgs) => __awaiter(void 0, void 0, void 0, function* () {\n const {\n beforeUpload,\n transformFile\n } = props;\n let parsedFile = file;\n if (beforeUpload) {\n const result = yield beforeUpload(file, fileListArgs);\n if (result === false) {\n return false;\n }\n // Hack for LIST_IGNORE, we add additional info to remove from the list\n delete file[LIST_IGNORE];\n if (result === LIST_IGNORE) {\n Object.defineProperty(file, LIST_IGNORE, {\n value: true,\n configurable: true\n });\n return false;\n }\n if (typeof result === 'object' && result) {\n parsedFile = result;\n }\n }\n if (transformFile) {\n parsedFile = yield transformFile(parsedFile);\n }\n return parsedFile;\n });\n const onBatchStart = batchFileInfoList => {\n // Skip file which marked as `LIST_IGNORE`, these file will not add to file list\n const filteredFileInfoList = batchFileInfoList.filter(info => !info.file[LIST_IGNORE]);\n // Nothing to do since no file need upload\n if (!filteredFileInfoList.length) {\n return;\n }\n const objectFileList = filteredFileInfoList.map(info => file2Obj(info.file));\n // Concat new files with prev files\n let newFileList = _toConsumableArray(mergedFileList);\n objectFileList.forEach(fileObj => {\n // Replace file if exist\n newFileList = updateFileList(fileObj, newFileList);\n });\n objectFileList.forEach((fileObj, index) => {\n // Repeat trigger `onChange` event for compatible\n let triggerFileObj = fileObj;\n if (!filteredFileInfoList[index].parsedFile) {\n // `beforeUpload` return false\n const {\n originFileObj\n } = fileObj;\n let clone;\n try {\n clone = new File([originFileObj], originFileObj.name, {\n type: originFileObj.type\n });\n } catch (_a) {\n clone = new Blob([originFileObj], {\n type: originFileObj.type\n });\n clone.name = originFileObj.name;\n clone.lastModifiedDate = new Date();\n clone.lastModified = new Date().getTime();\n }\n clone.uid = fileObj.uid;\n triggerFileObj = clone;\n } else {\n // Inject `uploading` status\n fileObj.status = 'uploading';\n }\n onInternalChange(triggerFileObj, newFileList);\n });\n };\n const onSuccess = (response, file, xhr) => {\n try {\n if (typeof response === 'string') {\n // biome-ignore lint/style/noParameterAssign: we need to modify response\n response = JSON.parse(response);\n }\n } catch (_a) {\n /* do nothing */\n }\n // removed\n if (!getFileItem(file, mergedFileList)) {\n return;\n }\n const targetItem = file2Obj(file);\n targetItem.status = 'done';\n targetItem.percent = 100;\n targetItem.response = response;\n targetItem.xhr = xhr;\n const nextFileList = updateFileList(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList);\n };\n const onProgress = (e, file) => {\n // removed\n if (!getFileItem(file, mergedFileList)) {\n return;\n }\n const targetItem = file2Obj(file);\n targetItem.status = 'uploading';\n targetItem.percent = e.percent;\n const nextFileList = updateFileList(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList, e);\n };\n const onError = (error, response, file) => {\n // removed\n if (!getFileItem(file, mergedFileList)) {\n return;\n }\n const targetItem = file2Obj(file);\n targetItem.error = error;\n targetItem.response = response;\n targetItem.status = 'error';\n const nextFileList = updateFileList(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList);\n };\n const handleRemove = file => {\n let currentFile;\n Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(ret => {\n var _a;\n // Prevent removing file\n if (ret === false) {\n return;\n }\n const removedFileList = removeFileItem(file, mergedFileList);\n if (removedFileList) {\n currentFile = Object.assign(Object.assign({}, file), {\n status: 'removed'\n });\n mergedFileList === null || mergedFileList === void 0 ? void 0 : mergedFileList.forEach(item => {\n const matchKey = currentFile.uid !== undefined ? 'uid' : 'name';\n if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) {\n item.status = 'removed';\n }\n });\n (_a = upload.current) === null || _a === void 0 ? void 0 : _a.abort(currentFile);\n onInternalChange(currentFile, removedFileList);\n }\n });\n };\n const onFileDrop = e => {\n setDragState(e.type);\n if (e.type === 'drop') {\n onDrop === null || onDrop === void 0 ? void 0 : onDrop(e);\n }\n };\n // Test needs\n React.useImperativeHandle(ref, () => ({\n onBatchStart,\n onSuccess,\n onProgress,\n onError,\n fileList: mergedFileList,\n upload: upload.current,\n nativeElement: wrapRef.current\n }));\n const {\n getPrefixCls,\n direction,\n upload: ctxUpload\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('upload', customizePrefixCls);\n const rcUploadProps = Object.assign(Object.assign({\n onBatchStart,\n onError,\n onProgress,\n onSuccess\n }, props), {\n data,\n multiple,\n action,\n accept,\n supportServerRender,\n prefixCls,\n disabled: mergedDisabled,\n beforeUpload: mergedBeforeUpload,\n onChange: undefined,\n hasControlInside\n });\n delete rcUploadProps.className;\n delete rcUploadProps.style;\n // Remove id to avoid open by label when trigger is hidden\n // !children: https://github.com/ant-design/ant-design/issues/14298\n // disabled: https://github.com/ant-design/ant-design/issues/16478\n // https://github.com/ant-design/ant-design/issues/24197\n if (!children || mergedDisabled) {\n delete rcUploadProps.id;\n }\n const wrapperCls = `${prefixCls}-wrapper`;\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, wrapperCls);\n const [contextLocale] = useLocale('Upload', defaultLocale.Upload);\n const {\n showRemoveIcon,\n showPreviewIcon,\n showDownloadIcon,\n removeIcon,\n previewIcon,\n downloadIcon,\n extra\n } = typeof showUploadList === 'boolean' ? {} : showUploadList;\n // use showRemoveIcon if it is specified explicitly\n const realShowRemoveIcon = typeof showRemoveIcon === 'undefined' ? !mergedDisabled : !!showRemoveIcon;\n const renderUploadList = (button, buttonVisible) => {\n if (!showUploadList) {\n return button;\n }\n return /*#__PURE__*/React.createElement(UploadList, {\n prefixCls: prefixCls,\n listType: listType,\n items: mergedFileList,\n previewFile: previewFile,\n onPreview: onPreview,\n onDownload: onDownload,\n onRemove: handleRemove,\n showRemoveIcon: realShowRemoveIcon,\n showPreviewIcon: showPreviewIcon,\n showDownloadIcon: showDownloadIcon,\n removeIcon: removeIcon,\n previewIcon: previewIcon,\n downloadIcon: downloadIcon,\n iconRender: iconRender,\n extra: extra,\n locale: Object.assign(Object.assign({}, contextLocale), propLocale),\n isImageUrl: isImageUrl,\n progress: progress,\n appendAction: button,\n appendActionVisible: buttonVisible,\n itemRender: itemRender,\n disabled: mergedDisabled\n });\n };\n const mergedCls = classNames(wrapperCls, className, rootClassName, hashId, cssVarCls, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.className, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-picture-card-wrapper`]: listType === 'picture-card',\n [`${prefixCls}-picture-circle-wrapper`]: listType === 'picture-circle'\n });\n const mergedStyle = Object.assign(Object.assign({}, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.style), style);\n // ======================== Render ========================\n if (type === 'drag') {\n const dragCls = classNames(hashId, prefixCls, `${prefixCls}-drag`, {\n [`${prefixCls}-drag-uploading`]: mergedFileList.some(file => file.status === 'uploading'),\n [`${prefixCls}-drag-hover`]: dragState === 'dragover',\n [`${prefixCls}-disabled`]: mergedDisabled,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: dragCls,\n style: mergedStyle,\n onDrop: onFileDrop,\n onDragOver: onFileDrop,\n onDragLeave: onFileDrop\n }, /*#__PURE__*/React.createElement(RcUpload, Object.assign({}, rcUploadProps, {\n ref: upload,\n className: `${prefixCls}-btn`\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-drag-container`\n }, children))), renderUploadList()));\n }\n const uploadButtonCls = classNames(prefixCls, `${prefixCls}-select`, {\n [`${prefixCls}-disabled`]: mergedDisabled\n });\n const uploadButton = /*#__PURE__*/React.createElement(\"div\", {\n className: uploadButtonCls,\n style: children ? undefined : {\n display: 'none'\n }\n }, /*#__PURE__*/React.createElement(RcUpload, Object.assign({}, rcUploadProps, {\n ref: upload\n })));\n if (listType === 'picture-card' || listType === 'picture-circle') {\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, renderUploadList(uploadButton, !!children)));\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, uploadButton, renderUploadList()));\n};\nconst Upload = /*#__PURE__*/React.forwardRef(InternalUpload);\nif (process.env.NODE_ENV !== 'production') {\n Upload.displayName = 'Upload';\n}\nexport default Upload;","map":{"version":3,"names":["_toConsumableArray","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","React","flushSync","classNames","RcUpload","useMergedState","devUseWarning","ConfigContext","DisabledContext","useLocale","defaultLocale","useStyle","UploadList","file2Obj","getFileItem","removeFileItem","updateFileList","LIST_IGNORE","Date","now","InternalUpload","props","ref","fileList","defaultFileList","onRemove","showUploadList","listType","onPreview","onDownload","onChange","onDrop","previewFile","disabled","customDisabled","locale","propLocale","iconRender","isImageUrl","progress","prefixCls","customizePrefixCls","className","type","children","style","itemRender","maxCount","data","multiple","hasControlInside","action","accept","supportServerRender","rootClassName","useContext","mergedDisabled","mergedFileList","setMergedFileList","postState","list","dragState","setDragState","useState","upload","useRef","wrapRef","process","env","NODE_ENV","warning","deprecated","useMemo","timestamp","forEach","file","index","uid","Object","isFrozen","onInternalChange","changedFileList","event","cloneList","exceedMaxCount","slice","length","changeInfo","status","some","f","mergedBeforeUpload","fileListArgs","beforeUpload","transformFile","parsedFile","defineProperty","configurable","onBatchStart","batchFileInfoList","filteredFileInfoList","filter","info","objectFileList","map","newFileList","fileObj","triggerFileObj","originFileObj","clone","File","name","_a","Blob","lastModifiedDate","lastModified","getTime","onSuccess","response","xhr","JSON","parse","targetItem","percent","nextFileList","onProgress","onError","error","handleRemove","currentFile","ret","removedFileList","assign","item","matchKey","undefined","current","abort","onFileDrop","useImperativeHandle","nativeElement","getPrefixCls","direction","ctxUpload","rcUploadProps","id","wrapperCls","wrapCSSVar","hashId","cssVarCls","contextLocale","Upload","showRemoveIcon","showPreviewIcon","showDownloadIcon","removeIcon","previewIcon","downloadIcon","extra","realShowRemoveIcon","renderUploadList","button","buttonVisible","createElement","items","appendAction","appendActionVisible","mergedCls","mergedStyle","dragCls","onDragOver","onDragLeave","uploadButtonCls","uploadButton","display","forwardRef","displayName"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/upload/Upload.js"],"sourcesContent":["\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport * as React from 'react';\nimport { flushSync } from 'react-dom';\nimport classNames from 'classnames';\nimport RcUpload from 'rc-upload';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport { useLocale } from '../locale';\nimport defaultLocale from '../locale/en_US';\nimport useStyle from './style';\nimport UploadList from './UploadList';\nimport { file2Obj, getFileItem, removeFileItem, updateFileList } from './utils';\nexport const LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;\nconst InternalUpload = (props, ref) => {\n const {\n fileList,\n defaultFileList,\n onRemove,\n showUploadList = true,\n listType = 'text',\n onPreview,\n onDownload,\n onChange,\n onDrop,\n previewFile,\n disabled: customDisabled,\n locale: propLocale,\n iconRender,\n isImageUrl,\n progress,\n prefixCls: customizePrefixCls,\n className,\n type = 'select',\n children,\n style,\n itemRender,\n maxCount,\n data = {},\n multiple = false,\n hasControlInside = true,\n action = '',\n accept = '',\n supportServerRender = true,\n rootClassName\n } = props;\n // ===================== Disabled =====================\n const disabled = React.useContext(DisabledContext);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const [mergedFileList, setMergedFileList] = useMergedState(defaultFileList || [], {\n value: fileList,\n postState: list => list !== null && list !== void 0 ? list : []\n });\n const [dragState, setDragState] = React.useState('drop');\n const upload = React.useRef(null);\n const wrapRef = React.useRef(null);\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Upload');\n process.env.NODE_ENV !== \"production\" ? warning('fileList' in props || !('value' in props), 'usage', '`value` is not a valid prop, do you mean `fileList`?') : void 0;\n warning.deprecated(!('transformFile' in props), 'transformFile', 'beforeUpload');\n }\n // Control mode will auto fill file uid if not provided\n React.useMemo(() => {\n const timestamp = Date.now();\n (fileList || []).forEach((file, index) => {\n if (!file.uid && !Object.isFrozen(file)) {\n file.uid = `__AUTO__${timestamp}_${index}__`;\n }\n });\n }, [fileList]);\n const onInternalChange = (file, changedFileList, event) => {\n let cloneList = _toConsumableArray(changedFileList);\n let exceedMaxCount = false;\n // Cut to match count\n if (maxCount === 1) {\n cloneList = cloneList.slice(-1);\n } else if (maxCount) {\n exceedMaxCount = cloneList.length > maxCount;\n cloneList = cloneList.slice(0, maxCount);\n }\n // Prevent React18 auto batch since input[upload] trigger process at same time\n // which makes fileList closure problem\n flushSync(() => {\n setMergedFileList(cloneList);\n });\n const changeInfo = {\n file: file,\n fileList: cloneList\n };\n if (event) {\n changeInfo.event = event;\n }\n if (!exceedMaxCount || file.status === 'removed' ||\n // We should ignore event if current file is exceed `maxCount`\n cloneList.some(f => f.uid === file.uid)) {\n flushSync(() => {\n onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo);\n });\n }\n };\n const mergedBeforeUpload = (file, fileListArgs) => __awaiter(void 0, void 0, void 0, function* () {\n const {\n beforeUpload,\n transformFile\n } = props;\n let parsedFile = file;\n if (beforeUpload) {\n const result = yield beforeUpload(file, fileListArgs);\n if (result === false) {\n return false;\n }\n // Hack for LIST_IGNORE, we add additional info to remove from the list\n delete file[LIST_IGNORE];\n if (result === LIST_IGNORE) {\n Object.defineProperty(file, LIST_IGNORE, {\n value: true,\n configurable: true\n });\n return false;\n }\n if (typeof result === 'object' && result) {\n parsedFile = result;\n }\n }\n if (transformFile) {\n parsedFile = yield transformFile(parsedFile);\n }\n return parsedFile;\n });\n const onBatchStart = batchFileInfoList => {\n // Skip file which marked as `LIST_IGNORE`, these file will not add to file list\n const filteredFileInfoList = batchFileInfoList.filter(info => !info.file[LIST_IGNORE]);\n // Nothing to do since no file need upload\n if (!filteredFileInfoList.length) {\n return;\n }\n const objectFileList = filteredFileInfoList.map(info => file2Obj(info.file));\n // Concat new files with prev files\n let newFileList = _toConsumableArray(mergedFileList);\n objectFileList.forEach(fileObj => {\n // Replace file if exist\n newFileList = updateFileList(fileObj, newFileList);\n });\n objectFileList.forEach((fileObj, index) => {\n // Repeat trigger `onChange` event for compatible\n let triggerFileObj = fileObj;\n if (!filteredFileInfoList[index].parsedFile) {\n // `beforeUpload` return false\n const {\n originFileObj\n } = fileObj;\n let clone;\n try {\n clone = new File([originFileObj], originFileObj.name, {\n type: originFileObj.type\n });\n } catch (_a) {\n clone = new Blob([originFileObj], {\n type: originFileObj.type\n });\n clone.name = originFileObj.name;\n clone.lastModifiedDate = new Date();\n clone.lastModified = new Date().getTime();\n }\n clone.uid = fileObj.uid;\n triggerFileObj = clone;\n } else {\n // Inject `uploading` status\n fileObj.status = 'uploading';\n }\n onInternalChange(triggerFileObj, newFileList);\n });\n };\n const onSuccess = (response, file, xhr) => {\n try {\n if (typeof response === 'string') {\n // biome-ignore lint/style/noParameterAssign: we need to modify response\n response = JSON.parse(response);\n }\n } catch (_a) {\n /* do nothing */\n }\n // removed\n if (!getFileItem(file, mergedFileList)) {\n return;\n }\n const targetItem = file2Obj(file);\n targetItem.status = 'done';\n targetItem.percent = 100;\n targetItem.response = response;\n targetItem.xhr = xhr;\n const nextFileList = updateFileList(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList);\n };\n const onProgress = (e, file) => {\n // removed\n if (!getFileItem(file, mergedFileList)) {\n return;\n }\n const targetItem = file2Obj(file);\n targetItem.status = 'uploading';\n targetItem.percent = e.percent;\n const nextFileList = updateFileList(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList, e);\n };\n const onError = (error, response, file) => {\n // removed\n if (!getFileItem(file, mergedFileList)) {\n return;\n }\n const targetItem = file2Obj(file);\n targetItem.error = error;\n targetItem.response = response;\n targetItem.status = 'error';\n const nextFileList = updateFileList(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList);\n };\n const handleRemove = file => {\n let currentFile;\n Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(ret => {\n var _a;\n // Prevent removing file\n if (ret === false) {\n return;\n }\n const removedFileList = removeFileItem(file, mergedFileList);\n if (removedFileList) {\n currentFile = Object.assign(Object.assign({}, file), {\n status: 'removed'\n });\n mergedFileList === null || mergedFileList === void 0 ? void 0 : mergedFileList.forEach(item => {\n const matchKey = currentFile.uid !== undefined ? 'uid' : 'name';\n if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) {\n item.status = 'removed';\n }\n });\n (_a = upload.current) === null || _a === void 0 ? void 0 : _a.abort(currentFile);\n onInternalChange(currentFile, removedFileList);\n }\n });\n };\n const onFileDrop = e => {\n setDragState(e.type);\n if (e.type === 'drop') {\n onDrop === null || onDrop === void 0 ? void 0 : onDrop(e);\n }\n };\n // Test needs\n React.useImperativeHandle(ref, () => ({\n onBatchStart,\n onSuccess,\n onProgress,\n onError,\n fileList: mergedFileList,\n upload: upload.current,\n nativeElement: wrapRef.current\n }));\n const {\n getPrefixCls,\n direction,\n upload: ctxUpload\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('upload', customizePrefixCls);\n const rcUploadProps = Object.assign(Object.assign({\n onBatchStart,\n onError,\n onProgress,\n onSuccess\n }, props), {\n data,\n multiple,\n action,\n accept,\n supportServerRender,\n prefixCls,\n disabled: mergedDisabled,\n beforeUpload: mergedBeforeUpload,\n onChange: undefined,\n hasControlInside\n });\n delete rcUploadProps.className;\n delete rcUploadProps.style;\n // Remove id to avoid open by label when trigger is hidden\n // !children: https://github.com/ant-design/ant-design/issues/14298\n // disabled: https://github.com/ant-design/ant-design/issues/16478\n // https://github.com/ant-design/ant-design/issues/24197\n if (!children || mergedDisabled) {\n delete rcUploadProps.id;\n }\n const wrapperCls = `${prefixCls}-wrapper`;\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, wrapperCls);\n const [contextLocale] = useLocale('Upload', defaultLocale.Upload);\n const {\n showRemoveIcon,\n showPreviewIcon,\n showDownloadIcon,\n removeIcon,\n previewIcon,\n downloadIcon,\n extra\n } = typeof showUploadList === 'boolean' ? {} : showUploadList;\n // use showRemoveIcon if it is specified explicitly\n const realShowRemoveIcon = typeof showRemoveIcon === 'undefined' ? !mergedDisabled : !!showRemoveIcon;\n const renderUploadList = (button, buttonVisible) => {\n if (!showUploadList) {\n return button;\n }\n return /*#__PURE__*/React.createElement(UploadList, {\n prefixCls: prefixCls,\n listType: listType,\n items: mergedFileList,\n previewFile: previewFile,\n onPreview: onPreview,\n onDownload: onDownload,\n onRemove: handleRemove,\n showRemoveIcon: realShowRemoveIcon,\n showPreviewIcon: showPreviewIcon,\n showDownloadIcon: showDownloadIcon,\n removeIcon: removeIcon,\n previewIcon: previewIcon,\n downloadIcon: downloadIcon,\n iconRender: iconRender,\n extra: extra,\n locale: Object.assign(Object.assign({}, contextLocale), propLocale),\n isImageUrl: isImageUrl,\n progress: progress,\n appendAction: button,\n appendActionVisible: buttonVisible,\n itemRender: itemRender,\n disabled: mergedDisabled\n });\n };\n const mergedCls = classNames(wrapperCls, className, rootClassName, hashId, cssVarCls, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.className, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-picture-card-wrapper`]: listType === 'picture-card',\n [`${prefixCls}-picture-circle-wrapper`]: listType === 'picture-circle'\n });\n const mergedStyle = Object.assign(Object.assign({}, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.style), style);\n // ======================== Render ========================\n if (type === 'drag') {\n const dragCls = classNames(hashId, prefixCls, `${prefixCls}-drag`, {\n [`${prefixCls}-drag-uploading`]: mergedFileList.some(file => file.status === 'uploading'),\n [`${prefixCls}-drag-hover`]: dragState === 'dragover',\n [`${prefixCls}-disabled`]: mergedDisabled,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: dragCls,\n style: mergedStyle,\n onDrop: onFileDrop,\n onDragOver: onFileDrop,\n onDragLeave: onFileDrop\n }, /*#__PURE__*/React.createElement(RcUpload, Object.assign({}, rcUploadProps, {\n ref: upload,\n className: `${prefixCls}-btn`\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-drag-container`\n }, children))), renderUploadList()));\n }\n const uploadButtonCls = classNames(prefixCls, `${prefixCls}-select`, {\n [`${prefixCls}-disabled`]: mergedDisabled\n });\n const uploadButton = /*#__PURE__*/React.createElement(\"div\", {\n className: uploadButtonCls,\n style: children ? undefined : {\n display: 'none'\n }\n }, /*#__PURE__*/React.createElement(RcUpload, Object.assign({}, rcUploadProps, {\n ref: upload\n })));\n if (listType === 'picture-card' || listType === 'picture-circle') {\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, renderUploadList(uploadButton, !!children)));\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, uploadButton, renderUploadList()));\n};\nconst Upload = /*#__PURE__*/React.forwardRef(InternalUpload);\nif (process.env.NODE_ENV !== 'production') {\n Upload.displayName = 'Upload';\n}\nexport default Upload;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,IAAIC,SAAS,GAAG,IAAI,IAAI,IAAI,CAACA,SAAS,IAAI,UAAUC,OAAO,EAAEC,UAAU,EAAEC,CAAC,EAAEC,SAAS,EAAE;EACrF,SAASC,KAAKA,CAACC,KAAK,EAAE;IACpB,OAAOA,KAAK,YAAYH,CAAC,GAAGG,KAAK,GAAG,IAAIH,CAAC,CAAC,UAAUI,OAAO,EAAE;MAC3DA,OAAO,CAACD,KAAK,CAAC;IAChB,CAAC,CAAC;EACJ;EACA,OAAO,KAAKH,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