"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[73358],{73358:function(e,t,n){n.d(t,{Z:function(){return K}});var r=n(87462),o=n(1413),u=n(4942),i=n(97685),c=n(45987),a=n(67294),l=n(94184),s=n.n(l),f=n(48555),v=a.forwardRef((function(e,t){var n=e.height,i=e.offset,c=e.children,l=e.prefixCls,v=e.onInnerResize,h=e.innerProps,d={},p={display:"flex",flexDirection:"column"};return void 0!==i&&(d={height:n,position:"relative",overflow:"hidden"},p=(0,o.Z)((0,o.Z)({},p),{},{transform:"translateY(".concat(i,"px)"),position:"absolute",left:0,right:0,top:0})),a.createElement("div",{style:d},a.createElement(f.Z,{onResize:function(e){e.offsetHeight&&v&&v()}},a.createElement("div",(0,r.Z)({style:p,className:s()((0,u.Z)({},"".concat(l,"-holder-inner"),l)),ref:t},h),c)))}));v.displayName="Filler";var h=v,d=n(15671),p=n(43144),m=n(60136),g=n(51630),b=function(e){return+setTimeout(e,16)},M=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(b=function(e){return window.requestAnimationFrame(e)},M=function(e){return window.cancelAnimationFrame(e)});var E=0,R=new Map;function w(e){R.delete(e)}var S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=E+=1;function r(t){if(0===t)w(n),e();else{var o=b((function(){r(t-1)}));R.set(n,o)}}return r(t),n};S.cancel=function(e){var t=R.get(e);return w(t),M(t)};var y=S;function T(e){return"touches"in e?e.touches[0].pageY:e.pageY}var Z=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(){var e;(0,d.Z)(this,n);for(var r=arguments.length,o=new Array(r),u=0;un},e}return(0,p.Z)(n,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(e){e.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){var e,t;this.removeEvents(),null===(e=this.scrollbarRef.current)||void 0===e||e.removeEventListener("touchstart",this.onScrollbarTouchStart),null===(t=this.thumbRef.current)||void 0===t||t.removeEventListener("touchstart",this.onMouseDown),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var e=this.state,t=e.dragging,n=e.visible,r=this.props,i=r.prefixCls,c=r.direction,l=this.getSpinHeight(),f=this.getTop(),v=this.showScroll(),h=v&&n,d="rtl"===c?{left:0}:{right:0};return a.createElement("div",{ref:this.scrollbarRef,className:s()("".concat(i,"-scrollbar"),(0,u.Z)({},"".concat(i,"-scrollbar-show"),v)),style:(0,o.Z)((0,o.Z)({width:8,top:0,bottom:0},d),{},{position:"absolute",display:h?null:"none"}),onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},a.createElement("div",{ref:this.thumbRef,className:s()("".concat(i,"-scrollbar-thumb"),(0,u.Z)({},"".concat(i,"-scrollbar-thumb-moving"),t)),style:{width:"100%",height:l,top:f,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}]),n}(a.Component);function H(e){var t=e.children,n=e.setRef,r=a.useCallback((function(e){n(e)}),[]);return a.cloneElement(t,{ref:r})}var L=n(73935);function x(e){return function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e)?e:e instanceof a.Component?L.findDOMNode(e):null}var D=function(){function e(){(0,d.Z)(this,e),this.maps=void 0,this.maps=Object.create(null)}return(0,p.Z)(e,[{key:"set",value:function(e,t){this.maps[e]=t}},{key:"get",value:function(e){return this.maps[e]}}]),e}();var k=n(71002);function C(e,t,n){var r=a.useState(e),o=(0,i.Z)(r,2),u=o[0],c=o[1],l=a.useState(null),s=(0,i.Z)(l,2),f=s[0],v=s[1];return a.useEffect((function(){var r=function(e,t,n){var r,o,u=e.length,i=t.length;if(0===u&&0===i)return null;u1&&void 0!==arguments[1]&&arguments[1],i=e<0&&u.current.top||e>0&&u.current.bottom;return t&&i?(clearTimeout(r.current),n.current=!1):i&&!n.current||o(),!n.current&&i}};var P="undefined"!=typeof window&&window.document&&window.document.createElement?a.useLayoutEffect:a.useEffect,I=P;var U=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","component","onScroll","onVisibleChange","innerProps"],A=[],z={overflowY:"auto",overflowAnchor:"none"};function F(e,t){var n=e.prefixCls,l=void 0===n?"rc-virtual-list":n,f=e.className,v=e.height,d=e.itemHeight,p=e.fullHeight,m=void 0===p||p,g=e.style,b=e.data,M=e.children,E=e.itemKey,R=e.virtual,w=e.direction,S=e.component,T=void 0===S?"div":S,L=e.onScroll,P=e.onVisibleChange,F=e.innerProps,_=(0,c.Z)(e,U),K=!(!1===R||!v||!d),O=K&&b&&d*b.length>v,j=(0,a.useState)(0),V=(0,i.Z)(j,2),q=V[0],G=V[1],W=(0,a.useState)(!1),B=(0,i.Z)(W,2),J=B[0],Q=B[1],X=s()(l,(0,u.Z)({},"".concat(l,"-rtl"),"rtl"===w),f),$=b||A,ee=(0,a.useRef)(),te=(0,a.useRef)(),ne=(0,a.useRef)(),re=a.useCallback((function(e){return"function"==typeof E?E(e):null==e?void 0:e[E]}),[E]),oe={getKey:re};function ue(e){G((function(t){var n=function(e){var t=e;Number.isNaN(we.current)||(t=Math.min(t,we.current));return t=Math.max(t,0),t}("function"==typeof e?e(t):e);return ee.current.scrollTop=n,n}))}var ie=(0,a.useRef)({start:0,end:$.length}),ce=(0,a.useRef)(),ae=C($,re),le=(0,i.Z)(ae,1)[0];ce.current=le;var se=function(e,t,n){var r=a.useState(0),o=(0,i.Z)(r,2),u=o[0],c=o[1],l=(0,a.useRef)(new Map),s=(0,a.useRef)(new D),f=(0,a.useRef)();function v(){y.cancel(f.current)}function h(){v(),f.current=y((function(){l.current.forEach((function(e,t){if(e&&e.offsetParent){var n=x(e),r=n.offsetHeight;s.current.get(t)!==r&&s.current.set(t,n.offsetHeight)}})),c((function(e){return e+1}))}))}return(0,a.useEffect)((function(){return v}),[]),[function(r,o){var u=e(r),i=l.current.get(u);o?(l.current.set(u,o),h()):l.current.delete(u),!i!=!o&&(o?null==t||t(r):null==n||n(r))},h,s.current,u]}(re,null,null),fe=(0,i.Z)(se,4),ve=fe[0],he=fe[1],de=fe[2],pe=fe[3],me=a.useMemo((function(){if(!K)return{scrollHeight:void 0,start:0,end:$.length-1,offset:void 0};var e;if(!O)return{scrollHeight:(null===(e=te.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:$.length-1,offset:void 0};for(var t,n,r,o=0,u=$.length,i=0;i=q&&void 0===t&&(t=i,n=o),s>q+v&&void 0===r&&(r=i),o=s}return void 0===t&&(t=0,n=0,r=Math.ceil(v/d)),void 0===r&&(r=$.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,$.length),offset:n}}),[O,K,q,$,pe,v]),ge=me.scrollHeight,be=me.start,Me=me.end,Ee=me.offset;ie.current.start=be,ie.current.end=Me;var Re=ge-v,we=(0,a.useRef)(Re);we.current=Re;var Se=q<=0,ye=q>=Re,Te=Y(Se,ye);var Ze=function(e,t,n,r){var o=(0,a.useRef)(0),u=(0,a.useRef)(null),i=(0,a.useRef)(null),c=(0,a.useRef)(!1),l=Y(t,n);return[function(t){if(e){y.cancel(u.current);var n=t.deltaY;o.current+=n,i.current=n,l(n)||(N||t.preventDefault(),u.current=y((function(){var e=c.current?10:1;r(o.current*e),o.current=0})))}},function(t){e&&(c.current=t.detail===i.current)}]}(K,Se,ye,(function(e){ue((function(t){return t+e}))})),He=(0,i.Z)(Ze,2),Le=He[0],xe=He[1];!function(e,t,n){var r,o=(0,a.useRef)(!1),u=(0,a.useRef)(0),i=(0,a.useRef)(null),c=(0,a.useRef)(null),l=function(e){if(o.current){var t=Math.ceil(e.touches[0].pageY),r=u.current-t;u.current=t,n(r)&&e.preventDefault(),clearInterval(c.current),c.current=setInterval((function(){(!n(r*=.9333333333333333,!0)||Math.abs(r)<=.1)&&clearInterval(c.current)}),16)}},s=function(){o.current=!1,r()},f=function(e){r(),1!==e.touches.length||o.current||(o.current=!0,u.current=Math.ceil(e.touches[0].pageY),i.current=e.target,i.current.addEventListener("touchmove",l),i.current.addEventListener("touchend",s))};r=function(){i.current&&(i.current.removeEventListener("touchmove",l),i.current.removeEventListener("touchend",s))},I((function(){return e&&t.current.addEventListener("touchstart",f),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",f),r(),clearInterval(c.current)}}),[e])}(K,ee,(function(e,t){return!Te(e,t)&&(Le({preventDefault:function(){},deltaY:e}),!0)})),I((function(){function e(e){K&&e.preventDefault()}return ee.current.addEventListener("wheel",Le),ee.current.addEventListener("DOMMouseScroll",xe),ee.current.addEventListener("MozMousePixelScroll",e),function(){ee.current&&(ee.current.removeEventListener("wheel",Le),ee.current.removeEventListener("DOMMouseScroll",xe),ee.current.removeEventListener("MozMousePixelScroll",e))}}),[K]);var De=function(e,t,n,r,o,u,i,c){var l=a.useRef();return function(a){if(null!=a){if(y.cancel(l.current),"number"==typeof a)i(a);else if(a&&"object"===(0,k.Z)(a)){var s,f=a.align;s="index"in a?a.index:t.findIndex((function(e){return o(e)===a.key}));var v=a.offset,h=void 0===v?0:v;!function c(a,v){if(!(a<0)&&e.current){var d=e.current.clientHeight,p=!1,m=v;if(d){for(var g=v||f,b=0,M=0,E=0,R=Math.min(t.length,s),w=0;w<=R;w+=1){var S=o(t[w]);M=b;var T=n.get(S);b=E=M+(void 0===T?r:T),w===s&&void 0===T&&(p=!0)}var Z=null;switch(g){case"top":Z=M-h;break;case"bottom":Z=E-d+h;break;default:var H=e.current.scrollTop;MH+d&&(m="bottom")}null!==Z&&Z!==e.current.scrollTop&&i(Z)}l.current=y((function(){p&&u(),c(a-1,m)}),2)}}(3)}}else c()}}(ee,$,de,d,re,he,ue,(function(){var e;null===(e=ne.current)||void 0===e||e.delayHidden()}));a.useImperativeHandle(t,(function(){return{scrollTo:De}})),I((function(){if(P){var e=$.slice(be,Me+1);P(e,$)}}),[be,Me,$]);var ke=function(e,t,n,r,o,u){var i=u.getKey;return e.slice(t,n+1).map((function(e,n){var u=o(e,t+n,{}),c=i(e);return a.createElement(H,{key:c,setRef:function(t){return r(e,t)}},u)}))}($,be,Me,ve,M,oe),Ce=null;return v&&(Ce=(0,o.Z)((0,u.Z)({},m?"height":"maxHeight",v),z),K&&(Ce.overflowY="hidden",J&&(Ce.pointerEvents="none"))),a.createElement("div",(0,r.Z)({style:(0,o.Z)((0,o.Z)({},g),{},{position:"relative"}),className:X},_),a.createElement(T,{className:"".concat(l,"-holder"),style:Ce,ref:ee,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==q&&ue(t),null==L||L(e)}},a.createElement(h,{prefixCls:l,height:ge,offset:Ee,onInnerResize:he,ref:te,innerProps:F},ke)),K&&a.createElement(Z,{ref:ne,prefixCls:l,scrollTop:q,height:v,scrollHeight:ge,count:$.length,direction:w,onScroll:function(e){ue(e)},onStartMove:function(){Q(!0)},onStopMove:function(){Q(!1)}}))}var _=a.forwardRef(F);_.displayName="List";var K=_}}]);