1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9559],{447:(e,t,a)=>{"use strict";a.d(t,{HeaderThemeProvider:()=>o,Y:()=>i});var s=a(95155),r=a(12115),n=a(22147);let l=(0,r.createContext)({headerTheme:void 0,setHeaderTheme:()=>null}),o=e=>{let{children:t}=e,[a,o]=(0,r.useState)(n.A?document.documentElement.getAttribute("data-theme"):void 0),i=(0,r.useCallback)(e=>{o(e)},[]);return(0,s.jsx)(l.Provider,{value:{headerTheme:a,setHeaderTheme:i},children:t})},i=()=>(0,r.useContext)(l)},8231:(e,t,a)=>{"use strict";a.d(t,{AuthProvider:()=>o,A:()=>i});var s=a(95155),r=a(12115);let n=async(e,t,a)=>{let s=(null==a?void 0:a.method)||"POST";try{let r=await fetch(e,{method:s,..."POST"===s||"PATCH"===s?{body:JSON.stringify(t)}:{},credentials:"include",headers:{"Content-Type":"application/json",...null==a?void 0:a.headers},...a}),{errors:n,user:l,doc:o}=await r.json();if(403===r.status)throw Error("verification-failed");if(n)throw Error(function(e){var t,a,s;if(!e||0===e.length)return"An unknown error occurred.";let r=e[0];return(null==(s=r.data)||null==(a=s.errors)||null==(t=a[0])?void 0:t.message)||r.message||"An unknown error occurred."}(n));if(r.ok)return null!=l?l:o}catch(e){throw Error(e)}},l=(0,r.createContext)({}),o=e=>{let{children:t}=e,[a,o]=(0,r.useState)(),[i,d]=(0,r.useState)(null),c=(0,r.useCallback)(async e=>{let t=await n("".concat("https://weidmanns-plaza.vercel.app","/api/users"),e);return o(t),t},[]),u=(0,r.useCallback)(async()=>{await n("".concat("https://weidmanns-plaza.vercel.app","/api/users/logout")),o(null)},[]),m=(0,r.useCallback)(async e=>{let t=await n("".concat("https://weidmanns-plaza.vercel.app","/api/users/login"),e);if(null==t?void 0:t.isBanned)throw await u(),Error("Your account has been suspended. Please contact support for more information.");if(null==t?void 0:t.isDeactivated)throw await u(),Error("You have deactivated your account.");return o(t),t},[u]),h=(0,r.useCallback)(async(e,t)=>{let a=await n("".concat("https://weidmanns-plaza.vercel.app","/api/users/").concat(e),t,{method:"PATCH"});return o(a),a},[]);(0,r.useEffect)(()=>{(async()=>{o(await n("".concat("https://weidmanns-plaza.vercel.app","/api/users/me"),{},{method:"GET"}))})()},[]);let f=(0,r.useCallback)(async e=>{let t=await n("".concat("https://weidmanns-plaza.vercel.app","/api/users/forgot-password"),e);return o(t),t},[]),p=(0,r.useCallback)(async e=>{let t=await n("".concat("https://weidmanns-plaza.vercel.app","/api/users/reset-password"),e);return o(t),t},[]);return(0,s.jsx)(l,{value:{create:c,forgotPassword:f,login:m,logout:u,permissions:i,resetPassword:p,setPermissions:d,setUser:o,updateProfile:h,user:a},children:t})},i=()=>(0,r.use)(l)},17457:(e,t,a)=>{"use strict";a.d(t,{AdminBar:()=>u});var s=a(95155),r=a(98140),n=a(35695),l=a(12115);a(76849);var o=a(39565),i=a(41674);let d={pages:{plural:"Pages",singular:"Page"},posts:{plural:"Posts",singular:"Post"},projects:{plural:"Projects",singular:"Project"}},c=()=>(0,s.jsx)("span",{children:"Dashboard"}),u=e=>{var t,a;let{adminBarProps:u}=e||{},m=(0,n.useSelectedLayoutSegments)(),[h,f]=(0,l.useState)(!1),p=d[null==m?void 0:m[1]]?m[1]:"pages",x=(0,n.useRouter)(),g=l.useCallback(e=>{f(!!((null==e?void 0:e.id)&&((null==e?void 0:e.role)==="admin"||(null==e?void 0:e.role)==="super_admin")))},[]);return(0,s.jsx)("div",{className:(0,i.cn)("admin-bar","z-40 bg-black py-2 text-white",{block:h,hidden:!h}),children:(0,s.jsx)("div",{className:"container",children:(0,s.jsx)(r.J,{...u,className:"py-2 text-white",classNames:{controls:"font-medium text-white",logo:"text-white",user:"text-white"},cmsURL:(0,o.y)(),adminPath:"/dashboard",collectionSlug:p,collectionLabels:{plural:(null==(t=d[p])?void 0:t.plural)||"Pages",singular:(null==(a=d[p])?void 0:a.singular)||"Page"},authCollectionSlug:"users",logo:(0,s.jsx)(c,{}),onAuthChange:g,onPreviewExit:()=>{fetch("/next/exit-preview").then(()=>{x.push("/"),x.refresh()})},style:{backgroundColor:"transparent",padding:0,position:"relative",zIndex:"unset"}})})})}},31455:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,6874,23)),Promise.resolve().then(a.t.bind(a,69243,23)),Promise.resolve().then(a.t.bind(a,85700,23)),Promise.resolve().then(a.t.bind(a,48590,23)),Promise.resolve().then(a.t.bind(a,29898,23)),Promise.resolve().then(a.t.bind(a,58081,23)),Promise.resolve().then(a.bind(a,64527)),Promise.resolve().then(a.bind(a,15680)),Promise.resolve().then(a.bind(a,24869)),Promise.resolve().then(a.bind(a,45167)),Promise.resolve().then(a.bind(a,17457)),Promise.resolve().then(a.bind(a,91091)),Promise.resolve().then(a.bind(a,89074)),Promise.resolve().then(a.bind(a,62685)),Promise.resolve().then(a.bind(a,8231)),Promise.resolve().then(a.bind(a,447)),Promise.resolve().then(a.bind(a,99002))},38313:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(95155),r=a(41674);function n(e){let{className:t}=e;return(0,s.jsxs)("div",{className:(0,r.cn)("relative size-10 animate-spin ease-in-out",t),children:[(0,s.jsx)("div",{className:"absolute top-[50%] h-0 w-full border border-card-foreground"}),(0,s.jsx)("div",{className:"absolute left-[50%] h-full border border-card-foreground"})]})}},38382:(e,t,a)=>{"use strict";a.d(t,{CG:()=>c,Fm:()=>x,Qs:()=>b,XW:()=>g,cj:()=>d,h:()=>p,kN:()=>u,qp:()=>v});var s=a(95155),r=a(15452),n=a(74466),l=a(54416),o=a(12115),i=a(41674);let d=r.bL,c=r.l9,u=r.bm,m=r.ZL,h=o.forwardRef((e,t)=>
1{let{className:a,...n}=e;return(0,s.jsx)(r.hJ,{className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n,ref:t})});h.displayName=r.hJ.displayName;let f=(0,n.F)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),p=o.forwardRef((e,t)=>{let{side:a="right",className:n,children:o,...d}=e;return(0,s.jsxs)(m,{children:[(0,s.jsx)(h,{}),(0,s.jsxs)(r.UC,{ref:t,className:(0,i.cn)(f({side:a}),n),...d,children:[o,(0,s.jsxs)(r.bm,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,s.jsx)(l.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});p.displayName=r.UC.displayName;let x=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a})};x.displayName="SheetHeader";let g=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})};g.displayName="SheetFooter";let v=o.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.hE,{ref:t,className:(0,i.cn)("text-lg font-semibold text-foreground",a),...n})});v.displayName=r.hE.displayName;let b=o.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.VY,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",a),...n})});b.displayName=r.VY.displayName},58081:()=>{},62685:(e,t,a)=>{"use strict";a.d(t,{HeaderClient:()=>R});var s=a(95155),r=a(35695),n=a(12115),l=a(447),o=a(74783),i=a(6874),d=a.n(i),c=a(88029),u=a(38313);function m(){return(0,s.jsx)("div",{className:"fixed inset-0 z-30 flex size-full items-center justify-center bg-background",children:(0,s.jsx)(u.A,{})})}var h=a(52596);let f=e=>{let{loading:t,priority:a,className:r}=e;return(0,s.jsx)("img",{alt:"Weidmann Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,h.A)("h-[34px] w-full max-w-[9.375rem]",r),src:"/images/logo-light.svg"})};var p=a(91394),x=a(30285),g=a(48698),v=a(13052),b=a(5196),j=a(9428),y=a(41674);let w=g.bL,N=g.l9;g.YJ,g.ZL,g.Pb,g.z6,n.forwardRef((e,t)=>{let{className:a,inset:r,children:n,...l}=e;return(0,s.jsxs)(g.ZP,{ref:t,className:(0,y.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",a),...l,children:[n,(0,s.jsx)(v.A,{className:"ml-auto"})]})}).displayName=g.ZP.displayName,n.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(g.G5,{ref:t,className:(0,y.cn)("z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...r})}).displayName=g.G5.displayName;let C=n.forwardRef((e,t)=>{let{className:a,sideOffset:r=4,...n}=e;return(0,s.jsx)(g.ZL,{children:(0,s.jsx)(g.UC,{ref:t,sideOffset:r,className:(0,y.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...n})})});C.displayName=g.UC.displayName;let k=n.forwardRef((e,t)=>{let{className:a,inset:r,...n}=e;return(0,s.jsx)(g.q7,{ref:t,className:(0,y.cn)("relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",a),...n})});k.displayName=g.q7.displayName,n.forwardRef((e,t)=>{let{className:a,children:r,checked:n,...l}=e;return(0,s.jsxs)(g.H_,{ref:t,className:(0,y.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:n,...l,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(g.VF,{children:(0,s.jsx)(b.A,{className:"h-4 w-4"})})}),r]})}).displayName=g.H_.displayName,n.forwardRef((e,t)=>
1{let{className:a,children:r,...n}=e;return(0,s.jsxs)(g.hN,{ref:t,className:(0,y.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...n,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(g.VF,{children:(0,s.jsx)(j.A,{className:"h-2 w-2 fill-current"})})}),r]})}).displayName=g.hN.displayName;let P=n.forwardRef((e,t)=>{let{className:a,inset:r,...n}=e;return(0,s.jsx)(g.JU,{ref:t,className:(0,y.cn)("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",a),...n})});P.displayName=g.JU.displayName;let z=n.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(g.wv,{ref:t,className:(0,y.cn)("-mx-1 my-1 h-px bg-muted",a),...r})});z.displayName=g.wv.displayName;var A=a(38382),S=a(8231);let E=e=>{var t;let{data:a}=e,[l,i]=(0,n.useState)(!1),[u,h]=(0,n.useState)(!1),g=(null==a?void 0:a.navItems)||[],v=(0,r.usePathname)(),{user:b,logout:j}=(0,S.A)(),E=(0,n.useCallback)(e=>{var t;return b?!e||0===e.length||e.includes(b.role):null==(t=!e||0===e.length||e.includes("guest"))||t},[b]),R=(0,n.useCallback)(e=>!!v&&v===e,[v]);return(0,s.jsxs)("nav",{className:"mx-auto px-4 py-4 md:container",children:[u&&(0,s.jsx)(m,{}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(d(),{href:"/",children:(0,s.jsx)(f,{loading:"eager",priority:"high",className:"h-8 w-auto"})}),(0,s.jsx)("div",{className:"hidden flex-1 justify-center gap-2 md:flex",children:g.map((e,t)=>{var a,r;let{link:n,visibilityByRole:l}=e;return E(l)&&(0,s.jsx)(c.A,{...n,appearance:R(null!=(a=n.url)?a:"/")?"default":"secondary",size:"sm",className:(0,y.cn)("rounded-none",R(null!=(r=n.url)?r:"/")&&"border-b-4 border-red-600")},t)})}),(0,s.jsxs)("div",{className:"flex items-center",children:[b?(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(w,{children:[(0,s.jsx)(N,{children:(0,s.jsxs)(p.eu,{className:"hidden md:inline-flex",children:[b.profile&&"object"==typeof b.profile&&(0,s.jsx)(p.BK,{width:50,height:50,src:null!=(t=b.profile.url)?t:""}),(0,s.jsx)(p.q5,{className:"bg-secondary",children:b.firstName.charAt(0)})]})}),(0,s.jsxs)(C,{children:[(0,s.jsx)(P,{children:"My Account"}),(0,s.jsx)(z,{}),"user"===b.role&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{asChild:!0,children:(0,s.jsx)(d(),{href:"/account",children:"Points & Rewards"})}),(0,s.jsx)(k,{asChild:!0,children:(0,s.jsx)(d(),{href:"/bookings",children:"My Bookings"})})]}),"business_owner"===b.role&&(0,s.jsx)(k,{asChild:!0,children:(0,s.jsx)(d(),{href:"/dashboard",children:"Vendor Dashboard"})}),(0,s.jsx)(k,{asChild:!0,children:(0,s.jsx)(d(),{href:"/profile/settings",children:"Profile Settings"})}),(0,s.jsx)(k,{onClick:async()=>{h(!0),await j(),h(!1),location.replace("/login")},children:"Logout"})]})]})}):(0,s.jsx)(x.$,{variant:"outline",size:"sm",className:"hidden rounded-none md:inline-flex",asChild:!0,children:(0,s.jsx)(d(),{href:"/login",children:"Login"})}),(0,s.jsxs)(A.cj,{open:l,onOpenChange:i,children:[(0,s.jsx)(A.CG,{asChild:!0,className:"md:hidden",children:(0,s.jsxs)(x.$,{variant:"ghost",size:"icon",children:[(0,s.jsx)(o.A,{className:"size-6 text-foreground"}),(0,s.jsx)("span",{className:"sr-only",children:"Toggle menu"})]})}),(0,s.jsxs)(A.h,{side:"right",children:[(0,s.jsx)(A.qp,{children:"Menu"}),(0,s.jsxs)("div",{className:"mt-4 flex flex-col space-y-4",children:[g.map((e,t)=>{let{link:a,visibilityByRole:r}=e;return E(r)&&(0,s.jsx)(c.A,{...a,appearance:"link",onClick:()=>i(!1)},t)}),b?(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:["user"===b.role&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.$,{variant:"secondary",asChild:!0,children:(0,s.jsx)(d(),{href:"/account",onClick:()=>i(!1),children:"Points & Rewards"})}),(0,s.jsx)(x.$,{variant:"secondary",asChild:!0,children:(0,s.jsx)(d(),{href:"/bookings",onClick:()=>i(!1),children:"My Bookings"})})]}),"business_owner"===b.role&&(0,s.jsx)(x.$,{variant:"secondary",asChild:!0,children:(0,s.jsx)(d(),{href:"/dashboard",onClick:()=>i(!1),children:"Vendor Dashboard"})}),(0,s.jsx)(x.$,{variant:"secondary",asChild:!0,children:(0,s.jsx)(d(),{href:"/profile/settings",onClick:()=>i(!1),children:"Profile Settings"})}),(0,s.jsx)(x.$,{variant:"default",onClick:async()=>{h(!0),await j(),h(!1),i(!1),location.replace("/login")},children:"Logout"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.$,{variant:"default",asChild:!0,onClick:()=>i(!1),children:(0,s.jsx)(d(),{href:"/login",children:"Login"})}),(0,s.jsx)(x.$,{variant:"secondary",size:"sm",asChild:!0,onClick:()=>i(!1),children:(0,s.jsx)(d(),{href:"/register",children:"Register"})})]})]})]})]})]})]})]})},R=e=>{let{data:t}
1=e,[a,o]=(0,n.useState)(null),{headerTheme:i,setHeaderTheme:d}=(0,l.Y)(),c=(0,r.usePathname)();return(0,n.useEffect)(()=>{d(null)},[c]),(0,n.useEffect)(()=>{i&&i!==a&&o(i)},[i]),(0,s.jsx)("header",{className:"relative z-40 lg:container",...a?{"data-theme":a}:{},children:(0,s.jsx)(E,{data:t})})}},76849:()=>{},88029:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var s=a(95155),r=a(6874),n=a.n(r);a(12115);var l=a(30285),o=a(41674);let i=e=>{let{type:t,appearance:a="inline",children:r,className:i,label:d,newTab:c,reference:u,size:m,url:h,onClick:f}=e,p="reference"===t&&"object"==typeof(null==u?void 0:u.value)&&u.value.slug?"".concat((null==u?void 0:u.relationTo)!=="pages"?"/".concat(null==u?void 0:u.relationTo):"","/").concat(u.value.slug):h;if(!p)return null;let x=c?{rel:"noopener noreferrer",target:"_blank"}:{};return"inline"===a?(0,s.jsxs)(n(),{className:(0,o.cn)(i),href:p||h||"",...x,children:[d&&d,r&&r]}):(0,s.jsx)(l.$,{asChild:!0,className:i,size:"link"===a?"clear":m,variant:a,onClick:f,children:(0,s.jsxs)(n(),{className:(0,o.cn)(i),href:p||h||"",...x,children:[d&&d,r&&r]})})}},89074:(e,t,a)=>{"use strict";a.d(t,{Toaster:()=>l});var s=a(95155),r=a(51362),n=a(56671);let l=e=>{let{...t}=e,{theme:a="system"}=(0,r.D)();return(0,s.jsx)(n.l$,{theme:a,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})}},91394:(e,t,a)=>{"use strict";a.d(t,{BK:()=>i,eu:()=>o,q5:()=>d});var s=a(95155),r=a(54011),n=a(12115),l=a(41674);let o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.bL,{ref:t,className:(0,l.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",a),...n})});o.displayName=r.bL.displayName;let i=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r._V,{ref:t,className:(0,l.cn)("aspect-square h-full w-full",a),...n})});i.displayName=r._V.displayName;let d=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.H4,{ref:t,className:(0,l.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",a),...n})});d.displayName=r.H4.displayName},99002:(e,t,a)=>{"use strict";a.d(t,{ThemeProvider:()=>d});var s=a(95155),r=a(12115),n=a(22147);let l="payload-theme",o=()=>{let e=window.matchMedia("(prefers-color-scheme: dark)");return"boolean"==typeof e.matches?e.matches?"dark":"light":null},i=(0,r.createContext)({setTheme:()=>null,theme:void 0}),d=e=>{let{children:t}=e,[a,d]=(0,r.useState)(n.A?document.documentElement.getAttribute("data-theme"):void 0),c=(0,r.useCallback)(e=>{if(null===e){window.localStorage.removeItem(l);let e=o();document.documentElement.setAttribute("data-theme",e||""),e&&d(e)}else d(e),window.localStorage.setItem(l,e),document.documentElement.setAttribute("data-theme",e)},[]);return(0,r.useEffect)(()=>{let e="light",t=window.localStorage.getItem(l);if(function(e){return!!e&&["dark","light"].includes(e)}(t))e=t;else{let t=o();t&&(e=t)}document.documentElement.setAttribute("data-theme",e),d(e)},[]),(0,s.jsx)(i.Provider,{value:{setTheme:c,theme:a},children:t})}}},e=>{e.O(0,[1053,2584,4042,3455,6874,3008,7282,8661,2549,9132,3824,8034,5152,5452,6671,4869,240,8441,5964,7358],()=>e(e.s=31455)),_N_E=e.O()}]);
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.