"use strict";(()=>{var e={};e.id=7146,e.ids=[7146],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")},73292:e=>{e.exports=require("fs/promises")},71017:e=>{e.exports=require("path")},20594:(e,r,s)=>{s.r(r),s.d(r,{originalPathname:()=>g,patchFetch:()=>w,requestAsyncStorage:()=>m,routeModule:()=>v,serverHooks:()=>h,staticGenerationAsyncStorage:()=>x});var t={};s.r(t),s.d(t,{POST:()=>f});var a=s(49303),i=s(88716),o=s(60670),n=s(73292),p=s(71017),u=s.n(p),l=s(57147);let d=u().resolve(process.cwd(),".."),c=u().join(d,"data","profile_data");async function f(e){try{let r=await e.json(),s=(0,p.join)(c,"userProfile.json");await (0,n.mkdir)(c,{recursive:!0});let t=[];if((0,l.existsSync)(s)){let e=await (0,n.readFile)(s,"utf-8");t=e.trim()?JSON.parse(e):[]}let a=t.findIndex(e=>e.email===r.email);return -1!==a?t[a]={...t[a],...r}:t.push(r),await (0,n.writeFile)(s,JSON.stringify(t,null,2),"utf-8"),new Response(JSON.stringify({success:!0,message:"User data saved or updated successfully."}),{status:200,headers:{"Content-Type":"application/json"}})}catch(e){return console.error("Error saving data:",e),new Response(JSON.stringify({success:!1,message:"Failed to save user data."}),{status:500,headers:{"Content-Type":"application/json"}})}}let v=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/save_user_profile/route",pathname:"/api/save_user_profile",filename:"route",bundlePath:"app/api/save_user_profile/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\save_user_profile\\route.js",nextConfigOutput:"",userland:t}),{requestAsyncStorage:m,staticGenerationAsyncStorage:x,serverHooks:h}=v,g="/api/save_user_profile/route";function w(){return(0,o.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:x})}},49303:(e,r,s)=>{e.exports=s(30517)}};var r=require("../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[8948],()=>s(20594));module.exports=t})();