import{j as t,e as X,k as we,am as rt,V as lt,an as ct,U as dt,a0 as ut,R as xt,b as be,g as fe,c as J}from"./main-5057ff34.js";import{r as g,R as mt}from"./chunk-react-162a731f.js";import{c as O}from"./chunk-index-89b7ba38.js";import{S as Se}from"./chunk-index-a7d53221.js";import{m as v,aa as ht,ad as pt,s as te,ak as gt,G as d,$ as bt,a0 as ft,B as A,ab as _e,i as jt,al as kt,am as yt,o as I,e as W,f as E,q as ee,an as Re,ao as Ct,I as Fe,a6 as Ie,t as vt,E as wt,ap as St,u as _t,af as Rt,aq as Te,ar as Ft,as as It,at as Tt,au as Be,av as Bt,aw as Pt,ax as At,H as je,ay as zt,l as Et,J as Wt,M as $t,az as Lt}from"./chunk-material-ui-eb5bb5f8.js";import{i as Mt}from"./chunk-generateUtilityClasses-54aa0b46.js";import{r as Ot}from"./chunk-createSvgIcon-76c2431e.js";import{T as Xt}from"./chunk-index-827e676e.js";import{D as Pe}from"./chunk-index-a1788cfb.js";import{P as Ht,a as Nt,b as Ut}from"./chunk-index-e791da15.js";import{_ as Gt}from"./chunk-index-4b8e5f08.js";import{S as qt,N as Qt}from"./chunk-effect-fade-17bfa8f3.js";import{B as Zt}from"./chunk-index-69f914a0.js";import{s as Dt,T as Kt}from"./chunk-pagination-780a19ab.js";const Vt=g.createContext(void 0),Jt=({items:e,children:s})=>{const[n,o]=g.useState(e);return g.useEffect(()=>{e&&o(e)},[e]),t.jsx(Vt.Provider,{value:n,children:s})},Yt=v(e=>({selectRoot:{lineHeight:e.typography.pxToRem(24)},inputRoot:{color:e.color.black100},inputInput:{paddingTop:0,paddingBottom:0},icon:{fontSize:e.typography.pxToRem(22),color:e.color.black100},selectMenu:{border:"0.5px solid #F0F3F6",boxShadow:"0px 16px 24px rgba(0, 0, 0, 0.06), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04)",borderRadius:4}}),{name:"Select"});function es(e){const s=Yt();return t.jsx(ht,{...e,classes:{icon:s.icon,root:s.selectRoot},input:e.variant==="standard"?t.jsx(pt,{classes:{root:s.inputRoot,input:s.inputInput}}):t.jsx(te,{}),MenuProps:{PopoverClasses:{paper:O([e.variant==="standard"&&s.selectMenu])},classes:{}},IconComponent:gt,children:e.children})}const Ae=v(e=>({tabPanelRoot:{height:200,minWidth:395,"@media (max-width: 1280px)":{minWidth:"100%"},"@media (max-width: 960px)":{height:"100%"},"@media (min-width: 375px) and (max-width: 768px)":{height:"94%"},"@media (max-width: 375px)":{height:"92%"}},tabSizesWrapper:{position:"relative","@media (max-width: 960px)":{height:"100%",paddingBlock:20,paddingInlineStart:20},"@media (min-width: 375px) and (max-width: 768px)":{height:"96%"},"@media (max-width: 375px)":{height:"92%"}},tabsRoot:{minHeight:24,paddingBottom:16,"margin-inline-end":16},tabBtn:{color:e.color.black100,maxWidth:"unset",minWidth:40,padding:0,minHeight:24,lineHeight:"14px",textTransform:"unset","&:not(:last-child)":{paddingRight:16}},sizeBtn:{minWidth:71,minHeight:32,color:e.color.black100,borderRadius:10,"@media (max-width: 1280px)":{minWidth:65}},sizeBtnOutlined:{borderColor:e.color.black40,"&:hover":{borderColor:e.color.black100}},sizeBtnChecked:{borderColor:e.color.black100},sizeBtnDisabled:{opacity:.5},selectMenuItem:{backgroundColor:"#F0F3F6"},selectBtn:{textTransform:"uppercase",padding:0,minWidth:"max-content",lineHeight:"24px"},filterSizeContainer:{padding:2},scrollVerticalTrack:{borderRadius:100,backgroundColor:"#8F9BA4"},tabPanel:{display:"flex","flex-wrap":"wrap","justify-content":"space-between"}}),{name:"FilterSizes"}),ts=({children:e,value:s,index:n})=>{const o=Ae();return s!==n?null:t.jsx(A,{className:o.tabPanelRoot,children:e})},ss=({values:e,onChange:s})=>{const n=Ae(),[o,r]=g.useState(0),[a,l]=g.useState(""),i=c=>{c.target.value&&l(c.target.value)};g.useEffect(()=>{var c,p,m;Array.isArray(e)&&e.length&&Array.isArray((c=e[0])==null?void 0:c.sections)&&(p=e[0])!=null&&p.sections.length&&l((m=e[0])==null?void 0:m.sections[0].title)},[]);const x=c=>{const p=e[o],m={...p,sections:p.sections.map(u=>u.code===c.code?{...c}:{...u})};s(o,m)};return t.jsx(d,{container:!0,classes:{root:n.tabSizesWrapper},children:t.jsxs(d,{item:!0,xs:12,children:[t.jsxs("div",{className:n.tabPanel,children:[t.jsx(bt,{value:o,onChange:(c,p)=>r(p),TabIndicatorProps:{style:{display:"none"}},classes:{root:n.tabsRoot},"aria-label":"sizes-tabs",children:e&&Object.values(e).map((c,p)=>t.jsx(ft,{classes:{root:n.tabBtn},onClick:()=>{l(Object.values(e)[p].sections[0].title)},label:c.tab_title},c.tab_title))}),Object.values(e)[o].sections.length>1&&t.jsx(A,{children:t.jsx(es,{labelId:`select-${a}`,id:`select-${a}`,value:a,variant:"standard",onChange:i,children:Object.values(e)[o].sections.map((c,p)=>t.jsx(_e,{value:c.title,children:c.title},p))})})]}),Object.values(e)[o].sections.filter(c=>c.title===a).map((c,p)=>{const m=(u,f)=>{const _={...c,items:c.items.map((w,P)=>P===u?{...f}:{...w})};x(_)};return t.jsx(ts,{value:p,index:p,children:t.jsx(Se,{customStyles:{thumbVertical:n.scrollVerticalTrack},children:t.jsx(d,{container:!0,item:!0,style:{paddingRight:10},children:c.items.map((u,f)=>t.jsx(d,{item:!0,xs:"auto",classes:{root:n.filterSizeContainer},children:t.jsx(jt,{classes:{root:O(n.sizeBtn,{[n.sizeBtnDisabled]:u.is_disabled}),outlined:O(n.sizeBtnOutlined,{[n.sizeBtnChecked]:u.is_checked})},clickable:!u.is_disabled,onClick:()=>{u.is_disabled||m(f,{...u,is_checked:!u.is_checked})},label:u.title,variant:"outlined"})},u.value))})})},p)})]})})};var se={},ns=Mt;Object.defineProperty(se,"__esModule",{value:!0});var ze=se.default=void 0,os=ns(Ot()),is=t;ze=se.default=(0,os.default)((0,is.jsx)("path",{d:"M13.5 3H7v9H5v2h2v2H5v2h2v3h2v-3h4v-2H9v-2h4.5c3.04 0 5.5-2.46 5.5-5.5S16.54 3 13.5 3m0 9H9V5h4.5C15.43 5 17 6.57 17 8.5S15.43 12 13.5 12"}),"CurrencyRuble");const as=v(e=>({formRoot:{"& > *":{margin:e.spacing(1)}},inputRoot:{fontFamily:"TTFirsNeue-Light, sans-serif",width:156,height:40,border:"1px solid #E0E3E6",color:e.color.black100,borderRadius:"8px","&:first-child":{marginRight:"6px"},"&:last-child":{marginLeft:"6px"},"& ::-webkit-clear-button, & ::-webkit-outer-spin-button, & ::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"& input[type=number]":{"-webkit-appearance":"textfield"},"& svg":{fontSize:14,height:15,paddingBlockStart:"10px",paddingBlockEnd:"11px",paddingInlineEnd:"2px"},"& :nth-last-child(1):nth-child(2)":{paddingRight:10}},inputUnderline:{"&:after":{display:"none"},"&:before":{display:"none"}},inputBase:{textAlign:"right",paddingRight:"2px",padding:"10px 0px","&::placeholder":{fontSize:"14px",color:"#3A474E"}},inputAdornment:{marginLeft:"12px","& > .MuiTypography-colorTextSecondary":{color:"#8F9BA4",fontSize:"14px",textTransform:"lowercase"}},sliderRoot:{width:320,"@media (min-width: 390px) and (max-width: 960px)":{width:"80%;"}},sliderThumb:{"&:hover, &:active":{boxShadow:"none"},width:"16px",height:"16px",border:"1.25px solid #3A474E",backgroundColor:"#fff",marginTop:"-8px",marginLeft:"-8px"},sliderRail:{height:"1px",opacity:"unset",backgroundColor:"#D8DBE3"},sliderTrack:{height:"1px"},boxSlider:{display:"flex",justifyContent:"center",paddingBottom:"32px",height:"100%"},inputBox:{display:"flex",justifyContent:"center",marginBlockStart:36}})),rs=({title:e,values:s,onChange:n})=>{const o=as(),r=(a,l)=>{const i=s.findIndex(x=>!l.includes(x.value));n(i,{...s[i],value:l[i]})};return t.jsxs(t.Fragment,{children:[t.jsx(A,{paddingBottom:3,classes:{root:o.inputBox},children:s.map((a,l)=>t.jsx(te,{classes:{root:o.inputRoot,input:o.inputBase,underline:o.inputUnderline},onChange:i=>{n(l,{...a,value:Number(i.target.value)})},value:a.value,startAdornment:t.jsx(kt,{classes:{root:o.inputAdornment},position:"start",children:a.title}),endAdornment:e==="Цена"&&t.jsx(ze,{}),inputProps:{"aria-label":a.title,type:"string"}},a.alias))}),t.jsx(A,{className:o.boxSlider,children:t.jsx(yt,{value:s.map(({value:a})=>a),classes:{thumb:o.sliderThumb,rail:o.sliderRail,track:o.sliderTrack,root:o.sliderRoot},min:s[0]["min-value"],max:s[1]["max-value"],onChange:r,valueLabelDisplay:"off","aria-labelledby":"price-slider"})})]})},ls=v(e=>({skeletonRoot:{backgroundColor:"#F0F3F6",width:120,height:"32px"},skeletonText:{transform:"scale(1, 1)"},skeletonWave:{"&:after":{background:"#E0E3E6"}}}));function cs(){const e=ls();return t.jsxs(d,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",spacing:1,children:[t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:"auto",children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:"auto",children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:"auto",children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})})]})}const ds=v(e=>({headerContainer:{paddingBottom:16},selectFilters:{color:e.color.black60,fontSize:e.typography.pxToRem(14),lineHeight:e.typography.pxToRem(24)},clearFilters:{fontSize:"14px",padding:0,alignItems:"flex-end",textTransform:"none","&:hover, &:active":{backgroundColor:"unset"}}})),us=({filtersCheckedCount:e,filterCode:s,onClearFilter:n})=>{const o=ds();return t.jsxs(d,{container:!0,spacing:2,alignItems:"center",justifyContent:"space-between",classes:{root:o.headerContainer},children:[t.jsx(d,{item:!0,xl:"auto",lg:"auto",md:"auto",sm:"auto",xs:"auto",children:t.jsx(A,{children:t.jsxs(W,{variant:"body1",classes:{root:o.selectFilters},children:["фильтры: ",e]})})}),t.jsx(d,{item:!0,xs:"auto",children:t.jsx(E,{fullWidth:!0,color:"primary",classes:{root:o.clearFilters},onClick:n,children:"очистить"})})]})},xs=v(e=>({buttonApply:{boxShadow:"none",width:"100%",borderTopRightRadius:0,borderTopLeftRadius:0,borderRadius:6,height:"48px",textTransform:"none",zIndex:100,"&:hover, &:active":{boxShadow:"none"},"@media (max-width: 1280px)":{borderRadius:16},"@media (hover: none)":{"&:hover":{"background-color":"#5D6871"}}}}),{name:"FilterApply"}),ne=e=>{const s=xs();return t.jsx(E,{...e,fullWidth:!0,variant:"contained",color:"default",classes:{root:s.buttonApply},children:e.children})},ms=v(e=>({buttonRoot:{borderRadius:10,height:32,paddingRight:25,paddingLeft:0,paddingTop:5,paddingBottom:5},buttonRootChecked:{position:"relative",backgroundColor:"#F0F3F6",borderRadius:10,marginRight:25,height:32,padding:"4px 11px","&:hover":{backgroundColor:"#F0F3F6"}},iconSizeMedium:{"& > *:first-child":{fontSize:16}},popoverPaper:{color:"#3A474E",boxShadow:"0px 16px 24px rgba(0, 0, 0, 0.06), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04)",borderRadius:6,border:"0.5px solid #F0F3F6",minWidth:250,maxWidth:420},iconButton:{padding:0,"&:hover":{background:"none"}},iconSvgRoot:{color:"#3A474E",fontSize:"0.750em"},countText:{paddingLeft:5},filterContentBlock:{paddingInline:16,paddingBlockEnd:54,paddingBlockStart:16}}),{name:"FilterContent"}),ke={default:e=>Object.values(e.values).filter(({is_checked:s})=>s).length,SIZE:e=>e.values.map(({sections:s})=>s).flat().map(({items:s})=>s).flat().filter(({is_checked:s})=>s).length},hs=({buttonText:e,disabled:s,filterChecked:n,filterHeaderText:o,onClick:r,filterCode:a,children:l,headerContent:i,page:x,onApply:c,onClear:p,props:m})=>{const u=ms(),[f,_]=g.useState(null),w=g.useRef(null),P=()=>{_(w.current),r(a)},S=()=>{_(null)},j=(...R)=>{c(...R),S()};return s?t.jsx(E,{disabled:s,classes:{root:u.buttonRoot},variant:"text",color:"default",children:e}):t.jsxs(t.Fragment,{children:[t.jsx(E,{ref:w,classes:{root:n?u.buttonRootChecked:u.buttonRoot,iconSizeMedium:u.iconSizeMedium},variant:"text",onClick:()=>{P()},color:"default",endIcon:n?t.jsx(ee,{onClick:R=>{R.stopPropagation(),p()}}):t.jsx(Re,{}),children:t.jsx(W,{children:e})}),t.jsxs(Ct,{id:a,open:!!f,anchorEl:f,onClose:S,anchorOrigin:{vertical:n?"top":0,horizontal:n?"left":-12},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:u.popoverPaper},children:[t.jsxs(A,{paddingLeft:"11px",paddingRight:"11px",height:30,display:"flex",alignItems:"center",justifyContent:"space-between",children:[t.jsx(W,{variant:"body2",color:"primary",children:o||"Фильтр"}),t.jsx(Fe,{"aria-label":"closeFilter",size:"small",onClick:S,classes:{root:u.iconButton},children:t.jsx(ee,{classes:{root:u.iconSvgRoot}})})]}),t.jsx(Ie,{}),t.jsxs(A,{className:u.filterContentBlock,children:[t.jsx(us,{filtersCheckedCount:(ke[m.code]||ke.default)(m),filterCode:a,onClearFilter:p}),l]}),t.jsx(ne,{onClick:j,children:"Применить"})]})]})},ps=v(e=>({controlLabelRoot:{margin:0,alignItems:"start","&:not(:last-child)":{paddingBottom:"8px"}},disabled:{opacity:.5}}),{name:"FilterItem"}),gs=({title:e,value:s,checked:n,onClick:o,image:r,isDisabled:a,...l})=>{const i=ps();return t.jsx(vt,{classes:{root:O(i.controlLabelRoot,{[i.disabled]:a})},control:t.jsxs(t.Fragment,{children:[t.jsx(wt,{name:s,checked:n,onChange:o,color:"primary",disabled:a}),r&&t.jsx(A,{style:{width:20,height:20,background:`url(${r}) no-repeat #F0F3F6`,marginRight:5,borderRadius:5}})]}),label:e,labelPlacement:"end",...l})},bs=v(e=>({container:{height:200,"@media (max-width: 960px)":{height:"100%",paddingInline:18,"padding-block":"10px 0"}},inpSearch:{width:"100%",borderRadius:8,marginBlockEnd:16,"& input":{paddingBlock:8,paddingInline:24}},scrollVerticalTrack:{borderRadius:100,backgroundColor:"#8F9BA4"},childsBlock:{"@media(min-width: 281px) and (max-width: 960px)":{paddingInlineStart:12}},childsList:{marginBlock:10,paddingInlineStart:3,paddingInlineEnd:9},FormGroupBlock:{"@media(max-width: 960px)":{marginBlockEnd:46}}}),{name:"DefaultFilterContent"}),fs=({values:e,onChange:s})=>{const n=bs(),[o,r]=g.useState(""),a=o.toLowerCase();return t.jsxs(A,{className:n.container,children:[t.jsx(te,{classes:{underline:n.inpSearch},placeholder:"Поиск",value:o,onChange:l=>r(l.target.value)}),t.jsx(Se,{customStyles:{thumbVertical:n.scrollVerticalTrack},children:t.jsx(St,{"aria-label":"position",className:n.FormGroupBlock,children:e.map((l,i)=>t.jsx(gs,{hidden:!l.title.toLowerCase().startsWith(a),title:l.title,image:l.image,checked:l.is_checked,isDisabled:l.is_disabled,onClick:()=>s(i,{...l,is_checked:!l.is_checked}),value:l.value.toString()},l.value))})})]})},Ee=({filterCode:e,props:s,onChange:n})=>s.type==="slider"?t.jsx(rs,{...s,onChange:n}):e==="SIZE"?t.jsx(ss,{...s,onChange:n}):t.jsx(fs,{...s,onChange:n}),js=({headerContent:e,page:s,actualFilters:n,onChange:o,onClearFilter:r,onApply:a})=>{const[l,i]=g.useState(void 0);return n?t.jsx(t.Fragment,{children:n.map(x=>t.jsx(d,{item:!0,xs:"auto",children:t.jsx(hs,{buttonText:x.title,filterChecked:x.is_filtred,disabled:x.is_disabled,filterHeaderText:x.title,filterCode:x.code,onClick:c=>i(c),headerContent:e,page:s,onApply:a,onClear:()=>r(x.code),props:x,children:l&&t.jsx(Ee,{filterCode:l,props:x,onChange:(c,p)=>o(x.code,c,p)})})},x.code))}):t.jsx(cs,{})},ks=v(e=>({menuItemRoot:{borderRadius:12,"&:hover":{backgroundColor:"#F0F3F6"},"&:focus":{backgroundColor:"#F0F3F6"}},menuItemRootMobile:{"&:hover":{backgroundColor:"unset"},"&:focus":{backgroundColor:"unset"}},menuItemGutters:{paddingLeft:8,paddingRight:8},listItemText:{display:"flex",alignItems:"center",justifyContent:"space-between",margin:0}}),{name:"SortItem"});function We({title:e,...s}){const n=ks(),o=_t("(max-width: 1280px)");return t.jsx(_e,{...s,classes:{root:O([n.menuItemRoot,o&&n.menuItemRootMobile]),gutters:n.menuItemGutters},children:t.jsx(Rt,{classes:{root:n.listItemText},disableTypography:!0,children:e})})}const ys=v(e=>({popperRoot:{zIndex:e.zIndex.modal},menuBtnRoot:{padding:0,"&:hover":{backgroundColor:"unset"},"& .MuiButton-startIcon":{marginLeft:-1}},paperRoot:{minWidth:210,border:"1px solid rgba(0, 16, 61, 0.16)"},menuListPadding:{padding:8},endIcon:{transform:"rotate(0deg)",transition:e.transitions.create("all",{duration:150,easing:"cubic-bezier(0.4, 0, 0.2, 1)",delay:0})},endIconOpen:{transform:"rotate(180deg)"}}),{name:"Dropdown"}),Cs=({items:e})=>{const s=ys(),[n,o]=g.useState(!1),r=mt.useRef(null),a=X(),l=()=>{o(m=>!m)},i=m=>{r.current&&r.current.contains(m.target)||o(!1)};function x(m){m.key==="Tab"&&(m.preventDefault(),o(!1))}const c=(m,u)=>{i(m);const f=new URL(location.href);f.searchParams.set("sort",u.code),a(f.pathname+f.search)};if(!e)return null;const p=Object.values(e).filter(m=>m.is_active)[0];return t.jsxs(t.Fragment,{children:[t.jsx(E,{ref:r,"aria-controls":n?"menu-list-sort":void 0,"aria-haspopup":"true",onClick:l,classes:{root:s.menuBtnRoot,endIcon:O([s.endIcon,n&&s.endIconOpen])},endIcon:t.jsx(Re,{}),startIcon:t.jsx(Te,{}),children:t.jsx(W,{color:"primary",variant:"body1",children:p.title})}),t.jsx(Ft,{modifiers:{offset:{enabled:!0,offset:"0, 8px"}},open:n,anchorEl:r.current,role:void 0,transition:!0,placement:"bottom-start",className:s.popperRoot,disablePortal:!0,children:({TransitionProps:m,placement:u})=>t.jsx(It,{...m,style:{transformOrigin:"left top"},children:t.jsx(Xt,{classes:{root:s.paperRoot},children:t.jsx(Tt,{onClickAway:i,children:t.jsx(Be,{id:"menu-list-sort",classes:{padding:s.menuListPadding},onKeyDown:x,children:Object.values(e).map(f=>t.jsx(We,{...f,button:!0,onClick:_=>c(_,f)},f.code))})})})})})]})},vs=v(e=>({buttonRoot:{justifyContent:"flex-start",border:"1px solid #E0E0E0",borderRadius:"10px",fontSize:"0.875rem",lineHeight:"20px",padding:"10px 16px"},sortHeader:{minHeight:64,backgroundColor:"#F0F3F6"},sortHeaderText:{fontSize:e.typography.pxToRem(18)},menuItemRoot:{padding:16,borderBottom:"1px solid #EFF2F4"},listSvgRoot:{minWidth:"unset"},sortItem:{padding:9}}),{name:"SortMobile"});function ws({items:e}){const s=vs(),[n,o]=g.useState(!1),r=X(),a=we(i=>{var x;return(x=i.catalogPageSlice)==null?void 0:x.selectedFilters});if(!e)return null;const l=(i,x)=>{o(!1),r(rt({...a,sort:{values:[x.code]}}))};return t.jsxs(d,{item:!0,xs:6,children:[t.jsx(E,{fullWidth:!0,startIcon:t.jsx(Te,{}),onClick:()=>o(i=>!i),variant:"outlined",color:"default",classes:{root:s.buttonRoot},children:"Сортировка"}),t.jsxs(Pe,{isWrapped:!1,open:n,onClose:()=>o(i=>!i),handlerCloseIcon:()=>o(i=>!i),showCloseIcon:!0,closeIconPosition:"left",anchor:"right",children:[t.jsx(d,{container:!0,item:!0,alignItems:"center",justifyContent:"center",classes:{root:s.sortHeader},children:t.jsx(d,{item:!0,xs:"auto",children:t.jsx(W,{classes:{root:s.sortHeaderText},children:"Сортировка"})})}),t.jsx(d,{item:!0,xs:12,classes:{root:s.sortItem},children:t.jsx(Be,{disablePadding:!0,children:Object.values(e).map((i,x)=>t.jsx(We,{isActive:i.is_active,button:!0,onClick:c=>l(c,i),title:i.title},x))})})]})]})}const Ss=v(e=>({menuItem:{padding:"0 16px",display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:56,height:"100%"},menuItemIcon:{fontSize:e.typography.pxToRem(12),"& > *:first-child":{fontSize:e.typography.pxToRem(12)}},sortHeader:{minHeight:64,backgroundColor:"#F0F3F6"},sortHeaderText:{textAlign:"center",fontSize:e.typography.pxToRem(18)},clearContainer:{position:"absolute",right:20,top:23,zIndex:e.zIndex.modal},clearFilters:{fontSize:e.typography.pxToRem(14),lineHeight:e.typography.pxToRem(20),padding:0,textTransform:"none","&:hover, &:active":{backgroundColor:"unset"}},filterApplyBox:{display:"flex",justifyContent:"start",flexDirection:"column",position:"relative",height:"100%",padding:0,"@media (max-width: 280px)":{marginInline:15}},filterApplyButtonWrapper:{padding:"16px"}}),{name:"FilterContentMobile"}),_s=({buttonText:e,disabled:s,filterHeaderText:n,onClick:o,filterCode:r,children:a,onClear:l})=>{const i=Ss(),[x,c]=g.useState(!1),p=()=>{c(m=>!m),o(r)};return t.jsxs(t.Fragment,{children:[t.jsx(E,{disabled:s,classes:{root:i.menuItem,iconSizeMedium:i.menuItemIcon},color:"default",variant:"text",fullWidth:!0,endIcon:t.jsx(Bt,{}),onClick:p,children:t.jsx(W,{children:e})}),t.jsxs(Pe,{isWrapped:!1,open:x,onClose:()=>c(m=>!m),handlerCloseIcon:()=>c(m=>!m),closeIconPosition:"left",anchor:"right",IconComponent:t.jsx(Pt,{}),showCloseIcon:!0,children:[t.jsxs(d,{container:!0,item:!0,alignItems:"center",justifyContent:"center",classes:{root:i.sortHeader},children:[t.jsx(d,{item:!0,sm:"auto",xs:"auto",children:t.jsx(W,{classes:{root:i.sortHeaderText},children:n||"Фильтр"})}),t.jsx(d,{item:!0,classes:{root:i.clearContainer},children:t.jsx(E,{fullWidth:!0,color:"primary",classes:{root:i.clearFilters},onClick:l,children:"очистить"})})]}),t.jsx(Ie,{}),t.jsxs(A,{paddingTop:2,className:i.filterApplyBox,children:[a,t.jsx("div",{className:i.filterApplyButtonWrapper,children:t.jsx(ne,{onClick:()=>{c(!1)},children:"Готово"})})]})]})]})},Rs=v(e=>({headerContainer:{minHeight:64,backgroundColor:"#F0F3F6"},headerText:{fontSize:e.typography.pxToRem(18),lineHeight:e.typography.pxToRem(18)}}),{name:"DrawerHeader"});function Fs({title:e}){const s=Rs();return t.jsx(d,{container:!0,item:!0,alignItems:"center",justifyContent:"center",classes:{root:s.headerContainer},children:t.jsx(d,{item:!0,xs:"auto",children:t.jsx(W,{classes:{root:s.headerText},children:e})})})}const Is=v(e=>({buttonRoot:{justifyContent:"flex-start",border:"1px solid #E0E0E0",borderRadius:"10px",fontSize:"0.875rem",lineHeight:"20px",padding:"10px 16px"},filterContainer:{"flex-grow":1,overflow:"auto","@media (max-width: 390px)":{overflow:"scroll"}},filterItem:{borderBottom:"1px solid #E0E0E0"},filterApplyBox:{padding:"16px",position:"sticky",bottom:0,background:"white"},filterDrawer:{},mobileModalDrawer:{position:"fixed",top:0,left:0,right:0,bottom:0,"z-index":1300,display:"flex","flex-direction":"column",background:"white"},closeButton:{position:"absolute",top:24,left:24,padding:0}}),{name:"MobileFilter"}),Ts=({actualFilters:e=[],onChange:s,onClearFilter:n,onApply:o})=>{const r=Is(),[a,l]=g.useState(),[i,x]=g.useState(!1),c=()=>{document.body.style.overflow="",x(!1)},p=()=>{document.body.style.overflow="hidden",x(!0)},m=()=>{c(),o()};return t.jsxs(d,{item:!0,xs:6,children:[t.jsx(E,{startIcon:t.jsx(At,{}),onClick:p,fullWidth:!0,classes:{root:r.buttonRoot},children:"Фильтр"}),i&&t.jsxs("div",{className:r.mobileModalDrawer,children:[t.jsx(Fe,{classes:{root:r.closeButton},onClick:c,children:t.jsx(ee,{})}),t.jsx(Fs,{title:"Фильтр"}),t.jsx(d,{container:!0,classes:{root:r.filterContainer},children:e.map(u=>t.jsx(d,{item:!0,xs:12,classes:{root:r.filterItem},children:t.jsx(_s,{buttonText:u.title,filterChecked:u.is_filtred,disabled:u.is_disabled,filterHeaderText:u.title,filterCode:u.code,onClick:f=>l(f),onClear:()=>n(u.code),children:a&&t.jsx(Ee,{filterCode:a,props:u,onChange:(f,_)=>s(u.code,f,_)})})},u.code))}),t.jsx(A,{padding:"0 16px",className:r.filterApplyBox,children:t.jsx(ne,{onClick:m,children:"Применить"})})]})]})},Y=["ONE SIZE","XXS","XXS/XS","XS","XS/S","S","S/M","M","M/L","L","L/XL","XL","XL/XXL","XXL","XXL/XXXL","XXXL","XXXXL","XXXXXL","3XS","2XS","2XL","3XL","4XL","5XL","WS","WM"],ye=[{test:({title:e})=>Y.includes(e),sort:(e,s)=>Y.indexOf(e.title)-Y.indexOf(s.title)},{test:({title:e})=>e.startsWith("l"),sort:(e,s)=>e.title.replace("l","")-s.title.replace("l","")},{test:({title:e})=>!isNaN(+e),sort:(e,s)=>+e.title-+s.title},{test:({title:e})=>/^\d+\/\d+$/.test(e),sort:(e,s)=>parseInt(e.title)-parseInt(s.title)}];function Bs(e){try{const s=ye.flatMap(o=>e.filter(r=>o.test(r)).sort(o.sort)),n=e.filter(o=>!ye.find(r=>r.test(o)));return[...s,...n]}catch{return e}}function Ce(e=[]){return e.map(s=>s.code==="SIZE"?{...s,values:s.values.map(n=>({...n,sections:n.sections.map(o=>({...o,items:Bs(o.items).sort((r,a)=>Number(r.is_disabled)-Number(a.is_disabled))}))}))}:{...s,values:Object.values(s.values).sort((n,o)=>Number(n.is_disabled)-Number(o.is_disabled))})}const Ps=v(e=>({containerFilter:{paddingBlock:e.spacing(4)}}),{name:"filter"}),ve=({code:e,values:s})=>e==="SECTIONS"||e==="GENDER_PUB"&&s.filter(({is_checked:n})=>n).length>1,en=({headerContent:e,filterData:s,page:n})=>{var f,_;const o=Ps(),r=X(),[a,l]=g.useState(Ce((f=s==null?void 0:s.filter)==null?void 0:f.items)),i=s==null?void 0:s.url,x=!(i!=null&&i.startsWith("/promo"));g.useEffect(()=>{var w;l(Ce((w=s==null?void 0:s.filter)==null?void 0:w.items))},[s]);const c=w=>{const P=Object.entries(w.filter(({code:h})=>h==="SIZE").map(({values:h})=>h.map(({sections:b})=>b)).flat(2).map(h=>({...h,items:h.items.filter(({is_checked:b})=>b).map(b=>b["alias-value"]||b.title)})).filter(({items:h})=>h.length).reduce((h,b)=>(b.code in h?h[b.code]=[...h[b.code],...b.items]:h[b.code]=b.items,h),{})).map(([h,b])=>`${h.toLowerCase()}-${[...new Set(b)].join("~")}`),S=w.filter(({type:h})=>h==="slider").map(({values:h})=>h).flat().filter(h=>h.value!==h["min-value"]&&h.value!==h["max-value"]).map(({alias:h,value:b})=>`${h}-${b}`),R=[...w.filter(({alias:h,values:b,code:T})=>!ve({code:T,values:b})&&h&&Object.values(b).some(k=>k.is_checked&&k["alias-value"])).map(({alias:h,values:b})=>{const T=b.filter(k=>k.is_checked&&k["alias-value"]);return`${h}-${T.map(k=>k["alias-value"]).join("~")}`}),...P,...S].join("/"),M=w.filter(({values:h,code:b})=>ve({code:b,values:h})&&Object.values(h).some(({is_checked:T,childs:k})=>T||(k==null?void 0:k.some(({is_checked:Z})=>Z)))).map(({code:h,values:b})=>`${h}=${b.filter(T=>T.childs?T.childs.some(({is_checked:k})=>k):T.is_checked).map(T=>T.childs?T.childs.filter(({is_checked:k})=>k).map(({value:k})=>k).join("~"):T.value).join("~")}`).join("&"),G=`${i}${R}${R.length?"/":""}?${M}`,q=location.search.includes("sort="),Q=location.search.replace(/^.*?(?=sort=)/,"");if(location.search&&q)return r(G+`${M?"&":""}`+Q);r(G)},p=(w,P,S)=>{const j=a.map(R=>R.code===w?{...R,values:Object.values(R.values).map((L,M)=>M===P?{...S}:L)}:R);l(j)},m=w=>{const P=a.map(S=>S.code===w?S.type==="slider"?{...S,values:S.values.map(j=>({...j,value:j["max-value"]||j["min-value"]}))}:w==="SIZE"?{...S,values:S.values.map(j=>({...j,sections:j.sections.map(R=>({...R,items:R.items.map(L=>({...L,is_checked:!1}))}))}))}:{...S,values:Object.values(S.values).map(j=>j.childs?{...j.childs,is_checked:!1}:{...j,is_checked:!1})}:S);c(P)},u=()=>c(a);return t.jsx("noindex",{children:t.jsxs(d,{container:!0,spacing:3,classes:{root:o.containerFilter},children:[t.jsxs(je,{smDown:!0,children:[x&&t.jsx(d,{container:!0,item:!0,children:t.jsx(Jt,{items:(_=s==null?void 0:s.filter)==null?void 0:_.items,children:t.jsx(js,{headerContent:e,page:n,actualFilters:a,onChange:p,onClearFilter:m,onApply:u})})}),t.jsx(d,{container:!0,item:!0,justifyContent:"flex-start",children:t.jsx(d,{item:!0,xl:4,lg:4,children:t.jsx(Cs,{items:s==null?void 0:s.sorts})})})]}),t.jsx(je,{mdUp:!0,children:t.jsx(d,{container:!0,item:!0,children:t.jsxs(d,{container:!0,item:!0,spacing:3,alignItems:"center",justifyContent:"center",children:[t.jsx(ws,{items:s==null?void 0:s.sorts}),t.jsx(Ts,{headerContent:e,page:n,actualFilters:a,onChange:p,onClearFilter:m,onApply:u})]})})})]})})},As=v(e=>({productActions:{"& .swiper-container":{padding:"0 15px",overflow:"hidden",position:"relative",width:"100%","& .swiper-wrapper":{display:"flex","transition-property":"transform","box-sizing":"content-box"},"& .swiper-button-next, & .swiper-button-prev":{position:"absolute",top:"50%",transform:"translateY(-50%)",width:"20px",cursor:"pointer",height:"100%",display:"flex","align-items":"center",background:"white","justify-content":"center",marginTop:0,"&:after":{content:'" "',transform:"rotate(45deg)",width:"10px",height:"10px",display:"block"},"&.swiper-button-disabled":{display:"none"}},"& .swiper-button-next":{right:"0","&:after":{border:"1px solid","border-color":"#c6c6c6 #c6c6c6 transparent transparent"}},"& .swiper-button-prev":{left:"0","&:after":{border:"1px solid","border-color":"transparent transparent #c6c6c6 #c6c6c6"}},"& .swiper-slide":{width:56,"@media (max-width: 640px)":{width:40}}}},productThumb:{"box-sizing":"border-box",cursor:"pointer",padding:"3px",borderRadius:"3px",border:"2px solid transparent","&:hover":{border:"2px solid #3A474E",borderRadius:"6px"}}}),{name:"ProductThumbnails"});qt.use([Qt]);const zs={slidesPerView:"auto",navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}},Es=({colorList:e=[],onClick:s,colorRef:n,thingType:o})=>{const r=As(),a=X(),l=o==="Ювелирное изделие";return Array.isArray(e)?t.jsx(zt,{classes:{root:r.productActions},ref:n,children:t.jsx(Gt,{...zs,children:e.map((i,x)=>t.jsx(Et,{onClick:()=>{if(l)return a(i.url);s(i.color_code,x,i.color_title)},classes:{media:r.productThumb},component:"img",src:i.gallery?i.gallery[0]:"",alt:i.color_title,title:i.color_title},x))})}):null},Ws=v(e=>({gridItem:{"& > *":{paddingBottom:20,"@media (min-width: 768px) and (max-width: 960px)":{paddingInline:10}}},loader:{zIndex:e.zIndex.drawer,position:"absolute",backgroundColor:"rgba(255, 255, 255, 0.5)"}}),{name:"CatalogProductPreview"}),tn=({product:e,type:s,productPosition:n,setShowDisplayProductSizes:o,showDisplayProductSiazes:r,pageName:a,catalogName:l,observer:i})=>{var ue,xe,me,he,pe,ge;const x=Ws(),c=we(C=>C.userAuth.isAuth),p=g.useRef(null),m=g.useRef(null),u=X(),[f,{data:_,isLoading:w,isSuccess:P}]=lt(),[S,{data:j,isFetching:R}]=ct(),[L,{data:M,isFetching:G}]=dt(),[q,{data:Q,isLoading:h}]=ut(),[b,T]=g.useState(""),[k,Z]=g.useState(""),[oe,$e]=g.useState(0),[Le,Me]=g.useState(0),[Oe,D]=g.useState(!1),[Xe,He]=g.useState(!1),[Ne,ie]=g.useState(!1),Ue=(ue=e==null?void 0:e.colors_list[oe])==null?void 0:ue.sku_ids[0],y=e==null?void 0:e.colors_list[oe],K=(j==null?void 0:j.data)&&((he=(me=(xe=j==null?void 0:j.data)==null?void 0:xe.MAIN)==null?void 0:me.content)==null?void 0:he.colors_list),Ge=e==null?void 0:e.technologies,qe=(pe=j==null?void 0:j.data)==null?void 0:pe.MAIN,Qe=e.thing_type,Ze=e==null?void 0:e.is_soon,De=e==null?void 0:e.product_id,[Ke,ae]=g.useState(!1),[Ve,Je]=g.useState(e==null?void 0:e.url),re=Ve||(y==null?void 0:y.url),le=/Новинки|Распродажа/.test(l),Ye=e==null?void 0:e.is_offline_sale,et=()=>s==="search"?4:3,tt=(C,F)=>{F!=="clickaway"&&D(!1)},st=C=>{f({sku:C}).then(F=>{var B,z,H,N,U;F.data.status==="success"&&!Array.isArray(F.data.data)&&J("add_to_cart",{currency:"RUB",item_list_name:a,value:(z=(B=e==null?void 0:e.colors_list)==null?void 0:B.find($=>$.color_title===k))==null?void 0:z.retail_price,items:[{item_name:e==null?void 0:e.name,item_id:C,price:(N=(H=e==null?void 0:e.colors_list)==null?void 0:H.find($=>$.color_title===k))==null?void 0:N.retail_price,item_brand:(U=e==null?void 0:e.brand)==null?void 0:U.name,item_category2:e==null?void 0:e.thing_type,item_category3:le&&l,item_variant:k,index:n,is_peak:e==null?void 0:e.is_peak,quantity:1,offer_id:C}]})})},ce=C=>{q({url:be.user.wishlist.add,...fe({SITE_ID:"lid",bitrix_sessid:"bitrix_sessid"}),id:C}).then(F=>{var B,z,H,N,U;F.data.status==="success"&&!Array.isArray(F.data.data)&&J("add_to_wishlist",{currency:"RUB",item_list_name:a,value:(z=(B=e==null?void 0:e.colors_list)==null?void 0:B.find($=>$.color_title===k))==null?void 0:z.retail_price,items:[{item_name:e==null?void 0:e.name,item_id:C,price:(N=(H=e==null?void 0:e.colors_list)==null?void 0:H.find($=>$.color_title===k))==null?void 0:N.retail_price,item_brand:(U=e==null?void 0:e.brand)==null?void 0:U.name,item_category2:e==null?void 0:e.thing_type,item_category3:le&&l,is_peak:e==null?void 0:e.is_peak,item_variant:k,index:n,quantity:1,offer_id:F.data.SKU_ID}]})})},nt=(C,F)=>Ye?u(e.url):Ne?(ie(!1),ce(C)):st(C),ot=(C,F,B,z)=>{if(Ze)return ae(!0);Je(""),o(C),$e(z),Me(C),T(B),Z(F),Le!==C&&S({url:`${be.product.getProduct}${C}/color_sizes/${B}/`,productId:C,color:B,...fe({SITE_ID:"lid",bitrix_sessid:"bitrix_sessid"})})},de=g.useMemo(()=>K==null?void 0:K.filter(C=>C.color_code===b),[qe,b]);g.useEffect(()=>{P&&D(P)},[P]);const[it]=xt(),at=async C=>{var F,B,z;C.preventDefault(),it({type:"clickItem",sku_id:e.product_id,price:y==null?void 0:y.retail_price}),J("select_item",{currency:"RUB",item_list_name:a,value:(F=e==null?void 0:e.colors_list[0])==null?void 0:F.retail_price,items:[{item_name:e==null?void 0:e.name,item_id:e==null?void 0:e.product_id,price:(B=e==null?void 0:e.colors_list[0])==null?void 0:B.retail_price,item_brand:(z=e==null?void 0:e.brand)==null?void 0:z.name,item_category2:e==null?void 0:e.thing_type,is_peak:e==null?void 0:e.is_peak,quantity:1,index:n}]})},V=g.useRef(null);return g.useEffect(()=>{try{return i.observe(V.current),()=>{i.disconnect()}}catch{}},[V,i]),t.jsxs(t.Fragment,{children:[t.jsx(d,{item:!0,md:et(),xs:6,classes:{item:x.gridItem},ref:V,"data-id":e.product_id,itemProp:"itemListElement",itemScope:!0,itemType:"http://schema.org/Product",children:t.jsxs(Ht,{children:[t.jsx(Nt,{containerSize:"big",url:re,imgUrl:y==null?void 0:y.gallery,imgTitle:y==null?void 0:y.gallery_image_alt,imgAlt:y==null?void 0:y.gallery_image_alt,technologies:Ge[0],badge:e.badges,sizes:de&&de[0].size_list,onClickSize:nt,productSku:Ue,handleAddWishlist:ce,inWishlist:e==null?void 0:e.in_wishlist,setClickOnWishListIcon:ie,isUserAuth:c,colorRef:m,addWishList:h,wishListItem:Q,parentRef:p,selectColor:k,showDisplayProductSiazes:r,setShowDisplayProductSizes:o,onCardClick:at,productId:De,isComingSoon:Ke,setIsComingSoon:ae,advertBadge:e.advert_badge}),t.jsx(Ut,{title:e.thing_type,brandName:e.brand.name,name:e.model_name,price:y==null?void 0:y.retail_price,oldPrice:y==null?void 0:y.base_price,percent:(ge=y==null?void 0:y.discount)==null?void 0:ge.percent_format,url:re,metaDesk:e.metaItemprop.description}),t.jsx(Es,{onClick:(C,F,B)=>{ot(e.product_id,B,C,F)},colorList:e==null?void 0:e.colors_list,colorRef:m,thingType:Qe}),t.jsx(Wt,{classes:{root:x.loader},open:R||w,children:t.jsx($t,{color:"primary"})})]})}),(_==null?void 0:_.data)&&t.jsx(Zt,{cartItem:_,open:Oe,handleClose:tt,getBasket:L,setOpenCart:He,setOpenInfo:D,openCart:Xe,basketLoading:G,basketData:M})]})},$s=v(e=>({skeletProductImg:{marginBottom:e.spacing(3),backgroundColor:e.color.black20,"@media (min-width: 1656px)":{height:498},"@media (max-width: 1440px)":{height:390},"@media (max-width: 1280px)":{height:353},"@media (max-width: 479px)":{height:"auto"}},skeletProductCatRoot:{transform:"scale(1, 1)",backgroundColor:e.color.black20,marginBottom:e.spacing(1)},skeletProductCatText:{width:"148px",height:"14px","@media (max-width: 479px)":{width:"auto"}},skeletProductBrandText:{width:"208px",height:"20px","@media (max-width: 479px)":{width:"auto"}},skeletProductNameText:{width:"208px",height:"20px","@media (max-width: 479px)":{width:"auto"}},skeletProductThumb:{display:"inline-flex",width:24,height:24,marginRight:e.spacing(1)}}));function sn({count:e}){const s=$s(),[n,o]=g.useState(new Array(3).fill(1));return g.useEffect(()=>{e&&o(new Array(e).fill(1))},[e]),t.jsx(t.Fragment,{children:n.map((r,a)=>t.jsxs(d,{item:!0,xl:3,lg:3,md:6,sm:6,xs:6,children:[t.jsx(I,{variant:"rect",classes:{root:s.skeletProductImg},animation:"wave"}),t.jsx(I,{variant:"text",classes:{root:s.skeletProductCatRoot,text:s.skeletProductCatText},animation:"wave"}),t.jsx(I,{variant:"text",classes:{root:s.skeletProductCatRoot,text:s.skeletProductBrandText},animation:"wave"}),t.jsx(I,{variant:"text",classes:{root:s.skeletProductCatRoot,text:s.skeletProductNameText},animation:"wave"}),t.jsx(I,{variant:"rect",classes:{root:s.skeletProductCatRoot,rect:s.skeletProductThumb},animation:"wave"}),t.jsx(I,{variant:"rect",classes:{root:s.skeletProductCatRoot,rect:s.skeletProductThumb},animation:"wave"}),t.jsx(I,{variant:"rect",classes:{root:s.skeletProductCatRoot,rect:s.skeletProductThumb},animation:"wave"}),t.jsx(I,{variant:"rect",classes:{root:s.skeletProductCatRoot,rect:s.skeletProductThumb},animation:"wave"})]},a))})}const Ls=v(e=>({itemPositionCenter:{marginInline:"auto"},endPageText:{color:e.color.black100,fontSize:e.typography.pxToRem(20),fontWeight:"bold"},buttonMore:{color:e.color.black100,fontSize:e.typography.pxToRem(20),padding:"20px 36px",border:`2px solid ${e.color.black40}`,borderRadius:"16px","&:hover":{backgroundColor:"unset"},"@media (max-width: 960px)":{width:"350px"}},productCount:{color:e.color.black60},activePageCountElement:{color:e.color.blue},inactivePageCountElement:{cursor:"pointer",color:e.color.black60,"&:hover":{color:e.color.blue}},productCountPosition:{justifyContent:"flex-start",columnGap:"0.5em","@media (max-width: 479px)":{justifyContent:"center"}},catalogPriceFooter:{paddingBottom:80,"@media (max-width: 960px)":{flexDirection:"column"}}}),{name:"CatalogFooter"});function Ms({location:e,pageNum:s}){const n=new URLSearchParams(e.search);return n.set("PAGEN_1",s),`${e.pathname}?${n}`}const nn=({items:e,sumProducs:s})=>{var p,m;if(!e)return null;const n=Ls(),o=X(),r=(p=e==null?void 0:e.data)==null?void 0:p.page_count,a=(m=e==null?void 0:e.data)==null?void 0:m.current_page,l=e==null?void 0:e.data,i=(u,f)=>{o(Ms({location,pageNum:f}))},{items:x}=Lt({count:r,siblingCount:Dt(r,a),onChange:i,page:a}),c=u=>{x==null||x.at(-1).onClick(u)};return t.jsxs(d,{container:!0,spacing:3,alignItems:"center",justifyContent:"space-between",classes:{root:n.catalogPriceFooter},children:[l&&t.jsx(d,{item:!0,md:"auto",xs:12,children:t.jsx(d,{container:!0,className:n.productCountPosition,children:t.jsxs(W,{variant:"body1",classes:{root:n.productCount},children:["Показано ",s," из ",e.data.record_count," товаров"]})})}),t.jsx(d,{item:!0,md:"auto",xs:12,classes:{root:n.itemPositionCenter},children:t.jsx(d,{container:!0,justifyContent:"center",children:r!==a&&t.jsx(E,{fullWidth:!0,color:"primary",id:"show-more",classes:{root:n.buttonMore},onClick:c,children:"Следующая страница"})})}),t.jsx(d,{item:!0,md:"auto",xs:12,children:t.jsx(d,{container:!0,item:!0,children:t.jsx(Kt,{data:x})})})]})};export{sn as C,en as F,tn as a,nn as b};