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]="efc8f59c-b444-409b-a95c-0667aaf10f3d",e._sentryDebugIdIdentifier="sentry-dbid-efc8f59c-b444-409b-a95c-0667aaf10f3d")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5858],{6399:(e,t,s)=>{"use strict";s.d(t,{j:()=>f});var a=s(99702),r=s(29191),l=s(26294),n=s(70052),i=s(2987);let o=(0,l.memo)(function(e){let{title:t}=e,s={width:200,height:40,alt:"Decorative laurel image",className:"mx-auto",sizes:"(max-width: 768px) 200px, 200px",quality:85};return(0,a.jsxs)("div",{className:"max-w-[200px] mx-2",children:[(0,a.jsx)(i.default,{src:"/top-laurel.png",...s,alt:"Top decorative laurel image"}),(0,a.jsx)("p",{className:"text-center text-balance text-xs mb-0",children:t}),(0,a.jsx)(i.default,{src:"/bottom-laurel.png",...s,alt:"Bottom decorative laurel image"})]})});var c=s(32704),d=s(76739),m=s(30863);let x=(0,l.memo)(function(e){var t,s;let{book:r,variant:n="default",className:i=""}=e,{bookReviews:x,hasReviews:u,hasLaurels:h}=(0,l.useMemo)(()=>{var e;let t=m.Y.filter(e=>{var t;return null==(t=e.object)?void 0:t.some(e=>null==e?void 0:e.toLowerCase().includes(r.title.toLowerCase()))});return{bookReviews:t,hasReviews:t.length>0,hasLaurels:!!(null==(e=r.laurels)?void 0:e.length)}},[r.title,r.laurels]);if(!u&&!h)return null;if("showcase"===n)return(0,a.jsxs)("div",{className:"w-full flex flex-col items-center justify-center overflow-hidden ".concat(i),children:[u&&(0,a.jsx)("div",{className:"w-full flex justify-center",children:(0,a.jsx)("div",{className:"w-full max-w-[260px] sm:max-w-[360px] md:max-w-[400px]",children:(0,a.jsx)(d.ReviewsCarousel,{reviews:x,showRatings:!0,width:"sm",height:"sm"})})}),!u&&h&&(0,a.jsx)("div",{className:"flex items-center justify-center min-h-48",role:"list","aria-label":"Book laurels",children:null==(t=r.laurels)?void 0:t.map((e,t)=>(0,a.jsx)(o,{title:e},"".concat(r.slug,"-laurel-").concat(t)))})]});if(h)return(0,a.jsx)("div",{className:"mx-auto my-8 flex ".concat(i),children:null==(s=r.laurels)?void 0:s.map((e,t)=>(0,a.jsx)(o,{title:e},"laurel-".concat(e,"-").concat(t)))});if(u&&x[0]){let e=x[0];return(0,a.jsx)("div",{className:"mx-auto my-2 ".concat(i),children:(0,a.jsx)(c.ReviewCard,{review:e,showRating:!0,variant:"books"})})}return null});var u=s(19087),h=s(43231),p=s.n(h);let g=(0,l.memo)(function(e){let{book:t,priority:s=!1}=e;return(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)(p(),{href:"/books/".concat(t.slug),children:(0,a.jsx)(i.default,{src:t.coverSrc,alt:"Cover of ".concat(t.title),width:200,height:300,priority:s,className:"rounded-lg shadow-lg hover:shadow-xl transition-shadow duration-300 border border-gray-500"})})})}),f=(0,l.memo)(e=>{let{book:t,priority:s=!1,borderStyle:l="strong"}=e;return(0,a.jsx)("div",{id:t.slug,className:"w-full max-w-3xl mx-auto flex flex-col space-y-2 overflow-hidden",children:(0,a.jsx)(r.Zp,{variant:"strong"===l?"elevated":"bordered",padding:"none",className:"w-full !py-3 sm:!py-4 md:!py-6 border-gray-500",children:(0,a.jsxs)(r.bw,{padding:"none",children:[(0,a.jsx)(u.G,{book:t,variant:"showcase"}),(0,a.jsxs)("div",{className:"w-full flex flex-col md:flex-row space-y-2 md:space-y-0 md:space-x-8 items-center mt-4",children:[(0,a.jsx)("div",{className:"flex justify-center md:w-1/2",children:(0,a.jsx)(g,{book:t,priority:s})}),(0,a.jsxs)("div",{className:"md:w-1/2",children:[(0,a.jsx)(x,{book:t,variant:"showcase"}),(0,a.jsx)(n.J,{book:t,variant:"showcase"})]})]})]})})})});g.displayName="BookCover",f.displayName="BookShowcase"},19087:(e,t,s)=>{"use strict";s.d(t,{G:()=>r});var a=s(99702);let r=(0,s(26294).memo)(function(e){let{book:t,variant:s="default",className:r="",showDescription:l=!0,showEdition:n=!0}=e;return"hero"===s?(0,a.jsxs)("div",{className:"px-4 mb-4 ".concat(r),children:[(0,a.jsx)("h1",{className:"mt-0 mb-4",children:t.title}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 justify-center items-center",children:[l&&(0,a.jsx)("p",{className:"text-sm",children:t.shortDescription}),n&&t.edition&&(0,a.jsx)("p",{className:"text-xs italic",children:t.edition})]})]}):"showcase"===s?(0,a.jsxs)("div",{className:r,children:[(0,a.jsx)("h3",{className:"text-center",children:t.title}),l&&(0,a.jsx)("p",{className:"text-sm text-center text-balance mx-4 max-w-2xl",children:t.shortDescription})]}):(0,a.jsx)("div",{className:r,children:(0,a.jsx)("h3",{children:t.title})})})},21462:(e,t,s)=>{"use strict";function a(e){if(!(null==e?void 0:e.trim()))throw Error("Non-empty string is required for slugify");return e.trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}s.d(t,{Y:()=>a})},23501:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var a=s(99702),r=s(83332),l=s(22604),n=s(26294),i=s(56992);let o=(0,n.memo)(function(e){let{error:t,resetErrorBoundary:s,componentName:n}=e,i=(0,l.Qk)(t);return(0,l.A)(t)&&t.isUserFriendly||r.Cp(t,{extra:{componentName:n||"unknown",errorType:t.name,errorMessage:t.message,errorStack:t.stack},tags:{location:n||"unknown",errorType:t.name}}),(0,a.jsxs)("div",{role:"alert",className:"p-4 border border-error rounded-lg bg-error-light max-w-xl mx-auto my-8",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-red-800 mb-2",children:"Oops! Something went wrong"}),(0,a.jsx)("p",{className:"text-red-700 mb-4",children:i}),!1,(0,a.jsx)("button",{onClick:s,className:"px-4 py-2 bg-error text-white rounded-sm hover:bg-error-hover transition-colors",children:"Try again"})]})}),c=(0,n.memo)(function(e){let{children:t,componentName:s,fallback:r=o,onError:l}=e,c=(0,n.useCallback)(e=>(0,a.jsx)(r,{...e,componentName:s}),[r,s]);return(0,a.jsx)(i.ErrorBoundary,{FallbackComponent:c,onError:(e,t)=>{l&&l(e,t),console.error("Error in ".concat(s||"component",":"),e,t)},children:t})})},27825:(e,t,s)=>{"use strict";s.d(t,{default:()=>C});var a=s(99702),r=s(50927),l=s(83332),n=s(26294),i=s(6399),o=s(29156);let c=(0,n.memo)(e=>{let{content:t}=e,[s,r]=(0,n.useState)([]),[l,i]=(0,n.useState)(!1);if((0,n.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]||"2")}));e.length>4&&r(e)},100);return()=>clearTimeout(e)},[]),s.length<=4)return null;let o=()=>i(!1);return(0,a.jsxs)("div",{children:[(0,a.jsx)("button",{onClick:()=>i(e=>!e),className:"fixed bottom-4 right-4 bg-primary text-white p-2 px-4 rounded-full shadow-lg z-50","aria-expanded":l,"aria-controls":"outline-sidebar",children:l?"Close":"Outline"}),l&&(0,a.jsxs)("nav",{id:"outline-sidebar",className:"fixed top-12 bottom-0 items-center align-middle right-0 h-full w-64 bg-white shadow-xl p-4 overflow-y-auto","aria-label":"Table of contents",children:[(0,a.jsx)("h3",{className:"text-xl font-bold mb-4",children:"Outline"}),(0,a.jsx)("ul",{children:s.map((e,t)=>(0,a.jsx)("li",{className:"text-sm mb-2 ".concat(3===e.level?"ml-4":""),children:(0,a.jsx)("a",{href:"#".concat(e.id),className:"text-focus hover:underline",onClick:o,children:e.text})},e.id||"heading-".concat(t)))})]})]})});c.displayName="Outline";var d=s(5322),m=s(44706);function x(e){let{posts:t,className:s}=e;return 0===t.length?null:(0,a.jsxs)("section",{className:"max-w-3xl mx-auto my-8 p-4 border border-border rounded-lg shadow-lg ".concat(s||""),children:[(0,a.jsx)("h4",{className:"mb-4",children:"Similar posts you might like"}),(0,a.jsx)(m.BlogLinksList,{posts:t,showFooter:!0})]})}var u=s(23501),h=s(43231),p=s.n(h),g=s(4672);function f(e){let{tag:t,isActive:s}=e;return(0,a.jsxs)(p(),{href:"/blog?tag=".concat(t),className:"mx-1 ".concat(s?"font-bold":""),children:["#",t]})}function b(e){let{tags:t}=e,s=(0,g.useSearchParams)(),r=null==s?void 0:s.get("tag");return(0,a.jsx)("p",{className:"text-center text-xs italic mb-12",children:t.map(e=>(0,a.jsx)(f,{tag:e,isActive:r===e},e))})}function j(e){return(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)("div",{children:"Loading..."}),children:(0,a.jsx)(b,{...e})})}var w=s(64629),y=s(17700),v=s(21462);let N=["Object Not Found Matching Id","unhandledrejection"].map(e=>{let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return RegExp("\\b".concat(t,"\\b"),"i")}),k=(e,t)=>{if(N.some(t=>t.test(e.message||"")))return void console.debug("Suppressed non-critical error:",e);r.v4(s=>{s.setTag("location","BlogPostContent"),s.setExtra("componentStack",t.componentStack||""),l.Cp(e)}),console.error("Error in BlogPostContent:",e)};function C(e){var t;let{post:s,compiledContent:r,similarPosts:l}=e,m=(0,n.useMemo)(()=>(function(e){if(!Array.isArray(e))throw TypeError("Tags parameter must be an array");return Array.from(new Set(function(e){let t={management:["best practices for operational excellence"],"best practices for operational excellence":["management"]},s=[...e];return e.forEach(e=>{t[e]&&s.push(...t[e])}),s}(e.map(e=>e.toLowerCase())))).map(e=>y.b.find(t=>t.slug===(0,v.Y)(e))).filter(e=>void 0!==e)})(s.tags),[s.tags]),h=(0,n.useMemo)(()=>({"@context":"https://schema.org","@type":"BlogPosting",headline:s.title,datePublished:s.date,author:{"@type":"Person",name:"Luca Dellanna"},keywords:s.tags.join(","),url:"https://luca-dellanna.com/posts/".concat(s.slug),description:s.description}),[s]);return(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)(d.default,{id:"json-ld",type:"application/ld+json",children:JSON.stringify(h)}),(0,a.jsxs)("article",{className:"max-w-3xl mx-auto my-8",children:[(0,a.jsxs)("header",{className:"mb-6",children:[(0,a.jsx)("h1",{className:"mb-2 text-balance",children:s.title}),(0,a.jsx)("h4",{className:"text-balance text-gray-500 mt-4 mb-6",children:s.description}),(0,a.jsxs)("p",{className:"text-center text-xs italic mb-1",children:[s.date," by Luca Dellanna"]}),(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)("p",{className:"text-gray-500","aria-label":"Loading tags",children:"Loading tags..."}),children:(0,a.jsx)(j,{tags:s.tags})})]}),(0,a.jsx)(u.default,{componentName:"BlogPostContent",onError:k,children:(0,a.jsx)("div",{className:"prose prose-lg",children:r})})]}),(0,a.jsx)(c,{content:r}),(null==(t=s.tags)?void 0:t.some(e=>(null==e?void 0:e.toLowerCase().trim())==="management"))&&(0,a.jsx)(w.WorkWithLuca,{}),m.length>0&&(0,a.jsx)("section",{className:"my-8","aria-label":"Related books",children:m.map(e=>(0,a.jsx)(i.j,{book:e,borderStyle:"normal"},e.slug))}),(0,a.jsx)(x,{posts:l}),(0,a.jsx)(o.ClientConvertkitForm,{})]})}},29156:(e,t,s)=>{"use strict";s.d(t,{ClientConvertkitForm:()=>i});var a=s(99702),r=s(50817),l=s(26294);let n=(0,r.default)(()=>Promise.all([s.e(955),s.e(4070)]).then(s.bind(s,41035)),{loadableGenerated:{webpack:()=>[41035]},ssr:!1,loading:()=>(0,a.jsx)("div",{className:"min-h-[200px] animate-pulse bg-gray-100 rounded-lg"})}),i=(0,l.memo)(e=>{let{size:t}=e;return(0,a.jsx)(n,{size:t})});i.displayName="ClientConvertkitForm"},44706:(e,t,s)=>{"use strict";s.d(t,{BlogLinksList:()=>o});var a=s(99702),r=s(43744),l=s(40392),n=s(43231),i=s.n(n);function o(e){let{posts:t,showFooter:s=!1}=e;return t&&0!==t.length?(0,a.jsxs)("div",{className:"flex flex-col gap-4 mx-1 sm:mx-2 md:mx-4 justify-center",children:[(0,a.jsx)("ul",{className:"list-none mx-0 my-4 p-0 flex flex-col gap-2",children:t.map(e=>(0,a.jsxs)("li",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-1 md:gap-2 mx-0",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center min-w-0",children:[(0,a.jsx)("span",{className:"w-4 h-4 mr-2 inline-flex items-center justify-center flex-shrink-0",children:e.stars>1&&(0,a.jsx)(r.A,{className:"w-4 h-4 text-yellow-500 fill-yellow-500","aria-hidden":!0})}),(0,a.jsxs)(i(),{href:"/posts/".concat(e.slug),className:"text-gray-700 hover:text-gray-900 no-underline min-w-0 flex flex-col md:flex-row md:items-center",children:[(0,a.jsx)("span",{className:"line-clamp-2 md:line-clamp-1 md:truncate break-words",children:e.title}),(0,a.jsx)(l.A,{className:"hidden md:inline-flex w-4 h-4 ml-2 text-muted flex-shrink-0","aria-hidden":!0}),(0,a.jsxs)("span",{className:"mt-0.5 flex flex-row items-center gap-2 md:hidden",children:[(0,a.jsx)(l.A,{className:"w-4 h-4 text-muted flex-shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-xs text-gray-500 flex-shrink-0",children:e.date})]})]})]}),(0,a.jsx)("span",{className:"hidden md:inline text-xs text-gray-500 flex-shrink-0",children:e.date})]},e.slug))}),s&&(0,a.jsxs)("footer",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("p",{className:"text-xs text-muted text-center text-balance !my-0",children:["I will add more posts soon (subscribe to"," ",(0,a.jsx)(i(),{href:"/newsletter",children:"my newsletter"})," to be notified)."]}),(0,a.jsxs)("p",{className:"text-xs text-muted text-center text-balance !my-0",children:["Click ",(0,a.jsx)(i(),{href:"/blog",children:"here"})," to view all of my posts."]})]})]}):null}},51928:(e,t,s)=>{Promise.resolve().then(s.bind(s,29156)),Promise.resolve().then(s.bind(s,74728)),Promise.resolve().then(s.bind(s,85644)),Promise.resolve().then(s.bind(s,74005)),Promise.resolve().then(s.bind(s,86329)),Promise.resolve().then(s.bind(s,27825))},64629:(e,t,s)=>{"use strict";s.d(t,{WorkWithLuca:()=>d});var a=s(99702),r=s(29191),l=s(17581),n=s(2987),i=s(43231),o=s.n(i);function c(e){let{quote:t,author:s,imageSrc:r}=e;return(0,a.jsxs)("blockquote",{className:"text-center space-y-3",children:[(0,a.jsxs)("p",{className:"text-sm font-medium text-muted leading-relaxed",children:['"',t,'"']}),(0,a.jsxs)("footer",{className:"flex items-center justify-center gap-2",children:[(0,a.jsxs)("cite",{className:"text-xs italic text-muted",children:["– ",s]}),(0,a.jsx)(n.default,{src:r,alt:s,width:20,height:20,className:"rounded-full"})]})]})}function d(){return(0,a.jsx)(r.Zp,{variant:"bordered",className:"max-w-4xl mx-auto my-12 overflow-hidden hover:shadow-lg transition-shadow duration-300",children:(0,a.jsx)(r.bw,{className:"p-6 md:p-8",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 lg:gap-8 items-start",children:[(0,a.jsxs)("div",{className:"col-span-1 lg:col-span-2 space-y-6",children:[(0,a.jsx)(c,{quote:"Working with Luca was fantastic! He was straightforward and well-prepared, pinpointing numerous opportunities I had overlooked in my business plan. I wholeheartedly recommend him.",author:"Christopher Samiullah",imageSrc:"/christopher-samiullah.jpg"}),(0,a.jsxs)("div",{className:"text-center space-y-4",children:[(0,a.jsx)("p",{className:"text-sm text-muted leading-relaxed max-w-2xl mx-auto",children:"I have helped dozens of business leaders change their organization's operational culture. If you're interested in working with me, send me an email."}),(0,a.jsx)(o(),{href:"/contact",children:(0,a.jsx)(l.$,{variant:"primary",size:"md",className:"mx-auto",children:"Email Luca"})})]})]}),(0,a.jsx)("div",{className:"flex justify-center lg:justify-end",children:(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(n.default,{src:"/luca-no-bg.png",alt:"Luca Dellanna",width:140,height:210,className:"w-auto h-auto max-w-[140px] max-h-[210px]"})})})]})})})}},70052:(e,t,s)=>{"use strict";s.d(t,{J:()=>i});var a=s(99702),r=s(92524),l=s(43231),n=s.n(l);let i=(0,s(26294).memo)(function(e){let{book:t,variant:s="default",className:l=""}=e;return""===t.amazonLink?(0,a.jsxs)("div",{className:"flex flex-col gap-2 text-xs italic ".concat(l),children:[(0,a.jsx)("p",{className:"hero"===s?"text-sm":"text-center text-xs italic font-bold",children:"Coming soon!"}),(0,a.jsxs)("p",{className:"hero"===s?"text-sm":"text-center text-xs italic",children:["Subscribe to"," ",(0,a.jsx)(n(),{href:"/newsletter",className:"underline",children:"my newsletter"})," ","to get notified upon its publication."]})]}):"showcase"===s?(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row space-y-2 space-x-4 justify-center items-center ".concat(l),children:[(0,a.jsx)(r.BuyBookButton,{book:t}),(0,a.jsx)("span",{className:"text-xs text-gray-500 italic",children:"or"}),(0,a.jsx)(n(),{href:"/books/".concat(t.slug),className:"text-primary hover:underline text-sm",children:"Learn More →"})]}):"hero"===s?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-8 ".concat(l),children:[(0,a.jsx)(r.BuyBookButton,{book:t}),(0,a.jsx)("p",{className:"italic mb-0 text-sm",children:"or"}),(0,a.jsx)("button",{onClick:()=>{var e;null==(e=document.getElementById("about"))||e.scrollIntoView({behavior:"smooth"})},className:"underline underline-offset-8 shadow-none bg-transparent border-none text-primary hover:opacity-75",children:"Learn more →"})]}):(0,a.jsx)("div",{className:"flex ".concat(l),children:(0,a.jsx)("div",{className:"mx-auto my-4",children:(0,a.jsx)(r.BuyBookButton,{book:t})})})})},74005:(e,t,s)=>{"use strict";s.d(t,{QuoteClient:()=>l});var a=s(99702),r=s(2987);let l=(0,s(26294).memo)(e=>{let{quote:t,author:s,authorDescription:l,portraitSrc:n}=e;return(0,a.jsxs)("div",{className:"blog-frame text-center text-balance",children:[(0,a.jsxs)("p",{className:"mb-8 text-balance",children:["“",t,"”"]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full overflow-hidden bg-gray-200 flex items-center justify-center",children:n?(0,a.jsx)(r.default,{src:n,alt:"Portrait of ".concat(s),width:48,height:48,className:"w-full h-full object-cover"}):(0,a.jsx)("span",{className:"text-muted text-sm font-semibold",children:s.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2)})}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s}),l&&(0,a.jsx)("div",{className:"text-xs text-muted",children:l})]})]})]})});l.displayName="QuoteClient"},74728:(e,t,s)=>{"use strict";s.d(t,{ExercisesClient:()=>h});var a=s(99702),r=s(4905),l=s(27985),n=s(40392),i=s(44528),o=s(26294);function c(e){let{onClick:t,isPressed:s}=e;return(0,a.jsxs)("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1.5 text-xs font-medium rounded-lg px-3 py-1.5 shadow-sm transition-all duration-300 ease-out ".concat(s?"bg-success-light border border-success-border text-green-700 shadow-md scale-95":"text-muted hover:text-gray-900 bg-white/90 backdrop-blur-sm border border-gray-200/80 hover:border-gray-300 hover:shadow-md hover:bg-white active:scale-95"),"aria-label":"Copy exercises",title:"Copy exercises",children:[s?(0,a.jsx)(r.A,{size:12}):(0,a.jsx)(l.A,{size:12}),(0,a.jsx)("span",{className:"hidden xs:inline sm:inline",children:s?"Copied!":"Copy"})]})}function d(e){let{onClick:t,isPressed:s}=e;return(0,a.jsxs)("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1.5 text-xs font-medium rounded-lg px-3 py-1.5 shadow-sm transition-all duration-300 ease-out ".concat(s?"bg-success-light border border-success-border text-green-700 shadow-md scale-95":"text-muted hover:text-gray-900 bg-white/90 backdrop-blur-sm border border-gray-200/80 hover:border-gray-300 hover:shadow-md hover:bg-white active:scale-95"),"aria-label":"Copy link",title:"Copy link",children:[s?(0,a.jsx)(r.A,{size:12}):(0,a.jsx)(n.A,{size:12}),(0,a.jsx)("span",{className:"hidden xs:inline sm:inline",children:s?"Copied!":"Link"})]})}function m(e){let{checked:t,onChange:s,index:r}=e;return(0,a.jsxs)("div",{className:"relative flex-shrink-0 w-5 h-5 checkbox-align",children:[(0,a.jsx)("input",{type:"checkbox",checked:t,onChange:s,className:"sr-only","aria-label":"Mark exercise ".concat(r+1," as completed")}),(0,a.jsxs)("div",{className:"relative w-5 h-5 bg-white border-2 rounded-md cursor-pointer transition-all duration-300 ease-out ".concat(t?"border-primary shadow-md scale-105":"border-gray-300 hover:border-gray-400 hover:shadow-sm"),children:[(0,a.jsx)(i.A,{size:16,className:"absolute inset-0 m-auto transition-all duration-300 ease-out ".concat(t?"text-primary opacity-100 scale-110":"text-gray-800 opacity-0"),strokeWidth:4}),(0,a.jsx)("div",{className:"absolute inset-0 rounded-md bg-gradient-to-br from-white/20 to-transparent transition-opacity duration-300 ".concat(t?"opacity-100":"opacity-0")})]})]})}function x(e){let{item:t,index:s,checked:r,onToggle:l}=e;return(0,a.jsx)("li",{className:"exercise-item flex items-start gap-3 sm:gap-4 group",children:(0,a.jsxs)("label",{className:"flex items-start gap-3 sm:gap-4 cursor-pointer select-none w-full py-1",children:[(0,a.jsx)(m,{checked:r,onChange:l,index:s}),(0,a.jsx)("div",{className:"flex-1 transition-all duration-300 ease-out ".concat(r?"text-gray-400 line-through decoration-gray-300 decoration-2":"text-gray-700 group-hover:text-gray-900"),children:t})]})})}function u(e){let{onCopyAll:t,onCopyLink:s,copyPressed:r,linkPressed:l}=e;return(0,a.jsxs)("div",{className:"print:hidden absolute right-4 top-4 sm:right-6 sm:top-6 flex items-center gap-2 sm:gap-3",children:[(0,a.jsx)(c,{onClick:t,isPressed:r}),(0,a.jsx)(d,{onClick:s,isPressed:l})]})}function h(e){let{items:t,anchorId:s="exercises"}=e,[r,l]=(0,o.useState)({}),[n,i]=(0,o.useState)(!1),[c,d]=(0,o.useState)(!1),m=(0,o.useRef)(null),h=(0,o.useMemo)(()=>"exercises:".concat(window.location.pathname,":").concat(s),[s]);async function p(){try{var e,s;i(!0);let a=null!=(s=null==(e=m.current)?void 0:e.innerText)?s:t.map((e,t)=>"".concat(t+1,". ").concat(String(e))).join("\n");await navigator.clipboard.writeText(a),setTimeout(()=>i(!1),2e3)}catch(e){i(!1)}}async function g(){try{d(!0);let e="".concat(window.location.origin).concat(window.location.pathname,"#").concat(s);await navigator.clipboard.writeText(e),setTimeout(()=>d(!1),2e3)}catch(e){d(!1)}}(0,o.useEffect)(()=>{try{let e=window.localStorage.getItem(h);e&&l(JSON.parse(e))}catch(e){}},[h]),(0,o.useEffect)(()=>{try{window.localStorage.setItem(h,JSON.stringify(r))}catch(e){}},[r,h]);let f=t.length>1?"Exercises":"Exercise";return(0,a.jsxs)("div",{className:"blog-frame relative bg-gradient-to-br from-gray-50/50 to-white/80 border border-gray-200/60 rounded-xl p-6 sm:p-8 shadow-sm",children:[(0,a.jsx)("h4",{id:s,className:"mt-0 mb-6 sm:mb-8 pr-16 sm:pr-0 text-gray-900 font-semibold",children:f}),(0,a.jsx)(u,{onCopyAll:p,onCopyLink:g,copyPressed:n,linkPressed:c}),(0,a.jsx)("ol",{ref:m,className:"exercises-list list-decimal list-inside space-y-5",children:t.map((e,t)=>{let s="string"==typeof e?e:"object"==typeof e&&null!==e&&"props"in e?JSON.stringify(e.props):String(e),n=s.length>50?s.substring(0,50).replace(/[^a-zA-Z0-9]/g,""):s.replace(/[^a-zA-Z0-9]/g,""),i="exercise-".concat(n,"-").concat(t);return(0,a.jsx)(x,{item:e,index:t,checked:!!r[t],onToggle:()=>{l(e=>({...e,[t]:!e[t]}))}},i)})})]})}},85644:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var a=s(99702),r=s(17581),l=s(57267),n=s(26294),i=s(4672);let o=(0,n.memo)(e=>{let{title:t="Principle",text:s}=e,n=(0,i.usePathname)(),o=encodeURIComponent("".concat("https://Luca-Dellanna.com").concat(n)),c=((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'))})(s,t);return(0,a.jsxs)("div",{className:"blog-frame text-center text-balance",children:[(0,a.jsx)("h4",{className:"font-bold mt-0 mb-4",children:t}),(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:s})}),(0,a.jsxs)(r.$,{onClick:()=>{window.open("https://twitter.com/intent/tweet?text=".concat(c,"&url=").concat(o),"_blank","noopener,noreferrer")},variant:"primary",size:"sm",className:"mt-4 bg-twitter text-white hover:bg-twitter-hover",children:[(0,a.jsx)(l.A,{size:16,className:"text-white fill-current"}),"Share on Twitter"]})]})});o.displayName="Principle";let c=o},86329:(e,t,s)=>{"use strict";s.d(t,{Video:()=>l});var a=s(99702),r=s(26363);let l=(0,s(26294).memo)(e=>{let{youtubeId:t,showControls:s=!1}=e,l=new URLSearchParams({controls:s?"1":"0",rel:"0",modestbranding:"1",playsinline:"1"}).toString();return(0,a.jsx)("div",{className:"h-full md:mx-4 my-8",children:(0,a.jsx)("div",{className:"w-[95%] h-full mx-auto border border-black rounded-xl overflow-hidden",children:(0,a.jsx)(r.YouTubeEmbed,{videoid:t,params:l})})})});l.displayName="Video"}},e=>{e.O(0,[3231,6466,4792,2809,4850,605,4442,9702,888,863,7700,9110,3947,7358],()=>e(e.s=51928)),_N_E=e.O()}]);