1import{f as O,a as k,t as Qe,e as H,_ as Mt,b as bt,d as Ie,c as pt}from"./npm.babel.runtime.C-V9DD0J.chunk.js";import{a as t}from"./npm.react.CBIKx4gs.chunk.js";import{r as Ge}from"./npm.react-dom.6RGsRoUl.chunk.js";import{c as pe}from"./npm.classnames.B2puX61A.chunk.js";import{R as et}from"./npm.rc-resize-observer.DIp_WA_u.chunk.js";import{w as B,f as yt,l as Re,e as Ue}from"./npm.rc-util.CZcgYglX.chunk.js";import"./npm.react-is.8hO7W5-a.chunk.js";var tt=t.forwardRef(function(e,f){var r=e.height,c=e.offsetY,S=e.offsetX,a=e.children,s=e.prefixCls,d=e.onInnerResize,g=e.innerProps,y=e.rtl,h=e.extra,n={},u={display:"flex",flexDirection:"column"};if(c!==void 0){var l;n={height:r,position:"relative",overflow:"hidden"},u=O(O({},u),{},(l={transform:"translateY(".concat(c,"px)")},k(l,y?"marginRight":"marginLeft",-S),k(l,"position","absolute"),k(l,"left",0),k(l,"right",0),k(l,"top",0),l))}return t.createElement("div",{style:n},t.createElement(et,{onResize:function(m){var v=m.offsetHeight;v&&d&&d()}},t.createElement("div",Qe({style:u,className:pe(k({},"".concat(s,"-holder-inner"),s)),ref:f},g),a,h)))});tt.displayName="Filler";function je(e,f){var r="touches"in e?e.touches[0]:e;return r[f?"pageX":"pageY"]}var Ze=t.forwardRef(function(e,f){var r,c=e.prefixCls,S=e.rtl,a=e.scrollOffset,s=e.scrollRange,d=e.onStartMove,g=e.onStopMove,y=e.onScroll,h=e.horizontal,n=e.spinSize,u=e.containerSize,l=e.style,M=e.thumbStyle,m=t.useState(!1),v=H(m,2),b=v[0],p=v[1],T=t.useState(null),_=H(T,2),N=_[0],W=_[1],E=t.useState(null),A=H(E,2),C=A[0],Y=A[1],I=!S,J=t.useRef(),x=t.useRef(),F=t.useState(!1),Q=H(F,2),ee=Q[0],U=Q[1],P=t.useRef(),te=function(){clearTimeout(P.current),U(!0),P.current=setTimeout(function(){U(!1)},3e3)},re=s-u||0,oe=u-n||0,ne=re>0,X=t.useMemo(function(){if(a===0||re===0)return 0;var D=a/re;return D*oe},[a,re,oe]),ye=function(z){z.stopPropagation(),z.preventDefault()},le=t.useRef({top:X,dragging:b,pageY:N,startTop:C});le.current={top:X,dragging:b,pageY:N,startTop:C};var ce=function(z){p(!0),W(je(z,h)),Y(le.current.top),d(),z.stopPropagation(),z.preventDefault()};t.useEffect(function(){var D=function(ve){ve.preventDefault()},z=J.current,G=x.current;return z.addEventListener("touchstart",D),G.addEventListener("touchstart",ce),function(){z.removeEventListener("touchstart",D),G.removeEventListener("touchstart",ce)}},[]);var se=t.useRef();se.current=re;var fe=t.useRef();fe.current=oe,t.useEffect(function(){if(b){var D,z=function(ve){var de=le.current,Ee=de.dragging,ue=de.pageY,xe=de.startTop;if(B.cancel(D),Ee){var he=je(ve,h)-ue,ae=xe;!I&&h?ae-=he:ae+=he;var be=se.current,ie=fe.current,j=ie?ae/ie:0,$=Math.ceil(j*be);$=Math.max($,0),$=Math.min($,be),D=B(function(){y($,h)})}},G=function(){p(!1),g()};return window.addEventListener("mousemove",z),window.addEventListener("touchmove",z),window.addEventListener("mouseup",G),window.addEventListener("touchend",G),function(){window.removeEventListener("mousemove",z),window.removeEventListener("touchmove",z),window.removeEventListener("mouseup",G),window.removeEventListener("touchend",G),B.cancel(D)}}},[b]),t.useEffect(function(){te()},[a]),t.useImperativeHandle(f,function(){return{delayHidden:te}});var K="".concat(c,"-scrollbar"),w={position:"absolute",visibility:ee&&ne?null:"hidden"},V={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return h?(w.height=8,w.left=0,w.right=0,w.bottom=0,V.height="100%",V.width=n,I?V.left=X:V.right=X):(w.width=8,w.top=0,w.bottom=0,I?w.right=0:w.left=0,V.width="100%",V.height=n,V.top=X),t.createElement("div",{ref:J,className:pe(K,(r={},k(r,"".concat(K,"-horizontal"),h),k(r,"".concat(K,"-vertical"),!h),k(r,"".concat(K,"-visible"),ee),r)),style:O(O({},w),l),onMouseDown:ye,onMouseMove:te},t.createElement("div",{ref:x,className:pe("".concat(K,"-thumb"),k({},"".concat(K,"-thumb-moving"),b)),style:O(O({},V),M),onMouseDown:ce}))});function Et(e){var f=e.children,r=e.setRef,c=t.useCallback(function(S){r(S)},[]);return t.cloneElement(f,{ref:c})}function xt(e,f,r,c,S,a,s){var d=s.getKey;return e.slice(f,r+1).map(function(g,y){var h=f+y,n=a(g,h,{style:{width:c}}),u=d(g);return t.createElement(Et,{key:u,setRef:function(M){return S(g,M)}},n)})}var wt=(function(){function e(){bt(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return Mt(e,[{key:"set",value:function(r,c){this.maps[r]=c,this.id+=1}},{key:"get",value:function(r){return this.maps[r]}}]),e})();function zt(e,f,r){var c=t.useState(0),S=H(c,2),a=S[0],s=S[1],d=t.useRef(new Map),g=t.useRef(new wt),y=t.useRef();function h(){B.cancel(y.current)}function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;h();var M=function(){d.current.forEach(function(v,b){if(v&&v.offsetParent){var p=yt(v),T=p.offsetHeight;g.current.get(b)!==T&&g.current.set(b,p.offsetHeight)}}),s(function(v){return v+1})};l?M():y.current=B(M)}function u(l,M){var m=e(l);d.current.get(m),M?(d.current.set(m,M),n()):d.current.delete(m)}return t.useEffect(function(){return h},[]),[u,n,g.current,a]}var Lt=10;function _t(e,f,r,c,S,a,s,d){var g=t.useRef(),y=t.useState(null),h=H(y,2),n=h[0],u=h[1];return Re(function(){if(n&&n.times<Lt){if(!e.current){u(function(te){return O({},te)}
1);return}a();var l=n.targetAlign,M=n.originAlign,m=n.index,v=n.offset,b=e.current.clientHeight,p=!1,T=l,_=null;if(b){for(var N=l||M,W=0,E=0,A=0,C=Math.min(f.length-1,m),Y=0;Y<=C;Y+=1){var I=S(f[Y]);E=W;var J=r.get(I);A=E+(J===void 0?c:J),W=A}for(var x=N==="top"?v:b-v,F=C;F>=0;F-=1){var Q=S(f[F]),ee=r.get(Q);if(ee===void 0){p=!0;break}if(x-=ee,x<=0)break}switch(N){case"top":_=E-v;break;case"bottom":_=A-b+v;break;default:{var U=e.current.scrollTop,P=U+b;E<U?T="top":A>P&&(T="bottom")}}_!==null&&s(_),_!==n.lastTop&&(p=!0)}p&&u(O(O({},n),{},{times:n.times+1,targetAlign:T,lastTop:_}))}},[n,e.current]),function(l){if(l==null){d();return}if(B.cancel(g.current),typeof l=="number")s(l);else if(l&&Ie(l)==="object"){var M,m=l.align;"index"in l?M=l.index:M=f.findIndex(function(p){return S(p)===l.key});var v=l.offset,b=v===void 0?0:v;u({times:0,index:M,offset:b,originAlign:m})}}}function Dt(e,f,r){var c=e.length,S=f.length,a,s;if(c===0&&S===0)return null;c<S?(a=e,s=f):(a=f,s=e);var d={__EMPTY_ITEM__:!0};function g(M){return M!==void 0?r(M):d}for(var y=null,h=Math.abs(c-S)!==1,n=0;n<s.length;n+=1){var u=g(a[n]),l=g(s[n]);if(u!==l){y=n,h=h||u!==g(s[n+1]);break}}return y===null?null:{index:y,multiple:h}}function Ht(e,f,r){var c=t.useState(e),S=H(c,2),a=S[0],s=S[1],d=t.useState(null),g=H(d,2),y=g[0],h=g[1];return t.useEffect(function(){var n=Dt(a||[],e||[],f);(n==null?void 0:n.index)!==void 0&&h(e[n.index]),s(e)},[e]),[y]}var qe=(typeof navigator>"u"?"undefined":Ie(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const rt=(function(e,f){var r=t.useRef(!1),c=t.useRef(null);function S(){clearTimeout(c.current),r.current=!0,c.current=setTimeout(function(){r.current=!1},50)}var a=t.useRef({top:e,bottom:f});return a.current.top=e,a.current.bottom=f,function(s){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=s<0&&a.current.top||s>0&&a.current.bottom;return d&&g?(clearTimeout(c.current),r.current=!1):(!g||r.current)&&S(),!r.current&&g}});function Tt(e,f,r,c,S){var a=t.useRef(0),s=t.useRef(null),d=t.useRef(null),g=t.useRef(!1),y=rt(f,r);function h(v,b){B.cancel(s.current),a.current+=b,d.current=b,!y(b)&&(qe||v.preventDefault(),s.current=B(function(){var p=g.current?10:1;S(a.current*p),a.current=0}))}function n(v,b){S(b,!0),qe||v.preventDefault()}var u=t.useRef(null),l=t.useRef(null);function M(v){if(e){B.cancel(l.current),l.current=B(function(){u.current=null},2);var b=v.deltaX,p=v.deltaY,T=v.shiftKey,_=b,N=p;(u.current==="sx"||!u.current&&T&&p&&!b)&&(_=p,N=0,u.current="sx");var W=Math.abs(_),E=Math.abs(N);u.current===null&&(u.current=c&&W>E?"x":"y"),u.current==="y"?h(v,N):n(v,_)}}function m(v){e&&(g.current=v.detail===d.current)}return[M,m]}var Ct=14/15;function It(e,f,r){var c=t.useRef(!1),S=t.useRef(0),a=t.useRef(null),s=t.useRef(null),d,g=function(u){if(c.current){var l=Math.ceil(u.touches[0].pageY),M=S.current-l;S.current=l,r(M)&&u.preventDefault(),clearInterval(s.current),s.current=setInterval(function(){M*=Ct,(!r(M,!0)||Math.abs(M)<=.1)&&clearInterval(s.current)},16)}},y=function(){c.current=!1,d()},h=function(u){d(),u.touches.length===1&&!c.current&&(c.current=!0,S.current=Math.ceil(u.touches[0].pageY),a.current=u.target,a.current.addEventListener("touchmove",g),a.current.addEventListener("touchend",y))};d=function(){a.current&&(a.current.removeEventListener("touchmove",g),a.current.removeEventListener("touchend",y))},Re(function(){return e&&f.current.addEventListener("touchstart",h),function(){var n;(n=f.current)===null||n===void 0||n.removeEventListener("touchstart",h),d(),clearInterval(s.current)}},[e])}var Pt=20;function Je(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e/f*100;return isNaN(r)&&(r=0),r=Math.max(r,Pt),r=Math.min(r,e/2),Math.floor(r)}function kt(e,f,r,c){var S=t.useMemo(function(){return[new Map,[]]},[e,r.id,c]),a=H(S,2),s=a[0],d=a[1],g=function(h){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h,u=s.get(h),l=s.get(n);if(u===void 0||l===void 0)for(var M=e.length,m=d.length;m<M;m+=1){var v,b=e[m],p=f(b);s.set(p,m);var T=(v=r.get(p))!==null&&v!==void 0?v:c;if(d[m]=(d[m-1]||0)+T,p===h&&(u=m),p===n&&(l=m),u!==void 0&&l!==void 0)break}return{top:d[u-1]||0,bottom:d[l]}};return g}var Ot=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Nt=[],Yt={overflowY:"auto",overflowAnchor:"none"};function Ft(e,f){var r=e.prefixCls,c=r===void 0?"rc-virtual-list":r,S=e.className,a=e.height,s=e.itemHeight,d=e.fullHeight,g=d===void 0?!0:d,y=e.style,h=e.data,n=e.children,u=e.itemKey,l=e.virtual,M=e.direction,m=e.scrollWidth,v=e.component,b=v===void 0?"div":v,p=e.onScroll,T=e.onVirtualScroll,_=e.onVisibleChange,N=e.innerProps,W=e.extraRender,E=e.styles,A=pt(e,Ot),C=!!(l!==!1&&a&&s),Y=C&&h&&(s*h.length>a||!!m),I=M==="rtl",J=pe(c,k({},"".concat(c,"-rtl"),I),S),x=h||Nt,F=t.useRef(),Q=t.useRef(),ee=t.useState(0),U=H(ee,2),P=U[0],te=U[1],re=t.useState(0),oe=H(re,2),ne=oe[0],X=oe[1],ye=t.useState(!1),le=H(ye,2),ce=le[0],se=le[1],fe=function(){se(!0)},K=function(){se(!1)},w=t.useCallback(function(i){return typeof u=="function"?u(i):i==null?void 0:i[u]},[u]),V={getKey:w};function D(i){te(function(o){var R;typeof i=="function"?R=i(o):R=i;var L=ut(R);return F.current.scrollTop=L,L})}var z=t.useRef({start:0,end:x.length}),G=t.useRef(),Me=Ht(x,w),ve=H(Me,1),de=ve[0];G.current=de;var Ee=zt(w),ue=H(Ee,4),xe=ue[0],he=ue[1],ae=ue[2],be=ue[3],ie=t.useMemo(function(){if(!C)return{scrollHeight:void 0,start:0,end:x.length-1,offset:void 0};if(!Y){var i;return{scrollHeight:((i=Q.current)===null||i===void 0?void 0:i.offsetHeight)||0,start:0,end:x.length-1,offset:void 0}}for(var o=0,R,L,q,St=x.length,ge=0;ge<St;ge+=1){var gt=x[ge],Rt=w(gt),Ke=ae.get(Rt),Ce=o+(Ke===void 0?s:Ke);Ce>=P&&R===void 0&&(R=ge,L=o),Ce>P+a&&q===void 0&&(q=ge),o=Ce}return R===void 0&&(R=0,L=0,q=Math.ceil(a/s)),q===void 0&&(q=x.length-1),q=Math.min(q+1,x.length-1),{scrollHeight:o,start:R,end:q,offset:L}},[Y,C,P,x,be,a]),j=ie.scrollHeight,$=ie.start,me=ie.end,Pe=ie.offset;z.current.start=$,z.current.end=me;var nt=t.useState({width:0,height:a}),ke=H(nt,2),Z=ke[0],at=ke[1],it=function(o){at({width:o.width||o.offsetWidth,height:o.height||o.offsetHeight})},Oe=t.useRef(),Ne=t.useRef(),ot=t.useMemo(function(){return Je(Z.width,m)},[Z.width,m]),lt=t.useMemo(function(){return Je(Z.height,j)},[Z.height,j]),we=j-a,ze=t.useRef(we);ze.current=we;function ut(i){var o=i;return Number.isNaN(ze.current)||(o=Math.min(o,ze.current)),o=Math.max(o,0),o}var Ye=P<=0,Fe=P>=we,ct=rt(Ye,Fe),Le=function(){return{x:I?-ne:ne,y:P}},_e=t.useRef(Le()),De=Ue(function(){if(T){var i=Le();(_e.current.x!==i.x||_e.current.y!==i.y)&&(T(i),_e.current=i)}});function $e(i,o){var R=i;o?(Ge.flushSync(function(){X(R)}),De()):D(R)}function st(i){var o=i.currentTarget.scrollTop;o!==P&&D(o),p==null||p(i),De()}
1var He=function(o){var R=o,L=m-Z.width;return R=Math.max(R,0),R=Math.min(R,L),R},ft=Ue(function(i,o){o?(Ge.flushSync(function(){X(function(R){var L=R+(I?-i:i);return He(L)})}),De()):D(function(R){var L=R+i;return L})}),vt=Tt(C,Ye,Fe,!!m,ft),We=H(vt,2),Te=We[0],Xe=We[1];It(C,F,function(i,o){return ct(i,o)?!1:(Te({preventDefault:function(){},deltaY:i}),!0)}),Re(function(){function i(R){C&&R.preventDefault()}var o=F.current;return o.addEventListener("wheel",Te),o.addEventListener("DOMMouseScroll",Xe),o.addEventListener("MozMousePixelScroll",i),function(){o.removeEventListener("wheel",Te),o.removeEventListener("DOMMouseScroll",Xe),o.removeEventListener("MozMousePixelScroll",i)}},[C]),Re(function(){m&&X(function(i){return He(i)})},[Z.width,m]);var Ve=function(){var o,R;(o=Oe.current)===null||o===void 0||o.delayHidden(),(R=Ne.current)===null||R===void 0||R.delayHidden()},Be=_t(F,x,ae,s,w,function(){return he(!0)},D,Ve);t.useImperativeHandle(f,function(){return{getScrollInfo:Le,scrollTo:function(o){function R(L){return L&&Ie(L)==="object"&&("left"in L||"top"in L)}R(o)?(o.left!==void 0&&X(He(o.left)),Be(o.top)):Be(o)}}}),Re(function(){if(_){var i=x.slice($,me+1);_(i,x)}},[$,me,x]);var dt=kt(x,w,ae,s),ht=W==null?void 0:W({start:$,end:me,virtual:Y,offsetX:ne,offsetY:Pe,rtl:I,getSize:dt}),mt=xt(x,$,me,m,xe,n,V),Se=null;a&&(Se=O(k({},g?"height":"maxHeight",a),Yt),C&&(Se.overflowY="hidden",m&&(Se.overflowX="hidden"),ce&&(Se.pointerEvents="none")));var Ae={};return I&&(Ae.dir="rtl"),t.createElement("div",Qe({style:O(O({},y),{},{position:"relative"}),className:J},Ae,A),t.createElement(et,{onResize:it},t.createElement(b,{className:"".concat(c,"-holder"),style:Se,ref:F,onScroll:st,onMouseEnter:Ve},t.createElement(tt,{prefixCls:c,height:j,offsetX:ne,offsetY:Pe,scrollWidth:m,onInnerResize:he,ref:Q,innerProps:N,rtl:I,extra:ht},mt))),Y&&j>a&&t.createElement(Ze,{ref:Oe,prefixCls:c,scrollOffset:P,scrollRange:j,rtl:I,onScroll:$e,onStartMove:fe,onStopMove:K,spinSize:lt,containerSize:Z.height,style:E==null?void 0:E.verticalScrollBar,thumbStyle:E==null?void 0:E.verticalScrollBarThumb}),Y&&m&&t.createElement(Ze,{ref:Ne,prefixCls:c,scrollOffset:ne,scrollRange:m,rtl:I,onScroll:$e,onStartMove:fe,onStopMove:K,spinSize:ot,containerSize:Z.width,horizontal:!0,style:E==null?void 0:E.horizontalScrollBar,thumbStyle:E==null?void 0:E.horizontalScrollBarThumb}))}var $t=t.forwardRef(Ft);$t.displayName="List";export{$t as L};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.