"use strict";(()=>{var e={};e.id=121,e.ids=[121],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")},6663:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>v,patchFetch:()=>h,requestAsyncStorage:()=>c,routeModule:()=>u,serverHooks:()=>d,staticGenerationAsyncStorage:()=>l});var n={};r.r(n),r.d(n,{GET:()=>p});var s=r(3036),a=r(5736),o=r(5262),i=r(7698);async function p(e){let{searchParams:t}=new URL(e.url),r=t.get("limit")??"50",n=t.get("project")??"",s=n&&"default"!==n?`/projects/${encodeURIComponent(n)}/stale-events`:"/stale-events";return(0,i.s0)(`${i.Wx}${s}?limit=${r}`,()=>Response.json({events:[],count:0,total:0}),e)}let u=new s.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/stale-events/route",pathname:"/api/stale-events",filename:"route",bundlePath:"app/api/stale-events/route"},resolvedPagePath:"/home/runner/work/neat/neat/packages/web/app/api/stale-events/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:c,staticGenerationAsyncStorage:l,serverHooks:d}=u,v="/api/stale-events/route";function h(){return(0,o.patchFetch)({serverHooks:d,staticGenerationAsyncStorage:l})}},3036:(e,t,r)=>{e.exports=r(517)},7698:(e,t,r)=>{r.d(t,{Wx:()=>n,s0:()=>o});let n=process.env.NEAT_API_URL??process.env.NEAT_CORE_URL??"http://localhost:8080",s="1"===process.env.NEAT_DEMO,a=["authorization","last-event-id"];async function o(e,t,r){try{let t=await fetch(e,{cache:"no-store",headers:function(e){if(!e)return;let t={};for(let r of a){let n=e.headers.get(r);n&&(t[r]=n)}return Object.keys(t).length>0?t:void 0}(r)}),n=await t.text();return new Response(n,{status:t.status,headers:{"content-type":t.headers.get("content-type")??"application/json"}})}catch{if(s)return t();return Response.json({error:"failed to reach neat-core",coreUrl:n},{status:502})}}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[522],()=>r(6663));module.exports=n})();