1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9298],{46214:function(e,t,s){s.d(t,{G:function(){return IconStar}});var r=s(85893),a=s(25675),l=s.n(a);let Icon=e=>{let{size:t=24,src:s,...a}=e;return(0,r.jsx)(l(),{src:s,alt:"icon",width:t,height:t,...a})},IconStar=e=>(0,r.jsx)(Icon,{src:"/icons/star.svg",...e})},2374:function(e,t,s){s.d(t,{KI:function(){return h},d$:function(){return x},lr:function(){return u}});var r=s(85893),a=s(67294),l=s(53219),o=s(82701),n=s(51103),i=s(5549),c=s(89382);let d=a.createContext(null);function useCarousel(){let e=a.useContext(d);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let u=a.forwardRef((e,t)=>{let{orientation:s="horizontal",opts:l,setApi:o,plugins:i,className:u,children:h,...x}=e,[p,m]=(0,c.Z)({...l,axis:"horizontal"===s?"x":"y"},i),[f,g]=a.useState(!1),[w,v]=a.useState(!1),j=a.useCallback(e=>{e&&(g(e.canScrollPrev()),v(e.canScrollNext()))},[]),b=a.useCallback(()=>{null==m||m.scrollPrev()},[m]),N=a.useCallback(()=>{null==m||m.scrollNext()},[m]),k=a.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),b()):"ArrowRight"===e.key&&(e.preventDefault(),N())},[b,N]);return a.useEffect(()=>{m&&o&&o(m)},[m,o]),a.useEffect(()=>{if(m)return j(m),m.on("reInit",j),m.on("select",j),()=>{null==m||m.off("select",j)}},[m,j]),(0,r.jsx)(d.Provider,{value:{carouselRef:p,api:m,opts:l,orientation:s||((null==l?void 0:l.axis)==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:N,canScrollPrev:f,canScrollNext:w},children:(0,r.jsx)("div",{ref:t,onKeyDownCapture:k,className:(0,n.cn)("relative",u),role:"region","aria-roledescription":"carousel",...x,children:h})})});u.displayName="Carousel";let h=a.forwardRef((e,t)=>{let{className:s,...a}=e,{carouselRef:l,orientation:o}=useCarousel();return(0,r.jsx)("div",{ref:l,className:"overflow-hidden",children:(0,r.jsx)("div",{ref:t,className:(0,n.cn)("flex","horizontal"===o?"-ml-4":"-mt-4 flex-col",s),...a})})});h.displayName="CarouselContent";let x=a.forwardRef((e,t)=>{let{className:s,...a}=e,{orientation:l}=useCarousel();return(0,r.jsx)("div",{ref:t,role:"group","aria-roledescription":"slide",className:(0,n.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===l?"pl-4":"pt-4",s),...a})});x.displayName="CarouselItem";let p=a.forwardRef((e,t)=>{let{className:s,variant:a="outline",size:o="icon",...c}=e,{orientation:d,scrollPrev:u,canScrollPrev:h}=useCarousel();return(0,r.jsxs)(i.z,{ref:t,variant:a,size:o,className:(0,n.cn)("absolute h-8 w-8 rounded-full","horizontal"===d?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",s),disabled:!h,onClick:u,...c,children:[(0,r.jsx)(l.Z,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});p.displayName="CarouselPrevious";let m=a.forwardRef((e,t)=>{let{className:s,variant:a="outline",size:l="icon",...c}=e,{orientation:d,scrollNext:u,canScrollNext:h}=useCarousel();return(0,r.jsxs)(i.z,{ref:t,variant:a,size:l,className:(0,n.cn)("absolute h-8 w-8 rounded-full","horizontal"===d?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",s),disabled:!h,onClick:u,...c,children:[(0,r.jsx)(o.Z,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Next slide"})]})});m.displayName="CarouselNext"},67419:function(e,t,s){s.d(t,{Z:function(){return blog_LastArticles}});var r=s(85893),a=s(98388),l=s(85648),o=s(27484),n=s.n(o),i=s(67294),c=s(45139),d=s(51103);let u=(0,c.j)("inline-flex items-center rounded-full border-[1.5px] border-slate-200 font-semibold px-3.5 py-1.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-slate-900 text-slate-50 hover:bg-slate-900/80",secondary:"border-transparent bg-slate-100 text-slate-900 hover:bg-slate-100/80",destructive:"border-transparent bg-red-500 text-slate-50 hover:bg-red-500/80",outline:"border-primary text-secondary "}},defaultVariants:{variant:"default"}});function Badge(e){let{className:t,variant:s,...a}=e;return(0,r.jsx)("div",{className:(0,d.cn)(u({variant:s}),t),...a})}var h=s(25675),x=s.n(h),blog_LastArticle=e=>{let{article:t}=e,{date:s,title:a,media_resolved:o,link:i,author_resolved:c,categories_resolved:d}=t;return(0,r.jsx)("div",{className:"flex w-full min-w-[310px] flex-col",children:(0,r.jsx)(l.x,{href:i,className:"group",children:(0,r.jsxs)("div",{className:"lastarticle-card",children:[(0,r.jsx)("div",{className:"mb-3 h-[300px] w-[340px] max-w-full overflow-hidden rounded-xl md:w-[378px]",children:o?(0,r.jsx)(x(),{src:o.guid.rendered,alt:o.alt_text,onError:e=>{e.currentTarget.src="/images/placeholder.png"},width:378,height:300,className:" h-full scale-110 object-cover transition-all duration-700 group-hover:scale-100"}):(0,r.jsx)(x(),{src:"/images/placeholder.png",alt:"placeholder",width:378,height:300,className:" h-full rounded-xl object-cover"})}),null==d?void 0:d.map(e=>(0,r.jsx)(Badge,{variant:"outline",className:"mb-2.5 uppercase",children:e.name},e.id)),(0,r.jsxs)("div",{className:"flex items-center gap-2.5 text-sm font-normal text-grey",children:[c&&(0,r.jsx)("span",{children:c.name}),(0,r.jsx)("div",{className:"h-1.5 w-1.5 rounded-full bg-grey"}),(0,r.jsxs)("span",{children:["le ",n()(s).format("DD MMMM YYYY")]})]}),(0,r.jsx)("span",{className:"text-lg font-semibold group-hover:underline",dangerouslySetInnerHTML:{__html:a.rendered}})]})})})};let useLastArticles=()=>{let[e,t]=(0,i.useState)(!0),[s,r]=(0,i.useState)(!0),[a,l]=(0,i.useState)([]),[o,n]=(0,i.useState)(!1),fetchArticles=async e=>{try{let s=fetch("https://blog.comparea.ch/wp-json/wp/v2/posts?per_page=3&order=desc&orderby=modified",{signal:e.signal}).then(e=>e.json()).then(e=>(r(!1),e)),a=fetch("https://blog.comparea.ch/wp-json/wp/v2/categories?per_page=100",{signal:e.signal}).then(e=>e.json()),o=fetch("https://blog.comparea.ch/wp-json/wp/v2/media?per_page=100&order=desc&orderby=modified",{signal:e.signal}).then(e=>e.json()),i=fetch("https://blog.comparea.ch/wp-json/wp/v2/users?per_page=100",{signal:e.signal}).then(e=>e.json()),[c,d,u,h]=await Promise.all([s,a,o,i]),x=c.sort((e,t)=>
1new Date(t.modified).getTime()-new Date(e.modified).getTime()).slice(0,3),p=x.map(async e=>{let t=d.find(t=>t.id===e.categories[0]);if(!t){let s=await fetch("https://blog.comparea.ch/wp-json/wp/v2/categories/".concat(e.categories[0])),r=await s.json();t=r}let s=u.find(t=>t.id===e.featured_media);if(!s){let t=await fetch("https://blog.comparea.ch/wp-json/wp/v2/media/".concat(e.featured_media));s=await t.json()}let r=h.find(t=>t.id===e.author);if(!r){let t=await fetch("https://blog.comparea.ch/wp-json/wp/v2/users/".concat(e.author)),s=await t.json();r=s}return{...e,categories_resolved:[t],media_resolved:s,author_resolved:r}}),m=await Promise.all(p);l(m),t(!1),n(!1)}catch(e){console.log(e)}};return(0,i.useEffect)(()=>{let e=new AbortController;return fetchArticles(e),()=>{e.abort()}},[]),{loading:e,articles:a,loadingArticles:s,errorLoading:o}};var p=s(64901),blog_LastArticles=e=>{let{className:t,...s}=e,{articles:l,loading:o,errorLoading:n}=useLastArticles(),{t:i}=(0,p.$G)("common");return!n&&(0,r.jsx)("div",{className:(0,a.m6)("w-full bg-[#F8FCFC] px-4 py-[60px]",t),...s,children:(0,r.jsxs)("div",{className:"mx-auto flex max-w-6xl flex-col",children:[(0,r.jsx)("h2",{className:"mb-[28px] text-[32px] font-bold leading-9 md:text-[34px]",children:i("actualite.title")}),(0,r.jsxs)("div",{className:"flex flex-nowrap items-center gap-5 overflow-auto",children:[l.map(e=>(0,r.jsx)(blog_LastArticle,{article:e},e.id)),o&&[,,,].fill(0).map((e,t)=>(0,r.jsx)("div",{className:"h-[450px] w-[310px] animate-pulse rounded-lg bg-grey/30 md:w-[378px]"},t))]})]})})}},42688:function(e,t,s){var r=s(85893),a=s(25675),l=s.n(a),o=s(64901),n=s(98388),i=s(46214);t.Z=e=>{let{theme:t="glass",className:s,...a}=e,{t:c}=(0,o.$G)("common");return(0,r.jsxs)("div",{className:(0,n.m6)("flex w-fit items-center gap-2.5 rounded-lg p-[11.5px] md:p-[14px]","glass"===t?"rounded-md bg-[linear-gradient(160deg,rgba(87,97,105,0.32)-13%,rgba(255,255,255,0.00)109.31%)] text-white shadow-[0px,5px,100px,0px,rgba(57,59,63,0.50)] backdrop-blur-[50px]":"bg-white text-dark",s),children:[(0,r.jsx)(l(),{src:"/logo/google.svg",alt:"Google Review",width:50,height:50,className:"h-[41px] w-[41px] md:h-[50px] md:w-[50px]"}),(0,r.jsxs)("div",{className:"flex flex-col md:gap-1",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-1 text-lg font-bold md:text-[22px]",children:"5"}),(0,r.jsx)(i.G,{className:"h-5 w-5 md:h-6 md:w-6"}),(0,r.jsx)(i.G,{className:"h-5 w-5 md:h-6 md:w-6"}),(0,r.jsx)(i.G,{className:"h-5 w-5 md:h-6 md:w-6"}),(0,r.jsx)(i.G,{className:"h-5 w-5 md:h-6 md:w-6"}),(0,r.jsx)(i.G,{className:"h-5 w-5 md:h-6 md:w-6"})]}),(0,r.jsx)("p",{className:"text-[11.5px] md:text-[14px]",children:c("google_review")})]})]})}},83336:function(e,t,s){s.d(t,{H:function(){return r}});let r=[{key:"avis_1"},{key:"avis_2"},{key:"avis_3"}]},28336:function(e,t,s){s.d(t,{C:function(){return a}});var r=s(85893);let a=[{key:"item_1",icon:(0,r.jsx)(e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size,fill:"none",...e,viewBox:"0 0 42 42",children:[(0,r.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21.914 6.228V4.375M13.575 13.64h-1.853M32.105 13.64h-1.853M16.355 8.08l-1.31-1.31M27.472 8.08l1.31-1.31M16.187 21.676v14.199M25.67 21.676h3.934a3.727 3.727 0 0 1 3.64 4.529l-1.485 6.744a3.727 3.727 0 0 1-3.64 2.926"}),(0,r.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M28.12 35.875H10.968a1.864 1.864 0 0 1-1.864-1.864V23.54c0-1.03.835-1.864 1.864-1.864h5.236M25.67 21.676v-5.171c0-.942-.531-1.802-1.373-2.223l-.629-.314a3.106 3.106 0 0 0-4.142 1.342l-3.321 6.366"})]}),{size:42})},{key:"item_2",icon:(0,r.jsx)(e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size,fill:"none",...e,viewBox:"0 0 42 42",children:(0,r.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.5 3.5h7M15.75 17.5 21 22.75M35 8.75l-4.095 4.095M33.25 7l3.5 3.5M5.25 26.25H14M14 31.5H8.75M14 36.75h-1.75M7.469 19.25C9.023 13.216 14.479 8.75 21 8.75c7.732 0 14 6.268 14 14s-6.268 14-14 14"})}),{size:42})},{key:"item_3",icon:(0,r.jsx)(e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size,fill:"none",...e,viewBox:"0 0 42 42",children:[(0,r.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.25 21C5.25 12.3 12.3 5.25 21 5.25S36.75 12.3 36.75 21M36.75 21c0 8.7-7.05 15.75-15.75 15.75S5.25 29.7 5.25 21M14.875 15.75v1.75M27.125 15.75v1.75"}),(0,r.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M27.125 25.704S24.827 28 21 28c-3.829 0-6.125-2.296-6.125-2.296"})]}),{size:42})}]}}]);
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.