"use strict";(()=>{var e={};e.id=6717,e.ids=[6717],e.modules={53524:e=>{e.exports=require("@prisma/client")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},14021:e=>{e.exports=import("next/dist/compiled/@vercel/og/index.node.js")},73119:(e,t,a)=>{a.r(t),a.d(t,{headerHooks:()=>F,originalPathname:()=>_,requestAsyncStorage:()=>v,routeModule:()=>w,serverHooks:()=>q,staticGenerationAsyncStorage:()=>M,staticGenerationBailout:()=>A});var r={};a.r(r),a.d(r,{default:()=>c});var i={};a.r(i),a.d(i,{GET:()=>f}),a(95655);var o=a(83323),n=a(54647),s=a(21877),l=a(53524);let u=globalThis,d=u.prisma??new l.PrismaClient,p="https://musafoods-uat.clarobyte.com";async function c(){let e=[{url:p,lastModified:new Date,changeFrequency:"daily",priority:1},{url:`${p}/products`,lastModified:new Date,changeFrequency:"daily",priority:.9},{url:`${p}/contact`,lastModified:new Date,changeFrequency:"monthly",priority:.5}];try{let t=await d.product.findMany({select:{slug:!0,updatedAt:!0}}),a=await d.category.findMany({select:{slug:!0,updatedAt:!0}}),r=t.map(e=>({url:`${p}/product/${e.slug}`,lastModified:e.updatedAt,changeFrequency:"weekly",priority:.8})),i=a.map(e=>({url:`${p}/products?category=${e.slug}`,lastModified:e.updatedAt,changeFrequency:"weekly",priority:.7}));return[...e,...i,...r]}catch(t){return console.error("Error generating sitemap:",t),e}}var m=a(69649);let y={...r},g=y.default,x=y.generateSitemaps;async function f(e,t){let a;let{__metadata_id__:r=[],...i}=t.params||{},o=r[0],n=x?await x():null;if(n&&null==(a=n.find(e=>e.id.toString()===o)?.id))return new s.NextResponse("Not Found",{status:404});let l=await g({id:a}),u=(0,m.resolveRouteData)(l,"sitemap");return new s.NextResponse(u,{headers:{"Content-Type":"application/xml","Cache-Control":"public, max-age=0, must-revalidate"}})}let h=o.AppRouteRouteModule,w=new h({definition:{kind:n.x.APP_ROUTE,page:"/sitemap.xml/route",pathname:"/sitemap.xml",filename:"sitemap",bundlePath:"app/sitemap.xml/route"},resolvedPagePath:"next-metadata-route-loader?page=%2Fsitemap.xml%2Froute&isDynamic=1!D:\\Code\\MusaFoods_New\\musafoods\\app\\sitemap.ts?__next_metadata_route__",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:v,staticGenerationAsyncStorage:M,serverHooks:q,headerHooks:F,staticGenerationBailout:A}=w,_="/sitemap.xml/route"}};var t=require("../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[9727,8242],()=>a(73119));module.exports=r})();