"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")},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}}})},63133:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>u,routeModule:()=>m});varn={};t.r(n),t.d(n,{default:()=>c});vars=t(89947),a=t(2706),o=t(96762),i=t(96052),l=t(67619);asyncfunctionc(e,r){if("POST"!==e.method)returnr.json({msg:"Failed!"});let{name:t,email:n,message:s}=e.body;if(!n.match(/.*@.*\..*/))returnr.json({success:!1,msg:"Invalid Email"});if(!t.match(/./)||!s.match(/./))returnr.json({success:!1,msg:"Please Fill in all Fields"});try{(await(0,i.default)({to:process.env.DSQL_CONTACT_EMAIL,html:`
<h2>MessageFrom${t},${n}</h2>
<p>${s}</p>
`,subject:"Contact Form Submission",text:`Messagefrom${t},${n}`})).messageId?r.json({success:!0}):r.json({success:!1,msg:"Message Sending Failed"})}catch(e){(0,l.default)({component:"/api/contact/main-catch-error",message:e.message}),r.json({success:!1,msg:"Database Files could not be written!"})}}let u=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),m=new s.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/contact",pathname:"/api/contact",bundlePath:"",filename:""},userland:n})},96052:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var n=t(29021),s=t.n(n),a=t(21572);let o=t.n(a)().createTransport({host:process.env.DSQL_MAIL_HOST,port:465,secure:!0,auth:{user:process.env.DSQL_MAIL_EMAIL,pass:process.env.DSQL_MAIL_PASSWORD}});async function i({to:e,subject:r,text:t,html:n,alias:a,senderName:i}){let l;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)return null;let c=(a?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!s().existsSync("./email/index.html"))return;let u=s().readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,n||"").replace(/{{issue_date}}/,Date().substring(0,24));try{let n={};n.from=`"${i||"Datasquirel"}"<${c}>`,n.sender=c,a&&(n.replyTo=c),n.to=e,n.subject=r,n.text=t,n.html=u,l=await o.sendMail(n)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}return l}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});var n=t(29021),s=t.n(n);async function a({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"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||a.socket.remoteAddress;if(!s)return null;return String(s)}catch(e){return null}})();try{let n=`🚀SERVERERROR===========================