1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-D2xcr4dZ.js","assets/rolldown-runtime-CbXtAM7H.js","assets/vendor-DfSeidf4.js","assets/api-CVCW9ZYC.js","assets/SEO-DD7fYhhd.js","assets/WishlistButton-Cksh92zT.js","assets/SectionTitle-DYVnqXpV.js","assets/ProductListingPage-jsSvt4Xw.js","assets/ListingBookCard-1nkbjyJi.js","assets/FilterBar-Dqoxl6LT.js","assets/CategoryPage-DCgB4LxI.js","assets/AuthorsPage-Cbm8s4gR.js","assets/AuthorDetailPage-ByV8bePt.js","assets/purify.es-DrVcFY1Q.js","assets/PublisherDetailPage-Cn-XgKAV.js","assets/ProductDetailPage-DhW16FTC.js","assets/CartPage-BAVpieh0.js","assets/ConfirmDialog-By15cibN.js","assets/SpecialOfferNotice-DN2xozEv.js","assets/WishlistPage-BxqnrZSa.js","assets/DashboardPage-BZaUwhvs.js","assets/SearchResultsPage-CkceXmZq.js","assets/CheckoutPage-j9Www_Hq.js","assets/OrderSuccessPage-CFrsQ97o.js","assets/AwardWinnersPage-DkQ0A0XH.js","assets/RushHoursPage-CotjA0Az.js","assets/EmailGiftVouchersPage-C-6d3p72.js","assets/BundleOffersPage-BaFv7rii.js","assets/ShippingPolicyPage-DfFqNgL2.js","assets/ReturnPolicyPage-MgQEL2ia.js","assets/PaymentOptionsPage-CyWiTkC7.js","assets/PrivacyPolicyPage-CG5Huirj.js","assets/TermsOfUsePage-BvyUWxlH.js","assets/ContactUsPage-CtLRsol1.js","assets/OnlinePurchaseEnquiryPage-CSR9wR2Z.js","assets/AboutUsPage-B9QVQSkT.js","assets/FAQPage-C382MEWn.js","assets/LoginPage-D6p9eHzm.js","assets/RegisterPage-DSoOXdV8.js","assets/ForgotPasswordPage-D3cTlkKQ.js","assets/ResetPasswordPage-DyNdY9ix.js","assets/VerifyEmailPage-BbNPzZK3.js","assets/NotFoundPage-hwF38b2e.js"])))=>i.map(i=>d[i]); 2import{n as e,t}from"./rolldown-runtime-CbXtAM7H.js";import{i as n,n as r,r as i,t as a}from"./vendor-DfSeidf4.js";import{a as o,i as s,t as c}from"./api-CVCW9ZYC.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=e(n(),1),u=r(),d=e(i(),1),f=`modulepreload`,p=function(e){return`/`+e},m={},h=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=p(t,n),t=s(t),t in m)return;m[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:f,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},g=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,_=/^[\\/]{2}/;function v(e,t){return t+e.replace(/\\/g,`/`)}var y=`popstate`;function b(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function x(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return E(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:D(t)}return ee(t,n,null,e)}function S(e,t){if(e===!1||e==null)throw Error(t)}function C(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function w(){return Math.random().toString(36).substring(2,10)}function T(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function E(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?O(t):t,state:n,key:t&&t.key||r||w(),mask:i}}function D({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function O(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ee(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=b(e)?e:E(h.location,e,t);n&&n(r,e),l=u()+1;let d=T(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=b(e)?e:E(h.location,e,t);n&&n(r,e),l=u();let i=T(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return te(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(y,d),c=e,()=>{i.removeEventListener(y,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function te(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),S(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:D(t);return i=i.replace(/ $/,`%20`),!n&&_.test(i)&&(i=r+i),new URL(i,r)}function ne(e,t,n=`/`){return re(e,t,n,!1)}function re(e,t,n,r,i){let a=k((typeof t==`string`?O(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ie(e),s=null,c=xe(a);for(let e=0;s==null&&e<o.length;++e)s=_e(o[e],c,r);return s}function ie(e){let t=ae(e);return se(t),t}function ae(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;S(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}
2" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=A([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(S(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ae(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:he(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=be(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of oe(e.path))a(e,t,!0,n)}),t}function oe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=oe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function se(e){e.sort((e,t)=>e.score===t.score?ge(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ce=/^:[\w-]+$/,le=3,ue=2,de=1,fe=10,pe=-2,me=e=>e===`*`;function he(e,t){let n=e.split(`/`),r=n.length;return n.some(me)&&(r+=pe),t&&(r+=ue),n.filter(e=>!me(e)).reduce((e,t)=>e+(ce.test(t)?le:t===``?de:fe),r)}function ge(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function _e(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ye(u,l,s.matcher,s.compiledParams):ve(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=ve({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
2Object.assign(i,d.params),o.push({params:i,pathname:A([a,d.pathname]),pathnameBase:Ae(A([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=A([a,d.pathnameBase]))}return o}function ve(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=be(e.path,e.caseSensitive,e.end);return ye(e,t,n,r)}function ye(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function be(e,t=!1,n=!0){C(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function xe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return C(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function k(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Se(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?O(e):e,a;return n?(n=Oe(n),a=n.startsWith(`/`)?Ce(n.substring(1),`/`):Ce(n,t)):a=t,{pathname:a,search:je(r),hash:Me(i)}}function Ce(e,t){let n=ke(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function we(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Te(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ee(e){let t=Te(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function De(e,t,n,r=!1){let i;typeof e==`string`?i=O(e):(i={...e},S(!i.pathname||!i.pathname.includes(`?`),we(`?`,`pathname`,`search`,i)),S(!i.pathname||!i.pathname.includes(`#`),we(`#`,`pathname`,`hash`,i)),S(!i.search||!i.search.includes(`#`),we(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Se(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Oe=e=>e.replace(/[\\/]{2,}/g,`/`),A=e=>Oe(e.join(`/`)),ke=e=>e.replace(/\/+$/,``),Ae=e=>ke(e).replace(/^\/*/,`/`),je=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Me=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ne=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Pe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Fe(e){return A(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ie=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Le(e,t){let n=e;if(typeof n!=`string`||!g.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ie)try{let e=new URL(window.location.href),r=_.test(n)?new URL(v(n,e.protocol)):new URL(n),a=k(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{C(!1,`<Link to="${n}">
2 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Re=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Re);var ze=[`GET`,...Re];new Set(ze);var Be=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ve(e){try{return Be.includes(new URL(e).protocol)}catch{return!1}}var j=l.createContext(null);j.displayName=`DataRouter`;var He=l.createContext(null);He.displayName=`DataRouterState`;var Ue=l.createContext(!1);function We(){return l.useContext(Ue)}var Ge=l.createContext({isTransitioning:!1});Ge.displayName=`ViewTransition`;var Ke=l.createContext(new Map);Ke.displayName=`Fetchers`;var qe=l.createContext(null);qe.displayName=`Await`;var M=l.createContext(null);M.displayName=`Navigation`;var N=l.createContext(null);N.displayName=`Location`;var P=l.createContext({outlet:null,matches:[],isDataRoute:!1});P.displayName=`Route`;var Je=l.createContext(null);Je.displayName=`RouteError`;var Ye=`REACT_ROUTER_ERROR`,Xe=`REDIRECT`,Ze=`ROUTE_ERROR_RESPONSE`;function Qe(e){if(e.startsWith(`${Ye}:${Xe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function $e(e){if(e.startsWith(`${Ye}:${Ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ne(t.status,t.statusText,t.data)}catch{}}function et(e,{relative:t}={}){S(F(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=l.useContext(M),{hash:i,pathname:a,search:o}=R(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:A([n,a])),r.createHref({pathname:s,search:o,hash:i})}function F(){return l.useContext(N)!=null}function I(){return S(F(),`useLocation() may be used only in the context of a <Router> component.`),l.useContext(N).location}var tt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function nt(e){l.useContext(M).static||l.useLayoutEffect(e)}function L(){let{isDataRoute:e}=l.useContext(P);return e?xt():rt()}function rt(){S(F(),`useNavigate() may be used only in the context of a <Router> component.`);let e=l.useContext(j),{basename:t,navigator:n}=l.useContext(M),{matches:r}=l.useContext(P),{pathname:i}=I(),a=JSON.stringify(Ee(r)),o=l.useRef(!1);return nt(()=>{o.current=!0}),l.useCallback((r,s={})=>{if(C(o.current,tt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=De(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:A([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}l.createContext(null);function it(){let{matches:e}=l.useContext(P);return e[e.length-1]?.params??{}}function R(e,{relative:t}={}){let{matches:n}=l.useContext(P),{pathname:r}=I(),i=JSON.stringify(Ee(n));return l.useMemo(()=>De(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function at(e,t){return ot(e,t)}function ot(e,t,n){S(F(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=l.useContext(M),{matches:i}=l.useContext(P),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,u=a&&a.route;{let e=u&&u.path||``;Ct(s,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 3 4Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=I(),f;if(t){let e=typeof t==`string`?O(t):t;S(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ne(e,{pathname:m});C(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),C(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=pt(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:A([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:A([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?l.createElement(N.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function st(){let e=bt(),t=Pe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=l.createElement(l.Fragment,null,l.createElement(`p`,null,`ð¿ Hey developer ð`),l.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,l.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,l.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),l.createElement(l.Fragment,null,l.createElement(`h2`,null,`Unexpected Application
4Error!`),l.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?l.createElement(`pre`,{style:i},n):null,o)}var ct=l.createElement(st,null),lt=class extends l.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=$e(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:l.createElement(P.Provider,{value:this.props.routeContext},l.createElement(Je.Provider,{value:e,children:this.props.component}));return this.context?l.createElement(dt,{error:e},t):t}};lt.contextType=Ue;var ut=new WeakMap;function dt({children:e,error:t}){let{basename:n}=l.useContext(M);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qe(t.digest);if(e){let r=ut.get(t);if(r)throw r;let i=Le(e.location,n),a=i.absoluteURL||i.to;if(Ve(a))throw Error(`Invalid redirect location`);if(Ie&&!ut.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw ut.set(t,n),n}}return l.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function ft({routeContext:e,match:t,children:n}){let r=l.useContext(j);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement(P.Provider,{value:e},n)}function pt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);S(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,u=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Fe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||ct,o&&(s<0&&c===0?(Ct(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?l.createElement(n.route.Component,null):n.route.element?n.route.element:e,l.createElement(ft,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?l.createElement(lt,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function mt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ht(e){let t=l.useContext(j);return S(t,mt(e)),t}function gt(e){let t=l.useContext(He);return S(t,mt(e)),t}function _t(e){let t=l.useContext(P);return S(t,mt(e)),t}function vt(e){let t=_t(e),n=t.matches[t.matches.length-1];return S(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function yt(){return vt(`useRouteId`)}function bt(){let e=l.useContext(Je),t=gt(`useRouteError`),n=vt(`useRouteError`);return e===void 0?t.errors?.[n]:e}
4function xt(){let{router:e}=ht(`useNavigate`),t=vt(`useNavigate`),n=l.useRef(!1);return nt(()=>{n.current=!0}),l.useCallback(async(r,i={})=>{C(n.current,tt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var St={};function Ct(e,t,n){!t&&!St[e]&&(St[e]=!0,C(!1,n))}l.memo(wt);function wt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return ot(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Tt({to:e,replace:t,state:n,relative:r}){S(F(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=l.useContext(M);C(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=l.useContext(P),{pathname:o}=I(),s=L(),c=De(e,Ee(a),o,r===`path`),u=JSON.stringify(c);return l.useEffect(()=>{s(JSON.parse(u),{replace:t,state:n,relative:r})},[s,u,r,t,n]),null}function z(e){S(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Et({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){S(!F(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=l.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=O(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=l.useMemo(()=>{let e=k(u,s);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[s,u,d,f,p,m,r,h]);return C(g!=null,`<Router basename="${s}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:l.createElement(M.Provider,{value:c},l.createElement(N.Provider,{children:t,value:g}))}function Dt({children:e,location:t}){return at(Ot(e),t)}l.Component;function Ot(e,t=[]){let n=[];return l.Children.forEach(e,(e,r)=>{if(!l.isValidElement(e))return;let i=[...t,r];if(e.type===l.Fragment){n.push.apply(n,Ot(e.props.children,i));return}S(e.type===z,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),S(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Ot(e.props.children,i)),n.push(a)}),n}var kt=`get`,At=`application/x-www-form-urlencoded`;function B(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function jt(e){return B(e)&&e.tagName.toLowerCase()===`button`}function Mt(e){return B(e)&&e.tagName.toLowerCase()===`form`}function Nt(e){return B(e)&&e.tagName.toLowerCase()===`input`}function Pt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ft(e,t){return e.button===0&&(!t||t===`_self`)&&!Pt(e)}function It(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Lt(e,t){let n=It(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Rt=null;function zt(){if(Rt===null)try{new FormData(document.createElement(`form`),0),Rt=!1}catch{Rt=!0}return Rt}var Bt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Vt(e){return e!=null&&!Bt.has(e)?(C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${At}"`),null):e}function Ht(e,t){let n,r,i,a,o;if(Mt(e)){let o=e.getAttribute(`action`);r=o?k(o,t):null,n=e.getAttribute(`method`)||kt,i=Vt(e.getAttribute(`enctype`))||At,a=new FormData(e)}else if(jt(e)||Nt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?k(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||kt,i=Vt(e.getAttribute(`formenctype`))||Vt(o.getAttribute(`enctype`))||At,a=new FormData(o,e),!zt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(B(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=kt,r=null,i=At,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ut(e,t){if(e===!1||e==null)throw Error(t)}function Wt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>
4`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&k(i.pathname,t)===`/`?`${ke(t)}/_root.${r}`:`${ke(i.pathname)}.${r}`,i}async function Gt(e,t){if(e.id in t)return t[e.id];try{let n=await h(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Kt(e){return e!=null&&typeof e.page==`string`}function qt(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Jt(e,t,n){return $t((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Gt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(qt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Yt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Xt(e,t,{includeHydrateFallback:n}={}){return Zt(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Zt(e){return[...new Set(e)]}function Qt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function $t(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Kt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Qt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function en(){let e=l.useContext(j);return Ut(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function tn(){let e=l.useContext(He);return Ut(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var nn=l.createContext(void 0);nn.displayName=`FrameworkContext`;function rn(){let e=l.useContext(nn);return Ut(e,`You must render this element inside a <HydratedRouter> element`),e}function an(e,t){let n=l.useContext(nn),[r,i]=l.useState(!1),[a,o]=l.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=l.useRef(null);l.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),l.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:V(s,m),onBlur:V(c,h),onMouseEnter:V(u,m),onMouseLeave:V(d,h),onTouchStart:V(f,m)}]:[a,p,{}]:[!1,p,{}]}function V(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function on({page:e,...t}){let n=We(),{nonce:r}=rn(),{router:i}=en(),a=l.useMemo(()=>ne(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?l.createElement(cn,{page:e,matches:a,...t}):l.createElement(ln,{page:e,matches:a,...t})):null}function sn(e){let{manifest:t,routeModules:n}=rn(),[r,i]=l.useState([]);return l.useEffect(()=>{let r=!1;return Jt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function cn({page:e,matches:t,...n}){let r=I(),{future:i}=rn(),{basename:a}=en(),o=l.useMemo(()=>
4{if(e===r.pathname+r.search+r.hash)return[];let n=Wt(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return l.createElement(l.Fragment,null,o.map(e=>l.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ln({page:e,matches:t,...n}){let r=I(),{future:i,manifest:a,routeModules:o}=rn(),{basename:s}=en(),{loaderData:c,matches:u}=tn(),d=l.useMemo(()=>Yt(e,t,u,a,r,`data`),[e,t,u,a,r]),f=l.useMemo(()=>Yt(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=l.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let u=Wt(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,d,t,e,o]),m=l.useMemo(()=>Xt(f,a),[f,a]),h=sn(f);return l.createElement(l.Fragment,null,p.map(e=>l.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>l.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>l.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function un(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}l.Component;var dn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{dn&&(window.__reactRouterVersion=`7.18.2`)}catch{}function fn({basename:e,children:t,useTransitions:n,window:r}){let i=l.useRef();i.current??=x({window:r,v5Compat:!0});let a=i.current,[o,s]=l.useState({action:a.action,location:a.location}),c=l.useCallback(e=>{n===!1?s(e):l.startTransition(()=>s(e))},[n]);return l.useLayoutEffect(()=>a.listen(c),[a,c]),l.createElement(Et,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var H=l.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:_,navigator:v,useTransitions:y}=l.useContext(M),b=typeof u==`string`&&g.test(u),x=Le(u,_);u=x.to;let S=et(u,{relative:r}),C=I(),w=null;if(o){let e=De(o,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:A([_,e.pathname])),w=v.createHref(e)}let[T,E,D]=an(n,m),O=_n(u,{replace:a,mask:o,state:s,target:c,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:y});function ee(t){e&&e(t),t.defaultPrevented||O(t)}let te=!(x.isExternal||i),ne=l.createElement(`a`,{...m,...D,href:(te?w:void 0)||x.absoluteURL||S,onClick:te?ee:e,ref:un(h,E),target:c,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?l.createElement(l.Fragment,null,ne,l.createElement(on,{page:S})):ne});H.displayName=`Link`;var pn=l.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},u){let d=R(a,{relative:c.relative}),f=I(),p=l.useContext(He),{navigator:m,basename:h}=l.useContext(M),g=p!=null&&Cn(d)&&o===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=k(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return l.createElement(H,{...c,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});pn.displayName=`NavLink`;var mn=l.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=kt,action:s,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:_}=l.useContext(M),v=xn(),y=Sn(s,{relative:u}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof s==`string`&&g.test(s);return l.createElement(`form`,{ref:h,method:b,action:y,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>v(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});_&&n!==!1?l.startTransition(()=>m()):m()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});mn.displayName=`Form`;function hn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gn(e){let t=l.useContext(j);return S(t,hn(e)),t}function _n(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:u}={}){let d=L(),f=I(),p=R(e,{relative:o});return l.useCallback(m=>{if(Ft(m,t)){m.preventDefault();let t=n===void 0?D(f)===D(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});u?l.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,o,s,c,u])}function vn(e){C(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=l.useRef(It(e)),n=l.useRef(!1),r=I(),i=l.useMemo(()=>Lt(r.search,n.current?null:t.current),[r.search]),a=L();return[i,l.useCallback((e,t)=>{let r=It(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var yn=0,bn=()=>`__${String(++yn)}__`;function xn(){let{router:e}
4=gn(`useSubmit`),{basename:t}=l.useContext(M),n=yt(),r=e.fetch,i=e.navigate;return l.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Ht(e,t);if(a.navigate===!1){let e=a.fetcherKey||bn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Sn(e,{relative:t}={}){let{basename:n}=l.useContext(M),r=l.useContext(P);S(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...R(e||`.`,{relative:t})},o=I();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:A([n,a.pathname])),D(a)}function Cn(e,{relative:t}={}){let n=l.useContext(Ge);S(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=gn(`useViewTransitionState`),i=R(e,{relative:t});if(!n.isTransitioning)return!1;let a=k(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=k(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ve(i.pathname,o)!=null||ve(i.pathname,a)!=null}var wn=t(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}})),Tn=t(((e,t)=>{t.exports=function(e,t,n,r,i,a,o,s){if(!e){var c;if(t===void 0)c=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var l=[n,r,i,a,o,s],u=0;c=Error(t.replace(/%s/g,function(){return l[u++]})),c.name=`Invariant Violation`}throw c.framesToPop=1,c}}})),En=t(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),Dn=e(wn()),On=e(Tn()),kn=e(En()),An=(e=>(e.BASE=`base`,e.BODY=`body`,e.HEAD=`head`,e.HTML=`html`,e.LINK=`link`,e.META=`meta`,e.NOSCRIPT=`noscript`,e.SCRIPT=`script`,e.STYLE=`style`,e.TITLE=`title`,e.FRAGMENT=`Symbol(react.fragment)`,e))(An||{}),jn={link:{rel:[`amphtml`,`canonical`,`alternate`]},script:{type:[`application/ld+json`]}
4,meta:{charset:``,name:[`generator`,`robots`,`description`],property:[`og:type`,`og:title`,`og:url`,`og:image`,`og:image:alt`,`og:description`,`twitter:url`,`twitter:title`,`twitter:description`,`twitter:image`,`twitter:image:alt`,`twitter:card`,`twitter:site`]}},Mn=Object.values(An),Nn={accesskey:`accessKey`,charset:`charSet`,class:`className`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,"http-equiv":`httpEquiv`,itemprop:`itemProp`,tabindex:`tabIndex`},Pn=Object.entries(Nn).reduce((e,[t,n])=>(e[n]=t,e),{}),U=`data-rh`,W={DEFAULT_TITLE:`defaultTitle`,DEFER:`defer`,ENCODE_SPECIAL_CHARACTERS:`encodeSpecialCharacters`,ON_CHANGE_CLIENT_STATE:`onChangeClientState`,TITLE_TEMPLATE:`titleTemplate`,PRIORITIZE_SEO_TAGS:`prioritizeSeoTags`},G=(e,t)=>{for(let n=e.length-1;n>=0;--n){let r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},Fn=e=>{let t=G(e,`title`),n=G(e,W.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join(``)),n&&t)return n.replace(/%s/g,()=>t);let r=G(e,W.DEFAULT_TITLE);return t||r||void 0},In=e=>G(e,W.ON_CHANGE_CLIENT_STATE)||(()=>{}),Ln=(e,t)=>t.filter(t=>t[e]!==void 0).map(t=>t[e]).reduce((e,t)=>({...e,...t}),{}),Rn=(e,t)=>t.filter(e=>e.base!==void 0).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){let r=Object.keys(n);for(let i=0;i<r.length;i+=1){let a=r[i].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return t.concat(n)}}return t},[]),zn=e=>console&&typeof console.warn==`function`&&console.warn(e),K=(e,t,n)=>{let r={};return n.filter(t=>Array.isArray(t[e])?!0:(t[e]!==void 0&&zn(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{let i={};n.filter(e=>{let n,a=Object.keys(e);for(let r=0;r<a.length;r+=1){let i=a[r],o=i.toLowerCase();t.indexOf(o)!==-1&&(n!==`rel`||e[n].toLowerCase()!==`canonical`)&&(o!==`rel`||e[o].toLowerCase()!==`stylesheet`)&&(n=o),t.indexOf(i)!==-1&&(i===`innerHTML`||i===`cssText`||i===`itemprop`)&&(n=i)}if(!n||!e[n])return!1;let o=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][o]&&(i[n][o]=!0,!0)}).reverse().forEach(t=>e.push(t));let a=Object.keys(i);for(let e=0;e<a.length;e+=1){let t=a[e],n={...r[t],...i[t]};r[t]=n}return e},[]).reverse()},Bn=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},Vn=e=>({baseTag:Rn([`href`],e),bodyAttributes:Ln(`bodyAttributes`,e),defer:G(e,W.DEFER),encode:G(e,W.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Ln(`htmlAttributes`,e),linkTags:K(`link`,[`rel`,`href`],e),metaTags:K(`meta`,[`name`,`charset`,`http-equiv`,`property`,`itemprop`],e),noscriptTags:K(`noscript`,[`innerHTML`],e),onChangeClientState:In(e),scriptTags:K(`script`,[`src`,`innerHTML`],e),styleTags:K(`style`,[`cssText`],e),title:Fn(e),titleAttributes:Ln(`titleAttributes`,e),prioritizeSeoTags:Bn(e,W.PRIORITIZE_SEO_TAGS)}),Hn=e=>Array.isArray(e)?e.join(``):e,Un=(e,t)=>{let n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Wn=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(Un(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},Gn=(e,t)=>({...e,[t]:void 0}),Kn=[`noscript`,`script`,`style`],qn=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),Jn=e=>Object.keys(e).reduce((t,n)=>{let r=e[n]===void 0?`${n}`:`${n}="${e[n]}"`;return t?`${t} ${r}`:r},``),Yn=(e,t,n,r)=>{let i=Jn(n),a=Hn(t);return i?`<${e} ${U}="true" ${i}>${qn(a,r)}</${e}>`:`<${e} ${U}="true">${qn(a,r)}</${e}>`},Xn=(e,t,n=!0)=>t.reduce((t,r)=>{let i=r,a=Object.keys(i).filter(e=>e!==`innerHTML`&&e!==`cssText`).reduce((e,t)=>{let r=i[t]===void 0?t:`${t}="${qn(i[t],n)}"`;return e?`${e} ${r}`:r},``),o=i.innerHTML||i.cssText||``;return`${t}<${e} ${U}="true" ${a}${Kn.indexOf(e)===-1?`/>`:`>${o}</${e}>`}`},``),Zn=(e,t={})=>Object.keys(e).reduce((t,n)=>{let r=Nn[n];return t[r||n]=e[n],t},t),Qn=(e,t,n)=>{let r=Zn(n,{key:t,[U]:!0});return[l.createElement(`title`,r,t)]},$n=(e,t)=>t.map((t,n)=>{let r={key:n,[U]:!0};
4return Object.keys(t).forEach(e=>{let n=Nn[e]||e;if(n===`innerHTML`||n===`cssText`){let e=t.innerHTML||t.cssText;r.dangerouslySetInnerHTML={__html:e}}else r[n]=t[e]}),l.createElement(e,r)}),q=(e,t,n=!0)=>{switch(e){case`title`:return{toComponent:()=>Qn(e,t.title,t.titleAttributes),toString:()=>Yn(e,t.title,t.titleAttributes,n)};case`bodyAttributes`:case`htmlAttributes`:return{toComponent:()=>Zn(t),toString:()=>Jn(t)};default:return{toComponent:()=>$n(e,t),toString:()=>Xn(e,t,n)}}},er=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{let i=Wn(e,jn.meta),a=Wn(t,jn.link),o=Wn(n,jn.script);return{priorityMethods:{toComponent:()=>[...$n(`meta`,i.priority),...$n(`link`,a.priority),...$n(`script`,o.priority)],toString:()=>`${q(`meta`,i.priority,r)} ${q(`link`,a.priority,r)} ${q(`script`,o.priority,r)}`},metaTags:i.default,linkTags:a.default,scriptTags:o.default}},tr=e=>{let{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:a,styleTags:o,title:s=``,titleAttributes:c,prioritizeSeoTags:l}=e,{linkTags:u,metaTags:d,scriptTags:f}=e,p={toComponent:()=>[],toString:()=>``};return l&&({priorityMethods:p,linkTags:u,metaTags:d,scriptTags:f}=er(e)),{priority:p,base:q(`base`,t,r),bodyAttributes:q(`bodyAttributes`,n,r),htmlAttributes:q(`htmlAttributes`,i,r),link:q(`link`,u,r),meta:q(`meta`,d,r),noscript:q(`noscript`,a,r),script:q(`script`,f,r),style:q(`style`,o,r),title:q(`title`,{title:s,titleAttributes:c},r)}},nr=[],rr=!!(typeof window<`u`&&window.document&&window.document.createElement),ir=class{instances=[];canUseDOM=rr;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?nr:this.instances,add:e=>{(this.canUseDOM?nr:this.instances).push(e)},remove:e=>{let t=(this.canUseDOM?nr:this.instances).indexOf(e);(this.canUseDOM?nr:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=tr({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:``,titleAttributes:{}}))}},ar=parseInt(`19.2.8`.split(`.`)[0],10)>=19,or=l.createContext({}),sr=class e extends l.Component{static canUseDOM=rr;helmetData;constructor(t){super(t),this.helmetData=ar?null:new ir(this.props.context||{},e.canUseDOM)}render(){return ar?l.createElement(l.Fragment,null,this.props.children):l.createElement(or.Provider,{value:this.helmetData.value},this.props.children)}},J=(e,t)=>{let n=document.head||document.querySelector(`head`),r=n.querySelectorAll(`${e}[${U}]`),i=[].slice.call(r),a=[],o;return t&&t.length&&t.forEach(t=>{let n=document.createElement(e);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){if(e===`innerHTML`)n.innerHTML=t.innerHTML;else if(e===`cssText`){let e=t.cssText;n.appendChild(document.createTextNode(e))}else{let r=e,i=t[r]===void 0?``:t[r];n.setAttribute(e,i)}}n.setAttribute(U,`true`),i.some((e,t)=>(o=t,n.isEqualNode(e)))?i.splice(o,1):a.push(n)}
4),i.forEach(e=>e.parentNode?.removeChild(e)),a.forEach(e=>n.appendChild(e)),{oldTags:i,newTags:a}},cr=(e,t)=>{let n=document.getElementsByTagName(e)[0];if(!n)return;let r=n.getAttribute(U),i=r?r.split(`,`):[],a=[...i],o=Object.keys(t);for(let e of o){let r=t[e]||``;n.getAttribute(e)!==r&&n.setAttribute(e,r),i.indexOf(e)===-1&&i.push(e);let o=a.indexOf(e);o!==-1&&a.splice(o,1)}for(let e=a.length-1;e>=0;--e)n.removeAttribute(a[e]);i.length===a.length?n.removeAttribute(U):n.getAttribute(U)!==o.join(`,`)&&n.setAttribute(U,o.join(`,`))},lr=(e,t)=>{e!==void 0&&document.title!==e&&(document.title=Hn(e)),cr(`title`,t)},ur=(e,t)=>{let{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:a,metaTags:o,noscriptTags:s,onChangeClientState:c,scriptTags:l,styleTags:u,title:d,titleAttributes:f}=e;cr(`body`,r),cr(`html`,i),lr(d,f);let p={baseTag:J(`base`,n),linkTags:J(`link`,a),metaTags:J(`meta`,o),noscriptTags:J(`noscript`,s),scriptTags:J(`script`,l),styleTags:J(`style`,u)},m={},h={};Object.keys(p).forEach(e=>{let{newTags:t,oldTags:n}=p[e];t.length&&(m[e]=t),n.length&&(h[e]=p[e].oldTags)}),t&&t(),c(e,m,h)},Y=null,dr=e=>{Y&&cancelAnimationFrame(Y),e.defer?Y=requestAnimationFrame(()=>{ur(e,()=>{Y=null})}):(ur(e),Y=null)},fr=class extends l.Component{rendered=!1;shouldComponentUpdate(e){return!(0,kn.default)(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){let{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){let{helmetInstances:e,setHelmet:t}=this.props.context,n=null,r=Vn(e.get().map(e=>{let{context:t,...n}=e.props;return n}));sr.canUseDOM?dr(r):tr&&(n=tr(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;let{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},X=[],pr=e=>{let t={};for(let n of Object.keys(e))t[Pn[n]||n]=e[n];return t},Z=e=>{let t={};for(let n of Object.keys(e)){let r=Nn[n];t[r||n]=e[n]}return t},mr=(e,t)=>{if(!rr)return;let n=document.getElementsByTagName(e)[0];if(!n)return;let r=`data-rh-managed`,i=n.getAttribute(r),a=i?i.split(`,`):[],o=Object.keys(t);for(let e of a)o.includes(e)||n.removeAttribute(e);for(let e of o){let r=t[e];r==null||r===!1?n.removeAttribute(e):r===!0?n.setAttribute(e,``):n.setAttribute(e,String(r))}o.length>0?n.setAttribute(r,o.join(`,`)):n.removeAttribute(r)},hr=()=>{let e={},t={};for(let n of X){let{htmlAttributes:r,bodyAttributes:i}=n.props;r&&Object.assign(e,pr(r)),i&&Object.assign(t,pr(i))}mr(`html`,e),mr(`body`,t)},gr=class extends l.Component{componentDidMount(){X.push(this),hr()}componentDidUpdate(){hr()}componentWillUnmount(){let e=X.indexOf(this);e!==-1&&X.splice(e,1),hr()}resolveTitle(){let{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(``):e):e||n||void 0}renderTitle(){let e=this.resolveTitle();if(e===void 0)return null;let t=this.props.titleAttributes||{};return l.createElement(`title`,Z(t),e)}renderBase(){let{base:e}=this.props;return e?l.createElement(`base`,Z(e)):null}renderMeta(){let{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>l.createElement(`meta`,{key:t,...Z(e)}))}renderLink(){let{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>l.createElement(`link`,{key:t,...Z(e)}))}renderScript(){let{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=Z(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),l.createElement(`script`,{key:t,...i})})}renderStyle(){let{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{cssText:n,...r}=e,i=Z(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),l.createElement(`style`,{key:t,...i})})}renderNoscript(){let{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=Z(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),l.createElement(`noscript`,{key:t,...i})})}render(){return l.createElement(l.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},_r=class extends l.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!(0,Dn.default)(Gn(this.props,`helmetData`),Gn(e,`helmetData`))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case`script`:case`noscript`:return{innerHTML:t};case`style`:return{cssText:t};default:throw Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case`title`:return{...t,[e.type]:r,titleAttributes:{...n}};case`body`:return{...t,bodyAttributes:{...n}};case`html`:return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(t=>{n={...n,[t]:e[t]}}),n}
4warnOnInvalidChildren(e,t){return(0,On.default)(Mn.some(t=>e.type===t),typeof e.type==`function`?`You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.`:`Only elements types ${Mn.join(`, `)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),(0,On.default)(!t||typeof t==`string`||Array.isArray(t)&&!t.some(e=>typeof e!=`string`),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return l.Children.forEach(e,e=>{if(!e||!e.props)return;let{children:r,...i}=e.props,a=Object.keys(i).reduce((e,t)=>(e[Pn[t]||t]=i[t],e),{}),{type:o}=e;switch(typeof o==`symbol`?o=o.toString():this.warnOnInvalidChildren(e,r),o){case`Symbol(react.fragment)`:t=this.mapChildrenToProps(r,t);break;case`link`:case`meta`:case`noscript`:case`script`:case`style`:n=this.flattenArrayTypeChildren(e,n,a,r);break;default:t=this.mapObjectTypeChildren(e,t,a,r)}}),this.mapArrayTypeChildrenToProps(n,t)}render(){let{children:e,...t}=this.props,n={...t},{helmetData:r}=t;return e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof ir)&&(r=new ir(r.context,!0),delete n.helmetData),ar?l.createElement(gr,{...n}):r?l.createElement(fr,{...n,context:r.value}):l.createElement(or.Consumer,null,e=>l.createElement(fr,{...n,context:e}))}},Q=a(),vr=(0,l.createContext)(null);function yr({children:e}){let[t,n]=(0,l.useState)(()=>localStorage.getItem(`dcb_jwt`)||null),[r,i]=(0,l.useState)(!1),[a,o]=(0,l.useState)(()=>{try{return JSON.parse(localStorage.getItem(`dcb_user`)||`null`)}catch{return null}}),[s,u]=(0,l.useState)(!1),d=r&&!!t,f=(0,l.useCallback)((e,t)=>{localStorage.setItem(`dcb_jwt`,e),localStorage.setItem(`dcb_user`,JSON.stringify(t)),n(e),o(t)},[]),p=(0,l.useCallback)(()=>{localStorage.removeItem(`dcb_jwt`),localStorage.removeItem(`dcb_user`),n(null),o(null)},[]);(0,l.useEffect)(()=>{if(!t){i(!0);return}c.authMe(t).then(e=>{if(e?.code===401||e?.code===403||e?.status===!1&&(e?.message||``).toLowerCase().includes(`unauthenticated`))p();else if(e?.status!==!1){let t=e?.data?.customer||e?.data?.user||(e?.data&&typeof e.data==`object`&&!Array.isArray(e.data)?e.data:null);t&&o(t)}}).catch(()=>{}).finally(()=>{i(!0)})},[]);let m=(0,l.useCallback)(async(e,t,n)=>{u(!0);try{let r={email:e,password:t};n&&(r.cart_token=n);let i=await c.authLogin(r);if(i?.status&&i?.data?.token){let e=i.data.customer||i.data.user||i.data,t=i.data.token;f(t,e);let n=i.data.is_new_user||!1;return localStorage.removeItem(`dcb_cart_token`),window.dispatchEvent(new CustomEvent(`dcb:cart:refresh`,{detail:{jwt:t,isLoggedIn:!0}})),{ok:!0,isNewUser:n}}return{ok:!1,message:i?.message||`Login failed`}}catch(e){return{ok:!1,message:e.message}}finally{u(!1)}},[f]),h=(0,l.useCallback)(async e=>{u(!0);try{let t=await c.authRegister(e),n=t?.data?.token||t?.data?.access_token,r=t?.data?.customer||t?.data?.user;return t?.status&&n&&r?(f(n,r),{ok:!0,autoLogin:!0}):t?.status?{ok:!0,autoLogin:!1,message:t.message}:{ok:!1,message:t?.message||`Registration failed`,errors:t?.errors}}catch(e){return{ok:!1,message:e.message}}finally{u(!1)}},[f]),g=(0,l.useCallback)(async()=>{if(p(),t)try{await c.authLogout(t)}catch{}window.dispatchEvent(new CustomEvent(`dcb:cart:refresh`,{detail:{isLoggedIn:!1}}))},[t,p]);(0,l.useEffect)(()=>{let e=e=>{if(e.key===`dcb_jwt`&&!e.newValue&&p(),e.key===`dcb_jwt`&&e.newValue){n(e.newValue);try{let e=JSON.parse(localStorage.getItem(`dcb_user`)||`null`);e&&o(e)}catch{}}};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[p]);let _=(0,l.useCallback)(e=>{o(t=>{let n={...t,...e};return localStorage.setItem(`dcb_user`,JSON.stringify(n)),n})},[]);return(0,Q.jsx)(vr.Provider,{value:{user:a,jwt:t,isLoggedIn:d,authReady:r,authLoading:s,login:m,register:h,logout:g,updateUser:_},children:e})}function $(){return(0,l.useContext)(vr)}var br=`dcb_cart_token`,xr=()=>localStorage.getItem(br)||null,Sr=e=>{e&&localStorage.setItem(br,e)};function Cr(e){return{...e,title:e.product_name||e.title||``,image:e.product_image||e.image||``,sefurl:e.product_sefurl||e.sefurl||``,authorText:Array.isArray(e.authors)?e.authors.join(`, `):e.author||``,formatText:e.format||``}}function wr(e){let t=e.reduce((e,t)=>
4e+(t.actual_price??t.selling_price??0)*(t.quantity??1),0),n=e.reduce((e,t)=>e+(t.selling_price??0)*(t.quantity??1),0);return{total_items:e.length,original_total:Math.round(t),cart_total:Math.round(n),total_discount:Math.round(t-n)}}function Tr(e){let t=e?.data??e??{};return{cart_token:t.cart_token||null,items:Array.isArray(t.items)?t.items:[],summary:t.summary||null,specialDiscountInfo:t.special_discount_info||null}}var Er=(0,l.createContext)(null);function Dr({children:e}){let{jwt:t,isLoggedIn:n,authReady:r}=$(),[i,a]=(0,l.useState)(()=>xr()),[o,s]=(0,l.useState)([]),[u,d]=(0,l.useState)({total_items:0,cart_total:0,total_discount:0,original_total:0}),[f,p]=(0,l.useState)(null),[m,h]=(0,l.useState)(!1),g=(0,l.useRef)(t),_=(0,l.useRef)(i),v=(0,l.useRef)(n);g.current=t,_.current=i,v.current=n;let y=(0,l.useCallback)((e,t=null)=>{let{cart_token:n,items:r,summary:i,specialDiscountInfo:o}=Tr(e);n&&!v.current&&(Sr(n),a(n),_.current=n);let c=r.map(Cr);if(t?.length){let e=new Map(t.map((e,t)=>[e,t]));c=[...c].sort((t,n)=>(e.get(t.product_id)??9999)-(e.get(n.product_id)??9999))}s(c),d(i||wr(c)),p(o)},[]),b=(0,l.useCallback)(async(e=null,t=null)=>{let n=t??v.current,r=e??g.current,i=_.current;try{if(n&&r){let e=await c.cartGet(null,r);y(e)}else if(i){let e=await c.cartGet(i,null);y(e)}}catch(e){console.warn(`Cart refresh failed:`,e.message)}h(!0)},[y]),x=(0,l.useRef)(r);x.current=r,(0,l.useEffect)(()=>{r&&b()},[r]),(0,l.useEffect)(()=>{let e=async e=>{let t=e?.detail?.jwt||null;e?.detail?.isLoggedIn??!1?(a(null),_.current=null,await b(t,!0)):(s([]),d({total_items:0,cart_total:0,total_discount:0,original_total:0}),p(null),_.current&&await b(null,!1)),h(!0)};return window.addEventListener(`dcb:cart:refresh`,e),()=>window.removeEventListener(`dcb:cart:refresh`,e)},[b]);let S=(0,l.useCallback)(async(e,t=1,n=0)=>{try{let r=v.current?await c.cartAdd(e,t,null,g.current):await c.cartAdd(e,t,_.current,null);return r?.status&&(y(r),window.fbq&&window.fbq(`track`,`AddToCart`,{content_ids:[e],content_type:`product`,value:n||0,currency:`INR`})),r}catch(e){return{status:!1,message:e.message}}},[y]),C=(0,l.useCallback)(async e=>{s(t=>{let n=t.filter(t=>t.id!==e);return d(wr(n)),n});try{let t=v.current?await c.cartRemove(e,null,g.current):await c.cartRemove(e,_.current,null);return y(t),t}catch(e){return{status:!1,message:e.message}}},[y]),w=(0,l.useCallback)(async e=>{try{let t=v.current?await c.cartRemove(e,null,g.current):await c.cartRemove(e,_.current,null);return y(t),t}catch(e){return{status:!1,message:e.message}}},[y]),T=(0,l.useCallback)(async(e,t,n,r,i)=>{let a;s(t=>{a=t.map(e=>e.product_id);let r=t.map(t=>t.id===e?{...t,quantity:i,item_total:Math.round(n*i)}:t);return d(wr(r)),r});try{let t=v.current?await c.cartUpdate(e,i,null,g.current):await c.cartUpdate(e,i,_.current,null);y(t,a)}catch(e){console.warn(`Cart update failed:`,e.message)}},[y]);return(0,Q.jsx)(Er.Provider,{value:{items:o,summary:u,cartReady:m,specialDiscountInfo:f,cartToken:i,addToCart:S,removeItem:C,removeItemSilent:w,updateQty:T,refreshCart:b},children:e})}function Or(){return(0,l.useContext)(Er)}var kr=(0,l.createContext)(null);function Ar({children:e}){let{jwt:t,isLoggedIn:n,authReady:r}=$(),[i,a]=(0,l.useState)(new Set),[o,s]=(0,l.useState)(new Map),[u,d]=(0,l.useState)([]),[f,p]=(0,l.useState)(0),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(null),v=(0,l.useRef)(null),y=(0,l.useCallback)((e,t=`info`)=>{clearTimeout(v.current),_({msg:e,type:t}),v.current=setTimeout(()=>_(null),3e3)},[]),b=(0,l.useCallback)(e=>{let t=new Set(e.map(e=>e.product_id)),n=new Map(e.map(e=>[e.product_id,e.id]));a(t),s(n),d(e),p(e.length)},[]);(0,l.useEffect)(()=>{if(r){if(!n){a(new Set),s(new Map),d([]),p(0),h(!0);return}h(!1),c.wishlistGet(t,1,50).then(e=>{e?.data&&b(e.data)}).catch(()=>{}).finally(()=>h(!0))}},[t,n,r]);let x=(0,l.useCallback)(async e=>{if(!n){y(`Please login to save books to your wishlist`,`info`);return}if(i.has(e)){let n=o.get(e);a(t=>{let n=new Set(t);return n.delete(e),n}),d(t=>t.filter(t=>t.product_id!==e)),p(e=>Math.max(0,e-1));try{let e=await c.wishlistRemove(n,t);e?.status&&Array.isArray(e.data)?b(e.data):e?.status||y(e?.message||`Could not remove`,`error`)}catch{a(t=>new Set([...t,e])),p(e=>e+1)}}else{a(t=>new Set([...t,e])),p(e=>e+1);try{let n=await c.wishlistAdd(e,t);n?.status&&Array.isArray(n.data)?(b(n.data),y(`Added to wishlist!`,`success`)):n?.status||(a(t=>{let n=new Set(t);return n.delete(e),n}),p(e=>Math.max(0,e-1)),y(n?.message||`Could not add to wishlist`,`error`))}catch{a(t=>{let n=new Set(t);return n.delete(e),n}),p(e=>Math.max(0,e-1))}}},[n,i,o,t,b,y]),S=(0,l.useCallback)(async(e,r=24)=>{if(!n)return{items:[],hasMore:!1};try{let n=await c.wishlistGet(t,e,r);return{items:n?.data||[],hasMore:(n?.meta?.current_page||1)<(n?.meta?.last_page||1),total:n?.meta?.total||0}}catch{return{items:[],hasMore:!1,total:0}}},[n,t]);return(0,Q.jsxs)(kr.Provider,{value:{isLoggedIn:n,jwtToken:t,wishlistItems:u,wishCount:f,wlReady:m,wishedIds:i,toggleWishlist:x,loadMoreWishlist:S,toast:g},children:[e,g&&(0,Q.jsxs)(`div`,{style:{position:`fixed`,bottom:90,left:`50%`,transform:`translateX(-50%)`,zIndex:9999,background:g.type===`success`?`var(--green)`:g.type===`error`?`var(--red)`:`var(--ink)`,color:`#fff`,padding:`10px 24px`,borderRadius:99,fontSize:`.88rem`,fontWeight:600,fontFamily:`'Inter',Arial,sans-serif`,boxShadow:`0 4px 24px rgba(0,0,0,.22)`,whiteSpace:`nowrap`,animation:`toastIn .25s ease`,display:`flex`,alignItems:`center`,gap:8},children:[g.type===`success`&&(0,Q.jsx)(`i`,{className:`fas fa-check-circle`}),g.type===`error`&&(0,Q.jsx)(`i`,{className:`fas fa-exclamation-circle`}),g.type===`info`&&(0,Q.jsx)(`i`,{className:`fas fa-info-circle`}),g.msg]}),(0,Q.jsx)(`style`,{children:`@keyframes toastIn { from { opacity:0; transform:translateX(-50%) translateY(12px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }`})]})}function jr(){return(0,l.useContext)(kr)}var Mr=`dcb_lang`,Nr=1,Pr=2,Fr=(0,l.createContext)(null);function Ir({children:e}){let[t,n]=(0,l.useState)(()=>localStorage.getItem(Mr)===`2`?Pr:Nr);return(0,Q.jsx)(Fr.Provider,{value:{lang:t,langLabel:t===Pr?`English`:`Malayalam`,isEnglish:t===Pr,setLang:e=>{localStorage.setItem(Mr,String(e)),n(e)},MALAYALAM:Nr,ENGLISH:Pr},children:e})}function Lr(){return(0,l.useContext)(Fr)}var Rr=(0,l.createContext)({freeLimit:500,limitReady:!1});function zr({children:e}){let[t,n]=(0,l.useState)(500),[r,i]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{c.getFreeShippingLimit().then(e=>{e?.status&&e?.data?.free_delivery_amount&&n(e.data.free_delivery_amount)}).catch(()=>{}).finally(()=>i(!0))},[]),(0,Q.jsx)(Rr.Provider,{value:{freeLimit:t,limitReady:r},children:e})}function Br(){return(0,l.useContext)(Rr)}var Vr=class extends l.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`DC Books Error:`,e,t)}render(){return this.state.hasError?(0,Q.jsxs)(`div`,{style:{padding:`60px 24px`,textAlign:`center`,minHeight:`50vh`},children:[(0,Q.jsx)(`i`,{className:`fas fa-exclamation-circle`,style:{fontSize:`2.5rem`,color:`var(--red)`,display:`block`,marginBottom:16}}),(0,Q.jsx)(`h2`,{style:{fontFamily:`'Inter',sans-serif`,marginBottom:12},children:`Something went wrong`}),(0,Q.jsx)(`p`,{style:{color:`var(--ink-3)`,marginBottom:8,fontSize:`.9rem`,maxWidth:480,margin:`0 auto 20px`},children:this.state.error?.message||`An unexpected error occurred.`}),(0,Q.jsx)(`button`,{onClick:()=>window.location.reload(),type:`button`,style:{padding:`10px 28px`,background:`var(--gold)`,color:`#fff`,border:`none`,borderRadius:99,fontWeight:700,cursor:`pointer`,fontFamily:`inherit`},children:`Reload Page`})]}):this.props.children}};function Hr(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}function Ur({categoryId:e}){let[t,n]=(0,l.useState)(``),[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(!1),[s,u]=(0,l.useState)(!1),[d,f]=(0,l.useState)(-1),p=L(),m=I(),h=(0,l.useRef)(null),g=(0,l.useRef)(null);(0,l.useEffect)(()=>{m.pathname.startsWith(`/search`)||(n(``),i([]),u(!1),f(-1))},[m.pathname]),(0,l.useEffect)(()=>{let e=e=>{h.current?.contains(e.target)||(u(!1),f(-1))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let _=(0,l.useCallback)(Hr(async e=>{let t=(e||``).trim();if(t.length<2){i([]),u(!1),o(!1);return}o(!0);try{let e=await c.searchSuggestions(t,8),n=e?.data,r=Array.isArray(e?.suggestions)?e.suggestions:Array.isArray(n)?n:Array.isArray(n?.data)?n.data:Array.isArray(n?.suggestions)?n.suggestions:Array.isArray(n?.results)?n.results:Array.isArray(n?.items)?n.items:[];i(r),u(r.length>0),f(-1)}catch{i([]),u(!1)}o(!1)},300),[]),v=e=>{let t=e.target.value;n(t),t.trim().length<2?(i([]),u(!1),o(!1)):_(t)},y=n=>{n.preventDefault();let i=t.trim(),a=e||`all`;if(d>=0&&r[d]){x(r[d].sefurl);return}if(!i&&a===`all`)return;u(!1);let o=new URLSearchParams;i&&o.set(`q`,i),a!==`all`&&o.set(`category`,a),p(`/search?${o.toString()}`)},b=e=>
4{!s||r.length===0||(e.key===`ArrowDown`?(e.preventDefault(),f(e=>Math.min(e+1,r.length-1))):e.key===`ArrowUp`?(e.preventDefault(),f(e=>Math.max(e-1,-1))):e.key===`Escape`&&(u(!1),f(-1)))},x=e=>{u(!1),n(``),i([]),f(-1),p(`/books/${e}`)};return(0,Q.jsxs)(`div`,{ref:h,style:{position:`relative`,flex:1,display:`flex`},children:[(0,Q.jsxs)(`form`,{onSubmit:y,style:{display:`flex`,flex:1,width:`100%`},children:[(0,Q.jsx)(`input`,{ref:g,type:`text`,style:{flex:1,border:`none`,background:`transparent`,outline:`none`,padding:`0 12px`,fontSize:`.9rem`,fontFamily:`inherit`,color:`var(--ink)`,width:`100%`},placeholder:`Search books, authors, ISBNâ¦`,"aria-label":`Search`,value:t,onChange:v,onKeyDown:b,onFocus:()=>r.length>0&&u(!0),autoComplete:`off`}),(0,Q.jsx)(`button`,{type:`submit`,style:{background:`var(--gold)`,color:`#fff`,border:`none`,cursor:`pointer`,width:44,height:44,borderRadius:`0 99px 99px 0`,fontSize:`.9rem`,flexShrink:0,transition:`background .2s`,display:`flex`,alignItems:`center`,justifyContent:`center`},"aria-label":`Search`,children:a?(0,Q.jsx)(`i`,{className:`fas fa-spinner fa-spin`}):(0,Q.jsx)(`i`,{className:`fas fa-search`})})]}),s&&r.length>0&&(0,Q.jsxs)(`div`,{style:{position:`absolute`,top:`100%`,left:0,right:0,background:`var(--white)`,border:`1.5px solid var(--border)`,borderTop:`3px solid var(--gold)`,borderRadius:`0 0 10px 10px`,boxShadow:`0 12px 40px rgba(28,25,23,.15)`,zIndex:2e3,maxHeight:420,overflowY:`auto`},children:[r.map((e,t)=>(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>x(e.sefurl),style:{display:`flex`,alignItems:`center`,gap:10,width:`100%`,padding:`10px 14px`,background:d===t?`var(--cream-2)`:`none`,border:`none`,borderBottom:`1px solid var(--border)`,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`},onMouseEnter:()=>f(t),onMouseLeave:()=>f(-1),children:[(0,Q.jsx)(`i`,{className:`fas fa-book`,style:{color:`var(--gold)`,fontSize:`.75rem`,flexShrink:0}}),(0,Q.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,Q.jsx)(`div`,{style:{fontWeight:600,fontSize:`.87rem`,color:`var(--ink)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title||e.name||``}),(e.authors?.length>0||e.author)&&(0,Q.jsx)(`div`,{style:{fontSize:`.74rem`,color:`var(--ink-3)`,marginTop:2,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.author?e.author:Array.isArray(e.authors)?e.authors.map(e=>typeof e==`string`?e:e.name).join(`, `):e.authors})]}),(0,Q.jsx)(`i`,{className:`fas fa-chevron-right`,style:{color:`var(--border)`,fontSize:`.65rem`,flexShrink:0}})]},e.id??e.sefurl??t)),(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>{let n=t.trim(),r=e||`all`;if(!n&&r===`all`)return;u(!1);let i=new URLSearchParams;n&&i.set(`q`,n),r!==`all`&&i.set(`category`,r),p(`/search?${i.toString()}`)},style:{width:`100%`,padding:`11px 14px`,background:`var(--cream-2)`,border:`none`,cursor:`pointer`,fontFamily:`inherit`,fontSize:`.83rem`,fontWeight:700,color:`var(--gold-dk)`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6},children:[(0,Q.jsx)(`i`,{className:`fas fa-search`}),t.trim()?(0,Q.jsxs)(Q.Fragment,{children:[`View all results for â`,t.trim(),`â`]}):(0,Q.jsx)(Q.Fragment,{children:`Search books`})]})]}),s&&r.length===0&&!a&&t.trim().length>=2&&(0,Q.jsxs)(`div`,{style:{position:`absolute`,top:`100%`,left:0,right:0,background:`var(--white)`,border:`1.5px solid var(--border)`,borderTop:`3px solid var(--gold)`,borderRadius:`0 0 10px 10px`,boxShadow:`0 12px 40px rgba(28,25,23,.15)`,zIndex:2e3,padding:`16px 14px`,fontSize:`.85rem`,color:`var(--ink-3)`,textAlign:`center`},children:[(0,Q.jsx)(`i`,{className:`fas fa-search`,style:{marginRight:6,opacity:.4}}),`No results found for â`,t.trim(),`â`]})]})}function Wr(e){let t={};e.forEach(e=>{let n=e.name[0].toUpperCase(),r=/[A-Z]/.test(n)?n:`#`;t[r]||(t[r]=[]),t[r].push(e)});let n={};return Object.keys(t).sort().forEach(e=>{n[e]=t[e].sort((e,t)=>e.name.localeCompare(t.name))}),n}function Gr(){let[e,t]=(0,l.useState)(!1),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(!1),[u,f]=(0,l.useState)({}),p=(0,l.useRef)(null),m=(0,l.useRef)(null),h=L(),g=I();(0,l.useEffect)(()=>{t(!1)},[g]),(0,l.useEffect)(()=>{o||c.getCategories().then(e=>{r(e.data||[]),s(!0),a(!1)}).catch(()=>{s(!0),a(!1)})},[]);let _=(0,l.useCallback)(()=>{let e=p.current?.closest(`nav.subnav`);if(!e)return;let t=e.getBoundingClientRect();f({position:`fixed`,top:t.bottom,left:0,width:`100vw`,zIndex:1500})},[]);(0,l.useEffect)(()=>
4{if(e)return _(),window.addEventListener(`scroll`,_,{passive:!0}),window.addEventListener(`resize`,_,{passive:!0}),()=>{window.removeEventListener(`scroll`,_),window.removeEventListener(`resize`,_)}},[e,_]),(0,l.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t(!1)};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e]),(0,l.useEffect)(()=>{if(!e)return;let n=e=>{p.current?.contains(e.target)||m.current?.contains(e.target)||t(!1)},r=setTimeout(()=>document.addEventListener(`mousedown`,n),0);return()=>{clearTimeout(r),document.removeEventListener(`mousedown`,n)}},[e]);let v=e=>{t(!1),h(`/category/${e}`)},y=[];n.forEach(e=>{y.push(e),e.children?.forEach(e=>y.push(e))});let b=Wr(y),x=Object.keys(b),S=e?(0,Q.jsxs)(`div`,{ref:m,className:`mega-menu open mega-menu--alpha`,style:u,children:[(0,Q.jsx)(`button`,{className:`mega-menu__close mega-menu__close--abs`,onClick:()=>t(!1),type:`button`,"aria-label":`Close`,children:(0,Q.jsx)(`i`,{className:`fas fa-times`})}),(0,Q.jsxs)(`div`,{className:`mega-menu__alpha-inner`,children:[i&&(0,Q.jsxs)(`div`,{style:{padding:`32px`,color:`var(--ink-3)`,textAlign:`center`},children:[(0,Q.jsx)(`i`,{className:`fas fa-spinner fa-spin`,style:{marginRight:8}}),` Loading categoriesâ¦`]}),!i&&x.length>0&&(0,Q.jsx)(`div`,{className:`mega-menu__alpha-grid`,children:x.map(e=>(0,Q.jsxs)(`div`,{className:`mega-alpha-group`,children:[(0,Q.jsx)(`div`,{className:`mega-alpha-letter`,children:e}),b[e].map(e=>(0,Q.jsx)(`span`,{className:`mega-cat__link`,onClick:()=>v(e.sefurl),role:`button`,tabIndex:0,onKeyDown:t=>t.key===`Enter`&&v(e.sefurl),children:e.name},e.id))]},e))})]})]}):null;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`button`,{ref:p,className:`subnav__mega-trigger${e?` open`:``}`,onClick:()=>t(e=>!e),"aria-haspopup":`true`,"aria-expanded":e,type:`button`,children:[`Categories`,(0,Q.jsx)(`i`,{className:`fas fa-chevron-down chevron`,style:{fontSize:`.62rem`,marginLeft:4,transition:`transform .25s`,transform:e?`rotate(180deg)`:`rotate(0deg)`,color:`var(--ink-3)`}})]}),typeof document<`u`&&(0,d.createPortal)(S,document.body)]})}function Kr({onNavigate:e}){let[t,n]=(0,l.useState)(!1),[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(!1),[s,u]=(0,l.useState)(!1),d=L();(0,l.useEffect)(()=>{!t||s||(o(!0),c.getCategories().then(e=>{i(e.data||[]),u(!0),o(!1)}).catch(()=>{u(!0),o(!1)}))},[t,s]);let f=t=>{n(!1),e?.(),d(`/category/${t}`)};return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`button`,{className:`mobile-cat-toggle${t?` open`:``}`,onClick:()=>n(e=>!e),type:`button`,children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`i`,{className:`fas fa-th-large`,style:{marginRight:8,color:`var(--gold-dk)`}}),`Categories`]}),(0,Q.jsx)(`i`,{className:`fas fa-chevron-down chevron`})]}),(0,Q.jsxs)(`div`,{className:`mobile-cat-panel${t?` open`:``}`,children:[a&&(0,Q.jsx)(`div`,{style:{padding:`16px 20px`,color:`var(--ink-3)`,fontSize:`.85rem`},children:`Loading categoriesâ¦`}),!a&&r.map(e=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`span`,{className:`mobile-cat-item parent`,onClick:()=>f(e.sefurl),role:`button`,tabIndex:0,onKeyDown:t=>t.key===`Enter`&&f(e.sefurl),children:[e.name,e.product_count>0&&(0,Q.jsxs)(`span`,{style:{fontWeight:400,color:`var(--ink-3)`,fontSize:`.78rem`,marginLeft:4},children:[`(`,e.product_count,`)`]})]}),e.children?.map(e=>(0,Q.jsx)(`span`,{className:`mobile-cat-item`,onClick:()=>f(e.sefurl),role:`button`,tabIndex:0,onKeyDown:t=>t.key===`Enter`&&f(e.sefurl),children:e.name},e.id))]},e.id))]})]})}function qr({value:e,onChange:t}){let[n,r]=(0,l.useState)([]);return(0,l.useEffect)(()=>{c.getCategoriesBooks().then(e=>{let t=e?.data,n=Array.isArray(t?.data)?t.data:Array.isArray(t)?t:[];r(n)}).catch(()=>{})},[]),(0,Q.jsxs)(`select`,{"aria-label":`Category`,value:e,onChange:e=>t(e.target.value),children:[(0,Q.jsx)(`option`,{value:``,children:`All Categories`}),n.map(e=>(0,Q.jsx)(`option`,{value:String(e.id),children:e.name},e.id))]})}function Jr({lang:e,setLang:t,setLangMenuOpen:n,navigate:r,MALAYALAM:i,ENGLISH:a}){let[o,s]=(0,l.useState)({position:`fixed`,top:0,left:0});return(0,l.useEffect)(()=>{let e=document.getElementById(`langMenuTrigger`);if(!e)return;let t=e.getBoundingClientRect();s({position:`fixed`,top:t.bottom,left:t.left,zIndex:1499,background:`var(--white)`,border:`1.5px solid var(--border)`,borderTop:`3px solid var(--gold)`,borderRadius:`0 0 8px 8px`,boxShadow:`0 12px 40px rgba(28,25,23,.14)`,minWidth:200,overflow:`hidden`})},[]),(0,Q.jsx)(`div`,{style:o,children:[{val:i,label:`Malayalam`,sub:`Default â Malayalam books`},{val:a,label:`English`,sub:`English books`}].map(i=>(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>{t(i.val),n(!1),r(i.val===1?`/home-malayalam`:`/home-english`)},style:{display:`flex`,alignItems:`center`,gap:12,width:`100%`,padding:`12px 18px`,background:e===i.val?`rgba(93,183,51,.07)`:`none`,border:`none`,borderBottom:`1px solid var(--border)`,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`,transition:`background .18s`}
4,children:[(0,Q.jsx)(`div`,{style:{width:34,height:34,borderRadius:7,flexShrink:0,background:e===i.val?`var(--gold)`:`var(--cream-2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:`.68rem`,fontWeight:800,color:e===i.val?`#fff`:`var(--ink-3)`},children:i.label.slice(0,2).toUpperCase()}),(0,Q.jsxs)(`div`,{style:{minWidth:0},children:[(0,Q.jsxs)(`div`,{style:{fontSize:`.9rem`,fontWeight:e===i.val?700:500,color:e===i.val?`var(--gold-dk)`:`var(--ink)`,display:`flex`,alignItems:`center`,gap:6},children:[i.label,e===i.val&&(0,Q.jsx)(`i`,{className:`fas fa-check`,style:{fontSize:`.7rem`,color:`var(--gold-dk)`}})]}),(0,Q.jsx)(`div`,{style:{fontSize:`.73rem`,color:`var(--ink-3)`,marginTop:1},children:i.sub})]})]},i.val))})}function Yr(){let[e,t]=(0,l.useState)(!1),[n,r]=(0,l.useState)(!1),i=I(),a=L(),{items:s,summary:c}=Or(),{wishCount:u}=jr(),{lang:f,langLabel:p,setLang:m,MALAYALAM:h,ENGLISH:g}=Lr(),{freeLimit:_}=Br(),[v,y]=(0,l.useState)(``),b=I();(0,l.useEffect)(()=>{b.pathname.startsWith(`/search`)||y(``)},[b.pathname]);let{user:x,isLoggedIn:S,logout:C}=$(),w=s.length>0?s.length:c?.total_items||0,T=e=>i.pathname===e?`active`:``,E=i.pathname===`/home-english`||i.pathname===`/home-malayalam`;return(0,l.useEffect)(()=>{r(!1)},[i]),(0,l.useEffect)(()=>{t(!1)},[i]),(0,l.useEffect)(()=>(document.body.style.overflow=e?`hidden`:``,()=>{document.body.style.overflow=``}),[e]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`header`,{className:`header`,id:`mainHeader`,children:[(0,Q.jsx)(`div`,{className:`topbar`,children:(0,Q.jsxs)(`div`,{className:`topbar__inner`,children:[(0,Q.jsxs)(`div`,{className:`topbar__left`,children:[(0,Q.jsxs)(`a`,{href:`tel:+919846221331`,children:[(0,Q.jsx)(`i`,{className:`fas fa-phone-alt`}),` +91 98462 21331`]}),`[email protected]`]}),(0,Q.jsxs)(`div`,{className:`topbar__right`,children:[(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`i`,{className:`fas fa-truck`}),` Free shipping on orders over â¹`,Math.round(_)]}),S?(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,Q.jsxs)(H,{to:`/dashboard`,className:`btn-login`,style:{background:`var(--gold)`},children:[(0,Q.jsx)(`i`,{className:`fas fa-user`}),` `,x?.firstname||`Account`]}),(0,Q.jsx)(`button`,{type:`button`,onClick:C,style:{background:`none`,border:`1px solid rgba(255,255,255,.3)`,color:`#fff`,borderRadius:99,padding:`4px 14px`,fontSize:`.75rem`,cursor:`pointer`,fontFamily:`inherit`},children:`Sign Out`})]}):(0,Q.jsx)(H,{to:`/login`,className:`btn-login`,children:`Login / Register`})]})]})}),(0,Q.jsxs)(`div`,{className:`header__inner`,children:[(0,Q.jsx)(H,{to:`/`,className:`logo`,children:(0,Q.jsx)(`img`,{src:o(`DC_BOOKS_LOGO_261x92.png`),alt:`DC Books Online Bookstore`,className:`logo__img`})}),(0,Q.jsxs)(`div`,{className:`search-bar`,children:[(0,Q.jsx)(qr,{value:v,onChange:y}),(0,Q.jsx)(Ur,{categoryId:v})]}),(0,Q.jsxs)(`div`,{className:`header__actions`,children:[(0,Q.jsxs)(H,{to:`/wishlist`,className:`icon-btn`,"aria-label":`Wishlist`,style:{position:`relative`},children:[(0,Q.jsx)(`i`,{className:`far fa-heart`}),u>0&&(0,Q.jsx)(`span`,{className:`badge`,children:u})]}),(0,Q.jsxs)(H,{to:`/cart`,className:`icon-btn`,"aria-label":`Cart`,children:[(0,Q.jsx)(`i`,{className:`fas fa-shopping-bag`}),w>0&&(0,Q.jsx)(`span`,{className:`badge`,children:w})]}),(0,Q.jsxs)(`button`,{className:`hamburger`,"aria-label":`Open menu`,onClick:()=>t(!0),type:`button`,children:[(0,Q.jsx)(`span`,{}),(0,Q.jsx)(`span`,{}),(0,Q.jsx)(`span`,{})]})]})]}),(0,Q.jsx)(`nav`,{className:`subnav`,style:{position:`relative`},children:(0,Q.jsxs)(`div`,{className:`subnav__inner`,children:[(0,Q.jsx)(`button`,{type:`button`,className:`subnav__link-btn${T(`/`)?` active`:``}`,onClick:()=>{m(1),a(`/`)},children:`Home`}),(0,Q.jsx)(Gr,{}),(0,Q.jsxs)(`div`,{className:`subnav__lang-wrap`,style:{position:`relative`,display:`none`},children:[(0,Q.jsxs)(`button`,{className:`subnav__mega-trigger${n?` open`:``}${E?` active`:``}`,onClick:()=>r(e=>!e),type:`button`,id:`langMenuTrigger`,"aria-haspopup":`true`,"aria-expanded":n,children:[`Other Language Books`,(0,Q.jsx)(`i`,{className:`fas fa-chevron-down chevron`,style:{fontSize:`.62rem`,marginLeft:4,transition:`transform .25s`,transform:n?`rotate(180deg)`:`none`,color:`var(--ink-3)`}})]}),n&&(0,d.createPortal)((0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:1498},onClick:()=>r(!1)}),(0,Q.jsx)(Jr,{lang:f,setLang:m,setLangMenuOpen:r,navigate:a,MALAYALAM:h,ENGLISH:g})]}),document.body)]}),(0,Q.jsx)(H,{to:`/dctopbooks`,className:T(`/dctopbooks`),children:`DC Top 100`}),(0,Q.jsx)(H,{to:`/award-winners`,className:T(`/award-winners`),children:`Award Winners`}),(0,Q.jsx)(H,{to:`/rush-hours`,className:T(`/rush-hours`),children:`Rush Hours`}),(0,Q.jsx)(H,{to:`/email-gift-vouchers`,className:T(`/email-gift-vouchers`),children:`Email Gift Vouchers`}),(0,Q.jsx)(H,{to:`/bundle-offers`,className:T(`/bundle-offers`),children:`Bundle Offers`})]})})]}),(0,Q.jsxs)(`div`,{className:`mobile-nav${e?` open`:``}`,id:`mobileNav`,children:[(0,Q.jsx)(`div`,{className:`mobile-nav__overlay`,onClick:()=>t(!1)}),(0,Q.jsxs)(`div`,{className:`mobile-nav__drawer`,children:[(0,Q.jsxs)(`div`,{className:`mobile-nav__header`,children:[(0,Q.jsx)(H,{to:`/`,className:`logo`,children:(0,Q.jsx)(`img`,{src:o(`DC_BOOKS_LOGO_261x92.png`),alt:`DC Books Online Bookstore`,className:`logo__img`})}),(0,Q.jsx)(`button`,{className:`mobile-nav__close`,"aria-label":`Close menu`,onClick:()=>t(!1),type:`button`,children:(0,Q.jsx)(`i`,{className:`fas fa-times`})})]}),(0,Q.jsxs)(`nav`,{className:`mobile-nav__links`,children:[S?(0,Q.jsxs)(H,{to:`/dashboard`,className:`mobile-nav__profile-card`,onClick:()=>t(!1),children:[(0,Q.jsx)(`div`,{className:`mobile-nav__user-avatar`,children:((x?.firstname||``)[0]||`U`).toUpperCase()}),(0,Q.jsxs)(`div`,{className:`mobile-nav__user-info`,children:[(0,Q.jsx)(`div`,{className:`mobile-nav__user-name`,children:[x?.firstname,x?.lastname].filter(
4Boolean).join(` `)||`My Account`}),(0,Q.jsx)(`div`,{className:`mobile-nav__user-email`,children:x?.email})]}),(0,Q.jsx)(`i`,{className:`fas fa-chevron-right`,style:{marginLeft:`auto`,color:`rgba(255,255,255,.4)`,fontSize:`.75rem`}})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(H,{to:`/login`,onClick:()=>t(!1),children:[(0,Q.jsx)(`i`,{className:`fas fa-sign-in-alt`}),` Login`]}),(0,Q.jsxs)(H,{to:`/register`,onClick:()=>t(!1),children:[(0,Q.jsx)(`i`,{className:`fas fa-user-plus`}),` Create Account`]})]}),(0,Q.jsxs)(`button`,{type:`button`,className:`mobile-nav__link-btn${T(`/`)?` active`:``}`,onClick:()=>{m(1),a(`/`),t(!1)},children:[(0,Q.jsx)(`i`,{className:`fas fa-home`}),` Home`]}),(0,Q.jsx)(Kr,{onNavigate:()=>t(!1)}),(0,Q.jsxs)(H,{to:`/dctopbooks`,className:T(`/dctopbooks`),onClick:()=>t(!1),children:[(0,Q.jsx)(`i`,{className:`fas fa-trophy`}),` DC Top 100`]}),(0,Q.jsxs)(H,{to:`/award-winners`,className:T(`/award-winners`),onClick:()=>t(!1),children:[(0,Q.jsx)(`i`,{className:`fas fa-award`}),` Award Winners`]}),(0,Q.jsxs)(H,{to:`/rush-hours`,className:T(`/rush-hours`),onClick:()=>t(!1),children:[(0,Q.jsx)(`i`,{className:`fas fa-bolt`}),` Rush Hours`]}),(0,Q.jsxs)(H,{to:`/email-gift-vouchers`,className:T(`/email-gift-vouchers`),onClick:()=>t(!1),children:[(0,Q.jsx)(`i`,{className:`fas fa-envelope-open-text`}),` Email Gift Vouchers`]}),(0,Q.jsxs)(H,{to:`/bundle-offers`,className:T(`/bundle-offers`),onClick:()=>t(!1),children:[(0,Q.jsx)(`i`,{className:`fas fa-boxes`}),` Bundle Offers`]}),(0,Q.jsxs)(H,{to:`/cart`,className:T(`/cart`),onClick:()=>t(!1),children:[(0,Q.jsx)(`i`,{className:`fas fa-shopping-bag`}),` My Cart`]})]})]})]})]})}function Xr(){let[e,t]=(0,l.useState)(!1);return(0,Q.jsxs)(`footer`,{className:`footer`,children:[(0,Q.jsxs)(`div`,{className:`footer__inner`,children:[(0,Q.jsxs)(`div`,{className:`footer__brand`,children:[(0,Q.jsx)(H,{to:`/`,className:`footer__brand-name`,children:`DC Books`}),(0,Q.jsx)(`p`,{id:`dcAboutText`,style:e?{}:{display:`-webkit-box`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:`DC Books started in 1974 by Dominic Chacko Kizhakemuri [popularly known as DC, doyen of publishing in India] is considered as one of the top five prestigious literary publishing houses in India. It is the first ISO certified book industry in India. DC Books is considered to have the highest pool of intellectual property / content suited for the Indian market.`}),(0,Q.jsx)(`button`,{onClick:()=>t(!e),style:{background:`none`,border:`none`,color:`var(--gold-lt)`,fontSize:`.78rem`,fontWeight:600,cursor:`pointer`,padding:`4px 0`,fontFamily:`inherit`},children:e?`Read less`:`Read more`})]}),(0,Q.jsxs)(`div`,{className:`footer__col`,children:[(0,Q.jsx)(`h4`,{children:`Shop`}),(0,Q.jsx)(`ul`,{children:[{label:`New Releases`,to:`/books/newreleases`},{label:`Best Sellers`,to:`/books/bestsellers`},{label:`Top 100`,to:`/dctopbooks`},{label:`Shipping Policy`,to:`/shippingpolicy`},{label:`Return Policy`,to:`/refund`},{label:`Payment Options`,to:`/paymentoptions`}].map(({label:e,to:t})=>(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(H,{to:t,children:[(0,Q.jsx)(`i`,{className:`fas fa-chevron-right`}),` `,e]})},e))})]}),(0,Q.jsxs)(`div`,{className:`footer__col`,children:[(0,Q.jsx)(`h4`,{children:`Links`}),(0,Q.jsxs)(`ul`,{children:[[{label:`About Us`,to:`/aboutus`},{label:`My Account`,to:`/dashboard`},{label:`Online Purchase Enquiry`,to:`/onlinepurchaseenquiry`},{label:`Contact Us`,to:`/contactus`},{label:`FAQ`,to:`/faq`}].map(({label:e,to:t})=>(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(H,{to:t,children:[(0,Q.jsx)(`i`,{className:`fas fa-chevron-right`}),` `,e]})},e)),(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`a`,{href:`https://dcbooks.com/`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,Q.jsx)(`i`,{className:`fas fa-chevron-right`}),` Blog`]})})]})]}),(0,Q.jsxs)(`div`,{className:`footer__col`,children:[(0,Q.jsx)(`h4`,{children:`Contact Us`}),(0,Q.jsxs)(`div`,{className:`footer__contact-item`,children:[(0,Q.jsx)(`i`,{className:`fas fa-map-marker-alt`}),(0,Q.jsx)(`span`,{children:`DC Kizhakemuri Edam, Good Shepherd Street, Kottayam, Kerala 686 001`})]}
4),(0,Q.jsxs)(`div`,{className:`footer__contact-item`,children:[(0,Q.jsx)(`i`,{className:`fas fa-phone-alt`}),(0,Q.jsx)(`span`,{children:`+91 98462 21331`})]}),(0,Q.jsxs)(`div`,{className:`footer__contact-item`,children:[(0,Q.jsx)(`i`,{className:`fas fa-envelope`}),(0,Q.jsx)(`span`,{children:`[email protected]`})]}),(0,Q.jsx)(`h5`,{className:`footer__follow-heading`,children:`Follow Us`}),(0,Q.jsx)(`div`,{className:`footer__social`,children:[{icon:`fab fa-facebook-f`,label:`Facebook`,href:`https://www.facebook.com/dcbooks`},{icon:`fab fa-x-twitter`,label:`Twitter`,href:`https://x.com/dcbooksonline`},{icon:`fab fa-instagram`,label:`Instagram`,href:`https://www.instagram.com/dcbooks`},{icon:`fab fa-youtube`,label:`YouTube`,href:`https://www.youtube.com/@DCBooksonline`},{icon:`fab fa-whatsapp`,label:`WhatsApp`,href:`https://chat.whatsapp.com/C04tFHESkouFgnby2txesy`}].map(({icon:e,label:t,href:n})=>(0,Q.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`social-btn`,"aria-label":t,children:(0,Q.jsx)(`i`,{className:e})},t))})]})]}),(0,Q.jsxs)(`div`,{className:`footer__bottom`,children:[(0,Q.jsx)(`p`,{children:`Copyright © 2026, Current Books India Private Limited. All rights reserved.`}),(0,Q.jsxs)(`a`,{href:`https://tarjima.com/`,target:`_blank`,rel:`noopener`,className:`tarjima-link`,children:[`Powered by`,` `,(0,Q.jsx)(`strong`,{style:{color:`#1a6fc4`,fontFamily:`'Inter',Arial,sans-serif`,fontStyle:`italic`},children:`Tarjima`})]}),(0,Q.jsxs)(`div`,{className:`footer__bottom-links`,children:[(0,Q.jsx)(H,{to:`/privacy`,children:`Privacy`}),(0,Q.jsx)(H,{to:`/termsofuse`,children:`Terms`}),(0,Q.jsx)(H,{to:`/privacy#cookies`,children:`Cookies`})]})]})]})}function Zr(){document.querySelectorAll(`.reveal, .reveal-left, .reveal-right, .reveal-scale, .fade-up`).forEach(e=>e.classList.add(`visible`))}function Qr(e){document.querySelectorAll(`.reveal, .reveal-left, .reveal-right, .reveal-scale, .fade-up`).forEach(t=>{t.classList.contains(`visible`)||e.observe(t)})}function $r({children:e}){return(0,l.useEffect)(()=>{let e=document.getElementById(`backTop`);if(!e)return;let t=()=>{let t=window.scrollY>400;e.classList.toggle(`show`,t),e.classList.toggle(`visible`,t)};return window.addEventListener(`scroll`,t,{passive:!0}),e.addEventListener(`click`,()=>window.scrollTo({top:0,behavior:`smooth`})),()=>window.removeEventListener(`scroll`,t)},[]),(0,l.useEffect)(()=>{if(!(`IntersectionObserver`in window)){Zr();return}let e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(t.target.classList.add(`visible`),e.unobserve(t.target))})},{threshold:0,rootMargin:`0px 0px -20px 0px`});Zr();let t=new MutationObserver(()=>Qr(e));return t.observe(document.body,{childList:!0,subtree:!0}),Qr(e),()=>{e.disconnect(),t.disconnect()}},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Yr,{}),(0,Q.jsx)(`main`,{children:e}),(0,Q.jsx)(Xr,{}),(0,Q.jsx)(`a`,{href:s,className:`wa-float`,"aria-label":`WhatsApp`,target:`_blank`,rel:`noopener noreferrer`,children:(0,Q.jsx)(`i`,{className:`fab fa-whatsapp`})}),(0,Q.jsx)(`button`,{className:`back-top`,id:`backTop`,"aria-label":`Back to top`,children:(0,Q.jsx)(`i`,{className:`fas fa-chevron-up`})})]})}function ei({children:e}){let{isLoggedIn:t,authReady:n}=$(),r=I();return n?t?e:(0,Q.jsx)(Tt,{to:`/login`,state:{from:r.pathname},replace:!0}):null}var ti=(0,l.lazy)(()=>h(()=>import(`./Home-D2xcr4dZ.js`),__vite__mapDeps([0,1,2,3,4,5,6]))),ni=(0,l.lazy)(()=>h(()=>import(`./ProductListingPage-jsSvt4Xw.js`),__vite__mapDeps([7,1,2,3,4,8,5,9,6]))),ri=(0,l.lazy)(()=>h(()=>import(`./CategoryPage-DCgB4LxI.js`),__vite__mapDeps([10,1,2,3,4,8,5,9]))),ii=(0,l.lazy)(()=>h(()=>import(`./AuthorsPage-Cbm8s4gR.js`),__vite__mapDeps([11,1,2,3,4]))),ai=(0,l.lazy)(()=>h(()=>import(`./AuthorDetailPage-ByV8bePt.js`),__vite__mapDeps([12,1,2,3,4,13,8,5]))),oi=(0,l.lazy)(()=>h(()=>import(`./PublisherDetailPage-Cn-XgKAV.js`),__vite__mapDeps([14,1,2,3,4,8,5]))),si=(0,l.lazy)(()=>h(()=>import(`./ProductDetailPage-DhW16FTC.js`),__vite__mapDeps([15,1,2,3,4,13]))),ci=(0,l.lazy)(()=>h(()=>import(`./CartPage-BAVpieh0.js`),__vite__mapDeps([16,1,2,3,4,17,18]))),li=(0,l.lazy)(()=>h(()=>import(`./WishlistPage-BxqnrZSa.js`),__vite__mapDeps([19,1,2,3,4,17]))),ui=(0,l.lazy)(()=>h(()=>import(`./DashboardPage-BZaUwhvs.js`),__vite__mapDeps([20,1,2,3,4]))),di=(0,l.lazy)(()=>h(()=>import(`./SearchResultsPage-CkceXmZq.js`),__vite__mapDeps([21,1,2,3,4,8,5]))),fi=(0,l.lazy)(()=>h(()=>import(`./CheckoutPage-j9Www_Hq.js`),__vite__mapDeps([22,1,2,3,4,18]))),pi=(0,l.lazy)(()=>h(()=>import(`./OrderSuccessPage-CFrsQ97o.js`),__vite__mapDeps([23,1,2,4]))),mi=(0,l.lazy)(()=>h(()=>import(`./AwardWinnersPage-DkQ0A0XH.js`),__vite__mapDeps([24,2,1,3,4,7,8,5,9,6]))),hi=(0,l.lazy)(()=>h(()=>import(`./RushHoursPage-CotjA0Az.js`),__vite__mapDeps([25,2,1,3,4,7,8,5,9,6]))),gi=(0,l.lazy)(()=>h(()=>import(`./EmailGiftVouchersPage-C-6d3p72.js`),__vite__mapDeps([26,1,2,3,4]))),_i=(0,l.lazy)(()=>h(()=>import(`./BundleOffersPage-BaFv7rii.js`),__vite__mapDeps([27,1,2,3,4,17]))),vi=(0,l.lazy)(()=>h(()=>import(`./ShippingPolicyPage-DfFqNgL2.js`),__vite__mapDeps([28,2,1,4]))),yi=(0,l.lazy)(()=>h(()=>import(`./ReturnPolicyPage-MgQEL2ia.js`),__vite__mapDeps([29,2,1,4]))),bi=(0,l.lazy)(()=>h(()=>import(`./PaymentOptionsPage-CyWiTkC7.js`),__vite__mapDeps([30,2,1,4]))),xi=(0,l.lazy)(()=>h(()=>import(`./PrivacyPolicyPage-CG5Huirj.js`),__vite__mapDeps([31,2,1,4]))),Si=(0,l.lazy)(()=>h(()=>import(`./TermsOfUsePage-BvyUWxlH.js`),__vite__mapDeps([32,2,1,4]))),Ci=(0,l.lazy)(()=>h(()=>import(`./ContactUsPage-CtLRsol1.js`),__vite__mapDeps([33,1,2,3,4]))),wi=(0,l.lazy)(()=>h(()=>import(`./OnlinePurchaseEnquiryPage-CSR9wR2Z.js`),__vite__mapDeps([34,1,2,3,4]))),Ti=(0,l.lazy)(()=>h(()=>import(`./AboutUsPage-B9QVQSkT.js`),__vite__mapDeps([35,2,1,4]))),Ei=(0,l.lazy)(()=>h(()=>import(`./FAQPage-C382MEWn.js`),__vite__mapDeps([36,1,2,4]))),Di=(0,l.lazy)(()=>h(()=>import(`./LoginPage-D6p9eHzm.js`),__vite__mapDeps([37,1,2,4]))),Oi=(0,l.lazy)(()=>h(()=>
4import(`./RegisterPage-DSoOXdV8.js`),__vite__mapDeps([38,1,2,4]))),ki=(0,l.lazy)(()=>h(()=>import(`./ForgotPasswordPage-D3cTlkKQ.js`),__vite__mapDeps([39,1,2,3,4]))),Ai=(0,l.lazy)(()=>h(()=>import(`./ResetPasswordPage-DyNdY9ix.js`),__vite__mapDeps([40,1,2,3,4]))),ji=(0,l.lazy)(()=>h(()=>import(`./VerifyEmailPage-BbNPzZK3.js`),__vite__mapDeps([41,1,2,3,4]))),Mi=(0,l.lazy)(()=>h(()=>import(`./NotFoundPage-hwF38b2e.js`),__vite__mapDeps([42,2,1,4]))),Ni=()=>(0,Q.jsx)(`div`,{style:{minHeight:`60vh`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,Q.jsx)(`i`,{className:`fas fa-spinner fa-spin`,style:{fontSize:`2rem`,color:`var(--gold)`}})}),Pi=({page:e})=>(0,Q.jsxs)(`div`,{style:{padding:`120px 24px`,textAlign:`center`,minHeight:`55vh`},children:[(0,Q.jsx)(`h2`,{style:{fontFamily:`'Inter',Arial,sans-serif`,fontSize:`2rem`,marginBottom:12},children:e}),(0,Q.jsx)(`p`,{style:{color:`var(--ink-3)`},children:`This page is coming soon.`})]});function Fi(){let{pathname:e}=I();return(0,l.useEffect)(()=>{window.scrollTo({top:0,behavior:`instant`})},[e]),null}function Ii({forceLang:e}={}){let{lang:t,setLang:n}=Lr();return(0,l.useEffect)(()=>{e!==void 0&&e!==t&&n(e)},[e]),(0,Q.jsx)(ti,{})}function Li(){let{lang:e}=Lr();return(0,Q.jsx)($r,{children:(0,Q.jsxs)(Vr,{children:[(0,Q.jsx)(Fi,{}),(0,Q.jsx)(l.Suspense,{fallback:(0,Q.jsx)(Ni,{}),children:(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(z,{path:`/`,element:(0,Q.jsx)(Ii,{})}),(0,Q.jsx)(z,{path:`/home-malayalam`,element:(0,Q.jsx)(Ii,{forceLang:1})}),(0,Q.jsx)(z,{path:`/home-english`,element:(0,Q.jsx)(Ii,{forceLang:2})}),(0,Q.jsx)(z,{path:`/login`,element:(0,Q.jsx)(Di,{})}),(0,Q.jsx)(z,{path:`/register`,element:(0,Q.jsx)(Oi,{})}),(0,Q.jsx)(z,{path:`/forgot-password`,element:(0,Q.jsx)(ki,{})}),(0,Q.jsx)(z,{path:`/reset-password`,element:(0,Q.jsx)(Ai,{})}),(0,Q.jsx)(z,{path:`/verify-email/:code`,element:(0,Q.jsx)(ji,{})}),(0,Q.jsx)(z,{path:`/dashboard`,element:(0,Q.jsx)(ei,{children:(0,Q.jsx)(ui,{})})}),(0,Q.jsx)(z,{path:`/books/newreleases`,element:(0,Q.jsx)(ni,{title:`New Releases`,label:`Just Arrived`,subtitle:`The freshest titles hot off the press`,canonical:`/books/newreleases`,breadcrumbItems:[{label:`New Releases`}],filterSource:`new_releases`,fetchFn:(t,n)=>c.getNewReleases(t,n,e)})}),(0,Q.jsx)(z,{path:`/books/bestsellers`,element:(0,Q.jsx)(ni,{title:`Best Sellers`,label:`Most Loved`,subtitle:`Books our readers can't put down`,canonical:`/books/bestsellers`,breadcrumbItems:[{label:`Best Sellers`}],filterSource:`best_sellers`,fetchFn:(t,n)=>c.getBestSellers(t,n,0,e)})}),(0,Q.jsx)(z,{path:`/dctopbooks`,element:(0,Q.jsx)(ni,{title:`Top 100 Books`,label:`Curated List`,subtitle:`The definitive reading list`,canonical:`/dctopbooks`,breadcrumbItems:[{label:`Top 100`}],filterSource:`top100`,fetchFn:(t,n)=>c.getTop100Books(t,n,e)})}),(0,Q.jsx)(z,{path:`/category/:sefurl`,element:(0,Q.jsx)(ri,{})}),(0,Q.jsx)(z,{path:`/books/:sefurl`,element:(0,Q.jsx)(si,{})}),(0,Q.jsx)(z,{path:`/authors`,element:(0,Q.jsx)(ii,{})}),(0,Q.jsx)(z,{path:`/authors/:identifier`,element:(0,Q.jsx)(ai,{})}),(0,Q.jsx)(z,{path:`/publishers/:identifier`,element:(0,Q.jsx)(oi,{})}),(0,Q.jsx)(z,{path:`/cart`,element:(0,Q.jsx)(ci,{})}),(0,Q.jsx)(z,{path:`/wishlist`,element:(0,Q.jsx)(li,{})}),(0,Q.jsx)(z,{path:`/award-winners`,element:(0,Q.jsx)(mi,{})}),(0,Q.jsx)(z,{path:`/rush-hours`,element:(0,Q.jsx)(hi,{})}),(0,Q.jsx)(z,{path:`/email-gift-vouchers`,element:(0,Q.jsx)(gi,{})}),(0,Q.jsx)(z,{path:`/bundle-offers`,element:(0,Q.jsx)(_i,{})}),(0,Q.jsx)(z,{path:`/shippingpolicy`,element:(0,Q.jsx)(vi,{})}),(0,Q.jsx)(z,{path:`/refund`,element:(0,Q.jsx)(yi,{})}),(0,Q.jsx)(z,{path:`/paymentoptions`,element:(0,Q.jsx)(bi,{})}),(0,Q.jsx)(z,{path:`/privacy`,element:(0,Q.jsx)(xi,{})}),(0,Q.jsx)(z,{path:`/termsofuse`,element:(0,Q.jsx)(Si,{})}),(0,Q.jsx)(z,{path:`/contactus`,element:(0,Q.jsx)(Ci,{})}),(0,Q.jsx)(z,{path:`/onlinepurchaseenquiry`,element:(0,Q.jsx)(wi,{})}),(0,Q.jsx)(z,{path:`/aboutus`,element:(0,Q.jsx)(Ti,{})}),(0,Q.jsx)(z,{path:`/faq`,element:(0,Q.jsx)(Ei,{})}),(0,Q.jsx)(z,{path:`/search`,element:(0,Q.jsx)(di,{})}),(0,Q.jsx)(z,{path:`/checkout`,element:(0,Q.jsx)(fi,{})}),(0,Q.jsx)(z,{path:`/order-success/:id`,element:(0,Q.jsx)(pi,{})}),(0,Q.jsx)(z,{path:`/payment`,element:(0,Q.jsx)(Pi,{page:`Payment`})}),(0,Q.jsx)(z,{path:`*`,element:(0,Q.jsx)(Mi,{})})]})})]})})}function Ri(){return(0,Q.jsx)(sr,{children:(0,Q.jsx)(fn,{children:(0,Q.jsx)(yr,{children:(0,Q.jsx)(Dr,{children:(0,Q.jsx)(Ar,{children:(0,Q.jsx)(Ir,{children:(0,Q.jsx)(zr,{children:(0,Q.jsx)(Li,{})})})})})})})})}(0,u.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(l.StrictMode,{children:(0,Q.jsx)(Ri,{})}));export{$ as a,I as c,vn as d,Or as i,L as l,Lr as n,_r as o,jr as r,H as s,Br as t,it as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.