1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[951],{56516:(e,s,a)=>{a.r(s),a.d(s,{default:()=>m});var n=a(82455),l=a(67169),t=a(84126),i=a.n(t),o=a(32164),r=a(96650),c=a(53314);const d={section:"InspoGallery__section",container:"InspoGallery__container",header:"InspoGallery__header",title:"InspoGallery__title",navigation:"InspoGallery__navigation",navButton:"InspoGallery__navButton",navButtonPrev:"InspoGallery__navButtonPrev",navButtonNext:"InspoGallery__navButtonNext",carouselWrapper:"InspoGallery__carouselWrapper",slide:"InspoGallery__slide",galleryRow:"InspoGallery__galleryRow",smallImagesContainer:"InspoGallery__smallImagesContainer",galleryImage:"InspoGallery__galleryImage",small:"InspoGallery__small",large:"InspoGallery__large",image:"InspoGallery__image",socialBadge:"InspoGallery__socialBadge",socialHandle:"InspoGallery__socialHandle",fadeIn:"InspoGallery__fadeIn"};var u=a(15698);function m({content:e}){const s=(0,n.useRef)(null),[a,t]=(0,n.useState)(!1),o=e.items||[];if((0,n.useEffect)((()=>{if("undefined"==typeof window||!("matchMedia"in window))return;const e=window.matchMedia("(max-width: 767px)"),s=()=>t(e.matches);return s(),e.addEventListener("change",s),()=>e.removeEventListener("change",s)}),[]),!o.length)return(0,u.jsx)("section",{});const r=[];if(a)o.forEach((e=>r.push([e])));else for(let e=0;e<o.length;e+=6)r.push(o.slice(e,e+6));return(0,u.jsx)("section",{className:d.section,children:(0,u.jsxs)("div",{className:d.container,children:[(0,u.jsxs)("header",{className:d.header,children:[(0,u.jsx)("h2",{className:d.title,children:e.title}),r.length>1&&(0,u.jsxs)("div",{className:d.navigation,children:[(0,u.jsx)("button",{className:i()(d.navButton,d.navButtonPrev),onClick:()=>{var e;null===(e=s.current)||void 0===e||e.slickPrev()},"aria-label":"Previous gallery",children:(0,u.jsx)(c.Z,{iconName:"general/arrow-chevron-left-white",className:d.navIcon})}),(0,u.jsx)("button",{className:i()(d.navButton,d.navButtonNext),onClick:()=>{var e;null===(e=s.current)||void 0===e||e.slickNext()},"aria-label":"Next gallery",children:(0,u.jsx)(c.Z,{iconName:"general/arrow-chevron-left-white",className:d.navIcon})})]})]}),(0,u.jsxs)("div",{className:d.carouselWrapper,children:[(0,u.jsx)(l.Z,{ref:s,dots:!1,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,arrows:!1,adaptiveHeight:!1,children:r.map(((e,s)=>(0,u.jsx)(g,{items:e,isMobile:a},s)))}),(0,u.jsx)("a",{className:d.socialBadge,href:"https://www.instagram.com/mycs_com",target:"_blank",rel:"noopener noreferrer","aria-label":"Follow mycs_com on Instagram",children:(0,u.jsx)("span",{className:d.socialHandle,children:"follow us @mycs_com"})})]})]})})}function g({items:e,isMobile:s}){if(s){const s=e[0];return(0,u.jsx)("div",{className:d.slide,children:(0,u.jsx)(h,{item:s,size:"large"})})}const a=[...e];for(;a.length<6;)a.push({});const n=a.slice(0,2),l=a[2],t=a[3],i=a.slice(4,6);return(0,u.jsxs)("div",{className:d.slide,children:[(0,u.jsxs)("div",{className:d.galleryRow,children:[(0,u.jsx)("div",{className:d.smallImagesContainer,children:n.map(((e,s)=>(0,u.jsx)(h,{item:e,size:"small"},e._id||s)))}),(0,u.jsx)(h,{item:l,size:"large"})]}),(0,u.jsxs)("div",{className:d.galleryRow,children:[(0,u.jsx)(h,{item:t,size:"large"}),(0,u.jsx)("div",{className:d.smallImagesContainer,children:i.map(((e,s)=>(0,u.jsx)(h,{item:e,size:"small"},e._id||s)))})]})]})}function h({item:e,size:s}){const a=e.fullImage||e.smallImage;if(!a)return(0,u.jsx)("div",{className:i()(d.galleryImage,d[s])});const n=o.Z.getImage({image:a,imageTablet:a,imagePhone:a});return(0,u.jsx)("div",{className:i()(d.galleryImage,d[s]),children:n&&(0,u.jsx)(r.Z,{className:d.image,asset:n})})}},3261:(e,s,a)=>{a.r(s),a.d(s,{default:()=>b});var n=a(82455),l=a(84126),t=a.n(l),i=a(10819),o=a(82233);const r=new class{async getRecentSoldDesigns(e,s=10,a={}){const n=await(0,o.kb)({sort_by:"-created_at",was_sold:!0,page_size:s,page:1,country_code:e,...a});return(null==n?void 0:n.designs)||[]}async getUserRecentSavedDesigns(e,s,a=10){if(!e||0===e.length)return[];const n=[...e].sort(((e,s)=>new Date(s.updated_at).getTime()-new Date(e.updated_at).getTime())).slice(0,a).map((e=>e.uuid));if(0===n.length)return[];const l=await(0,o.P9)(s,n.join(","),{}),t=new Map(l.map((e=>[e.uuid,e])));return n.map((e=>t.get(e))).filter((e=>!!e))}async getRecentSoldDesignsWithPagination(e,s=10,a=0){var n,l;const t=await(0,o.XO)(e,{limit:s,offset:a}),i=(null==t?void 0:t.designs)||[];return{designs:i,total:(null==t?void 0:t.total)||i.length,nextOffset:null!==(n=null==t?void 0:t.nextOffset)&&void 0!==n?n:a+i.length,hasMore:null!==(l=null==t?void 0:t.hasMore)&&void 0!==l?l:i.length>=s}}};var c=a(39540),d=a(67617);const u=2;var m=a(3906),g=a(35124),h=a(31221),_=a(95687),v=a(16405),f=a(76840),x=a(63292),N=a(68018),p=a(8752);var j=a(15698);function C({className:e}){return(0,j.jsxs)("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,j.jsx)("circle",{cx:"8",cy:"5",r:"3",stroke:"#373737",strokeWidth:"1.2",fill:"none"}),(0,j.jsx)("path",{d:"M2 14c0-3.3 2.7-6 6-6s6 2.7 6 6",stroke:"#373737",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})]})}function w(e,s){if(!e)return null;const a=new Date(e),n=new Date;if(isNaN(a.getTime()))return null;const l=a.getDate()===n.getDate()&&a.getMonth()===n.getMonth()&&a.getFullYear()===n.getFullYear(),t=new Date(n);t.setDate(t.getDate()-1);const i=a.getDate()===t.getDate()&&a.getMonth()===t.getMonth()&&a.getFullYear()===t.getFullYear(),o=a.getMonth()===n.getMonth()&&a.getFullYear()===n.getFullYear(),r=new Date(n);r.setMonth(r.getMonth()-1);const c=a.getMonth()===r.getMonth()&&a.getFullYear()===r.getFullYear(),d=a.getFullYear()===n.getFullYear();if(a.getFullYear(),n.getFullYear(),l){const e=a.getHours().toString().padStart(2,"0"),n=a.getMinutes().toString().padStart(2,"0");return`${v.Z.localize(s,"Today")}, ${e}:${n}`}return i?v.Z.localize(s,"Yesterday"):o?v.Z.localize(s,"This month"):c?v.Z.localize(s,"Last month"):d?v.Z.localize(s,"This year"):v.Z.localize(s,"Last year")}const y=(0,n.memo)((function({product:e,isNew:s=!1,imageSizes:a="(max-width: 767px) 50vw, 25vw"}){const{locale:l}=(0,c.b)(),t=(e.furniture_type||"").toLowerCase().replace(/^sofa-/,""),i=(0,N.J5)(e.furniture_type)||(0,N.J5)(t),o=(0,p.o)(t).showConfiguratorButton,r=i?g.I.getPdpUrl(e.uuid,l):g.I.getConfiguratorUrl(e.furniture_type,e.uuid,l),d=(()=>
1{if(!e.images||!e.images.length){var s;const a="string"==typeof e.image_url?e.image_url:null===(s=e.image_url)||void 0===s?void 0:s.url;return a?_.default.cleanUrl(a):""}return _.default.getFaceImageUrl(e.images)||_.default.cleanUrl(e.images[0].url)})(),u=v.Z.localize(l,e.name),m=(0,n.useMemo)((()=>e.customer_first_name&&e.customer_city?{name:e.customer_first_name,location:e.customer_city,date:w(e.order_date,l)}:null),[e.customer_first_name,e.customer_city,e.order_date,l]);return(0,j.jsxs)("div",{className:"JoinMillionsCard__card",children:[(0,j.jsxs)("a",{href:r,className:"JoinMillionsCard__imageContainer",onClick:()=>{h.Z.eventTrack("inspirationClick",l,{uuid:e.uuid,action:"Click"})},children:[(0,j.jsx)(f.Z,{src:d,alt:u,sizes:a,className:"JoinMillionsCard__image"}),(0,j.jsxs)("div",{className:"JoinMillionsCard__imageOverlay",children:[(0,j.jsx)("div",{className:"JoinMillionsCard__badgeContainer",children:s&&(0,j.jsx)("span",{className:"JoinMillionsCard__newBadge",children:"NEW"})}),o&&(0,j.jsx)(x.Z,{isExpandingIconCta:!0,text:v.Z.localize(l,"Customise CTA"),iconName:"general/configure-icon",className:"JoinMillionsCard__configureButton",href:r,onClick:e=>e.stopPropagation()})]})]}),(0,j.jsxs)("div",{className:"JoinMillionsCard__productInfo",children:[m&&(0,j.jsxs)("div",{className:"JoinMillionsCard__userInfoRow",children:[(0,j.jsxs)("div",{className:"JoinMillionsCard__userInfo",children:[(0,j.jsx)(C,{className:"JoinMillionsCard__userIcon"}),(0,j.jsx)("span",{className:"JoinMillionsCard__userName",children:(0,j.jsx)("strong",{children:m.location})})]}),m.date&&(0,j.jsx)("span",{className:"JoinMillionsCard__orderDate",children:m.date})]}),(0,j.jsx)("div",{className:"JoinMillionsCard__titleRow",children:(0,j.jsx)("div",{className:"JoinMillionsCard__titleContainer",children:(0,j.jsx)("span",{className:"JoinMillionsCard__productTitle",children:u})})})]})]})})),M={section:"JoinMillionsCarousel__section",header:"JoinMillionsCarousel__header",title:"JoinMillionsCarousel__title",subtitle:"JoinMillionsCarousel__subtitle",carouselContainer:"JoinMillionsCarousel__carouselContainer",slide:"JoinMillionsCarousel__slide",loading:"JoinMillionsCarousel__loading",fadeIn:"JoinMillionsCarousel__fadeIn"},I=20,T=344;function b({content:e}){const{title:s,subtitle:a}=e,{designs:l,hasMore:o,loadMore:g,isLoading:h}=function(e=10){const{countryCode:s}
1=(0,c.b)(),[a,l]=(0,n.useState)([]),[t,i]=(0,n.useState)(!0),[o,m]=(0,n.useState)(null),[g,h]=(0,n.useState)(!0),_=(0,n.useRef)(!1),v=(0,n.useRef)(0),f=(0,n.useCallback)((async(a,n=!1)=>{if(_.current)return;_.current=!0,n&&i(!0),m(null);const t=e*u;try{var o;const e=await r.getRecentSoldDesignsWithPagination(s,t,a),i=null!==(o=e.hasMore)&&void 0!==o?o:e.designs.length>=t;h(i),l((s=>{if(n)return e.designs;const a=new Set(s.map((e=>e.uuid))),l=e.designs.filter((e=>!a.has(e.uuid)));return[...s,...l]})),v.current=e.nextOffset}catch(e){d.Z.error("useRecentSoldDesigns: Failed to load designs:",e),m(e)}finally{_.current=!1,n&&i(!1)}}),[s,e]);(0,n.useEffect)((()=>{v.current=0,l([]),h(!0),m(null),f(0,!0)}),[f]);const x=(0,n.useCallback)((()=>{g&&!_.current&&f(v.current)}),[g,f]);return{designs:a,isLoading:t,error:o,hasMore:g,loadMore:x}}(I),_=(0,n.useRef)(null);(0,n.useEffect)((()=>{!o||h||l.length>=I||_.current!==l.length&&(_.current=l.length,g())}),[o,h,l.length,g]);const{hasPhoneDimensions:v,hasTabletDimensions:f}=(0,i.F)(),x=(0,n.useRef)(null),N=(0,n.useRef)(null),[p,C]=(0,n.useState)({show:1.35,scroll:1});(0,n.useEffect)((()=>{const e=N.current;if(!e)return;const s=v?1.35:f?3.2:5.5,a=()=>{const a=e.getBoundingClientRect().width;if(!a)return;const n=v?s:Math.max(1,a/T),t=Math.min(s,n),i=l.length?Math.min(t,l.length):t,o=Math.round(100*i)/100,r=Math.max(1,Math.floor(o));C((e=>e.show===o&&e.scroll===r?e:{show:o,scroll:r}))},n="ResizeObserver"in window?new ResizeObserver(a):null;return n&&n.observe(e),a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a),n&&n.disconnect()}}),[v,f,l.length]);const w=Math.max(0,l.length-Math.ceil(p.show)),b=(0,n.useCallback)((e=>{e>=w-1&&o&&!h&&g()}),[w,o,h,g]);if(!l.length&&!h)return(0,j.jsx)("section",{});const R=s||a;return(0,j.jsxs)("section",{className:M.section,"data-testid":"join-millions-carousel",children:[R&&(0,j.jsxs)("header",{className:M.header,children:[s&&(0,j.jsx)("h2",{className:M.title,dangerouslySetInnerHTML:{__html:s}}),a&&(0,j.jsx)("span",{className:M.subtitle,children:a})]}),(0,j.jsx)("div",{className:t()(M.carouselContainer,{[M.loading]:h}),ref:N,children:l.length>0?(0,j.jsx)(m.Z,{ref:x,slidesToShow:p.show,slidesToScroll:p.scroll,arrows:!v,infinite:!1,lazyLoad:"ondemand",draggable:!0,afterChange:b,children:l.map(((e,s)=>(0,j.jsx)("div",{className:M.slide,children:(0,j.jsx)(y,{product:e,isNew:s<4})},e.uuid||s)))}):(0,j.jsx)("div",{className:M.loading,children:"Loading..."})})]})}},51137:(e,s,a)=>{a.r(s),a.d(s,{default:()=>v});var n=a(82455),l=a(67169),t=a(84126),i=a.n(t),o=a(39540),r=a(32164),c=a(96650),d=a(53314);const u={stars:"StarsRating__stars",star:"StarsRating__star",fadeIn:"StarsRating__fadeIn"};var m=a(15698);function g(e){const{rating:s,className:a,starColor:n,starClassName:l}=e;if(!s)return null;const t=Math.floor(s),o=+(s-t!=0),r=[],c=n||"";for(let e=1;e<=5;e++){const s=e<=t,a=e===t+1&&1===o;r.push((0,m.jsx)(d.Z,{iconPath:s?`/img/icons/footer/star-filled${c}.svg`:a?`/img/icons/footer/star-half-filled${c}.svg`:`/img/icons/footer/star-empty${c}.svg`,className:i()(u.star,l)},e))}return(0,m.jsx)("div",{className:i()(u.stars,a),children:r})}var h=a(16405);const _={section:"TestimonialCarousel__section",container:"TestimonialCarousel__container",header:"TestimonialCarousel__header",title:"TestimonialCarousel__title",subtitle:"TestimonialCarousel__subtitle",ratingRow:"TestimonialCarousel__ratingRow",ratingRowDesktop:"TestimonialCarousel__ratingRowDesktop",ratingRowMobile:"TestimonialCarousel__ratingRowMobile",ratingText:"TestimonialCarousel__ratingText",stars:"TestimonialCarousel__stars",carouselWrapper:"TestimonialCarousel__carouselWrapper",slide:"TestimonialCarousel__slide",slideContent:"TestimonialCarousel__slideContent",quoteSection:"TestimonialCarousel__quoteSection",quote:"TestimonialCarousel__quote",customerName:"TestimonialCarousel__customerName",imageSection:"TestimonialCarousel__imageSection",customerImage:"TestimonialCarousel__customerImage",footer:"TestimonialCarousel__footer",socialHandle:"TestimonialCarousel__socialHandle",navigation:"TestimonialCarousel__navigation",navButton:"TestimonialCarousel__navButton",navButtonPrev:"TestimonialCarousel__navButtonPrev",navButtonNext:"TestimonialCarousel__navButtonNext",fadeIn:"TestimonialCarousel__fadeIn"};function v({content:e}){const{locale:s}
1=(0,o.b)(),a=(0,n.useRef)(null),[t,r]=(0,n.useState)(0),c=e.customerTestimonials||e.customerReviewForm,u=Array.isArray(c)?c:c?[c]:[];if(!u.length)return(0,m.jsx)("section",{});const v=u[t],x={dots:!1,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,arrows:!1,adaptiveHeight:!1,afterChange:e=>{r(e)}};return(0,m.jsx)("section",{className:_.section,children:(0,m.jsxs)("div",{className:_.container,children:[(0,m.jsxs)("header",{className:_.header,children:[(0,m.jsx)("h2",{className:_.title,children:e.title||h.Z.localize(s,"customers who trust Mycs")}),(0,m.jsx)("span",{className:_.subtitle,children:e.subtitle||h.Z.localize(s,"over 100,000 satisfied customer")})]}),(0,m.jsx)("div",{className:i()(_.ratingRow,_.ratingRowDesktop),children:(null==v?void 0:v.rating)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("span",{className:_.ratingText,children:[h.Z.localize(s,"Rate"),": ",v.rating,"/5"]}),(0,m.jsx)(g,{rating:v.rating,starColor:"-yellow",className:_.stars})]})}),(0,m.jsx)("div",{className:_.carouselWrapper,children:(0,m.jsx)(l.Z,{ref:a,...x,children:u.map((e=>(0,m.jsx)(f,{testimonial:e,locale:s},e._id)))})}),(0,m.jsxs)("footer",{className:_.footer,children:[(0,m.jsx)("div",{className:_.socialBadge,children:(null==v?void 0:v.socialHandle)&&(v.socialHandleLink?(0,m.jsx)("a",{href:v.socialHandleLink.startsWith("http")?v.socialHandleLink:`https://${v.socialHandleLink}`,className:_.socialHandle,target:"_blank",rel:"noopener noreferrer",children:v.socialHandle}):(0,m.jsx)("span",{className:_.socialHandle,children:v.socialHandle}))}),u.length>1&&(0,m.jsxs)("div",{className:_.navigation,children:[(0,m.jsx)("button",{className:i()(_.navButton,_.navButtonPrev),onClick:()=>{var e;null===(e=a.current)||void 0===e||e.slickPrev()},"aria-label":"Previous testimonial",children:(0,m.jsx)(d.Z,{iconName:"general/arrow-chevron-left-white",className:_.navIconPrev})}),(0,m.jsx)("button",{className:i()(_.navButton,_.navButtonNext),onClick:()=>{var e;null===(e=a.current)||void 0===e||e.slickNext()},"aria-label":"Next testimonial",children:(0,m.jsx)(d.Z,{iconName:"general/arrow-chevron-left-white",className:_.navIconNext})})]})]})]})})}function f({testimonial:e,locale:s}){const{testimonialText:a,customerName:n,photo:l}=e,t=r.Z.getImage({image:l,imageTablet:l,imagePhone:l});return(0,m.jsx)("div",{className:_.slide,children:(0,m.jsxs)("div",{className:_.slideContent,children:[(0,m.jsxs)("div",{className:_.quoteSection,children:[(0,m.jsx)("p",{className:_.quote,children:a}),(0,m.jsx)("p",{className:_.customerName,children:n})]}),(0,m.jsx)("div",{className:_.imageSection,children:t&&(0,m.jsx)(c.Z,{className:_.customerImage,asset:t})}),e.rating&&(0,m.jsxs)("div",{className:i()(_.ratingRow,_.ratingRowMobile),children:[(0,m.jsxs)("span",{className:_.ratingText,children:[h.Z.localize(s,"Rate"),": ",e.rating,"/5"]}),(0,m.jsx)(g,{rating:e.rating,starColor:"-yellow",className:_.stars})]})]})})}}}]);
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.