filesbox/web/dist/58433.383ec260.async.js
2024-07-26 14:10:54 +08:00

2 lines
28 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[58433],{42762:function(ge,U,m){"use strict";m.d(U,{Z:function(){return O}});var A=m(28991),F=m(67294),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},Q=ie,k=m(27029),q=function(ee,X){return F.createElement(k.Z,(0,A.Z)((0,A.Z)({},ee),{},{ref:X,icon:Q}))};q.displayName="MenuOutlined";var O=F.forwardRef(q)},85473:function(ge,U,m){"use strict";m.d(U,{Z:function(){return rt}});var A=m(28991),F=m(84305),ie=m(39559),Q=m(81253),k=m(85893),q=m(42762),O=m(67294),_=m(22122),ee=m(28481),X=m(54153),Y=m(6610),$=m(5991),ae=m(46070),se=m(77608),le=m(10379),v=m(63349),T=m(96156),de=m(73935),Oe=m(41143),H=m.n(Oe),Re=m(85061),Me=m(45697),u=m.n(Me),Ae=function(){function t(){(0,Y.Z)(this,t),(0,T.Z)(this,"refs",{})}return(0,$.Z)(t,[{key:"add",value:function(o,c){this.refs[o]||(this.refs[o]=[]),this.refs[o].push(c)}},{key:"remove",value:function(o,c){var y=this.getIndex(o,c);y!==-1&&this.refs[o].splice(y,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var o=this;return this.refs[this.active.collection].find(function(c){var y=c.node;return y.sortableInfo.index==o.active.index})}},{key:"getIndex",value:function(o,c){return this.refs[o].indexOf(c)}},{key:"getOrderedRefs",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.active.collection;return this.refs[o].sort(ke)}}]),t}();function ke(t,n){var o=t.node.sortableInfo.index,c=n.node.sortableInfo.index;return o-c}function lt(t,n,o){return t=t.slice(),t.splice(o<0?t.length+o:o,0,t.splice(n,1)[0]),t}function ve(t,n){return Object.keys(t).reduce(function(o,c){return n.indexOf(c)===-1&&(o[c]=t[c]),o},{})}var B={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},pe=function(){if(typeof window=="undefined"||typeof document=="undefined")return"";var t=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],n=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||t.OLink===""&&["","o"])[1];switch(n){case"ms":return"ms";default:return n&&n.length?n[0].toUpperCase()+n.substr(1):""}}();function te(t,n){Object.keys(n).forEach(function(o){t.style[o]=n[o]})}function ne(t,n){t.style["".concat(pe,"Transform")]=n==null?"":"translate3d(".concat(n.x,"px,").concat(n.y,"px,0)")}function ce(t,n){t.style["".concat(pe,"TransitionDuration")]=n==null?"":"".concat(n,"ms")}function z(t,n){for(;t;){if(n(t))return t;t=t.parentNode}return null}function me(t,n,o){return Math.max(t,Math.min(o,n))}function G(t){return t.substr(-2)==="px"?parseFloat(t):0}function Ne(t){var n=window.getComputedStyle(t);return{bottom:G(n.marginBottom),left:G(n.marginLeft),right:G(n.marginRight),top:G(n.marginTop)}}function ue(t,n){var o=n.displayName||n.name;return o?"".concat(t,"(").concat(o,")"):t}function fe(t,n){var o=t.getBoundingClientRect();return{top:o.top+n.top,left:o.left+n.left}}function V(t){return t.touches&&t.touches.length?{x:t.touches[0].pageX,y:t.touches[0].pageY}:t.changedTouches&&t.changedTouches.length?{x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY}:{x:t.pageX,y:t.pageY}}function Pe(t){return t.touches&&t.touches.length||t.changedTouches&&t.changedTouches.length}function re(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{left:0,top:0};if(!!t){var c={left:o.left+t.offsetLeft,top:o.top+t.offsetTop};return t.parentNode===n?c:re(t.parentNode,n,c)}}function We(t,n,o){return t<o&&t>n?t-1:t>o&&t<n?t+1:t}function ye(t){var n=t.lockOffset,o=t.width,c=t.height,y=n,f=n,l="px";if(typeof n=="string"){var e=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(n);H()(e!==null,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',n),y=parseFloat(n),f=parseFloat(n),l=e[1]}return H()(isFinite(y)&&isFinite(f),"lockOffset value should be a finite. Given %s",n),l==="%"&&(y=y*o/100,f=f*c/100),{x:y,y:f}}function He(t){var n=t.height,o=t.width,c=t.lockOffset,y=Array.isArray(c)?c:[c,c];H()(y.length===2,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",c);var f=(0,ee.Z)(y,2),l=f[0],e=f[1];return[ye({height:n,lockOffset:l,width:o}),ye({height:n,lockOffset:e,width:o})]}function Ke(t){var n=window.getComputedStyle(t),o=/(auto|scroll)/,c=["overflow","overflowX","overflowY"];return c.find(function(y){return o.test(n[y])})}function xe(t){return t instanceof HTMLElement?Ke(t)?t:xe(t.parentNode):null}function Le(t){var n=window.getComputedStyle(t);return n.display==="grid"?{x:G(n.gridColumnGap),y:G(n.gridRowGap)}:{x:0,y:0}}var K={TAB:9,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40},L={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function je(t){var n="input, textarea, select, canvas, [contenteditable]",o=t.querySelectorAll(n),c=t.cloneNode(!0),y=(0,Re.Z)(c.querySelectorAll(n));return y.forEach(function(f,l){if(f.type!=="file"&&(f.value=o[l].value),f.type==="radio"&&f.name&&(f.name="__sortableClone__".concat(f.name)),f.tagName===L.Canvas&&o[l].width>0&&o[l].height>0){var e=f.getContext("2d");e.drawImage(o[l],0,0)}}),c}function Be(t){var n,o,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return o=n=function(y){(0,le.Z)(f,y);function f(){var l,e;(0,Y.Z)(this,f);for(var p=arguments.length,r=new Array(p),i=0;i<p;i++)r[i]=arguments[i];return e=(0,ae.Z)(this,(l=(0,se.Z)(f)).call.apply(l,[this].concat(r))),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"wrappedInstance",(0,O.createRef)()),e}return(0,$.Z)(f,[{key:"componentDidMount",value:function(){var e=(0,de.findDOMNode)(this);e.sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return H()(c.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.wrappedInstance.current}},{key:"render",value:function(){var e=c.withRef?this.wrappedInstance:null;return(0,O.createElement)(t,(0,_.Z)({ref:e},this.props))}}]),f}(O.Component),(0,T.Z)(n,"displayName",ue("sortableHandle",t)),o}function Se(t){return t.sortableHandle!=null}var Ge=function(){function t(n,o){(0,Y.Z)(this,t),this.container=n,this.onScrollCallback=o}return(0,$.Z)(t,[{key:"clear",value:function(){this.interval!=null&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(o){var c=this,y=o.translate,f=o.minTranslate,l=o.maxTranslate,e=o.width,p=o.height,r={x:0,y:0},i={x:1,y:1},d={x:10,y:10},a=this.container,s=a.scrollTop,x=a.scrollLeft,h=a.scrollHeight,I=a.scrollWidth,b=a.clientHeight,S=a.clientWidth,E=s===0,g=h-s-b==0,C=x===0,R=I-x-S==0;y.y>=l.y-p/2&&!g?(r.y=1,i.y=d.y*Math.abs((l.y-p/2-y.y)/p)):y.x>=l.x-e/2&&!R?(r.x=1,i.x=d.x*Math.abs((l.x-e/2-y.x)/e)):y.y<=f.y+p/2&&!E?(r.y=-1,i.y=d.y*Math.abs((y.y-p/2-f.y)/p)):y.x<=f.x+e/2&&!C&&(r.x=-1,i.x=d.x*Math.abs((y.x-e/2-f.x)/e)),this.interval&&(this.clear(),this.isAutoScrolling=!1),(r.x!==0||r.y!==0)&&(this.interval=setInterval(function(){c.isAutoScrolling=!0;var w={left:i.x*r.x,top:i.y*r.y};c.container.scrollTop+=w.top,c.container.scrollLeft+=w.left,c.onScrollCallback(w)},5))}}]),t}();function Ue(t){var n=t.node;return{height:n.offsetHeight,width:n.offsetWidth}}function Fe(t){var n=[L.Input,L.Textarea,L.Select,L.Option,L.Button];return!!(n.indexOf(t.target.tagName)!==-1||z(t.target,function(o){return o.contentEditable==="true"}))}var we={axis:u().oneOf(["x","y","xy"]),contentWindow:u().any,disableAutoscroll:u().bool,distance:u().number,getContainer:u().func,getHelperDimensions:u().func,helperClass:u().string,helperContainer:u().oneOfType([u().func,typeof HTMLElement=="undefined"?u().any:u().instanceOf(HTMLElement)]),hideSortableGhost:u().bool,keyboardSortingTransitionDuration:u().number,lockAxis:u().string,lockOffset:u().oneOfType([u().number,u().string,u().arrayOf(u().oneOfType([u().number,u().string]))]),lockToContainerEdges:u().bool,onSortEnd:u().func,onSortMove:u().func,onSortOver:u().func,onSortStart:u().func,pressDelay:u().number,pressThreshold:u().number,keyCodes:u().shape({lift:u().arrayOf(u().number),drop:u().arrayOf(u().number),cancel:u().arrayOf(u().number),up:u().arrayOf(u().number),down:u().arrayOf(u().number)}),shouldCancelStart:u().func,transitionDuration:u().number,updateBeforeSortStart:u().func,useDragHandle:u().bool,useWindowAsScrollContainer:u().bool},be={lift:[K.SPACE],drop:[K.SPACE],cancel:[K.ESC],up:[K.UP,K.LEFT],down:[K.DOWN,K.RIGHT]},Xe={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:Ue,hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:be,shouldCancelStart:Fe,transitionDuration:300,useWindowAsScrollContainer:!1},Ye=Object.keys(we);function $e(t){H()(!(t.distance&&t.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function ze(t,n){try{var o=t()}catch(c){return n(!0,c)}return o&&o.then?o.then(n.bind(null,!1),n.bind(null,!0)):n(!1,value)}var Ce=(0,O.createContext)({manager:{}});function Ve(t){var n,o,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return o=n=function(y){(0,le.Z)(f,y);function f(l){var e;(0,Y.Z)(this,f),e=(0,ae.Z)(this,(0,se.Z)(f).call(this,l)),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"state",{}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"handleStart",function(r){var i=e.props,d=i.distance,a=i.shouldCancelStart;if(!(r.button===2||a(r))){e.touched=!0,e.position=V(r);var s=z(r.target,function(E){return E.sortableInfo!=null});if(s&&s.sortableInfo&&e.nodeIsChild(s)&&!e.state.sorting){var x=e.props.useDragHandle,h=s.sortableInfo,I=h.index,b=h.collection,S=h.disabled;if(S||x&&!z(r.target,Se))return;e.manager.active={collection:b,index:I},!Pe(r)&&r.target.tagName===L.Anchor&&r.preventDefault(),d||(e.props.pressDelay===0?e.handlePress(r):e.pressTimer=setTimeout(function(){return e.handlePress(r)},e.props.pressDelay))}}}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"nodeIsChild",function(r){return r.sortableInfo.manager===e.manager}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"handleMove",function(r){var i=e.props,d=i.distance,a=i.pressThreshold;if(!e.state.sorting&&e.touched&&!e._awaitingUpdateBeforeSortStart){var s=V(r),x={x:e.position.x-s.x,y:e.position.y-s.y},h=Math.abs(x.x)+Math.abs(x.y);e.delta=x,!d&&(!a||h>=a)?(clearTimeout(e.cancelTimer),e.cancelTimer=setTimeout(e.cancel,0)):d&&h>=d&&e.manager.isActive()&&e.handlePress(r)}}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"handleEnd",function(){e.touched=!1,e.cancel()}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"cancel",function(){var r=e.props.distance,i=e.state.sorting;i||(r||clearTimeout(e.pressTimer),e.manager.active=null)}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"handlePress",function(r){try{var i=e.manager.getActive(),d=function(){if(i){var a=function(){var D=C.sortableInfo.index,Z=Ne(C),N=Le(e.container),P=e.scrollContainer.getBoundingClientRect(),j=h({index:D,node:C,collection:R});if(e.node=C,e.margin=Z,e.gridGap=N,e.width=j.width,e.height=j.height,e.marginOffset={x:e.margin.left+e.margin.right+e.gridGap.x,y:Math.max(e.margin.top,e.margin.bottom,e.gridGap.y)},e.boundingClientRect=C.getBoundingClientRect(),e.containerBoundingRect=P,e.index=D,e.newIndex=D,e.axis={x:x.indexOf("x")>=0,y:x.indexOf("y")>=0},e.offsetEdge=re(C,e.container),w?e.initialOffset=V((0,X.Z)({},r,{pageX:e.boundingClientRect.left,pageY:e.boundingClientRect.top})):e.initialOffset=V(r),e.initialScroll={left:e.scrollContainer.scrollLeft,top:e.scrollContainer.scrollTop},e.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},e.helper=e.helperContainer.appendChild(je(C)),te(e.helper,{boxSizing:"border-box",height:"".concat(e.height,"px"),left:"".concat(e.boundingClientRect.left-Z.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(e.boundingClientRect.top-Z.top,"px"),width:"".concat(e.width,"px")}),w&&e.helper.focus(),b&&(e.sortableGhost=C,te(C,{opacity:0,visibility:"hidden"})),e.minTranslate={},e.maxTranslate={},w){var oe=g?{top:0,left:0,width:e.contentWindow.innerWidth,height:e.contentWindow.innerHeight}:e.containerBoundingRect,De=oe.top,Ie=oe.left,ot=oe.width,it=oe.height,at=De+it,st=Ie+ot;e.axis.x&&(e.minTranslate.x=Ie-e.boundingClientRect.left,e.maxTranslate.x=st-(e.boundingClientRect.left+e.width)),e.axis.y&&(e.minTranslate.y=De-e.boundingClientRect.top,e.maxTranslate.y=at-(e.boundingClientRect.top+e.height))}else e.axis.x&&(e.minTranslate.x=(g?0:P.left)-e.boundingClientRect.left-e.width/2,e.maxTranslate.x=(g?e.contentWindow.innerWidth:P.left+P.width)-e.boundingClientRect.left-e.width/2),e.axis.y&&(e.minTranslate.y=(g?0:P.top)-e.boundingClientRect.top-e.height/2,e.maxTranslate.y=(g?e.contentWindow.innerHeight:P.top+P.height)-e.boundingClientRect.top-e.height/2);I&&I.split(" ").forEach(function(J){return e.helper.classList.add(J)}),e.listenerNode=r.touches?r.target:e.contentWindow,w?(e.listenerNode.addEventListener("wheel",e.handleKeyEnd,!0),e.listenerNode.addEventListener("mousedown",e.handleKeyEnd,!0),e.listenerNode.addEventListener("keydown",e.handleKeyDown)):(B.move.forEach(function(J){return e.listenerNode.addEventListener(J,e.handleSortMove,!1)}),B.end.forEach(function(J){return e.listenerNode.addEventListener(J,e.handleSortEnd,!1)})),e.setState({sorting:!0,sortingIndex:D}),E&&E({node:C,index:D,collection:R,isKeySorting:w,nodes:e.manager.getOrderedRefs(),helper:e.helper},r),w&&e.keyMove(0)},s=e.props,x=s.axis,h=s.getHelperDimensions,I=s.helperClass,b=s.hideSortableGhost,S=s.updateBeforeSortStart,E=s.onSortStart,g=s.useWindowAsScrollContainer,C=i.node,R=i.collection,w=e.manager.isKeySorting,M=function(){if(typeof S=="function"){e._awaitingUpdateBeforeSortStart=!0;var W=ze(function(){var D=C.sortableInfo.index;return Promise.resolve(S({collection:R,index:D,node:C,isKeySorting:w},r)).then(function(){})},function(D,Z){if(e._awaitingUpdateBeforeSortStart=!1,D)throw Z;return Z});if(W&&W.then)return W.then(function(){})}}();return M&&M.then?M.then(a):a(M)}}();return Promise.resolve(d&&d.then?d.then(function(){}):void 0)}catch(a){return Promise.reject(a)}}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"handleSortMove",function(r){var i=e.props.onSortMove;typeof r.preventDefault=="function"&&r.cancelable&&r.preventDefault(),e.updateHelperPosition(r),e.animateNodes(),e.autoscroll(),i&&i(r)}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"handleSortEnd",function(r){var i=e.props,d=i.hideSortableGhost,a=i.onSortEnd,s=e.manager,x=s.active.collection,h=s.isKeySorting,I=e.manager.getOrderedRefs();e.listenerNode&&(h?(e.listenerNode.removeEventListener("wheel",e.handleKeyEnd,!0),e.listenerNode.removeEventListener("mousedown",e.handleKeyEnd,!0),e.listenerNode.removeEventListener("keydown",e.handleKeyDown)):(B.move.forEach(function(C){return e.listenerNode.removeEventListener(C,e.handleSortMove)}),B.end.forEach(function(C){return e.listenerNode.removeEventListener(C,e.handleSortEnd)}))),e.helper.parentNode.removeChild(e.helper),d&&e.sortableGhost&&te(e.sortableGhost,{opacity:"",visibility:""});for(var b=0,S=I.length;b<S;b++){var E=I[b],g=E.node;E.edgeOffset=null,E.boundingClientRect=null,ne(g,null),ce(g,null),E.translate=null}e.autoScroller.clear(),e.manager.active=null,e.manager.isKeySorting=!1,e.setState({sorting:!1,sortingIndex:null}),typeof a=="function"&&a({collection:x,newIndex:e.newIndex,oldIndex:e.index,isKeySorting:h,nodes:I},r),e.touched=!1}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"autoscroll",function(){var r=e.props.disableAutoscroll,i=e.manager.isKeySorting;if(r){e.autoScroller.clear();return}if(i){var d=(0,X.Z)({},e.translate),a=0,s=0;e.axis.x&&(d.x=Math.min(e.maxTranslate.x,Math.max(e.minTranslate.x,e.translate.x)),a=e.translate.x-d.x),e.axis.y&&(d.y=Math.min(e.maxTranslate.y,Math.max(e.minTranslate.y,e.translate.y)),s=e.translate.y-d.y),e.translate=d,ne(e.helper,e.translate),e.scrollContainer.scrollLeft+=a,e.scrollContainer.scrollTop+=s;return}e.autoScroller.update({height:e.height,maxTranslate:e.maxTranslate,minTranslate:e.minTranslate,translate:e.translate,width:e.width})}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"onAutoScroll",function(r){e.translate.x+=r.left,e.translate.y+=r.top,e.animateNodes()}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"handleKeyDown",function(r){var i=r.keyCode,d=e.props,a=d.shouldCancelStart,s=d.keyCodes,x=s===void 0?{}:s,h=(0,X.Z)({},be,x);e.manager.active&&!e.manager.isKeySorting||!e.manager.active&&(!h.lift.includes(i)||a(r)||!e.isValidSortingTarget(r))||(r.stopPropagation(),r.preventDefault(),h.lift.includes(i)&&!e.manager.active?e.keyLift(r):h.drop.includes(i)&&e.manager.active?e.keyDrop(r):h.cancel.includes(i)?(e.newIndex=e.manager.active.index,e.keyDrop(r)):h.up.includes(i)?e.keyMove(-1):h.down.includes(i)&&e.keyMove(1))}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"keyLift",function(r){var i=r.target,d=z(i,function(h){return h.sortableInfo!=null}),a=d.sortableInfo,s=a.index,x=a.collection;e.initialFocusedNode=i,e.manager.isKeySorting=!0,e.manager.active={index:s,collection:x},e.handlePress(r)}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"keyMove",function(r){var i=e.manager.getOrderedRefs(),d=i[i.length-1].node.sortableInfo.index,a=e.newIndex+r,s=e.newIndex;if(!(a<0||a>d)){e.prevIndex=s,e.newIndex=a;var x=We(e.newIndex,e.prevIndex,e.index),h=i.find(function(w){var M=w.node;return M.sortableInfo.index===x}),I=h.node,b=e.containerScrollDelta,S=h.boundingClientRect||fe(I,b),E=h.translate||{x:0,y:0},g={top:S.top+E.y-b.top,left:S.left+E.x-b.left},C=s<a,R={x:C&&e.axis.x?I.offsetWidth-e.width:0,y:C&&e.axis.y?I.offsetHeight-e.height:0};e.handleSortMove({pageX:g.left+R.x,pageY:g.top+R.y,ignoreTransition:r===0})}}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"keyDrop",function(r){e.handleSortEnd(r),e.initialFocusedNode&&e.initialFocusedNode.focus()}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"handleKeyEnd",function(r){e.manager.active&&e.keyDrop(r)}),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"isValidSortingTarget",function(r){var i=e.props.useDragHandle,d=r.target,a=z(d,function(s){return s.sortableInfo!=null});return a&&a.sortableInfo&&!a.sortableInfo.disabled&&(i?Se(d):d.sortableInfo)});var p=new Ae;return $e(l),e.manager=p,e.wrappedInstance=(0,O.createRef)(),e.sortableContextValue={manager:p},e.events={end:e.handleEnd,move:e.handleMove,start:e.handleStart},e}return(0,$.Z)(f,[{key:"componentDidMount",value:function(){var e=this,p=this.props.useWindowAsScrollContainer,r=this.getContainer();Promise.resolve(r).then(function(i){e.container=i,e.document=e.container.ownerDocument||document;var d=e.props.contentWindow||e.document.defaultView||window;e.contentWindow=typeof d=="function"?d():d,e.scrollContainer=p?e.document.scrollingElement||e.document.documentElement:xe(e.container)||e.container,e.autoScroller=new Ge(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach(function(a){return B[a].forEach(function(s){return e.container.addEventListener(s,e.events[a],!1)})}),e.container.addEventListener("keydown",e.handleKeyDown)})}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),!!this.container&&(Object.keys(this.events).forEach(function(p){return B[p].forEach(function(r){return e.container.removeEventListener(r,e.events[p])})}),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var p=this.props,r=p.lockAxis,i=p.lockOffset,d=p.lockToContainerEdges,a=p.transitionDuration,s=p.keyboardSortingTransitionDuration,x=s===void 0?a:s,h=this.manager.isKeySorting,I=e.ignoreTransition,b=V(e),S={x:b.x-this.initialOffset.x,y:b.y-this.initialOffset.y};if(S.y-=window.pageYOffset-this.initialWindowScroll.top,S.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=S,d){var E=He({height:this.height,lockOffset:i,width:this.width}),g=(0,ee.Z)(E,2),C=g[0],R=g[1],w={x:this.width/2-C.x,y:this.height/2-C.y},M={x:this.width/2-R.x,y:this.height/2-R.y};S.x=me(this.minTranslate.x+w.x,this.maxTranslate.x-M.x,S.x),S.y=me(this.minTranslate.y+w.y,this.maxTranslate.y-M.y,S.y)}r==="x"?S.y=0:r==="y"&&(S.x=0),h&&x&&!I&&ce(this.helper,x),ne(this.helper,S)}},{key:"animateNodes",value:function(){var e=this.props,p=e.transitionDuration,r=e.hideSortableGhost,i=e.onSortOver,d=this.containerScrollDelta,a=this.windowScrollDelta,s=this.manager.getOrderedRefs(),x={left:this.offsetEdge.left+this.translate.x+d.left,top:this.offsetEdge.top+this.translate.y+d.top},h=this.manager.isKeySorting,I=this.newIndex;this.newIndex=null;for(var b=0,S=s.length;b<S;b++){var E=s[b].node,g=E.sortableInfo.index,C=E.offsetWidth,R=E.offsetHeight,w={height:this.height>R?R/2:this.height/2,width:this.width>C?C/2:this.width/2},M=h&&g>this.index&&g<=I,W=h&&g<this.index&&g>=I,D={x:0,y:0},Z=s[b].edgeOffset;Z||(Z=re(E,this.container),s[b].edgeOffset=Z,h&&(s[b].boundingClientRect=fe(E,d)));var N=b<s.length-1&&s[b+1],P=b>0&&s[b-1];if(N&&!N.edgeOffset&&(N.edgeOffset=re(N.node,this.container),h&&(N.boundingClientRect=fe(N.node,d))),g===this.index){r&&(this.sortableGhost=E,te(E,{opacity:0,visibility:"hidden"}));continue}p&&ce(E,p),this.axis.x?this.axis.y?W||g<this.index&&(x.left+a.left-w.width<=Z.left&&x.top+a.top<=Z.top+w.height||x.top+a.top+w.height<=Z.top)?(D.x=this.width+this.marginOffset.x,Z.left+D.x>this.containerBoundingRect.width-w.width&&N&&(D.x=N.edgeOffset.left-Z.left,D.y=N.edgeOffset.top-Z.top),this.newIndex===null&&(this.newIndex=g)):(M||g>this.index&&(x.left+a.left+w.width>=Z.left&&x.top+a.top+w.height>=Z.top||x.top+a.top+w.height>=Z.top+R))&&(D.x=-(this.width+this.marginOffset.x),Z.left+D.x<this.containerBoundingRect.left+w.width&&P&&(D.x=P.edgeOffset.left-Z.left,D.y=P.edgeOffset.top-Z.top),this.newIndex=g):M||g>this.index&&x.left+a.left+w.width>=Z.left?(D.x=-(this.width+this.marginOffset.x),this.newIndex=g):(W||g<this.index&&x.left+a.left<=Z.left+w.width)&&(D.x=this.width+this.marginOffset.x,this.newIndex==null&&(this.newIndex=g)):this.axis.y&&(M||g>this.index&&x.top+a.top+w.height>=Z.top?(D.y=-(this.height+this.marginOffset.y),this.newIndex=g):(W||g<this.index&&x.top+a.top<=Z.top+w.height)&&(D.y=this.height+this.marginOffset.y,this.newIndex==null&&(this.newIndex=g))),ne(E,D),s[b].translate=D}this.newIndex==null&&(this.newIndex=this.index),h&&(this.newIndex=I);var j=h?this.prevIndex:I;i&&this.newIndex!==j&&i({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:j,isKeySorting:h,nodes:s,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return H()(c.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.wrappedInstance.current}},{key:"getContainer",value:function(){var e=this.props.getContainer;return typeof e!="function"?(0,de.findDOMNode)(this):e(c.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var e=c.withRef?this.wrappedInstance:null;return(0,O.createElement)(Ce.Provider,{value:this.sortableContextValue},(0,O.createElement)(t,(0,_.Z)({ref:e},ve(this.props,Ye))))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return typeof e=="function"?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){var e=this.props.useWindowAsScrollContainer;return e?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),f}(O.Component),(0,T.Z)(n,"displayName",ue("sortableList",t)),(0,T.Z)(n,"defaultProps",Xe),(0,T.Z)(n,"propTypes",we),o}var Ze={index:u().number.isRequired,collection:u().oneOfType([u().number,u().string]),disabled:u().bool},Je=Object.keys(Ze);function Qe(t){var n,o,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return o=n=function(y){(0,le.Z)(f,y);function f(){var l,e;(0,Y.Z)(this,f);for(var p=arguments.length,r=new Array(p),i=0;i<p;i++)r[i]=arguments[i];return e=(0,ae.Z)(this,(l=(0,se.Z)(f)).call.apply(l,[this].concat(r))),(0,T.Z)((0,v.Z)((0,v.Z)(e)),"wrappedInstance",(0,O.createRef)()),e}return(0,$.Z)(f,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,p=e.collection,r=e.disabled,i=e.index,d=(0,de.findDOMNode)(this);d.sortableInfo={collection:p,disabled:r,index:i,manager:this.context.manager},this.node=d,this.ref={node:d},this.context.manager.add(p,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return H()(c.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var e=c.withRef?this.wrappedInstance:null;return(0,O.createElement)(t,(0,_.Z)({ref:e},ve(this.props,Je)))}}]),f}(O.Component),(0,T.Z)(n,"displayName",ue("sortableElement",t)),(0,T.Z)(n,"contextType",Ce),(0,T.Z)(n,"propTypes",Ze),(0,T.Z)(n,"defaultProps",{collection:0}),o}var Te=m(80271),he=m(48171),qe=m(1152),_e=["className","style"];function et(t){var n=t.dataSource,o=n===void 0?[]:n,c=t.onDragSortEnd,y=t.dragSortKey,f=Qe(function(a){return(0,k.jsx)("tr",(0,A.Z)({},a))}),l=Ve(function(a){return(0,k.jsx)("tbody",(0,A.Z)({},a))}),e=(0,he.J)(function(a){var s=(0,qe.R0)(a,o);s&&c&&c(s)}),p=(0,he.J)(function(a){return(0,k.jsx)(l,(0,A.Z)({useDragHandle:!0,disableAutoscroll:!0,helperClass:"row-dragging",onSortEnd:e},a))}),r=(0,he.J)(function(a){var s=a.className,x=a.style,h=(0,Q.Z)(a,_e),I=o.findIndex(function(b){var S;return b[(S=t.rowKey)!==null&&S!==void 0?S:"index"]===h["data-row-key"]});return(0,k.jsx)(f,(0,A.Z)({index:I},h))}),i=t.components||{};if(y){var d;i.body=(0,A.Z)((0,A.Z)({},((d=t.components)===null||d===void 0?void 0:d.body)||{}),{},{wrapper:p,row:r})}return{components:i}}var dt=m(84288),tt=["rowKey","dragSortKey","dragSortHandlerRender","onDragSortEnd","onDataSourceChange","columns","dataSource"],Ee=function(n){return Be(function(){return(0,k.jsx)(k.Fragment,{children:n})})};function nt(t){var n=t.rowKey,o=t.dragSortKey,c=t.dragSortHandlerRender,y=t.onDragSortEnd,f=t.onDataSourceChange,l=t.columns,e=t.dataSource,p=(0,Q.Z)(t,tt),r=(0,O.useContext)(ie.ZP.ConfigContext),i=r.getPrefixCls,d=(0,O.useMemo)(function(){return Ee((0,k.jsx)(q.Z,{className:i("pro-table-drag-icon")}))},[i]),a=(0,O.useCallback)(function(S){return S.key===o||S.dataIndex===o},[o]),s=(0,O.useMemo)(function(){return l==null?void 0:l.find(function(S){return a(S)})},[l,a]),x=(0,O.useRef)((0,A.Z)({},s)),h=et({dataSource:e==null?void 0:e.slice(),dragSortKey:o,onDragSortEnd:y,components:t.components,rowKey:n}),I=h.components,b=(0,O.useMemo)(function(){var S=x.current;if(!s)return l;var E=function(){for(var C,R=arguments.length,w=new Array(R),M=0;M<R;M++)w[M]=arguments[M];var W=w[0],D=w[1],Z=w[2],N=w[3],P=w[4],j=c?Ee(c(D,Z)):d;return(0,k.jsx)("div",{className:i("pro-table-drag-visible-cell"),children:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(j,{}),(C=S.render)===null||C===void 0?void 0:C.call(S,W,D,Z,N,P)]})})};return l==null?void 0:l.map(function(g){return a(g)?(0,A.Z)((0,A.Z)({},g),{},{render:E}):g})},[d,c,i,s,a,l]);return s?(0,k.jsx)(Te.Z,(0,A.Z)((0,A.Z)({},p),{},{rowKey:n,dataSource:e,components:I,columns:b,onDataSourceChange:f})):(0,k.jsx)(Te.Z,(0,A.Z)((0,A.Z)({},p),{},{rowKey:n,dataSource:e,columns:b,onDataSourceChange:f}))}var rt=nt},16894:function(ge,U,m){"use strict";var A=m(78775),F=m(80271);U.ZP=F.Z},84288:function(){}}]);