"use strict";(()=>{vare={};e.id=3409,e.ids=[3409],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){returnfunctione(r,t){returntinr?r[t]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,t)):"function"==typeofr&&"default"===t?r:void0}}})},93987:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>m,routeModule:()=>f});vars={};t.r(s),t.d(s,{default:()=>d});varn=t(89947),a=t(2706),o=t(96762),i=t(79531),l=t.n(i),c=t(77538),u=t.n(c);asyncfunctiond(e,r){if("POST"!==e.method)returnr.json({msg:"Failed!"});let{name:t,email:s,message:n}=e.body;if(!s.match(/.*@.*\..*/))returnr.json({success:!1,msg:"Invalid Email"});if(!t.match(/./)||!n.match(/./))returnr.json({success:!1,msg:"Please Fill in all Fields"});try{(awaitl()({to:process.env.DSQL_CONTACT_EMAIL,html:`
<h2>MessageFrom${t},${s}</h2>
<p>${n}</p>
`,subject:"Contact Form Submission",text:`Messagefrom${t},${s}`})).messageId?r.json({success:!0}):r.json({success:!1,msg:"Message Sending Failed"})}catch(e){u()({component:"/api/contact/main-catch-error",message:e.message}),r.json({success:!1,msg:"Database Files could not be written!"})}}let m=(0,o.M)(s,"default"),p=(0,o.M)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/contact",pathname:"/api/contact",bundlePath:"",filename:""},userland:s})},79531:(e,r,t)=>{let s=t(29021),n=t(21572).createTransport({host:process.env.DSQL_MAIL_HOST,port:465,secure:!0,auth:{user:process.env.DSQL_MAIL_EMAIL,pass:process.env.DSQL_MAIL_PASSWORD}});e.exports=async function({to:e,subject:r,text:t,html:a,alias:o}){let i;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let l=(o?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!s.existsSync("./email/index.html"))return;let c=s.readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,a||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let s={};s.from=`"Datasquirel"<${l}>`,s.sender=l,o&&(s["replyTo "]=l),s.to=e,s.subject=r,s.text=t,s.html=c,i=await n.sendMail(s)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return i}},77538:(e,r,t)=>{let s=t(29021),{IncomingMessage:n}=t(81630);e.exports=async function({user:e,message:r,component:t,noMail:n,req:a}){let o=new Date,i=(()=>{if(!a)return null;try{let e=a.headers["x-forwarded-for"],r=a.headers["x-real-ip"],t=a.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||a.socket.remoteAddress;if(!n)return null;return String(n)}catch(e){return null}})();try{let n=`🚀SERVERERROR===========================