"use strict";(()=>{var e={};e.id=9415,e.ids=[9415],e.modules={53524:e=>{e.exports=require("@prisma/client")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},32081:e=>{e.exports=require("child_process")},6113:e=>{e.exports=require("crypto")},9523:e=>{e.exports=require("dns")},82361:e=>{e.exports=require("events")},57147:e=>{e.exports=require("fs")},13685:e=>{e.exports=require("http")},95687:e=>{e.exports=require("https")},41808:e=>{e.exports=require("net")},22037:e=>{e.exports=require("os")},71017:e=>{e.exports=require("path")},12781:e=>{e.exports=require("stream")},24404:e=>{e.exports=require("tls")},57310:e=>{e.exports=require("url")},73837:e=>{e.exports=require("util")},59796:e=>{e.exports=require("zlib")},35991:(e,r,t)=>{t.r(r),t.d(r,{headerHooks:()=>m,originalPathname:()=>f,requestAsyncStorage:()=>x,routeModule:()=>l,serverHooks:()=>h,staticGenerationAsyncStorage:()=>q,staticGenerationBailout:()=>A});var o={};t.r(o),t.d(o,{POST:()=>P}),t(95655);var s=t(83323),i=t(54647),n=t(66886),a=t(30953),u=t(82280),p=t(6113),d=t.n(p);async function P(e){try{let r=await e.json(),{email:t,name:o}=r;if(!t)return n.Z.json({error:"Email is required"},{status:400});let s=d().randomInt(1e5,999999).toString(),i=new Date(Date.now()+6e5);return await a._.verificationToken.deleteMany({where:{identifier:t}}),await a._.verificationToken.create({data:{identifier:t,token:s,expires:i}}),await u.y.sendQuoteVerificationOTP(t,s,o||"Customer"),n.Z.json({success:!0,message:"OTP sent"})}catch(e){return console.error("Error sending OTP:",e),n.Z.json({error:"Error sending OTP"},{status:500})}}let c=s.AppRouteRouteModule,l=new c({definition:{kind:i.x.APP_ROUTE,page:"/api/auth/otp/send/route",pathname:"/api/auth/otp/send",filename:"route",bundlePath:"app/api/auth/otp/send/route"},resolvedPagePath:".\\app\\api\\auth\\otp\\send\\route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:x,staticGenerationAsyncStorage:q,serverHooks:h,headerHooks:m,staticGenerationBailout:A}=l,f="/api/auth/otp/send/route"},54647:(e,r)=>{var t;Object.defineProperty(r,"x",{enumerable:!0,get:function(){return t}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(t||(t={}))}};var r=require("../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[9727,3497,6886,3330,2280],()=>t(35991));module.exports=o})();