Files
school2/public/assets/pagination-tpFvWhSa.js
2026-07-31 18:51:41 +08:00

10 lines
21 KiB
JavaScript

import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Et as n,Gt as r,Jt as i,N as a,Pn as o,Q as s,St as c,Ut as l,Vn as u,Wt as d,Xn as f,Zt as p,en as m,ir as h,n as g,pt as ee,qt as _,u as v,vt as y,xn as b,xt as x,yr as S,zn as C}from"./jsx-runtime-ADHq9IcL.js";import{l as te,m as w,n as T,p as E,r as D,s as O,t as ne}from"./style-Der9vtsK.js";import{t as k}from"./useBreakpoint-Dhidjsjf.js";import{t as A}from"./LeftOutlined-DolIAuof.js";import{n as j,r as re,t as ie}from"./DoubleRightOutlined-BDFzD9z5.js";import{t as ae}from"./zh_CN-BT8mdvr9.js";var M=e(t()),oe=[10,20,50,100],se=e=>{let{pageSizeOptions:t=oe,locale:n,changeSize:r,pageSize:i,goButton:a,quickGo:o,rootPrefixCls:s,disabled:c,buildOptionText:l,showSizeChanger:u,sizeChangerRender:d}=e,[f,p]=M.useState(``),m=M.useMemo(()=>!f||Number.isNaN(f)?void 0:Number(f),[f]),g=typeof l==`function`?l:e=>`${e} ${n.items_per_page}`,ee=e=>{let t=e.target.value;/^\d*$/.test(t)&&p(t)},_=e=>{a||f===``||(p(``),!(e.relatedTarget&&(e.relatedTarget.className.includes(`${s}-item-link`)||e.relatedTarget.className.includes(`${s}-item`)))&&o?.(m))},v=e=>{f!==``&&(e.keyCode===h.ENTER||e.type===`click`)&&(p(``),o?.(m))},y=()=>t.some(e=>e.toString()===i.toString())?t:t.concat([i]).sort((e,t)=>(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))),b=`${s}-options`;if(!u&&!o)return null;let x=null,S=null,C=null;return u&&d&&(x=d({disabled:c,size:i,onSizeChange:e=>{r?.(Number(e))},"aria-label":n.page_size,className:`${b}-size-changer`,options:y().map(e=>({label:g(e),value:e}))})),o&&(a&&(C=typeof a==`boolean`?M.createElement(`button`,{type:`button`,onClick:v,onKeyUp:v,disabled:c,className:`${b}-quick-jumper-button`},n.jump_to_confirm):M.createElement(`span`,{onClick:v,onKeyUp:v},a)),S=M.createElement(`div`,{className:`${b}-quick-jumper`},n.jump_to,M.createElement(`input`,{disabled:c,type:`text`,value:f,onChange:ee,onKeyUp:v,onBlur:_,"aria-label":n.page}),n.page,C)),M.createElement(`li`,{className:b},x,S)},N=e=>{let{rootPrefixCls:t,page:n,active:r,className:i,style:a,showTitle:o,onClick:s,onKeyPress:c,itemRender:l}=e,d=`${t}-item`,f=u(d,`${d}-${n}`,{[`${d}-active`]:r,[`${d}-disabled`]:!n},i),p=()=>{s(n)},m=e=>{c(e,s,n)},h=l(n,`page`,M.createElement(`a`,{rel:`nofollow`},n));return h?M.createElement(`li`,{title:o?String(n):null,className:f,style:a,onClick:p,onKeyDown:m,tabIndex:0},h):null};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(this,arguments)}var F=(e,t,n)=>n;function ce(){}function le(e){let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function I(e,t,n){let r=e===void 0?t:e;return Math.floor((n-1)/r)+1}var L=e=>{let{prefixCls:t=`rc-pagination`,selectPrefixCls:n=`rc-select`,className:r,classNames:i,styles:a,current:o,defaultCurrent:s=1,total:c=0,pageSize:l,defaultPageSize:d=10,onChange:p=ce,hideOnSinglePage:m,align:g,showPrevNextJumpers:ee=!0,showQuickJumper:_,showLessItems:v,showTitle:y=!0,onShowSizeChange:b=ce,locale:x=ae,style:C,totalBoundaryShowSizeChanger:te=50,disabled:w,simple:T,showTotal:E,showSizeChanger:D=c>te,sizeChangerRender:O,pageSizeOptions:ne,itemRender:k=F,jumpPrevIcon:A,jumpNextIcon:j,prevIcon:re,nextIcon:ie}=e,oe=M.useRef(null),[L,ue]=S(d,l),[de,fe]=S(s,o),R=Math.max(1,Math.min(de,I(void 0,L,c))),[z,B]=M.useState(R);(0,M.useEffect)(()=>{B(R)},[R]),`current`in e;let V=Math.max(1,R-(v?3:5)),H=Math.min(I(void 0,L,c),R+(v?3:5));function U(n,r){let i=n||M.createElement(`button`,{type:`button`,"aria-label":r,className:`${t}-item-link`});return typeof n==`function`&&(i=M.createElement(n,e)),i}function W(e){let t=e.target.value,n=I(void 0,L,c),r;return r=t===``?t:Number.isNaN(Number(t))?z:t>=n?n:Number(t),r}function pe(e){return le(e)&&e!==R&&le(c)&&c>0}let me=c>L&&_;function he(e){(e.keyCode===h.UP||e.keyCode===h.DOWN)&&e.preventDefault()}function ge(e){let t=W(e);switch(t!==z&&B(t),e.keyCode){case h.ENTER:G(t);break;case h.UP:G(t-1);break;case h.DOWN:G(t+1);break;default:break}}function _e(e){G(W(e))}function ve(e){let t=I(e,L,c),n=R>t&&t!==0?t:R;ue(e),B(n),b?.(R,e),fe(n),p?.(n,e)}function G(e){if(pe(e)&&!w){let t=I(void 0,L,c),n=e;return e>t?n=t:e<1&&(n=1),n!==z&&B(n),fe(n),p?.(n,L),n}return R}let K=R>1,q=R<I(void 0,L,c);function ye(){K&&G(R-1)}function be(){q&&G(R+1)}function xe(){G(V)}function Se(){G(H)}function J(e,t,...n){(e.key===`Enter`||e.charCode===h.ENTER||e.keyCode===h.ENTER)&&t(...n)}function Ce(e){J(e,ye)}function we(e){J(e,be)}function Te(e){J(e,xe)}function Ee(e){J(e,Se)}function De(e){let t=k(e,`prev`,U(re,`prev page`));return M.isValidElement(t)?M.cloneElement(t,{disabled:!K}):t}function Oe(e){let t=k(e,`next`,U(ie,`next page`));return M.isValidElement(t)?M.cloneElement(t,{disabled:!q}):t}function ke(e){(e.type===`click`||e.keyCode===h.ENTER)&&G(z)}let Ae=null,je=f(e,{aria:!0,data:!0}),Me=E&&M.createElement(`li`,{className:`${t}-total-text`},E(c,[c===0?0:(R-1)*L+1,R*L>c?c:R*L])),Ne=null,Y=I(void 0,L,c);if(m&&c<=L)return null;let X=[],Z={rootPrefixCls:t,onClick:G,onKeyPress:J,showTitle:y,itemRender:k,page:-1,className:i?.item,style:a?.item},Pe=R-1>0?R-1:0,Fe=R+1<Y?R+1:Y,Ie=_&&_.goButton,Le=typeof T==`object`?T.readOnly:!T,Re=Ie,ze=null;T&&(Ie&&(Re=typeof Ie==`boolean`?M.createElement(`button`,{type:`button`,onClick:ke,onKeyUp:ke},x.jump_to_confirm):M.createElement(`span`,{onClick:ke,onKeyUp:ke},Ie),Re=M.createElement(`li`,{title:y?`${x.jump_to}${R}/${Y}`:null,className:`${t}-simple-pager`},Re)),ze=M.createElement(`li`,{title:y?`${R}/${Y}`:null,className:u(`${t}-simple-pager`,i?.item),style:a?.item},Le?z:M.createElement(`input`,{type:`text`,"aria-label":x.jump_to,value:z,disabled:w,onKeyDown:he,onKeyUp:ge,onChange:ge,onBlur:_e,size:3}),M.createElement(`span`,{className:`${t}-slash`},`/`),Y));let Q=v?1:2;if(Y<=3+Q*2){Y||X.push(M.createElement(N,P({},Z,{key:`noPager`,page:1,className:`${t}-item-disabled`})));for(let e=1;e<=Y;e+=1)X.push(M.createElement(N,P({},Z,{key:e,page:e,active:R===e})))}else{let e=v?x.prev_3:x.prev_5,n=v?x.next_3:x.next_5,r=k(V,`jump-prev`,U(A,`prev page`)),i=k(H,`jump-next`,U(j,`next page`));ee&&(Ae=r?M.createElement(`li`,{title:y?e:null,key:`prev`,onClick:xe,tabIndex:0,onKeyDown:Te,className:u(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!A})},r):null,Ne=i?M.createElement(`li`,{title:y?n:null,key:`next`,onClick:Se,tabIndex:0,onKeyDown:Ee,className:u(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!j})},i):null);let a=Math.max(1,R-Q),o=Math.min(R+Q,Y);R-1<=Q&&(o=1+Q*2),Y-R<=Q&&(a=Y-Q*2);let s=!!Ae&&R-1>=Q*2&&R!==3,c=!!Ne&&Y-R>=Q*2&&R!==Y-2;!v&&s&&o!==Y&&(a+=1),!v&&c&&a!==1&&--o;for(let e=a;e<=o;e+=1)X.push(M.createElement(N,P({},Z,{key:e,page:e,active:R===e})));if(s&&(X[0]=M.cloneElement(X[0],{className:u(`${t}-item-after-jump-prev`,X[0].props.className)}),X.unshift(Ae)),c){let e=X[X.length-1];X[X.length-1]=M.cloneElement(e,{className:u(`${t}-item-before-jump-next`,e.props.className)}),X.push(Ne)}a!==1&&X.unshift(M.createElement(N,P({},Z,{key:1,page:1}))),o!==Y&&X.push(M.createElement(N,P({},Z,{key:Y,page:Y})))}let Be=De(Pe);if(Be){let e=!K||!Y;Be=M.createElement(`li`,{title:y?x.prev_page:null,onClick:ye,tabIndex:e?null:0,onKeyDown:Ce,className:u(`${t}-prev`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},Be)}let $=Oe(Fe);if($){let e,n;T?(e=!q,n=K?0:null):(e=!q||!Y,n=e?null:0),$=M.createElement(`li`,{title:y?x.next_page:null,onClick:be,tabIndex:n,onKeyDown:we,className:u(`${t}-next`,i?.item,{[`${t}-disabled`]:e}),style:a?.item,"aria-disabled":e},$)}let Ve=u(t,r,{[`${t}-start`]:g===`start`,[`${t}-center`]:g===`center`,[`${t}-end`]:g===`end`,[`${t}-simple`]:T,[`${t}-disabled`]:w});return M.createElement(`ul`,P({className:Ve,style:C,ref:oe},je),Me,Be,T?ze:X,$,M.createElement(se,{locale:x,rootPrefixCls:t,disabled:w,selectPrefixCls:n,changeSize:ve,pageSize:L,pageSizeOptions:ne,quickGo:me?G:null,goButton:Re,showSizeChanger:D,sizeChangerRender:O}))},ue=e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}},"&:focus-visible":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-item`]:{cursor:`not-allowed`,backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`},a:{color:e.colorTextDisabled,backgroundColor:`transparent`,border:`none`,cursor:`not-allowed`},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},[`${t}-simple&`]:{backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},de=e=>{let{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...D(e),width:e.paginationMiniQuickJumperInputWidth}}}}},fe=e=>{let{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...T(e)}}}}},R=e=>{let{componentCls:t,antCls:n}=e,[,r]=l(n,`pagination`);return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`),verticalAlign:`top`,[`${t}-item-link`]:{height:r(`item-size-actual`),backgroundColor:`transparent`,border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r(`item-size-actual`),lineHeight:r(`item-size-actual`)}}},[`${t}-simple-pager`]:{display:`inline-flex`,alignItems:`center`,height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),input:{boxSizing:`border-box`,height:`100%`,width:e.quickJumperInputWidth,padding:`0 ${o(e.paginationItemPaddingInline)}`,textAlign:`center`,backgroundColor:e.itemInputBg,border:`${o(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:`none`,transition:`border-color ${e.motionDurationMid}`,color:`inherit`,"&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${o(e.inputOutlineOffset)} 0 ${o(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:`not-allowed`}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:`transparent`}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},z=e=>{let{componentCls:t}=e,n=`${t}-options-quick-jumper input, ${t}-simple-pager input`;return{[`&${t}-filled`]:{[n]:{background:e.colorFillTertiary,borderColor:`transparent`,"&:hover":{background:e.colorFillSecondary},"&:focus":{borderColor:e.activeBorderColor,outline:0,backgroundColor:e.activeBg},"&[disabled]":{...te(e)}}},[`&${t}-borderless`]:{[n]:{background:`transparent`,border:`none`,"&:focus":{outline:`none`,boxShadow:`none`},"&[disabled]":{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-underlined`]:{[n]:{background:e.colorBgContainer,borderWidth:`${o(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${e.colorBorder} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus":{borderColor:`transparent transparent ${e.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg},"&[disabled]":{color:e.colorTextDisabled,boxShadow:`none`,cursor:`not-allowed`}}}}},B=e=>{let{componentCls:t,iconCls:n,sizeLG:r,antCls:i}=e,[,a]=l(i,`pagination`);return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:`relative`,[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:`auto`}},[`${t}-item-ellipsis`]:{position:`absolute`,inset:0,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,margin:`auto`,color:e.colorTextDisabled,textAlign:`center`,opacity:1,transition:`all ${e.motionDurationMid}`,[`${n}-ellipsis > svg`]:{width:r,height:r}}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
${t}-prev,
${t}-jump-prev,
${t}-jump-next
`]:{marginInlineEnd:a(`item-spacing-actual`)},[`
${t}-prev,
${t}-next,
${t}-jump-prev,
${t}-jump-next
`]:{display:`inline-block`,minWidth:a(`item-size-actual`),height:a(`item-size-actual`),color:e.colorText,fontFamily:e.fontFamily,lineHeight:a(`item-size-actual`),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,borderRadius:e.borderRadius,cursor:`pointer`,transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:`pointer`,userSelect:`none`},[`${t}-item-link`]:{display:`block`,width:`100%`,height:`100%`,padding:0,fontSize:e.fontSizeSM,textAlign:`center`,backgroundColor:`transparent`,border:`${o(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:`none`,transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:`transparent`}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:`inline-block`,marginInlineStart:e.margin,verticalAlign:`middle`,"&-size-changer":{width:`auto`},"&-quick-jumper":{display:`inline-block`,height:a(`item-size-actual`),marginInlineStart:e.marginXS,lineHeight:a(`item-size-actual`),verticalAlign:`baseline`,input:{...ne(e),...O(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...te(e)},width:e.quickJumperInputWidth,height:a(`item-size-actual`),boxSizing:`border-box`,margin:0,marginInlineStart:a(`item-spacing-actual`),marginInlineEnd:a(`item-spacing-actual`)}}}}},V=e=>{let{componentCls:t,antCls:n}=e,[,r]=l(n,`pagination`);return{[`${t}-item`]:{display:`inline-block`,minWidth:r(`item-size-actual`),height:r(`item-size-actual`),marginInlineEnd:r(`item-spacing-actual`),fontFamily:e.fontFamily,lineHeight:o(e.calc(r(`item-size-actual`)).sub(2).equal()),textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,backgroundColor:e.itemBg,border:`${o(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:`pointer`,userSelect:`none`,a:{display:`block`,padding:`0 ${o(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:`none`}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},H=e=>{let{componentCls:t,antCls:n}=e,[r,i]=l(n,`pagination`);return{[t]:{[r(`item-size-actual`)]:o(e.itemSize),[r(`item-spacing-actual`)]:o(e.marginXS),"&-small":{[r(`item-size-actual`)]:o(e.itemSizeSM),[r(`item-spacing-actual`)]:o(e.marginXXS)},"&-large":{[r(`item-size-actual`)]:o(e.itemSizeLG),[r(`item-spacing-actual`)]:o(e.marginSM)},...p(e),display:`flex`,alignItems:`center`,"&-start":{justifyContent:`start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`end`},"ul, ol":{margin:0,padding:0,listStyle:`none`},"&::after":{display:`block`,clear:`both`,height:0,overflow:`hidden`,visibility:`hidden`,content:`""`},[`${t}-total-text`]:{display:`inline-block`,height:i(`item-size-actual`),marginInlineEnd:i(`item-spacing-actual`),lineHeight:o(e.calc(i(`item-size-actual`)).sub(2).equal()),verticalAlign:`middle`},...V(e),...B(e),...R(e),...z(e),...de(e),...fe(e),...ue(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:`none`}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:`none`}}},[`&${e.componentCls}-rtl`]:{direction:`rtl`}}},U=e=>{let{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...i(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},..._(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:_(e)}}}},W=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...E(e)}),pe=e=>b(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:`0.13em`},w(e)),me=d(`Pagination`,e=>{let t=pe(e);return[H(t),U(t)]},W),he=e=>{let{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${o(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},ge=r([`Pagination`,`bordered`],e=>he(pe(e)),W);function _e(e){return(0,M.useMemo)(()=>typeof e==`boolean`?[e,{}]:n(e)?[!0,e]:[void 0,void 0],[e])}var ve=e=>{let{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:o,style:l,size:d,locale:f,responsive:p,showSizeChanger:h,selectComponentClass:_,pageSizeOptions:b,styles:S,classNames:te,...w}=e,{xs:T}=k(p),[,E]=m(),{getPrefixCls:D,direction:O,showSizeChanger:ne,className:ae,style:oe,classNames:se,styles:N,totalBoundaryShowSizeChanger:P}=C(`pagination`),F=D(`pagination`,n),[ce,le]=me(F),I=s(d),ue=I===`small`||!!(T&&!I&&p),[de,fe]=v(`input`),R={...e,size:I},z=c(oe),B=c(l),[V,H]=x([se,te],[N,z,S,B],{props:R}),[U]=ee(`Pagination`,y),W={...U,...f},[pe,he]=_e(h),[ve,G]=_e(ne),K=pe??ve,q=he??G,ye=_||re,be=M.useMemo(()=>b?b.map(Number):void 0,[b]),xe=e=>{let{disabled:t,size:n,onSizeChange:r,"aria-label":i,className:a,options:o}=e,{className:s,onChange:c}=q||{},l=o.find(e=>String(e.value)===String(n))?.value;return M.createElement(ye,{disabled:t,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":i,options:o,...q,value:l,onChange:(e,t)=>{r?.(e),c?.(e,t)},size:I,className:u(a,s)})},Se=M.useMemo(()=>{let e=M.createElement(`span`,{className:`${F}-item-ellipsis`},M.createElement(g,null));return{prevIcon:M.createElement(`button`,{className:`${F}-item-link`,type:`button`,tabIndex:-1},O===`rtl`?M.createElement(a,null):M.createElement(A,null)),nextIcon:M.createElement(`button`,{className:`${F}-item-link`,type:`button`,tabIndex:-1},O===`rtl`?M.createElement(A,null):M.createElement(a,null)),jumpPrevIcon:M.createElement(`a`,{className:`${F}-item-link`},M.createElement(`div`,{className:`${F}-item-container`},O===`rtl`?M.createElement(ie,{className:`${F}-item-link-icon`}):M.createElement(j,{className:`${F}-item-link-icon`}),e)),jumpNextIcon:M.createElement(`a`,{className:`${F}-item-link`},M.createElement(`div`,{className:`${F}-item-container`},O===`rtl`?M.createElement(j,{className:`${F}-item-link-icon`}):M.createElement(ie,{className:`${F}-item-link-icon`}),e))}},[O,F]),J=D(`select`,r),Ce=u({[`${F}-${t}`]:!!t,[`${F}-${I}`]:I,[`${F}-${de}`]:fe&&de!==`outlined`,[`${F}-mini`]:ue,[`${F}-rtl`]:O===`rtl`,[`${F}-bordered`]:E.wireframe},ae,i,o,V.root,ce,le),we={...H.root};return M.createElement(M.Fragment,null,E.wireframe&&M.createElement(ge,{prefixCls:F}),M.createElement(L,{...Se,...w,styles:H,classNames:V,style:we,prefixCls:F,selectPrefixCls:J,className:Ce,locale:W,pageSizeOptions:be,showSizeChanger:K,totalBoundaryShowSizeChanger:w.totalBoundaryShowSizeChanger??P,sizeChangerRender:xe}))};export{ve as t};