"use strict";(()=>{var e={};e.id=8568,e.ids=[8568],e.modules={145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},6705:e=>{e.exports=import("formidable")},3292:e=>{e.exports=require("fs/promises")},1017:e=>{e.exports=require("path")},1317:(e,a,r)=>{r.a(e,async(e,s)=>{try{r.r(a),r.d(a,{config:()=>c,default:()=>d,routeModule:()=>l});var i=r(1802),t=r(7153),o=r(8781),p=r(3450),n=e([p]);p=(n.then?(await n)():n)[0];let d=(0,o.l)(p,"default"),c=(0,o.l)(p,"config"),l=new i.PagesAPIRouteModule({definition:{kind:t.x.PAGES_API,page:"/api/passportsprocessor",pathname:"/api/passportsprocessor",bundlePath:"",filename:""},userland:p});s()}catch(e){s(e)}})},3450:(e,a,r)=>{r.a(e,async(e,s)=>{try{r.r(a),r.d(a,{config:()=>c,default:()=>u});var i=r(6705),t=r(1017),o=r.n(t),p=r(3292),n=r.n(p),d=e([i]);i=(d.then?(await d)():d)[0];let c={api:{bodyParser:!1}},l="",readFile=(e,a)=>{let r={};a&&(r.uploadDir=o().join(process.cwd(),"/public/passportsimgs"),r.filename=(e,a,r,s)=>l=Date.now().toString()+"_"+r.originalFilename);let s=(0,i.default)(r);return new Promise((a,r)=>{s.parse(e,(e,s,i)=>{e&&r(e),a({fields:s,files:i})})})},handler=async(e,a)=>{try{await n().readdir(o().join(process.cwd()+"/public","/passportsimgs"))}catch(e){await n().mkdir(o().join(process.cwd()+"/public","/passportsimgs"))}await readFile(e,!0),a.json({done:l})},u=handler;s()}catch(e){s(e)}})}};var a=require("../../webpack-api-runtime.js");a.C(e);var __webpack_exec__=e=>a(a.s=e),r=a.X(0,[4222],()=>__webpack_exec__(1317));module.exports=r})();