"use strict";(()=>{var e={};e.id=3889,e.ids=[3889],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")},56681:e=>{e.exports=require("playwright")},94040:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>w,patchFetch:()=>g,requestAsyncStorage:()=>c,routeModule:()=>d,serverHooks:()=>m,staticGenerationAsyncStorage:()=>x});var a={};r.r(a),r.d(a,{POST:()=>l});var i=r(49303),o=r(88716),s=r(60670),n=r(87070),u=r(56681),p=r.n(u);async function l(e){let t;try{let{url:r}=await e.json();if(!r)return n.NextResponse.json({error:"URL is required"},{status:400});t=await p().chromium.launch();let a=await t.newPage();await a.route("**/*",e=>{["image","stylesheet","font"].includes(e.request().resourceType())?e.abort():e.continue()}),await a.goto(r,{waitUntil:"domcontentloaded",timeout:3e4}),await a.waitForTimeout(4e3);let i=await a.evaluate(()=>{let e=document.querySelectorAll("ul.pdsd-od-list li")||[],t="",r="";e.length&&(r=e[0]?.querySelector("span")?.innerText||"",t=e[1]?.querySelector("span")?.innerText||"");let a=()=>{let e=document.body.innerText.match(/\b[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}[Z]{1}[0-9A-Z]{1}\b/g);return e?.[0]||"N/A"};return{business_type:t,business_year:r,business_gst:a(),gst:a()}});return await t.close(),n.NextResponse.json({...i,url:r})}catch(e){return console.error("❌ Scraping Error:",e),n.NextResponse.json({error:"Failed to scrape website"},{status:500})}finally{await t.close()}}let d=new i.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/api/exportersindia_detail_scraper/route",pathname:"/api/exportersindia_detail_scraper",filename:"route",bundlePath:"app/api/exportersindia_detail_scraper/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\exportersindia_detail_scraper\\route.js",nextConfigOutput:"",userland:a}),{requestAsyncStorage:c,staticGenerationAsyncStorage:x,serverHooks:m}=d,w="/api/exportersindia_detail_scraper/route";function g(){return(0,s.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:x})}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8948,5972],()=>r(94040));module.exports=a})();