(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return r}});let l=e.r(32061);function r({reason:e,children:t}){if("undefined"==typeof window)throw Object.defineProperty(new l.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,n)=>{"use strict";function l(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return l}})},52157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return i}});let l=e.r(43476),r=e.r(74080),a=e.r(63599),o=e.r(9885);function i({moduleIds:e}){if("undefined"!=typeof window)return null;let t=a.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let l=t.reactLoadableManifest;for(let t of e){if(!l[t])continue;let e=l[t].files;n.push(...e)}}return 0===n.length?null:(0,l.jsx)(l.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,o.encodeURIPath)(e)}`;return e.endsWith(".css")?(0,l.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,r.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return d}});let l=e.r(43476),r=e.r(71645),a=e.r(67585),o=e.r(52157);function i(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},d=function(e){let t={...s,...e},n=(0,r.lazy)(()=>t.loader().then(i)),d=t.loading;function u(e){let i=d?(0,l.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,u=s?r.Suspense:r.Fragment,c=t.ssr?(0,l.jsxs)(l.Fragment,{children:["undefined"==typeof window?(0,l.jsx)(o.PreloadChunks,{moduleIds:t.modules}):null,(0,l.jsx)(n,{...e})]}):(0,l.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,l.jsx)(n,{...e})});return(0,l.jsx)(u,{...s?{fallback:i}:{},children:c})}return u.displayName="LoadableComponent",u}},70703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r}});let l=e.r(55682)._(e.r(69093));function r(e,t){let n={};"function"==typeof e&&(n.loader=e);let r={...n,...t};return(0,l.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},72906,e=>{"use strict";var t=e.i(43476),n=e.i(71645),l=e.i(70703);let r=(0,l.default)(()=>e.A(37830).then(e=>({default:e.AdminDashboard})),{loadableGenerated:{modules:[83204]},loading:()=>(0,t.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:(0,t.jsx)("div",{className:"text-lg",children:"Loading..."})}),ssr:!1}),a=(0,l.default)(()=>e.A(16517).then(e=>({default:e.AdminLogin})),{loadableGenerated:{modules:[16329]},loading:()=>(0,t.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:(0,t.jsx)("div",{className:"text-lg",children:"Loading..."})}),ssr:!1});function o(){let[e,l]=(0,n.useState)(null);(0,n.useEffect)(()=>{o()},[]);let o=async()=>{try{let e=await fetch("/api/admin/check-auth");if(e.ok){let t=await e.json();l(t.authenticated)}else l(!1)}catch(e){l(!1)}},i=async(e,t)=>{try{(await fetch("/api/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:t})})).ok?l(!0):alert("Invalid credentials")}catch(e){alert("Login failed")}},s=async()=>{try{await fetch("/api/admin/logout",{method:"POST"}),l(!1)}catch(e){console.error("Logout failed")}};return null===e?(0,t.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:(0,t.jsx)("div",{className:"text-lg",children:"Loading..."})}):e?(0,t.jsx)(r,{onLogout:s}):(0,t.jsx)(a,{onLogin:i})}e.s(["default",()=>o])},37830,e=>{e.v(t=>Promise.all(["static/chunks/dca0a8476443776e.js"].map(t=>e.l(t))).then(()=>t(83204)))},16517,e=>{e.v(t=>Promise.all(["static/chunks/86e765ec013e1a4e.js"].map(t=>e.l(t))).then(()=>t(16329)))}]);