!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c7994003-826a-493a-93e0-9a963647167b",e._sentryDebugIdIdentifier="sentry-dbid-c7994003-826a-493a-93e0-9a963647167b")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5858],{28141:(e,t,s)=>{Promise.resolve().then(s.bind(s,60185)),Promise.resolve().then(s.bind(s,35876)),Promise.resolve().then(s.bind(s,23699)),Promise.resolve().then(s.bind(s,91410)),Promise.resolve().then(s.bind(s,12850)),Promise.resolve().then(s.bind(s,6387)),Promise.resolve().then(s.bind(s,97483)),Promise.resolve().then(s.bind(s,15228))},51474:(e,t,s)=>{"use strict";s.d(t,{z:()=>i});var a=s(28261),l=s(44037),r=s(24397),n=s(57102),o=s(93242);let i=e=>{let{posts:t,style:s="cards",forceSubscribeInvite:i=!1}=e,c=i||t.length<3;return(0,a.jsxs)("div",{className:"flex flex-col gap-4 justify-center",children:[(0,a.jsx)("div",{className:"container mx-4 ".concat("cards"===s?"my-4":"my-0"," mx-auto flex flex-wrap gap-4 justify-center"),children:"cards"===s?t.map((e,t)=>(0,a.jsx)(n.default,{post:e,index:t},e.slug)):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:t.map(e=>(0,a.jsxs)("div",{className:"flex flex-row items-center my-0",children:[e.stars>1&&(0,a.jsx)(l.A,{className:"w-4 h-4 mr-2 text-yellow-500 fill-yellow-500"}),(0,a.jsxs)(o.default,{href:"/posts/".concat(e.slug),className:"flex flex-row items-center text-gray-600 hover:scale-100 no-underline",children:[e.title,(0,a.jsx)(r.A,{className:"w-4 h-4 ml-2 text-gray-600"})]})]},e.slug))})}),(0,a.jsxs)("footer",{className:"flex flex-col gap-2",children:[c&&(0,a.jsxs)("p",{className:"text-tiny text-gray-400 text-center text-balance !my-0",children:["I will add more posts soon (subscribe to"," ",(0,a.jsx)(o.default,{href:"/newsletter",children:"my newsletter"})," to be notified)."]}),(0,a.jsxs)("p",{className:"text-tiny text-gray-400 text-center text-balance !my-0",children:["Click ",(0,a.jsx)(o.default,{href:"/blog",children:"here"})," to view all of my posts."]})]})]})}},57102:(e,t,s)=>{"use strict";s.d(t,{default:()=>f});var a=s(28261),l=s(2469),r=s(64356),n=s(95787),o=s(85564),i=s(89127),c=s(57217);let d="text-tiny text-nowrap rounded-md px-1 py-0.5",m=(e,t)=>e>=2?{text:"Most popular",className:"".concat(d," text-rose-600 border border-rose-600")}:e>=1||0===t&&e>0?{text:"Popular",className:"".concat(d," text-orange-500 border border-orange-500")}:0===e&&0===t?{text:"Most recent",className:"".concat(d," text-orange-500 border border-orange-500")}:null,x=(0,c.memo)(e=>{let{stars:t,index:s}=e,l=m(t,s);return l?(0,a.jsx)("span",{className:l.className,children:l.text}):null});x.displayName="BlogpostCardTitle";let u={container:"mx-auto w-full md:max-w-[48%] 2xl:max-w-[31%]",card:"no-button-style z-0 p-2 w-full min-w-64 cursor-pointer",header:"py-1 md:py-2 lg:py-3",headerContent:"w-full flex justify-between items-start",title:"text-left text-balance font-semibold",chipContainer:"flex justify-end mt-1 ml-2",body:"py-2",description:"text-sm text-gray-500",footer:"flex justify-between items-center py-1 md:py-2 lg:py-3",date:"text-tiny text-gray-400 min-w-20",tagContainer:"flex flex-wrap space-x-1 justify-end",tag:"text-tiny text-gray-400"},h=(0,c.memo)(e=>{let{tags:t}=e;return(0,a.jsx)("div",{className:u.tagContainer,children:t.map(e=>(0,a.jsxs)("span",{className:u.tag,children:["#",e]},e))})});h.displayName="Tags";let p=(0,c.memo)(e=>{let{post:t,index:s}=e,{title:c,slug:d,stars:m,description:p,date:f,tags:b}=t;return(0,a.jsx)("div",{className:u.container,children:(0,a.jsxs)(l.Z,{as:r.h,href:"/posts/".concat(d),classNames:{base:u.card},children:[(0,a.jsx)(n.d,{className:u.header,children:(0,a.jsxs)("div",{className:u.headerContent,children:[(0,a.jsx)("span",{className:u.title,children:c}),(0,a.jsx)("div",{className:u.chipContainer,children:(0,a.jsx)(x,{stars:m,index:s})})]})}),(0,a.jsx)(o.U,{className:u.body,children:(0,a.jsx)("span",{className:u.description,children:p})}),(0,a.jsxs)(i.Z,{className:u.footer,children:[(0,a.jsx)("span",{className:u.date,children:f}),(0,a.jsx)(h,{tags:b})]})]})})});p.displayName="BlogpostCard";let f=p},23699:(e,t,s)=>{"use strict";s.d(t,{Exercises:()=>o});var a=s(28261),l=s(57217),r=s(78689);let n={container:"blog-frame text-center text-balance",heading:"font-bold mt-0 mb-4"},o=(0,l.memo)(e=>{let{exercises:t}=e,[s,o]=(0,l.useState)([]),i=(0,l.useMemo)(()=>t.length>1?"Exercises":"Exercise",[t.length]);return(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await Promise.all(t.map(async e=>{let{content:t}=await (0,r.d)({source:e});return t}));e&&o(s)}catch(e){console.error("Failed to render exercises:",e)}})(),()=>{e=!1}},[t]),(0,a.jsxs)("div",{className:n.container,children:[(0,a.jsx)("h4",{className:n.heading,children:i}),(0,a.jsx)("ol",{children:s.map((e,t)=>(0,a.jsx)("li",{children:e},"exercise-".concat(t)))})]})});o.displayName="Exercises"},91410:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(28261),l=s(93242),r=s(57217),n=s(48496);let o={container:"blog-frame text-center text-balance",title:"font-bold mt-0 mb-4",link:"text-blue-500 hover:underline"},i=(e,t)=>{let s=t?"".concat(t,": ").concat(e):e,a=s.length>200?"".concat(s.slice(0,200),"..."):s;return encodeURIComponent('"'.concat(a,'" by @DellannaLuca\n'))},c=(0,r.memo)(e=>{let{title:t="Principle",text:s}=e,r=(0,n.usePathname)(),c=encodeURIComponent("".concat("https://Luca-Dellanna.com").concat(r)),d=i(s,t);return(0,a.jsxs)("div",{className:o.container,children:[(0,a.jsx)("h4",{className:o.title,children:t}),(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:s})}),(0,a.jsx)("p",{children:(0,a.jsx)(l.default,{href:"https://twitter.com/intent/tweet?text=".concat(d,"&url=").concat(c),target:"_blank",rel:"noopener noreferrer",className:o.link,children:"Share on Twitter"})})]})});c.displayName="Principle";let d=c},12850:(e,t,s)=>{"use strict";s.d(t,{Quote:()=>o});var a=s(28261),l=s(98750),r=s(57217);let n={container:"blog-frame text-center text-balance",quote:"mb-8 text-balance"},o=(0,r.memo)(e=>{let{quote:t,author:s,authorDescription:r,portraitSrc:o}=e;return(0,a.jsxs)("div",{className:n.container,children:[(0,a.jsxs)("p",{className:n.quote,children:["“",t,"”"]}),(0,a.jsx)(l.S,{name:s,description:r,avatarProps:{src:o,showFallback:!0,alt:"Portrait of ".concat(s)}})]})});o.displayName="Quote"},6387:(e,t,s)=>{"use strict";s.d(t,{Video:()=>o});var a=s(28261),l=s(22511),r=s(57217);let n={container:"h-full md:mx-4 my-8",videoWrapper:"w-[95%] h-full mx-auto border border-black rounded-xl overflow-hidden"},o=(0,r.memo)(e=>{let{youtubeId:t,showControls:s=!1}=e;return(0,a.jsx)("div",{className:n.container,children:(0,a.jsx)("div",{className:n.videoWrapper,children:(0,a.jsx)(l.YouTubeEmbed,{videoid:t,params:"controls=".concat(s?1:0)})})})});o.displayName="Video"},32279:(e,t,s)=>{"use strict";s.d(t,{BookImage:()=>n});var a=s(57217),l=s(19002),r=s(11707);let n=e=>{let{maxRetries:t=3,retryDelay:s=1e3,priority:n=!1,...o}=e,[i,c]=(0,a.useState)(0);return(0,a.useEffect)(()=>{if(i>0&&i<=t){let e=setTimeout(()=>c(0),s);return()=>clearTimeout(e)}},[i,t,s]),(0,a.createElement)(l.W,{...o,key:i,onError:()=>{ie+1)},as:r.default})}},73382:(e,t,s)=>{"use strict";s.d(t,{a:()=>n});var a=s(28261);let l={normal:"border-slate-400 shadow-md",strong:"border-black shadow-lg"},r={horizontal:"flex-row",vertical:"flex-col"},n=e=>{let{orientation:t,children:s,className:n,id:o,style:i="normal"}=e;return(0,a.jsx)("div",{id:o,className:"max-w-3xl flex-1 mx-auto flex gap-2 items-center justify-center p-4 border rounded-lg ".concat(n," ").concat(l[i]," ").concat(r[t]),children:s})}},55871:(e,t,s)=>{"use strict";s.d(t,{BuyBookButton:()=>o});var a=s(28261);s(57217);var l=s(50685),r=s(54743),n=s(38854);let o=e=>{let{book:t}=e,{isOpen:s,onOpen:o,onOpenChange:i}=(0,l.j)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.T,{color:"primary",onPress:o,children:"Buy Now"}),(0,a.jsx)(n.B,{book:t,isOpen:s,onOpen:o,onOpenChange:i})]})}},89019:(e,t,s)=>{"use strict";s.d(t,{BuyBookLink:()=>o});var a=s(28261);s(57217);var l=s(50685),r=s(64356),n=s(38854);let o=e=>{let{book:t,children:s}=e,{isOpen:o,onOpen:i,onOpenChange:c}=(0,l.j)();return(0,a.jsxs)("div",{className:"mx-auto cursor-pointer",children:[(0,a.jsx)(r.h,{color:"primary",onPress:i,children:s}),(0,a.jsx)(n.B,{book:t,isOpen:o,onOpen:i,onOpenChange:c})]})}},38854:(e,t,s)=>{"use strict";s.d(t,{B:()=>m});var a=s(28261),l=s(90429),r=s(84884),n=s(18503),o=s(22662),i=s(64356),c=s(54743),d=s(96582);s(57217);let m=e=>{let{book:t,isOpen:s,onOpenChange:m}=e,x=[{type:"Paperback",href:""!=t.amazonLink?t.amazonLink:"/books/preorder"},{type:"eBook",href:""!=t.myStoreLink?t.myStoreLink:"/books/preorder"},...t.hasAudiobook?[{type:"Audiobook",href:t.myStoreLink}]:[]];return(0,a.jsx)(l.Y,{isOpen:s,onOpenChange:m,size:"sm",hideCloseButton:!0,children:(0,a.jsx)(r.g,{className:"pb-0",children:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.c,{className:"flex flex-col gap-1",children:["Buy ",t.title]}),(0,a.jsx)(o.h,{children:x.map(e=>{let{type:t,href:s}=e;return(0,a.jsx)(i.h,{href:s,children:(0,a.jsx)(c.T,{color:"primary",href:s,className:"w-full",children:t})},t)})}),(0,a.jsx)(d.q,{children:(0,a.jsx)(c.T,{color:"primary",variant:"light",onPress:e,className:"shadow-none text-white",children:"Close"})})]})})})}},97483:(e,t,s)=>{"use strict";s.d(t,{ClientConvertkitForm:()=>r});var a=s(28261);let l=(0,s(15217).default)(()=>s.e(318).then(s.bind(s,70318)),{loadableGenerated:{webpack:()=>[70318]},ssr:!1});function r(e){let{size:t}=e;return(0,a.jsx)(l,{size:t})}},15228:(e,t,s)=>{"use strict";s.d(t,{default:()=>T});var a=s(28261),l=s(57217),r=s(32279),n=s(73382),o=s(55871),i=s(89019),c=s(11707);let d=(0,l.memo)(function(e){let{title:t}=e,s={width:200,height:40,alt:"Decorative laurel image",className:"mx-auto"};return(0,a.jsxs)("div",{className:"max-w-[200px] mx-2",children:[(0,a.jsx)(c.default,{src:"/top-laurel.png",...s}),(0,a.jsx)("p",{className:"text-center text-balance text-tiny mb-0",children:t}),(0,a.jsx)(c.default,{src:"/bottom-laurel.png",...s})]})});var m=s(93242),x=s(57781),u=s(45700);let h=e=>{let{book:t,priority:s}=e;return(0,a.jsx)("div",{className:"flex h-auto shrink-0",children:(0,a.jsx)(i.BuyBookLink,{book:t,children:(0,a.jsx)(r.BookImage,{src:t.coverSrc,alt:"".concat(t.title," cover"),width:200,height:300,className:"cursor-pointer border border-black rounded-md mx-auto mb-6",priority:s})})})},p=e=>{let{book:t}=e;return(0,a.jsxs)("div",{className:"mx-auto flex items-center justify-center gap-4 md:gap-8 mt-6 px-4",children:[(0,a.jsx)(o.BuyBookButton,{book:t}),(0,a.jsx)("p",{className:"italic mb-0 text-sm",children:"or"}),(0,a.jsx)(m.default,{href:"/books/".concat(t.slug),className:"text-sm underline underline-offset-8",children:"Learn more →"})]})},f=e=>{let{book:t,priority:s=!1,borderStyle:l="strong"}=e,r=u.Y.filter(e=>e.object.includes(t.title)),o=r.length>0,i=t.laurels&&t.laurels.length>0;return(0,a.jsxs)(n.a,{orientation:"vertical",id:t.slug,className:"w-full flex space-y-3 px-0 sm:px-4 md:px-8 py-6 md:py-8",style:l,children:[(0,a.jsx)("h3",{children:t.title}),(0,a.jsx)("p",{className:"text-sm text-center text-balance",children:t.shortDescription}),(0,a.jsxs)("div",{className:"w-full block md:flex flex-row justify-between space-x-4 md:space-x-20 items-center",children:[(0,a.jsx)(h,{book:t,priority:s}),(0,a.jsxs)("div",{className:"m-auto",children:[o&&(0,a.jsx)(x.ReviewsCarousel,{reviews:r,showRatings:!0,width:"sm",height:"sm"}),!o&&i&&(0,a.jsx)("div",{className:"flex items-center justify-center",children:t.laurels&&t.laurels.map((e,t)=>(0,a.jsx)(d,{title:e},t))}),(0,a.jsx)(p,{book:t})]})]})]})};var b=s(97483);let j={button:"fixed bottom-4 right-4 bg-blue-500 text-white p-2 px-4 rounded-full shadow-lg z-50",sidebar:"fixed top-12 bottom-0 items-center align-middle right-0 h-full w-64 bg-white shadow-xl p-4 overflow-y-auto",heading:"text-xl font-bold mb-4",listItem:e=>"text-sm mb-2 ".concat(3===e?"ml-4":""),link:"text-blue-500 hover:underline"},g=(0,l.memo)(e=>{let{content:t}=e,[s,r]=(0,l.useState)([]),[n,o]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{let e=setTimeout(()=>{let e=Array.from(document.querySelectorAll("h2, h3")).map(e=>({id:e.id,text:e.textContent||"",level:parseInt(e.tagName[1])}));e.length>4&&r(e)},100);return()=>clearTimeout(e)},[]),s.length<=4)return null;let i=()=>o(!1);return(0,a.jsxs)("div",{children:[(0,a.jsx)("button",{onClick:()=>o(e=>!e),className:j.button,"aria-expanded":n,"aria-controls":"outline-sidebar",children:n?"Close":"Outline"}),n&&(0,a.jsxs)("nav",{id:"outline-sidebar",className:j.sidebar,"aria-label":"Table of contents",children:[(0,a.jsx)("h3",{className:j.heading,children:"Outline"}),(0,a.jsx)("ul",{children:s.map((e,t)=>(0,a.jsx)("li",{className:j.listItem(e.level),children:(0,a.jsx)("a",{href:"#".concat(e.id),className:j.link,onClick:i,children:e.text})},t))})]})]})});g.displayName="Outline";var y=s(42253),N=s(51474);let v={container:"max-w-3xl mx-auto my-8 p-4 border border-gray-400 rounded-lg shadow-lg",heading:"mb-4"},w=(0,l.memo)(e=>{let{posts:t,className:s}=e;return 0===t.length?null:(0,a.jsxs)("section",{className:"".concat(v.container," ").concat(s||""),children:[(0,a.jsx)("h4",{className:v.heading,children:"Similar posts you might like"}),(0,a.jsx)(N.z,{posts:t,style:"naked",forceSubscribeInvite:!0})]})});w.displayName="SimilarPosts";var k=s(48496);let C={container:"text-center text-tiny italic mb-12",tag:"mx-1",activeTag:"font-bold"},P=(0,l.memo)(e=>{let{tag:t,isActive:s}=e;return(0,a.jsxs)(m.default,{href:"/blog?tag=".concat(t),className:"".concat(C.tag," ").concat(s?C.activeTag:""),children:["#",t]})});P.displayName="TagLink";let B=(0,l.memo)(e=>{let{tags:t}=e,s=(0,k.useSearchParams)(),l=null==s?void 0:s.get("tag");return(0,a.jsx)("p",{className:C.container,children:t.map(e=>(0,a.jsx)(P,{tag:e,isActive:l===e},e))})});B.displayName="TagList";var S=s(31420);function T(e){let{post:t,compiledContent:s,similarPosts:r,books:n}=e,{ergodicityBook:o,wltgBook:i,poaBook:c}=n,d={"@context":"https://schema.org","@type":"BlogPosting",headline:t.title,datePublished:t.date,author:{"@type":"Person",name:"Luca Dellanna"},keywords:t.tags.join(","),url:"https://luca-dellanna.com/posts/".concat(t.slug)};return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(y.default,{id:"json-ld",type:"application/ld+json",children:JSON.stringify(d)}),(0,a.jsxs)("article",{className:"max-w-3xl mx-auto my-8",children:[(0,a.jsx)("h1",{className:"mb-2 text-balance",children:t.title}),(0,a.jsxs)("p",{className:"text-center text-tiny italic mb-1",children:[t.date," by Luca Dellanna"]}),(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)("p",{children:"Loading tags..."}),children:(0,a.jsx)(B,{tags:t.tags})}),(0,a.jsx)("div",{className:"prose",children:"function"==typeof s?s({}):s})]}),(0,a.jsx)(g,{content:s}),t.tags.includes("management")&&(0,a.jsx)(S.WorkWithLuca,{}),t.tags.includes("Ergodicity")&&o&&(0,a.jsx)(f,{book:o,borderStyle:"normal"}),t.tags.includes("Winning Long-Term Games")&&i&&(0,a.jsx)(f,{book:i,borderStyle:"normal"}),t.tags.includes("The Power of Adaptation")&&c&&(0,a.jsx)(f,{book:c,borderStyle:"normal"}),(0,a.jsx)(w,{posts:r,className:"mt-16"}),(0,a.jsx)(b.ClientConvertkitForm,{})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[661,691,9918,4408,7985,5859,4743,9483,8001,3111,6588,8763,3648,7358],()=>t(28141)),_N_E=e.O()}]);