PageSourceSearch

https://www.splav.ru/_nuxt/BrndPagination.51b8aca2.js

js splav.ru collected 2026-10-03 20:38:50 UTC 3,144 bytes, 2 lines download raw bytes

1import z from"./BrndButton.68568191.js";import{a as E,m as F,h as I,i as R}from"./entry.9c752da3.js";import{h as A}from"./_vueuse.90c89c65.js";import{d as h,r as m,w as C,l as o,m as i,u as p,k as L,E as x,B as v,A as f,G as y,F as O,ab as W,x as j,J as D}from"./_vueform/slider.db378d7f.js";import"./floating-vue/dist.a50cb737.js";const G={key:0,class:""},J=f("span",{class:"font-bold"},"Показать ещё",-1),Q={class:"flex items-center font-medium text-black md:gap-4"},T={key:0},U=f("span",{class:"hidden md:inline"},"Назад",-1),H={class:"flex items-center md:gap-4"},K=["onClick"],X={key:1},Y=f("span",{class:"hidden md:inline"},"Вперед",-1),oe={__name:"BrndPagination",props:{currentPage:{type:Number,default:1},totalPages:{type:Number,default:12},autoStartMore:{type:Boolean,default:!1},getMore:{type:Function,default:()=>{}},getMoreCount:{type:Number,default:1},loadingContainer:{type:Object,default:null},isEnd:{type:Boolean,default:!1},share:{type:Boolean,default:!1}},emits:["update:is-end"],setup(n,{emit:$}){const t=n,B=h(()=>t.totalPages>1),S=h(()=>{const s=Math.min(5,t.totalPages);let e=t.currentPage-Math.floor(s/2);return e=Math.max(e,1),e=Math.min(e,t.totalPages-s+1),[...Array(s)].map((g,a)=>a+e)}),l=E(),N=F(),r=h(()=>(l==null?void 0:l.query)||{}),_=s=>{var e;t.share&&((e=r.value)!=null&&e.ids)&&(r.value.ids.startsWith("[")||(r.value.ids=`[${r.value.ids}]`)),N.push({path:l.path,query:{...r.value,page:s}})},q=h(()=>t.currentPage<t.totalPages),M=m(null),u=m(0),b=m(!1),P=m(t.autoStartMore),w=async()=>{const{currentPage:s,totalPages:e}=t;if(s>=e)return;const g=s+1,a={...r.value};a.page=g,b.value=!0,t.share&&(a!=null&&a.ids)&&(a.ids.startsWith("[")||(a.ids=`[${a.ids}]`)),await t.getMore({query:a});const c=new URLSearchParams(a).toString();history.pushState(history.state,"",`${l.path}${c&&`?${c}`}`),b.value=!1,setTimeout(()=>{u.value<1&&(P.value=!0)},200)},k=m(!1);return A(M,([{isIntersecting:s}])=>{k.value=s},{rootMargin:"-500px 0px 0px 0px"}),C(k,()=>{k.value&&P.value&&(u.value<t.getMoreCount?(w(),u.value=u.value+1):(P.value=!1,u.value=0))}),C(()=>t.currentPage,s=>{$("update:is-end",s===t.totalPages)},{immediate:!0}),(s,e)=>{const g=z,a=I,c=R;return o(),i("div",null,[p(B)?(o(),i("div",G,[p(q)?(o(),L(g,{key:0,ref_key:"more",ref:M,class:"mb-6 w-full",color:"gray",block:"",loading:p(b),onClick:w},{default:x(()=>[J]),_:1},8,["loading"])):v("",!0),f("div",Q,[n.currentPage>1?(o(),i("div",T,[y(c,{is:"button",onClick:e[0]||(e[0]=d=>_(n.currentPage-1))},{default:x(()=>[y(a,{name:"ri:arrow-left-line",start:"",size:"sm"}),U]),_:1}
1)])):v("",!0),f("div",H,[(o(!0),i(O,null,W(p(S),(d,V)=>(o(),i("button",{key:V,class:j(["h-10 w-10 rounded transition-all",[d===n.currentPage?"pointer-events-none bg-primary text-body-1 text-white hover:bg-primary":"hover:bg-background"]]),onClick:Z=>_(d)},D(d),11,K))),128))]),n.currentPage<n.totalPages?(o(),i("div",X,[y(c,{is:"button",onClick:e[1]||(e[1]=d=>_(n.currentPage+1))},{default:x(()=>[Y,y(a,{name:"ri:arrow-right-line",end:"",size:"sm"})]),_:1})])):v("",!0)])])):v("",!0)])}}};export{oe as default};
2//# sourceMappingURL=BrndPagination.51b8aca2.js.map

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.