1import{d as R,u as T,am as A,c as h,Q as U,r as y,a4 as q,y as u,z as E,o as n,e as g,g as d,B as o,I as _,J as I,i as C,h as w,R as Q,an as z,ao as J,E as M,k as O,l as P}from"./BdQg2pRD.js";import{_ as G,a as H,b as K}from"./PReylROO.js";const W={key:0,"aria-label":"ÐагинаÑиÑ",class:"flex items-center justify-center gap-2"},X={key:1,"aria-hidden":"true",class:"flex h-11 w-11 items-center justify-center rounded-full border border-primary/10 text-primary/30"},Y={class:"flex items-center gap-2"},Z=["max","placeholder"],ee={key:1,"aria-current":"page",class:"flex h-11 w-11 items-center justify-center rounded-full border border-primary bg-primary text-white"},te={key:3,"aria-hidden":"true",class:"flex h-11 w-11 items-center justify-center rounded-full border border-primary/10 text-primary/30"},ne=R({__name:"AppPagination",props:{page:{},pageCount:{},siblingCount:{default:1},linkFor:{type:Function,default:void 0}},setup(j){const s=j,x=T(),L=A(),a=h(()=>Math.min(Math.max(1,Math.floor(s.page)),Math.max(1,s.pageCount))),B=U("(max-width: 767px)"),b=y(!1);q(()=>{b.value=!0});const F=h(()=>b.value&&B.value?Math.max(0,s.siblingCount-1):s.siblingCount),m=(t,e)=>Array.from({length:e-t+1},(l,r)=>t+r),N=h(()=>{const t=s.pageCount,e=F.value,l=e*2+5;if(t<=l)return m(1,t);const r=Math.max(a.value-e,1),f=Math.min(a.value+e,t),i=r>2,k=f<t-1;return!i&&k?[...m(1,3+2*e),"dots-right",t]:i&&!k?[1,"dots-left",...m(t-(2+2*e),t)]:[1,"dots-left",...m(r,f),"dots-right",t]}),c=t=>{if(s.linkFor)return s.linkFor(t);const e={...x.query};return t<=1?delete e.page:e.page=String(t),{path:x.path,query:e}},$=h(()=>a.value<=1),D=h(()=>a.value>=s.pageCount),v=y(null),p=y(""),S=(t,e)=>{v.value=e&&typeof t!="number"?t:null,e&&(p.value="")},V=()=>{const t=Math.floor(Number(p.value));if(!Number.isFinite(t)||t<1)return;const e=Math.min(Math.max(1,t),s.pageCount);v.value=null,p.value="",e!==a.value&&L.push(c(e))};return(t,e)=>{const l=P;return t.pageCount>1?(n(),u("nav",W,[$.value?(n(),u("span",X,e[3]||(e[3]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M10 12L6 8L10 4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):(n(),g(l,{key:0,to:c(a.value-1),"aria-label":"ÐÑедÑдÑÑÐ°Ñ ÑÑÑаниÑа",class:"flex h-11 w-11 items-center justify-center rounded-full border border-primary/20 text-primary transition-colors hover:border-primary hover:bg-primary hover:text-white"},{default:d(()=>e[2]||(e[2]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M10 12L6 8L10 4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),_:1,__:[2]},8,["to"])),(n(!0),u(_,null,I(N.value,(r,f)=>(n(),u(_,{key:typeof r=="number"?`p-${r}`:`${r}-${f}`},[r==="dots-left"||r==="dots-right"?(n(),g(w(K),{key:0,open:v.value===r,"onUpdate:open":i=>S(r,i)},{default:d(()=>[C(w(G),{"as-child":""},{default:d(()=>e[4]||(e[4]=[o("button",{type:"button","aria-label":"ÐеÑейÑи к ÑÑÑаниÑе",class:"flex h-11 w-11 items-center justify-center rounded-full text-primary/50 transition-colors hover:text-primary"}," ⦠",-1)])),_:1,__:[4]}),C(w(H),{align:"center",class:"w-auto p-3",onCloseAutoFocus:e[1]||(e[1]=i=>i.preventDefault())},{default:d(()=>[o("form",{class:"flex flex-col gap-2",onSubmit:J(V,["prevent"])},[e[6]||(e[6]=o("span",{class:"text-12 text-primary/70"},"ÐеÑейÑи на ÑÑÑаниÑÑ",-1)),o("div",Y,[Q(o("input",{"onUpdate:modelValue":e[0]||(e[0]=i=>p.value=i),type:"number",min:"1",max:t.pageCount,placeholder:`1â${t.pageCount}`,class:"h-10 w-24 rounded-md border border-primary/20 px-3 text-14 text-primary outline-none focus:border-primary"},null,8,Z),[[z,p.value]]),e[5]||(e[5]=o("button",{type:"submit","aria-label":"ÐеÑейÑи",class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-primary text-primary transition-colors hover:bg-primary hover:text-white"},[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M6 4L10 8L6 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))])],32)]),_:1})]),_:2},1032,["open","onUpdate:open"])):r===a.value?(n(),u("span",ee,M(r),1)):(n(),g(l,{key:2,to:c(r),"aria-label":`СÑÑаниÑа ${r}`,class:"flex h-11 w-11 items-center justify-center rounded-full border border-primary/20 text-primary transition-colors hover:border-primary hover:bg-primary hover:text-white"},{default:d(()=>[O(M(r),1)]),_:2},1032,["to","aria-label"]))],64))),128)),D.value?(n(),u("span",te,e[8]||(e[8]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M6 4L10 8L6 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):(n(),g(l,{key:2,to:c(a.value+1),"aria-label":"СледÑÑÑÐ°Ñ ÑÑÑаниÑа",class:"flex h-11 w-11 items-center justify-center rounded-full border border-primary/20 text-primary transition-colors hover:border-primary hover:bg-primary hover:text-white"},{default:d(()=>
1e[7]||(e[7]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M6 4L10 8L6 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),_:1,__:[7]},8,["to"]))])):E("",!0)}}});export{ne as _}; 2//# sourceMappingURL=CPSZWAeb.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.