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]="8e1517f7-7bfd-453d-a4c7-1e6f758fd2cd",e._sentryDebugIdIdentifier="sentry-dbid-8e1517f7-7bfd-453d-a4c7-1e6f758fd2cd")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4899],{20551:(e,t,r)=>{"use strict";r.d(t,{BooksGrid:()=>c});var l=r(48958),a=r(83982),s=r(62467),o=r(72807),n=r.n(o),i=r(68030);let d=(0,a.memo)(function(e){let{book:t,isPriority:r}=e,o=(0,a.useCallback)(e=>{e.preventDefault();let r=document.getElementById(t.slug);r&&r.scrollIntoView({behavior:"smooth"})},[t.slug]);return(0,l.jsx)(n(),{href:"#".concat(t.slug),onClick:o,className:"inline-block","aria-label":"View ".concat(t.title),children:(0,l.jsx)(s.default,{src:t.coverSrc,alt:t.title,width:100,height:150,sizes:"(max-width: 768px) 100px, 100px",quality:85,className:"border border-black rounded-xs shadow-md transition-transform hover:scale-105",priority:r,loading:r?"eager":"lazy"})})}),c=(0,a.memo)(function(){let e=i.b.slice(0,10);return(0,l.jsx)("div",{className:"mx-auto max-w-2xl flex flex-wrap gap-4 md:gap-8 justify-center",children:e.map((e,t)=>(0,l.jsx)(d,{book:e,isPriority:t<3},e.slug))})})},32866:(e,t,r)=>{"use strict";r.d(t,{BookImage:()=>s});var l=r(83982),a=r(62467);let s=(0,l.memo)(e=>{let{maxRetries:t=3,retryDelay:r=1e3,priority:s=!1,sizes:o="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",placeholder:n="empty",blurDataURL:i,...d}=e,[c,u]=(0,l.useState)(0),m=c{if(!m||0===c)return;let e=setTimeout(()=>u(0),r);return()=>clearTimeout(e)},[c,r,m]);let f=(0,l.useCallback)(()=>{m&&u(e=>e+1)},[m]);return(0,l.createElement)(a.default,{...d,key:c,onError:f,priority:s,sizes:o,placeholder:n,blurDataURL:i,alt:d.alt||"Book cover image",quality:85})});s.displayName="BookImage"},37914:(e,t,r)=>{"use strict";r.d(t,{ErrorBoundary:()=>o});var l=r(83982);let a=(0,l.createContext)(null),s={didCatch:!1,error:null};class o extends l.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,l=arguments.length,a=Array(l),o=0;o0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,l)){var a,o;null==(a=(o=this.props).onReset)||a.call(o,{next:l,prev:e.resetKeys,reason:"keys"}),this.setState(s)}}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:s}=this.props,{didCatch:o,error:n}=this.state,i=e;if(o){let e={error:n,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)i=t(e);else if(r)i=(0,l.createElement)(r,e);else if(void 0!==s)i=s;else throw n}return(0,l.createElement)(a.Provider,{value:{didCatch:o,error:n,resetErrorBoundary:this.resetErrorBoundary}},i)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=s}}},38025:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var l=r(83982);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)},s=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 n=(0,l.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:d="",children:c,iconNode:u,...m}=e;return(0,l.createElement)("svg",{ref:t,...o,width:a,height:a,stroke:r,strokeWidth:i?24*Number(n)/Number(a):n,className:s("lucide",d),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(m)&&{"aria-hidden":"true"},...m},[...u.map(e=>{let[t,r]=e;return(0,l.createElement)(t,r)}),...Array.isArray(c)?c:[c]])}),i=(e,t)=>{let r=(0,l.forwardRef)((r,o)=>{let{className:i,...d}=r;return(0,l.createElement)(n,{ref:o,iconNode:t,className:s("lucide-".concat(a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),i),...d})});return r.displayName=a(e),r}},42997:(e,t,r)=>{"use strict";r.d(t,{ReviewCard:()=>m});var l=r(48958),a=r(62467),s=r(83982);let o=(0,s.memo)(function(e){var t;let{author:r}=e;if(!r)return null;let s=null==(t=r.image)?void 0:t.trim(),o=(null==s?void 0:s.startsWith("/"))?s:s?"/".concat(s):void 0;return(0,l.jsxs)("div",{className:"flex mx-auto items-center",children:[o&&(0,l.jsx)("div",{className:"w-8 h-8 rounded-full border border-slate-400 overflow-hidden shrink-0",children:(0,l.jsx)(a.default,{src:o,alt:"Avatar of ".concat(r.name),width:30,height:30,sizes:"32px",quality:85,className:"w-full h-full object-cover"})}),(0,l.jsxs)("div",{className:"".concat(o?"ml-2":""),children:[(0,l.jsx)("p",{className:"my-0 text-xs",children:r.name}),r.description&&(0,l.jsx)("p",{className:"my-0 text-[10px] leading-3 text-slate-500",children:r.description})]})]})});var n=r(90048);let i={active:"text-yellow-400 fill-yellow-400",inactive:"text-gray-300",base:"w-5 h-5"},d=(0,s.memo)(function(e){let{rating:t,maxStars:r=5}=e;return(0,l.jsx)("div",{className:"flex mx-auto mb-2",role:"img","aria-label":"".concat(t," out of ").concat(r," stars"),children:Array.from({length:r},(e,r)=>(0,l.jsx)(n.A,{className:"".concat(i.base," ").concat(r{if("carousel"!==s)return"text-xs";let t=e.length;return t>200?"text-[10px]":t>150?"text-[11px]":"text-xs"})(f);return(0,l.jsx)("div",{className:m,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4 justify-center h-full",children:[r&&"number"==typeof t.rating&&(0,l.jsx)("div",{className:"mx-auto justify-center",role:"complementary","aria-label":"Review rating: ".concat(t.rating," stars"),children:(0,l.jsx)(d,{rating:t.rating})}),(0,l.jsx)("blockquote",{className:"text-center ".concat(h," font-bold m-0 leading-tight"),children:f?'"'.concat(f,'"'):""}),t.author&&(0,l.jsx)(o,{author:t.author})]})})})},44895:(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,20551)),Promise.resolve().then(r.bind(r,32866)),Promise.resolve().then(r.bind(r,45984)),Promise.resolve().then(r.bind(r,62681)),Promise.resolve().then(r.bind(r,35982))},48812:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var l=r(48958),a=r(83982),s=r(53022);let o=(0,a.memo)(function(e){let{error:t,resetErrorBoundary:r,message:a="We're sorry, a problem occurred. Please try again later."}=e;return(0,l.jsxs)("div",{role:"alert",className:"p-4 border border-red-500 rounded-lg bg-red-50 max-w-xl mx-auto my-8",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-red-800 mb-2",children:"Oops! Something went wrong"}),(0,l.jsx)("p",{className:"text-red-700 mb-4",children:a}),!1,(0,l.jsx)(s.T,{onPress:r,color:"danger",className:"w-full sm:w-auto",children:"Try again"})]})})},59496:(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 i},getImageProps:function(){return n}});let l=r(8007),a=r(45868),s=r(44320),o=l._(r(25480));function n(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],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 i=s.Image},62467:(e,t,r)=>{"use strict";r.d(t,{default:()=>a.a});var l=r(59496),a=r.n(l)},62681:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var l=r(48958),a=r(37914),s=r(48812);let o=(0,r(83982).memo)(function(e){let{children:t}=e;return(0,l.jsx)(a.ErrorBoundary,{FallbackComponent:s.default,children:t})})},77459:(e,t,r)=>{"use strict";r.d(t,{U:()=>a});var l=r(83982),a=(null==globalThis?void 0:globalThis.document)?l.useLayoutEffect:l.useEffect},86290:(e,t,r)=>{"use strict";r.d(t,{j:()=>n});var l=r(59127),a=r(52538),s=r(86745),o=r(83982);function n(e={}){let{id:t,defaultOpen:r,isOpen:i,onClose:d,onOpen:c,onChange:u=()=>{}}=e,m=(0,s.c)(c),f=(0,s.c)(d),[h,p]=(0,a.P)(i,r||!1,u),b=(0,o.useId)(),x=t||b,g=void 0!==i,v=(0,o.useCallback)(()=>{g||p(!1),null==f||f()},[g,f]),y=(0,o.useCallback)(()=>{g||p(!0),null==m||m()},[g,m]),w=(0,o.useCallback)(()=>{(h?v:y)()},[h,y,v]);return{isOpen:!!h,onOpen:y,onClose:v,onOpenChange:w,isControlled:g,getButtonProps:(e={})=>({...e,"aria-expanded":h,"aria-controls":x,onClick:(0,l.c)(e.onClick,w)}),getDisclosureProps:(e={})=>({...e,hidden:!h,id:x})}}},86745:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});var l=r(83982),a=r(77459);function s(e,t=[]){let r=(0,l.useRef)(e);return(0,a.U)(()=>{r.current=e}),(0,l.useCallback)((...e)=>{var t;return null==(t=r.current)?void 0:t.call(r,...e)},t)}},90048:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});let l=(0,r(38025).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"}]])}},e=>{e.O(0,[4320,1675,3022,5785,9718,8865,9597,8030,7942,6293,7358],()=>e(e.s=44895)),_N_E=e.O()}]);