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]="2954aeb0-4c39-42cb-b6bf-9992c47f9ef2",e._sentryDebugIdIdentifier="sentry-dbid-2954aeb0-4c39-42cb-b6bf-9992c47f9ef2")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1393,9962],{2987:(e,t,r)=>{"use strict";r.d(t,{default:()=>a.a});var n=r(30080),a=r.n(n)},8805:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HomeNewsletterSignup:()=>c});var n=r(99702),a=r(26294),i=r(31372),o=r(32704),l=r(30863);let s={title:"Subscribe to my newsletter",description:"Expect 1-2 emails per month. No spam. Subscribe anytime."},c=(0,a.memo)(function(){let e=(0,a.useMemo)(()=>l.Y.find(e=>e.object.includes("Luca"))||null,[]);return(0,n.jsx)("div",{className:"w-full max-w-3xl p-3 widget-border h-full",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4 items-center h-full",children:[(0,n.jsxs)("div",{className:"w-full text-center",children:[(0,n.jsx)("h3",{className:"mb-3 text-lg font-semibold",children:s.title}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(i.ConvertkitForm,{}),(0,n.jsx)("p",{className:"mt-2 text-xs text-center text-balance text-gray-500 leading-snug",children:s.description})]})]}),e&&(0,n.jsx)("div",{className:"w-full flex justify-center",children:(0,n.jsx)(o.ReviewCard,{review:e,showRating:!1,showBorder:!1,variant:"carousel"})})]})})})},12159:(e,t,r)=>{"use strict";r.d(t,{K:()=>a});var n=r(15554);let a=(0,n.createServerReference)("70f931083f4d13aeb3f770386a32471eab9c4e735d",n.callServer,void 0,n.findSourceMapURL,"getPosts")},14058:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(99702),a=r(26294),i=r(43231),o=r.n(i);let l={viewAll:"View all my posts"},s=(0,a.memo)(function(){return(0,n.jsx)(o(),{href:"/blog",className:"no-underline hover:opacity-80 transition-opacity",children:(0,n.jsx)("p",{className:"text-xs text-center italic text-muted mt-2",children:l.viewAll})})});function c(e){let{post:t}=e;return(0,n.jsx)(o(),{href:"/posts/".concat(t.slug),children:(0,n.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,n.jsxs)("nav",{"aria-label":"Blog posts list",children:[t.map(e=>(0,n.jsx)("div",{className:"mb-2",children:(0,n.jsx)(c,{post:e})},e.slug)),(0,n.jsx)(s,{})]}):(0,n.jsx)("p",{className:"text-gray-500","aria-label":"No posts available",children:"No posts available."})}var u=r(12159);let f={title:"My top posts",loading:"Loading..."},m=(0,a.memo)(function(){let[e,t]=(0,a.useState)([]),[r,i]=(0,a.useState)(!0),[o,l]=(0,a.useState)(null);return((0,a.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{i(!1)}}()},[]),o)?(0,n.jsxs)("div",{className:"flex-1 mx-auto flex flex-col gap-3 items-center justify-center p-3 widget-border w-full content-start h-full",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-center mb-2",children:f.title}),(0,n.jsx)("p",{className:"text-sm text-muted",children:"Unable to load posts at this time."})]}):(0,n.jsxs)("div",{className:"flex-1 mx-auto flex flex-col gap-3 items-center justify-center p-3 widget-border w-full content-start h-full",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-center mb-2",children:f.title}),r?(0,n.jsx)("p",{children:f.loading}):(0,n.jsx)(d,{posts:e})]})})},15554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{callServer:function(){return n.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}});let n=r(56789),a=r(40093),i=r(85108)},17581:(e,t,r)=>{"use strict";r.d(t,{$:()=>s});var n=r(99702);r(26294);var a=r(6466);let i={primary:"bg-primary !text-white hover:bg-primary-hover shadow-md hover:shadow-lg font-semibold focus:ring-2 focus:ring-primary focus:ring-offset-2",secondary:"bg-transparent !text-primary border border-primary hover:bg-primary hover:text-white hover:shadow-md focus:ring-2 focus:ring-primary focus:ring-offset-2",outline:"bg-transparent text-gray-700 border border-gray-300 hover:bg-gray-50 focus:ring-2 focus:ring-gray-300 focus:ring-offset-2",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-2 focus:ring-gray-300 focus:ring-offset-2",danger:"bg-error !text-white hover:bg-error-hover shadow-md hover:shadow-lg font-semibold focus:ring-2 focus:ring-error focus:ring-offset-2"},o={sm:"px-3 py-1.5 text-sm rounded-md min-h-[32px]",md:"px-4 py-2 text-base rounded-md min-h-[40px]",lg:"px-6 py-3 text-lg rounded-lg min-h-[48px]"},l=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin","aria-hidden":"true"}),(0,n.jsx)("span",{children:"Loading..."})]});function s(e){let{children:t,className:r,variant:s="primary",size:c="md",disabled:d=!1,loading:u=!1,"aria-label":f}=e,m=(0,a.QP)("inline-flex items-center justify-center gap-2 transition-all duration-200","focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed","hover:scale-105 active:scale-95 disabled:hover:scale-100","font-medium leading-none",i[s],o[c],r),h=d||u;if("href"in e){let{children:r,className:a,variant:i,size:o,disabled:s,loading:c,"aria-label":d,href:g,target:b,rel:p,onClick:x,...v}=e,y="_blank"===b?[...new Set(["noopener","noreferrer",...(p||"").split(" ")])].filter(Boolean).join(" "):p;return(0,n.jsx)("a",{href:h?void 0:g,className:m,target:h?void 0:b,rel:h?void 0:y,tabIndex:h?-1:void 0,onClick:h?e=>e.preventDefault():x,"aria-label":f,"aria-disabled":h,...v,children:u?l:t})}let{children:g,className:b,variant:p,size:x,disabled:v,loading:y,"aria-label":w,type:j="button",onClick:N,..._}=e;return(0,n.jsx)("button",{className:m,disabled:h,type:j,onClick:h?void 0:N,"aria-label":f,"aria-disabled":h,..._,children:u?l:t})}},24340:(e,t,r)=>{"use strict";function n(e){let{moduleIds:t}=e;return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return n}}),r(99702),r(20707),r(25315),r(75018)},25315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=r(97113)},29191:(e,t,r)=>{"use strict";r.d(t,{Zp:()=>c,aR:()=>d,bw:()=>u,wL:()=>f});var n=r(99702),a=r(26294),i=r(6466);let o={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"},l={none:"",sm:"p-2",md:"p-4",lg:"p-6"},s={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},c=a.forwardRef(function(e,t){let{children:r,className:a,as:c="div",href:d,onClick:u,variant:f="default",padding:m="md",rounded:h="lg",style:g}=e,b={className:(0,i.QP)("transition-all duration-200",o[f],l[m],s[h],a),...u&&{onClick:u},...d&&{href:d},...g&&{style:g},ref:t};return(0,n.jsx)(c,{...b,children:r})});function d(e){let{children:t,className:r,padding:a="md"}=e;return(0,n.jsx)("div",{className:(0,i.QP)("flex flex-col gap-1",l[a],r),children:t})}function u(e){let{children:t,className:r,padding:a="md",style:o}=e;return(0,n.jsx)("div",{className:(0,i.QP)("flex flex-col gap-2",l[a],r),style:o,children:t})}function f(e){let{children:t,className:r,padding:a="md"}=e;return(0,n.jsx)("div",{className:(0,i.QP)("flex items-center justify-between",l[a],r),children:t})}},30080:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},getImageProps:function(){return l}});let n=r(93971),a=r(19108),i=r(84792),o=n._(r(144));function l(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],qualities:[25,50,75,85,100],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let s=i.Image},30414:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(26294);let a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},i=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:s,className:c="",children:d,iconNode:u,...f}=e;return(0,n.createElement)("svg",{ref:t,...o,width:a,height:a,stroke:r,strokeWidth:s?24*Number(l)/Number(a):l,className:i("lucide",c),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(f)&&{"aria-hidden":"true"},...f},[...u.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),s=(e,t)=>{let r=(0,n.forwardRef)((r,o)=>{let{className:s,...c}=r;return(0,n.createElement)(l,{ref:o,iconNode:t,className:i("lucide-".concat(a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),s),...c})});return r.displayName=a(e),r}},32704:(e,t,r)=>{"use strict";r.d(t,{ReviewCard:()=>d});var n=r(99702),a=r(29191),i=r(2987);let o=(0,r(26294).memo)(function(e){var t;let{author:r}=e;if(!r)return null;let a=null==(t=r.image)?void 0:t.trim(),o=(null==a?void 0:a.startsWith("/"))?a:a?"/".concat(a):void 0;return(0,n.jsxs)("div",{className:"flex items-center flex-shrink-0 h-8 text-center",children:[o&&(0,n.jsx)("div",{className:"w-8 h-8 rounded-full border border-slate-400 overflow-hidden shrink-0",children:(0,n.jsx)(i.default,{src:o,alt:"Avatar of ".concat(r.name),width:32,height:32,sizes:"32px",quality:85,className:"w-full h-full object-cover"})}),(0,n.jsxs)("div",{className:"".concat(o?"ml-2":""," flex flex-col justify-center"),children:[(0,n.jsx)("p",{className:"my-0 text-xs leading-none",children:r.name}),r.description&&(0,n.jsx)("p",{className:"my-0 text-[10px] leading-3 text-muted mt-0.5",children:r.description})]})]})});var l=r(43744),s=r(6466);let c={carousel:{base:"w-52 md:w-72 h-48 cursor-pointer",bordered:"border border-border shadow-sm",borderless:"shadow-none"},books:{base:"w-48 md:w-64 h-40",bordered:"border border-border-strong shadow-md",borderless:"shadow-none"}};function d(e){let{review:t,showRating:r=!1,showBorder:i=!0,variant:d="carousel",className:u,onClick:f}=e,m=c[d],h="".concat(m.base," ").concat(i?m.bordered:m.borderless),g=t.content.length,b=(()=>{let e=Math.max(9,Math.min(16,16-(g-60)/8));return{className:"leading-tight tracking-tight",style:{fontSize:"".concat(e,"px"),lineHeight:"1.1"}}})();return(0,n.jsxs)(a.Zp,{variant:i?"bordered":"default",className:(0,s.QP)(h,"py-4 px-6 flex flex-col gap-3 h-full",u),onClick:f,children:[r&&t.rating&&(0,n.jsxs)("div",{className:"flex items-center justify-center gap-1 flex-shrink-0","aria-label":"Rating: ".concat(t.rating," out of 5 stars"),children:[[void 0,void 0,void 0,void 0,void 0].map((e,r)=>(0,n.jsx)(l.A,{className:"w-5 h-5 ".concat(r{"use strict";r.d(t,{A:()=>n});let n=function(){for(var e,t,r=0,n="",a=arguments.length;r{"use strict";r.d(t,{A:()=>n});let n=(0,r(30414).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},44528:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(30414).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},63491:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,43231,23)),Promise.resolve().then(r.t.bind(r,84792,23)),Promise.resolve().then(r.bind(r,86249)),Promise.resolve().then(r.bind(r,24340)),Promise.resolve().then(r.bind(r,14058)),Promise.resolve().then(r.bind(r,8805)),Promise.resolve().then(r.bind(r,34084))},84506:(e,t,r)=>{"use strict";r.d(t,{Nh:()=>s,jU:()=>i,qk:()=>o,r2:()=>l});var n=r(11377);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"user",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",a=arguments.length>3?arguments[3]:void 0;n.Z({message:e,category:t,level:r,data:a?{...a,timestamp:Date.now()}:{timestamp:Date.now()}})}let i={pageView:(e,t)=>{a("Page viewed: ".concat(e),"navigation","info",{path:e,title:t,type:"page_view"})},routeChange:(e,t)=>{a("Route changed from ".concat(e," to ").concat(t),"navigation","info",{from:e,to:t,type:"route_change"})},externalLink:(e,t)=>{a("External link clicked: ".concat(e),"navigation","info",{url:e,context:t,type:"external_link"})}},o={buttonClick:(e,t)=>{a("Button clicked: ".concat(e),"ui","info",{buttonName:e,context:t,type:"button_click"})},formSubmit:(e,t,r)=>{a("Form ".concat(t?"successfully submitted":"submission failed",": ").concat(e),"user",t?"info":"warning",{formName:e,success:t,type:"form_submit",...r})},modalOpen:e=>{a("Modal opened: ".concat(e),"ui","info",{modalName:e,type:"modal_open"})},modalClose:e=>{a("Modal closed: ".concat(e),"ui","info",{modalName:e,type:"modal_close"})},searchQuery:(e,t)=>{a('Search performed: "'.concat(e,'"'),"user","info",{query:e,resultsCount:t,type:"search"})},fileDownload:(e,t)=>{a("File downloaded: ".concat(e),"user","info",{fileName:e,fileType:t,type:"file_download"})},emailSignup:(e,t,r)=>{a("Email signup ".concat(t?"successful":"failed",": ").concat(e),"user",t?"info":"warning",{formType:e,success:t,hasEmail:!!r,type:"email_signup"})}},l={bookView:(e,t)=>{a("Book viewed: ".concat(e),"user","info",{bookTitle:e,bookId:t,type:"book_view"})},buyButtonClick:(e,t)=>{a("Buy button clicked: ".concat(e),"user","info",{bookTitle:e,platform:t,type:"buy_button_click"})},courseEnrollment:(e,t)=>{a("Course enrollment ".concat(t?"successful":"failed",": ").concat(e),"user",t?"info":"warning",{courseName:e,success:t,type:"course_enrollment"})}},s={gameStart:e=>{a("Game started: ".concat(e),"user","info",{gameName:e,type:"game_start"})},gameEnd:(e,t,r)=>{a("Game ended: ".concat(e),"user","info",{gameName:e,score:t,duration:r,type:"game_end"})},gameAction:(e,t,r)=>{a("Game action: ".concat(t," in ").concat(e),"user","info",{gameName:e,action:t,...r,type:"game_action"})}}},86249:(e,t,r)=>{"use strict";function n(e){let{reason:t,children:r}=e;return r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return n}}),r(94301)},88087:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{bindSnapshot:function(){return o},createAsyncLocalStorage:function(){return i},createSnapshot:function(){return l}});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let a="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function i(){return a?new a:new n}function o(e){return a?a.bind(e):n.bind(e)}function l(){return a?a.snapshot():function(e,...t){return e(...t)}}},89910:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(30414).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},97113:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(88087).createAsyncLocalStorage)()}},e=>{e.O(0,[3231,6466,4792,2809,4850,2360,4442,863,1677,9110,3947,7358],()=>e(e.s=63491)),_N_E=e.O()}]);