"use strict";(()=>{vare={};e.id=245,e.ids=[245],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")},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}}})},34029:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>_,routeModule:()=>E});vars={};t.r(s),t.d(s,{default:()=>p});vara=t(89947),n=t(2706),i=t(96762),o=t(6420),l=t.n(o),u=t(77538),c=t.n(u),d=t(51348),f=t.n(d);asyncfunctionp(e,r){if("GET"!==e.method)returnr.json({user:null,msg:"Registration Failed!"});lett=awaitl()(e,r);if(!t)returnr.json({success:!1,msg:"Unauthorized"});lets=e.query.dbSlug,a=e.query.dbOwnerId,n=e.query.delegatedUserId;try{lete=awaitf()("SELECT id FROM user_databases WHERE user_id=? AND db_slug=?",[a,s]);if(!e||!e[0])returnr.json({success:!1,msg:"Database not found"});lett=awaitf()("SELECT table_name,table_slug FROM user_database_tables WHERE user_id=? AND db_id=?",[a,e[0].id]),i=awaitf()("SELECT `database`,`table` FROM delegated_user_tables WHERE root_user_id=? AND delegated_user_id=?",[a,n]);r.json({success:!0,tables:t,accessed_tables:i})}catch(e){c()({component:"/api/getDatabaseTables/main-catch-error",message:e.message,user:t}),r.json({success:!1})}}t(29021);let_=(0,i.M)(s,"default"),S=(0,i.M)(s,"config"),E=newa.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/getDatabaseTables",pathname:"/api/getDatabaseTables",bundlePath:"",filename:""},userland:s})},77538:(e,r,t)=>{lets=t(29021),{IncomingMessage:a}=t(81630);e.exports=asyncfunction({user:e,message:r,component:t,noMail:a,req:n}){leti=newDate,o=(()=>{if(!n)returnnull;try{lete=n.headers["x-forwarded-for"],r=n.headers["x-real-ip"],t=n.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],a=t||s||r||n.socket.remoteAddress;if(!a)returnnull;returnString(a)}catch(e){returnnull}})();try{leta=`🚀 SERVER ERROR ===========================