"use strict";(()=>{var e={};e.id=717,e.ids=[717],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},2997:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>w,patchFetch:()=>A,requestAsyncStorage:()=>g,routeModule:()=>y,serverHooks:()=>x,staticGenerationAsyncStorage:()=>v});var a={};r.r(a),r.d(a,{default:()=>p});var n={};r.r(n),r.d(n,{GET:()=>h});var l=r(9303),o=r(8716),i=r(670),s=r(5661);let u=async()=>{let e=await fetch("https://sahlsale.work/api/advertisements/super_category");if(!e.ok)throw Error("Failed to fetch data");return e.json()};async function p(){let{data:e}=await u();return console.log(e),[{url:"https://sahl-sale-next.vercel.app/",lastModified:new Date},...e.categories.map(e=>({url:`https://sahl-sale-next.vercel.app/${e.id}/${e.title}`,lastModified:new Date}))]}var f=r(707);let c={...a},d=c.default,m=c.generateSitemaps;if("function"!=typeof d)throw Error('Default export is missing in "D:\\essam\\sahl\\sahl.gitlap\\app\\sitemap.ts"');async function h(e,t){let r;let{__metadata_id__:a,...n}=t.params||{},l=m?await m():null;if(l&&null==(r=l.find(e=>{let t=e.id.toString();return(t+=".xml")===a})?.id))return new s.NextResponse("Not Found",{status:404});let o=await d({id:r}),i=(0,f.resolveRouteData)(o,"sitemap");return new s.NextResponse(i,{headers:{"Content-Type":"application/xml","Cache-Control":"public, max-age=0, must-revalidate"}})}let y=new l.AppRouteRouteModule({definition:{kind:o.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&filePath=D%3A%5Cessam%5Csahl%5Csahl.gitlap%5Capp%5Csitemap.ts&isDynamic=1!?__next_metadata_route__",nextConfigOutput:"",userland:n}),{requestAsyncStorage:g,staticGenerationAsyncStorage:v,serverHooks:x}=y,w="/sitemap.xml/route";function A(){return(0,i.patchFetch)({serverHooks:x,staticGenerationAsyncStorage:v})}},707:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{resolveManifest:function(){return o},resolveRobots:function(){return n},resolveRouteData:function(){return i},resolveSitemap:function(){return l}});let a=r(1389);function n(e){let t="";for(let r of Array.isArray(e.rules)?e.rules:[e.rules]){for(let e of(0,a.resolveArray)(r.userAgent||["*"]))t+=`User-Agent: ${e}
`;if(r.allow)for(let e of(0,a.resolveArray)(r.allow))t+=`Allow: ${e}
`;if(r.disallow)for(let e of(0,a.resolveArray)(r.disallow))t+=`Disallow: ${e}
`;r.crawlDelay&&(t+=`Crawl-delay: ${r.crawlDelay}
`),t+="\n"}return e.host&&(t+=`Host: ${e.host}
`),e.sitemap&&(0,a.resolveArray)(e.sitemap).forEach(e=>{t+=`Sitemap: ${e}
`}),t}function l(e){let t=e.some(e=>Object.keys(e.alternates??{}).length>0),r="";for(let n of(r+='<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"',t?r+=' xmlns:xhtml="http://www.w3.org/1999/xhtml">\n':r+=">\n",e)){var a;r+=`<url>
<loc>${n.url}</loc>
`;let e=null==(a=n.alternates)?void 0:a.languages;if(e&&Object.keys(e).length)for(let t in e)r+=`<xhtml:link rel="alternate" hreflang="${t}" href="${e[t]}" />
`;if(n.lastModified){let e=n.lastModified instanceof Date?n.lastModified.toISOString():n.lastModified;r+=`<lastmod>${e}</lastmod>
`}n.changeFrequency&&(r+=`<changefreq>${n.changeFrequency}</changefreq>
`),"number"==typeof n.priority&&(r+=`<priority>${n.priority}</priority>
`),r+="</url>\n"}return r+"</urlset>\n"}function o(e){return JSON.stringify(e)}function i(e,t){return"robots"===t?n(e):"sitemap"===t?l(e):"manifest"===t?o(e):""}},1389:(e,t)=>{function r(e){return Array.isArray(e)?e:[e]}function a(e){if(null!=e)return r(e)}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{resolveArray:function(){return r},resolveAsArrayOrUndefined:function(){return a}})}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[948,518],()=>r(2997));module.exports=a})();