module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},70864,a=>{a.n(a.i(233290))},102894,a=>{a.n(a.i(666188))},13718,a=>{a.n(a.i(685523))},118198,a=>{a.n(a.i(545518))},262212,a=>{a.n(a.i(866114))},365893,a=>{a.n(a.i(868852))},750321,a=>{"use strict";let b=(process.env.NEXT_PUBLIC_AAU_API_BASE_URL||process.env.AAU_API_BASE_URL||"https://edu.yemenfrappe.com").replace(/\/$/,"");function c(a){let c=String(a||"").trim();if(!c)return"";if(/^https?:\/\/assets\//i.test(c)&&(c=c.replace(/^https?:\/\/assets\//i,"/assets/")),/^\/\/assets\//i.test(c)&&(c=c.replace(/^\/\/assets\//i,"/assets/")),/^(https?:)?\/\//i.test(c))return c.startsWith("//")?`https:${c}`:c;if(/^(data|blob):/i.test(c))return c;let d=c.startsWith("/")?c:`/${c}`;return d.startsWith("/assets/")||d.startsWith("/files/")||d.startsWith("/private/files/")?`${b}${d}`:d}a.s(["resolveMediaUrl",()=>c])},114714,a=>{"use strict";var b=a.i(750321);let c=(process.env.NEXT_PUBLIC_AAU_API_BASE_URL||process.env.AAU_API_BASE_URL||"https://edu.yemenfrappe.com").replace(/\/$/,"");async function d(a){let b=await fetch(`${c}${a}`,{headers:{Accept:"application/json"},cache:"no-store"});if(!b.ok)throw Error(`Events API request failed: ${b.status}`);return b.json()}function e(a){if(!a)return null;let b=String(a).trim();if(!b)return null;let c=b.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(c){let[,a,b,d]=c;return new Date(Number(a),Number(b)-1,Number(d))}let d=new Date(b);return Number.isNaN(d.getTime())?null:d}function f(a){return a?.ok&&a?.data?a.data:a?.message?.ok&&a?.message?.data?a.message.data:a?.data?.ok&&a?.data?.data?a.data.data:a?.data?a.data:a}function g(a){let c=function(a){let b=new Date;b.setHours(0,0,0,0);let c=e(a?.date),d=e(a?.endDate)||(c?new Date(c):null);if(c&&!Number.isNaN(c.getTime())){if(c.setHours(0,0,0,0),d&&!Number.isNaN(d.getTime())){if(d.setHours(23,59,59,999),d<b)return"completed";if(c<=b&&b<=d)return"ongoing"}return c>b?"upcoming":"ongoing"}let f=String(a?.status||"").trim().toLowerCase();return"ended"===f||"past"===f?"completed":"ongoing"===f||"completed"===f||"upcoming"===f?f:"upcoming"}(a);return{id:String(a?.id||""),slug:String(a?.slug||a?.id||""),titleAr:String(a?.titleAr||""),titleEn:String(a?.titleEn||a?.titleAr||""),descriptionAr:String(a?.descriptionAr||""),descriptionEn:String(a?.descriptionEn||a?.descriptionAr||""),contentAr:String(a?.contentAr||a?.descriptionAr||""),contentEn:String(a?.contentEn||a?.descriptionEn||a?.contentAr||a?.descriptionAr||""),date:String(a?.date||""),endDate:a?.endDate?String(a.endDate):void 0,locationAr:String(a?.locationAr||""),locationEn:String(a?.locationEn||a?.locationAr||""),organizerAr:String(a?.organizerAr||""),organizerEn:String(a?.organizerEn||a?.organizerAr||""),category:a?.category||"other",status:c,registrationRequired:!!a?.registrationRequired,registrationLink:a?.registrationLink||void 0,image:(0,b.resolveMediaUrl)(a?.image)}}async function h(){try{let a=await d("/api/aau/events?limit=100"),b=f(a);return(Array.isArray(b?.items)?b.items:Array.isArray(a?.items)?a.items:[]).map(g)}catch{return[]}}async function i(a){try{let b=await d(`/api/aau/events/${encodeURIComponent(a)}`),c=f(b);return g(c)}catch{return null}}a.s(["getEventBySlug",()=>i,"getEventsList",()=>h])},314707,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/EventsPageContent.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/EventsPageContent.tsx <module evaluation>","default")},955928,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/EventsPageContent.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/EventsPageContent.tsx","default")},439353,a=>{"use strict";a.i(314707);var b=a.i(955928);a.n(b)},434526,a=>{"use strict";var b=a.i(907997),c=a.i(114714),d=a.i(439353);async function e(){let a=await (0,c.getEventsList)();return(0,b.jsx)(d.default,{initialEvents:a})}a.s(["default",()=>e,"dynamic",0,"force-dynamic","metadata",0,{title:"الفعاليات | Events",description:"فعاليات وأنشطة جامعة الجيل الجديد - Al-Jeel Al-Jadeed University Events and Activities"},"revalidate",0,0])}];

//# sourceMappingURL=%5Broot-of-the-server%5D__07f99fea._.js.map