"use strict";(()=>{var e={};e.id=4366,e.ids=[4366],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")},32081:e=>{e.exports=require("child_process")},41808:e=>{e.exports=require("net")},22037:e=>{e.exports=require("os")},46509:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>b,patchFetch:()=>v,requestAsyncStorage:()=>h,routeModule:()=>x,serverHooks:()=>f,staticGenerationAsyncStorage:()=>w});var o={};t.r(o),t.d(o,{POST:()=>g});var n=t(49303),a=t(88716),s=t(60670),i=t(87070),p=t(32081),u=t(22037),d=t.n(u),c=t(41808),l=t.n(c);async function m(){let e="",r=d().platform();"win32"===r?e='"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" --remote-debugging-port=9222 --user-data-dir="C:\\chrome-debug" --start-maximized':"darwin"===r?e='"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --remote-debugging-port=9222 --user-data-dir="/tmp/chrome-debug" --start-fullscreen':"linux"===r&&(e='google-chrome --remote-debugging-port=9222 --user-data-dir="/tmp/chrome-debug" --start-maximized'),(0,p.exec)(e,(e,r,t)=>{if(e||t)return})}async function g(){try{return await new Promise(e=>{let r=l().createConnection({port:9222},()=>{r.end(),e(!0)});r.on("error",()=>e(!1))})&&await function(){let e=d().platform(),r="";return"win32"===e?r='for /f "tokens=5" %a in (\'netstat -aon ^| find ":9222" ^| find "LISTENING"\') do taskkill /PID %a /F':("darwin"===e||"linux"===e)&&(r="lsof -ti :9222 | xargs kill -9"),new Promise((e,t)=>{(0,p.exec)(r,(r,o,n)=>{if(r)return n.includes("No such process")||n.includes("not found")?e():t(r);e()})})}(),await m(),i.NextResponse.json({message:"Browser Restarted!"})}catch(e){return i.NextResponse.json({error:"Failed to restart browser"},{status:500})}}let x=new n.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/open_browser/route",pathname:"/api/open_browser",filename:"route",bundlePath:"app/api/open_browser/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\open_browser\\route.js",nextConfigOutput:"",userland:o}),{requestAsyncStorage:h,staticGenerationAsyncStorage:w,serverHooks:f}=x,b="/api/open_browser/route";function v(){return(0,s.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:w})}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[8948,5972],()=>t(46509));module.exports=o})();