"use strict";(()=>{var e={};e.id=4503,e.ids=[4503],e.modules={72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},6005:e=>{e.exports=require("node:crypto")},55625:(e,t,a)=>{a.r(t),a.d(t,{originalPathname:()=>g,patchFetch:()=>y,requestAsyncStorage:()=>m,routeModule:()=>u,serverHooks:()=>f,staticGenerationAsyncStorage:()=>d});var n={};a.r(n),a.d(n,{GET:()=>p});var r=a(49303),o=a(88716),s=a(60670),i=a(87070),l=a(90455),c=a(17679);async function p(e,{params:t}){let{cityName:a}=await t;if(!["en","it","al"].includes(a))return i.NextResponse.json({error:"Not found"},{status:404});let n=(0,l.I2)(),r=await (0,c.a)(a,n);return r?new i.NextResponse(r,{headers:{"Content-Type":"application/xml; charset=utf-8","Cache-Control":"public, max-age=86400, s-maxage=86400"}}):i.NextResponse.json({error:"Sitemap not available"},{status:500})}let u=new r.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/[cityName]/sitemap.xml/route",pathname:"/[cityName]/sitemap.xml",filename:"route",bundlePath:"app/[cityName]/sitemap.xml/route"},resolvedPagePath:"/Users/ferlando/Desktop/baboon-nextjs/app/[cityName]/sitemap.xml/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:m,staticGenerationAsyncStorage:d,serverHooks:f}=u,g="/[cityName]/sitemap.xml/route";function y(){return(0,s.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:d})}},19191:(e,t,a)=>{a.d(t,{F:()=>s,q:()=>o});var n=a(47090),r=a(70446);async function o(e,t={}){let{apiBase:a="mobile",method:o="GET",body:s,token:i,langCode:l,notificationToken:c,headers:p={},revalidate:u,cache:m}=t,d=n.Y8[a],f=`${d}${e.startsWith("/")?e:"/"+e}`,g={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(g.Authorization=i),l&&(g.langCode=l);let y=c;if(!y)try{y=(await (0,r.Gg)()).fcmToken}catch{}y&&(g.notificationToken=y);let x={method:o,headers:g};s&&"GET"!==o&&(x.body=JSON.stringify(s)),void 0!==u&&(x.next={revalidate:u}),m&&(x.cache=m);let h=await fetch(f,x);if(!h.ok)throw Error(`API request failed: ${h.status} ${h.statusText}`);return h.json()}async function s(e,t={}){let{apiBase:a="mobile",method:o="GET",body:s,token:i,langCode:l,notificationToken:c,headers:p={}}=t,u=n.Y8[a],m=`${u}${e.startsWith("/")?e:"/"+e}`,d={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(d.Authorization=i),l&&(d.langCode=l);let f=c;if(!f)try{f=(await (0,r.Gg)()).fcmToken}catch{}f&&(d.notificationToken=f);let g={method:o,headers:d};return s&&"GET"!==o&&(g.body=JSON.stringify(s)),fetch(m,g)}},90455:(e,t,a)=>{function n(e){return e.token?e.token:e.user?.token?e.user.token:process.env.BABOON_APP_BUSINESS_TOKEN||""}function r(){return process.env.BABOON_APP_BUSINESS_TOKEN||""}a.d(t,{I2:()=>r,LP:()=>n})},47090:(e,t,a)=>{a.d(t,{RF:()=>n,Y8:()=>o,pH:()=>r});let n=["al","en","it"],r={AL:{latitude:41.327546,longitude:19.818698,cityId:1,countryId:1},XK:{latitude:42.662914,longitude:21.165503,cityId:2,countryId:2}},o={mobile:process.env.BABOON_API_MOBILE_URL,legacy:process.env.BABOON_API_URL,sysadmin:process.env.BABOON_API_SYSADMIN_URL,payment:process.env.BABOON_API_PAYMENT_URL}},17679:(e,t,a)=>{a.d(t,{a:()=>i});var n=a(19191);let r=new Map;function o(e){let t='<?xml version="1.0" encoding="UTF-8"?>\n';for(let a of(t+='<urlset xmlns:xhtml="http://www.w3.org/1999/xhtml"\n        xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" >\n',e))t+=`    <url>
        <loc>${s(a.loc)}</loc>
`,a.lastmod&&(t+=`        <lastmod>${s(a.lastmod)}</lastmod>
`),a.changefreq&&(t+=`        <changefreq>${s(a.changefreq)}</changefreq>
`),a.priority&&(t+=`        <priority>${s(a.priority)}</priority>
`),t+="    </url>\n";return t+"</urlset>"}function s(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}async function i(e,t){let a="al"===e?"sq":e,s=`sitemap_data_${a}`,i=r.get(s);if(i&&Date.now()<i.expiresAt)return o(i.data);try{let i=await (0,n.F)(`/websystem/v1/sitemap?langCode=${a}`,{apiBase:"mobile",token:t});if(!i.ok)return null;let l=await i.text(),c=l;try{let e=JSON.parse(l);e.data&&"string"==typeof e.data&&(c=e.data)}catch{}let p=function(e){let t;let a=e.replace(/&(?!#?[a-z0-9]+;)/gi,"&amp;"),n=[],r=/<url>([\s\S]*?)<\/url>/g;for(;null!==(t=r.exec(a));){let e=t[1],a=e.match(/<loc>([\s\S]*?)<\/loc>/)?.[1]?.trim();if(!a)continue;let r={loc:a},o=e.match(/<lastmod>([\s\S]*?)<\/lastmod>/)?.[1]?.trim();o&&(r.lastmod=o);let s=e.match(/<changefreq>([\s\S]*?)<\/changefreq>/)?.[1]?.trim();s&&(r.changefreq=s);let i=e.match(/<priority>([\s\S]*?)<\/priority>/)?.[1]?.trim();i&&(r.priority=i),n.push(r)}return n}(c),u="sq"===a?"al":e;if("al"!==u)for(let e of p)e.loc&&(e.loc=e.loc+"?langCode="+u);return r.set(s,{data:p,expiresAt:Date.now()+864e5}),o(p)}catch{return null}}},70446:(e,t,a)=>{a.d(t,{Gg:()=>i,dx:()=>o,l7:()=>s,yK:()=>l});var n=a(78632),r=a(71615);let o={password:process.env.SESSION_SECRET,cookieName:"baboon-session",cookieOptions:{secure:!0,httpOnly:!0,sameSite:"lax",maxAge:604800}},s={...o,cookieName:"baboon-admin-session"};async function i(){let e=await (0,r.cookies)();return(0,n.iW)(e,o)}async function l(){let e=await (0,r.cookies)();return(0,n.iW)(e,s)}}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),n=t.X(0,[8948,3314,8632,5972],()=>a(55625));module.exports=n})();