1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7454],{9778:(e,l,t)=>{"use strict";t.d(l,{A:()=>a});var r=t(95155),s=t(12115);let a=e=>{let{value:l=0,size:t=16,max:a=5}=e,i=(0,s.useId)(),o=Math.max(0,Math.min(a,l)),n=Math.floor(o),c=o-n>=.5,d=[...Array(n).fill("full"),...c?["half"]:[],...Array(a-n-!!c).fill("empty")];return(0,r.jsxs)("div",{className:"flex items-center","aria-hidden":0===l,children:[d.map((e,l)=>(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"full"===e?"currentColor":"none",stroke:"currentColor",strokeWidth:1.2,className:"text-emerald-600 ".concat("half"===e?"opacity-100":""," mr-0.5"),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:["full"===e&&(0,r.jsx)("path",{d:"M12 .587l3.668 7.431L23.4 9.75l-5.7 5.556L18.836 24 12 20.201 5.164 24l1.136-8.694L.6 9.75l7.732-1.732L12 .587z"}),"half"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:"half-".concat(i),x1:"0",x2:"1",children:[(0,r.jsx)("stop",{offset:"50%",stopColor:"currentColor"}),(0,r.jsx)("stop",{offset:"50%",stopColor:"#e5e7eb"})]})}),(0,r.jsx)("path",{fill:"url(#half-".concat(i,")"),d:"M12 .587l3.668 7.431L23.4 9.75l-5.7 5.556L18.836 24 12 20.201 5.164 24l1.136-8.694L.6 9.75l7.732-1.732L12 .587z"}),(0,r.jsx)("path",{fill:"none",d:"M12 .587l3.668 7.431L23.4 9.75l-5.7 5.556L18.836 24 12 20.201 5.164 24l1.136-8.694L.6 9.75l7.732-1.732L12 .587z",stroke:"currentColor"})]}),"empty"===e&&(0,r.jsx)("path",{d:"M12 .587l3.668 7.431L23.4 9.75l-5.7 5.556L18.836 24 12 20.201 5.164 24l1.136-8.694L.6 9.75l7.732-1.732L12 .587z"})]},l)),(0,r.jsxs)("span",{className:"sr-only",children:[l," out of ",a]})]})}},75161:(e,l,t)=>{"use strict";t.d(l,{Q:()=>s});var r=t(30926);let s=(0,r.createServerReference)("7f31fb3fec35901fb1806f3f5b665d76e90c1b558e",r.callServer,void 0,r.findSourceMapURL,"revalidateSyncTags")},82412:(e,l,t)=>{Promise.resolve().then(t.bind(t,86895)),Promise.resolve().then(t.bind(t,45082)),Promise.resolve().then(t.bind(t,95028)),Promise.resolve().then(t.bind(t,98061))},86895:(e,l,t)=>{"use strict";t.d(l,{default:()=>c});var r=t(95155),s=t(52619),a=t.n(s),i=t(15239),o=t(12115),n=t(9778);function c(e){let{posts:l,locale:t}=e,[s,c]=(0,o.useState)(""),d=t.startsWith("fr")?"fr":"en",h={title:"fr"===d?"Blog Draftly":"Draftly Blog",desc:"fr"===d?"Guides et analyses pour le v\xe9lo dâoccasion.":"Guides and insights for used bikes.",searchPh:"fr"===d?"Rechercher un articleâ¦":"Search an articleâ¦",updated:"fr"===d?"Publi\xe9 le":"Published",noResult:"fr"===d?"Aucun r\xe9sultat.":"No results."},m=(0,o.useMemo)(()=>l.map(e=>{var l;return{...e,summary:(null==(l=e.excerpt)?void 0:l.trim())||function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:220;if(!Array.isArray(e))return"";let t=[];for(let r of e)if(r&&"block"===r._type&&Array.isArray(r.children)){let e=r.children||[];if(t.push(e.map(e=>e.text||"").join("")),t.join(" ").length>l)break}let r=t.join(" ").replace(/\s+/g," ").trim();return r?r.length>l?r.slice(0,l).trimEnd()+"â¦":r:""}(e.body)}}),[l]),u=(0,o.useMemo)(()=>{let e=s.trim().toLowerCase();return e?m.filter(l=>{let t=(l.categories||[]).map(e=>e.title);return[l.title,l.summary,...t].filter(Boolean).join(" ").toLowerCase().includes(e)}):m},[s,m]),f={};u.forEach(e=>{if(e.categories&&e.categories.length>0)e.categories.forEach(l=>{let t=l.title,r="number"==typeof l.order?l.order:999;f[t]||(f[t]={title:t,order:r,posts:[]}),f[t].posts.push(e)});else{let l="fr"===d?"Non class\xe9":"Uncategorized";f[l]||(f[l]={title:l,order:1e4,posts:[]}),f[l].posts.push(e)}});let x=Object.values(f).sort((e,l)=>e.order-l.order||e.title.localeCompare(l.title));return(0,r.jsx)("main",{className:"px-4 bg-gray-50",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto pt-32 pb-24",children:[(0,r.jsxs)("div",{className:"bg-[#004728] rounded-2xl px-8 py-12 mb-12 flex flex-col items-center justify-center",children:[(0,r.jsx)("h1",{className:"text-3xl font-bold mb-2 text-white text-center",children:h.title}),(0,r.jsx)("p",{className:"text-gray-100 mb-6 text-center",children:h.desc}),(0,r.jsxs)("div",{className:"mb-2 w-full flex justify-center",children:[(0,r.jsx)("label",{htmlFor:"q",className:"sr-only",children:h.searchPh}),(0,r.jsx)("input",{id:"q",value:s,onChange:e=>c(e.target.value),placeholder:h.searchPh,className:"w-full md:w-96 rounded-xl border border-gray-200 bg-white px-4 py-3 outline-none focus:ring-2 focus:ring-emerald-500 text-center"})]})]}),0===u.length?(0,r.jsx)("p",{className:"text-gray-600",children:h.noResult}):x.map(e=>(0,r.jsxs)("section",{className:"mb-12",children:[(0,r.jsx)("h2",{className:"text-xl font-bold mb-6 text-emerald-700",children:e.title}),(0,r.jsx)("div",{className:"grid gap-8 sm:grid-cols-2 lg:grid-cols-3",children:e.posts.map(e=>(0,r.jsxs)("article",{className:"bg-white rounded-xl shadow hover:shadow-lg transition p-4",children:[(e.ogImageUrl||e.coverImageUrl)&&(0,r.jsx)("div",{className:"relative w-full aspect-[16/9] mb-3",children:(0,r.jsx)(i.default,{src:e.ogImageUrl||e.coverImageUrl,alt:(e.ogImageUrl?e.ogImageAlt:e.coverImageAlt)||e.title,fill:!0,className:"object-cover rounded-lg",sizes:"(min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:(0,r.jsx)(a(),{href:"/".concat(t,"/blog/").concat(e.slug),className:"hover:text-emerald-700",children:e.title})}),"number"==typeof e.rating&&e.rating>0&&(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)(n.A,{value:e.rating,size:14})}),e.publishedAt&&(0,r.jsxs)("p",{className:"text-xs text-gray-500 mb-2",children:[h.updated," ",new Date(e.publishedAt).toLocaleDateString("fr"===d?"fr-FR":"en-GB",{day:"2-digit",month:"short",year:"numeric"})]}),e.summary&&(0,r.jsx)("p",{className:"text-gray-600 line-clamp-3",children:e.summary})]},e.slug))})]},e.title))]})})}}},e=>{e.O(0,[2619,8478,6394,3276,8441,1255,7358],()=>e(e.s=82412)),_N_E=e.O()}]);
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.