"use strict";(()=>{var e={};e.id=5635,e.ids=[5635],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")},16655:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>v,patchFetch:()=>g,requestAsyncStorage:()=>x,routeModule:()=>f,serverHooks:()=>j,staticGenerationAsyncStorage:()=>_});var o={};t.r(o),t.d(o,{POST:()=>m,dynamic:()=>l});var s=t(49303),a=t(88716),n=t(60670),i=t(87070),c=t(57147),u=t.n(c),p=t(71017),d=t.n(p);let l="force-dynamic",h=d().resolve(process.cwd(),"..");async function m(e){try{let{query:r,folder:t="search_data"}=await e.json();if(!r)return i.NextResponse.json({error:"Query is required"},{status:400});let o=d().join(h,"data",t),s=r.replace(/[^a-zA-Z0-9]/g,"_").toLowerCase(),a=d().join(o,`${s}.json`);if(!u().existsSync(a))return i.NextResponse.json({error:`No data found for query: ${r}`},{status:404});let n=u().readFileSync(a,"utf-8"),c=n.trim().length>0?JSON.parse(n):[];return i.NextResponse.json(c)}catch(e){return console.error("❌ Error reading JSON file:",e),i.NextResponse.json({error:"Failed to read data."},{status:500})}}let f=new s.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/common_searches_fetch/route",pathname:"/api/common_searches_fetch",filename:"route",bundlePath:"app/api/common_searches_fetch/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\common_searches_fetch\\route.js",nextConfigOutput:"",userland:o}),{requestAsyncStorage:x,staticGenerationAsyncStorage:_,serverHooks:j}=f,v="/api/common_searches_fetch/route";function g(){return(0,n.patchFetch)({serverHooks:j,staticGenerationAsyncStorage:_})}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[8948,5972],()=>t(16655));module.exports=o})();