try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="65705590-3a88-4ab5-b04e-f5c757eb4f3a",e._sentryDebugIdIdentifier="sentry-dbid-65705590-3a88-4ab5-b04e-f5c757eb4f3a")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[803],{25992:(e,t,r)=>{"use strict";r.d(t,{LoadingSpinner:()=>a});var s=r(11824),l=r(58427);function a(){return(0,s.jsx)(l.P,{})}},39973:(e,t,r)=>{"use strict";r.d(t,{BlogHeaderClient:()=>n});var s=r(11824),l=r(74109),a=r.n(l);function n(){return(0,s.jsxs)("div",{className:"max-w-3xl mx-auto",children:[(0,s.jsx)("h1",{className:"text-3xl font-bold mb-2",children:"Blog Posts"}),(0,s.jsx)("p",{className:"text-base text-center italic mb-4",children:"by Luca Dellanna"}),(0,s.jsxs)("p",{className:"text-center text-xs italic mb-4",children:["Make sure you're subscribed to"," ",(0,s.jsx)(a(),{href:"/newsletter",children:"my newsletter"})," to get the latest posts!"]})]})}},58427:(e,t,r)=>{"use strict";r.d(t,{P:()=>i});var s=r(11824);r(79100);var l=r(3354);let a={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"},n={primary:"text-primary",secondary:"text-muted",success:"text-success",warning:"text-warning",danger:"text-error"};function i(e){let{size:t="md",color:r="primary",className:i,"aria-label":d="Loading..."}=e;return(0,s.jsx)("div",{className:(0,l.QP)("inline-block",a[t],i),role:"status","aria-label":d,children:(0,s.jsxs)("svg",{className:(0,l.QP)("animate-spin",a[t],n[r]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})}},77428:(e,t,r)=>{Promise.resolve().then(r.bind(r,39973)),Promise.resolve().then(r.bind(r,96401)),Promise.resolve().then(r.bind(r,25992))},82422:(e,t,r)=>{"use strict";r.d(t,{E:()=>d});var s=r(11824);r(79100);var l=r(3354);let a={default:"bg-gray-100 text-gray-800 border border-gray-200",primary:"bg-primary text-white border border-primary",secondary:"bg-gray-200 text-gray-700 border border-gray-400",success:"bg-success-light text-green-800 border border-success-border",warning:"bg-warning-light text-yellow-800 border border-warning-border",danger:"bg-error-light text-red-800 border border-error-border",info:"bg-info-light text-blue-800 border border-info-border",bordered:"bg-white text-gray-700 border-2 border-gray-400"},n={sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"},i={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"};function d(e){let{children:t,className:r,variant:d="default",size:o="md",rounded:c="md"}=e,x=(0,l.QP)("inline-flex items-center font-medium",a[d],n[o],i[c],r);return(0,s.jsx)("span",{className:x,children:t})}},96401:(e,t,r)=>{"use strict";r.d(t,{BlogListWithFilter:()=>y});var s=r(11824),l=r(79100),a=r(82422),n=r(97695);let i="text-xs text-nowrap rounded-md px-1 py-0.5",d=(0,l.memo)(e=>{let{stars:t,index:r}=e,l=((e,t)=>e>=2?{text:"Most popular",className:"".concat(i," text-rose-600 border border-rose-600")}:e>=1||0===t&&e>0?{text:"Popular",className:"".concat(i," text-orange-600 border border-orange-600")}:0===e&&0===t?{text:"Most recent",className:"".concat(i," text-orange-600 border border-orange-600")}:null)(t,r);return l?(0,s.jsx)("span",{className:l.className,children:l.text}):null});d.displayName="BlogpostCardTitle";var o=r(74109),c=r.n(o);function x(e){let{post:t,index:r}=e,{title:a,slug:i,stars:o,description:x,date:m,tags:u}=t;return(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(n.Zp,{variant:"shadow",className:"cursor-pointer min-h-48 h-full hover:shadow-lg transition-shadow",children:(0,s.jsxs)(c(),{href:"/posts/".concat(i),className:"no-underline",children:[(0,s.jsx)(n.aR,{children:(0,s.jsxs)("div",{className:"w-full flex justify-between items-start gap-2",children:[(0,s.jsx)("h3",{className:"text-left text-balance font-semibold text-gray-900 text-sm md:text-base flex-1 min-w-0 line-clamp-2",children:a}),(0,s.jsx)("div",{className:"flex-shrink-0",children:(0,s.jsx)(d,{stars:o,index:r})})]})}),(0,s.jsxs)(n.bw,{children:[(0,s.jsx)("p",{className:"text-sm line-clamp-3",children:x}),(0,s.jsxs)("div",{className:"flex justify-between items-start mt-1 gap-2",children:[u.length>0&&(0,s.jsx)("p",{className:"text-xs text-muted flex-1 min-w-0",children:u.map((e,t)=>(0,s.jsxs)(l.Fragment,{children:[t>0&&" ","#",e]},"".concat(e,"-").concat(t)))}),(0,s.jsx)("span",{className:"text-xs text-muted flex-shrink-0",children:m})]})]})]})})})}function m(e){let{posts:t,showFooter:r=!1}=e,l=t&&t.length>0;return(0,s.jsxs)("div",{className:"flex w-full flex-col gap-3 justify-center",children:[l&&(0,s.jsx)("div",{className:"w-full mx-auto grid grid-cols-1 md:grid-cols-2 gap-3 md:gap-4",children:t.map((e,t)=>(0,s.jsx)(x,{post:e,index:t},e.slug))}),r&&(0,s.jsxs)("footer",{className:"flex flex-col gap-2 mt-4",children:[(0,s.jsxs)("p",{className:"text-xs text-muted text-center text-balance !my-0",children:["I will add more posts soon (subscribe to"," ",(0,s.jsx)(c(),{href:"/newsletter",children:"my newsletter"})," to be notified)."]}),(0,s.jsxs)("p",{className:"text-xs text-muted text-center text-balance !my-0",children:["Click ",(0,s.jsx)(c(),{href:"/blog",children:"here"})," to view all of my posts."]})]})]})}function u(e){return e.split("-").map(e=>{let t=e.toLowerCase();return"and"===t?t:t.charAt(0).toUpperCase()+t.slice(1)}).join(" ")}let g={container:"max-h-[30vh] md:max-h-[700px] overflow-y-auto relative z-10 bg-white pb-4",header:"absolute top-0 left-0 right-0 bg-white text-center text-sm font-semibold text-muted mb-2 z-20",tagList:"flex flex-wrap items-center justify-center gap-2 overflow-y-auto pt-6 pb-2",filterText:"text-center text-sm text-muted mb-4",clearLink:"text-focus hover:underline"},h=(0,l.memo)(e=>{let{tagFilter:t}=e;return(0,s.jsxs)("p",{className:g.filterText,children:["Showing posts tagged with:"," ",(0,s.jsx)("span",{className:"font-semibold",children:t})," ",(0,s.jsx)(c(),{href:"/blog",className:g.clearLink,children:"(clear filter)"})]})}),b=(0,l.memo)(e=>{let{tags:t}=e;return(0,s.jsxs)("div",{className:g.container,children:[(0,s.jsx)("p",{className:g.header,children:"Filter by tag:"}),(0,s.jsx)("div",{className:g.tagList,children:t.sort((e,t)=>t.count-e.count).map(e=>(0,s.jsx)(f,{...e},e.tag))})]})}),f=(0,l.memo)(e=>{let{tag:t,count:r}=e;return(0,s.jsx)(c(),{href:"/blog?tag=".concat(t),className:"no-underline",children:(0,s.jsxs)(a.E,{variant:"secondary",size:"sm",rounded:"full",className:"hover:bg-gray-100 transition-colors",children:[u(t).length>20?"".concat(u(t).substring(0,20),"..."):u(t)," ","(",r,")"]})})});h.displayName="FilterAppliedText",b.displayName="FilterNotAppliedText",f.displayName="TagLink";var p=r(2462);function j(e){let{tags:t,tagFilter:r}=e;return(0,s.jsx)("div",{className:"block lg:hidden sticky top-14 z-30 -mx-4 px-4 py-2 mb-3 bg-white border-b border-gray-200",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-muted flex-shrink-0",children:"Filter by:"}),(0,s.jsx)("div",{className:"flex-1 overflow-x-auto scrollbar-hide",children:(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 w-max pr-2",children:[r&&(0,s.jsx)(c(),{href:"/blog",className:"no-underline",children:(0,s.jsx)(a.E,{size:"sm",rounded:"full",variant:"bordered",children:"Clear"})}),t.toSorted((e,t)=>t.count-e.count).map(e=>(0,s.jsx)(c(),{href:"/blog?tag=".concat(e.tag),className:"no-underline",children:(0,s.jsxs)(a.E,{size:"sm",rounded:"full",variant:"secondary",children:[e.tag," (",e.count,")"]})},e.tag))]})})]})})}function w(e){let{posts:t,tags:r,initialTag:a}=e,n=(0,p.useSearchParams)(),[i,d]=(0,l.useState)(t),[o,c]=(0,l.useState)(a);return(0,l.useEffect)(()=>{let e=null==n?void 0:n.get("tag");c(e||""),d(function(e,t){if(!(null==e?void 0:e.length))return[];if(!t||Array.isArray(t)&&!t.length)return e;let r=new Set((Array.isArray(t)?t:[t]).map(e=>e.toLowerCase()));return 0===r.size?e:e.filter(e=>e.tags.some(e=>r.has(e.toLowerCase())))}(t,e?[e]:void 0))},[n,t]),(0,s.jsxs)("div",{className:"relative mx-auto max-w-6xl",children:[(0,s.jsx)(j,{tags:r,tagFilter:o||void 0}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_20rem] gap-6 items-start",children:[(0,s.jsx)(m,{posts:i,showFooter:!0}),(0,s.jsxs)("aside",{className:"hidden lg:block sticky top-20 self-start border border-gray-400 rounded-lg bg-white p-3",children:[o?(0,s.jsx)(h,{tagFilter:o}):null,(0,s.jsx)(b,{tags:r})]})]})]})}function y(e){return(0,s.jsx)(l.Suspense,{fallback:(0,s.jsx)("div",{children:"Loading..."}),children:(0,s.jsx)(w,{...e})})}},97695:(e,t,r)=>{"use strict";r.d(t,{Zp:()=>o,aR:()=>c,bw:()=>x,wL:()=>m});var s=r(11824),l=r(79100),a=r(3354);let n={default:"bg-white",bordered:"bg-white border border-gray-300",shadow:"bg-white shadow-md border border-gray-300",elevated:"bg-white shadow-lg border border-gray-300"},i={none:"",sm:"p-2",md:"p-4",lg:"p-6"},d={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},o=l.forwardRef(function(e,t){let{children:r,className:l,as:o="div",href:c,onClick:x,variant:m="default",padding:u="md",rounded:g="lg",style:h}=e,b={className:(0,a.QP)("transition-all duration-200",n[m],i[u],d[g],l),...x&&{onClick:x},...c&&{href:c},...h&&{style:h},ref:t};return(0,s.jsx)(o,{...b,children:r})});function c(e){let{children:t,className:r,padding:l="md"}=e;return(0,s.jsx)("div",{className:(0,a.QP)("flex flex-col gap-1",i[l],r),children:t})}function x(e){let{children:t,className:r,padding:l="md",style:n}=e;return(0,s.jsx)("div",{className:(0,a.QP)("flex flex-col gap-2",i[l],r),style:n,children:t})}function m(e){let{children:t,className:r,padding:l="md"}=e;return(0,s.jsx)("div",{className:(0,a.QP)("flex items-center justify-between",i[l],r),children:t})}}},e=>{e.O(0,[3354,2162,8628,99,7358],()=>e(e.s=77428)),_N_E=e.O()}]);