UNPKG

react-waterfall-scroll

Version:
2 lines (1 loc) 21.4 kB
var fu=Object.defineProperty;var At=Object.getOwnPropertySymbols;var vu=Object.prototype.hasOwnProperty,du=Object.prototype.propertyIsEnumerable;var St=(_,T,S)=>T in _?fu(_,T,{enumerable:!0,configurable:!0,writable:!0,value:S}):_[T]=S,pe=(_,T)=>{for(var S in T||(T={}))vu.call(T,S)&&St(_,S,T[S]);if(At)for(var S of At(T))du.call(T,S)&&St(_,S,T[S]);return _};(function(_,T){typeof exports=="object"&&typeof module!="undefined"?module.exports=T(require("react")):typeof define=="function"&&define.amd?define(["react"],T):(_=typeof globalThis!="undefined"?globalThis:_||self,_.Waterfall=T(_.React))})(this,function(_){"use strict";function T(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var S=T(_),U=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var R=xt,Ot=typeof U=="object"&&U&&U.Object===Object&&U,_e=Ot,wt=_e,Ct=typeof self=="object"&&self&&self.Object===Object&&self,It=wt||Ct||Function("return this")(),C=It,jt=C,Et=function(){return jt.Date.now()},Lt=Et,Pt=/\s/;function Dt(e){for(var t=e.length;t--&&Pt.test(e.charAt(t)););return t}var Ht=Dt,Mt=Ht,Nt=/^\s+/;function Ft(e){return e&&e.slice(0,Mt(e)+1).replace(Nt,"")}var Rt=Ft,Gt=C,Bt=Gt.Symbol,W=Bt,$e=W,ye=Object.prototype,Ut=ye.hasOwnProperty,Wt=ye.toString,G=$e?$e.toStringTag:void 0;function qt(e){var t=Ut.call(e,G),r=e[G];try{e[G]=void 0;var a=!0}catch{}var n=Wt.call(e);return a&&(t?e[G]=r:delete e[G]),n}var Kt=qt,zt=Object.prototype,kt=zt.toString;function Xt(e){return kt.call(e)}var Jt=Xt,be=W,Yt=Kt,Zt=Jt,Qt="[object Null]",Vt="[object Undefined]",me=be?be.toStringTag:void 0;function er(e){return e==null?e===void 0?Vt:Qt:me&&me in Object(e)?Yt(e):Zt(e)}var B=er;function tr(e){return e!=null&&typeof e=="object"}var L=tr,rr=B,ar=L,nr="[object Symbol]";function ir(e){return typeof e=="symbol"||ar(e)&&rr(e)==nr}var sr=ir,or=Rt,Te=R,cr=sr,Ae=0/0,lr=/^[-+]0x[0-9a-f]+$/i,ur=/^0b[01]+$/i,fr=/^0o[0-7]+$/i,vr=parseInt;function dr(e){if(typeof e=="number")return e;if(cr(e))return Ae;if(Te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=or(e);var r=ur.test(e);return r||fr.test(e)?vr(e.slice(2),r?2:8):lr.test(e)?Ae:+e}var hr=dr,gr=R,V=Lt,Se=hr,pr="Expected a function",_r=Math.max,$r=Math.min;function yr(e,t,r){var a,n,i,s,o,c,l=0,f=!1,v=!1,u=!0;if(typeof e!="function")throw new TypeError(pr);t=Se(t)||0,gr(r)&&(f=!!r.leading,v="maxWait"in r,i=v?_r(Se(r.maxWait)||0,t):i,u="trailing"in r?!!r.trailing:u);function p(h){var m=a,w=n;return a=n=void 0,l=h,s=e.apply(w,m),s}function d(h){return l=h,o=setTimeout(A,t),f?p(h):s}function b(h){var m=h-c,w=h-l,I=t-m;return v?$r(I,i-w):I}function x(h){var m=h-c,w=h-l;return c===void 0||m>=t||m<0||v&&w>=i}function A(){var h=V();if(x(h))return O(h);o=setTimeout(A,b(h))}function O(h){return o=void 0,u&&a?p(h):(a=n=void 0,s)}function F(){o!==void 0&&clearTimeout(o),l=0,a=c=n=o=void 0}function y(){return o===void 0?s:O(V())}function $(){var h=V(),m=x(h);if(a=arguments,n=this,c=h,m){if(o===void 0)return d(c);if(v)return clearTimeout(o),o=setTimeout(A,t),p(c)}return o===void 0&&(o=setTimeout(A,t)),s}return $.cancel=F,$.flush=y,$}var br=yr,mr=br,Tr=R,Ar="Expected a function";function Sr(e,t,r){var a=!0,n=!0;if(typeof e!="function")throw new TypeError(Ar);return Tr(r)&&(a="leading"in r?!!r.leading:a,n="trailing"in r?!!r.trailing:n),mr(e,t,{leading:a,maxWait:t,trailing:n})}var xr=Sr;function Or(e,t){for(var r=-1,a=e==null?0:e.length,n=Array(a);++r<a;)n[r]=t(e[r],r,e);return n}var ee=Or,wr=B,Cr=R,Ir="[object AsyncFunction]",jr="[object Function]",Er="[object GeneratorFunction]",Lr="[object Proxy]";function Pr(e){if(!Cr(e))return!1;var t=wr(e);return t==jr||t==Er||t==Ir||t==Lr}var xe=Pr,Dr=C,Hr=Dr["__core-js_shared__"],Mr=Hr,te=Mr,Oe=function(){var e=/[^.]+$/.exec(te&&te.keys&&te.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Nr(e){return!!Oe&&Oe in e}var Fr=Nr,Rr=Function.prototype,Gr=Rr.toString;function Br(e){if(e!=null){try{return Gr.call(e)}catch{}try{return e+""}catch{}}return""}var we=Br,Ur=xe,Wr=Fr,qr=R,Kr=we,zr=/[\\^$.*+?()[\]{}|]/g,kr=/^\[object .+?Constructor\]$/,Xr=Function.prototype,Jr=Object.prototype,Yr=Xr.toString,Zr=Jr.hasOwnProperty,Qr=RegExp("^"+Yr.call(Zr).replace(zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vr(e){if(!qr(e)||Wr(e))return!1;var t=Ur(e)?Qr:kr;return t.test(Kr(e))}var ea=Vr;function ta(e,t){return e==null?void 0:e[t]}var ra=ta,aa=ea,na=ra;function ia(e,t){var r=na(e,t);return aa(r)?r:void 0}var j=ia,sa=j,oa=sa(Object,"create"),q=oa,Ce=q;function ca(){this.__data__=Ce?Ce(null):{},this.size=0}var la=ca;function ua(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fa=ua,va=q,da="__lodash_hash_undefined__",ha=Object.prototype,ga=ha.hasOwnProperty;function pa(e){var t=this.__data__;if(va){var r=t[e];return r===da?void 0:r}return ga.call(t,e)?t[e]:void 0}var _a=pa,$a=q,ya=Object.prototype,ba=ya.hasOwnProperty;function ma(e){var t=this.__data__;return $a?t[e]!==void 0:ba.call(t,e)}var Ta=ma,Aa=q,Sa="__lodash_hash_undefined__";function xa(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Aa&&t===void 0?Sa:t,this}var Oa=xa,wa=la,Ca=fa,Ia=_a,ja=Ta,Ea=Oa;function P(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}P.prototype.clear=wa,P.prototype.delete=Ca,P.prototype.get=Ia,P.prototype.has=ja,P.prototype.set=Ea;var La=P;function Pa(){this.__data__=[],this.size=0}var Da=Pa;function Ha(e,t){return e===t||e!==e&&t!==t}var Ie=Ha,Ma=Ie;function Na(e,t){for(var r=e.length;r--;)if(Ma(e[r][0],t))return r;return-1}var K=Na,Fa=K,Ra=Array.prototype,Ga=Ra.splice;function Ba(e){var t=this.__data__,r=Fa(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():Ga.call(t,r,1),--this.size,!0}var Ua=Ba,Wa=K;function qa(e){var t=this.__data__,r=Wa(t,e);return r<0?void 0:t[r][1]}var Ka=qa,za=K;function ka(e){return za(this.__data__,e)>-1}var Xa=ka,Ja=K;function Ya(e,t){var r=this.__data__,a=Ja(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var Za=Ya,Qa=Da,Va=Ua,en=Ka,tn=Xa,rn=Za;function D(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}D.prototype.clear=Qa,D.prototype.delete=Va,D.prototype.get=en,D.prototype.has=tn,D.prototype.set=rn;var z=D,an=j,nn=C,sn=an(nn,"Map"),re=sn,je=La,on=z,cn=re;function ln(){this.size=0,this.__data__={hash:new je,map:new(cn||on),string:new je}}var un=ln;function fn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var vn=fn,dn=vn;function hn(e,t){var r=e.__data__;return dn(t)?r[typeof t=="string"?"string":"hash"]:r.map}var k=hn,gn=k;function pn(e){var t=gn(this,e).delete(e);return this.size-=t?1:0,t}var _n=pn,$n=k;function yn(e){return $n(this,e).get(e)}var bn=yn,mn=k;function Tn(e){return mn(this,e).has(e)}var An=Tn,Sn=k;function xn(e,t){var r=Sn(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var On=xn,wn=un,Cn=_n,In=bn,jn=An,En=On;function H(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}H.prototype.clear=wn,H.prototype.delete=Cn,H.prototype.get=In,H.prototype.has=jn,H.prototype.set=En;var Ee=H,Ln="__lodash_hash_undefined__";function Pn(e){return this.__data__.set(e,Ln),this}var Dn=Pn;function Hn(e){return this.__data__.has(e)}var Mn=Hn,Nn=Ee,Fn=Dn,Rn=Mn;function X(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Nn;++t<r;)this.add(e[t])}X.prototype.add=X.prototype.push=Fn,X.prototype.has=Rn;var ae=X;function Gn(e,t,r,a){for(var n=e.length,i=r+(a?1:-1);a?i--:++i<n;)if(t(e[i],i,e))return i;return-1}var Bn=Gn;function Un(e){return e!==e}var Wn=Un;function qn(e,t,r){for(var a=r-1,n=e.length;++a<n;)if(e[a]===t)return a;return-1}var Kn=qn,zn=Bn,kn=Wn,Xn=Kn;function Jn(e,t,r){return t===t?Xn(e,t,r):zn(e,kn,r)}var Yn=Jn,Zn=Yn;function Qn(e,t){var r=e==null?0:e.length;return!!r&&Zn(e,t,0)>-1}var Le=Qn;function Vn(e,t,r){for(var a=-1,n=e==null?0:e.length;++a<n;)if(r(t,e[a]))return!0;return!1}var Pe=Vn;function ei(e){return function(t){return e(t)}}var ne=ei;function ti(e,t){return e.has(t)}var ie=ti,ri=ae,ai=Le,ni=Pe,ii=ee,si=ne,De=ie,oi=Math.min;function ci(e,t,r){for(var a=r?ni:ai,n=e[0].length,i=e.length,s=i,o=Array(i),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=ii(f,si(t))),c=oi(f.length,c),o[s]=!r&&(t||n>=120&&f.length>=120)?new ri(s&&f):void 0}f=e[0];var v=-1,u=o[0];e:for(;++v<n&&l.length<c;){var p=f[v],d=t?t(p):p;if(p=r||p!==0?p:0,!(u?De(u,d):a(l,d,r))){for(s=i;--s;){var b=o[s];if(!(b?De(b,d):a(e[s],d,r)))continue e}u&&u.push(d),l.push(p)}}return l}var li=ci;function ui(e){return e}var He=ui;function fi(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var vi=fi,di=vi,Me=Math.max;function hi(e,t,r){return t=Me(t===void 0?e.length-1:t,0),function(){for(var a=arguments,n=-1,i=Me(a.length-t,0),s=Array(i);++n<i;)s[n]=a[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=a[n];return o[t]=r(s),di(e,this,o)}}var gi=hi;function pi(e){return function(){return e}}var _i=pi,$i=j,yi=function(){try{var e=$i(Object,"defineProperty");return e({},"",{}),e}catch{}}(),bi=yi,mi=_i,Ne=bi,Ti=He,Ai=Ne?function(e,t){return Ne(e,"toString",{configurable:!0,enumerable:!1,value:mi(t),writable:!0})}:Ti,Si=Ai,xi=800,Oi=16,wi=Date.now;function Ci(e){var t=0,r=0;return function(){var a=wi(),n=Oi-(a-r);if(r=a,n>0){if(++t>=xi)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ii=Ci,ji=Si,Ei=Ii,Li=Ei(ji),Pi=Li,Di=He,Hi=gi,Mi=Pi;function Ni(e,t){return Mi(Hi(e,t,Di),e+"")}var Fe=Ni,Fi=9007199254740991;function Ri(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Fi}var Re=Ri,Gi=xe,Bi=Re;function Ui(e){return e!=null&&Bi(e.length)&&!Gi(e)}var Ge=Ui,Wi=Ge,qi=L;function Ki(e){return qi(e)&&Wi(e)}var Be=Ki,zi=Be;function ki(e){return zi(e)?e:[]}var Xi=ki;function Ji(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ue=Ji,Yi=ee,Zi=li,Qi=Fe,Vi=Xi,es=Ue,ts=Qi(function(e){var t=es(e),r=Yi(e,Vi);return t=typeof t=="function"?t:void 0,t&&r.pop(),r.length&&r[0]===e[0]?Zi(r,void 0,t):[]}),rs=ts,as=ae,ns=Le,is=Pe,ss=ee,os=ne,cs=ie,ls=200;function us(e,t,r,a){var n=-1,i=ns,s=!0,o=e.length,c=[],l=t.length;if(!o)return c;r&&(t=ss(t,os(r))),a?(i=is,s=!1):t.length>=ls&&(i=cs,s=!1,t=new as(t));e:for(;++n<o;){var f=e[n],v=r==null?f:r(f);if(f=a||f!==0?f:0,s&&v===v){for(var u=l;u--;)if(t[u]===v)continue e;c.push(f)}else i(t,v,a)||c.push(f)}return c}var fs=us;function vs(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}var We=vs,ds=B,hs=L,gs="[object Arguments]";function ps(e){return hs(e)&&ds(e)==gs}var _s=ps,qe=_s,$s=L,Ke=Object.prototype,ys=Ke.hasOwnProperty,bs=Ke.propertyIsEnumerable,ms=qe(function(){return arguments}())?qe:function(e){return $s(e)&&ys.call(e,"callee")&&!bs.call(e,"callee")},ze=ms,Ts=Array.isArray,J=Ts,ke=W,As=ze,Ss=J,Xe=ke?ke.isConcatSpreadable:void 0;function xs(e){return Ss(e)||As(e)||!!(Xe&&e&&e[Xe])}var Os=xs,ws=We,Cs=Os;function Je(e,t,r,a,n){var i=-1,s=e.length;for(r||(r=Cs),n||(n=[]);++i<s;){var o=e[i];t>0&&r(o)?t>1?Je(o,t-1,r,a,n):ws(n,o):a||(n[n.length]=o)}return n}var Is=Je,js=fs,Es=Is,Ls=Fe,se=Be,Ps=Ue,Ds=Ls(function(e,t){var r=Ps(t);return se(r)&&(r=void 0),se(e)?js(e,Es(t,1,se,!0),void 0,r):[]}),Hs=Ds,Ms=z;function Ns(){this.__data__=new Ms,this.size=0}var Fs=Ns;function Rs(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Gs=Rs;function Bs(e){return this.__data__.get(e)}var Us=Bs;function Ws(e){return this.__data__.has(e)}var qs=Ws,Ks=z,zs=re,ks=Ee,Xs=200;function Js(e,t){var r=this.__data__;if(r instanceof Ks){var a=r.__data__;if(!zs||a.length<Xs-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new ks(a)}return r.set(e,t),this.size=r.size,this}var Ys=Js,Zs=z,Qs=Fs,Vs=Gs,eo=Us,to=qs,ro=Ys;function M(e){var t=this.__data__=new Zs(e);this.size=t.size}M.prototype.clear=Qs,M.prototype.delete=Vs,M.prototype.get=eo,M.prototype.has=to,M.prototype.set=ro;var ao=M;function no(e,t){for(var r=-1,a=e==null?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}var io=no,so=ae,oo=io,co=ie,lo=1,uo=2;function fo(e,t,r,a,n,i){var s=r&lo,o=e.length,c=t.length;if(o!=c&&!(s&&c>o))return!1;var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var v=-1,u=!0,p=r&uo?new so:void 0;for(i.set(e,t),i.set(t,e);++v<o;){var d=e[v],b=t[v];if(a)var x=s?a(b,d,v,t,e,i):a(d,b,v,e,t,i);if(x!==void 0){if(x)continue;u=!1;break}if(p){if(!oo(t,function(A,O){if(!co(p,O)&&(d===A||n(d,A,r,a,i)))return p.push(O)})){u=!1;break}}else if(!(d===b||n(d,b,r,a,i))){u=!1;break}}return i.delete(e),i.delete(t),u}var Ye=fo,vo=C,ho=vo.Uint8Array,go=ho;function po(e){var t=-1,r=Array(e.size);return e.forEach(function(a,n){r[++t]=[n,a]}),r}var _o=po;function $o(e){var t=-1,r=Array(e.size);return e.forEach(function(a){r[++t]=a}),r}var yo=$o,Ze=W,Qe=go,bo=Ie,mo=Ye,To=_o,Ao=yo,So=1,xo=2,Oo="[object Boolean]",wo="[object Date]",Co="[object Error]",Io="[object Map]",jo="[object Number]",Eo="[object RegExp]",Lo="[object Set]",Po="[object String]",Do="[object Symbol]",Ho="[object ArrayBuffer]",Mo="[object DataView]",Ve=Ze?Ze.prototype:void 0,oe=Ve?Ve.valueOf:void 0;function No(e,t,r,a,n,i,s){switch(r){case Mo:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ho:return!(e.byteLength!=t.byteLength||!i(new Qe(e),new Qe(t)));case Oo:case wo:case jo:return bo(+e,+t);case Co:return e.name==t.name&&e.message==t.message;case Eo:case Po:return e==t+"";case Io:var o=To;case Lo:var c=a&So;if(o||(o=Ao),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;a|=xo,s.set(e,t);var f=mo(o(e),o(t),a,n,i,s);return s.delete(e),f;case Do:if(oe)return oe.call(e)==oe.call(t)}return!1}var Fo=No,Ro=We,Go=J;function Bo(e,t,r){var a=t(e);return Go(e)?a:Ro(a,r(e))}var Uo=Bo;function Wo(e,t){for(var r=-1,a=e==null?0:e.length,n=0,i=[];++r<a;){var s=e[r];t(s,r,e)&&(i[n++]=s)}return i}var qo=Wo;function Ko(){return[]}var zo=Ko,ko=qo,Xo=zo,Jo=Object.prototype,Yo=Jo.propertyIsEnumerable,et=Object.getOwnPropertySymbols,Zo=et?function(e){return e==null?[]:(e=Object(e),ko(et(e),function(t){return Yo.call(e,t)}))}:Xo,Qo=Zo;function Vo(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var ec=Vo,Y={exports:{}};function tc(){return!1}var rc=tc;(function(e,t){var r=C,a=rc,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s?r.Buffer:void 0,c=o?o.isBuffer:void 0,l=c||a;e.exports=l})(Y,Y.exports);var ac=9007199254740991,nc=/^(?:0|[1-9]\d*)$/;function ic(e,t){var r=typeof e;return t=t==null?ac:t,!!t&&(r=="number"||r!="symbol"&&nc.test(e))&&e>-1&&e%1==0&&e<t}var sc=ic,oc=B,cc=Re,lc=L,uc="[object Arguments]",fc="[object Array]",vc="[object Boolean]",dc="[object Date]",hc="[object Error]",gc="[object Function]",pc="[object Map]",_c="[object Number]",$c="[object Object]",yc="[object RegExp]",bc="[object Set]",mc="[object String]",Tc="[object WeakMap]",Ac="[object ArrayBuffer]",Sc="[object DataView]",xc="[object Float32Array]",Oc="[object Float64Array]",wc="[object Int8Array]",Cc="[object Int16Array]",Ic="[object Int32Array]",jc="[object Uint8Array]",Ec="[object Uint8ClampedArray]",Lc="[object Uint16Array]",Pc="[object Uint32Array]",g={};g[xc]=g[Oc]=g[wc]=g[Cc]=g[Ic]=g[jc]=g[Ec]=g[Lc]=g[Pc]=!0,g[uc]=g[fc]=g[Ac]=g[vc]=g[Sc]=g[dc]=g[hc]=g[gc]=g[pc]=g[_c]=g[$c]=g[yc]=g[bc]=g[mc]=g[Tc]=!1;function Dc(e){return lc(e)&&cc(e.length)&&!!g[oc(e)]}var Hc=Dc,ce={exports:{}};(function(e,t){var r=_e,a=t&&!t.nodeType&&t,n=a&&!0&&e&&!e.nodeType&&e,i=n&&n.exports===a,s=i&&r.process,o=function(){try{var c=n&&n.require&&n.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(ce,ce.exports);var Mc=Hc,Nc=ne,tt=ce.exports,rt=tt&&tt.isTypedArray,Fc=rt?Nc(rt):Mc,at=Fc,Rc=ec,Gc=ze,Bc=J,Uc=Y.exports,Wc=sc,qc=at,Kc=Object.prototype,zc=Kc.hasOwnProperty;function kc(e,t){var r=Bc(e),a=!r&&Gc(e),n=!r&&!a&&Uc(e),i=!r&&!a&&!n&&qc(e),s=r||a||n||i,o=s?Rc(e.length,String):[],c=o.length;for(var l in e)(t||zc.call(e,l))&&!(s&&(l=="length"||n&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Wc(l,c)))&&o.push(l);return o}var Xc=kc,Jc=Object.prototype;function Yc(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Jc;return e===r}var Zc=Yc;function Qc(e,t){return function(r){return e(t(r))}}var Vc=Qc,el=Vc,tl=el(Object.keys,Object),rl=tl,al=Zc,nl=rl,il=Object.prototype,sl=il.hasOwnProperty;function ol(e){if(!al(e))return nl(e);var t=[];for(var r in Object(e))sl.call(e,r)&&r!="constructor"&&t.push(r);return t}var cl=ol,ll=Xc,ul=cl,fl=Ge;function vl(e){return fl(e)?ll(e):ul(e)}var dl=vl,hl=Uo,gl=Qo,pl=dl;function _l(e){return hl(e,pl,gl)}var $l=_l,nt=$l,yl=1,bl=Object.prototype,ml=bl.hasOwnProperty;function Tl(e,t,r,a,n,i){var s=r&yl,o=nt(e),c=o.length,l=nt(t),f=l.length;if(c!=f&&!s)return!1;for(var v=c;v--;){var u=o[v];if(!(s?u in t:ml.call(t,u)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var b=!0;i.set(e,t),i.set(t,e);for(var x=s;++v<c;){u=o[v];var A=e[u],O=t[u];if(a)var F=s?a(O,A,u,t,e,i):a(A,O,u,e,t,i);if(!(F===void 0?A===O||n(A,O,r,a,i):F)){b=!1;break}x||(x=u=="constructor")}if(b&&!x){var y=e.constructor,$=t.constructor;y!=$&&"constructor"in e&&"constructor"in t&&!(typeof y=="function"&&y instanceof y&&typeof $=="function"&&$ instanceof $)&&(b=!1)}return i.delete(e),i.delete(t),b}var Al=Tl,Sl=j,xl=C,Ol=Sl(xl,"DataView"),wl=Ol,Cl=j,Il=C,jl=Cl(Il,"Promise"),El=jl,Ll=j,Pl=C,Dl=Ll(Pl,"Set"),Hl=Dl,Ml=j,Nl=C,Fl=Ml(Nl,"WeakMap"),Rl=Fl,le=wl,ue=re,fe=El,ve=Hl,de=Rl,it=B,N=we,st="[object Map]",Gl="[object Object]",ot="[object Promise]",ct="[object Set]",lt="[object WeakMap]",ut="[object DataView]",Bl=N(le),Ul=N(ue),Wl=N(fe),ql=N(ve),Kl=N(de),E=it;(le&&E(new le(new ArrayBuffer(1)))!=ut||ue&&E(new ue)!=st||fe&&E(fe.resolve())!=ot||ve&&E(new ve)!=ct||de&&E(new de)!=lt)&&(E=function(e){var t=it(e),r=t==Gl?e.constructor:void 0,a=r?N(r):"";if(a)switch(a){case Bl:return ut;case Ul:return st;case Wl:return ot;case ql:return ct;case Kl:return lt}return t});var zl=E,he=ao,kl=Ye,Xl=Fo,Jl=Al,ft=zl,vt=J,dt=Y.exports,Yl=at,Zl=1,ht="[object Arguments]",gt="[object Array]",Z="[object Object]",Ql=Object.prototype,pt=Ql.hasOwnProperty;function Vl(e,t,r,a,n,i){var s=vt(e),o=vt(t),c=s?gt:ft(e),l=o?gt:ft(t);c=c==ht?Z:c,l=l==ht?Z:l;var f=c==Z,v=l==Z,u=c==l;if(u&&dt(e)){if(!dt(t))return!1;s=!0,f=!1}if(u&&!f)return i||(i=new he),s||Yl(e)?kl(e,t,r,a,n,i):Xl(e,t,c,r,a,n,i);if(!(r&Zl)){var p=f&&pt.call(e,"__wrapped__"),d=v&&pt.call(t,"__wrapped__");if(p||d){var b=p?e.value():e,x=d?t.value():t;return i||(i=new he),n(b,x,r,a,i)}}return u?(i||(i=new he),Jl(e,t,r,a,n,i)):!1}var eu=Vl,tu=eu,_t=L;function $t(e,t,r,a,n){return e===t?!0:e==null||t==null||!_t(e)&&!_t(t)?e!==e&&t!==t:tu(e,t,r,a,$t,n)}var ru=$t,au=ru;function nu(e,t){return au(e,t)}var yt=nu;const iu={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start"};Tt.defaultProps={col:3,horizontalSpacing:10,verticalSpacing:10,waterFallBoxStyle:{},width:"unset",useWindow:!1,limitHeight:50,CardComponent:()=>null,data:[],onReachBottom:()=>{}};var bt;(function(e){e[e.min=0]="min",e[e.max=1]="max"})(bt||(bt={}));function mt(e){return Array.from(Array(e),(t,r)=>[])}function su(e,t){return rs(e,t,yt)}function ou(e,t){return Hs(t,e,yt)}function cu(e,t){return e===t-1?0:e+1}function ge(e,t){const a=[...e].sort((o,c)=>c.clientHeight-o.clientHeight),n=t===0?a.length-1:0,i=a[n],s=e.indexOf(i);return{colDom:i,index:s}}function lu(e,t,r,a){_.useLayoutEffect(()=>{const n=e?window:r.current.parentNode,i=xr(()=>{let s,o,c;e?(s=document.body.scrollHeight,o=document.body.scrollTop||document.documentElement.scrollTop,c=window.innerHeight):(s=n.scrollHeight,o=n.scrollTop,c=n.clientHeight),o+c>=s-t&&a()},300);return n.addEventListener("scroll",i),()=>{n.removeEventListener("scroll",i)}},[])}function Tt(e){const{col:t,horizontalSpacing:r,verticalSpacing:a,waterFallBoxStyle:n,width:i,useWindow:s,limitHeight:o,CardComponent:c,data:l,onReachBottom:f}=e,v=_.useRef(null),u=_.useRef([]),p=_.useRef(0),[d,b]=_.useState(mt(t)),x=y=>{const{index:$}=ge(y,0);p.current=$},A=(y,$)=>{const h=$?mt(t):d,m=[...y];let w=y.length,I=p.current;for(;w!==0;){const Q=I,uu=m.shift();h[Q].push(uu),I=cu(I,Number(t)),w--}b([...h])},O=(y,$)=>{const h=d[y],m=d[$],w=h.pop();m.push(w),b([...d])},F=()=>{const y=Array.from(document.getElementsByClassName("waterFall-col-box")),{colDom:$,index:h}=ge(y,1),{colDom:m,index:w}=ge(y,0),I=Array.from($.childNodes),Q=I[I.length-1];!Q||($.clientHeight-m.clientHeight>Q.clientHeight+a&&O(h,w),x(y))};return _.useEffect(()=>{!u.current.length||u.current.length>l.length?A(l,!0):su(u.current,l).length===u.current.length?A(ou(u.current,l)):A(l,!0),u.current=l},[t,l]),_.useLayoutEffect(()=>{F()},[d,r,a,n,i,s,c]),lu(s,o,v,f),S.default.createElement("div",{ref:v,className:"waterFall-box",style:pe(pe({width:i},n),iu)},d.map((y,$)=>S.default.createElement("div",{key:$,className:"waterFall-col-box",style:{marginRight:$===d.length-1?"unset":`${r}px`,flexGrow:1,flexShrink:1}},y.map((h,m)=>S.default.createElement("div",{className:"waterFall-card-box",key:m,style:{marginBottom:`${a}px`,overflow:"hidden"}},S.default.createElement(c,{key:m,data:h,index:`${$}-${m}`}))))))}return Tt});