try{let 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]="6cf969ee-a697-447f-b11c-bb2b1f44ca65",e._sentryDebugIdIdentifier="sentry-dbid-6cf969ee-a697-447f-b11c-bb2b1f44ca65")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1393],{173:(e,t,r)=>{"use strict";function s(e,t){let r=function(e,t){try{if(e.startsWith("http://")||e.startsWith("https://"))return new URL(e),e;if(e.startsWith("/"))return new URL(e,window.location.origin).href;if(e.startsWith("//"))return new URL(e,window.location.protocol).href;if(!e.startsWith("/")&&!e.startsWith("http"))return new URL("/".concat(e),window.location.origin).href;return null}catch(t){return console.warn("Invalid URL detected:",e,t),null}}(t);if(!r)return console.warn("Attempted to navigate to invalid URL:",t),!1;try{return e.push(r),!0}catch(e){return console.error("Navigation failed:",e),!1}}r.d(t,{LI:()=>s})},14916:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r(83982);function n(e){let{maxWidth:t,minScale:r=.1,debounceMs:n=100}=e,[a,i]=(0,s.useState)(1),l=(0,s.useRef)(void 0),o=(0,s.useCallback)(()=>{i(Math.min(.95,Math.max(r,window.innerWidth/t)))},[t,r]);return(0,s.useEffect)(()=>{let e=()=>l.current&&clearTimeout(l.current),t=()=>{e(),l.current=setTimeout(o,n)};return o(),window.addEventListener("resize",t,{passive:!0}),()=>{e(),window.removeEventListener("resize",t)}},[o,n]),a}},33313:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HomeNewsletterSignup:()=>f});var s=r(48958),n=r(83982),a=r(85631),i=r(42997),l=r(53022),o=r(173),c=r(45368);let d=(0,n.memo)(function(){let[e,t]=(0,n.useState)(""),[r,a]=(0,n.useState)(!1),i=(0,c.useRouter)(),d=async t=>{if(t.preventDefault(),!r){a(!0);try{let t=await fetch("https://app.convertkit.com/forms/1862996/subscriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email_address:e})}),r={ok:t.ok,error:t.ok?void 0:await t.text()};r.ok?(0,o.LI)(i,"https://luca-dellanna.com/welcome"):(console.error("Subscription failed:",r.error),alert("Subscription failed. Please try again."))}catch(e){console.error("Error:",e),alert("An error occurred. Please try again later.")}finally{a(!1)}}};return(0,s.jsx)("form",{onSubmit:d,className:"mx-auto md:max-w-none flex px-2 my-2 md:my-4 items-center justify-center","aria-label":"Newsletter subscription form",children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsxs)("div",{id:"ck-form",className:"flex flex-col sm:flex-row gap-2 items-center sm:items-center",children:[(0,s.jsx)("input",{type:"email",value:e,onChange:e=>t(e.target.value),placeholder:"Your email",required:!0,className:"small-ck-input w-full min-h-10 sm:h-8 max-w-none sm:max-w-xs shrink text-sm px-2 py-2 sm:py-1 rounded-md border border-gray-300 focus:outline-hidden focus:ring-2 focus:ring-focus","aria-label":"Email address",disabled:r}),(0,s.jsx)(l.T,{type:"submit",color:"primary",className:"min-w-max min-h-10 sm:h-8 btn-primary flex-1 px-4 py-2 sm:py-0 text-sm font-semibold rounded-md",disabled:r,children:r?"Joining...":"Join 25,000+ readers"})]})})})});var m=r(78251);let u={title:"Subscribe to my newsletter",description:"Expect 1-2 emails per month. No spam. Subscribe anytime."},h=()=>(0,s.jsxs)("div",{className:"mx-auto",children:[(0,s.jsx)("h2",{className:"mb-2 text-xl md:text-2xl",children:u.title}),(0,s.jsx)(d,{}),(0,s.jsx)("p",{className:"text-center text-xs",children:u.description})]}),f=(0,n.memo)(function(){let e=m.Y.find(e=>e.object.includes("Luca"))||null,[t,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{r(!0)},[]),(0,s.jsxs)(a.a,{orientation:"horizontal",children:[(0,s.jsx)(h,{}),e&&t&&(0,s.jsx)("div",{className:"hidden md:block",children:(0,s.jsx)(i.ReviewCard,{review:e,showRating:!1,showBorder:!1})})]})})},39697:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var s=r(48958),n=r(83982),a=r(72807),i=r.n(a);let l={viewAll:"View all my posts"},o=(0,n.memo)(function(){return(0,s.jsx)(i(),{href:"/blog",className:"no-underline hover:opacity-80 transition-opacity",children:(0,s.jsx)("p",{className:"text-xs text-center italic text-muted mt-2",children:l.viewAll})})});function c(e){let{post:t}=e;return(0,s.jsx)(i(),{href:"/posts/".concat(t.slug),children:(0,s.jsx)("p",{className:"text-[0.8rem] leading-4 my-1",children:t.title})})}function d(e){let{posts:t}=e;return t&&0!==t.length?(0,s.jsxs)("nav",{"aria-label":"Blog posts list",children:[t.map(e=>(0,s.jsx)("div",{className:"mb-2",children:(0,s.jsx)(c,{post:e})},e.slug)),(0,s.jsx)(o,{})]}):(0,s.jsx)("p",{className:"text-gray-500","aria-label":"No posts available",children:"No posts available."})}var m=r(85631),u=r(48083);let h={title:"My top posts",loading:"Loading..."},f=(0,n.memo)(function(){let[e,t]=(0,n.useState)([]),[r,a]=(0,n.useState)(!0),[i,l]=(0,n.useState)(null);return((0,n.useEffect)(()=>{!async function(){try{let e=await (0,u.K)(void 0,4);t(e),l(null)}catch(e){console.error("Error fetching posts:",e),l(e instanceof Error?e:Error("Failed to fetch posts"))}finally{a(!1)}}()},[]),i)?(0,s.jsxs)(m.a,{orientation:"vertical",className:"w-full md:max-w-72 content-start",children:[(0,s.jsx)("h3",{className:"text-xl font-bold mt-0 mb-4",children:h.title}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Unable to load posts at this time."})]}):(0,s.jsxs)(m.a,{orientation:"vertical",className:"w-full md:max-w-72 content-start",children:[(0,s.jsx)("h3",{className:"text-xl font-bold mt-0 mb-4",children:h.title}),r?(0,s.jsx)("p",{children:h.loading}):(0,s.jsx)(d,{posts:e})]})})},48083:(e,t,r)=>{"use strict";r.d(t,{K:()=>n});var s=r(4906);let n=(0,s.createServerReference)("70ed40074f3c7b47478fa17d40f2d1e364ce3ce23a",s.callServer,void 0,s.findSourceMapURL,"getPosts")},76511:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,72807,23)),Promise.resolve().then(r.t.bind(r,44320,23)),Promise.resolve().then(r.bind(r,68001)),Promise.resolve().then(r.bind(r,75964)),Promise.resolve().then(r.bind(r,39697)),Promise.resolve().then(r.bind(r,33313)),Promise.resolve().then(r.bind(r,88480))},85631:(e,t,r)=>{"use strict";r.d(t,{a:()=>l});var s=r(48958),n=r(78262);let a={normal:"border-slate-400 shadow-md",strong:"border-black shadow-lg"},i={horizontal:"flex-row",vertical:"flex-col"};function l(e){let{orientation:t,children:r,className:l,id:o,style:c="normal"}=e;return(0,s.jsx)("div",{id:o,className:(0,n.QP)("max-w-3xl flex-1 mx-auto flex gap-4 items-center justify-center p-4 border rounded-lg",a[c],i[t],l),children:r})}},88480:(e,t,r)=>{"use strict";r.d(t,{LogoReel:()=>m});var s=r(48958),n=r(83982);let a=e=>{let{side:t,className:r,width:n}=e;return(0,s.jsx)("div",{className:"".concat(r," ").concat(n," ").concat(t,"-0 bg-gradient-to-").concat("left"===t?"r":"l"," from-white to-transparent"),"aria-hidden":"true"})},i=(0,n.memo)(function(e){let{width:t}=e,r="absolute top-0 bottom-0 pointer-events-none";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{side:"left",className:r,width:t}),(0,s.jsx)(a,{side:"right",className:r,width:t})]})});var l=r(62467),o=r(14916);let c={width:100,height:50},d=(0,n.memo)(function(e){let{logo:t,index:r}=e;return(0,s.jsx)("div",{className:"shrink-0 mx-4",children:(0,s.jsx)(l.default,{src:t.src,alt:t.alt,width:c.width,height:c.height,sizes:"(max-width: 768px) 100px, 100px",quality:85,className:"h-12 w-auto object-contain",onError:e=>{e.target.style.display="none"}})})}),m=(0,n.memo)(function(e){let{logos:t}=e,r=(0,n.useRef)(null),a=Array.isArray(t)&&t.length>0,l=a?Array.from({length:4},()=>t).flat():[],m=a?c.width*t.length*4:0,u=(0,o.A)({maxWidth:m}),h=(0,n.useCallback)(()=>{let e=r.current;if(!e)return;let t=e.scrollWidth;e.style.setProperty("--scroll-width","".concat(t,"px"))},[]);return((0,n.useEffect)(()=>{var e;if(!a)return;h();let t=()=>{requestAnimationFrame(h)};window.addEventListener("resize",t);let s=null==(e=r.current)?void 0:e.getElementsByTagName("img");return s&&Promise.all(Array.from(s).map(e=>e.complete||new Promise(t=>{e.onload=t,e.onerror=t}))).then(h),()=>window.removeEventListener("resize",t)},[h,a]),a)?(0,s.jsxs)("div",{className:"w-[95vw] max-w-full overflow-hidden bg-white mt-4 relative",children:[(0,s.jsx)("div",{className:"flex animate-scroll max-w-full",ref:r,style:{transform:"scale(".concat(u,")"),transformOrigin:"left center"},role:"marquee","aria-label":"Logo reel",children:l.map((e,t)=>(0,s.jsx)(d,{logo:e,index:t},"logo-".concat(e.alt,"-").concat(t)))}),(0,s.jsx)(i,{width:"w-24"})]}):null})}},e=>{e.O(0,[1675,4320,3022,7913,1287,7942,6293,7358],()=>e(e.s=76511)),_N_E=e.O()}]);