PageSourceSearch

https://dulevo.ru/_nuxt/lYrjmKos.js

js dulevo.ru collected 2026-09-24 20:51:07 UTC 3,769 bytes, 1 lines download raw bytes

1import{_ as A,r as $,W as B,R as L,X as _,w as I}from"./l100NPYh.js";import{m as q,A as P,a0 as N,u as k,P as h,V as u,W as b,$ as C,a3 as F,_ as R,d as f,n as S}from"./Cw9TeQPW.js";const T={key:0,class:"_Pagination flex"},D=["disabled"],M=["onClick"],E=["disabled"],W={__name:"SharedPaginationNormal",props:["currentPage","totalPages","containerIdToScroll"],setup(c){const e=c,p=$(),m=B(),l=q(()=>{const t=[];if(t.push(1),e.totalPages<=7)for(let a=2;a<e.totalPages;a++)t.push(a);else{const a=Math.max(2,e.currentPage-2),i=Math.min(e.totalPages-1,e.currentPage+2);if(e.currentPage<5){for(let o=2;o<=5;o++)t.push(o);t.push("...")}else if(e.currentPage>=5&&e.currentPage<=e.totalPages-4){t.push("...");for(let o=a;o<=i;o++)t.push(o);t.push("...")}else{t.push("...");for(let o=e.totalPages-4;o<e.totalPages;o++)t.push(o)}}return e.totalPages>1&&t.push(e.totalPages),t.slice(0,7)}),r=t=>{if(t!=="..."&&t>0&&t<=e.totalPages){if(e.containerIdToScroll){const n=document.getElementById(e.containerIdToScroll);if(n){const a=n.getBoundingClientRect().top+window.scrollY-140;window.scrollTo({top:a,behavior:"smooth"})}}else window.scrollTo({top:0,behavior:"smooth"});m.push({query:{...p.query,page:t}})}};return(t,n)=>k(l)?.length>1?(h(),P("div",T,[u("button",{type:"button",class:b(["_Pagination-Item flex rounded-6 background-white",`${e.currentPage===1?"disabled":""}`]),disabled:e.currentPage===1,onClick:n[0]||(n[0]=a=>r(e.currentPage-1))},[...n[2]||(n[2]=[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",viewBox:"0 0 6 8",fill:"none"},[u("path",{d:"M5.07016 7.54503L0.000156343 4.09503V3.45003L5.07016 2.84314e-05V1.39503L1.45516 3.76503L5.07016 6.15003V7.54503Z",fill:"#2A70B5"})],-1)])],10,D),(h(!0),P(C,null,F(k(l),(a,i)=>(h(),P("button",{key:i,class:b(["_Pagination-Item flex text-16 rounded-6",`${a===e.currentPage?"active text-white background-blue-dark":"text-blue background-white"} ${a==="..."?"disabled":""}`]),onClick:o=>r(a)},R(a),11,M))),128)),u("button",{type:"button",class:b(["_Pagination-Item flex rounded-6 background-white",`${e.currentPage===e.totalPages?"disabled":""}`]),disabled:e.currentPage===e.totalPages,onClick:n[1]||(n[1]=a=>r(e.currentPage+1))},[...n[3]||(n[3]=[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",viewBox:"0 0 6 8",fill:"none"},[u("path",{d:"M0.000156343 7.54503V6.15003L3.61516 3.76503L0.000156343 1.39503V2.84314e-05L5.07016 3.45003V4.09503L0.000156343 7.54503Z",fill:"#2A70B5"})],-1)])],10,E)])):N("",!0)}},Q=A(W,[["__scopeId","data-v-c9fb2896"]]),X=async(c,{onMeta:e,getItems:p,getTotal:m}={})=>{const l=$(),r={...c,pagination:{limit:60,page:1,disabled:!1,...c?.pagination||{}},params:{...c?.params||{}}},t=f([]),n=f(!1),a=f(null),i=f({page:Number(l.query?.page)||r.pagination?.page||1,limit:Number(l.query?.limit)||r.pagination?.limit||60,total:0}),o=()=>{const s={..._.parse(l.query),...r.params||{}};return s._refresh&&(s._refresh=null),r?.pagination?.disabled||(s.limit=i.value.limit,s.page=i.value.page),_.stringify(s,{arrayFormat:"brackets"})},v=s=>{if(!s)return;a.value=null;const g=typeof p=="function"?p(s):s?.data;if(t.value=Array.isArray(g)?g:g??[],typeof m=="function"){const d=m(s);if(typeof d<"u"){const x=Number(d);i.value.total=Number.isFinite(x)?x:0}}else{const d=s?.meta?.pagination?.total;typeof d<"u"&&(i.value.total=Number(d)*i.value.limit||0)}e&&e(s.meta||{})},w=async()=>{n.value=!0,a.value=null;try{const s=await I(`${r.url}?${o()}`);v(s)}catch(s){a.value=s}finally{n.value=!1}},{data:y}=await L(`${r.url}?${o()}`,{server:!0}),V=!!y?.value;return v(y?.value),S(()=>l.query,s=>{if(!r?.pagination?.disabled){const g=parseInt(s.page,10)||1;i.value.page=g}w()},{immediate:!V}),{items:t,pagination:i,loading:n,error:a,fetchData:w,buildQueryParams:o}};export{Q as P,X as u};

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.