var h=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var P=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0})},S=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of p(t))!M.call(e,o)&&o!==n&&h(e,o,{get:()=>t[o],enumerable:!(r=I(t,o))||r.enumerable});return e};var D=e=>S(h({},"__esModule",{value:!0}),e);var N={};P(N,{DOTS:()=>l,usePagination:()=>w});module.exports=D(N);var u=require("react"),l="...",g=(e,t)=>{let n=t-e+1;return Array.from({length:n},(r,o)=>o+e)},w=({totalCount:e,pageSize:t,siblingCount:n=1,currentPage:r})=>(0,u.useMemo)(()=>{let a=Math.ceil(e/t);if(n+5>=a)return g(1,a);let i=Math.max(r-n,1),m=Math.min(r+n,a),c=i>2,f=m<a-2,d=1,x=a;if(!c&&f){let s=3+2*n;return[...g(1,s),l,a]}if(c&&!f){let s=3+2*n,R=g(a-s+1,a);return[d,l,...R]}if(c&&f){let s=g(i,m);return[d,l,...s,l,x]}},[e,t,n,r]);0&&(module.exports={DOTS,usePagination});
