"use strict";(()=>{vare={};e.id=2896,e.ids=[2896],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},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}}})},57237:(e,r,t)=>{t.r(r),t.d(r,{config:()=>y,default:()=>m,routeModule:()=>E});vars={};t.r(s),t.d(s,{default:()=>S});varn=t(89947),a=t(2706),o=t(96762),i=t(57638),c=t.n(i),l=t(48225),u=t.n(l),d=t(6420),p=t.n(d),f=t(72835),_=t.n(f);asyncfunctionS(e,r){if("GET"!==e.method)returnr.json({msg:"Failed!"});lett=awaitp()(e,r);if(!t)returnr.json({success:!1,msg:"Unauthorized"});let{table:s,db:n,id:a}=e.query,o=e.query.schema;try{lete=`SELECT * FROM \`${s}\` WHERE id=?`,t=[a?.toString()||""],i=awaitc()({database:n?.toString()||"",queryString:e,queryValuesArray:t});if(!i||!i[0])returnr.json({success:!1,msg:"Entry not found"});letl=JSON.parse(o||"{}");try{for(lete=0;e<l.fields.length;e++){letr=l.fields[e];r.encrypted&&r.fieldName&&(i[0][r.fieldName]=_()({encryptedString:i[0][r.fieldName]}))}}catch(e){console.log("Error in parsing and decrypting fields in 'UpdateDbEntry' API ROute =>",e.message)}r.json({success:!0,entry:i[0]})}catch(e){u()({component:"/api/refreshEntry/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Deletion Failed!"})}}letm=(0,o.M)(s,"default"),y=(0,o.M)(s,"config"),E=newn.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/refreshEntry",pathname:"/api/refreshEntry",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);lets=t(51348),n=t(72835),a=t(29021),o=t(31341);asyncfunctioni(e,r,t,i){let{keyCookieName:c,csrfCookieName:l}=o();if(!e.cookies?.[c]?.match(/./))returnnull;letu=n({encryptedString:e.cookies[c]});if(!u)returnnull;letd=JSON.parse(u);if(!d.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${d.csrf_k}`)))returnnull;letp=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!p)returnconsole.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${p}/${d.csrf_k}`))returnnull;if(0==d.verification_status&&!t){lete=awaits(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}returnd?.date&&Date.now()-d.date>6048e5?null:d}e.exports=i},31341:e=>{e.exports=function(){lete=process.env.DSQL_COOKIES_PREFIX||"dsql_";return{keyCookieName:e+(process.env.DSQL_COOKIES_KEY_NAME||"key"),csrfCookieName:e+(process.env.DSQL_COOKIES_CSRF_NAME||"csrf")}}},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},6061:(e,r,t)=>{lets=t(72835),n=t(30003);e.exports=asyncfunction({unparsedResults:e,tableSchema:r}){lett=[];try{for(leta=0;a<e.length;a++){leto=e[a],i=Object.keys(o);for(lete=0;e<i.length;e++){lett=i[e],a=r?.fields[e];if(t?.match(n))continue;letc=o[t];("number"==typeofc||c)&&a?.encrypted&&c?.match(/./)&&(o[t]=s({encryptedString:c}))}t.push(o)}returnt}catch(r){returnconsole.log("ERROR in parseDbResults Function =>",r.message),e}}},48225:(e,r,t)=>{lets=t(29021),{IncomingMessage:n}=t(81630);e.exports=asyncfunction({user:e,message:r,component:t,noMail:n,req:a}){leto=newDate,i=(()=>{if(!a)returnnull;try{lete=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)returnnull;returnString(n)}catch(e){returnnull}})();try{letn=`🚀 SERVER ERROR ===========================