"use strict";(()=>{var e={};e.id=7972,e.ids=[7972],e.modules={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")},57147:e=>{e.exports=require("fs")},71017:e=>{e.exports=require("path")},35670:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>_,patchFetch:()=>f,requestAsyncStorage:()=>j,routeModule:()=>h,serverHooks:()=>v,staticGenerationAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{POST:()=>l});var o=t(49303),a=t(88716),n=t(60670),i=t(87070),p=t(57147),c=t.n(p),u=t(71017),d=t.n(u);let m=d().resolve(process.cwd(),"..");async function l(e){try{let r=(await e.json()).folder||"search_data",t=d().join(m,"data",r);if(!c().existsSync(t))return i.NextResponse.json({error:"Data directory not found"},{status:404});let s=c().readdirSync(t).filter(e=>e.endsWith(".json")).map(e=>({name:e,time:c().statSync(d().join(t,e)).mtime.getTime()})).sort((e,r)=>e.time-r.time).map(e=>e.name.replaceAll("_"," ").replace(".json",""));return i.NextResponse.json(s)}catch(e){return i.NextResponse.json({error:"Failed to retrieve file list."},{status:500})}}let h=new o.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/common_searches_json/route",pathname:"/api/common_searches_json",filename:"route",bundlePath:"app/api/common_searches_json/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\common_searches_json\\route.js",nextConfigOutput:"",userland:s}),{requestAsyncStorage:j,staticGenerationAsyncStorage:x,serverHooks:v}=h,_="/api/common_searches_json/route";function f(){return(0,n.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:x})}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8948,5972],()=>t(35670));module.exports=s})();