1 Star 0 Fork 0

阿炸克斯/approval-data-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
247.async.js 47.43 KB
一键复制 编辑 原始数据 按行查看 历史
GitHub Action 提交于 2024-11-04 03:32 . update
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[247],{12415:function(He,pe,p){p.d(pe,{Z:function(){return Ce}});var l=p(87366),J=p(93236),fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},T=fe,Y=p(12174),$e=function(we,me){return J.createElement(Y.Z,(0,l.Z)({},we,{ref:me,icon:T}))},Ce=J.forwardRef($e)},65510:function(He,pe,p){p.d(pe,{Z:function(){return J}});var l=p(93236);function J(){const[,fe]=l.useReducer(T=>T+1,0);return fe}},72247:function(He,pe,p){p.d(pe,{Z:function(){return rn}});var l=p(93236),J=p(74758),fe=p(84875),T=p.n(fe),Y=p(87366),$e=p(87989),Ce=p(51852),Re=p(96214),we=p(56099),me=p(58216),je=p(17576),Be=p(43941),ge=p(88143),ft=p(66097),mt=p(85323);function gt(e,t){var r="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),n=new Error(r);return n.status=t.status,n.method=e.method,n.url=e.action,n}function Xe(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(r){return t}}function vt(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(a){a.total>0&&(a.percent=a.loaded/a.total*100),e.onProgress(a)});var r=new FormData;e.data&&Object.keys(e.data).forEach(function(i){var a=e.data[i];if(Array.isArray(a)){a.forEach(function(s){r.append("".concat(i,"[]"),s)});return}r.append(i,a)}),e.file instanceof Blob?r.append(e.filename,e.file,e.file.name):r.append(e.filename,e.file),t.onerror=function(a){e.onError(a)},t.onload=function(){return t.status<200||t.status>=300?e.onError(gt(e,t),Xe(t)):e.onSuccess(Xe(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var n=e.headers||{};return n["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(n).forEach(function(i){n[i]!==null&&t.setRequestHeader(i,n[i])}),t.send(r),{abort:function(){t.abort()}}}var ht=+new Date,yt=0;function Fe(){return"rc-upload-".concat(ht,"-").concat(++yt)}var bt=p(55549),Ne=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",i=e.type||"",a=i.replace(/\/.*$/,"");return r.some(function(s){var o=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(o.charAt(0)==="."){var c=n.toLowerCase(),d=o.toLowerCase(),u=[d];return(d===".jpg"||d===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(function(f){return c.endsWith(f)})}return/\/\*$/.test(o)?a===o.replace(/\/.*$/,""):i===o?!0:/^\w+$/.test(o)?((0,bt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(o,"'.Skip for check.")),!0):!1})}return!0};function $t(e,t){var r=e.createReader(),n=[];function i(){r.readEntries(function(a){var s=Array.prototype.slice.apply(a);n=n.concat(s);var o=!s.length;o?t(n):i()})}i()}var Ct=function(t,r,n){var i=function a(s,o){s.path=o||"",s.isFile?s.file(function(c){n(c)&&(s.fullPath&&!c.webkitRelativePath&&(Object.defineProperties(c,{webkitRelativePath:{writable:!0}}),c.webkitRelativePath=s.fullPath.replace(/^\//,""),Object.defineProperties(c,{webkitRelativePath:{writable:!1}})),r([c]))}):s.isDirectory&&$t(s,function(c){c.forEach(function(d){a(d,"".concat(o).concat(s.name,"/"))})})};t.forEach(function(a){i(a.webkitGetAsEntry())})},wt=Ct,St=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],Et=function(e){(0,Re.Z)(r,e);var t=(0,we.Z)(r);function r(){var n;(0,$e.Z)(this,r);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=t.call.apply(t,[this].concat(a)),n.state={uid:Fe()},n.reqs={},n.fileInput=void 0,n._isMounted=void 0,n.onChange=function(o){var c=n.props,d=c.accept,u=c.directory,f=o.target.files,m=(0,J.Z)(f).filter(function(y){return!u||Ne(y,d)});n.uploadFiles(m),n.reset()},n.onClick=function(o){var c=n.fileInput;if(c){var d=n.props,u=d.children,f=d.onClick;if(u&&u.type==="button"){var m=c.parentNode;m.focus(),m.querySelector("button").blur()}c.click(),f&&f(o)}},n.onKeyDown=function(o){o.key==="Enter"&&n.onClick(o)},n.onFileDrop=function(o){var c=n.props.multiple;if(o.preventDefault(),o.type!=="dragover")if(n.props.directory)wt(Array.prototype.slice.call(o.dataTransfer.items),n.uploadFiles,function(u){return Ne(u,n.props.accept)});else{var d=(0,J.Z)(o.dataTransfer.files).filter(function(u){return Ne(u,n.props.accept)});c===!1&&(d=d.slice(0,1)),n.uploadFiles(d)}},n.uploadFiles=function(o){var c=(0,J.Z)(o),d=c.map(function(u){return u.uid=Fe(),n.processFile(u,c)});Promise.all(d).then(function(u){var f=n.props.onBatchStart;f==null||f(u.map(function(m){var y=m.origin,x=m.parsedFile;return{file:y,parsedFile:x}})),u.filter(function(m){return m.parsedFile!==null}).forEach(function(m){n.post(m)})})},n.processFile=function(){var o=(0,ft.Z)((0,Be.Z)().mark(function c(d,u){var f,m,y,x,O,$,I,D,C;return(0,Be.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(f=n.props.beforeUpload,m=d,!f){v.next=14;break}return v.prev=3,v.next=6,f(d,u);case 6:m=v.sent,v.next=12;break;case 9:v.prev=9,v.t0=v.catch(3),m=!1;case 12:if(m!==!1){v.next=14;break}return v.abrupt("return",{origin:d,parsedFile:null,action:null,data:null});case 14:if(y=n.props.action,typeof y!="function"){v.next=21;break}return v.next=18,y(d);case 18:x=v.sent,v.next=22;break;case 21:x=y;case 22:if(O=n.props.data,typeof O!="function"){v.next=29;break}return v.next=26,O(d);case 26:$=v.sent,v.next=30;break;case 29:$=O;case 30:return I=((0,ge.Z)(m)==="object"||typeof m=="string")&&m?m:d,I instanceof File?D=I:D=new File([I],d.name,{type:d.type}),C=D,C.uid=d.uid,v.abrupt("return",{origin:d,data:$,parsedFile:C,action:x});case 35:case"end":return v.stop()}},c,null,[[3,9]])}));return function(c,d){return o.apply(this,arguments)}}(),n.saveFileInput=function(o){n.fileInput=o},n}return(0,Ce.Z)(r,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(i){var a=this,s=i.data,o=i.origin,c=i.action,d=i.parsedFile;if(this._isMounted){var u=this.props,f=u.onStart,m=u.customRequest,y=u.name,x=u.headers,O=u.withCredentials,$=u.method,I=o.uid,D=m||vt,C={action:c,filename:y,data:s,file:d,headers:x,withCredentials:O,method:$||"post",onProgress:function(v){var j=a.props.onProgress;j==null||j(v,d)},onSuccess:function(v,j){var w=a.props.onSuccess;w==null||w(v,d,j),delete a.reqs[I]},onError:function(v,j){var w=a.props.onError;w==null||w(v,j,d),delete a.reqs[I]}};f(o),this.reqs[I]=D(C)}}},{key:"reset",value:function(){this.setState({uid:Fe()})}},{key:"abort",value:function(i){var a=this.reqs;if(i){var s=i.uid?i.uid:i;a[s]&&a[s].abort&&a[s].abort(),delete a[s]}else Object.keys(a).forEach(function(o){a[o]&&a[o].abort&&a[o].abort(),delete a[o]})}},{key:"render",value:function(){var i,a=this.props,s=a.component,o=a.prefixCls,c=a.className,d=a.disabled,u=a.id,f=a.style,m=a.multiple,y=a.accept,x=a.capture,O=a.children,$=a.directory,I=a.openFileDialogOnClick,D=a.onMouseEnter,C=a.onMouseLeave,h=(0,je.Z)(a,St),v=T()((i={},(0,me.Z)(i,o,!0),(0,me.Z)(i,"".concat(o,"-disabled"),d),(0,me.Z)(i,c,c),i)),j=$?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},w=d?{}:{onClick:I?this.onClick:function(){},onKeyDown:I?this.onKeyDown:function(){},onMouseEnter:D,onMouseLeave:C,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return l.createElement(s,(0,Y.Z)({},w,{className:v,role:"button",style:f}),l.createElement("input",(0,Y.Z)({},(0,mt.Z)(h,{aria:!0,data:!0}),{id:u,type:"file",ref:this.saveFileInput,onClick:function(U){return U.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:y},j,{multiple:m,onChange:this.onChange},x!=null?{capture:x}:{})),O)}}]),r}(l.Component),xt=Et;function Te(){}var Ve=function(e){(0,Re.Z)(r,e);var t=(0,we.Z)(r);function r(){var n;(0,$e.Z)(this,r);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=t.call.apply(t,[this].concat(a)),n.uploader=void 0,n.saveUploader=function(o){n.uploader=o},n}return(0,Ce.Z)(r,[{key:"abort",value:function(i){this.uploader.abort(i)}},{key:"render",value:function(){return l.createElement(xt,(0,Y.Z)({},this.props,{ref:this.saveUploader}))}}]),r}(l.Component);Ve.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Te,onError:Te,onSuccess:Te,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Ot=Ve,Ge=Ot,It=p(23533),Ke=p(19103),Se=p(80998),Pt=p(62469),Dt=p(96283),Lt=p(33805),Rt={icon:function(t,r){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:r}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},jt=Rt,ve=p(12174),Ft=function(t,r){return l.createElement(ve.Z,(0,Y.Z)({},t,{ref:r,icon:jt}))},Nt=l.forwardRef(Ft),Je=p(96706),Tt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Zt=Tt,At=function(t,r){return l.createElement(ve.Z,(0,Y.Z)({},t,{ref:r,icon:Zt}))},Mt=l.forwardRef(At),Ut={icon:function(t,r){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:r}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:r}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:r}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},kt=Ut,Wt=function(t,r){return l.createElement(ve.Z,(0,Y.Z)({},t,{ref:r,icon:kt}))},zt=l.forwardRef(Wt),Ze=p(32127),Ht=p(65510),Bt=p(93834),Ee=p(39168),Ye=p(57002);function xe(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function Oe(e,t){const r=(0,J.Z)(t),n=r.findIndex(i=>{let{uid:a}=i;return a===e.uid});return n===-1?r.push(e):r[n]=e,r}function Ae(e,t){const r=e.uid!==void 0?"uid":"name";return t.filter(n=>n[r]===e[r])[0]}function Xt(e,t){const r=e.uid!==void 0?"uid":"name",n=t.filter(i=>i[r]!==e[r]);return n.length===t.length?null:n}const Vt=function(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},Qe=e=>e.indexOf("image/")===0,Gt=e=>{if(e.type&&!e.thumbUrl)return Qe(e.type);const t=e.thumbUrl||e.url||"",r=Vt(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(t)||r)},oe=200;function Kt(e){return new Promise(t=>{if(!e.type||!Qe(e.type)){t("");return}const r=document.createElement("canvas");r.width=oe,r.height=oe,r.style.cssText=`position: fixed; left: 0; top: 0; width: ${oe}px; height: ${oe}px; z-index: 9999; display: none;`,document.body.appendChild(r);const n=r.getContext("2d"),i=new Image;if(i.onload=()=>{const{width:a,height:s}=i;let o=oe,c=oe,d=0,u=0;a>s?(c=s*(oe/a),u=-(c-o)/2):(o=a*(oe/s),d=-(o-c)/2),n.drawImage(i,d,u,o,c);const f=r.toDataURL();document.body.removeChild(r),t(f)},i.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const a=new FileReader;a.addEventListener("load",()=>{a.result&&(i.src=a.result)}),a.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var Jt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Yt=Jt,Qt=function(t,r){return l.createElement(ve.Z,(0,Y.Z)({},t,{ref:r,icon:Yt}))},qt=l.forwardRef(Qt),_t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},er=_t,tr=function(t,r){return l.createElement(ve.Z,(0,Y.Z)({},t,{ref:r,icon:er}))},rr=l.forwardRef(tr),nr=p(67478),or=p(91329),ir=p(12415),ar=p(73648),sr=p(37059),lr=p(35564),Ie=p(49919),qe={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},_e=function(){var t=(0,l.useRef)([]),r=(0,l.useRef)(null);return(0,l.useEffect)(function(){var n=Date.now(),i=!1;t.current.forEach(function(a){if(a){i=!0;var s=a.style;s.transitionDuration=".3s, .3s, .3s, .06s",r.current&&n-r.current<100&&(s.transitionDuration="0s, 0s")}}),i&&(r.current=Date.now())}),t.current},cr=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],dr=function(t){var r=(0,Ie.Z)((0,Ie.Z)({},qe),t),n=r.className,i=r.percent,a=r.prefixCls,s=r.strokeColor,o=r.strokeLinecap,c=r.strokeWidth,d=r.style,u=r.trailColor,f=r.trailWidth,m=r.transition,y=(0,je.Z)(r,cr);delete y.gapPosition;var x=Array.isArray(i)?i:[i],O=Array.isArray(s)?s:[s],$=_e(),I=c/2,D=100-c/2,C="M ".concat(o==="round"?I:0,",").concat(I,`
L `).concat(o==="round"?D:100,",").concat(I),h="0 0 100 ".concat(c),v=0;return l.createElement("svg",(0,Y.Z)({className:T()("".concat(a,"-line"),n),viewBox:h,preserveAspectRatio:"none",style:d},y),l.createElement("path",{className:"".concat(a,"-line-trail"),d:C,strokeLinecap:o,stroke:u,strokeWidth:f||c,fillOpacity:"0"}),x.map(function(j,w){var k=1;switch(o){case"round":k=1-c/100;break;case"square":k=1-c/2/100;break;default:k=1;break}var U={strokeDasharray:"".concat(j*k,"px, 100px"),strokeDashoffset:"-".concat(v,"px"),transition:m||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Z=O[w]||O[O.length-1];return v+=j,l.createElement("path",{key:w,className:"".concat(a,"-line-path"),d:C,strokeLinecap:o,stroke:Z,strokeWidth:c,fillOpacity:"0",ref:function(H){$[w]=H},style:U})}))},ur=dr,pr=p(47028),fr=p(97735),et=0,mr=(0,fr.Z)();function gr(){var e;return mr?(e=et,et+=1):e="TEST_OR_SSR",e}var vr=function(e){var t=l.useState(),r=(0,pr.Z)(t,2),n=r[0],i=r[1];return l.useEffect(function(){i("rc_progress_".concat(gr()))},[]),e||n},hr=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function tt(e){return+e.replace("%","")}function rt(e){var t=e!=null?e:[];return Array.isArray(t)?t:[t]}var he=100,Me=function(t,r,n,i,a,s,o,c,d,u){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,m=n/100*360*((360-s)/360),y=s===0?0:{bottom:0,top:180,left:90,right:-90}[o],x=(100-i)/100*r;return d==="round"&&i!==100&&(x+=u/2,x>=r&&(x=r-.01)),{stroke:typeof c=="string"?c:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:x+f,transform:"rotate(".concat(a+m+y,"deg)"),transformOrigin:"0 0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},yr=function(t){var r=(0,Ie.Z)((0,Ie.Z)({},qe),t),n=r.id,i=r.prefixCls,a=r.steps,s=r.strokeWidth,o=r.trailWidth,c=r.gapDegree,d=c===void 0?0:c,u=r.gapPosition,f=r.trailColor,m=r.strokeLinecap,y=r.style,x=r.className,O=r.strokeColor,$=r.percent,I=(0,je.Z)(r,hr),D=vr(n),C="".concat(D,"-gradient"),h=he/2-s/2,v=Math.PI*2*h,j=d>0?90+d/2:-90,w=v*((360-d)/360),k=(0,ge.Z)(a)==="object"?a:{count:a,space:2},U=k.count,Z=k.space,q=Me(v,w,0,100,j,d,u,f,m,s),H=rt($),A=rt(O),N=A.find(function(B){return B&&(0,ge.Z)(B)==="object"}),L=_e(),Q=function(){var z=0;return H.map(function(G,X){var _=A[X]||A[A.length-1],g=_&&(0,ge.Z)(_)==="object"?"url(#".concat(C,")"):void 0,R=Me(v,w,z,G,j,d,u,_,m,s);return z+=G,l.createElement("circle",{key:X,className:"".concat(i,"-circle-path"),r:h,cx:0,cy:0,stroke:g,strokeLinecap:m,strokeWidth:s,opacity:G===0?0:1,style:R,ref:function(W){L[X]=W}})}).reverse()},ie=function(){var z=Math.round(U*(H[0]/100)),G=100/U,X=0;return new Array(U).fill(null).map(function(_,g){var R=g<=z-1?A[0]:f,V=R&&(0,ge.Z)(R)==="object"?"url(#".concat(C,")"):void 0,W=Me(v,w,X,G,j,d,u,R,"butt",s,Z);return X+=(w-W.strokeDashoffset+Z)*100/w,l.createElement("circle",{key:g,className:"".concat(i,"-circle-path"),r:h,cx:0,cy:0,stroke:V,strokeWidth:s,opacity:1,style:W,ref:function(te){L[g]=te}})})};return l.createElement("svg",(0,Y.Z)({className:T()("".concat(i,"-circle"),x),viewBox:"".concat(-he/2," ").concat(-he/2," ").concat(he," ").concat(he),style:y,id:n,role:"presentation"},I),N&&l.createElement("defs",null,l.createElement("linearGradient",{id:C,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(N).sort(function(B,z){return tt(B)-tt(z)}).map(function(B,z){return l.createElement("stop",{key:z,offset:B,stopColor:N[B]})}))),!U&&l.createElement("circle",{className:"".concat(i,"-circle-trail"),r:h,cx:0,cy:0,stroke:f,strokeLinecap:m,strokeWidth:o||s,style:q}),U?ie():Q())},nt=yr,fn={Line:ur,Circle:nt},ot=p(44275),ye=p(81548);function ae(e){return!e||e<0?0:e>100?100:e}function Pe(e){let{success:t,successPercent:r}=e,n=r;return t&&"progress"in t&&(n=t.progress),t&&"percent"in t&&(n=t.percent),n}const br=e=>{let{percent:t,success:r,successPercent:n}=e;const i=ae(Pe({success:r,successPercent:n}));return[i,ae(ae(t)-i)]},$r=e=>{let{success:t={},strokeColor:r}=e;const{strokeColor:n}=t;return[n||ye.ez.green,r||null]},De=(e,t,r)=>{var n,i,a,s;let o=-1,c=-1;if(t==="step"){const d=r.steps,u=r.strokeWidth;typeof e=="string"||typeof e=="undefined"?(o=e==="small"?2:14,c=u!=null?u:8):typeof e=="number"?[o,c]=[e,e]:[o=14,c=8]=e,o*=d}else if(t==="line"){const d=r==null?void 0:r.strokeWidth;typeof e=="string"||typeof e=="undefined"?c=d||(e==="small"?6:8):typeof e=="number"?[o,c]=[e,e]:[o=-1,c=8]=e}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e=="undefined"?[o,c]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[o,c]=[e,e]:(o=(i=(n=e[0])!==null&&n!==void 0?n:e[1])!==null&&i!==void 0?i:120,c=(s=(a=e[0])!==null&&a!==void 0?a:e[1])!==null&&s!==void 0?s:120));return[o,c]},Cr=3,wr=e=>Cr/e*100;var Sr=e=>{const{prefixCls:t,trailColor:r=null,strokeLinecap:n="round",gapPosition:i,gapDegree:a,width:s=120,type:o,children:c,success:d,size:u=s}=e,[f,m]=De(u,"circle");let{strokeWidth:y}=e;y===void 0&&(y=Math.max(wr(f),6));const x={width:f,height:m,fontSize:f*.15+6},O=l.useMemo(()=>{if(a||a===0)return a;if(o==="dashboard")return 75},[a,o]),$=i||o==="dashboard"&&"bottom"||void 0,I=Object.prototype.toString.call(e.strokeColor)==="[object Object]",D=$r({success:d,strokeColor:e.strokeColor}),C=T()(`${t}-inner`,{[`${t}-circle-gradient`]:I}),h=l.createElement(nt,{percent:br(e),strokeWidth:y,trailWidth:y,strokeColor:D,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:O,gapPosition:$});return l.createElement("div",{className:C,style:x},f<=20?l.createElement(ot.Z,{title:c},l.createElement("span",null,h)):l.createElement(l.Fragment,null,h,c))},Er=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const xr=e=>{let t=[];return Object.keys(e).forEach(r=>{const n=parseFloat(r.replace(/%/g,""));isNaN(n)||t.push({key:n,value:e[r]})}),t=t.sort((r,n)=>r.key-n.key),t.map(r=>{let{key:n,value:i}=r;return`${i} ${n}%`}).join(", ")},Or=(e,t)=>{const{from:r=ye.ez.blue,to:n=ye.ez.blue,direction:i=t==="rtl"?"to left":"to right"}=e,a=Er(e,["from","to","direction"]);if(Object.keys(a).length!==0){const s=xr(a);return{backgroundImage:`linear-gradient(${i}, ${s})`}}return{backgroundImage:`linear-gradient(${i}, ${r}, ${n})`}};var Ir=e=>{const{prefixCls:t,direction:r,percent:n,size:i,strokeWidth:a,strokeColor:s,strokeLinecap:o="round",children:c,trailColor:d=null,success:u}=e,f=s&&typeof s!="string"?Or(s,r):{backgroundColor:s},m=o==="square"||o==="butt"?0:void 0,y={backgroundColor:d||void 0,borderRadius:m},x=i!=null?i:[-1,a||(i==="small"?6:8)],[O,$]=De(x,"line",{strokeWidth:a}),I=Object.assign({width:`${ae(n)}%`,height:$,borderRadius:m},f),D=Pe(e),C={width:`${ae(D)}%`,height:$,borderRadius:m,backgroundColor:u==null?void 0:u.strokeColor},h={width:O<0?"100%":O,height:$};return l.createElement(l.Fragment,null,l.createElement("div",{className:`${t}-outer`,style:h},l.createElement("div",{className:`${t}-inner`,style:y},l.createElement("div",{className:`${t}-bg`,style:I}),D!==void 0?l.createElement("div",{className:`${t}-success-bg`,style:C}):null)),c)},Pr=e=>{const{size:t,steps:r,percent:n=0,strokeWidth:i=8,strokeColor:a,trailColor:s=null,prefixCls:o,children:c}=e,d=Math.round(r*(n/100)),u=t==="small"?2:14,f=t!=null?t:[u,i],[m,y]=De(f,"step",{steps:r,strokeWidth:i}),x=m/r,O=new Array(r);for(let $=0;$<r;$++){const I=Array.isArray(a)?a[$]:a;O[$]=l.createElement("div",{key:$,className:T()(`${o}-steps-item`,{[`${o}-steps-item-active`]:$<=d-1}),style:{backgroundColor:$<=d-1?I:s,width:x,height:y}})}return l.createElement("div",{className:`${o}-steps-outer`},O,c)},Ue=p(11804),de=p(22880),it=p(63398),at=p(51312);const st=e=>{const t=e?"100%":"-100%";return new Ue.E4(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Dr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,de.Wf)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.progressRemainingColor,borderRadius:e.progressLineRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorInfo}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",backgroundColor:e.colorInfo,borderRadius:e.progressLineRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.progressLineRadius,opacity:0,animationName:st(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:st(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Lr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.progressRemainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:`${e.fontSize/e.fontSizeSM}em`}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Rr=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.progressRemainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.colorInfo}}}}}},jr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}};var Fr=(0,it.Z)("Progress",e=>{const t=e.marginXXS/2,r=(0,at.TS)(e,{progressLineRadius:100,progressInfoTextColor:e.colorText,progressDefaultColor:e.colorInfo,progressRemainingColor:e.colorFillSecondary,progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Dr(r),Lr(r),Rr(r),jr(r)]}),Nr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const hn=null,Tr=["normal","exception","active","success"];var Zr=l.forwardRef((e,t)=>{const{prefixCls:r,className:n,rootClassName:i,steps:a,strokeColor:s,percent:o=0,size:c="default",showInfo:d=!0,type:u="line",status:f,format:m,style:y}=e,x=Nr(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),O=l.useMemo(()=>{var H,A;const N=Pe(e);return parseInt(N!==void 0?(H=N!=null?N:0)===null||H===void 0?void 0:H.toString():(A=o!=null?o:0)===null||A===void 0?void 0:A.toString(),10)},[o,e.success,e.successPercent]),$=l.useMemo(()=>!Tr.includes(f)&&O>=100?"success":f||"normal",[f,O]),{getPrefixCls:I,direction:D,progress:C}=l.useContext(Se.E_),h=I("progress",r),[v,j]=Fr(h),w=l.useMemo(()=>{if(!d)return null;const H=Pe(e);let A;const N=m||(Q=>`${Q}%`),L=u==="line";return m||$!=="exception"&&$!=="success"?A=N(ae(o),ae(H)):$==="exception"?A=L?l.createElement(ar.Z,null):l.createElement(sr.Z,null):$==="success"&&(A=L?l.createElement(or.Z,null):l.createElement(ir.Z,null)),l.createElement("span",{className:`${h}-text`,title:typeof A=="string"?A:void 0},A)},[d,o,O,$,u,h,m]),k=Array.isArray(s)?s[0]:s,U=typeof s=="string"||Array.isArray(s)?s:void 0;let Z;u==="line"?Z=a?l.createElement(Pr,Object.assign({},e,{strokeColor:U,prefixCls:h,steps:a}),w):l.createElement(Ir,Object.assign({},e,{strokeColor:k,prefixCls:h,direction:D}),w):(u==="circle"||u==="dashboard")&&(Z=l.createElement(Sr,Object.assign({},e,{strokeColor:k,prefixCls:h,progressStatus:$}),w));const q=T()(h,{[`${h}-inline-circle`]:u==="circle"&&De(c,"circle")[0]<=20,[`${h}-${u==="dashboard"&&"circle"||a&&"steps"||u}`]:!0,[`${h}-status-${$}`]:!0,[`${h}-show-info`]:d,[`${h}-${c}`]:typeof c=="string",[`${h}-rtl`]:D==="rtl"},C==null?void 0:C.className,n,i,j);return v(l.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},C==null?void 0:C.style),y),className:q,role:"progressbar","aria-valuenow":O},(0,lr.Z)(x,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Z))}),Ar=Zr,Mr=l.forwardRef((e,t)=>{let{prefixCls:r,className:n,style:i,locale:a,listType:s,file:o,items:c,progress:d,iconRender:u,actionIconRender:f,itemRender:m,isImgUrl:y,showPreviewIcon:x,showRemoveIcon:O,showDownloadIcon:$,previewIcon:I,removeIcon:D,downloadIcon:C,onPreview:h,onDownload:v,onClose:j}=e;var w,k;const{status:U}=o,[Z,q]=l.useState(U);l.useEffect(()=>{U!=="removed"&&q(U)},[U]);const[H,A]=l.useState(!1);l.useEffect(()=>{const S=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(S)}},[]);const N=u(o);let L=l.createElement("div",{className:`${r}-icon`},N);if(s==="picture"||s==="picture-card"||s==="picture-circle")if(Z==="uploading"||!o.thumbUrl&&!o.url){const S=T()({[`${r}-list-item-thumbnail`]:!0,[`${r}-list-item-file`]:Z!=="uploading"});L=l.createElement("div",{className:S},N)}else{const S=y!=null&&y(o)?l.createElement("img",{src:o.thumbUrl||o.url,alt:o.name,className:`${r}-list-item-image`,crossOrigin:o.crossOrigin}):N,ne=T()({[`${r}-list-item-thumbnail`]:!0,[`${r}-list-item-file`]:y&&!y(o)});L=l.createElement("a",{className:ne,onClick:se=>h(o,se),href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer"},S)}const Q=T()(`${r}-list-item`,`${r}-list-item-${Z}`),ie=typeof o.linkProps=="string"?JSON.parse(o.linkProps):o.linkProps,B=O?f((typeof D=="function"?D(o):D)||l.createElement(qt,null),()=>j(o),r,a.removeFile):null,z=$&&Z==="done"?f((typeof C=="function"?C(o):C)||l.createElement(rr,null),()=>v(o),r,a.downloadFile):null,G=s!=="picture-card"&&s!=="picture-circle"&&l.createElement("span",{key:"download-delete",className:T()(`${r}-list-item-actions`,{picture:s==="picture"})},z,B),X=T()(`${r}-list-item-name`),_=o.url?[l.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:X,title:o.name},ie,{href:o.url,onClick:S=>h(o,S)}),o.name),G]:[l.createElement("span",{key:"view",className:X,onClick:S=>h(o,S),title:o.name},o.name),G],g={pointerEvents:"none",opacity:.5},R=x?l.createElement("a",{href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:o.url||o.thumbUrl?void 0:g,onClick:S=>h(o,S),title:a.previewFile},typeof I=="function"?I(o):I||l.createElement(nr.Z,null)):null,V=(s==="picture-card"||s==="picture-circle")&&Z!=="uploading"&&l.createElement("span",{className:`${r}-list-item-actions`},R,Z==="done"&&z,B),{getPrefixCls:W}=l.useContext(Se.E_),ee=W(),te=l.createElement("div",{className:Q},L,_,V,H&&l.createElement(Ze.ZP,{motionName:`${ee}-fade`,visible:Z==="uploading",motionDeadline:2e3},S=>{let{className:ne}=S;const se="percent"in o?l.createElement(Ar,Object.assign({},d,{type:"line",percent:o.percent,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"]})):null;return l.createElement("div",{className:T()(`${r}-list-item-progress`,ne)},se)})),Le=o.response&&typeof o.response=="string"?o.response:((w=o.error)===null||w===void 0?void 0:w.statusText)||((k=o.error)===null||k===void 0?void 0:k.message)||a.uploadError,re=Z==="error"?l.createElement(ot.Z,{title:Le,getPopupContainer:S=>S.parentNode},te):te;return l.createElement("div",{className:T()(`${r}-list-item-container`,n),style:i,ref:t},m?m(re,o,c,{download:v.bind(null,o),preview:h.bind(null,o),remove:j.bind(null,o)}):re)});const Ur=(e,t)=>{const{listType:r="text",previewFile:n=Kt,onPreview:i,onDownload:a,onRemove:s,locale:o,iconRender:c,isImageUrl:d=Gt,prefixCls:u,items:f=[],showPreviewIcon:m=!0,showRemoveIcon:y=!0,showDownloadIcon:x=!1,removeIcon:O,previewIcon:$,downloadIcon:I,progress:D={size:[-1,2],showInfo:!1},appendAction:C,appendActionVisible:h=!0,itemRender:v,disabled:j}=e,w=(0,Ht.Z)(),[k,U]=l.useState(!1);l.useEffect(()=>{r!=="picture"&&r!=="picture-card"&&r!=="picture-circle"||(f||[]).forEach(g=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(g.originFileObj instanceof File||g.originFileObj instanceof Blob)||g.thumbUrl!==void 0||(g.thumbUrl="",n&&n(g.originFileObj).then(R=>{g.thumbUrl=R||"",w()}))})},[r,f,n]),l.useEffect(()=>{U(!0)},[]);const Z=(g,R)=>{if(i)return R==null||R.preventDefault(),i(g)},q=g=>{typeof a=="function"?a(g):g.url&&window.open(g.url)},H=g=>{s==null||s(g)},A=g=>{if(c)return c(g,r);const R=g.status==="uploading",V=d&&d(g)?l.createElement(zt,null):l.createElement(Nt,null);let W=R?l.createElement(Je.Z,null):l.createElement(Mt,null);return r==="picture"?W=R?l.createElement(Je.Z,null):V:(r==="picture-card"||r==="picture-circle")&&(W=R?o.uploading:V),W},N=(g,R,V,W)=>{const ee={type:"text",size:"small",title:W,onClick:te=>{R(),(0,Ee.l$)(g)&&g.props.onClick&&g.props.onClick(te)},className:`${V}-list-item-action`,disabled:j};if((0,Ee.l$)(g)){const te=(0,Ee.Tm)(g,Object.assign(Object.assign({},g.props),{onClick:()=>{}}));return l.createElement(Ye.ZP,Object.assign({},ee,{icon:te}))}return l.createElement(Ye.ZP,Object.assign({},ee),l.createElement("span",null,g))};l.useImperativeHandle(t,()=>({handlePreview:Z,handleDownload:q}));const{getPrefixCls:L}=l.useContext(Se.E_),Q=L("upload",u),ie=L(),B=T()({[`${Q}-list`]:!0,[`${Q}-list-${r}`]:!0}),z=(0,J.Z)(f.map(g=>({key:g.uid,file:g})));let X={motionDeadline:2e3,motionName:`${Q}-${r==="picture-card"||r==="picture-circle"?"animate-inline":"animate"}`,keys:z,motionAppear:k};const _=l.useMemo(()=>{const g=Object.assign({},(0,Bt.ZP)(ie));return delete g.onAppearEnd,delete g.onEnterEnd,delete g.onLeaveEnd,g},[ie]);return r!=="picture-card"&&r!=="picture-circle"&&(X=Object.assign(Object.assign({},_),X)),l.createElement("div",{className:B},l.createElement(Ze.V4,Object.assign({},X,{component:!1}),g=>{let{key:R,file:V,className:W,style:ee}=g;return l.createElement(Mr,{key:R,locale:o,prefixCls:Q,className:W,style:ee,file:V,items:f,progress:D,listType:r,isImgUrl:d,showPreviewIcon:m,showRemoveIcon:y,showDownloadIcon:x,removeIcon:O,previewIcon:$,downloadIcon:I,iconRender:A,actionIconRender:N,itemRender:v,onPreview:Z,onDownload:q,onClose:H})}),C&&l.createElement(Ze.ZP,Object.assign({},X,{visible:h,forceRender:!0}),g=>{let{className:R,style:V}=g;return(0,Ee.Tm)(C,W=>({className:T()(W.className,R),style:Object.assign(Object.assign(Object.assign({},V),{pointerEvents:R?"none":void 0}),W.style)}))}))};var kr=l.forwardRef(Ur),Wr=p(52316),zr=e=>{const{componentCls:t,iconCls:r}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[r]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{cursor:"not-allowed",[`p${t}-drag-icon ${r},
p${t}-text,
p${t}-hint
`]:{color:e.colorTextDisabled}}}}}},Hr=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSize:i,lineHeight:a}=e,s=`${t}-list-item`,o=`${s}-actions`,c=`${s}-action`,d=Math.round(i*a);return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},(0,de.dF)()),{lineHeight:e.lineHeight,[s]:{position:"relative",height:e.lineHeight*i,marginTop:e.marginXS,fontSize:i,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:Object.assign(Object.assign({},de.vS),{padding:`0 ${e.paddingXS}px`,lineHeight:a,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[o]:{[c]:{opacity:0},[`${c}${r}-btn-sm`]:{height:d,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
${c}:focus,
&.picture ${c}
`]:{opacity:1},[n]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`&:hover ${n}`]:{color:e.colorText}},[`${t}-icon ${n}`]:{color:e.colorTextDescription,fontSize:i},[`${s}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:i+e.paddingXS,fontSize:i,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${s}:hover ${c}`]:{opacity:1,color:e.colorText},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[o]:{[`${n}, ${n}:hover`]:{color:e.colorError},[c]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Br=p(66780);const lt=new Ue.E4("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),ct=new Ue.E4("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var Xr=e=>{const{componentCls:t}=e,r=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${r}-appear, ${r}-enter, ${r}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${r}-appear, ${r}-enter`]:{animationName:lt},[`${r}-leave`]:{animationName:ct}}},{[`${t}-wrapper`]:(0,Br.J$)(e)},lt,ct]},Vr=p(99590);const Gr=e=>{const{componentCls:t,iconCls:r,uploadThumbnailSize:n,uploadProgressOffset:i}=e,a=`${t}-list`,s=`${a}-item`;return{[`${t}-wrapper`]:{[`
${a}${a}-picture,
${a}${a}-picture-card,
${a}${a}-picture-circle
`]:{[s]:{position:"relative",height:n+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${s}-thumbnail`]:Object.assign(Object.assign({},de.vS),{width:n,height:n,lineHeight:`${n+e.paddingSM}px`,textAlign:"center",flex:"none",[r]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${s}-progress`]:{bottom:i,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:n+e.paddingXS}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${r}`]:{[`svg path[fill='${ye.iN[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${ye.iN.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:"dashed",[`${s}-name`]:{marginBottom:i}}},[`${a}${a}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:"50%"}}}}},Kr=e=>{const{componentCls:t,iconCls:r,fontSizeLG:n,colorTextLightSolid:i}=e,a=`${t}-list`,s=`${a}-item`,o=e.uploadPicCardSize;return{[`
${t}-wrapper${t}-picture-card-wrapper,
${t}-wrapper${t}-picture-circle-wrapper
`]:Object.assign(Object.assign({},(0,de.dF)()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:o,height:o,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card, ${a}${a}-picture-circle`]:{[`${a}-item-container`]:{display:"inline-block",width:o,height:o,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[s]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${r}-eye, ${r}-download, ${r}-delete`]:{zIndex:10,width:n,margin:`0 ${e.marginXXS}px`,fontSize:n,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${s}-actions, ${s}-actions:hover`]:{[`${r}-eye, ${r}-download, ${r}-delete`]:{color:new Vr.C(i).setAlpha(.65).toRgbString(),"&:hover":{color:i}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${s}-name`]:{display:"none",textAlign:"center"},[`${s}-file + ${s}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${r}-eye, ${r}-download, ${r}-delete`]:{display:"none"}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}};var Jr=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}};const Yr=e=>{const{componentCls:t,colorTextDisabled:r}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},(0,de.Wf)(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:r,cursor:"not-allowed"}})}};var Qr=(0,it.Z)("Upload",e=>{const{fontSizeHeading3:t,fontSize:r,lineHeight:n,lineWidth:i,controlHeightLG:a}=e,s=Math.round(r*n),o=(0,at.TS)(e,{uploadThumbnailSize:t*2,uploadProgressOffset:s/2+i,uploadPicCardSize:a*2.55});return[Yr(o),zr(o),Gr(o),Kr(o),Hr(o),Xr(o),Jr(o),(0,Wr.Z)(o)]},e=>({actionsColor:e.colorTextDescription})),qr=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(u){try{d(n.next(u))}catch(f){s(f)}}function c(u){try{d(n.throw(u))}catch(f){s(f)}}function d(u){u.done?a(u.value):i(u.value).then(o,c)}d((n=n.apply(e,t||[])).next())})};const be=`__LIST_IGNORE_${Date.now()}__`,_r=(e,t)=>{const{fileList:r,defaultFileList:n,onRemove:i,showUploadList:a=!0,listType:s="text",onPreview:o,onDownload:c,onChange:d,onDrop:u,previewFile:f,disabled:m,locale:y,iconRender:x,isImageUrl:O,progress:$,prefixCls:I,className:D,type:C="select",children:h,style:v,itemRender:j,maxCount:w,data:k={},multiple:U=!1,action:Z="",accept:q="",supportServerRender:H=!0}=e,A=l.useContext(Pt.Z),N=m!=null?m:A,[L,Q]=(0,It.Z)(n||[],{value:r,postState:b=>b!=null?b:[]}),[ie,B]=l.useState("drop"),z=l.useRef(null);l.useMemo(()=>{const b=Date.now();(r||[]).forEach((P,M)=>{!P.uid&&!Object.isFrozen(P)&&(P.uid=`__AUTO__${b}_${M}__`)})},[r]);const G=(b,P,M)=>{let E=(0,J.Z)(P),F=!1;w===1?E=E.slice(-1):w&&(F=E.length>w,E=E.slice(0,w)),(0,Ke.flushSync)(()=>{Q(E)});const K={file:b,fileList:E};M&&(K.event=M),(!F||E.some(le=>le.uid===b.uid))&&(0,Ke.flushSync)(()=>{d==null||d(K)})},X=(b,P)=>qr(void 0,void 0,void 0,function*(){const{beforeUpload:M,transformFile:E}=e;let F=b;if(M){const K=yield M(b,P);if(K===!1)return!1;if(delete b[be],K===be)return Object.defineProperty(b,be,{value:!0,configurable:!0}),!1;typeof K=="object"&&K&&(F=K)}return E&&(F=yield E(F)),F}),_=b=>{const P=b.filter(F=>!F.file[be]);if(!P.length)return;const M=P.map(F=>xe(F.file));let E=(0,J.Z)(L);M.forEach(F=>{E=Oe(F,E)}),M.forEach((F,K)=>{let le=F;if(P[K].parsedFile)F.status="uploading";else{const{originFileObj:ue}=F;let ce;try{ce=new File([ue],ue.name,{type:ue.type})}catch(Pn){ce=new Blob([ue],{type:ue.type}),ce.name=ue.name,ce.lastModifiedDate=new Date,ce.lastModified=new Date().getTime()}ce.uid=F.uid,le=ce}G(le,E)})},g=(b,P,M)=>{try{typeof b=="string"&&(b=JSON.parse(b))}catch(K){}if(!Ae(P,L))return;const E=xe(P);E.status="done",E.percent=100,E.response=b,E.xhr=M;const F=Oe(E,L);G(E,F)},R=(b,P)=>{if(!Ae(P,L))return;const M=xe(P);M.status="uploading",M.percent=b.percent;const E=Oe(M,L);G(M,E,b)},V=(b,P,M)=>{if(!Ae(M,L))return;const E=xe(M);E.error=b,E.response=P,E.status="error";const F=Oe(E,L);G(E,F)},W=b=>{let P;Promise.resolve(typeof i=="function"?i(b):i).then(M=>{var E;if(M===!1)return;const F=Xt(b,L);F&&(P=Object.assign(Object.assign({},b),{status:"removed"}),L==null||L.forEach(K=>{const le=P.uid!==void 0?"uid":"name";K[le]===P[le]&&!Object.isFrozen(K)&&(K.status="removed")}),(E=z.current)===null||E===void 0||E.abort(P),G(P,F))})},ee=b=>{B(b.type),b.type==="drop"&&(u==null||u(b))};l.useImperativeHandle(t,()=>({onBatchStart:_,onSuccess:g,onProgress:R,onError:V,fileList:L,upload:z.current}));const{getPrefixCls:te,direction:Le,upload:re}=l.useContext(Se.E_),S=te("upload",I),ne=Object.assign(Object.assign({onBatchStart:_,onError:V,onProgress:R,onSuccess:g},e),{data:k,multiple:U,action:Z,accept:q,supportServerRender:H,prefixCls:S,disabled:N,beforeUpload:X,onChange:void 0});delete ne.className,delete ne.style,(!h||N)&&delete ne.id;const[se,ut]=Qr(S),[nn]=(0,Dt.Z)("Upload",Lt.Z.Upload),{showRemoveIcon:on,showPreviewIcon:an,showDownloadIcon:sn,removeIcon:ln,previewIcon:cn,downloadIcon:dn}=typeof a=="boolean"?{}:a,We=(b,P)=>a?l.createElement(kr,{prefixCls:S,listType:s,items:L,previewFile:f,onPreview:o,onDownload:c,onRemove:W,showRemoveIcon:!N&&on,showPreviewIcon:an,showDownloadIcon:sn,removeIcon:ln,previewIcon:cn,downloadIcon:dn,iconRender:x,locale:Object.assign(Object.assign({},nn),y),isImageUrl:O,progress:$,appendAction:b,appendActionVisible:P,itemRender:j,disabled:N}):b,ze=T()(`${S}-wrapper`,D,ut,re==null?void 0:re.className,{[`${S}-rtl`]:Le==="rtl",[`${S}-picture-card-wrapper`]:s==="picture-card",[`${S}-picture-circle-wrapper`]:s==="picture-circle"}),un=Object.assign(Object.assign({},re==null?void 0:re.style),v);if(C==="drag"){const b=T()(ut,S,`${S}-drag`,{[`${S}-drag-uploading`]:L.some(P=>P.status==="uploading"),[`${S}-drag-hover`]:ie==="dragover",[`${S}-disabled`]:N,[`${S}-rtl`]:Le==="rtl"});return se(l.createElement("span",{className:ze},l.createElement("div",{className:b,style:un,onDrop:ee,onDragOver:ee,onDragLeave:ee},l.createElement(Ge,Object.assign({},ne,{ref:z,className:`${S}-btn`}),l.createElement("div",{className:`${S}-drag-container`},h))),We()))}const pn=T()(S,`${S}-select`,{[`${S}-disabled`]:N}),pt=(b=>l.createElement("div",{className:pn,style:b},l.createElement(Ge,Object.assign({},ne,{ref:z}))))(h?void 0:{display:"none"});return se(s==="picture-card"||s==="picture-circle"?l.createElement("span",{className:ze},We(pt,!!h)):l.createElement("span",{className:ze},pt,We()))};var dt=l.forwardRef(_r),en=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},tn=l.forwardRef((e,t)=>{var{style:r,height:n}=e,i=en(e,["style","height"]);return l.createElement(dt,Object.assign({ref:t},i,{type:"drag",style:Object.assign(Object.assign({},r),{height:n})}))});const ke=dt;ke.Dragger=tn,ke.LIST_IGNORE=be;var rn=ke}}]);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/ajax_lv/approval-data-admin.git
git@gitee.com:ajax_lv/approval-data-admin.git
ajax_lv
approval-data-admin
approval-data-admin
gh-pages

搜索帮助