1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/client.C1MmKNLK.js","assets/react.C2mWE9rZ.js","assets/charts.BNTtjfsV.js","assets/react.DrVuHrFI.css","assets/client.DS1ZTgY-.css","assets/s-Button.KIZE_7SD.js","assets/s-Button.BIWgyTY-.css"])))=>i.map(i=>d[i]); 2import{X as st,u as rt,c as U,Y as ot,F as T,G as P,Z as f,$ as j,a0 as w,M as nt,N as x,a1 as ct,a2 as it,a3 as lt,a4 as dt,a5 as $,_ as J,__tla as __tla_0}from"./client.C1MmKNLK.js";import{r as e,i as ut,g as gt,b as mt,c as pt,u as ft,j as t,a as ht,B as X,R as E,V as _t,__tla as __tla_1}from"./react.C2mWE9rZ.js";import{N as xt}from"./NoResult.DKnCZs5H.js";import{L as g,C as jt,g as R,P as St,B as It,S as n,G as yt,a as Ct,b as Nt,__tla as __tla_2}from"./getMetaTags.DuO5ENfL.js";let bt;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})()]).then(async()=>{let vt,q,Lt,Tt;vt=c=>{const{width:s}=st();return e.useMemo(()=>s<jt?g.LIST:c,[s,c])};q=E.lazy(()=>J(()=>import("./client.C1MmKNLK.js").then(async m=>{await m.__tla;return m}).then(c=>c.dg),__vite__mapDeps([0,1,2,3,4])));Lt=E.lazy(()=>J(()=>import("./s-Button.KIZE_7SD.js"),__vite__mapDeps([5,1,2,3,0,4,6])));Tt=5;bt=e.memo(()=>{const c=ut(),s=rt(),{error:C}=gt(),[Pt,K]=mt(),{customPage:N}=pt(),{pickedCityName:B,items:S,pagination:a,sorts:Y,sort:m,isLoading:v,metaTags:h}=U(ot),b=U(r=>r.main.currentCityName),[k,D]=e.useState(a.current_page),d=ft(),Z=e.useMemo(()=>(typeof window<"u"?T.get("geoName"):"")||b||B||"",[b,B]),M=e.useRef(!0),[I,G]=e.useState(g.LIST),A=vt(I),[O,F]=e.useState(!0),[p,Q]=e.useState(()=>typeof window<"u"?T.get("geoId"):void 0),[H,tt]=e.useState(()=>typeof window<"u"?T.get("geoId"):void 0);e.useEffect(()=>{const r=setInterval(()=>{if(typeof window<"u"){const o=T.get("geoId");o!==p&&(tt(p),Q(o))}},2e3);return()=>clearInterval(r)},[p]);const y=e.useRef(),i=e.useRef(!1);e.useEffect(()=>{if(M.current){M.current=!1;return}},[c.pathname]),e.useEffect(()=>{O&&window.scrollTo(0,0)},[a.current_page,O]);const et=e.useMemo(()=>[{id:0,title:"ЧиÑÑопаÑ",link:"/"},{id:2,title:d?.data.name}],[B,Z,h]);e.useEffect(()=>{at(a),D(a.current_page)},[a.current_page]);const at=({current_page:r})=>{const o=new URLSearchParams(window?.location.search);a.current_page>1?o.set("page",r.toLocaleString()):o.delete("page"),K(o)},V=c.state?.source,L=e.useCallback(async r=>{i.current||!m||(y.current&&clearTimeout(y.current),y.current=setTimeout(async()=>{i.current=!0;try{const o=localStorage.getItem("latitude"),_=localStorage.getItem("longitude"),u=await P.listCatalogCustomPage({...m,customPage:N,page:r||a.current_page||1,latitude:f(o)||"",longitude:f(_)||""});s(j({data:u.data.data,meta:u.data.meta}))}catch{C({description:"Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ ÐºÐ°Ñалог, попÑобÑйÑе еÑÑ Ñаз или обновиÑе ÑÑÑаниÑÑ"})}finally{i.current=!1}},300))},[m,p,s,a.current_page]);e.useEffect(()=>{L()},[L]),e.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]),e.useEffect(()=>{p!==H&&p!==void 0&&(s(j({data:[],meta:{current_page:1,from:0,last_page:1,page:1,links:[],path:"",per_page:10,to:0,total:0}})),s(w(!0)),i.current=!1,L())},[p,H,s]);const z=async(r,o=!1,_=!0)=>{if(!(v||i.current||!m))if(F(!!_),s(w(!0)),o){D(r||1);try{const u=localStorage.getItem("latitude"),l=localStorage.getItem("longitude"),W=await P.listCatalogCustomPage({...m,customPage:N,page:r??a.current_page+1,latitude:f(u)||"",longitude:f(l)||""});s(j({data:[...S,...W.data.data],meta:{...W.data.meta,current_page:a.current_page}}))}catch{C({description:"Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ Ð¾Ð±ÑекÑÑ, попÑобÑйÑе еÑÑ Ñаз или обновиÑе ÑÑÑаниÑÑ"})}finally{s(w(!1))}}else s(w(!1)),L(r)};return e.useEffect(()=>{V==="category-block"&&!i.current&&m&&(async()=>{i.current=!0;try{const o=localStorage.getItem("latitude"),_=localStorage.getItem("longitude"),u=await P.listCatalogCustomPage({...m,customPage:N,page:a.current_page||1,latitude:f(o)||"",longitude:f(_)||""}),l=c.pathname.split("/");p&&l[l.length-1]!=h?.slug&&s($(l[l.length-1])),s(j({data:u.data.data,meta:u.data.meta}))}catch{C({description:"Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ ÐºÐ°Ñалог Ð´Ð»Ñ ÐºÐ°ÑегоÑии, попÑобÑйÑе еÑÑ Ñаз"})}finally{i.current=!1}return!0})()},[c,V]),e.useEffect(()=>{!i.current&&m&&(async()=>{i.current=!0;try{const o=localStorage.getItem("latitude"),_=localStorage.getItem("longitude"),u=await P.listCatalogCustomPage({...m,customPage:N,page:a.current_page||1,latitude:f(o)||"",longitude:f(_)||""}),l=c.pathname.split("/");p&&l[l.length-1]!=h?.slug&&s($(l[l.length-1])),s(j({data:u.data.data,meta:u.data.meta}))}catch{C({description:"Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ ÐºÐ°Ñалог Ð´Ð»Ñ ÐºÐ°ÑегоÑии, попÑобÑйÑе еÑÑ Ñаз"})}finally{i.current=!1}return!0})()},[c.pathname]),e.useEffect(()=>()=>{s(j({data:[],meta:{current_page:1,from:0,last_page:1,page:1,links:[],path:"",per_page:10,to:0,total:0}}))},[]),!d||!d.data?t.jsx(t.Fragment,{}):t.jsxs(t.Fragment,{children:[t.jsx(nt,{title:d.data.meta_title||R(h,"title",a.total),description:d.data.meta_description||R(h,"description",a.total),canonical:`https://chistopar.ru${c.pathname}`,og:{title:d.data.meta_title||R(h,"title",a.total),description:d.data.meta_description||R(h,"description",a.total)}}
2),t.jsxs("div",{suppressHydrationWarning:!0,className:"Catalog",children:[t.jsx("div",{className:"main-screen",children:t.jsxs("div",{className:"container",children:[t.jsx(ht,{hideBackButton:!0,items:et}),t.jsx(St,{})]})}),t.jsx("div",{children:t.jsxs("div",{className:x("container",n.CatalogHeader),children:[t.jsx(It,{title:d.data.name}),t.jsxs("div",{className:x("catalog-bar","d-flex","align-items-center","justify-content-between"),children:[v?t.jsx("div",{className:"catalog-counter",children:t.jsx("div",{className:x("ph-row",n.PlaceholderTotal),children:t.jsx("div",{className:"ph-col-12"})})}):t.jsx("div",{className:"catalog-counter fs-lg-14 fs-12",children:ct(a?.total)}),t.jsxs("div",{className:x("d-flex",n.SortOuter),children:[t.jsx(it,{options:Y}),t.jsxs("div",{className:n.ButtonsSortWrapper,children:[t.jsx(X,{type:"button",variant:"outline",shadow:"none",size:"sm","aria-label":"ÐÑобÑажаÑÑ Ð¿Ð»Ð¸Ñкой","aria-pressed":I===g.GRID,classNames:{root:x(n.ButtonSort,{[n.SortActive]:I===g.GRID})},onClick:()=>G(g.GRID),children:t.jsx(yt,{className:n.GridIcon})}),t.jsx(X,{type:"button",variant:"outline",shadow:"none",size:"sm","aria-label":"ÐÑобÑажаÑÑ ÑпиÑком","aria-pressed":I===g.LIST,classNames:{root:x(n.ButtonSort,{[n.SortActive]:I===g.LIST})},onClick:()=>G(g.LIST),children:t.jsx(Ct,{className:n.ListIcon})})]})]})]})]})}),t.jsx("div",{className:"catalog-container",children:t.jsxs("div",{className:"container",children:[t.jsx("div",{className:x("row"),children:S?.length?t.jsxs(t.Fragment,{children:[A===g.LIST&&t.jsx(Nt,{items:S}),A===g.GRID&&t.jsx("div",{className:n.GridLocation,children:S?.map((r,o)=>t.jsxs(E.Fragment,{children:[o===Tt&&t.jsx(lt,{layout:"grid"}),t.jsx(e.Suspense,{fallback:t.jsx(q,{},o),children:t.jsx(dt,{...r})},r.id)]},r.id))}),t.jsxs("div",{className:n.CatalogFooter,children:[k!==a.last_page&&t.jsx(Lt,{onClick:()=>z(k+1,!0,!1),className:n.ButtonShowMore,children:`${v?"ÐагÑÑзка...":"ÐоказаÑÑ ÐµÑе"}`}),t.jsx(_t,{className:n.Pagination,pagination:{current_page:a.current_page,last_page:a.last_page},onPageChange:z})]})]}):!v&&S.length===0?t.jsx(xt,{}):t.jsx(q,{})}),d.data.seo_description&&t.jsx("p",{className:"mb-5",dangerouslySetInnerHTML:{__html:d.data.seo_description}})]})})]})]})})});export{bt as default,__tla};
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.