1import{r as p,I as S,j as n,d1 as f,d2 as B,bq as g,bf as L,c as v,m as E}from"./automationAxios-iy0n8IC9.js";import{h as P}from"./index-j_4sQ1t4.js";import{I as F}from"./KeyboardShortcut-77D-Ww4s.js";const O="_container_9dowx_208",R="_content_9dowx_212",U="_actions_9dowx_227",y="_pagesActions_9dowx_228",D="_dots_9dowx_232",N="_paginationButton_9dowx_248",V="_arrowButton_9dowx_255",Z="_isActive_9dowx_255",q="_count_9dowx_276",H="_select_9dowx_282",s={container:O,content:R,actions:U,pagesActions:y,dots:D,paginationButton:N,arrowButton:V,isActive:Z,"border-small":"_border-small_9dowx_268",count:q,select:H},J=[10,25,100],K=E("{size} per page"),Q=E("{start}-{end} / {total} value","{start}-{end} / {total} values"),W=(t,e)=>e<=3?[...Array(e).keys()].map(i=>i+1):t===1?[t,t+1,t+2]:t===e?[t-2,t-1,t]:[t-1,t,t+1];function h({children:t,label:e,onClick:i,className:d,disabled:x=!1,isActive:_=!1,rounded:j=!0}){return n.jsx(F,{type:"button","aria-label":e,onClick:i,disabled:x,className:v(s.paginationButton,{[s["border-small"]]:!j,[s.isActive]:_},d),children:t})}function X({pageNumber:t,pageSize:e,totalCount:i,label:d=Q}){const{i18n:x}=p.useContext(S),_=x.translateN(...d,i,{start:(t-1)*e+1,end:Math.min(i,t*e),total:i});return n.jsx("div",{className:s.count,children:_})}function nt({setPageNumber:t,setPageSize:e,className:i,pageSizeSelectClassName:d,showSizeOptions:x=!0,pageSizeOptions:_=J,pageSizeOptionLabel:j=K,valuesCountLabel:b,...w}){const{i18n:o}=p.useContext(S),m=o.isRTL(),u=Math.max(1,w.pageSize),I=Math.max(0,w.totalCount),c=Math.max(1,Math.ceil(I/u)),a=Math.min(Math.max(1,w.pageNumber),c),C=p.useMemo(()=>{const r=W(a,c);return n.jsx("ul",{children:r.map(l=>{const A=l===a,M=A?o.translate("Current page, number {index}",{index:l}):o.translate("Go to page number {index}",{index:l});return n.jsx("li",{children:n.jsx(h,{label:M,rounded:!1,isActive:A,disabled:A,onClick:()=>t(l),children:l})},l)})})},[o,a,c,t]),T=m?f:B,k=m?B:f,z=m?g:L,G=m?L:g;return n.jsx("nav",{className:v(s.container,i),role:"navigation","aria-label":o.translate("Pagination"),children:n.jsxs("div",{className:s.content,children:[n.jsx(X,{pageNumber:a,pageSize:u,totalCount:I,label:b}),n.jsxs("div",{className:s.actions,children:[n.jsx(h,{label:o.translate("Go to the first page"),disabled:a===1,onClick:()=>t(1),className:s.arrowButton,children:n.jsx(T,{})}),n.jsx(h,{label:o.translate("Go to the previous page (number {previous})",{previous:Math.max(a-1,1)}),onClick:()=>t(a-1),disabled:a===1,className:s.arrowButton,children:n.jsx(z,{})}),n.jsxs("div",{className:s.pagesActions,children:[a-1>1&&c>3&&n.jsx("span",{className:s.dots,children:"..."}),C,a+1<c&&c>3&&n.jsx("span",{className:s.dots,children:"..."})]}),n.jsx(h,{label:o.translate("Go to the next page (number {next})",{next:a+1}),onClick:()=>t(a+1),disabled:a===c,className:s.arrowButton,children:n.jsx(G,{})}),n.jsx(h,{label:o.translate("Go to the last page"),disabled:a===c,onClick:()=>t(c),className:s.arrowButton,children:n.jsx(k,{})})]}),x&&n.jsx(P,{title:o.translate("Select page size - current size is {size}",{size:u}),"aria-label":o.translate("Select page size - current size is {size}",{size:u}),options:_.map(r=>({value:r.toString(),label:o.translate(j,{size:r})})),value:u.toString(),className:v(s.select,d),onChange:r=>{t(1),e(parseInt(r,10))}})]})})}export{nt as P};
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.